DebuggingScreenLocking
This page is part of the debugging series — pages with debugging details for a variety of Ubuntu packages. |
Contents Contents |
Introduction
Bugs relating to screen locking issues typically fall into 4 categories:
- Screensaver failing to start after the inactivity period times out
- Screensaver failing to start when triggered manually
- No password prompt after resuming from suspend/hibernation
- Screensaver not hiding desktop and applications properly
Screen locking is a complex combination of many different packages, applications, and tools. For detailed information on how screen locking works, see DebuggingScreenLocking/HowScreenLockingWorks.
How to file
The proper way to report a bug about screen locking is by using ubuntu-bug:
$ ubuntu-bug gnome-screensaver
This will open a bug and, starting with Lucid, will attach debugging information about gnome-screensaver.
The following command can be used to attach the required information to a bug that is already open:
$ apport-collect BUGNUMBER
It is very important to detail in the bug report the steps necessary to reproduce the issue in order for the developers to be able to fix it.
Extra information
- What desktop environment does this problem occur in? (GNOME, XFCE, KDE, etc.)
- Do you use visual effects? (System/Preferences/Appearance/Visual Effects)
- Does the problem still occur if you disable visual effects?
- Does the problem still occur if you use the "blank screen" screensaver?
- Is the "Lock screen when screensaver is active" setting checked in System/Preferences/Screensaver?
- Is this a laptop or a desktop machine?
- How many monitors do you use?
- If it is a laptop, do you use an external screen?
- Do you have the hamster-applet application installed? This applications has been known to cause screen locking issues.
Getting GConf values
The following command will dump all the screen-locking relevant settings that are stored in GConf:
$ gconftool-2 --dump /apps/gnome-screensaver /apps/gnome-power-manager /desktop/gnome/session /desktop/gnome/lockdown > screen-locking-debug.xml
Getting a log from gnome-screensaver
The following command will make gnome-screensaver dump debugging information to a log file:
$ killall gnome-screensaver $ gnome-screensaver --no-daemon --debug 2>&1 | tee ~/gnome-ss.log
Getting an xtrace log from gnome-screensaver
The following command will xtrace the gnome-screensaver process to a log file:
$ killall gnome-screensaver $ xtrace -D:9 -d:0 -k 2>&1 | tee ~/xtrace-gss.log $ DISPLAY=:9.0 gnome-screensaver
Debugging procedure
The following procedure can help in diagnosing screen locking issues:
- Check the gnome-screensaver preferences by starting System/Preferences/Screensaver. Make sure "Activate screensaver when computer is idle" is checked. Make sure "Lock screen when screensaver is idle" is checked. Make sure the slider is set to a reasonable amount of time, such as 5 minutes. Select "Blank screen" as the screensaver theme to make sure one of the themes is not making gnome-screensaver crash.
- Reboot the computer and log in.
- Check if the gnome-screensaver daemon is running either by using "ps" on the command line, or by using System/Administration/System Monitor and looking in the Processes tab. Make sure gnome-screensaver is running under your user. If gnome-screensaver is not running, screen locking will not work. You can use "gnome-screensaver --debug" on the command line to try and figure out why. You can also check to see if the /etc/xdg/autostart/gnome-screensaver.desktop file is there and is still enabled.
- Wait the required timeout without touching the keyboard and mouse, and without having any applications or menus open.
- If the screensaver does not come up after the timeout has passed, try and trigger it manually by pressing Ctrl-Alt-L, and by selecting "Lock Screen" from the Session menu.
Check that gnome-screensaver is running (pidof gnome-screensaver)
Check that gnome-power-manager is running (pidof gnome-power-manager)
Check that gnome-session is running (pidof gnome-session)
Check inhibition state of gnome-screensaver (gnome-screensaver-command --query)
Check if manual activation of screensaving works (gnome-screensaver-command -a)
- If manual activation works, the idle timer may not be functioning, check the logs of gnome-screensaver itself directly:
pkill gnome-screensaver
gnome-screensaver --no-deamon --debug 2>&1 | tee ~/g-ss.log
- If manual activation works, the idle timer may not be functioning, check the logs of gnome-screensaver itself directly:
Report any findings in your bug report.
How to Forward
If you think that a bug needs to be forwarding upstream, please have a look at Bugs/Upstream/GNOME where you can find instructions on how to do it.
Known bugs
List of known issues with gnome-screensaver:
Open
Bug |
Subject |
Symptom |
screensaver doesn't start immediately after being enabled |
When screensaver is activated with the control panel, it doesn't activate until system is rebooted. |
Closed
Bug |
Subject |
Symptom |
gnome-screensaver not functioning |
Inhibitors would not be cleaned up properly if the application that set them dropped off the bus. |
gnome-screensaver cannot grab keyboard or mouse
gnome-screensaver will not activate if an applications grabs keyboard and mouse focus.
This happens most noticeably with GTK context menus. If a context or panel menu is open, it grabs the pointer and gnome-screensaver never activates. It is also an issue for applications such as VNC, virt-manager, VirtualBox, Remote Desktop Viewer, Terminal Server Client, gnome-keyring, password dialogs, etc.
This problem is quite difficult to solve and there is currently no solution to this issue.
Bug |
Subject |
screen doesn't lock when panel menu is open |
|
try harder to break grabs |
|
Does not activate screensaver if menu is open |
gnome-screensaver under XFCE (xubuntu, mythbuntu)
Under a XFCE desktop (including xubuntu and mythbuntu), gnome-screensaver never activates after the idle timeout expires.
gnome-screensaver in Karmic and later uses gnome-session's idle signal, instead of using it's own idle watcher. Xubuntu doesn't use gnome-session, so gnome-screensaver doesn't work properly.
Bug |
Subject |
gnome-screensaver doesn't activate under XFCE |
|
gnome-screensaver not activated |
|
Reliance on gnome-session |