55
submitted 20 hours ago* (last edited 18 hours ago) by Interstellar_1@lemmy.blahaj.zone to c/linux@lemmy.ml

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?

top 29 comments
sorted by: hot top controversial new old
[-] MonkderVierte@lemmy.ml 1 points 1 hour ago* (last edited 1 hour ago)

Getting sluggish and then freezing sounds like RAM full. Earlyoom might help, it kills the abuser quicker than the in-kernel but notoriously slow-triggering solution.

And prelockd might help too; it reserves place for some libraries in memory, so they don't get involved in the freeze haze.

[-] absGeekNZ@lemmy.nz 5 points 10 hours ago

I had a similar issue, running Mint.

It took me a while, but I tracked it to a buggy firmware on the nvme SSD (WD black 4000). Once I updated the firmware, all the stability issues disappeared.

If your system in under heavy disk load when the issue appears, take a look at your SSD firmware.

[-] Anticorp@lemmy.world 2 points 8 hours ago* (last edited 8 hours ago)

Idk, but definitely set up your IDE or whatever your "work" is being done in to automatically save on a set time interval.

[-] ace_garp@lemmy.world 23 points 15 hours ago

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.

[-] Jayb151@lemmy.world 3 points 8 hours ago

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?

[-] ace_garp@lemmy.world 2 points 8 hours ago

People are mentioning 'OOM Killer' which may have similar features, I have not tried it out.

[-] jhdeval@lemmy.world 3 points 9 hours ago

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.

[-] ace_garp@lemmy.world 2 points 8 hours ago

I've had this on previous laptops, and gave up on using Sleep mode, just used full shutdown every time.

[-] jhdeval@lemmy.world 1 points 2 hours ago

That is how I deal with it as well. I just wanted to throw my experience out there because the reported issue sounds similar to what I have a experiences on a similar model laptop.

[-] bobzrkr@sh.itjust.works 2 points 10 hours ago

This. All of this. I came here to say all of this.

[-] Interstellar_1@lemmy.blahaj.zone 3 points 13 hours ago

Thanks, I'll check these out the next time this happens.

[-] dubyakay@lemmy.ca 3 points 9 hours ago* (last edited 9 hours ago)

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...

[-] taiidan@slrpnk.net 33 points 20 hours ago
  • Ctrl + Alt + F[1-0] to access other TTYs which might still be responsive even if your desktop environment is unresponsive. Pull up top/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.

[-] some_guy@lemmy.sdf.org 4 points 13 hours ago

Ahh, the old ‘ssh into my primary from my old laptop’ trick. Works well.

[-] greyfox@lemmy.world 6 points 17 hours ago* (last edited 17 hours ago)

Slows down then freezes sure sounds like an out of memory situation, so to add to yours here he 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.

[-] Interstellar_1@lemmy.blahaj.zone 1 points 13 hours ago

Thanks, I'll check these out the next time this happens.

[-] Romkslrqusz@lemm.ee 19 points 19 hours ago

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

[-] colournoun@beehaw.org 10 points 18 hours ago

The “Magic SysRq key” may be helpful as a last resort.

https://en.m.wikipedia.org/wiki/Magic_SysRq_key

[-] Interstellar_1@lemmy.blahaj.zone 4 points 13 hours ago

Thanks, this is exactly what I was looking for.

[-] kutsyk_alexander@lemmy.world 12 points 20 hours ago
[-] Link@rentadrunk.org 7 points 19 hours ago

Some distros disable these by default such as Arch.

[-] Limonene@lemmy.world 6 points 19 hours ago

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.

[-] mvirts@lemmy.world 1 points 14 hours ago* (last edited 14 hours ago)

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.

[-] tisktisk@piefed.social 2 points 14 hours ago

How long have you been using fedora on this laptop? I had a similar issue with my xps 13 where this would happen everytime I tried to update it. I posted several help threads and lots of experienced people tried to help, but no solution was ever found.

Hope you have better luck than me, but I gave up after weeks of effort and just installed gentoo. I now use nothing but gentoo because of this incredibly painful experience.

[-] gnuhaut@lemmy.ml 3 points 16 hours ago

The "slow down and then quickly fully freeze", while it could be other things, might be a low RAM situation. Could be some buggy program that is leaking memory. Try running EarlyOOM or systemd-oomd.

[-] qaz@lemmy.world 4 points 15 hours ago* (last edited 15 hours ago)

I also have the problem OP mentioned, even after upgrading to 128 GiB RAM. I've had it on Kubuntu, KDE Neon, Fedora KDE and OpenSUSE TW, so I suspect it's a KDE Plasma issue.

[-] akkajdh999@programming.dev 5 points 20 hours ago

systemd-oomd?

[-] not_amm@lemmy.ml 4 points 20 hours ago

That used to happen to me A LOT. Right now it only happens because I have a faulty RAM that I'm planning to replace very soon, but before that, I think the CPU was overheated and it forcefully rebooted my laptop, at least that was my impression by the logs at boot.

After a long time of debugging, I decided to, first, disable hibernation to see if that was a problem, then I disabled CPU boost and I think that was the cause of overheating, since, for some reason, my distro decided that it was a good idea to use CPU boost for any common task and it caused overheating.

I haven't had any problems not related to faulty RAM since then lol

[-] theunknownmuncher@lemmy.world 2 points 20 hours ago

I don't have advice to offer but depending on the program you are using, it might be autosaving your work to a temporary file, for example vim does this by default.

You could look into settings for autosaving or temporary files in your programs.

this post was submitted on 27 Dec 2024
55 points (96.6% liked)

Linux

48740 readers
1564 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS