You are not logged in.

#1 2015-04-16 23:37:00

etoixpi
Member
Registered: 2015-04-16
Posts: 8

[SOLVED]GNOME/logind not correctly registering system inactivity

I'm running GNOME/systemd/logind in the standard configuration. Nothing special. I have set GDM to start on boot.

I set up my /etc/systemd/logind.conf as follows:


...
# See logind.conf(5) for details
[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
HandleLidSwitch=ignore
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=no
#RuntimeDirectorySize=10%
#RemoveIPC=yes
IdleAction=suspend
IdleActionSec=1min

After I log in to GNOME systemd-logind seems to ignore my activity regardless of what I am doing and suspend the system after 1 minute anyway, even as I am actively using the machine. I have no automatic suspend options set for my gnome user or for GDM. I do not have acpid or any other power service running(that I know of).

Here is the output of journalctl -u systemd-logind:

-- Logs begin at Sun 2015-04-12 21:34:46 MDT, end at Thu 2015-04-16 17:28:19 MDT. --
Apr 16 17:12:24 habanero systemd-logind[339]: Watching system buttons on /dev/input/event3 (Power Button)
Apr 16 17:12:24 habanero systemd-logind[339]: Watching system buttons on /dev/input/event1 (Lid Switch)
Apr 16 17:12:24 habanero systemd-logind[339]: Watching system buttons on /dev/input/event2 (Sleep Button)
Apr 16 17:12:24 habanero systemd-logind[339]: Watching system buttons on /dev/input/event4 (ThinkPad Extra Buttons)
Apr 16 17:12:24 habanero systemd-logind[339]: New seat seat0.
Apr 16 17:12:24 habanero systemd-logind[339]: Watching system buttons on /dev/input/event10 (Video Bus)
Apr 16 17:12:25 habanero systemd-logind[339]: New session c1 of user gdm.
Apr 16 17:12:32 habanero systemd-logind[339]: New session c2 of user matt.
Apr 16 17:13:29 habanero systemd-logind[339]: System idle. Taking action.
Apr 16 17:13:29 habanero systemd-logind[339]: Suspending...
Apr 16 17:13:34 habanero systemd-logind[339]: Delay lock is active (UID 120/gdm, PID 470/gnome-shell) but inhibitor timeout is reached.
Apr 16 17:13:41 habanero systemd-logind[339]: Operation finished.

Is this a problem with GNOME and logind communicating idle status properly? Is this a GNOME bug? Could it be a systemd bug? Or am I just not using things correctly?

Can someone tell me how to set up my system so that logind accurately detects inactivity and suspends accordingly? Or if this is a bug can someone help me figure out if I should report it to gnome or systemd?

Thank you,
NEGATIVE1

Last edited by etoixpi (2015-04-19 20:01:25)

Offline

#2 2015-04-17 00:02:41

etoixpi
Member
Registered: 2015-04-16
Posts: 8

Re: [SOLVED]GNOME/logind not correctly registering system inactivity

Been doing some reading. It looks like systemd is looking for an inhibitor lock to be but in place by GNOME according to this page:
https://wiki.freedesktop.org/www/Softwa … d/inhibit/

The arch wiki even states that the gnome power management daemon should issue the appropriate locks to work with systemd:
https://wiki.archlinux.org/index.php/Power_management

I still have no idea how to fix this...

Offline

#3 2015-04-17 00:18:12

etoixpi
Member
Registered: 2015-04-16
Posts: 8

Re: [SOLVED]GNOME/logind not correctly registering system inactivity

It's also noteworthy that I don't have the "gnome-power-manager" package installed. From reading the docs I don't see why I should need it? But the gnome docs don't seem to be up to date - their stuff seems to be from gnome2.

Offline

#4 2015-04-17 00:43:42

mwillems
Member
Registered: 2014-08-09
Posts: 93

Re: [SOLVED]GNOME/logind not correctly registering system inactivity

etoixpi wrote:

The arch wiki even states that the gnome power management daemon should issue the appropriate locks to work with systemd

etoixpi wrote:

It's also noteworthy that I don't have the "gnome-power-manager" package installed. From reading the docs I don't see why I should need it? But the gnome docs don't seem to be up to date - their stuff seems to be from gnome2.

I think you answered your own question.  gnome-power-manager is the gnome power management daemon referred to by the wiki.  From the docs:

The GNOME Power Manager session daemon is a power management daemon for the GNOME desktop

Offline

#5 2015-04-17 01:42:03

etoixpi
Member
Registered: 2015-04-16
Posts: 8

Re: [SOLVED]GNOME/logind not correctly registering system inactivity

mwillems wrote:

I think you answered your own question.  gnome-power-manager is the gnome power management daemon referred to by the wiki.  From the docs:

Tried installing it. No change. Also, gnome's power management settings like auto-suspend work just fine with out it. It only seems to provide some graphical utilities for tracking power statistics.

Offline

#6 2015-04-19 19:54:13

etoixpi
Member
Registered: 2015-04-16
Posts: 8

Re: [SOLVED]GNOME/logind not correctly registering system inactivity

Here is the solution:

It looks like systemd-logind simply conflicts with GNOME for this setting. To be clear my desired functionality is to have GDM auto-suspend after a set interval if no one logs in and there is no activity. Here is how to make that happen:

Edit /etc/systemd/logind.conf as follows:

# File :  /etc/systemd/logind.conf
....
#IdleAction=suspend
#IdleActionSec=1min
....

These two lines MUST be commented out to prevent a suspend timeout conflict with GNOME.

Then add the following files for the dconf database:

mkdir -p /etc/dconf/profile && touch /etc/dconf/profile/user && touch /etc/dconf/profile/gdm

Edit /etc/dconf/profile/gdm:

# File : /etc/dconf/profile/gdm
user-db:gdm
system-db:local

Edit /etc/dconf/profile/user: I'm not sure this file is strictly necessary, but it's what they used in the gnome documentation.

# File : /etc/dconf/profile/user
user-db:user
system-db:local

Make a file for the power settings:

mkdir -p /etc/dconf/local.d && touch /etc/dconf/local.d/01-power

Put this into the file:

# File : /etc/dconf/local.d/01-power
[org/gnome/settings-daemon/plugins/power]
sleep-inactive-ac-type='suspend'
sleep-inactive-battery-type='suspend'
sleep-inactive-ac-timeout=60
sleep-inactive-battery-timeout=60

Do not forget to update dconf database:

dconf update

All of this should be run as root.

Last edited by etoixpi (2015-04-19 19:59:26)

Offline

Board footer

Powered by FluxBB