You are not logged in.

#1 2022-10-24 14:18:02

sashok_bg
Member
Registered: 2021-01-11
Posts: 14

[SOLVED] i3 suspend problem with logind

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

#2 2022-10-24 15:26:20

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,464

Offline

#3 2022-10-25 09:21:08

sashok_bg
Member
Registered: 2021-01-11
Posts: 14

Re: [SOLVED] i3 suspend problem with logind

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

#4 2022-10-25 11:37:39

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,464

Re: [SOLVED] i3 suspend problem with logind

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

Board footer

Powered by FluxBB