DPMSForceLevel() should probably trap X11 errors
Affected version
- mutter c36f3f01
- X11 session
Bug summary
mutter
crashes if it tries to force a DPMS level while DPMS is turned off on the X server.
Steps to reproduce
- install
caffeine-ng
- start
gnome-shell
- select the Enable Caffeine option from the appindicator
What happened
mutter
might crash because caffeine-ng
runs xset -dpms
.
Relevant logs, screenshots, screencasts etc.
Received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
(Details serial 35723 error_code 8 request_code 147 (unknown) minor_code 6)
(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 MUTTER_SYNC environment
variable to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the meta_x_error() function.)
#10 0x00007f40e190e89e in meta_x_error (xdisplay=<optimized out>, error=<optimized out>) at ../../../../src/mutter/src/x11/meta-x11-errors.c:136
#11 0x00007f40e13e555c in _XError (dpy=dpy@entry=0x555fe681a9d0, rep=rep@entry=0x555fecde5eb0) at /usr/src/debug/libx11/libX11-1.8.5/src/XlibInt.c:1503
#12 0x00007f40e13e5668 in handle_error (dpy=0x555fe681a9d0, err=0x555fecde5eb0, in_XReply=<optimized out>) at /usr/src/debug/libx11/libX11-1.8.5/src/xcb_io.c:211
#13 0x00007f40e13e5725 in handle_response (dpy=dpy@entry=0x555fe681a9d0, response=0x555fecde5eb0, in_XReply=in_XReply@entry=1) at /usr/src/debug/libx11/libX11-1.8.5/src/xcb_io.c:403
#14 0x00007f40e13e710d in _XReply (dpy=dpy@entry=0x555fe681a9d0, rep=rep@entry=0x7ffc34fd7120, extra=extra@entry=0, discard=discard@entry=1) at /usr/src/debug/libx11/libX11-1.8.5/src/xcb_io.c:722
#15 0x00007f40e13e74a1 in XSync (dpy=0x555fe681a9d0, discard=discard@entry=0) at /usr/src/debug/libx11/libX11-1.8.5/src/Sync.c:44
#16 0x00007f40e13e7540 in _XSyncFunction (dpy=<optimized out>) at /usr/src/debug/libx11/libX11-1.8.5/src/Synchro.c:35
#17 0x00007f40deeaf85b in DPMSForceLevel (dpy=0x555fe681a9d0, level=<optimized out>) at /build/libxext/src/libXext-1.3.5/src/DPMS.c:259
#18 0x00007f40e18f8c90 in meta_monitor_manager_xrandr_set_power_save_mode (manager=0x555fe684dd50, mode=<optimized out>) at ../../../../src/mutter/src/backends/x11/meta-monitor-manager-xrandr.c:183
#19 0x00007f40e1893711 in power_save_mode_changed (manager=0x555fe684dd50, pspec=<optimized out>, user_data=<optimized out>) at ../../../../src/mutter/src/backends/meta-monitor-manager.c