[Solved] Enable amdgpu driver for hardware acceleration

Brief description of the problem

I cannot load amdgpu driver.
My config is a AMD Ryzen 2500u APU on RockStor 5.0.13-0, openSUSE Leap: 15.6, Linux: 6.4.0-150600.23.17-default

inxi -G
Graphics:
  Device-1: AMD Raven Ridge [Radeon Vega Series / Radeon Mobile Series] driver: N/A
  Device-2: Quanta VGA WebCam driver: uvcvideo type: USB
  Display: server: X.org v: 1.21.1.11 driver: N/A tty: 116x55
  API: OpenGL Message: GL data unavailable in console and glxinfo missing.
lspci -k | grep -A 3 -i vga
03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] (rev c4)
        Subsystem: Acer Incorporated [ALI] Device 1259
        Kernel modules: amdgpu
03:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Raven/Raven2/Fenghuang HDMI/DP Audio Controller

Detailed step by step instructions to reproduce the problem

I followed this install instruction: SDB:AMDGPU - openSUSE Wiki

zypper install kernel-firmware-amdgpu

and tried to remove nomodeset from boot options by editing /etc/default/grub
Then i did grub2-mkconfig -o /boot/grub2/grub.cfg , dracut --force and reboot

lsmod | grep amdgpu outputs nothing, so the driver is not loaded

modprobe -v amdgpu
insmod /lib/modules/6.4.0-150600.23.17-default/kernel/drivers/gpu/drm/amd/amdgpu/amdgpu.ko.zst 
modprobe: ERROR: could not insert 'amdgpu': Invalid argument
ls /dev/dri
ls: cannot access '/dev/dri': No such file or directory

I also tested with a openSuse Leap 15.6 KDE install on a external drive and it did load the amdgpu driver. It had the kernel-firmware-amdgpu package and no special kernel config.

At the end i want hardware acceleration with VAAPI on Frigate Hardware Acceleration | Frigate

1 Like

I edited the cmdline in the grub boot screen and removed nomodeset.
The amdgpu driver is now loaded :white_check_mark:

lspci -k | grep -A 3 -i vga
03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] (rev c4)
        Subsystem: Acer Incorporated [ALI] Device 1259
        Kernel driver in use: amdgpu
        Kernel modules: amdgpu

The renderer the frigate docker container requires is also available /dev/dri/renderD128

ls -l /dev/dri
total 0
drwxr-xr-x 2 root root         80 Aug 15 06:10 by-path
crw-rw---- 1 root video  226,   0 Aug 15 06:10 card0
crw-rw-rw- 1 root render 226, 128 Aug 15 06:10 renderD128

:arrow_forward: So i only need help how to correctly/permanently adjust kernel options in grub, please.

1 Like

I did not know i need to make a config for the efi entry.
It is now permanently starting without nomodeset after running:

grub2-mkconfig -o /boot/efi/EFI/BOOT/grub.cfg

So i fixed my problem :smiley:

3 Likes

@beautiful_orca welcome to the Rockstor community, and thanks for posting your solution on amd GPUs. That should help other folks in the future!