After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 682173 - ScreenShield should suspend xserver's built-in screensaver
ScreenShield should suspend xserver's built-in screensaver
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
3.5.x
Other Linux
: Normal major
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-08-18 21:27 UTC by Gert Kulyk
Modified: 2012-10-18 18:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gdb output (39.51 KB, text/plain)
2012-08-18 21:27 UTC, Gert Kulyk
  Details
ScreenShield: Disable X ScreenSaver extension (5.03 KB, patch)
2012-08-26 17:09 UTC, Giovanni Campagna
needs-work Details | Review

Description Gert Kulyk 2012-08-18 21:27:40 UTC
Created attachment 221712 [details]
gdb output

Since gnome-shell switched from gnome-screensaver to ScreenShield, everytime my machine is idle for a while, the shell is getting killed without a possibility to recover. In the logs I find the following:

Fensterverwalter-Warnung:Log level 6: The program 'gnome-shell' received an X Wi
ndow System error.
This probably reflects a bug in the program.
The error was 'BadDrawable (invalid Pixmap or Window parameter)'.
  (Details: serial 20883 error_code 9 request_code 136 minor_code 9)

When run in gdb, this is shown:

Program received signal SIGTRAP, Trace/breakpoint trap.
g_logv (log_domain=log_domain@entry=0xb5f7a976 "Gdk", log_level=log_level@entry=G_LOG_LEVEL_ERROR, 
    format=format@entry=0xb5f85427 "%s", args1=args1@entry=0xbfbe39dc "\300K\334\n\t")
    at /build/glib2.0-2.33.8/glib/gmessages.c:765

I'm attaching the best trace I got so far.
Comment 1 Gert Kulyk 2012-08-19 11:05:48 UTC
I'm far away from being an expert for such types of problems, but I suspect that it has something to do with the xserver's built-in screensaver as this happens exactly after 10 minutes idle time, the xserver's default blanking time. Another hint that this value is not controled by ScreenShield is the fact, that while I'm watching video the screen is going blank after 10 minutes without keybord/mouse events, too.
Comment 2 Gert Kulyk 2012-08-19 12:08:27 UTC
After further testing I can add: xset s off helps. So ScreenShield seems not to disable xserver' own screensaver, causing the above mentioned troubles.
Comment 3 Gert Kulyk 2012-08-24 23:17:47 UTC
Just for the record: while xset s off helped at some stage in 3.5.90 cycle, for final release and current git master it does not. Shell keeps dying with X error when the screen blanks.
Comment 4 Gert Kulyk 2012-08-25 22:44:08 UTC
Forget about my last comment. After rechecking it, I found out that cycle was still set to a non-zero value. So xset s 0 0 && xset s off makes sure that this does not happen again. BTW, this is similar to that what gnome-screensaver is doing in src/gs-watcher-x11.c.
Comment 5 Giovanni Campagna 2012-08-26 17:09:51 UTC
Created attachment 222485 [details] [review]
ScreenShield: Disable X ScreenSaver extension

The ScreenSaver extension is so broken that it be configured to prevent
drawing when the screensaver is active, with a BadDrawable. Protect ourselves
from that by disabling it.
Comment 6 Giovanni Campagna 2012-08-26 17:10:18 UTC
Could you try the attached patch and confirm if the bug is fixed?
Thank you!
Comment 7 Gert Kulyk 2012-08-26 20:04:06 UTC
The good news is, that with the patch the shell does not crash, but
a first quick test shows, that the shell now fails to blank/lock the screen. Within the next few days I'll have a bit more time to test it.
Comment 8 Gert Kulyk 2012-08-26 20:32:04 UTC
I looked over your patch and found the following:

>  /* Turn off the server builtin saver if it is now running. */
>  XForceScreenSaver (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), ScreenSaverReset);

It's true that it is in the original code, but there it is executed conditionally and not every time you call the function. For testing purposes I simply removed it, and blanking/locking was working again. If at all, maybe XForceScreenSaver should only be called at startup? (I don't know if this is the correct approach).

To confirm that the patch is working (when testing without the XForceScreensaver call it does currently, so many thanks), I'll need to test it a bit more as it sometimes happend, that even when I turned off xservers' screensaver (I did it only once in the session), gnome-shell recieved the X error when screen was turning off after blanking/locking. But here we are calling it right before locking again, maybe that does the trick.
Comment 9 Gert Kulyk 2012-08-31 17:26:47 UTC
Lets attach another trace, this time I've set a breakpoint at gdk_x_error and installed more debugging packages.

GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
attach: Datei oder Verzeichnis nicht gefunden.
Attaching to process 16263
Reading symbols from /usr/bin/gnome-shell...Reading symbols from /usr/lib/debug/usr/bin/gnome-shell...done.
done.
Reading symbols from /usr/lib/gnome-shell/libgnome-shell.so...Reading symbols from /usr/lib/debug/usr/lib/gnome-shell/libgnome-shell.so...done.
done.
Loaded symbols for /usr/lib/gnome-shell/libgnome-shell.so
Reading symbols from /usr/lib/gnome-shell/libgnome-shell-js.so...Reading symbols from /usr/lib/debug/usr/lib/gnome-shell/libgnome-shell-js.so...done.
done.
Loaded symbols for /usr/lib/gnome-shell/libgnome-shell-js.so
Reading symbols from /usr/lib/i386-linux-gnu/libatk-bridge-2.0.so.0...Reading symbols from /usr/lib/debug/.build-id/b0/918526b5c33720d4ee630b51ff1989abe1470c.debug...done.
done.
Loaded symbols for /usr/lib/i386-linux-gnu/libatk-bridge-2.0.so.0
Reading symbols from /usr/lib/libmutter.so.0...Reading symbols from /usr/lib/debug/usr/lib/libmutter.so.0.0.0...done.
done.
Loaded symbols for /usr/lib/libmutter.so.0
Reading symbols from /usr/lib/libgjs.so.0...Reading symbols from /usr/lib/debug/usr/lib/libgjs.so.0.0.0...done.
done.
Loaded symbols for /usr/lib/libgjs.so.0
Reading symbols from /usr/lib/libmozjs185.so.1.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libmozjs185.so.1.0
Reading symbols from /usr/lib/i386-linux-gnu/libplds4.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libplds4.so
Reading symbols from /usr/lib/i386-linux-gnu/libplc4.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libplc4.so
Reading symbols from /usr/lib/i386-linux-gnu/libnspr4.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libnspr4.so
Reading symbols from /usr/lib/libgnome-menu-3.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgnome-menu-3.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libgstbase-1.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libgstbase-1.0.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libgstreamer-1.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libgstreamer-1.0.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libgthread-2.0.so.0...Reading symbols from /usr/lib/debug/usr/lib/i386-linux-gnu/libgthread-2.0.so.0.3311.0...done.
done.
Loaded symbols for /usr/lib/i386-linux-gnu/libgthread-2.0.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libsoup-2.4.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libsoup-2.4.so.1
Reading symbols from /usr/lib/i386-linux-gnu/libGL.so.1...Reading symbols from /usr/lib/debug/usr/lib/i386-linux-gnu/libGL.so.1.2.0...done.
done.
Loaded symbols for /usr/lib/i386-linux-gnu/libGL.so.1
Reading symbols from /usr/lib/libstartup-notification-1.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libstartup-notification-1.so.0
Reading symbols from /usr/lib/libgirepository-1.0.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgirepository-1.0.so.1
Reading symbols from /usr/lib/i386-linux-gnu/libcanberra.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libcanberra.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libtelepathy-logger.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libtelepathy-logger.so.2
Reading symbols from /usr/lib/i386-linux-gnu/libtelepathy-glib.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libtelepathy-glib.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libpolkit-agent-1.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libpolkit-agent-1.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libpolkit-gobject-1.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libpolkit-gobject-1.so.0
Reading symbols from /usr/lib/libnm-glib.so.4...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libnm-glib.so.4
Reading symbols from /usr/lib/libnm-util.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libnm-util.so.2
Reading symbols from /usr/lib/i386-linux-gnu/libdbus-glib-1.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libdbus-glib-1.so.2
Reading symbols from /lib/i386-linux-gnu/libdbus-1.so.3...(no debugging symbols found)...done.
Loaded symbols for /lib/i386-linux-gnu/libdbus-1.so.3
Reading symbols from /usr/lib/i386-linux-gnu/libgnome-keyring.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libgnome-keyring.so.0
Reading symbols from /usr/lib/libgcr-3.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgcr-3.so.1
Reading symbols from /usr/lib/libgcr-base-3.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgcr-base-3.so.1
Reading symbols from /usr/lib/libgck-1.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgck-1.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libp11-kit.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libp11-kit.so.0
Reading symbols from /usr/lib/libgnome-desktop-3.so.4...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgnome-desktop-3.so.4
Reading symbols from /lib/i386-linux-gnu/libsystemd-login.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib/i386-linux-gnu/libsystemd-login.so.0
Reading symbols from /lib/i386-linux-gnu/libsystemd-daemon.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib/i386-linux-gnu/libsystemd-daemon.so.0
Reading symbols from /usr/lib/gnome-bluetooth/libgnome-bluetooth-applet.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/gnome-bluetooth/libgnome-bluetooth-applet.so.0
Reading symbols from /lib/i386-linux-gnu/i686/cmov/libm.so.6...Reading symbols from /usr/lib/debug/lib/i386-linux-gnu/i686/cmov/libm-2.13.so...done.
done.
Loaded symbols for /lib/i386-linux-gnu/i686/cmov/libm.so.6
Reading symbols from /usr/lib/i386-linux-gnu/libclutter-1.0.so.0...Reading symbols from /usr/lib/debug/usr/lib/i386-linux-gnu/libclutter-1.0.so.0.1112.0...done.
done.
Loaded symbols for /usr/lib/i386-linux-gnu/libclutter-1.0.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libcogl-pango.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libcogl-pango.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libjson-glib-1.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libjson-glib-1.0.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libXi.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libXi.so.6
Reading symbols from /usr/lib/i386-linux-gnu/libcogl.so.11...Reading symbols from /usr/lib/debug/usr/lib/i386-linux-gnu/libcogl.so.11.0.0...done.
done.
Loaded symbols for /usr/lib/i386-linux-gnu/libcogl.so.11
Reading symbols from /usr/lib/i386-linux-gnu/libXext.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libXext.so.6
Reading symbols from /usr/lib/i386-linux-gnu/libXdamage.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libXdamage.so.1
Reading symbols from /usr/lib/i386-linux-gnu/libXcomposite.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libXcomposite.so.1
Reading symbols from /usr/lib/i386-linux-gnu/libgmodule-2.0.so.0...Reading symbols from /usr/lib/debug/usr/lib/i386-linux-gnu/libgmodule-2.0.so.0.3311.0...done.
done.
Loaded symbols for /usr/lib/i386-linux-gnu/libgmodule-2.0.so.0
Reading symbols from /lib/i386-linux-gnu/i686/cmov/librt.so.1...Reading symbols from /usr/lib/debug/lib/i386-linux-gnu/i686/cmov/librt-2.13.so...done.
done.
Loaded symbols for /lib/i386-linux-gnu/i686/cmov/librt.so.1
Reading symbols from /usr/lib/i386-linux-gnu/libXfixes.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libXfixes.so.3
Reading symbols from /usr/lib/i386-linux-gnu/libcroco-0.6.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libcroco-0.6.so.3
Reading symbols from /usr/lib/i386-linux-gnu/libxml2.so.2...Reading symbols from /usr/lib/debug/.build-id/21/6bc936e9f56b78f5903cc3b2befe07c814b07c.debug...done.
done.
Loaded symbols for /usr/lib/i386-linux-gnu/libxml2.so.2
Reading symbols from /usr/lib/i386-linux-gnu/libX11.so.6...Reading symbols from /usr/lib/debug/usr/lib/i386-linux-gnu/libX11.so.6.3.0...done.
done.
Loaded symbols for /usr/lib/i386-linux-gnu/libX11.so.6
Reading symbols from /usr/lib/i386-linux-gnu/libgtk-3.so.0...Reading symbols from /usr/lib/debug/usr/lib/i386-linux-gnu/libgtk-3.so.0.513.0...done.
done.
Loaded symbols for /usr/lib/i386-linux-gnu/libgtk-3.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libgdk-3.so.0...Reading symbols from /usr/lib/debug/usr/lib/i386-linux-gnu/libgdk-3.so.0.513.0...done.
done.
Loaded symbols for /usr/lib/i386-linux-gnu/libgdk-3.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libatk-1.0.so.0...Reading symbols from /usr/lib/debug/.build-id/40/75172c4707d2394191d69356082667c437e2a5.debug...done.
done.
Loaded symbols for /usr/lib/i386-linux-gnu/libatk-1.0.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libgio-2.0.so.0...Reading symbols from /usr/lib/debug/usr/lib/i386-linux-gnu/libgio-2.0.so.0.3311.0...done.
done.
Loaded symbols for /usr/lib/i386-linux-gnu/libgio-2.0.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libpangocairo-1.0.so.0...Reading symbols from /usr/lib/debug/usr/lib/i386-linux-gnu/libpangocairo-1.0.so.0.3100.0...done.
done.
Loaded symbols for /usr/lib/i386-linux-gnu/libpangocairo-1.0.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libgdk_pixbuf-2.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libgdk_pixbuf-2.0.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libcairo-gobject.so.2...Reading symbols from /usr/lib/debug/usr/lib/i386-linux-gnu/libcairo-gobject.so.2.11200.3...done.
done.
Loaded symbols for /usr/lib/i386-linux-gnu/libcairo-gobject.so.2
Reading symbols from /usr/lib/i386-linux-gnu/libpango-1.0.so.0...Reading symbols from /usr/lib/debug/usr/lib/i386-linux-gnu/libpango-1.0.so.0.3100.0...done.
done.
Loaded symbols for /usr/lib/i386-linux-gnu/libpango-1.0.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libcairo.so.2...Reading symbols from /usr/lib/debug/usr/lib/i386-linux-gnu/libcairo.so.2.11200.3...done.
done.
Loaded symbols for /usr/lib/i386-linux-gnu/libcairo.so.2
Reading symbols from /usr/lib/i386-linux-gnu/libpulse-mainloop-glib.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libpulse-mainloop-glib.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libpulse.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libpulse.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0...Reading symbols from /usr/lib/debug/usr/lib/i386-linux-gnu/libgobject-2.0.so.0.3311.0...done.
done.
Loaded symbols for /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
Reading symbols from /lib/i386-linux-gnu/libglib-2.0.so.0...Reading symbols from /usr/lib/debug/lib/i386-linux-gnu/libglib-2.0.so.0.3311.0...done.
done.
Loaded symbols for /lib/i386-linux-gnu/libglib-2.0.so.0
Reading symbols from /lib/i386-linux-gnu/i686/cmov/libpthread.so.0...Reading symbols from /usr/lib/debug/lib/i386-linux-gnu/i686/cmov/libpthread-2.13.so...done.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/i686/cmov/libthread_db.so.1".
[New Thread 0xa05d4b70 (LWP 16385)]
[New Thread 0xaccffb70 (LWP 16378)]
[New Thread 0xae237b70 (LWP 16281)]
[New Thread 0xaea58b70 (LWP 16280)]
[New Thread 0xb326cb70 (LWP 16279)]
[New Thread 0xb3abeb70 (LWP 16275)]
done.
Loaded symbols for /lib/i386-linux-gnu/i686/cmov/libpthread.so.0
Reading symbols from /lib/i386-linux-gnu/i686/cmov/libc.so.6...Reading symbols from /usr/lib/debug/lib/i386-linux-gnu/i686/cmov/libc-2.13.so...done.
done.
Loaded symbols for /lib/i386-linux-gnu/i686/cmov/libc.so.6
Reading symbols from /usr/lib/i386-linux-gnu/libatspi.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libatspi.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libXrender.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libXrender.so.1
Reading symbols from /usr/lib/i386-linux-gnu/libcanberra-gtk3.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libcanberra-gtk3.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libXcursor.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libXcursor.so.1
Reading symbols from /usr/lib/i386-linux-gnu/libXrandr.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libXrandr.so.2
Reading symbols from /usr/lib/i386-linux-gnu/libSM.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libSM.so.6
Reading symbols from /usr/lib/i386-linux-gnu/libICE.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libICE.so.6
Reading symbols from /usr/lib/i386-linux-gnu/libXinerama.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libXinerama.so.1
Reading symbols from /usr/lib/i386-linux-gnu/libstdc++.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libstdc++.so.6
Reading symbols from /lib/i386-linux-gnu/libgcc_s.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/i386-linux-gnu/libgcc_s.so.1
Reading symbols from /usr/lib/i386-linux-gnu/libffi.so.5...Reading symbols from /usr/lib/debug/usr/lib/i386-linux-gnu/libffi.so.5.0.10...done.
done.
Loaded symbols for /usr/lib/i386-linux-gnu/libffi.so.5
Reading symbols from /lib/i386-linux-gnu/i686/cmov/libdl.so.2...Reading symbols from /usr/lib/debug/lib/i386-linux-gnu/i686/cmov/libdl-2.13.so...done.
done.
Loaded symbols for /lib/i386-linux-gnu/i686/cmov/libdl.so.2
Reading symbols from /lib/i386-linux-gnu/libz.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/i386-linux-gnu/libz.so.1
Reading symbols from /usr/lib/i386-linux-gnu/libglapi.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libglapi.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libX11-xcb.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libX11-xcb.so.1
Reading symbols from /usr/lib/i386-linux-gnu/libxcb-glx.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libxcb-glx.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libxcb.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libxcb.so.1
Reading symbols from /usr/lib/i386-linux-gnu/libXxf86vm.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libXxf86vm.so.1
Reading symbols from /usr/lib/i386-linux-gnu/libdrm.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libdrm.so.2
Reading symbols from /usr/lib/i386-linux-gnu/libxcb-util.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libxcb-util.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libvorbisfile.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libvorbisfile.so.3
Reading symbols from /usr/lib/i386-linux-gnu/libvorbis.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libvorbis.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libogg.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libogg.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libtdb.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libtdb.so.1
Reading symbols from /usr/lib/i386-linux-gnu/libltdl.so.7...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libltdl.so.7
Reading symbols from /usr/lib/i386-linux-gnu/libsqlite3.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libsqlite3.so.0
Reading symbols from /lib/i386-linux-gnu/libexpat.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/i386-linux-gnu/libexpat.so.1
Reading symbols from /lib/i386-linux-gnu/libuuid.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/i386-linux-gnu/libuuid.so.1
Reading symbols from /lib/i386-linux-gnu/libgcrypt.so.11...(no debugging symbols found)...done.
Loaded symbols for /lib/i386-linux-gnu/libgcrypt.so.11
Reading symbols from /usr/lib/i386-linux-gnu/libgnutls.so.26...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libgnutls.so.26
Reading symbols from /usr/lib/i386-linux-gnu/libgudev-1.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libgudev-1.0.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libxkbfile.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libxkbfile.so.1
Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/lib/libgnome-bluetooth.so.11...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgnome-bluetooth.so.11
Reading symbols from /usr/lib/i386-linux-gnu/libpangoft2-1.0.so.0...Reading symbols from /usr/lib/debug/usr/lib/i386-linux-gnu/libpangoft2-1.0.so.0.3100.0...done.
done.
Loaded symbols for /usr/lib/i386-linux-gnu/libpangoft2-1.0.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libfreetype.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libfreetype.so.6
Reading symbols from /usr/lib/i386-linux-gnu/libfontconfig.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libfontconfig.so.1
Reading symbols from /lib/i386-linux-gnu/liblzma.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/i386-linux-gnu/liblzma.so.5
Reading symbols from /lib/i386-linux-gnu/libselinux.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/i386-linux-gnu/libselinux.so.1
Reading symbols from /lib/i386-linux-gnu/i686/cmov/libresolv.so.2...Reading symbols from /usr/lib/debug/lib/i386-linux-gnu/i686/cmov/libresolv-2.13.so...done.
done.
Loaded symbols for /lib/i386-linux-gnu/i686/cmov/libresolv.so.2
Reading symbols from /lib/i386-linux-gnu/libpng12.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib/i386-linux-gnu/libpng12.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libpixman-1.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libpixman-1.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libxcb-shm.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libxcb-shm.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libxcb-render.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libxcb-render.so.0
Reading symbols from /usr/lib/i386-linux-gnu/pulseaudio/libpulsecommon-2.1.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/pulseaudio/libpulsecommon-2.1.so
Reading symbols from /lib/i386-linux-gnu/libcap.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/i386-linux-gnu/libcap.so.2
Reading symbols from /usr/lib/i386-linux-gnu/libjson.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libjson.so.0
Reading symbols from /lib/i386-linux-gnu/libpcre.so.3...(no debugging symbols found)...done.
Loaded symbols for /lib/i386-linux-gnu/libpcre.so.3
Reading symbols from /usr/lib/i386-linux-gnu/libXau.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libXau.so.6
Reading symbols from /usr/lib/i386-linux-gnu/libXdmcp.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libXdmcp.so.6
Reading symbols from /lib/i386-linux-gnu/i686/cmov/libcrypt.so.1...Reading symbols from /usr/lib/debug/lib/i386-linux-gnu/i686/cmov/libcrypt-2.13.so...done.
done.
Loaded symbols for /lib/i386-linux-gnu/i686/cmov/libcrypt.so.1
Reading symbols from /lib/i386-linux-gnu/libgpg-error.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib/i386-linux-gnu/libgpg-error.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libtasn1.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libtasn1.so.3
Reading symbols from /lib/i386-linux-gnu/libudev.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/i386-linux-gnu/libudev.so.1
Reading symbols from /usr/lib/i386-linux-gnu/libharfbuzz.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libharfbuzz.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libXtst.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libXtst.so.6
Reading symbols from /lib/i386-linux-gnu/libwrap.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib/i386-linux-gnu/libwrap.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libsndfile.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libsndfile.so.1
Reading symbols from /usr/lib/i386-linux-gnu/libasyncns.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libasyncns.so.0
Reading symbols from /lib/i386-linux-gnu/libattr.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/i386-linux-gnu/libattr.so.1
Reading symbols from /usr/lib/libgraphite2.so.2.0.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgraphite2.so.2.0.0
Reading symbols from /lib/i386-linux-gnu/i686/cmov/libnsl.so.1...Reading symbols from /usr/lib/debug/lib/i386-linux-gnu/i686/cmov/libnsl-2.13.so...done.
done.
Loaded symbols for /lib/i386-linux-gnu/i686/cmov/libnsl.so.1
Reading symbols from /usr/lib/i386-linux-gnu/libFLAC.so.8...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libFLAC.so.8
Reading symbols from /usr/lib/i386-linux-gnu/libvorbisenc.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libvorbisenc.so.2
Reading symbols from /lib/i386-linux-gnu/i686/cmov/libnss_compat.so.2...Reading symbols from /usr/lib/debug/lib/i386-linux-gnu/i686/cmov/libnss_compat-2.13.so...done.
done.
Loaded symbols for /lib/i386-linux-gnu/i686/cmov/libnss_compat.so.2
Reading symbols from /lib/i386-linux-gnu/i686/cmov/libnss_nis.so.2...Reading symbols from /usr/lib/debug/lib/i386-linux-gnu/i686/cmov/libnss_nis-2.13.so...done.
done.
Loaded symbols for /lib/i386-linux-gnu/i686/cmov/libnss_nis.so.2
Reading symbols from /lib/i386-linux-gnu/i686/cmov/libnss_files.so.2...Reading symbols from /usr/lib/debug/lib/i386-linux-gnu/i686/cmov/libnss_files-2.13.so...done.
done.
Loaded symbols for /lib/i386-linux-gnu/i686/cmov/libnss_files.so.2
Reading symbols from /usr/lib/gtk-3.0/3.0.0/theming-engines/libadwaita.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/gtk-3.0/3.0.0/theming-engines/libadwaita.so
Reading symbols from /usr/lib/i386-linux-gnu/librsvg-2.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/librsvg-2.so.2
Reading symbols from /usr/lib/i386-linux-gnu/gtk-3.0/modules/libpk-gtk-module.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/gtk-3.0/modules/libpk-gtk-module.so
Reading symbols from /usr/lib/i386-linux-gnu/gtk-3.0/modules/libcanberra-gtk-module.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/gtk-3.0/modules/libcanberra-gtk-module.so
Reading symbols from /usr/lib/i386-linux-gnu/dri/i915_dri.so...Reading symbols from /usr/lib/debug/usr/lib/i386-linux-gnu/dri/i915_dri.so...done.
done.
Loaded symbols for /usr/lib/i386-linux-gnu/dri/i915_dri.so
Reading symbols from /usr/lib/i386-linux-gnu/libdricore8.1.0.so.1...Reading symbols from /usr/lib/debug/usr/lib/i386-linux-gnu/libdricore8.1.0.so.1.0.0...done.
done.
Loaded symbols for /usr/lib/i386-linux-gnu/libdricore8.1.0.so.1
Reading symbols from /usr/lib/i386-linux-gnu/libdrm_intel.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libdrm_intel.so.1
Reading symbols from /usr/lib/i386-linux-gnu/libpciaccess.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libpciaccess.so.0
Reading symbols from /usr/lib/i386-linux-gnu/gio/modules/libdconfsettings.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/gio/modules/libdconfsettings.so
Reading symbols from /usr/lib/i386-linux-gnu/libcanberra-0.29/libcanberra-pulse.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libcanberra-0.29/libcanberra-pulse.so
Reading symbols from /usr/lib/gjs-1.0/langNative.so...Reading symbols from /usr/lib/debug/usr/lib/gjs-1.0/langNative.so...done.
done.
Loaded symbols for /usr/lib/gjs-1.0/langNative.so
Reading symbols from /usr/lib/gjs-1.0/gettextNative.so...Reading symbols from /usr/lib/debug/usr/lib/gjs-1.0/gettextNative.so...done.
done.
Loaded symbols for /usr/lib/gjs-1.0/gettextNative.so
Reading symbols from /usr/lib/gjs-1.0/formatNative.so...Reading symbols from /usr/lib/debug/usr/lib/gjs-1.0/formatNative.so...done.
done.
Loaded symbols for /usr/lib/gjs-1.0/formatNative.so
Reading symbols from /usr/lib/gjs-1.0/mainloop.so...Reading symbols from /usr/lib/debug/usr/lib/gjs-1.0/mainloop.so...done.
done.
Loaded symbols for /usr/lib/gjs-1.0/mainloop.so
Reading symbols from /usr/lib/gjs-1.0/cairoNative.so...Reading symbols from /usr/lib/debug/usr/lib/gjs-1.0/cairoNative.so...done.
done.
Loaded symbols for /usr/lib/gjs-1.0/cairoNative.so
Reading symbols from /usr/lib/gjs-1.0/dbusNative.so...Reading symbols from /usr/lib/debug/usr/lib/gjs-1.0/dbusNative.so...done.
done.
Loaded symbols for /usr/lib/gjs-1.0/dbusNative.so
Reading symbols from /usr/lib/libgjs-dbus.so.0...Reading symbols from /usr/lib/debug/usr/lib/libgjs-dbus.so.0.0.0...done.
done.
Loaded symbols for /usr/lib/libgjs-dbus.so.0
Reading symbols from /usr/lib/gjs-1.0/system.so...Reading symbols from /usr/lib/debug/usr/lib/gjs-1.0/system.so...done.
done.
Loaded symbols for /usr/lib/gjs-1.0/system.so
Reading symbols from /usr/lib/i386-linux-gnu/libibus-1.0.so.5...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libibus-1.0.so.5
Reading symbols from /usr/lib/i386-linux-gnu/gio/modules/libgioremote-volume-monitor.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/gio/modules/libgioremote-volume-monitor.so
Reading symbols from /usr/lib/i386-linux-gnu/libgvfscommon.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libgvfscommon.so.0
Reading symbols from /lib/i386-linux-gnu/i686/cmov/libutil.so.1...Reading symbols from /usr/lib/debug/lib/i386-linux-gnu/i686/cmov/libutil-2.13.so...done.
done.
Loaded symbols for /lib/i386-linux-gnu/i686/cmov/libutil.so.1
Reading symbols from /usr/lib/i386-linux-gnu/libbluray.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libbluray.so.1
Reading symbols from /usr/lib/i386-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so
Reading symbols from /usr/lib/i386-linux-gnu/pkcs11/gnome-keyring-pkcs11.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/pkcs11/gnome-keyring-pkcs11.so
Reading symbols from /usr/lib/libaccountsservice.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libaccountsservice.so.0
Reading symbols from /usr/lib/libupower-glib.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libupower-glib.so.1
Reading symbols from /usr/lib/libgdm.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgdm.so.1
Reading symbols from /usr/lib/i386-linux-gnu/pango/1.8.0/modules/pango-basic-fc.so...Reading symbols from /usr/lib/debug/usr/lib/i386-linux-gnu/pango/1.8.0/modules/pango-basic-fc.so...done.
done.
Loaded symbols for /usr/lib/i386-linux-gnu/pango/1.8.0/modules/pango-basic-fc.so
Reading symbols from /usr/lib/i386-linux-gnu/gio/modules/libgiognutls.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/gio/modules/libgiognutls.so
Reading symbols from /usr/lib/libjavascriptcoregtk-3.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libjavascriptcoregtk-3.0.so.0
Reading symbols from /usr/lib/i386-linux-gnu/libicui18n.so.48...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libicui18n.so.48
Reading symbols from /usr/lib/i386-linux-gnu/libicuuc.so.48...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libicuuc.so.48
Reading symbols from /usr/lib/i386-linux-gnu/libicudata.so.48...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/libicudata.so.48
Reading symbols from /usr/lib/i386-linux-gnu/gio/modules/libgiognomeproxy.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/gio/modules/libgiognomeproxy.so
Reading symbols from /usr/lib/i386-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i386-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so
Reading symbols from /usr/lib/i386-linux-gnu/gconv/ISO8859-1.so...Reading symbols from /usr/lib/debug/usr/lib/i386-linux-gnu/gconv/ISO8859-1.so...done.
done.
Loaded symbols for /usr/lib/i386-linux-gnu/gconv/ISO8859-1.so
0xb76fd430 in __kernel_vsyscall ()
(gdb) break gdk_x_error
Breakpoint 1 at 0xb5ed8160: file /build/gtk+3.0-3.5.12.81-9d3c81/gdk/x11/gdkmain-x11.c, line 268.
(gdb) continue
Continuing.
[New Thread 0xa0dd5b70 (LWP 16572)]
[Thread 0xa0dd5b70 (LWP 16572) exited]

Breakpoint 1, gdk_x_error (xdisplay=0x9482470, error=0xbfd93e60)
    at /build/gtk+3.0-3.5.12.81-9d3c81/gdk/x11/gdkmain-x11.c:268
268	{
(gdb) t a a bt

Thread 1 (Thread 0xb4d2a890 (LWP 16263))

  • #0 gdk_x_error
    at /build/gtk+3.0-3.5.12.81-9d3c81/gdk/x11/gdkmain-x11.c line 268
  • #1 _XError
    at ../../src/XlibInt.c line 1583
  • #2 handle_error
    at ../../src/xcb_io.c line 212
  • #3 _XReply
    at ../../src/xcb_io.c line 698
  • #4 DRI2GetMSC
    at dri2.c line 602
  • #5 dri2DrawableGetMSC
    at dri2_glx.c line 430
  • #6 __glXGetVideoSyncSGI
    at glxcmds.c line 1868
  • #7 _cogl_winsys_get_vsync_counter
    at ./winsys/cogl-winsys-glx.c line 1156
  • #8 _cogl_winsys_onscreen_swap_buffers
    at ./winsys/cogl-winsys-glx.c line 1352
  • #9 cogl_onscreen_swap_buffers
    at ./cogl-onscreen.c line 155
  • #10 clutter_stage_cogl_redraw
    at ./cogl/clutter-stage-cogl.c line 498
  • #11 _clutter_stage_window_redraw
    at ./clutter-stage-window.c line 236
  • #12 clutter_stage_do_redraw
    at ./clutter-stage.c line 1172
  • #13 _clutter_stage_do_update
    at ./clutter-stage.c line 1230
  • #14 master_clock_update_stages
    at ./clutter-master-clock.c line 386
  • #15 clutter_clock_dispatch
    at ./clutter-master-clock.c line 520
  • #16 g_main_dispatch
    at /build/glib2.0-2.33.10.52-8297/glib/gmain.c line 2715
  • #17 g_main_context_dispatch
    at /build/glib2.0-2.33.10.52-8297/glib/gmain.c line 3219
  • #18 g_main_context_iterate
    at /build/glib2.0-2.33.10.52-8297/glib/gmain.c line 3290
  • #19 g_main_loop_run
    at /build/glib2.0-2.33.10.52-8297/glib/gmain.c line 3484
  • #20 meta_run
    at core/main.c line 545
  • #21 main
    at main.c line 411
$1 = {void (void)} 0xb75180e0 <gjs_dumpstack>
(gdb) quit
A debugging session is active.
Comment 10 Gert Kulyk 2012-08-31 17:28:43 UTC
Sorry for the above message, I forgot to strip the header.
Comment 11 Gert Kulyk 2012-09-05 20:29:43 UTC
Good news, I think I finally found the cause for the X window system error, and - surprise - it is not related to gnome-shell but to a buggy combination of the intel driver running on a machine using kernel 3.5.

Anyway, the built-in screensaver should be suspended, otherwise it may happen, that while whatching videos the screen goes blank.

Your patch prevents that, if you modify it a bit to call XForceScreenSaver () only at initialisation and not when locking, too, as this will prevent screen locking in general.
Comment 12 Gert Kulyk 2012-09-05 20:31:43 UTC
Review of attachment 222485 [details] [review]:

Here the reference to the BadDrawable may be wrong
Comment 13 Gert Kulyk 2012-09-05 20:39:17 UTC
Review of attachment 222485 [details] [review]:

::: js/ui/screenShield.js
@@ +362,3 @@
+        // a BadDrawable error
+        // We do it again when about to lock, to protect us from xset or xlock
+        Shell.util_disable_x_screensaver();

If you make the call to XForceScreenSaver conditional, here it would be good to have: 

Shell.util_disable_x_screensaver(true);

Drop the comment with the BadDrawable error as it seems not to be true

@@ +429,3 @@
     _onStatusChanged: function(status) {
         if (status == GnomeSession.PresenceStatus.IDLE) {
+            Shell.util_disable_x_screensaver();

Here we'll need:
Shell.util_disable_x_screensaver(false);

::: src/shell-util.c
@@ +722,3 @@
+/* Shamelessly stolen from gnome-screensaver gs-watcher-x11.c */
+void
+shell_util_disable_x_screensaver (void)

Better:
shell_util_disable_x_screensaver (gboolean force)

@@ +770,3 @@
+
+  /* Turn off the server builtin saver if it is now running. */
+  XForceScreenSaver (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), ScreenSaverReset);

Better:
if (force)
  XForceScreenSaver (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), ScreenSaverReset);

::: src/shell-util.h
@@ +48,3 @@
                                                int                rowstride);
 
+void     shell_util_disable_x_screensaver      (void);

Better:
void shell_util_disable_x_screensaver (gboolean force);
Comment 14 Giovanni Campagna 2012-09-06 13:31:41 UTC
Sorry, but I don't understand why the call to XForceScreenSaver should be conditional. The shell doesn't use the X ScreenSaver extension, so any use of xlock, xset or any other commands that rely on it would conflict with built-in screen locking.
Comment 15 Gert Kulyk 2012-09-06 14:32:02 UTC
It should be conditional (as it is in gs-watcher-x11.c) because when using your patch, the screen is never locking, no matter what is set via gnome-control-center/dconf (if it is for you, I don't know what is going wrong here).It only works when XForceScreensaver is not called in _onStatusChanged, or said better, at least then and only then it works here. 

A working possibility to omit the bool value is to call Shell.util_disable_x_screensaver() later in _onStatusChanged, after the general setup is done, but if this is a correct approach, you're more experienced to decide than I am.

Why not to remove XForceScreensaver at all:
The first call of XForceScreensaver did help to survive a failed blanking with my buggy intel driver (screenShield vanished, but gnome-shell was able to recover while without it, it was not).
Comment 16 Giovanni Campagna 2012-09-10 08:24:38 UTC
I still don't understand this. Why should the X ScreenSaver extension matter at all?
gnome-shell doesn't use it (we use X Composite to get a window above everything else), gnome-settings-daemon doesn't use it (it uses the DPMS extension to turn off the screen). (Note: gnome-settings-daemon in 3.4 has some bugs related to screen blanking timeouts, but they're fixed in 3.5.90)
Additionally, here my patch works just fine, and if you're experiencing problems, my bet would be again on driver issues.
Comment 17 Gert Kulyk 2012-09-11 14:36:01 UTC
If it is working for you, then it's indeed very likely that my problems are related to the graphics driver (current intel driver, kernel 3.5, xorg server 1.12.4). Any hints on how debug this properly are appreciated.

I'm ok with it, if you want to commit the patch without addressing my concerns as currently I am the only user who has the mentioned troubles and from a theoretical point of view you are right - no idea why theory and reality in my case are conflicting.

Concerning g-s-d: I've always used at least the most current released version of gnome libraries and apps for my tests, sometimes git snapshots, too, so my g-s-d does no longer have the mentioned issues.
Comment 18 Marinus Schraal 2012-09-27 17:43:30 UTC
Same problem here. 

Intel driver 2.20.8 (sna)
Kernel 3.5.4
xorg-server 1.13.0 (tried with 1.12 as well)
Mesa 9.0 from git (tried mesa 8.{0,1} as well)

The xset tricks did nothing, haven't tried the patch yet as it didn't work for reporter either.
Comment 19 Gert Kulyk 2012-09-27 19:18:05 UTC
Currently I'm using the patch modified with the comments I've added and the intel driver with uxa instead of sna as sna still keeps crashing. This combination seems to work more or less.
Comment 20 Marinus Schraal 2012-09-27 19:36:15 UTC
I've switched to uxa and have no problems so far, so if it's just sna this should probably go to the intel devs.
Comment 21 Marinus Schraal 2012-09-27 19:54:31 UTC
I've opened a bug at fdo : https://bugs.freedesktop.org/show_bug.cgi?id=55395
Comment 22 Marinus Schraal 2012-09-29 19:08:12 UTC
This has been resolved upstream, fixed in xf86-video-intel-2.20.9 . See fdo bug as per comment #21 .
Comment 23 Gert Kulyk 2012-09-30 19:35:20 UTC
The BadDrawable stuff, yes, but not the suspension of xserver's built-in screensaver.
Comment 24 Gert Kulyk 2012-10-18 18:41:48 UTC
With the recent commit to gsd (Bug 686339), this one seems to be resolved.