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?
Once fully frozen, it’s not really able to be saved.
Is it a full freeze? Press CAPS-LOCK or NUM-LOCK to see if the hardware is still responding.
If it is, it might just be a DE freeze. Try to SSH into into your frozen device, from another PC or phone.
Or press CTRL-ALT-F7 to see if you can switch to a terminal and login.
Once in, use ps -ef, or top to see and kill what might be causing a freeze.
Turn on auto-save in LibreOffice(you usually only lose a sentence or 3 words with this on).
Investigate IDEs with auto-backup or an autosaved change-history.
–//–
To diagnose whether you have bad RAM, boot from a LiveUSB distro and use it for a day or week.
If no freezes, reinstall a fresh OS.
If it still freezes, get new RAM, or replace whole PC/laptop.
As a side note I also use a xps 13 don’t remember the model but I have found they do not properly implement the sleep function and can cause issues when coming out of sleep. I have seen the computer act fine till I open something and then crash.
I’ve had this on previous laptops, and gave up on using Sleep mode, just used full shutdown every time.
I super appreciate the comment, as I’ve had the same issue and didn’t know how to deal with it without a full reboot. If there an equivalent command in Linux for what control Alt delete does in Windows?
Can confirm, the SSH thing saved me many times. I’m running Arch (btw), so as it turned out it did not have a working sshd by default, nor any swap enabled. I very quickly ran into issues where not even oom killer could save it. Once I figured these out though it was smooth sailing.
Lesson of the story: Don’t try to compile firefox from source without swap…
-
Ctrl + Alt + F[1-0]
to access other TTYs which might still be responsive even if your desktop environment is unresponsive. Pull uptop
/htop
and ID the problematic process to kill. -
Agree with using an oom killer.
-
Do you need more swap? Can use swap file if expanding swap partition is problematic.
Slows down then freezes sure sounds like an out of memory situation, so to add to yours here they might actually want less swap. Sometimes you would rather hit the oom killer sooner instead of waiting on swap to fill.
Ideally login via SSH from another machine to figure out what is using the memory (hopefully the system is responsive enough for SSH), and if it is your critical programs causing the problem then you should consider a memory upgrade.
If this is a hard / full system freeze, there will be nothing you can do because the system has fully locked up. Test whether or not this is the case by pressing CapsLock and seeing if the status indicator light changes states.
Freezing like you describe is often a hardware issue, I recommend that you start by testing your RAM with Memtest86
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 with echo '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.