Bug 357368 - Screen is not locked when resuming from suspend after upgrading to plasma 5.5.0
Summary: Screen is not locked when resuming from suspend after upgrading to plasma 5.5.0
Status: RESOLVED UPSTREAM
Alias: None
Product: kscreenlocker
Classification: Plasma
Component: general (show other bugs)
Version: 5.5.0
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-31 12:58 UTC by Dave Flogeras
Modified: 2016-01-04 22:42 UTC (History)
3 users (show)

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


Attachments
attachment-23561-0.html (93 bytes, text/html)
2016-01-01 04:43 UTC, Bhushan Shah
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Flogeras 2015-12-31 12:58:53 UTC
Worked with 5.4.3, but as of 5.5.0 (and 5.5.1), the screen remains unlocked after a suspend/resume cycle.  I even went into settings and unchecked the box, applied, then re-checked it and applied again just in case the setting backend was out of sync.

Reproducible: Always
Comment 1 Kai Uwe Broulik 2015-12-31 14:02:16 UTC
I cannot reproduce this unfortunately. The screen locks fine both when suspending manually and when it auto-suspends after a period of inactivity.
Comment 2 Dave Flogeras 2015-12-31 20:25:15 UTC
Hmm.  Perhaps it is a Gentoo packaging issue.  I have confirmed with other Gentoo folks that they do have the issue.  Has anything notable changed in terms of dependencies with the 5.5.x series?  I know that Gentoo broke kscreenlocker out into its own package as of 5.5.0.  Does this reflect an upstream refactor, or just Gentoo package management?  Any hints are appreciated and I will take it up with Gentoo.
Comment 3 Kai Uwe Broulik 2015-12-31 20:32:49 UTC
KScreenlocker has indeed been split into its own separate repository.
Comment 4 Dave Flogeras 2016-01-01 01:05:47 UTC
I should also add that I do not use systemd on the affected systems (I use openrc), did anything change in kscreenlocker that might be affected by this?
Comment 5 Kai Uwe Broulik 2016-01-01 01:09:57 UTC
There we have the culprit. I'm sorry, we require logind or console kit 2 (or any other service that provides these dbus services) since 5.5.
Comment 6 Dave Flogeras 2016-01-01 02:59:08 UTC
No, OpenRC on Gentoo does indeed use Consolekit2-1.0.0, which was pulled in when I installed plasma-5.5.0.  What else could I check?
Comment 7 Bhushan Shah 2016-01-01 04:43:50 UTC
Created attachment 96395 [details]
attachment-23561-0.html

Do screen locking in general works? Or just lock screen on resume is broken?
Comment 8 Dave Flogeras 2016-01-01 12:17:16 UTC
Good point.  Screen locking works fine if I press CTRL-ALT-L.

However, I noticed something else today which I didn't notice before because my screen usually blanks (or the machine hibernates) on this laptop before the 10minute screen locker timeout is reached.  I set the screen locking timeout to 1 minute, and disabled power management so the screen would not blank.  I waited 2 minutes and the screen did not lock on its own.

Finally, if I manually do the following:
qdbus org.kde.screensaver /ScreenSaver Lock

The screen does lock.
Comment 9 Kai Uwe Broulik 2016-01-01 13:00:23 UTC
Actually I'm not sure if the screenlocker supports Consolekit 2, PowerDevil does but locking on suspend has been moved to the screen locker. Should be trivial to add, however. Patches welcome :)
Comment 10 Dave Flogeras 2016-01-01 15:39:31 UTC
I would like to help, but would require some hand holding as I do not understand the design of the software.  For instance, I see in the logind.cpp there are multiple references to falling back to Consolekit if logind is not available.  Also, in ksldapp.cpp it seems to fallback to letting Solid send a signal if logind is not available.  Was the implementation started, but not plumbed in?  Or is this leftover from when it was broken out into its own package?

If someone gives me step by step instructions of what needs to be done, I can take a crack at it.  However, if it is trivial and just a matter of hooking up a few things it might be a waste of time explaining how to do vs just doing it.
Comment 11 Kai Uwe Broulik 2016-01-01 17:26:11 UTC
Nevermind, KScreenLocker supports the ConsoleKit 2 DBus interface. Looks like bug in ConsoleKIt 2 then. Please head over to https://github.com/ConsoleKit2/ConsoleKit2/issues and file an issue there. Thanks!
Comment 12 Dave Flogeras 2016-01-01 17:32:02 UTC
Can do, but before I do, does this also explain the issue that plasma doesn't lock after setting a 1 minute timeout?  Is that a totally different issue?  Shall I file a new bug?
Comment 13 Kai Uwe Broulik 2016-01-01 17:41:31 UTC
Oh, hmm, no, this is unrelated. Yes, please file a separate bug about this. It looks like something is broken on your system. :/
Comment 14 Dave Flogeras 2016-01-01 18:13:28 UTC
Upstream bug filed

https://github.com/ConsoleKit2/ConsoleKit2/issues/56
Comment 15 Dave Flogeras 2016-01-04 22:42:52 UTC
In case anyone else hits this, it seemed to be a Gentoo specific issue for upgraded legacy installations.  You can fix it by doing the following:

emerge -1a upower

This should replace the old power management package upower-pm-utils, which was a stopgap package the Gentoo folks created to side-step systemd a while back.  Nowadays, you can (and should) use upower directly even on non-systemd installations.  Hope this helps others struggling like I was.