A lot of freezes with AMD Ryzen 5 3600

Hi, I recently mounted an AMD Ryzen 5 3600 on a Gigabyte B450M DS3H motherboard. From the beginning I had frequent crashes that force me to do a hard reboot. I have disabled C-State in the bios, as recommended in many guides, used zenstates to disable c6, setting Power Supply Idle to “typical”. None of these worked. I do not know what to do. I regret getting an AMD processor, I have never had these problems with the latest 3 Intel processors. Anyone have advice?

03:05 ~ inxi -Fxz
System:    Kernel: 5.7.14-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.1.0 Desktop: GNOME 3.36.4 Distro: Manjaro Linux 
Machine:   Type: Desktop System: Gigabyte product: B450M DS3H v: N/A serial: <filter> 
           Mobo: Gigabyte model: B450M DS3H-CF v: x.x serial: <filter> UEFI: American Megatrends v: F51 date: 07/29/2020 
Battery:   Device-1: hidpp_battery_0 model: Logitech M720 Triathlon Multi-Device Mouse charge: 55% (should be ignored) 
           status: Discharging 
CPU:       Topology: 6-Core model: AMD Ryzen 5 3600 bits: 64 type: MT MCP arch: Zen 2 L2 cache: 3072 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 86272 
           Speed: 1950 MHz min/max: 2200/3600 MHz Core speeds (MHz): 1: 2053 2: 3586 3: 2196 4: 2196 5: 2060 6: 2192 7: 2195 
           8: 2196 9: 2228 10: 3593 11: 2053 12: 2196 
Graphics:  Device-1: NVIDIA GK107 [GeForce GTX 650] vendor: ASUSTeK driver: nvidia v: 440.100 bus ID: 06:00.0 
           Display: x11 server: X.org 1.20.8 driver: nvidia resolution: <xdpyinfo missing> 
           OpenGL: renderer: GeForce GTX 650/PCIe/SSE2 v: 4.6.0 NVIDIA 440.100 direct render: Yes 
Audio:     Device-1: NVIDIA GK107 HDMI Audio vendor: ASUSTeK driver: snd_hda_intel v: kernel bus ID: 06:00.1 
           Device-2: Advanced Micro Devices [AMD] Starship/Matisse HD Audio vendor: Gigabyte driver: snd_hda_intel v: kernel 
           bus ID: 08:00.4 
           Sound Server: ALSA v: k5.7.14-1-MANJARO 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Gigabyte driver: r8169 v: kernel 
           port: f000 bus ID: 04:00.0 
           IF: enp4s0 state: down mac: <filter> 
           Device-2: Qualcomm Atheros AR93xx Wireless Network Adapter driver: ath9k v: kernel port: f000 bus ID: 05:00.0 
           IF: wlp5s0 state: up mac: <filter> 
Drives:    Local Storage: total: 1.14 TiB used: 742.96 GiB (63.8%) 
           ID-1: /dev/sda vendor: Samsung model: SSD 860 EVO 250GB size: 232.89 GiB 
           ID-2: /dev/sdb vendor: Western Digital model: WD10EAVS-00D7B1 size: 931.51 GiB 
Partition: ID-1: / size: 37.24 GiB used: 20.72 GiB (55.6%) fs: ext4 dev: /dev/sda2 
           ID-2: /home size: 185.93 GiB used: 8.29 GiB (4.5%) fs: ext4 dev: /dev/sda3 
Swap:      ID-1: swap-1 type: partition size: 3.91 GiB used: 0 KiB (0.0%) dev: /dev/sda4 
Sensors:   System Temperatures: cpu: 56.1 C mobo: N/A gpu: nvidia temp: 42 C 
           Fan Speeds (RPM): N/A gpu: nvidia fan: 10% 
Info:      Processes: 373 Uptime: 51m Memory: 15.65 GiB used: 3.10 GiB (19.8%) Init: systemd Compilers: gcc: 10.1.0 
           Packages: 1270 Shell: fish v: 3.1.2 inxi: 3.1.05
1 Like

Add to boot options (/etc/default/grub):

iommu=pt idle=nomwait rcu_nocbs=0-11

Then sudo update-grub and reboot.

I am curious, hope solves the issue. I did not have this issue with almost the same PC.

I am having the same CPU but with B550M D3SH. I cannot make it to go to “sleep”, it reboots the computer always…

have you checked in the journal log ?

sudo journalctl -b0

I have this exactly CPU model (Ryzen 5 3600) and was having a problem with system freezes, I solved this problem following this: https://forums.developer.nvidia.com/t/random-xid-61-and-xorg-lock-up
I don’t know exactly if this is your case, but you might check if this will help you.

Thanks for the answer, I’ll try now and let you know if it worked! I hope not to have other freezes :frowning:

Thats a giant thread…what there helped you exactly?

Thanks. I didn’t know this command, but I’m not sure how to read the huge amount of stuff that comes out :frowning:

How to get some basic logs and such can be found here:
How to provide good information

1 Like

I have a R5 1600 in my desktop system and have rare lockups/system hangs from time to time.
They seem to correlate somewhat with specific Kernel versions, as I sometimes go weeks without one only to have it once ot twice a day after a Kernel update.
Still, it always happened so seldom that I never actually tried to get to the bottom of it.

They usually happen in low-load situations, typically while browsing. Anything that keeps the CPU occupied will prevent it (e.g. having music running in the background seems enough).
It is super annoying that the Linux community (or AMD) has not managed to iron that out after several years, in particular since the CPU is rock-stable under Windows.

However, if your crashes/freezes happen very often or under load, you should consider the possibility that there’s an issue with your particular CPU.

1 Like

Hi, in fact freeze occurs in all situations. I listen to music practically all the time, maybe nothing happens for a few hours, then suddenly everything goes off. The same while watching Netflix or maybe playing a video game. Sometimes even just browsing. I tried to figure it out but I can’t find a link between the freeze and my use of the PC. It looks decidedly random.

Thanks, could you be a little more specific about what the solution was?

It was this post: Random Xid 61 and Xorg lock-up - Linux - NVIDIA Developer Forums

In my case, I used this command:

sudo nvidia-smi -pm ENABLED; sudo nvidia-smi -lgc 1000,2145

My GPU is not entering in the power state 0 (P0) anymore after executing this command and I never got any freezes after that.

Each GPU model has a minimum frequency to enter the P0 state, you need to adjust the above command to your on GPU model.

As I said, I was never annoyed enough by it to dig much deeper into the issue, but as I understood it has to do with Linux not playing well with some low-power state for Ryzen CPUs.
If it therefore happens during times when the CPU is busy, I would try some troubleshooting with your general system as well.
One option would be to test your RAM. You can use memtest, which should be available from the grub menu during boot-up for that. Let it run a couple of hours or overnight and check if there are any errors (sometimes they show up very quickly, in that case it’s obvious).
Early Ryzen boards and CPUs were a bit finicky with RAM, but that should not be the case anymore with the 3000 series. Still, you could try setting your RAM to lower speeds in the BIOS.
Same could be done for the CPU - check voltage and frequency settings in the BIOS, remove any overclocking or too aggressive undervolting. Your board might be doing this automatically without you knowing it, if some “special” performance options are enabled in the BIOS.
If your CPU is, for some reason, not fully stable, such settings might cause problems.
Maybe even reduce the maximum speed of the CPU to see if it runs more stable, which might also hint at some issues.
It doesn’t necessarily need to be the CPU or the RAM, could also be the power supply, or the GPU, obviously (although that is often accompanied by graphical glitches).

I’m not too familiar on the matter, but you may need to look into your BIOS to see if the necessary sleep states are enabled in there for Linux to use.

Try to type this command:

journalctl | grep -B2 -iE 'NVRM: Xid'

See if you will get these error messages:

kernel: NVRM: GPU at PCI:0000:07:00: GPU-44c5cdee-5572-eb62-6d76-34ba1fa54eb2
kernel: NVRM: GPU Board Serial Number: 
kernel: NVRM: Xid (PCI:0000:07:00): 61, pid=996, 0cec(3098) 00000000 00000000

If so, you are confirmed to be getting the error mentioned in the NVDIA Forum (Xid 61). If not, them you are most likely getting a completely different error on your machine.

I copied the command in the terminal and the pc went to freeze (LOL). Probably a case, however it doesn’t return me any results.

06:00 ~ journalctl | grep -B2 -iE 'NVRM: Xid'
✘ 06:00 ~

I just got another freeze. Unfortunately, I think it didn’t work

Unh, so you are affected by another problem.

Try to read the logs right before the reboot/freeze lines:

journalctl | grep -B25 -iE 'Linux version'

This command will basically show you 25 lines of logs before the first line after the system starts, try to read these lines and see if you can read any suspect information, like errors or warning messages.

Other command you might try is:

journalctl -b | grep -iE 'erro|fail|warning'

This one will show you all lines in your current session log containing the words erro, fail and warning.

OMG, I just had to do 3 hard reboots in a matter of minutes. I’ll post the result of the last command you gave me

06:28 ~ journalctl -b | grep -iE 'erro|fail|warning'
ago 17 18:23:53 mnj-PC kernel: RAS: Correctable Errors collector initialized.
ago 17 18:23:53 mnj-PC kernel: nvidia: module verification failed: signature and/or required key missing - tainting kernel
ago 17 18:23:54 mnj-PC kernel: ACPI Warning: SystemIO range 0x0000000000000B00-0x0000000000000B08 conflicts with OpRegion 0x0000000000000B00-0x0000000000000B0F (\GSA1.SMBI) (20200326/utaddress-204)
ago 17 18:23:54 mnj-PC kernel: random: 4 urandom warning(s) missed due to ratelimiting
ago 17 18:23:55 mnj-PC NetworkManager[618]: <warn>  [1597681435.3836] sup-iface[0464de335d19f0a4,0,wlp5s0]: call-p2p-cancel: failed with P2P cancel failed
ago 17 18:23:55 mnj-PC snapd[621]: stateengine.go:150: state ensure error: Get "https://api.snapcraft.io/api/v1/snaps/sections": dial tcp: lookup api.snapcraft.io: no such host
ago 17 18:23:56 mnj-PC audit[818]: CRED_ACQ pid=818 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='op=PAM:setcred grantors=? acct="gdm" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
ago 17 18:23:56 mnj-PC /usr/lib/gdm-x-session[979]: (WW) Failed to open protocol names file lib/xorg/protocol.txt
ago 17 18:23:56 mnj-PC /usr/lib/gdm-x-session[979]:         (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
ago 17 18:23:56 mnj-PC /usr/lib/gdm-x-session[979]: (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
ago 17 18:23:56 mnj-PC /usr/lib/gdm-x-session[979]: (II) NVIDIA(0): ACPI: failed to connect to the ACPI event daemon; the daemon
ago 17 18:23:57 mnj-PC /usr/lib/gdm-x-session[1048]: dbus-daemon[1048]: [session uid=120 pid=1048] Activated service 'org.freedesktop.systemd1' failed: Process org.freedesktop.systemd1 exited with status 1
ago 17 18:23:57 mnj-PC /usr/lib/gdm-x-session[1048]: dbus-daemon[1048]: [session uid=120 pid=1048] Activated service 'org.freedesktop.systemd1' failed: Process org.freedesktop.systemd1 exited with status 1
ago 17 18:23:57 mnj-PC gnome-session[1049]: gnome-session-binary[1049]: WARNING: Falling back to non-systemd startup procedure due to error: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd1 exited with status 1
ago 17 18:23:57 mnj-PC gnome-session-binary[1049]: WARNING: Falling back to non-systemd startup procedure due to error: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd1 exited with status 1
ago 17 18:23:57 mnj-PC /usr/lib/gdm-x-session[1048]: dbus-daemon[1048]: [session uid=120 pid=1048] Activated service 'org.freedesktop.systemd1' failed: Process org.freedesktop.systemd1 exited with status 1
ago 17 18:23:57 mnj-PC /usr/lib/gdm-x-session[1048]: dbus-daemon[1048]: [session uid=120 pid=1048] Activated service 'org.freedesktop.systemd1' failed: Process org.freedesktop.systemd1 exited with status 1
ago 17 18:23:57 mnj-PC /usr/lib/gdm-x-session[1048]: dbus-daemon[1048]: [session uid=120 pid=1048] Activated service 'org.freedesktop.systemd1' failed: Process org.freedesktop.systemd1 exited with status 1
ago 17 18:23:57 mnj-PC /usr/lib/gdm-x-session[1048]: dbus-daemon[1048]: [session uid=120 pid=1048] Activated service 'org.freedesktop.systemd1' failed: Process org.freedesktop.systemd1 exited with status 1
ago 17 18:23:57 mnj-PC gnome-session[1049]: gnome-session-binary[1049]: WARNING: Could not parse desktop file orca-autostart.desktop or it references a not found TryExec binary
ago 17 18:23:57 mnj-PC gnome-session-binary[1049]: WARNING: Could not parse desktop file orca-autostart.desktop or it references a not found TryExec binary
ago 17 18:23:58 mnj-PC dbus-daemon[617]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.Avahi.service': Unit dbus-org.freedesktop.Avahi.service not found.
ago 17 18:23:58 mnj-PC geoclue[1129]: Failed to connect to avahi service: Daemon not running
ago 17 18:23:58 mnj-PC gnome-shell[1081]: JS WARNING: [resource:///org/gnome/shell/ui/layout.js 24]: reference to undefined property "MetaWindowX11"
ago 17 18:23:58 mnj-PC /usr/lib/gdm-x-session[1048]: dbus-daemon[1048]: [session uid=120 pid=1048] Activated service 'org.freedesktop.systemd1' failed: Process org.freedesktop.systemd1 exited with status 1
ago 17 18:23:58 mnj-PC gsd-sharing[1167]: Failed to StopUnit service: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd1 exited with status 1
ago 17 18:23:58 mnj-PC gsd-sharing[1167]: Failed to StopUnit service: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd1 exited with status 1
ago 17 18:23:58 mnj-PC gsd-sharing[1167]: Failed to StopUnit service: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd1 exited with status 1
ago 17 18:23:58 mnj-PC gnome-shell[1081]: Error looking up permission: GDBus.Error:org.freedesktop.portal.Error.NotFound: No entry for geolocation
ago 17 18:23:58 mnj-PC dbus-daemon[617]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.Avahi.service': Unit dbus-org.freedesktop.Avahi.service not found.
ago 17 18:23:58 mnj-PC gsd-media-keys[1153]: Failed to grab accelerator for keybinding settings:playback-random
ago 17 18:23:58 mnj-PC gsd-media-keys[1153]: Failed to grab accelerator for keybinding settings:playback-repeat
ago 17 18:23:58 mnj-PC gsd-media-keys[1153]: Failed to grab accelerator for keybinding settings:hibernate
ago 17 18:23:58 mnj-PC gsd-media-keys[1153]: Failed to grab accelerator for keybinding settings:rfkill
ago 17 18:23:59 mnj-PC dbus-daemon[617]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.Avahi.service': Unit dbus-org.freedesktop.Avahi.service not found.
ago 17 18:24:01 mnj-PC audit[1291]: CRED_ACQ pid=1291 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='op=PAM:setcred grantors=? acct="morlyehr" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
ago 17 18:24:01 mnj-PC kernel: audit: type=1103 audit(1597681441.636:74): pid=1291 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='op=PAM:setcred grantors=? acct="morlyehr" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
ago 17 18:24:02 mnj-PC /usr/lib/gdm-x-session[1310]: _XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
ago 17 18:24:02 mnj-PC /usr/lib/gdm-x-session[1310]: (WW) Failed to open protocol names file lib/xorg/protocol.txt
ago 17 18:24:02 mnj-PC /usr/lib/gdm-x-session[1310]:         (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
ago 17 18:24:02 mnj-PC /usr/lib/gdm-x-session[1310]: (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
ago 17 18:24:02 mnj-PC /usr/lib/gdm-x-session[1310]: (II) NVIDIA(0): ACPI: failed to connect to the ACPI event daemon; the daemon
ago 17 18:24:02 mnj-PC gnome-session-c[1363]: Error creating FIFO: File già esistente
ago 17 18:24:03 mnj-PC gnome-shell[1380]: Failed to get Yr.no forecast data: 2 Errore nel risolvere «api.met.no»: Nome o servizio sconosciuto
ago 17 18:24:03 mnj-PC gsd-color[1145]: failed to set screen _ICC_PROFILE: Apertura del file «/home/morlyehr/.local/share/icc/edid-0ac259141f93933ade1217c263f15268.icc» non riuscita: Permesso negato
ago 17 18:24:03 mnj-PC gnome-shell[1380]: Error looking up permission: GDBus.Error:org.freedesktop.portal.Error.NotFound: No entry for geolocation
ago 17 18:24:03 mnj-PC gsd-media-keys[1569]: Failed to grab accelerator for keybinding settings:rfkill
ago 17 18:24:03 mnj-PC gsd-media-keys[1569]: Failed to grab accelerator for keybinding settings:playback-repeat
ago 17 18:24:03 mnj-PC gsd-media-keys[1569]: Failed to grab accelerator for keybinding settings:hibernate
ago 17 18:24:03 mnj-PC gsd-media-keys[1569]: Failed to grab accelerator for keybinding settings:playback-random
ago 17 18:24:03 mnj-PC gsd-color[1145]: failed to set screen _ICC_PROFILE: Apertura del file «/home/morlyehr/.local/share/icc/edid-0ac259141f93933ade1217c263f15268.icc» non riuscita: Permesso negato
ago 17 18:24:03 mnj-PC gjs[1656]: g_variant_new_string: assertion 'string != NULL' failed
ago 17 18:24:04 mnj-PC libinput-gestures.desktop[1783]: Failed to open /dev/input/event1 (Permission denied)
ago 17 18:24:04 mnj-PC libinput-gestures.desktop[1783]: Failed to open /dev/input/event0 (Permission denied)
ago 17 18:24:04 mnj-PC libinput-gestures.desktop[1783]: Failed to open /dev/input/event3 (Permission denied)
ago 17 18:24:04 mnj-PC libinput-gestures.desktop[1783]: Failed to open /dev/input/event4 (Permission denied)
ago 17 18:24:04 mnj-PC libinput-gestures.desktop[1783]: Failed to open /dev/input/event5 (Permission denied)
ago 17 18:24:04 mnj-PC libinput-gestures.desktop[1783]: Failed to open /dev/input/event6 (Permission denied)
ago 17 18:24:04 mnj-PC libinput-gestures.desktop[1783]: Failed to open /dev/input/event7 (Permission denied)
ago 17 18:24:04 mnj-PC libinput-gestures.desktop[1783]: Failed to open /dev/input/event8 (Permission denied)
ago 17 18:24:04 mnj-PC libinput-gestures.desktop[1783]: Failed to open /dev/input/event18 (Permission denied)
ago 17 18:24:04 mnj-PC libinput-gestures.desktop[1783]: Failed to open /dev/input/event14 (Permission denied)
ago 17 18:24:04 mnj-PC libinput-gestures.desktop[1783]: Failed to open /dev/input/event15 (Permission denied)
ago 17 18:24:04 mnj-PC libinput-gestures.desktop[1783]: Failed to open /dev/input/event16 (Permission denied)
ago 17 18:24:04 mnj-PC libinput-gestures.desktop[1783]: Failed to open /dev/input/event17 (Permission denied)
ago 17 18:24:04 mnj-PC libinput-gestures.desktop[1783]: Failed to open /dev/input/event10 (Permission denied)
ago 17 18:24:04 mnj-PC libinput-gestures.desktop[1783]: Failed to open /dev/input/event11 (Permission denied)
ago 17 18:24:04 mnj-PC libinput-gestures.desktop[1783]: Failed to open /dev/input/event12 (Permission denied)
ago 17 18:24:04 mnj-PC libinput-gestures.desktop[1783]: Failed to open /dev/input/event13 (Permission denied)
ago 17 18:24:04 mnj-PC libinput-gestures.desktop[1783]: Failed to open /dev/input/event9 (Permission denied)
ago 17 18:24:04 mnj-PC libinput-gestures.desktop[1783]: Failed to open /dev/input/event2 (Permission denied)
ago 17 18:24:05 mnj-PC /usr/lib/gdm-x-session[1048]: dbus-daemon[1048]: [session uid=120 pid=1048] Activated service 'org.freedesktop.systemd1' failed: Process org.freedesktop.systemd1 exited with status 1
ago 17 18:24:05 mnj-PC gsd-sharing[1167]: Failed to StopUnit service: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd1 exited with status 1
ago 17 18:24:05 mnj-PC gsd-sharing[1167]: Failed to StopUnit service: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd1 exited with status 1
ago 17 18:24:05 mnj-PC gsd-sharing[1167]: Failed to StopUnit service: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd1 exited with status 1
ago 17 18:24:05 mnj-PC dbus-daemon[617]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.resolve1.service': Unit dbus-org.freedesktop.resolve1.service not found.
ago 17 18:24:05 mnj-PC dbus-daemon[617]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.Avahi.service': Unit dbus-org.freedesktop.Avahi.service not found.
ago 17 18:24:05 mnj-PC mailspring.desktop[1709]: {"error":null}
ago 17 18:24:07 mnj-PC org.freedesktop.FileManager1[2094]: Failed to register: Unable to acquire bus name 'org.gnome.Nautilus'
ago 17 18:24:07 mnj-PC dbus-daemon[1313]: [session uid=1000 pid=1313] Activated service 'org.freedesktop.FileManager1' failed: Process org.freedesktop.FileManager1 exited with status 1
ago 17 18:24:23 mnj-PC dbus-daemon[617]: [system] Failed to activate service 'org.bluez': timed out (service_start_timeout=25000ms)
ago 17 18:24:23 mnj-PC pulseaudio[1364]: E: [pulseaudio] bluez5-util.c: GetManagedObjects() failed: org.freedesktop.DBus.Error.TimedOut: Failed to activate service 'org.bluez': timed out (service_start_timeout=25000ms)
ago 17 18:24:23 mnj-PC pulseaudio[1128]: E: [pulseaudio] bluez5-util.c: GetManagedObjects() failed: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
ago 17 18:28:11 mnj-PC chromium.desktop[2427]: [2427:2427:0817/182811.208277:ERROR:vaapi_wrapper.cc(511)] vaInitialize failed: unknown libva error
06:29 ~