I’m using an XPS 13 9350 with 16GB of RAM and the Intel Graphics 540. I am using Fedora KDE spin. When I am using computer, either randomly or when I start a program, my computer will slow down and quickly fully freeze. In this state, the only thing I can do is shut it down. Is there any way to make it so that a program is killed, or something else that doesn’t fully stop my system?
Linux Magic SysRq keys
Yeah, try pressing
Alt+[PrintScreen, F]
to invoke the OOM killer. It kills the memory-hoggingest process, usually the web browser.Fedora documentation says this sysrq functionality may be disabled by default. You can enable it once by typing at a terminal:
echo 1 | sudo tee /proc/sys/kernel/sysrq
or permanently withecho 'kernel.sysrq = 1' | sudo tee /etc/sysctl.d/90-sysrq.conf
If it turns out that memory overconsumption is the problem, you can sometimes fix this lag by disabling swap. 16GB is easily enough RAM to do all normal desktop things.
When I was but a lad, I learned the phrase “raising skinny elephants is utterly boring.” At my first job where I had a messenger (and thus could set a status message), I set this to display.
I was chastised because the leadership didn’t know what it meant, but thought it might be offensive. I don’t know whom they thought I might offend; one of the many skinny elephants on the team?
I was too nervous to set it again for several subsequent jobs, but eventually I got in a pretty technical one and displayed the message there. Not only did no one express offense, but I actually taught it to someone who put it to use when a mission critical server died.
Even if the sysrq key is disabled, most systems automatically invoke the oom killer. If your work is super important, just let your system sit for a day or two the problem may resolve itself.
If you don’t get any logs about why it locked up I recommend enabling kernel message logging to disk.
Some distros disable these by default such as Arch.