My Computer freezes, what to do?

I wrote this as I was tinkering on April 1st. This is pretty raw, and I think that it will be more helpful for me and others that it be less edited. When troubleshooting and tinkering, step by step guides rarely solve the issue straight away. Oftentimes, each user’s problem may be slightly different, and the way to the solution isn’t exactly the same. So for the sake of transparency and for my and others learning, I figured I would leave this mostly raw, just edited to fit the WP format.

Frustration from computer continually freezing. update from Fedora 30 -> 31 did not help the issue
The first article I found when googling was:
https://ask.fedoraproject.org/t/fedora-30-randomly-freezes/1698
This did not help with my issue in particular even though I am using an SSD and an M.2 NVMe SSD.
https://docs.fedoraproject.org/en-US/quick-docs/viewing-logs/
I also found this, which helped me to look up the logs.
That ultimately was unfruitful since I had to reboot, all logs were lost.
https://forums.fedoraforum.org/showthread.php?320127-Install-Fedora-on-SSD-nVME-Western-Digital&p=1816734#post1816734
This article convinced me that the SSD or my storage was not causing the issue, and if it was, it wouldn’t be resolvable.

The following article was the first one I found that was related to the actual issue I had and had links to several others, especially regarding the BLS (boot loader spec and related commands)
https://www.reddit.com/r/Fedora/comments/bngbli/fedora_30_freeze_randomly/en5nnl9/

https://www.reddit.com/r/Fedora/comments/eikjb6/fedora_31_and_ryzen_3700x_stability_issues/
This reddit post gives a good example of what the experience was like.
https://bbs.archlinux.org/viewtopic.php?id=245608
This post shows that the issue is not just isolated to Fedora and is a Linux kernel issue
This issue has appeared with other users and can be googled. It is related to the Ryzen line of CPUs
https://utcc.utoronto.ca/~cks/space/blog/linux/KernelRcuNocbsMeaning
This webpage gives a lot of more detail about what the fix actually does.

Now to actually apply the setting to my kernel is another story.
https://itsfoss.com/find-which-kernel-version-is-running-in-ubuntu/
This page shows useful commands to help you know what kernel you will apply the setting to.

$ uname [-r] #was the necessary command for me

The way to actually apply the fix can be found in this article, modified of course to match your specific system.
https://fedoramagazine.org/setting-kernel-command-line-arguments-with-fedora-30/
Here are the commands that I entered into my machine. (Of course I entered a lot more that didn’t work while trying to figure this out, but that’s how it is right 😉 )

I also searched “modify kernel boot parameters” and found this helpful site for some of the commands below.
https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators-guide/kernel-module-driver-configuration/Working_with_the_GRUB_2_Boot_Loader/

$ vi /etc/default/grub <— This is to look into the bls file that was mentioned in the article above

$ sudo grubby—default-kernel

$ sudo grubby —info=ALL <— this command displays all of the kernels installed on your machine. I happen to have 5.

$ sudo grubby —update-kernel=ALL —args=“processor.max_state=5 rcu_nocbs=0-3” <—this command is what we are ultimately trying to apply. I put in 0-3 because my processor is 4 cores.

After applying the command, I immediately noticed how much faster Steam loaded a game that I was playing. (For reference I have 2 4Gb sticks of RAM and a Ryzen 3 2400G) I also haven’t gotten random power messages and occasionally at night the screen would flash as if there was an input (like a mouse wiggle or keyboard press) on the computer. I believe that applying this fix will cause those problems to disappear.

I was also getting annoyed with forticlient on Fedora. It shows daily updates are being downloaded in the OS GUI but there is no gui functionality on Fedora like MacOS or Windows so I removed the program for now.

$ sudo dnf remove (not uninstall 🙂 ) forticlient

https://docs.fortinet.com/document/forticlient/6.0.4/linux-release-notes/612276/installation-information