Setting up Ryzen CPUs on Arch Linux (and others)

I have been using Linux distros for a several years, starting to use the OS on an old AMD processor I had no problems, but when I moved to a newer generation (Zen), some problems have began. Relying on some sources and my personal experience, zen processors behave differently than on Windows. Another behavior is expressed in a constant change in CPU Voltage and, as a result, the acceleration of the cooler and the increase noise of the PC. Also on Linux systems it can be quite problematic to view the correct values of the CPU Voltage and cooler speed (at least it was on my motherboard). In this article I will try to provide solutions to the problems mentioned above. The instructions below will work for Arch family distros, but can also be used for any Linux distro using its own package manager and features.

My setup is Ryzen 2700 on Gigabyte AX370M-DS3H, CPU cooling is DEEPCOOL GAMMAXX 400.


Detect sensors (Arch distros):

Tried on Gigabyte x370, but also works on B250/Z370/B450M and on ASUS motherboards | arch wiki

(information from arch wiki and there)

To detect all sensors on your motherboard with lm-sensors do this steps:

  • sudo vim /etc/default/grub

Find this line

  • GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

Add to it this

  • acpi_enforce_resources=lax

It will looks like this now

  • GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_enforce_resources=lax"

Save and exit your editor, then run

  • sudo update-grub

  • reboot your pc

Now run

  • git clone https://github.com/h4x0rlol/archlinux-ryzen-setup.git

  • cd archlinux-ryzen-setup

Run

  • ./setup.sh

Now run

  • sudo modprobe it87 force_id=0x8686

or

  • sudo modprobe it87 force_id=0x8628 (8628)

Now run

  • sudo sensors-detect

Sensors and zenmonitor now should show actual temps and voltage

  • sensors
  • zenmonitor

To fix noisy cpu fan and random type freezes:

  • Turn off Core Performance Boost in BIOS