You are not logged in.
I configured my notebook to shut the display off after 5 minutes with dpms, that's working fine.
Systemd suspend over power button, configured in logind.conf, also works. Then I set it to suspend after 10 mins of inactivity, but it never does. The problem is, I don't even know where to start to look - does anyone know how systemd detects idle state?
Last edited by fledermann (2019-02-02 10:32:09)
Offline
man 5 logind.conf 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.Online
I saw that, but that message is very unspecific. What sessions do report idle status? DM sessions? Apparently not, because both lightdm (or lightlocker with --idle-hint) and sddm fail to do so.
I see no config option for sddm regarding idle hints. loginctl tells me about my active session and the missing idlehint:
Id=2
User=1000
Name=
Timestamp=Thu 2019-02-07 15:08:58 CET
TimestampMonotonic=12319666
VTNr=1
Seat=seat0
Display=:0
Remote=no
Service=sddm
Desktop=i3
Scope=session-2.scope
Leader=8232
Audit=2
Type=x11
Class=user
Active=yes
State=active
IdleHint=no
IdleSinceHint=0
IdleSinceHintMonotonic=0
LockedHint=noGoogle isn't exactly helpful either.
Last edited by fledermann (2019-02-07 14:44:19)
Offline
Gnome does. Maybe KDE.
I don't think any other process ever supported this.
Display managers are by definition no sessions ;-)
Online
Hm, that's too bad. I wouldn't have thought it to be impossible to send my laptop to sleep when idle without using gnome or KDE.
The xss-lock manpage says:
Also, xss-lock manages the idle hint on the login session. The idle state of the session is directly linked to user activity as reported by X (except when the notifier runs before locking the screen). When all sessions are idle, the login manager can take action (such as suspending the system) after a preconfigured delay.
But that doesn't work either. xss-lock appears to be long dead, and there is an open issue regarding idle-hinting.
Offline
Of course that's not "impossible", but you asked about systemd's IdleHint.
You can eg. use xautolock to execute random stuff after some idle time.
Online
Hm, that's too bad. I wouldn't have thought it to be impossible to send my laptop to sleep when idle without using gnome or KDE.
This is the problem with effective monopolies (or duopolies). The 2 big DEs are being developed to cater to systemd users, and systemd developed to cater to users of the big DEs. It results in a complete breakdown of modularity.
That said, there is no need to use all these features of systemd targeted at Gnome users - if you don't they are just needless bloat, but no harm. There are countless other ways to suspend after some idle time ... basically all the ones that existed before systemd added this DE-only feature.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
One working tool for the job would be great, that's why I hoped for systemd. Also, xautolock et al have a lot of shortcomings (not detecting video playback for example).
dpms does detect media playback, so I think I'll use a wrapper script.
Thanks for the help.
Offline
not detecting video playback for example
Depends on the video player. mpv/mplayer certainly inhibit it.
Online