You are not logged in.
Pages: 1
Hello,
I am using i3 on my arch installation that I am starting with "startx" from TTY.
I have configured screen lock / dimming / turning off using "xset s", "xss-lock" and "i3lock" and it works fine.
I would however like to add a suspend function on top of that and from what I understood I needed to un-comment the lines below in /etc/systemd/logind.conf
#IdleAction=suspend
#IdleActionSec=30min
The problem:
Now my pc suspends every 30 minutes regardless of activity.
My debugging:
It turns out my session is TTY and there are no "acrtivity hints" being sent to systemd.
~ loginctl
SESSION UID USER SEAT TTY
1 1000 alexander seat0 tty1
What would be the correct way of starting i3 so that activity hints work ?
I am unable to understand the second part of https://wiki.archlinux.org/title/i3#Starting - is this the way to go ?
Alternative solution?: How to achieve "suspend on 30 minutes" without systemd ?
Best Regards
Alexander
Last edited by sashok_bg (2022-10-25 12:09:55)
Offline
https://unix.stackexchange.com/question … ng-a-deskt
Alternatively use xautolock (it can run anything, see eg. https://wiki.archlinux.org/title/Session_lock#xautolock
Offline
Hello,
Thank you for your quick response.
I have installed xautolock and now I run it from my .xinitrc and it seems to work perfectly fine !
Is xautolock a replacement for i3lock / xss-lock ?
Now I have these two lines in my .xinitrc and it seems strange to have two lock programs running:
xss-lock -n ~/.local/bin/display_dim.sh -- i3lock -n --image /usr/share/backgrounds/archlinux/awesome.png -f &
xautolock -time 15 -locker "systemctl suspend" -detectsleep &
Thank you again for your help.
Best Regards
Offline
xautolock is despite the name a generic "do something after some idle" tool - it can invoke lockers like i3lock (do yourself a favor and look at https://aur.archlinux.org/packages/i3lock-color ) or suspend the system.
It's similar to xss-lock, but that acts whenever the X11 screensaver gets triggered, what means you have effectively one opportunity to make it do stuff, while you can run multiple independent xautolock instances that all fire different stuff at different timeouts.
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
Offline
Pages: 1