Skip to content

Instantly share code, notes, and snippets.

@klingtnet
Last active September 2, 2024 14:44
Show Gist options
  • Save klingtnet/0ef165026fe4c363a75478afbeda3688 to your computer and use it in GitHub Desktop.
Save klingtnet/0ef165026fe4c363a75478afbeda3688 to your computer and use it in GitHub Desktop.
Ryzen Linux random reboots in idle state

My Ryzen 7 3700X desktop machine had random reboots when in idle. Stress tests worked fine over many hours, no problem there. There's a Gentoo Wiki entry that recommends to set idle=nomwait and processor.max_cstate=5. For me, it did not work and neither did the tips from this kernel Bug report. Those random reboots disappeared after I reset my BIOS to optimized factory defaults. The only change I apply to those factory defaults is to apply the XMP profile of memory modules. It turned out that, if the XMP settings were applied, the random reboot appeared again. Luckily i stumbled over this linustechtips forum thread where someone said that power down mode needs to be disabled. Someone else said that they fixed this issue by setting the RAM voltage to 1.36V instead of 1.35V. Anyways, disabling power down mode did the trick for me. This setting is quite hidden and was located under memory timing controls in my Asus BIOS.

Here are my hardware specs for reference:

OS: Arch Linux x86_64 
Kernel: 5.14.7-arch1-1 
Uptime: 7 hours, 22 mins 
Packages: 1258 (pacman) 
Shell: bash 5.1.8 
Resolution: 3440x1440 
DE: GNOME 40.4 
WM: Mutter 
WM Theme: Adwaita 
Theme: Adwaita-dark [GTK2/3] 
Icons: Adwaita [GTK2/3] 
Terminal: alacritty 
CPU: AMD Ryzen 7 3700X (16) @ 3.600GHz 
GPU: AMD ATI Radeon RX 550 640SP / RX 560/560X 
Memory: 5597MiB / 32024MiB 
@TalhaMangarah
Copy link

Thanks for this, just disabled power down mode and time to wait a little bit I guess. Just curious, what motherboard do you have?

@klingtnet
Copy link
Author

Copy link

ghost commented Aug 29, 2024

[  332.880071] mce: [Hardware Error]: Machine check events logged
[  332.880082] [Hardware Error]: Corrected error, no action required.
[  332.880629] [Hardware Error]: CPU:12 (19:44:1) MC0_STATUS[-|CE|MiscV|AddrV|-|-|SyndV|CECC|-|-|-]: 0x9c20400002000175
[  332.880966] [Hardware Error]: Error Addr: 0x000000101e82175c
[  332.881279] [Hardware Error]: IPID: 0x001000b000000000, Syndrome: 0x0000002a1a1f1d03
[  332.881603] [Hardware Error]: Load Store Unit Ext. Error Code: 0
[  332.881605] [Hardware Error]: cache level: L1, tx: DATA, mem-tx: EV

If anyone encountered this problem with AMD CPU and plus the random reboot in linux, you should do:
echo 1200000 > /sys/devices/system/cpu/cpu*/cpufreq/scaling_min_freq at every time linux machine after boot.

Good luck if you seen my comment.

@BobIllumine
Copy link

[  332.880071] mce: [Hardware Error]: Machine check events logged
[  332.880082] [Hardware Error]: Corrected error, no action required.
[  332.880629] [Hardware Error]: CPU:12 (19:44:1) MC0_STATUS[-|CE|MiscV|AddrV|-|-|SyndV|CECC|-|-|-]: 0x9c20400002000175
[  332.880966] [Hardware Error]: Error Addr: 0x000000101e82175c
[  332.881279] [Hardware Error]: IPID: 0x001000b000000000, Syndrome: 0x0000002a1a1f1d03
[  332.881603] [Hardware Error]: Load Store Unit Ext. Error Code: 0
[  332.881605] [Hardware Error]: cache level: L1, tx: DATA, mem-tx: EV

If anyone encountered this problem with AMD CPU and plus the random reboot in linux, you should do: echo 1200000 > /sys/devices/system/cpu/cpu*/cpufreq/scaling_min_freq at every time linux machine after boot.

Good luck if you seen my comment.

Could you please explain, what does this command do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment