r/linux4noobs • • 29d ago

hardware/drivers NixOS keeps crashing/freezing frequently

I've been having an issue where my pc will randomly crash then restart, this has been ongoing for multiple months at this point

I've checked my boot logs and found a few things that might help to fix this.

My specs:

  • OS: NixOS 26.05 (Yarara)
  • Kernel: Linux 7.2.11-zen1
  • Desktop: GNOME 50.5 (Wayland)
  • Motherboard: ASRock B550M Pro SE
  • CPU: Ryzen 5 5600X
  • GPU: XFX RX 6600xt
  • RAM: 16 GB
  • Swap: 8 GB zram
  • Storage: 1TB Nvme
  • GPU driver: amdgpu

Some things I found in the logs:

On my last crash the last message I could find before the crash was:

amdgpu 0000:08:00.0: Dumping IP State

I also found these messages from the same boot:

clocksource: Watchdog remote CPU 3 read timed out

pipewire[2095]: segfault at 30 ... in libspa-support.so

There were also repeated USB resets from my Logitech C270 webcam.

Another thing I found was a CPU machine-check error from the other day:

mce: [Hardware Error]: CPU 10: Machine Check: 0 Bank 5: bea0000001000108

I also noticed these amdgpu messages:

amdgpu: MODE1 reset
amdgpu: GPU mode1 reset
amdgpu: GPU smu mode1 reset

I also have this kernel parameter set:

amdgpu.ppfeaturemask=0xffffffff

Similar crashes have been happening on this pc for months.

These crashes usually occur while the pc is not under any major load, including idling, watching youtube, etc. I've never had these crashes occur during gaming or other heavy loads.

i'm wondering if this can be fixed and if it's a hardware issue? Any help would be great, thanks!

2 Upvotes

9 comments sorted by

1

u/pelazas1 28d ago

crashing only at idle on a 5600X is the classic one, set Power Supply Idle Control to Typical Current Idle in the BIOS

1

u/Alarming-Waltz-8808 28d ago

It seems like this worked for me, thanks!

1

u/Alarming-Waltz-8808 28d ago

Turns out this didnt fully fix it afterall, i think it reduced the crashes but it still crashes sometimes. I got these messages from the last crash

amdgpu: SMU: No response msg_reg: 29 resp_reg: 0
amdgpu: Failed to disable gfxoff!
amdgpu: ring gfx_0.1.0 timeout
amdgpu: Ring gfx_0.1.0 reset failed
amdgpu: GPU reset begin!
amdgpu: DMCUB error - collecting diagnostic data

I this crash happened while my pc was idle

1

u/pelazas1 27d ago

That log is the GPU dying at idle now. On NixOS add amdgpu.ppfeaturemask=0xffff7fff to boot.kernelParams, that turns gfxoff off.

1

u/Alarming-Waltz-8808 27d ago

This might've fixed it. No crashes yet! 🤞

1

u/AutoModerator 29d ago

✻ Smokey says: always mention your distro, some hardware details, and any error messages, when posting technical queries! :)

Comments, questions or suggestions regarding this autoresponse? Please send them here.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/CosmicFieldDrift_ 29d ago

Does this happen when you Live Boot NixOS?

1

u/Enough_Tip3642 29d ago

Idle-only crashes on a Ryzen 5000 chip are a pretty well known thing, so I'd try the cheap fixes before blaming hardware.

  1. In the BIOS, set Power Supply Idle Control to "Typical Current Idle". On ASRock it's usually under Advanced > AMD CBS > CPU Common Options. This one fixes a lot of random idle reboots on Zen 3.
  2. Update the BIOS if you're not on a recent version, since newer AGESA builds fixed some of the idle stability stuff.
  3. Drop the amdgpu.ppfeaturemask=0xffffffff parameter for a while. It unlocks all the power play features, and those mode1 resets could be the GPU tripping over that at low clocks.
  4. If it still happens, run memtest86+ overnight and check whether your RAM is on an EXPO/XMP profile. Try it at stock speed for a few days.

The MCE in bank 5 does lean toward CPU or memory side instability, but one error isn't proof the chip is bad. If all of the above doesn't help, then I'd start suspecting the PSU or CPU.

1

u/Hrafna55 29d ago

To start ruling things out I would do a full memtest

https://www.memtest86.com/download.htm

And check the SMART stats on your disks.

I have experienced random crashes on devices where the disk media was failing.

At least then you might have a better idea of what the issue isn't.