AMDGPU Overclock on Startup

  1. Create a bash script to easily change the overclock settings.

    • /usr/bin/amdgpu_oc
    • 1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      #!/bin/bash
      # Core clock
      if [ $# -ge 1 ]
      then
      echo $1 > /sys/class/drm/card0/device/pp_sclk_od
      fi
      # Memory clock
      if [ $# -ge 2 ]
      then
      echo $2 > /sys/class/drm/card0/device/pp_mclk_od
      fi
      # Power mode
      if [ $# -ge 3 ]
      then
      echo $3 > /sys/class/drm/card0/device/power_dpm_force_performance_level
      fi
    • chmod +x /usr/bin/amdgpu_oc

  2. Create a systemd service to load the configuration on startup. Change the settings to your liking. The core clock and memory clock range from 0% to 20%. The performance level can be set to low, high, or auto.

    • /etc/systemd/system/amdgpu-oc.service
    • 1
      2
      3
      4
      5
      6
      7
      8
      [Unit]
      Description=AMDGPU OC
      [Service]
      ExecStart=/usr/bin/amdgpu_oc 0 0 auto
      [Install]
      WantedBy=multi-user.target
    • systemctl enable amdgpu-oc.service

    • systemctl start amdgpu-oc.service