You are not logged in.

#26 2019-01-27 22:10:25

prosoitos
Member
Registered: 2018-03-31
Posts: 69
Website

Re: [SOLVED] Systemd-logind triggers idle action when laptop is active

Ah.

sudo qdbus --system org.freedesktop.login1 /org/freedesktop/login1/seat/seat0 org.freedesktop.login1.Seat.IdleHint

is set to "true".

I am not sure how to set it to "false"...

Offline

#27 2019-01-27 22:15:17

prosoitos
Member
Registered: 2018-03-31
Posts: 69
Website

Re: [SOLVED] Systemd-logind triggers idle action when laptop is active

I reset:

IdleAction=hybrid-sleep
IdleActionSec=30min

in my logind file. The system now goes to hybrid-sleep (since I have set my swap file), but the problem is still there.

Of note though, contrary to that issue for which you sent me a link, when the laptop is in use, it does not take IdleAction based on "IdleActionSec" (for instance, I have just used it for about an hour when the first inappropriate IdleAction took place). While I never looked at the time, it did feel that these sleep events were quite random and chaotic, not evenly spaced in time every half hour. So things are a little different from what that person was describing.

Last edited by prosoitos (2019-01-27 22:16:44)

Offline

#28 2019-01-27 22:29:43

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

Re: [SOLVED] Systemd-logind triggers idle action when laptop is active

qdbus --system org.freedesktop.login1 /org/freedesktop/login1/session/self org.freedesktop.login1.Session.SetIdleHint false

(That should basically be what the comment on the sway bug does, but i've no experience w/ gdbus)

You can obviously not rely on the IdleAction if you tell the system not to rely on th IdleHint.
An interesting aspect might be when the IdleHint value changes from false to true after the system start. This might not only explain the chaotic timing, but also provide you an idea what might alter the value (which is important, since that's going to pollute the system over and over again)

Offline

#29 2019-01-27 22:40:07

prosoitos
Member
Registered: 2018-03-31
Posts: 69
Website

Re: [SOLVED] Systemd-logind triggers idle action when laptop is active

Thanks. I set it to false, rebooted and it is still false.

I will check once in a while and see whether/when it changes to true.

Last edited by prosoitos (2019-01-27 22:40:26)

Offline

#30 2019-01-27 23:43:38

prosoitos
Member
Registered: 2018-03-31
Posts: 69
Website

Re: [SOLVED] Systemd-logind triggers idle action when laptop is active

My laptop went to hybrid-sleep. It stayed idling for some time, so this may have been a valid sleep event (I am not certain it was 30 min, but it might well have been).

Upon waking it up,

sudo qdbus --system org.freedesktop.login1 /org/freedesktop/login1/seat/seat0 org.freedesktop.login1.Seat.IdleHint

was "true".

So could it be that a first (legitimate) sleep event is the trigger?

Surprisingly, running the command

qdbus --system org.freedesktop.login1 /org/freedesktop/login1/session/self org.freedesktop.login1.Session.SetIdleHint false

does not bring it back to false.

Offline

#31 2019-01-28 00:14:18

prosoitos
Member
Registered: 2018-03-31
Posts: 69
Website

Re: [SOLVED] Systemd-logind triggers idle action when laptop is active

Since the value remained to true, I had another unwanted sleep event.

Woke up the machine, still could not change the value back to false.

Rebooted and the value had been reset to false automatically.

I know absolutely nothing about dbus and am very confused about where to go from there (except for the not great fix of disabling ActionIdle and using xautolock for my genuine sleep events).

Last edited by prosoitos (2019-01-28 00:15:04)

Offline

#32 2019-01-28 00:43:15

prosoitos
Member
Registered: 2018-03-31
Posts: 69
Website

Re: [SOLVED] Systemd-logind triggers idle action when laptop is active

Well, something else flipped that setting to true as it flipped and I had another unwanted sleep event without a genuine sleep event this time.

I am giving up on this. Disabling ActionIdle and using xautolock sad

Last edited by prosoitos (2019-01-28 00:43:49)

Offline

#33 2019-01-29 02:25:15

prosoitos
Member
Registered: 2018-03-31
Posts: 69
Website

Re: [SOLVED] Systemd-logind triggers idle action when laptop is active

xautolock works very nicely to get my machine to hybrid sleep after my chosen idle time. So with "IdleAction=ignore" in logind file and xautolock, I am set.

Maybe not the cleanest fix, but that'll do. Thank you very much for your help and time @seth.

Offline

#34 2019-01-31 05:55:31

prosoitos
Member
Registered: 2018-03-31
Posts: 69
Website

Re: [SOLVED] Systemd-logind triggers idle action when laptop is active

I just noticed this error in my dmesg and I was wondering whether it may be linked with my idle issue?? Seems a common problem on Dell Latitude machines.

i801_smbus 0000:00:1f.3: Failed to enable SMBus PCI device (-16)

.

Offline

#35 2019-01-31 09:11:21

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

Re: [SOLVED] Systemd-logind triggers idle action when laptop is active

I don't see how that would cause false IdleHints (at least not directly) - does lmsensors report everything (temp, voltage, battery, fan, stuff) as expected?
What exactly is 0000:00:1f.3 (lspci)?

Offline

#36 2019-02-05 22:15:49

prosoitos
Member
Registered: 2018-03-31
Posts: 69
Website

Re: [SOLVED] Systemd-logind triggers idle action when laptop is active

I don't see how that would cause false IdleHints (at least not directly)

I was just wondering, but I am very ignorant. So it was just a mis-informed comment. No idea what "0000:00:1f.3" is. And lm_sensors seems fine.

Offline

#37 2019-02-05 22:24:37

prosoitos
Member
Registered: 2018-03-31
Posts: 69
Website

Re: [SOLVED] Systemd-logind triggers idle action when laptop is active

Now, I think that I figured out what the problem is: I posted an issue on EXWM (my window manager), quoting:

Your DE needs to inform logind about when it is idle or not, logind cannot figure that out on its own. GNOME and KDE do this correclty. Please file a bug against your DE of choce.

from https://bugs.freedesktop.org/show_bug.cgi?id=77671.

But it was entirely my ignorance: EXWM is only a window manager, and not a DE. So my problem was coming from the fact that I simply do *not* have a DE. So I will mark this thread as solved.

But now, I have the following question:

Now that I am happy with xautolock triggering sleep events after x min of inactivity and now that I don't have any issue of unwanted sleep events since I disabled IdleAction for systemd-logind, should I install a DE or is it ok to keep things as they are?

Things work fine, but it may be that without a DE, all sorts of things are not set very properly?

Basically, I am debating between keeping things as they are or installing something like https://github.com/WJCFerguson/exwm-gnome-flashback and I would appreciate any comment/advice on the necessity (or not) of a DE.

It may simply be a question of preference, but maybe there are key elements about a DE that I am not aware of. Reading the Arch Wiki, it sounded that a DE would mostly provide for things that I don't need or already have set individually.

Thank you!

Last edited by prosoitos (2019-02-05 22:36:48)

Offline

#38 2019-02-05 22:49:47

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

Re: [SOLVED] Systemd-logind triggers idle action when laptop is active

You don't need a "desktop environment" (which is a pretty unsharp description for a collection of window manager, "desktop" 'n stuff) and nothing technically prevents a window manager or anything from informing systemd - they might just deem this to be out of scope (or the entire approach stupid)

TDM is a display manager ("DM", something that allows you to select a session type and logs you in), not a desktop environment.

I also randomly googled up https://unix.stackexchange.com/question … ity/144376 for a more generic idlehint daemon (though it uses xscreensaver) - also seee the follow up link on the bottom.

Offline

#39 2019-02-06 02:08:00

prosoitos
Member
Registered: 2018-03-31
Posts: 69
Website

Re: [SOLVED] Systemd-logind triggers idle action when laptop is active

Thank you for the additional info (and all your time) @seth. I think that I will remain without a DE for now then.

Offline

Board footer

Powered by FluxBB