Bug 136315 - After "Lock screen" has been used the screensaver gets started automatically/enabled
Summary: After "Lock screen" has been used the screensaver gets started automatically/...
Status: RESOLVED DUPLICATE of bug 76008
Alias: None
Product: kscreensaver
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kscreensaver bugs tracking
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-25 21:45 UTC by Daniel Hahler
Modified: 2008-05-19 17:59 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Fixes X screensaver being turned on (1.66 KB, patch)
2006-11-05 17:15 UTC, Nick Warne
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Hahler 2006-10-25 21:45:40 UTC
Version:            (using KDE KDE 3.5.5)
Installed from:    Ubuntu Packages

After "Lock Session" from K Menu has been used, the screen saver behaves like if set to "Start automatically" in "Desktop / Screen Saver".

This means, that after having locked the Session/desktop or used "Hibernate to disk" the screen saver is activated.

BUT it's not the configured one ("MatrixView (GL)" in my case), but the blank one (sometimes displaying the white X logo).

This can either be fixed by "xset s off" or changing some setting in the "Screen Saver" kcontrol module and applying the "changes". I say "changes", because "Start automatically" is not checked in this case, though it seems to be internally to KDE/kscreensaver.

I've initially filed the bug for Ubuntu here: https://launchpad.net/bugs/65734 (with more detailed info while I was debugging it)
Comment 1 Nick Warne 2006-11-05 14:45:31 UTC
I can confirm this - screensaver starts whether 'start automatically' is checked or not.  It is the X screensaver starts with the 'white X' also.

'xset s off' has to be applied to stop it each time - sometimes it gets set to start again without doing anything, so I guess something else sets screensaver to be on.

Nick
Comment 2 Nick Warne 2006-11-05 14:50:09 UTC
Edit:  I have never seen this behaviour in KDE 3.5.1, .2, .3 or .4

Nick
Comment 3 Nick Warne 2006-11-05 15:23:10 UTC
OK, this is a kde 'lock session' bug.

xset s off

xset q

Screen Saver:
  prefer blanking:  no    allow exposures:  yes
  timeout:  0    cycle:  600


Now I lock session...
...
Now unlock session


xset q

Screen Saver:
  prefer blanking:  no    allow exposures:  yes
  timeout:  3610    cycle:  600



It has reset timeout to 3610.



I guess this is in kdebase-3.5.5/kdesktop/lockeng.cc

Nick
Comment 4 Nick Warne 2006-11-05 15:54:54 UTC
OK, a bit more on this.

The 'automatically start' value in kde screensaver settings can never be 0.  Therefore, even if 'start automatically' is unchecked (i.e. OFF), there is still a value.

Now, in kdebase-3.5.5/kdesktop/lockeng.cc

204: mTimeout = KDesktopSettings::timeout();

but what happens is Xscreensaver settings are saved:

41:     // Save X screensaver parameters
    XGetScreenSaver(qt_xdisplay(), &mXTimeout, &mXInterval,
                    &mXBlanking, &mXExposures);

and later on, when xscreensaver settings are restored, the timeout value is restored from KDE timeout value, which as explained, will always be 1 or greater EVEN if 'start automatically' is OFF.


308.323:        XSetScreenSaver(qt_xdisplay(), mTimeout + 10, mXInterval, DontPreferBlanking, mXExposures);

etc. etc.

So, I dunno if the should be mxTimeout restored here, or whether the value in the KDE screensaver section should allow a 0 factor;  but then I don't undersatnd why + 10 gets added. either?

Still, just remembering to 'set s off' after unlocking fixes this for the minute.

Nick
Comment 5 Nick Warne 2006-11-05 17:15:51 UTC
Created attachment 18416 [details]
Fixes X screensaver being turned on


Here's a patch that fixes this problem - this assumes that if a user uses KDE
screensaver with 'lock session' then they do not use X screensaver.

Nick
Comment 6 Daniel Hahler 2007-04-04 00:24:34 UTC
Can someone check this for 3.5.7, please?
Comment 7 Oswald Buddenhagen 2007-05-18 21:52:44 UTC

*** This bug has been marked as a duplicate of 76008 ***