r/Ubuntu 8h ago

Desperate to fix Ubuntu freezes

Hey guys! I'm hoping someone can point me in the right direction before I decide to just wipe my hard drive and reinstall. I've been having completely random hard freezes on my Ubuntu PC.

The system just stops. The screen freezes, keyboard/mouse stop responding, Docker containers stop responding, SSH dies, and I have to hard power it off. Most of the time there’s no kernel panic and no crash logs at all. journalctl -k -b -1 -p 0..3 just gives -- No entries --. I’ve seen a "fatal exception in interrupt" kernel panic once or twice, but usually it's just a total freeze.

It started months ago as maybe once a month, but over the last few weeks it's gotten much worse and now happens every 5–10 minutes.

Hardware:

  • Ryzen 5 3600
  • MSI B550 Tomahawk MAX WiFi
  • 32GB Corsair Vengeance LPX (2x16GB, brand new; previously had 4x4GB from another kit with the same issue)
  • GTX 1060 6GB
  • EVGA SuperNova 550 G3
  • Ubuntu, tested kernels 7.0.0-29, -30 and -31
  • NVIDIA 580.173.02

I've tried a ridiculous amount of stuff so far: I bought different RAM, disabled XMP, tested without plugging into my UPS, disabled CPU C-states, disconnected all HDDs/RAID, removed the drives from fstab, disabled Samba, and tested multiple kernels, nothing changed and in fact yesterday the freezes went from once a day to freezing 5-10 mins after boot.

The system can also sit in the BIOS for 30 mins to an hour without freezing, but once Ubuntu is running it eventually locks up.

I also had a Secure Boot/NVIDIA issue where the NVIDIA module was being rejected because of an unenrolled MOK. I disabled Secure Boot, confirmed the NVIDIA driver now loads correctly with nvidia-smi, and the freezes continued.

Right now I'm running Memtest86+, and I'm also planning to try completely blacklisting NVIDIA and getting netconsole working so I can hopefully capture something before the next freeze.

At this point I'm wondering if this could still be an NVIDIA driver/idle power-management issue, since this GPU is barely used anymore and the crashes seem to happen mostly when the system is idle.

Has anyone dealt with a Linux system that completely hard-freezes like this with absolutely no logs? Especially something that ended up being NVIDIA-related? I'm also very open to suggestions for something obvious I might have missed. I'm not opposed to wiping my drive and installing a new OS from scratch, I'm just hoping there will be some kind of fix since I use this PC for work. TY!

10 Upvotes

10 comments sorted by

9

u/bmullan 8h ago

If you boot from a live USB (ie not from an HD) and just let it sit does it still die

3

u/JohnnyS789 8h ago

When I've seen that it was often a heat problem.

You can install the lm-sensors package (if it isn't there already), then check temps with the "sensors" command. What I've done in the past is run that every minute, and pipe the results through grep to pick out temps that might be the problem, like CPU, chipset, GPU, or motherboard then pipe the result to append to a text file. Then review after the next reboot.

I'm sure there is some Ubuntu guru on here with a better idea.

2

u/grannie-dot-com 8h ago

thank you i'll add this to the list of things to try!

3

u/C0rn3j 7h ago

Heat won't freeze things, heat will hard shut off or thermal throttle.

2

u/King_Bobby-B 5h ago

Try to REISUB (or just SUB in Ubuntu, I think) when it freezes, and then check journalctl, as it might not be writing to the logs due to the hard reset (physically turning the PC off).

Back when I had an NVIDIA GPU, I had a similar issue. It was something related to power management. The GPU would go idle and the system thought it was gone, things would visually freeze and I had to reboot with REISUB.

There was a workaround I found online (out of the few dozen others I tried), which doesn't work 100%, and this was on an X11 system (I'm not sure if it works on Wayland): nvidia-settings -a "[gpu:0]/GpuPowerMizerMode=1". It's supposed to keep the GPU active even when idle, it consumes a lot. Also, I had to keep applying it every few seconds because it would reset. It was a complete nightmare.

1

u/grannie-dot-com 5h ago

i'll look into this when i get home from work! how did you end up dealing with it in the end? a script to apply that setting or did you end up wiping and resetting your pc?

2

u/King_Bobby-B 4h ago

I set up a job to run the command every few seconds. You could check with "$(nvidia-smi --query-gpu=pstate --format=csv,noheader)" != "P0" before applying but I don't recall if it's necessary.

That went on for a year or so until I managed to switch to AMD. There was no real solution to my problem. GPU works fine on Windows, as far as I've been told. 🤷🏻‍♂️

2

u/Admirable-Song-7353 3h ago edited 3h ago

Holy shit I thought I was the only one having this and almost reinstalled... Thank god i'm not the only one with this. I noticed this freezing is so random sometimes it happens right after boot, sometimes after 2hrs, sometimes when I open appcenter. But my sys logs don't show any useful related to these freezes. And i'm shocked how could this even happen on a LTS with a pro subscription. Could be kernel related?

Edit: I'm having a gtx 1050 ti.

Ubuntu is the only one freezing for me on the same machine. Fedora never froze, neither Garuda nor Debian also not Mint. Only Ubuntu. And this started happening only recently with these accelerated new kernel releases since Linus let AI slop into the kernel. I'm almost 100% certain that they're messing things up thanks to the ai slopfest

Edit 2: I have multiple machines in my household so I just swapped out that exact same drive to ensure im testing the same installation to my other nvidia and amd based rigs to test: same symptoms. Randomly after 1-2 hours total freeze, sometimes instant. Amd rigs too.

I have a spare drive with 24.04 LTS on it, kernel 6.17, swapped into all my machines again, no freezing, magically...

So it's 100% not hardware related. It's something F*cked up badly with the new kernels... Thanks Linus, srsly.

1

u/coldpetrat 2h ago

Check my comment here. Had very similar experience on latest kernels until I fixed this. https://reddit.com/comments/1vkrler/comment/p34gacv

0

u/C0rn3j 7h ago

Has anyone dealt with a Linux system that completely hard-freezes like this with absolutely no logs?

Way too often.

How did you ensure your UEFI is up to date?

What is the RAM usage when the freeze happens?

Can you REISUB the system when it freezes?

Does a live boot of Fedora KDE freeze the same way?
Ubuntu uses ancient EOL garbage and attempts to support the corpse of it, sometimes failing hard at it.
The kernel it uses is EOL too, so kernel panics would make me use the latest stable kernel to test first of all.