You are not logged in.
I use i3wm as my window manager and I use i3lock as the screenlock application. And in my i3 config, I execute xss-lock:
exec --no-startup-id xss-lock --ignore-sleep i3lockI only want xss-lock react the lock event.
I'm sure xss-lock is running by the pgrep command.
And althou I use acpid to manage acpi events, I still use the logind.conf to manage system idle event. (I think system idle is not a acpi event)
So in my logind.conf, I have
IdleAction=lock
IdleActionSec=2minAnd by
systemctl status systemd-logind.service, Im sure the Idle event is sent:
Mar 06 22:11:31 X1carbon systemd-logind[286]: System idle. Doing lock operation.
Mar 06 22:14:01 X1carbon systemd-logind[286]: System idle. Doing lock operation.
Mar 06 22:16:31 X1carbon systemd-logind[286]: System idle. Doing lock operation.
Mar 06 22:18:31 X1carbon systemd-logind[286]: System idle. Doing lock operation.But xss-lock has no action... I don't where is the problem.
Of course I'm sure i3lock itself can work normally.
Anyone can give me a help? Thanks a lot.
Last edited by tea_niugnep (2021-03-06 17:14:23)
Offline
Do you run i3wm with a login manager or from a terminal?
I use lightdm and run xss-lock with:
exec --no-startup-id xss-lock -l -- i3lock -nYou can test it with
loginctl lock-sessionLast edited by progandy (2021-03-06 15:12:41)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
@progandy
Thanks for your advice!
yes, I run i3wm, but without a login manager, just use startx from terminal
I use your code in my i3 config, and by
loginctl lock-session, i3 lock started normally.
However, the xss-lock still has no response to SystemIdle event from systemd-logind.service, my laptop still can't start i3lock by xss-lock normally
I guess problem is from xss-lock? Maybe SystemIdle is also an ACPI event and should be handled by acpid?
Offline
IdleAction=
Configures the action to take when the system is idle. Takes one of "ignore",
"poweroff", "reboot", "halt", "kexec", "suspend", "hibernate", "hybrid-sleep",
"suspend-then-hibernate", and "lock". Defaults to "ignore".Note that this requires that user sessions correctly report the idle status to the
system. The system will execute the action after all sessions report that they are
idle, no idle inhibitor lock is active, and subsequently, the time configured with
IdleActionSec= (see below) has expired.
IdleAction is close to useless unless you use gnome (and maybe KDE)
Offline
Ok.. Thanks
So best way to listen system inactivity is to use xset with xss-lock? (not Gnome nor KDE)
Offline
Ok I use xautolock to implement the automatically screenlock after inactivity simply, thanks everyone
Offline
You should not need xautolock, set up the xorg screensaver (xset s ...) and xss-lock should react to it.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
As the link explains, you can have xss-lock respond to the screensaver or DPMS.
xautolock is an alternative approach to the problem, not a complementary.
Offline
Although solved, but I'm confused with that screen off after 10 minutes (I don't know how to describe it accurately, not lock nor sleep, just screen off, do anything the screen turns on)
This problem is related to DPMS or anything? Should I post a new title?
Offline
Probably. Check
xset q
xset -h
man xorg.confOffline
@seth
Again thanks a lot. I edit /etc/X11/xorg.conf/monitor.conf, and everything goes well.
Finally, I have a question. The DPMS process is blanking->standby->suspend->off, right? So is "DPMS suspend" independent to laptop suspend?
Offline
https://en.wikipedia.org/wiki/VESA_Disp … _Signaling
This has nothing to do with S3 f rom https://en.wikipedia.org/wiki/Advanced_ … _Interface
Offline
Also https://wiki.archlinux.org/index.php/Di … _Signaling
Note that DPMS was developed for CRT monitors, and on LCD displays, there is normally no difference between the standby, suspend and off modes.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
OK. Again thanks a lot.
Offline