Ubuntu AMDGPU Drivers

I just came to the realisation that my Radeon HD 7850 is running the old radeon drivers, rather than the AMDGPU or even the RadeonSI drivers.

Running sudo lshw -c video confirms that this is the case.

Does anyone know how I can get the AMDGPU drivers up and running on the Ubuntu image provided by Canonical?
Furthermore, Vulkan under Wayland.

1 Like

im running ubuntu from canonical with upgraded kernel 15.12.4 (as shared on these forums) and i get

       詳細: VGA compatible controller
       製品: Lexa PRO [Radeon 540/540X/550/550X / RX 540X/550/550X]
       ベンダー: Advanced Micro Devices, Inc. [AMD/ATI]
       物理ID: 0
       バス情報: pci@0000:07:00.0
       論理名: /dev/fb0
       バージョン: c7
       幅: 64 bits
       クロック: 33MHz
       性能: pm pciexpress msi vga_controller bus_master cap_list rom fb
       設定: depth=32 driver=amdgpu latency=0 mode=3840x2160 visual=truecolor xres=3840 yres=2160
       リソース: iomemory:200-1ff iomemory:210-20f irq:93 メモリー:2000000000-20ffffffff メモリー:2100000000-21001fffff IOポート:0(サイズ=256) メモリー:60400000-6043ffff メモリー:60440000-6045ffff

i think you are looking for driver=amdgpu right?

Would be very interested to know how to get the amdgpu drivers since I’m still on radeon.

I gave up and moved on to other software things when my early searches found descriptions of how to change the driver in grub…but then I realized we were in u-boot land.

If it’s just a matter of upgrading kernel, that would be swell too.

I began with the Ubuntu 21.04 image that was current when the boards started shipping.

Linux 5.11.0-1012-generic riscv64
       description: VGA compatible controller
       product: Bonaire XTX [Radeon R7 260X/360]
       vendor: Advanced Micro Devices, Inc. [AMD/ATI]
       physical id: 0
       bus info: pci@0000:07:00.0
       logical name: /dev/fb0
       version: 00
       width: 64 bits
       clock: 33MHz
       capabilities: pm pciexpress msi vga_controller bus_master cap_list rom fb
       configuration: depth=32 driver=radeon latency=0 mode=1920x1200 visual=truecolor xres=1920 yres=1200
       resources: iomemory:200-1ff iomemory:200-1ff irq:93 memory:2000000000-200fffffff memory:2010000000-20107fffff ioport:0(size=256) memory:60400000-6043ffff memory:60440000-6045ffff

fwiw i booted back into ubuntu 5.11.0-1012-generic and i still get driver=amdgpu so im guessing it doesnt have anything to do with the particular kernel…

maybe its some kind of issue with specific boards?

While both radeon and amdgpu are supported for some GPUs, the upstream kernel defaults to radeon for the AMD SI (a.k.a. GCN 1.0, including Pitcairn, which is the silicon underlying the 7850) and CKI (a.k.a. GCN 1.1, including Bonaire, the silicon underlying the 260X) GPU families, and our kernel respects that default. There’s some discussion in Ubuntu bug #1847198.

However, our kernels do enable the optional amdgpu support for those GPUs (by setting CONFIG_DRM_AMDGPU_SI=y and CONFIG_DRM_AMDGPU_CIK=y), it’s just not the default. You should be able to force the use of amdgpu by adding blacklist radeon to the end of /etc/modprobe.d/blacklist.conf, then running update-initramfs -u and rebooting.

(Polaris, a.k.a. GCN 4.0, the silicon underlying 540/540X/550/550X, is modern enough that it is only supported by amdgpu.)

1 Like

I was pretty excited to follow your directions @wgrant.

Unfortunately for kernels I tried (5.12.4 & 5.11.0-1012-generic) I got the following;

[   61.064058] [drm] amdgpu kernel modesetting enabled.
[   61.074533] amdgpu 0000:07:00.0: amdgpu: SI support provided by radeon.
[   61.080920] amdgpu 0000:07:00.0: amdgpu: Use radeon.si_support=0 amdgpu.si_support=1 to override.

and then nothing ever appears on screen.

Ah, oops, try adding U_BOOT_PARAMETERS="ro earlycon amdgpu.si_support=1" to the end of /etc/default/u-boot, then run u-boot-update and reboot.

Unfortunately the directions above did not work for me.
But I did have more success with following this guide here AMDGPU - ArchWiki
And I removed the module black listing suggested originally.

I am successfully using the AMDGPU drivers now, but suffice to say, I’m still having difficulties getting Vulkan working.

But I must thank you again for your advice @wgrant

Congrats to your endeavors @pierce. I had also been looking at that guide for Arch, but had only seen samples of setting kernel parameters in other guides using grub…I was coming up short looking for u-boot help.

Did you have to recompile the kernel, or were you successful using the u-boot parameter passing as @wgrant suggested above?

If I understand the arch wiki and wgrant’s helpful u-boot guidance above correctly, I think I’ve summarized what I need to do below. Also, note that I’m CIK not SI like you are, but I guess turning both on would not hurt since I think I have an older SI card around here too)

Would you sanity check this list below against what you did to successfully get amdgpu going? I’m not going to try something until I know exactly what I’m in for :slight_smile:

EDITED: steps below were adjusted after @pierce confirmed the steps, and I successfully applied then and enabled amdgpu on the unmatched for my CIK card as well

  1. Set kernel parameters in u-boot by editing /etc/default/u-boot
    U_BOOT_PARAMETERS="ro earlycon radeon.cik_support=0 amdgpu.cik_support=1 radeon.si_support=0 amdgpu.si_support=1

  2. Run u-boot-update

  3. Create or Edit /etc/modprobe.d/amdgpu.conf to ensure it has the following entries
    options amdgpu si_support=1
    options amdgpu cik_support=1

  4. Create or Edit /etc/modprobe.d/radeon.conf to ensure it has the following entries
    options radeon si_support=0
    options radeon cik_support=0

  5. Regenerate initramfs
    sudo update-initramfs -k all -u -v

  6. Reboot

Actually, none of the 3 conf files mentioned in the wiki exist on my system now, so it looks like I’d be creating them from scratch?

Thanks for all the guidance, folks.

EDITED: step below was removed from the steps based on @pierce 's confirmation

Create or Edit /etc/mkinitcpio.conf to ensure it has the following entries. *Here is where I am most confused since this file does not exist on my system and it seems more complicated than the 2 conf files above.
modconf is in the the HOOKS array
MODULES=(amdgpu radeon)

I didn’t have to recompile the kernel, I tested it against the 5.12.4 and kernels, and it appears fine. In the post for 5.12.4, the config for building shows that the modules we need are already supplied, and @wgrant confirmed that it’s already the case with the stock ubuntu kernels.

I just followed the instructions for both cik and si (because why not).
Editing u-boot on its own didn’t seem to work on its own, but I still have it there “just in case”.
I have both the amdgpu.conf and radeon.conf, as you have.
I didn’t touch mkinitcpio.conf, as I think this is not really a debian/ubuntu thing, but more an arch thing.
Then I ran sudo update-initramfs -k all -u to ensure all kernels are updated (this may take a while). It may be worthwhile chucking a -v in there, just in case you’re still having issues. There were a few warnings regarding missing firmware blobs for amdgpu cards that weren’t related to Pitcairn/Southern Islands, but if you fall into this category there are guides on stack overflow in how to import these firmware blobs.

Then I just rebooted and confirmed with lspci -k | grep -EA3 'VGA|3D|Display' and sudo lshw -c video

ubuntu@ubuntu:~$ lspci -k | grep -EA3 'VGA|3D|Display'
07:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Pitcairn PRO [Radeon HD 7850 / R7 265 / R9 270 1024SP]
	Subsystem: Gigabyte Technology Co., Ltd Pitcairn PRO [Radeon HD 7850 / R7 265 / R9 270 1024SP]
	Kernel driver in use: amdgpu
	Kernel modules: radeon, amdgpu
ubuntu@ubuntu:~$ sudo lshw -c video
       description: VGA compatible controller
       product: Pitcairn PRO [Radeon HD 7850 / R7 265 / R9 270 1024SP]
       vendor: Advanced Micro Devices, Inc. [AMD/ATI]
       physical id: 0
       bus info: pci@0000:07:00.0
       logical name: /dev/fb0
       version: 00
       width: 64 bits
       clock: 33MHz
       capabilities: pm pciexpress msi vga_controller bus_master cap_list rom fb
       configuration: depth=32 driver=amdgpu latency=0 mode=5120x1440 visual=truecolor xres=5120 yres=1440
       resources: iomemory:200-1ff irq:93 memory:2000000000-200fffffff memory:60500000-6053ffff ioport:0(size=256) memory:60540000-6055ffff

I had a precursory look at getting AMDVLK going but there are a couple dependencies that aren’t available in the Ubuntu repos.

So I was looking into getting audio over HDMI working with AMDGPU.
Unfortunately I found this AMDGPU-Driver - Community Help Wiki

Back to Radeon we go!

Thanks, @pierce I am successfully updated and now using amdgpu with my CIK family card. I updated my original steps post above with your clarifications, which worked perfectly for me.