I'm using manjaro (5.8.18-1-MANJARO) and the i3 window manager.

I'm trying to lock the screen then suspend activity after given amounts of idle time. I've found that xautolock should suit my needs using both the -locker and -killer flags. My i3 config contains the following :

exec --no-startup-id xautolock -time 5 -locker blurlock -notify 15 -notifier "notify-send 'Screen will lock in 15 s'" -detectsleep -killtime 60 -killer "systemctl suspend"

However, this doesn't seem to work:

  1. The locker part works fine, but system doesn't suspend after 60 minutes.
  2. If I suspend the system manually (I'm using a modified version of the i3exit script, the executed command is xautolock -locknow && systemctl suspend), then the system suspends again shortly after i resumed it. This behavior started very recently, I think after a system update, and I don't think I've changed anything else than the i3exit myself in system settings / config. I don't know what could be putting the system to sleep again since I don't have any power-manager activated to my knowledge.

Thanks for your help !


To answer part 1) then add the no-fork option to blurlock as below:

exec --no-startup-id xautolock -time 5 -locker 'blurlock -n' -notify 15 -notifier "notify-send 'Screen will lock in 15 s'" -detectsleep -killtime 60 -killer "systemctl suspend"

As blurlock is built on top of i3lock this will pass the following option (according to the i3lock man page):

-n, --nofork Don't fork after starting.

Which I find rather cryptic, and wouldn't have figured out myself if if not for a similar question on the Arch forum.

  • Thanks, this solved part 1, and somehow part 2 is also solved. Maybe I tweaked something else that fixed the thing. Thanks ! – Raphaël Ventura Feb 15 at 18:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.