How to make amdgpu.ppfeaturemask work with kernel 5.4.0 of ubuntu 20.04?

0

I can unlock the access to adjust clocks and voltages of my AMD GPU by appending the Kernel parameter amdgpu.ppfeaturemask=0xffffffff with kernel 5.8.x of Ubuntu 20.04 but not with kernel 5.4. Why not with kernel 5.4 ? With kernel 5.8, I can edit the file /sys/class/drm/card0/device/pp_od_clk_voltage but with kernel 5.4, I can't, as the file is not unlocked, permission deny even with root. I confirm I update grub after each modify. I followed the procedure from: https://wiki.archlinux.org/index.php/AMDGPU

Wiki Achlinux: ยง OverclockingSince Linux 4.17, it is possible to adjust clocks and voltages of the graphics card via /sys/class/drm/card0/device/pp_od_clk_voltage.

Some of my data:

$ cat /etc/default/grub | grep GRUB_CMDLINE_LINUX_DEFAULT
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash amdgpu.ppfeaturemask=0xffffffff"
$ ls /sys/class/drm/card0/device | grep pp_od
pp_od_clk_voltage
$ cat /sys/class/drm/card0/device/pp_od_clk_voltage
$ uname -a
Linux ASUS-xxx 5.4.0-45-generic #49-Ubuntu SMP Wed Aug 26 13:38:52 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
ubuntu
kernel
overclocking
asked on Super User Sep 5, 2020 by NicolasSmith • edited Sep 5, 2020 by NicolasSmith

1 Answer

0

You did not mention which GPU model there are quite a lot of differences between R9/RX/Vega64/Vega7/etc especially in how the sysfs works

Kernel cmdline arg for module option is caveman technology Put your module options in the proper place, /etc/modprobe.d file:

# cat /etc/modprobe.d/amdgpu.conf 
blacklist radeon
blacklist fglrx
options amdgpu si_support=1 cik_support=1 vm_fragment_size=9 audio=0 dc=0 aspm=0 ppfeaturemask=0xffffffff

The blacklist are to ensure (for older cards, SI and CIK family) the older drivers don't load, and amdgpu should handle them. Like R9-390 or HD7870. You may only need the ppfeaturemask especially if you use the card for display (dc=0) or want HDMI audio (audio=0)

Update initramfs when creating or changing modprobe/module files, as it scrapes changed modprobe configuration into the image, in case amdgpu module loads early.

To be able to write the control file you must set the power_dpm_force_performance_level to manual first (auto is default, which locks almost all tweak writes). Perhaps some models will not read settings until in manual mode as well (?) and Hawaii models don't even have that file at all. I have never seen the file exist but be empty.

Watch dmesg for complaints about powerplay, some card bios are buggy, ones modded by noobs can also be buggy. It may be unable to read the powerplay table for some reason which could lead to the silent blank output. Using dmesg -ew & and then doing things in sysfs should spew any background errors inline with what more or less triggered them. Don't forget dmesg is in the background, bring it back with fg and then you can ctrl-c it

answered on Super User Dec 14, 2020 by Tony Butler

User contributions licensed under CC BY-SA 3.0