Wadewilson n00b
Joined: 09 Nov 2022 Posts: 54
|
Posted: Thu Aug 29, 2024 1:33 pm Post subject: Issues with elogind auto-lock and auto sleep |
|
|
I have a laptop. I use openrc init system and hence use a elogind service to manage my X session instead of systemd.
I want to achieve the following when the user is inactivity for total time of 7 mins,(also the laptop is not connected t)
- Trigger screensaver(blank screen == dpms off) after 180 secs (3 mins mark)
- Trigger slock locker utility after the next 120 secs and not wake the screen again (5 mins mark)
- Get the laptop to sleep after the next 120 secs (7 mins mark)
Here is what I have tried,
Code: |
# Set screensaver after 3 mins of inactivity, Lock screen on elogind events, Lock screen after 5 mins of inactivity.
xset s on &
xset s 180 120 &
xss-lock slock &
xautolock -locker slock -detectsleep -corners +-00 &
|
The above code snippet is taken from this https://wiki.archlinux.org/title/Session_lock#DPMS arch wiki. As expected the screen locks after 5 mins. But there is no blank screen or my laptop screen does not turn off after 3 mins.
What I understand from this and some other random experiments is that as soon as the screensaver is triggered, the locker utility is triggered.
Also tried this solution suggested in reddit,
Code: |
xset s on &
xss-lock slock &
xautolock -time 5 -locker "xset s activate; xset dpms force off " -detectsleep -corners +-00 &
|
But this does not satisfy my requirement, but this is something that I am using currently as it working as expected.
Can anyone suggest what is wrong with the commands I have used?
Furthermore, I would like to know how to achieve the 3rd requirement. |
|