Arch Linux kernel and NVidia recent bugs

I was facing frequent freeze of the laptop recently. The discussion can be found here.

Basically, there are two issues, one is the Linux kernel, and the other is the NVidia driver update.

Linux kernel causes some Oops in the kernel, probably related, I don’t know. The result is that I can’t shutdown my laptop because it cannot unmount /home and /tmp. To resolve this, I upgraded the Linux kernel to 6.7.8, and added zswap.enabled=0 and numa=off as the kernel parameter, in GRUB. I am not sure which one is the actual action that solve the issue.

Another issue that drives me crazy is the NVidia. Since NVidia 545, the laptop will freeze suddenly. After several trials, I change to nvidia-open-dkms. Besides that, I also experienced switching the TTY causing the black screen but the mouse is visible and movable. This is slightly different from the discussion on the forum, in which the other users reported having a black screen with a visible mouse after resuming from suspend to memory (sleep). After much trial and error, I found that the compositor picom caused the issue. If I kill picom, then there is no issue when switching TTY, or even resuming from suspend to memory.

The forum suggested to use NVreg_PreserveVideoMemoryAllocations=1 for the black screen issue. I tried, but it doesn’t work. Probably I did it wrongly.

Arch Linux Xorg failed to run

Today I updated the packages, then rebooted, then the machine got stuck at

[Started] Accounts Service

Seriously, I have had no issues with my laptop recently. And this makes me nervous. It will be troublesome if I have to boot into the Arch Linux LiveUSB. But luckily, searched online, and someone mentioned to change to another TTY with Ctrl+Alt+F2.

Wheew. I still can log in with the command-line. And then I noticed that, the issue must be NVidia driver related.

Since I faced the backlight bug of NVidia 545 driver, I have ignored the NVidia related packages during upgrading. Besides that, I am using DKMS as well. During the upgrading, I didn’t notice the following error

Error! Bad return status for module build on kernel: 6.7.3-arch1-1 (x86_64)

As a result, this causes lightdm failed to run.

With the alternative TTY, I install all the latest NVidia packages (545.29.06) and re-install the Linux kernel, DKMS builds without error.

Reboot, problem solved!

P/S: However, I found that I cannot resume from suspend to RAM properly, though sometimes there is no issue. I can see a black screen with a mouse moving, but not able to change to another TTY. This is super annoying. A similar issue is discussed here.

Android playing iOS MOV video

I am using an Android phone, specifically Vivo. I found that when I play the MOV video transferred from iOS, only sound is able to be played properly but the picture is not showing.

None of the solutions from the Internet helped me to solve my problem. After trial and error, I found that the MOV file can be converted to MP4 format using ffmpeg with some parameters. Eg,

fmpeg -i input.MOV -c:v libx264 -c:a aac -vf "scale=720:1280,fps=29" -ac 1 -x264opts "ref=0:cabac=0:b_pyramid=0:bframes=0" -profile:v baseline -pix_fmt yuv420p output.mp4

Based on my experience, the most crucial parameter is “-pix_fmt yuv420p”, so the MP4 video is 8-bit depth.

Catholic Answers RSS

I don’t really like social network services, especially Facebook, though I am using Twitter. Those social network services just push any useless feeds, which they claimed to be personalized based on our surfing behaviour. However, they are just like junk food, which MAY favour my appetite. That’s why I prefer RSS news feeds, which I choose my own preferred websites (especially blogs) and follow the news.

During the lent season (today is Easter Sunday), I try my best to spend more time on spiritual readings, in order to strengthen my faith. There are too many temptations in the world, and there are a lot of challenges from the atheism. That’s why I spend more time to read the articles from Catholic Answers.

Unluckily, Catholic Answers doesn’t have RSS news feed. As a result, I can only get the latest news either from Twitter or from visiting the webpages.

Finally, I created RSS feeds for Catholic Answers Magazines and Blog by using RSSHub and deploy to Vercel.

Anyone who is interested, can subscribe the following links.

Switching from Openbox to IceWM

Bye-bye Openbox, welcome IceWM.

Due to the recent upgrade of glib2 on Arch Linux, it crashes my Openbox when I am running Wine or Proton. Downgrade to 2.74.6 is not a solution, because Nemo, Caja, Nautilus are using 2.76.0.

As a result, I have to find an alternative. From Wikipedia, I found that LXDE can be configured with other window manager rather than Openbox, eg Fluxbox, IceWM, or Xfwm.

I tried Xfwm, but it fails to run. Probably needs extra configuration, but I didn’t continue trying. I tried Fluxbox long time ago, can’t remember the feature. Then I found that, compare to Openbox, IceWM is still in development. Hence I decided to try IceWM.

After installation, I just need to configure it so that it resembles Openbox behaviour, especially the shortcut keys.

The following is the list of prominent configuration I did:

  • Install dex to start XDG autostart applications
  • Use shutdown script to pkill -u myusername , so that all the processes will be stopped/killed when I logout
  • Hide the taskbar (ShowTaskBar=0), because I use tint2
  • Use prefoverride to replace the default background image. Though, I am still using feh script to show random wallpapers
  • Window related shortcut keys are edited in preferences file; launching application shortcut keys are edited in keys file

For shortcut key to toggle a window as always on top, it requires editing keys file with the following line,

key "Alt+F12" sh -c 'if icesh -f getLayer | grep -q 'OnTop' ; then icesh -f setLayer Normal ; else icesh -f setLayer OnTop ; fi'

Note: Make sure the key such as “Alt+F12” has no conflict in preferences file. If it exists, just empty the value in the preferences file.

Some limitations I faced:

  • I cannot use Numix theme anymore
  • Alt+Ctrl+Del (system dialog) has a strange behaviour if I cancel it. I can’t type on any window after cancel, unless I switch the workspace.

As a conclusion, I just need to adapt to this new window manager. Bye-bye Openbox.

Laptop gaming with cooler

I played game with my laptop, and I prefer performance rather than graphic quality. Hence, I use MangoHud (previously I used libstrangle), by changing the FPS to 24 or 25, the gameplay is still good, and there is no heating issue on GPU (or CPU). But some of the action games like “Bloodstained: Curse of the Moon” and “Record of Lodoss War: Deedlit in Wonder Labyrinth” will require higher FPS, else the action is not smooth.

However, some games are not optimized I believe. They easily cause the heating issue, and laptop fan spins quickly and loudly.

Recently, I spent some money to buy a good laptop cooler, not those cheap one. With a good cooler, when I play the game, the heating issue is greatly reduced, though not 100% evitable. As a result, I can play more advanced games in future.

Malaysia Airlines online booking review

Recently I was doing online booking using Malaysia Airlines (MAS). In summary, the experience is too bad.

  • I cannot login using GMail with password.
  • Sending email as feedback to get support, but never get reply.
  • Passenger name cannot be too long. Need to use initials.
  • The first name and last name is super weird. The last name suppose to be family name. For Chinese with Christian name, such as James Wong Hang Seng, the family name is Wong, the last name suppose to be Wong, but the instruction says to fill the last name as James Wong. This doesn’t make any sense.
  • I signed up the account, but then I cannot edit my name, due to “security”.
  • After I booked the tickets, the booking is not shown in my account. I have to add trip to my own account. This doesn’t make sense as well. What for I signed in to do the booking? Can’t it just auto associate my account with the booking? If I can add any trip to my account, that means I can just simply add anyone’s trip to my account. Security?
  • When using web, I can’t sign in with “remember me” feature. Frequently logged out, and each time login requires OTP from mobile number.

In conclusion, it is super inconvenient to use MAS online for doing the booking. I will suggest MAS to learn from other airline. Or hire some very experienced project managers and software engineers.

Though I don’t think my review will be read.

P/S (2023-02-15): My email feedback was recently replied, and the GMail email address can be used to login with password, though I have signed up with another email account.

Feeling depressed after finished a game

(I wrote a related post in Chinese here.)

I recently finished a visual novel (a game genre). It is a great game with fully voiced feature, and it has good ending. However, after I finished the game, I felt depressed and empty until now (around a week now). The feeling is just similar to grief. I believe that, how good the game is, then how empty it will be. This is because the fictional and realistic are totally different thing. Whatever you feel through fiction, when you come into reality then they are just gone. And you found that, what you gained was just emptiness.

I searched online, and found that this type of depression is called post-game depression.

I have summarized the factors that cause me having post-game depression.

  1. The player (you) has great empathy – you can feel like game character feels.
  2. Game characters have realistic characteristics – you will feel that the game characters like a real person.
  3. Fully voiced dialog – just like those scamming dating app, you feel the heartwarming speech.
  4. The game character(s) match the player’s favour – you like the character.
  5. The story is long – you spend time with the game, causes you attached to the game character.
  6. The story is reasonable and logical – it may contains science fictional element, but story flow is reasonable.
  7. Good ending, but without finalize everything – you see the happy ending, but looks like something is missing.

In conclusion, you are attached to a fictional story that is somehow realistic (especially in the characters’ relationships), but when the story ended, then it is ended. Nothing else. This causes the player feel something suddenly missing.

In order to cope this bad experience, I am trying to (i) pay more attention on my spiritual life (i.e prayer and bible reading); (ii) talk to someone else (e.g. join Discord); (iii) listen to sad songs/musics; and (iv) re-imagine the whole game with a more completed story. Time passing will make me forget the game and the feeling, but this is really a bad experience. 😕

Twitter interests deselection bookmarklet

I like to use Twitter, but the new Topics and Interests feature of Twitter is damn annoying. It keep showing something I am not interested of.

I looked for the solution from Internet, and finally I come out with this bookmarklet, which can be used in Settings > Privacy and Safety > Content You See > Interests.

javascript:(async()=>{const sleep=ms=>new Promise(r=>setTimeout(r,ms));const inputs=document.querySelectorAll('section[aria-label="Section details"] input:checked');for(let i=0;i<inputs.length;i+=1){const rand=Math.floor(Math.random()*2e3);await sleep(9e3+rand);const input=inputs[i];input.click()}})();

After trigger the bookmarklet, just leave the page there, it will slowly deselect one by one.

Alternatively, just use Tweetdeck, which is much cleaner.