Xfce: xfwm4 crashes (BadValue) on Leap 15.6, leaving no window borders etc

I installed the latest updates today on my Leap 15.6 laptop, and after rebooting and logging back in to Xfce, I was somewhat surprised to experience some severe lag, followed by xfwm4 crashing, leaving me with a semi-useless environment. I could hit the meta key to get the menu up, and hit CTRL-ALT-T to get a terminal open, but the environment wasn’t really usable, due to having no window chrome (no ability to resize windows, it was a minor miracle I could drag the terminal around, etc. etc.)

~/.xsession-errors said:

(xfwm4:9845): Gdk-WARNING **: 16:08:54.245: The program 'xfwm4' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadValue (integer parameter out of range for operation)'.
  (Details: serial 2621 error_code 2 request_code 152 (GLX) minor_code 24)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

Eventually, after an awful lot of searching, I found this which suggested messing with xfwm4’s vblank and compositor options. I don’t really know what these do, and the documentation seems a little sparse, but setting vblank to xpresent fixed it for me:

 xfconf-query -c xfwm4 -p /general/vblank_mode -t string -s "xpresent"

I also experimentally found turning the compositor off works as an alternative to tweaking vblank.

The really weird thing is that if I logged in as root, everything worked fine. It only got crashy when I logged in with my regular user account. My guess as to what’s going on here is this:

  • The default vblank is glx.
  • I’m using the proprietary nvidia drivers (nvidia-driver-G06-kmp-default-580.105.08_k6.4.0_150600.21-lp156.44.1.x86_64), which I just updated today along with a bunch of other stuff.
  • Presumably vblank=glxinteracts with the nvidia drivers in some unhappy way when run as an unprivileged user, but works fine as root? Is that a thing?

Hopefully the next person to hit this problem will find this post and use it to get up and running again quickly :slight_smile:

You mentioned you just installed the nvidia proprietary driver. Did you try setting xfwm4 to glx again if it is now working, else you maybe have a problem loading the nvidia driver. just running nvidia-settings you will see if nvidia is working.

I already had the nvidia proprietary driver installed, and previously had no problems. All I did here was zypper up to get the latest of everything installed. nvidia-settings runs fine, but xfwm4 with glx fails as above. Interestingly I subsequently tried running glxgears and that also fails:

> glxgears 
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:  36
  Current serial number in output stream:  37

If I log in as root, glxgears runs fine, which to me seems to point to some permissions thing being screwed up somehow.