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 693149 - idle-delay value ignored when locked
idle-delay value ignored when locked
Status: RESOLVED NOTABUG
Product: gnome-screensaver
Classification: Deprecated
Component: daemon
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-screensaver maintainers
gnome-screensaver maintainers
Depends on:
Blocks:
 
 
Reported: 2013-02-04 16:36 UTC by Jake Allen
Modified: 2014-01-08 21:45 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jake Allen 2013-02-04 16:36:27 UTC
In attempting to set the screensaver to lock after 'x' number of seconds, setting idle-delay and locking the value, that value is ignored. Unlocking the value enables the screensaver after the duration of idle-delay.

Under certain situations this can also cause the screen to blank out and appear locked, but mouse/keyboard activity results in returning straight to the desktop and not to the unlock dialog (even with /org/gnome/desktop/screesaver/lock-delay set to 0)

Environment:
 - Ubuntu 12.04.2 LTS (precise)
 - gnome-screensaver v3.4.1

Steps to reproduce:
1. Lock the value of /org/gnome/desktop/session/idle-delay by setuping up dconf as outlined at https://live.gnome.org/dconf/SystemAdministrators, specifically

$ mkdir -p /etc/dconf/profile
$ mkdir -p /etc/dconf/db/local.d
$ mkdir -p /etc/dconf/db/site.d/locks

$ cat /etc/dconf/profiles/user
user-db:user
system-db:local
system-db:site

$ cat /etc/dconf/db/site.d/screensaver
[org/gnome/desktop/session]
idle-delay=10

$ cat /etc/dconf/db/site.d/locks/screensaver
/org/gnome/desktop/session/idle-delay

2. Run `dconf update` to updates these changes.

3. Verify that /org/gnome/desktop/session/idle-delay is locked (`dconf watch /` and then attempt to modify the value.)

4. Notice that after 10 seconds the screensaver does not activate nor does the screen begin to fade (indicating that it will soon lock).

5. Remove both `screensaver` files created above and update dconf again.

6. Manually set /org/gnome/desktop/session/idle-delay to 10 seconds.

7. Observe that after 10 seconds the screensaver appears.
Comment 1 Jake Allen 2013-02-11 13:06:03 UTC
Looking closer this may be a gsettings issue.

https://bugs.launchpad.net/ubuntu/+source/glib2.0/+bug/1122028
Comment 2 Allison Karlitskaya (desrt) 2013-02-11 14:47:12 UTC
GSettings schemas are very strict.  The type of the value in the database must match directly, or it is ignored (and the default value as per the schema is taken).

In this case, the expected type is a uint32, but you have a (signed) int32 in the database.

Try like this:

idle-delay=uint32 10

and it should work.

Please reopen this bug if that doesn't fix it.
Comment 3 dax 2014-01-08 21:39:49 UTC
(In reply to comment #2)

> Try like this:
> 
> idle-delay=uint32 10
> 
> and it should work.
> 
> Please reopen this bug if that doesn't fix it.

Got bit by this today.

This is a conf file, not a programming language. Shouldn't the "principle of least surprise" rule here?
Comment 4 Allison Karlitskaya (desrt) 2014-01-08 21:45:38 UTC
I can only tell you the technical reason that it is as it is: dconf doesn't have schemas, so it has no way to know what the correct type of this key is at the time that it compiles the database.

If it gets into the database with the wrong type, it will be ignored.

Could be an argument toward changing the type of this key in gnome-screensaver... or we could maybe reconsider attempting to fallback for mismatched types in dconf databases when we hit them with GSettings....