Screen Locking with Plasma 5

Greetings! I don't seem to be able to get plasma5 (5.16.5) on 12.0 to automatically trigger screen locking on the configured timeout. Hopefully someone else has had the same issue and has already figured this one out because I haven't been able to turn up any relevant information or even where it might be stashing logs on FreeBSD. Locking the screen with the keyboard shortcut works fine, DPMS triggered by plasma is another issue but it's working fine if managed directly with xset. Any clues where to look?
 
Hi microshaft,

There are two places where you can look to configure what you want. I took the liberty to take individual screenshots and circle the options. I believe you might want to set the Lock Screen: Automatically after: value higher than the Switch off after value to lock screen after automatic DPMS is triggered. Even though I currently use Plasma 5.17.2, this should still be applicable to your version.

7148
7149
 
I've got both of them set to the defaults as shown above and still no dice. I'll try setting the lock screen to a value higher than the DPMS control under energy savings to see if that fixes it. (Bummer that plasma5 only supports DMPS running on wayland.)
 
Please let me know if doing the latter works for you. Otherwise, bummer. 😢
 
I've got both of them set to the defaults as shown above and still no dice. I'll try setting the lock screen to a value higher than the DPMS control under energy savings to see if that fixes it. (Bummer that plasma5 only supports DMPS running on wayland.)
It isn't working due to a bug in SDDM, so the session isn't set as 'active'. You can check that with this command:
ck-list-sessions
A workaround I've found consists in creating a file named 40-wheel-group.rules under /usr/local/etc/polkit/rules.d/ with this content:
Code:
polkit.addRule(function(action, subject) {
    if (subject.isInGroup("wheel")) {
        return polkit.Result.YES;
    }
});
Reboot, and now your plasma desktop should be able to auto-lock the screen, as well as display 'Shut Down', 'Restart', 'Sleep' in the Application Menu.
You will also be able to make changes that need administrator privileges, like disabling KDE Wallet.
More details here: View: https://twitter.com/patovm04_/status/1186802744956477440
 
It isn't working due to a bug in SDDM, so the session isn't set as 'active'. You can check that with this command:
ck-list-sessions
A workaround I've found consists in creating a file named "40-wheel-group.rules" under /usr/local/etc/polkit/rules.d/ with this content:
polkit.addRule(function(action, subject) {
if (subject.isInGroup("wheel")) {
return polkit.Result.YES;
}
});
Reboot, and now your plasma desktop should be able to auto-lock the screen, as well as display 'Shut Down', 'Restart', 'Sleep' in the Application Menu.
You will also be able to make changes that need administrator privileges, like disabling KDE Wallet.
More details here: View: https://twitter.com/patovm04_/status/1186802744956477440
Oh I didn't see this post. Thank you for sharing! 🤝
 
It isn't working due to a bug in SDDM, so the session isn't set as 'active'. You can check that with this command:
ck-list-sessions

Ah, sweet, good to know what the root cause is. I confirm that my session isn't flagged as active but had unfortunately already added the polkit rules as below to enable the shutdown/reboot actions.

Code:
_[/usr/local/etc/polkit-1/rules.d]_(root@host)_
# cat 40-local-wheel.rules 
polkit.addRule(function(action, subject) {
    if (subject.isInGroup("wheel")) {
        return polkit.Result.YES;
    }
});
 
Back
Top