Bug 353694 - Powerdevil does not automatically lock the screen when configured to do so
Summary: Powerdevil does not automatically lock the screen when configured to do so
Status: RESOLVED NOT A BUG
Alias: None
Product: ksmserver
Classification: Plasma
Component: lockscreen (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR major
Target Milestone: ---
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-08 21:54 UTC by Randy Barlow
Modified: 2019-02-12 21:06 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screen shot (57.49 KB, image/png)
2015-10-10 01:26 UTC, Randy Barlow
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Randy Barlow 2015-10-08 21:54:59 UTC
I have checked the box in the "Screen Locking" tab of the KDE settings for "Lock screen automatically after:" and set a value of 5 minutes. However, the screen never locks (unless I manually lock it with CTRL-ALT-L.

Reproducible: Always

Steps to Reproduce:
1. Configure KDE to automatically lock the screen after N minutes. (I have N=5.)
2. Wait N minutes.

Actual Results:  
The screen never locks, even after hours.

Expected Results:  
The screen should lock after N minutes of inactivity.

This may be related to https://bugs.kde.org/show_bug.cgi?id=352069, but that bug was complaining that *disabling* screen lock caused the lock to start. I've actually not tried that out, but if that's true perhaps the boolean is just interpreted backwards! I'll give this a try to confirm or disconfirm.

I'm running KDE on Fedora Rawhide:

% rpm -q powerdevil
powerdevil-5.4.2-1.fc24.x86_64

I chose major for severity since people might rely on the automatic screen lock to protect their computers.
Comment 1 Randy Barlow 2015-10-09 00:26:14 UTC
I tried disabling the setting for a while and the screen did not automatically lock, so I don't think it's a matter of misinterpreting the boolean value as I made a guess about earlier.
Comment 2 Martin Flöser 2015-10-09 06:17:31 UTC
Where did you configure that? Please explain precisely as powerdevil should not have such an option anymore
Comment 3 Randy Barlow 2015-10-10 01:26:09 UTC
(In reply to Martin Gräßlin from comment #2)
> Where did you configure that? Please explain precisely as powerdevil should
> not have such an option anymore

Hi Martin!

I am not 100% confident it is powerdevil, so apologies if I've made a mistake there. The setting I'm talking about can be found by clicking KDE Menu --> System Settings --> Desktop Behavior --> Screen Locking. Is that powerdevil? If not, can you help me recategorize this bug report?
Comment 4 Randy Barlow 2015-10-10 01:26:53 UTC
Created attachment 94924 [details]
Screen shot

Here is a screen shot of the settings I am having trouble with.
Comment 5 Martin Flöser 2015-10-12 05:53:17 UTC
The mechanism in general works. There are two possible areas which might it block:
* inhibitions
* KIdleTime broken

There is no complete way to check the inhibitions on the screen locker, but we can see the inhibitions on powerdevil which in turn inhibits the screen locker. So please check in the Battery applet whether there are inhibitions listed.

KIdleTime is more difficult to verify. At least I'm not aware of any way. There is a tool in the source code, but that needs to be compiled.
Comment 6 Rex Dieter 2015-10-12 14:37:29 UTC
This can list all active inhibitors too:
$ systemd-inhibit --list
Comment 7 Martin Flöser 2015-10-12 14:46:18 UTC
(In reply to Rex Dieter from comment #6)
> This can list all active inhibitors too:
> $ systemd-inhibit --list

those are irrelevant for the screen locker case.
Comment 8 Rex Dieter 2015-10-12 16:23:40 UTC
But isn't that the same as those listed by the battery applet, the ones you suggested checking?
Comment 9 Rex Dieter 2015-10-12 16:25:54 UTC
Nevermind me, just tried,and I see that it indeed does not list those things from battery applet (like media player inhibitors)
Comment 10 Randy Barlow 2015-11-22 17:22:12 UTC
I wanted to note that I recently reinstalled this same machine with Fedora 23 instead of Rawhide and the issue is still present. When I reported this issue I was running 5.4.2, but I am now running 5.4.3:

$ rpm -q powerdevil
powerdevil-5.4.3-1.fc23.x86_64

Do you believe it is an application that I run that is causing this? Is there a way to query for applications that powerdevil is yeilding to? If so, I'd be happy to dig in if you can give me some instructions.
Comment 11 Rex Dieter 2015-11-22 19:07:08 UTC
Yes, it is possible for applications to inhibit the screensaver (notably media players).  I don't recall if there is a way to query what those are.
Comment 12 Rex Dieter 2015-11-22 19:08:28 UTC
Oh, read comment #9, the battery applet should list applications that are actively inhibiting
Comment 13 Randy Barlow 2015-11-25 17:19:05 UTC
Hi again Rex,

Now I am noticing that sometimes my screen does lock and sometimes it does not. I am convinced enough that it may be an application that is hindering it, so I feel good to close this bug for now.

However, I haven't been able to figure out how to get the battery applet to tell me if something is inhibiting. I tried hovering the mouse and opening it, but I didn't see any such lists. What action do you perform to see that list? Thanks for your assistance, and sorry for the noise!
Comment 14 Rex Dieter 2015-11-25 18:45:32 UTC
One specific example I used:

run some media player and show a video (I used dragon, vlc as examples) or amarok and play audio,  now click on the battery applet.

along with stuff like display brightness slider, battery status, should be listed something like:

(checkbox) Enable power management
   Amarok is currently suppressing powermanagement: Amarok is currently playing a track