Fix AMD Vega GPU resets

If you have an AMD Vega 56 or 64 you may have had some issues using the amdgpu driver, namely random GPU resets leaving you with a blank or colored screen and freezing the computer after a few minutes. It seems that too aggressive memory reclocking is the culprit, but I found a solution in the Freedesktop bug tracker:

Stick this in your systemd, e.g. to /etc/systemd/system/amdgpu-pp.service:

[Unit]
Description=AMD PP adjust service
[Service]
User=root
Group=root
GuessMainPID=no
ExecStart=/opt/amdgpu-pp.sh
[Install]
WantedBy=multi-user.target

Then in /opt/amdgpu-pp.sh:

#!/bin/bash
echo "manual" > /sys/class/drm/card0/device/power_dpm_force_performance_level
echo "1 2 3" > /sys/class/drm/card0/device/pp_dpm_mclk

chmod +x that bugger and enable/start the service:

systemctl enable amd-pp.service
systemctl start amd-pp.service

There, done! I have never had any GPU resets after this. Thank you, haro41, for this workaround.

Leave a Reply

Your email address will not be published. Required fields are marked *