enable AMDGPU for R9 270x on 20.04
Solution 1:
@hgogert provided the correct answer, but I want to add that one should try match the HWE kernel version with the firmware package from the upstream release the HWE stack is back-ported from. E.g. Ubuntu 20.04.3 HWE has Kernel 5.11 sourced from hirsute (21.04) with hirsute's firmware package update info listed at https://packages.ubuntu.com/hirsute-updates/linux-firmware. So for 20.04.3, to manually override and add the firmware update:
curl -OL http://archive.ubuntu.com/ubuntu/pool/main/l/linux-firmware/linux-firmware_1.197.3_all.deb
sudo dpkg -i linux-firmware_1.197.3_all.deb
Extra hint: maybe download the deb from your closest mirror because this package is almost 200MB large.
To explain further, Ubuntu HWE stack maintainers updated the kernel (and amdgpu driver) but unfortunately failed to keep the linux-firmware package up to date. So the amdgpu driver was clearly tested/developed on top of firmware that Ubuntu included with the newer interim non-LTS, but then failed to include/back-port with their HWE kernel refresh to the previous LTS.
See:
- https://bugs.launchpad.net/ubuntu/+source/linux-firmware/+bug/1953249/comments/2
- https://wiki.ubuntu.com/Kernel/LTSEnablementStack
Solution 2:
In my case I could see some errors during boot early in dmesg:
errors like:
okt 30 22:05:14 desktop kernel: amdgpu 0000:01:00.0: Direct firmware load for amdgpu/pitcairn_uvd.bin failed with error -2
okt 30 22:05:14 desktop kernel: amdgpu 0000:01:00.0: amdgpu: amdgpu_uvd: Can't load firmware "amdgpu/pitcairn_uvd.bin"
okt 30 22:05:14 desktop kernel: [drm:amdgpu_device_ip_init [amdgpu]] *ERROR* sw_init of IP block <uvd_v3_1> failed -2
okt 30 22:05:14 desktop kernel: amdgpu 0000:01:00.0: amdgpu: amdgpu_device_ip_init failed
okt 30 22:05:14 desktop kernel: amdgpu 0000:01:00.0: amdgpu: Fatal error during GPU init
okt 30 22:05:14 desktop kernel: amdgpu 0000:01:00.0: amdgpu: amdgpu: finishing device.
Installing linux-firmware from at least a major version above 20.04 resolved this:
To be specific, in my case, installing linux-firmware_1.190_all.deb
solved it.