What to do if some of your KDE desktop effects suddenly stop working [solved]

A recent update broke my desktop effects, but not all of them. It all started with the first time in what, 8 years? that Linux has locked up on me. I was applying yast updates while using the work machine (as usual) and at some point I could not get it out of the static screen save background. No network, no REISUB, nothing but a hard reset could make it come back again. After rebooting everything was apparently ok, but after I while I noticed I no longer had some desktop effects. And started to miss some of them. A lot. I was switching to the wrong window a lot of times because I could not see clearly the window preview or because the default KDE window switcher does not have the common sense of showing you in the center of the screen the window you’re about to switch to (mind you, Windows is equally awful in that regard) Makes me wonder how I switched windows all those years before cover flow. And contrary to some popular beliefs, with OpenGL and desktop effects enabled, my desktop is considerably faster than without them.

But only the Only the OpenGL ones were not working. I know that they were only the OpenGL ones because trying to enable them again in the desktop effects settings gave me error messages specifica to these saying that OpenGL was not available. Strangely, everything related to OpenGL working perfectly: games, screensavers, etc, but no desktop effects.

Digging around I discovered an entry in the [Compositing] section of ~/kde4/share/config/kwinrc that said


[Compositing]
OpenGLIsUnsafe=true

How KDE arrived at the conclusion, and remembered permanently, that OpenGL is unsafe on my system I don’t know. Probably related to the previous crash. Anyway, setting these values


[Compositing]
Backend=OpenGL
OpenGLIsUnsafe=false

and closing and opening again the KDE session restored sanity. And my desktop effects.

Writing this here so that I don’t forget to check again if it happens next time. And in case it can help anyone.