fix for radeon + opensource driver + kde effects = crash

The problem

Kwin crashes when enabling opengl effects. It doesn’t crash immediately but it crashes after specific actions so it is 100% reproducible. For example when exiting from desktop-grid effect.

The situation

I’m using:

  • Radeon 4870 graphics card (RV770)
  • Kernel 3.1.5 (but seems irrelevant)
  • Open source ATI driver with KMS using Gallium
  • Xorg 1.11.2.902 (but happened with previous versions)
  • MESA 7.11.2
  • KDE 4.7.4 from debian
  • DRM 2.4.29
  • xserver radeon driver 6.14.3

I’m not using the blur effect

The solution

cd to ~/.kde/env/ (create it if it doesn’t exist)

create a file named gl.sh (or any other name) with execute permissions (should not be needed) and with the following contents:

#!/bin/bash

export LIBGL_ALWAYS_INDIRECT=1

The first line should not be needed as this file most probably gets source’d, but it will not hurt.

The drawback

Every GL app you’ll be using will inherit the LIBGL_ALWAYS_INDIRECT from environment, which may cause problems. If you want to play (for example) a game then open a terminal and run:

unset LIBGL_ALWAYS_INDIRECT
nexuiz  # or whichever opengl app you want to launch

Note: Fireofx is one of the applications that may use GL.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.