Radeon RX 5500 - libGL error: failed to load driver: swrast

I am having trouble running hardware acceleration and openGL on my computer.
I have installed the latest amdgpu-pro drivers, unfortunately I don’t know what else to do. I am not a very advanced openSUSE user. Please help.
I’m running:

Linux localhost 5.3.18-lp152.50-default #1 SMP Tue Nov 10 21:02:48 UTC 2020 (29ac38d) x86_64 x86_64 x86_64 GNU/Linux

info:


glxinfo                
name of display: localhost:10.0
libGL error: failed to load driver: swrast
X Error of failed request:  GLXBadContext
  Major opcode of failed request:  152 (GLX)
  Minor opcode of failed request:  6 (X_GLXIsDirect)
  Serial number of failed request:  50
  Current serial number in output stream:  49

/usr/sbin/hwinfo --gfxcard

/usr/sbin/hwinfo --gfxcard
39: PCI 2b00.0: 0300 VGA compatible controller (VGA)            
  [Created at pci.386]
  Unique ID: tl1e.9ntRMesp0p1
  Parent ID: CvqU.CS5kfnTSviA
  SysFS ID: /devices/pci0000:00/0000:00:03.1/0000:29:00.0/0000:2a:00.0/0000:2b:00.0
  SysFS BusID: 0000:2b:00.0
  Hardware Class: graphics card
  Model: "ATI Navi 14 [Radeon RX 5500/5500M / Pro 5500M]"
  Vendor: pci 0x1002 "ATI Technologies Inc"
  Device: pci 0x7340 "Navi 14 [Radeon RX 5500/5500M / Pro 5500M]"
  SubVendor: pci 0x1458 "Gigabyte Technology Co., Ltd"
  SubDevice: pci 0x2319 
  Revision: 0xc5
  Driver: "amdgpu"
  Driver Modules: "amdgpu"
  Memory Range: 0xe0000000-0xefffffff (ro,non-prefetchable)
  Memory Range: 0xf0000000-0xf01fffff (ro,non-prefetchable)
  I/O Ports: 0xe000-0xefff (rw)
  Memory Range: 0xfca00000-0xfca7ffff (rw,non-prefetchable)
  Memory Range: 0x000c0000-0x000dffff (rw,non-prefetchable,disabled)
  IRQ: 68 (1887757 events)
  Module Alias: "pci:v00001002d00007340sv00001458sd00002319bc03sc00i00"
  Driver Info #0:
    Driver Status: amdgpu is active
    Driver Activation Cmd: "modprobe amdgpu"
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #46 (PCI bridge)
Primary display adapter: #39

Try to update AMD driver, X11, firmware files.
Try to use Mesa 3D drivers.

Glxinfo and hwinfo --gfxcard don’t say enough of what matters about hardware or software in use. Please be sure xdpyinfo is installed and post input & output from Konsole or Xterm or equivalent running:

inxi -Gay

If inxi complains about the y it’s because you’re using an old inxi version, so try without it or upgrade it from upstream. Also please upload /var/log/Xorg.0.log using the susepaste command or by going to http://susepaste.org/ or http://pastebin.com/.

Thanks for your answers. Additional information from my system below.

# zypper install Mesa
Retrieving repository metadata .................................................[done]
Building repository cache ......................................................[done]
Loading repository data...
Reading installed packages...
'Mesa' is already installed.
No update candidate for 'Mesa-19.3.4-lp152.27.1.x86_64'. The highest available version is already installed.
Resolving package dependencies...
Nothing to do.

inxi -SGCIj

System:    Host: localhost Kernel: 5.3.18-lp152.44-default x86_64 bits: 64 Console: tty 1 Distro: openSUSE Leap 15.2 
CPU:       Topology: 8-Core model: AMD Ryzen 7 3800X bits: 64 type: MT MCP L2 cache: 4096 KiB 
           Speed: 2199 MHz min/max: 2200/3900 MHz Core speeds (MHz): 1: 2198 2: 2199 3: 2195 4: 2199 5: 2192 6: 2196 
           7: 2197 8: 2191 9: 2199 10: 2200 11: 2196 12: 2197 13: 2198 14: 2197 15: 2198 16: 2189 
Graphics:  Device-1: Advanced Micro Devices [AMD/ATI] Navi 14 [Radeon RX 5500/5500M / Pro 5500M] driver: amdgpu 
           v: 5.6.16.20.40 
           Display: server: X.Org 1.20.3 driver: amdgpu,ati unloaded: fbdev,modesetting,radeon,vesa 
           resolution: 1920x1080~60Hz 
           OpenGL: renderer: N/A v: N/A 
Swap:      ID-1: swap-1 type: partition size: 2.00 GiB used: 0 KiB (0.0%) dev: /dev/sda7 
Info:      Processes: 331 Uptime: 07:02:11  up 23 days 18:26,  3 users,  load average: 0.26, 0.20, 0.18 
           Memory: 31.30 GiB used: 4.92 GiB (15.7%) Shell: bash inxi: 3.1.00 

find

# find /usr -iname "*libGL.so*" -exec ls -l -- {} +
 lrwxrwxrwx 1 root root     14 May 16 17:18 /usr/lib64/libGL.so.1 -> libGL.so.1.7.0
-rwxr-xr-x 1 root root 616832 May 16 17:18 /usr/lib64/libGL.so.1.7.0

# find /usr -iname "*swrast*" -exec ls -l -- {} +
 
lrwxrwxrwx 1 root root       39 Oct 15 10:06 /usr/lib64/dri/kms_swrast_dri.so -> /opt/amdgpu/lib64/dri/kms_swrast_dri.so
-rwxr-xr-x 8 root root 19985128 May 30 05:57 /usr/lib64/dri/kms_swrast_dri.so~
lrwxrwxrwx 1 root root       35 Oct 15 10:06 /usr/lib64/dri/swrast_dri.so -> /opt/amdgpu/lib64/dri/swrast_dri.so
-rwxr-xr-x 8 root root 19985128 May 30 05:57 /usr/lib64/dri/swrast_dri.so~
-rwxr-xr-x 1 root root  1929640 May 30 05:57 /usr/lib64/gallium-pipe/pipe_swrast.so

LIBGL_DEBUG=verbose glxgears

libGL: DRI3 initializes failed, try running in DRI2 modelibGL: screen 0 does not appear to be DRI2 capable
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
libGL: dlopen /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so failed (/usr/lib/x86_64-linux-gnu/dri/swrast_dri.so: cannot open shared object file: No such file or directory)
libGL: OpenDriver: trying /usr/X11R6/lib64/modules/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/X11R6/lib64/modules/dri/swrast_dri.so
libGL: dlopen /usr/X11R6/lib64/modules/dri/swrast_dri.so failed (/usr/X11R6/lib64/modules/dri/swrast_dri.so: cannot open shared object file: No such file or directory)
libGL: OpenDriver: trying /usr/lib64/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib64/dri/swrast_dri.so
libGL: OpenDriver: trying /usr/X11R6/lib/modules/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/X11R6/lib/modules/dri/swrast_dri.so
libGL: dlopen /usr/X11R6/lib/modules/dri/swrast_dri.so failed (/usr/X11R6/lib/modules/dri/swrast_dri.so: cannot open shared object file: No such file or directory)
libGL: OpenDriver: trying /usr/lib/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib/dri/swrast_dri.so
libGL: dlopen /usr/lib/dri/swrast_dri.so failed (/usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory)
libGL: OpenDriver: trying /usr/X11R6/lib32/modules/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/X11R6/lib32/modules/dri/swrast_dri.so
libGL: dlopen /usr/X11R6/lib32/modules/dri/swrast_dri.so failed (/usr/X11R6/lib32/modules/dri/swrast_dri.so: cannot open shared object file: No such file or directory)
libGL: OpenDriver: trying /usr/lib32/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib32/dri/swrast_dri.so
libGL: dlopen /usr/lib32/dri/swrast_dri.so failed (/usr/lib32/dri/swrast_dri.so: cannot open shared object file: No such file or directory)
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  152 (GLX)
  Minor opcode of failed request:  3 (X_GLXCreateContext)
  Value in failed request:  0x0
  Serial number of failed request:  37
  Current serial number in output stream:  39

and url: https://susepaste.org/53314328

(EE) AMDGPU(0): drmmode_do_crtc_dpms cannot get last vblank counter

repeats several times in the log. There should be only one line containing (EE). All others are errors.

driver: amdgpu,ati
indicates the Radeon DDX could be complicit in the problem. Remove it:

sudo zypper rm xf86-video-ati xorg-x11-driver-video
sudo zypper al xf86-video-ati

We don’t know precisely which IGP or GPU you have because your inxi omitted options a and xx, either of which which would have provided its device ID.

Did you have the same problem using the FOSS AMDGPU driver provided by standard openSUSE repos?

Removing xf86-video-ati xorg-x11-driver-video and rebooting will not change it.
If I remove the amdgpu-pro driver then openGL seems to work fine, unfortunately I have a very low screen resolution and refresh rate of 30Hz.

My graphics card data page:
XFX Radeon RX 5500 XT THICC II Pro 8GB GDDR6 (3x DP HDMI) 1717 mhz

Will not, or did not?

If I remove the amdgpu-pro driver then openGL seems to work fine, unfortunately I have a very low screen resolution and refresh rate of 30Hz.
This should not be. Low resolution usually means hardware too new for support by software in standard repos, or KMS is not engaged. Not engaged is a common result of an installation that required a troubleshooting boot option (e.g. nomodeset) retained by the installed system.

My interest was in identifying its technological age, which the marketing-speak, as with the published specifications, helps with not:

# inxi -GISay
System:
  Host: asa88 Kernel: 5.3.18-lp152.41-default x86_64 bits: 64 compiler: gcc v: 7.5.0
  Desktop: Trinity R14.0.9 tk: Qt 3.5.0 info: kicker wm: Twin 3.0 dm: startx
  Distro: openSUSE Leap 15.2
Graphics:
  Device-1: AMD Kaveri [Radeon R7 Graphics] vendor: ASUSTeK driver: amdgpu
  v: kernel alternate: radeon bus ID: 00:01.0 **chip ID: 1002:130f**
  Display: server: X.Org 1.20.3 driver: amdgpu
  unloaded: fbdev,modesetting,vesa alternate: ati display ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1200 s-dpi: 120 s-size: 406x254mm (16.0x10.0")
  s-diag: 479mm (18.9")
  Monitor-1: DisplayPort-0 res: 1920x1200 hz: 60 dpi: 94
  size: 519x324mm (20.4x12.8") diag: 612mm (24.1")
  OpenGL: renderer: AMD KAVERI (DRM 3.33.0 5.3.18-lp152.41-default LLVM 9.0.1)
  v: 4.5 Mesa 19.3.4 direct render: Yes
Info:...Shell: Bash v: 4.4.23 running in: konsole inxi: 3.1.09

My mistake. I meant, of course, that when I removed the driver, nothing changed.

Solution:

./amdgpu-install --uninstall
./amdgpu-install --opencl=pal,legacy
reboot

Does OpenCL work with Radeon RX 5500?
AMD have semi-official OpenCL support for Navi.
Please test with clinfo, clpeak, Luxmark, FAH Bench, Blender benchmark.
For Blender benchmark with Leap 15.2 use CLI version or run it with


LD_PRELOAD=/home/.../glibc-2.31-6.1.x86_64/lib64/libm.so.6 /home/.../Blender/benchmark-launcher