Skip to content

Instantly share code, notes, and snippets.

@jfredrickson
Last active August 23, 2023 17:36
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jfredrickson/8bba6f31b1716b2d0ef871c8d4bc2ce3 to your computer and use it in GitHub Desktop.
Save jfredrickson/8bba6f31b1716b2d0ef871c8d4bc2ce3 to your computer and use it in GitHub Desktop.
Disable AMD Ryzen C6 state to prevent system freezes

disable_c6

A systemd service to disable the C6 state, preventing Ryzen freezes. This service runs once when the system starts up.

Inspiration:

Installation

Note: Locations can be modified to something other than under /opt if desired.

  1. Place zenstates.py under /opt/ZenStates-Linux
  2. Place disable_c6.sh and disable_c6.service under /opt/disable_c6
  3. Add the service: sudo ln -s /opt/disable_c6/disable_c6.service /etc/systemd/system
  4. Enable the service: sudo systemctl enable disable_c6
  5. Start the service: sudo systemctl start disable_c6
[Unit]
Description=Ryzen Disable C6
DefaultDependencies=no
After=sysinit.target local-fs.target
Before=basic.target
[Service]
Type=oneshot
ExecStart=/opt/disable_c6/disable_c6.sh
[Install]
WantedBy=basic.target
#!/bin/sh
/opt/ZenStates-Linux/zenstates.py --c6-disable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment