This guide is tested under AMD Radeon RX 470 and AMD Radeon RX 480 GPUs.
In order to install openSUSE Leap 42.2 you need to start the installer using ‘nomodeset’ in grub menu, otherwise you will end up with a blank screen.
After the installation is finished, you need to edit grub restore your changes. Basically, remove the ‘nomodeset’ because you will end up in a *never-ending loop of flickering *and changing tty is not going to work
Once you finally managed to boot into your openSUSE Leap 42.2 you will notice that Desktop cannot be loaded. Here’s what you have to do:
Remove the nomodeset permanetly
In order to avoid editing the grub everytime you boot, it’s good idea to remove the ‘nomodeset’ from your kernel-line once and for all.
Edit:
/etc/default/grub
Find the line:
GRUB_CMDLINE_LINUX_DEFAULT="nomodeset resume=/dev/vda1 splash=silent quiet crashkernel=184M-:92M showopts"
**remove **the **‘nomodeset’ **and save the file. Last but not least, refresh the grub:
# grub2-mkconfig -o /boot/grub2/grub.cfg
Apply the latest patches
Update your system using zypper as follows:
# zypper patches
and the reboot:
# systemctl reboot
Install the latest stable kernel
OpenSUSE Leap 42.2 comes with Kernel 4.4 which doesn’t have the required firmware for the new Polaris GPUs. Thus you need to install a new one:
zypper ar -f http://download.opensuse.org/repositories/Kernel:/stable/standard/Kernel:stable.repo
zypper ref # accept
zypper dup -- from Kernel_stable # go with the Solution (1)
systemctl reboot
That’s it, after that it should work.
# dmesg | grep amdgpu
4.089304] [drm] amdgpu kernel modesetting enabled.
4.094350] fb: switching to amdgpudrmfb from VESA VGA
4.116042] amdgpu 0000:01:00.0: Invalid PCI ROM header signature: expecting 0xaa55, got 0xffff
4.120508] amdgpu 0000:01:00.0: VRAM: 8192M 0x0000000000000000 - 0x00000001FFFFFFFF (8192M used)
4.120509] amdgpu 0000:01:00.0: GTT: 16039M 0x0000000200000000 - 0x00000005EA79DFFF
4.120521] [drm] amdgpu: 8192M of VRAM memory ready
4.120522] [drm] amdgpu: 16039M of GTT memory ready.
4.121902] amdgpu 0000:01:00.0: amdgpu: using MSI.
4.121956] [drm] amdgpu: irq initialized.
4.122109] amdgpu: powerplay initialized
4.122601] amdgpu 0000:01:00.0: fence driver on ring 0 use gpu addr 0x0000000200000008, cpu addr 0xffff96e7170a6008
4.122658] amdgpu 0000:01:00.0: fence driver on ring 1 use gpu addr 0x0000000200000018, cpu addr 0xffff96e7170a6018
4.122695] amdgpu 0000:01:00.0: fence driver on ring 2 use gpu addr 0x0000000200000028, cpu addr 0xffff96e7170a6028
4.122738] amdgpu 0000:01:00.0: fence driver on ring 3 use gpu addr 0x0000000200000038, cpu addr 0xffff96e7170a6038
4.122778] amdgpu 0000:01:00.0: fence driver on ring 4 use gpu addr 0x0000000200000048, cpu addr 0xffff96e7170a6048
4.122805] amdgpu 0000:01:00.0: fence driver on ring 5 use gpu addr 0x0000000200000058, cpu addr 0xffff96e7170a6058
4.122845] amdgpu 0000:01:00.0: fence driver on ring 6 use gpu addr 0x0000000200000068, cpu addr 0xffff96e7170a6068
4.122881] amdgpu 0000:01:00.0: fence driver on ring 7 use gpu addr 0x0000000200000078, cpu addr 0xffff96e7170a6078
4.122921] amdgpu 0000:01:00.0: fence driver on ring 8 use gpu addr 0x0000000200000088, cpu addr 0xffff96e7170a6088
4.122990] amdgpu 0000:01:00.0: fence driver on ring 9 use gpu addr 0x0000000200000098, cpu addr 0xffff96e7170a6098
4.123026] amdgpu 0000:01:00.0: fence driver on ring 10 use gpu addr 0x00000002000000a8, cpu addr 0xffff96e7170a60a8
4.123355] amdgpu 0000:01:00.0: fence driver on ring 11 use gpu addr 0x0000000001ff0420, cpu addr 0xffffb3dfc405a420
4.123467] amdgpu 0000:01:00.0: fence driver on ring 12 use gpu addr 0x00000002000000c8, cpu addr 0xffff96e7170a60c8
4.123508] amdgpu 0000:01:00.0: fence driver on ring 13 use gpu addr 0x00000002000000d8, cpu addr 0xffff96e7170a60d8
4.789820] fbcon: amdgpudrmfb (fb0) is primary device
5.722695] amdgpu 0000:01:00.0: fb0: amdgpudrmfb frame buffer device
5.744223] [drm] Initialized amdgpu 3.8.0 20150101 for 0000:01:00.0 on minor 1
# lsmod | grep drm
drm_kms_helper 159744 2 amdgpu,i915
syscopyarea 16384 1 drm_kms_helper
sysfillrect 16384 1 drm_kms_helper
sysimgblt 16384 1 drm_kms_helper
fb_sys_fops 16384 1 drm_kms_helper
drm 360448 7 amdgpu,i915,ttm,drm_kms_helper
01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Polaris10] [1002:67df] (rev c7)
Subsystem: Dell Device [1028:1005]
Kernel driver in use: amdgpu
Kernel modules: amdgpu
# /sbin/modinfo amdgpu | grep 67DF
alias: pci:v00001002d000067DFsv*sd*bc*sc*i*
- Note that ‘67DF’ is the ‘Device ID’ of my GPU.
Fix your Xorg
As you can see Xorg is not picking up the ‘amdgpu’ driver
# grep amdgpu /var/log/Xorg.0.log
-> Returns nothing
But it picks ’
radeon
’ and ’
fglrx
’ as a autoconfigured driver.
We need to blacklist those, but still we need to inform Xorg
to load ‘amdgpu’.
How to load ‘amdgpu’ driver:
Create this file with the following content:
vi /etc/X11/xorg_pci_ids/amdgpu.ids
# AMDGPU PCI Ids. To enable the amdgpu driver for your device
# find the PCI ID in the list and uncomment the entry (remove the '#').
# If your device is not enabled on the list and you find it to be working,
# please let us know in:
# http://bugzilla.opensuse.org/show_bug.cgi?id=972126
**100267DF**
Then save and exit the file.
Note that the ‘100267DF’ is the PCI ID of my GPU (Radeon RX 480). You can find yours by issuing the command:
# lspci -nnk | grep 0300
01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Polaris10] [1002:[b]67df] (rev c7)
Then reboot:
# systemctl reboot
and then you will see:
# grep amdgpu /var/log/Xorg.0.log
16.042] (II) Matched amdgpu from file name amdgpu.ids
16.042] (II) Matched amdgpu from file name amdgpu.ids
16.042] (==) Matched amdgpu as autoconfigured driver 0
16.042] (==) Matched amdgpu as autoconfigured driver 5
16.042] (II) LoadModule: "amdgpu"
16.042] (II) Loading /usr/lib64/xorg/modules/drivers/amdgpu_drv.so
16.044] (II) Module amdgpu: vendor="X.Org Foundation"
Blacklist radeon and fglrx
This fails and it looks like a bug:
The Xorg loads the amdgpu driver but it still tried to load the wrong things, like radeon and fglrx:
d243:~ # grep fglrx /var/log/Xorg.0.log
16.042] (==) Matched fglrx as autoconfigured driver 1
16.042] (==) Matched fglrx as autoconfigured driver 6
16.044] (II) LoadModule: "fglrx"
16.045] (WW) Warning, couldn't open module fglrx
16.045] (II) UnloadModule: "fglrx"
16.045] (II) Unloading fglrx
16.045] (EE) Failed to load module "fglrx" (module does not exist, 0)
d243:~ # grep radeon /var/log/Xorg.0.log
16.045] (II) LoadModule: "radeon"
16.045] (II) Loading /usr/lib64/xorg/modules/drivers/radeon_drv.so
16.046] (II) Module radeon: vendor="X.Org Foundation"
16.490] (II) UnloadModule: "radeon"
16.490] (II) Unloading radeon
So, to blacklist them:
vi /etc/modprobe.d/50-blacklist.conf
blacklist radeon
blacklist fglrx
Take these changes into effect for the next boot:
mkinitrd
systemctl reboot
unfortunatelly the blacklisting is not working
A workaround is the following:
vi /etc/X11/xorg.conf.d/50-screen.conf
Section "Device"
Identifier "AMD Radeon RX 400"
Driver "amdgpu"
Option "DRI" "3"
Option "TearFree" "true"
EndSection
vi /etc/X11/xorg.conf.d/50-screen.conf
Section "Screen"
Identifier "Default Screen"
Device "AMD Radeon RX 400"
Monitor "Default Monitor"
EndSection
vi /etc/X11/xorg.conf.d/50-monitor.conf
Section "Monitor"
Identifier "Default Monitor"
EndSection
Doing it that why instead of creating the
/etc/X11/xorg_pci_ids/amdgpu.ids
file, the blacklisting works.
The open source ‘amdgpu’ driver seems to perform quite well. Here’s my score in Unigine Heaven benchmark:
- extreme: Score 1928, Average 51, Minimum 8.5, Max: 111.4
- basic: Score 4190, Average 166, Minimum 13.5, Max: 286
PS: The Proprietary amdgpu-pro driver is not available for the opensuse for the moment. If you try to apply to one for SLED, you are going to end-up in kernel panic, so do not try this for now.