GreninjaShuriken4
GreninjaShuriken4

Reputation: 57

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)

Here is what I have tried,

# 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 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,

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.

Upvotes: 0

Views: 117

Answers (0)

Related Questions