System crashes when using OpenGL 3.1 for desktop compositing

There is a bizarre problem with KDE compositing, which has surprisingly been going on for over an year now. I’m just curious to understand its reasons better, as well as point it out in case people are not aware of it. On a side note, I run openSUSE Tumbleweed and the drivers installed from its official repositories, and use the RadeonSI video driver (Radeon R7 370 video card).

When using OpenGL 3.1 for desktop effects, the operating system will randomly freeze and go completely unresponsive, forcing you to power off the machine and start it back on. This problem does not occur when using OpenGL 2.0 however. The setting in cause is Configure Desktop - Display and Monitor - Compositor - Rendering Backend.

There’s no advantage to using 3.1 over 2.0, so the solution is simply to use the later! But an OS freeze is still a major problem, and many people might not know that this is the cause. Is this a driver or Kernel or Mesa issue?

Or possibly llvm? Try the kernel HEAD repo perhaps, also try amdgpu?

Have a browse of the dri-devel list on, I see a few for radeonsi;

Can you ssh to the box from another computer, or does the whole system freeze?

I don’t normally run system packages from other repositories, as I don’t want to mess with them and risk breaking my system. I have the 4.8.3 Kernel, which might have amplified the issue. I don’t have SSH setup for connecting on this machine, so I don’t know about that… the system does however instantly freeze, as in the image / sound stop and I can no longer move the cursor or toggle NumLock / CapsLock.

I’ve had no issues with the Kernel:HEAD repo, I’m using it because my Mullins R5 works OTB with it now and amdgpu. Add it, try it, remove it and go back…?

If possible, can you setup a ssh session from another computer (or smartphone/tablet)?

Anything in ~/.xsession-errors* ~/.local/share/xorg/Xorg.1.log (if you reboot) else current will be 0.

Anything in the journalctl output at the time of the crash?

I see a comment on from you :wink:

So do you see crashes of the kernel driver?

journalctl --no-pager |grep amdgpu

There isn’t really any useful output for that command. Here it is, both as user and as root:

mircea@linux-qz0r:~> journalctl --no-pager | grep amdgpu
Hint: You are currently not seeing messages from other users and the system.
      Users in the 'systemd-journal' group can see all messages. Pass -q to
      turn off this notice.
Failed to get journal fields: Bad message

linux-qz0r:/home/mircea # journalctl --no-pager | grep amdgpu
Failed to get journal fields: Bad message

For now I submitted a bug report. It’s not just OpenGL 3.1 compositing that causes this, but also some games. MESA or a video driver might have screwed up again.

it will be Xorg.0.log.old … Xorg.1.log would refer to when you were concurrently running a second X Server instance

I know that we talked about this before (though I don’t really remember content), but I’m still not clear as to why it would be found in the location you’ve mentioned, as opposed to good old /var/log … which is, indeed, the location that the log remains on my TW systems.

For me there is no “~/.local/share/xorg/” directory. Also I checked both the .log and .log.old… the old file’s modified date was long before the moment of the crash, so I went with the normal log.

On my Tumbleweed system I see;

malcolml@ernie3:~> cat /etc/os-release
NAME="openSUSE Tumbleweed"
# VERSION="20161028"
PRETTY_NAME="openSUSE Tumbleweed"

malcolml@ernie3:~> ls -la ~/.local/share/xorg/
total 72
drwxr-xr-x 1 malcolml users    96 Oct 31 15:54 .
drwxr-xr-x 1 malcolml users   444 Oct 30 09:18 ..
-rw-r--r-- 1 malcolml users 35364 Oct 31 17:08 Xorg.0.log
-rw-r--r-- 1 malcolml users 34719 Oct 31 14:55 Xorg.0.log.old
-rw-r--r-- 1 malcolml users     0 Aug 27 15:29 Xorg.1.log
-rw-r--r-- 1 malcolml users     0 Aug 27 15:29 Xorg.1.log.old

malcolml@ernie3:~> ls -la /var/log/X*
-rw-r--r-- 1 root users 107132 Oct 18 19:09 /var/log/Xorg.0.log
-rw-r--r-- 1 root users  32921 Oct 17 22:59 /var/log/Xorg.0.log.old
-rw-r--r-- 1 root users  33128 Sep 27 10:23 /var/log/Xorg.2.log

The .local ones are from the last boot and current.

Change it to the driver your using… radeon? Just as user root.

Ahhh… got it! Here is the output… pastebinning it since it’s long and the forum will probably not accept:

That’s an old log…?

Why not try switching to the amdgpu driver instead? I think it will work better with your card.

Just blacklist radeon and add a 20-amdgpu.conf file;
See the following as an example;

Save as /etc/modprobe.d/50-radeon.conf

Save as /etc/X11/xorg.conf.d/20-amdgpu.conf

Then run mkinitrd

Found the answer easily enough:

Wait… there is there an alternative video driver included with openSUSE? Or does amdgpu refer to the proprietary driver (fglrx), in which case I do not want it.

Sure it’s the kernel module for your card since it’s GCN… radeon is for the others.

I did a bit of searching, and it is an interesting driver (owned by AMD but apparently open source). I wonder why openSUSE isn’t defaulting to it already? I heard something about it being experimental for R7 series too… is there any risk of a switch breaking my system or X11? Also does this mean I’d be no longer using MESA 3D, which I would prefer to stick to for now?

Sorry for the double post, but I think I figured out why I’m still using Radeon and not AMDGPU: Support for GCN 1.0 cards will only arrive in the 4.9 Kernel. My card is GCN 1.0 and I’m using the 4.8 Kernel, so I’d pretty much break my system if I messed with this now.

I guess one option is to wait, hoping the 4.9 Kernel is not far behind in TW… I assume I’ll switch drivers automatically then? It would however be nice if a solution for those strange crashes could be found until that time.

I’m using it now with my Mullins R5 on both openSUSE 42.2 and Tumbleweed;

00:01.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Mullins [Radeon R4/R5 Graphics] [1002:9851] (rev 45)
    Subsystem: Dell Device [1028:06bf]
    Kernel driver in use: amdgpu
    Kernel modules: radeon, amdgpu

OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD MULLINS (DRM 3.8.0 / 4.9.0-rc3-1.gb005706-default, LLVM 3.8
OpenGL core profile version string: 4.1 (Core Profile) Mesa 12.0.3
OpenGL core profile shading language version string: 4.10
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 12.0.3
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 12.0.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
OpenGL ES profile extensions:

It has been enabled since kernel 4.8.x

I build my own for the 4.4 kernel since it has a bug fix, 4.9.x it works OTB with the files indicated in my previous post as the fixes have been upstreamed. Now for my card (another bug report) was to add Mullins support in xf86-video-amdgpu which you need to see if installed, this may trigger your system to start using amdgpu OTB.

Nope, 4.8 kernel in openSUSE, plus I pushed the fixes through to tumbleweed with version 1.1.2;

* Thu Sep 15 2016
- Update to version 1.1.1:
  + Use --with-xorg-conf-dir=$prefix/share/X11/xorg.conf.d by
  + Fix cursor size for SI.
  + Add SI PCI IDs.
  + Add missing Kaveri PCI ID (1318).
  + Add Mullins PCI IDs (fdo#97472).
  + DRI2: Fix amdgpu_dri2_exchange_buffers width/height
    copy'n'paste error.
  + DRI2: Add interpolated_vblanks in amdgpu_dri2_get_crtc_msc.
  + Only use RandR APIs if RandR is enabled (deb#827984).
  + Destroy all dedicated scanout buffers during CloseScreen.
  + glamor: Reallocate linear pixmap BO if necessary for DRI2
  + Move DRI2's local fixup_glamor helper to
    amdgpu_glamor_set_pixmap_bo v2 so it can be used outside of the
    DRI2 code.
  + Consolidate get_drawable_pixmap helper.
  + Add amdgpu_pixmap_get_tiling_info.
  + Remove amdgpu_share_pixmap_backing.
  + glamor: Fix amdgpu_glamor_share_pixmap_backing for priv->bo ==
  + Add missing Bonaire PCI ID.
  + Add more Polaris 10 and 11 PCI IDs.
  + Fix amdgpu_mode_hotplug crash on multi GPU platform.
  + Handle Zaphod mode correctly in amdgpu_mode_hotplug
  + Add Strato PCI ID.
  + Remove RR_Capability_SinkOutput for GPU without CRTC.
- Set amdgpu.ids as a config file to fix rpmlint warning.

Hmmm… interesting. I still haven’t fully understood the steps to enable it, and some posts stated that xorg stopped working after they added in the amdgpu configuration. Isn’t there any x11 command that can be used cleanly, or do system files need to be manually hacked?