enable suspend from lockscreen via /etc/systemd/logind.conf ?

Questions about applications and software
Forum rules
Before you post please read how to get help

LMDE 2 support ends on 1-1-2019
Post Reply
TomRoche
Level 4
Level 4
Posts: 248
Joined: Thu Jan 13, 2011 2:52 pm

enable suspend from lockscreen via /etc/systemd/logind.conf ?

Post by TomRoche » Sun Jul 17, 2016 5:45 pm

Yesterday I attempted to enable suspend from lockscreen in my up-to-date LMDE2 using these instructions which unfortunately are not working for me (i.e., no change from previous). Is this due to LMDE2's incomplete adoption of `systemd`? I had thought LMDE2 was using the `systemd` `logind` but ICBW.

FWIW, here's what I did:

Code: Select all

me@it:~$ date ; sudo cat /etc/systemd/logind.conf
Sat Jul 16 21:53:42 MST 2016
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# 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=suspend
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RemoveIPC=yes

me@it:~$ sudo cp /etc/systemd/logind.conf /etc/systemd/logind.conf.0
me@it:~$ sudo chmod a-w /etc/systemd/logind.conf.0

# edit file, then

me@it:~$ date ; sudo diff -uwB /etc/systemd/logind.conf.0 /etc/systemd/logind.conf
Sat Jul 16 22:18:22 MST 2016
--- /etc/systemd/logind.conf.0	2015-03-10 09:03:16.000000000 -0700
+++ /etc/systemd/logind.conf	2016-07-16 22:17:42.224310188 -0700
@@ -15,13 +15,13 @@
 #KillExcludeUsers=root
 #InhibitDelayMaxSec=5
 #HandlePowerKey=poweroff
-#HandleSuspendKey=suspend
+HandleSuspendKey=suspend
 #HandleHibernateKey=hibernate
-#HandleLidSwitch=suspend
+HandleLidSwitch=lock
 #PowerKeyIgnoreInhibited=no
-#SuspendKeyIgnoreInhibited=no
+SuspendKeyIgnoreInhibited=yes
 #HibernateKeyIgnoreInhibited=no
-#LidSwitchIgnoreInhibited=yes
+LidSwitchIgnoreInhibited=yes
 #IdleAction=ignore
 #IdleActionSec=30min
 #RuntimeDirectorySize=10%

# Following action recommended @ http://superuser.com/a/751381/98270
# but seems to be failing here ... am I missing something?

me@it:~$ date ; sudo systemctl restart systemd-logind
Sat Jul 16 22:18:29 MST 2016
Failed to get D-Bus connection: Unknown error -1
I then tried the following sequence:

1. sleep box with `Fn-F4`: works as usual
2. resume box by pressing power button: works as usual
3. at lock screen, attempt to sleep box with `Fn-F4`: fails as usual

I then unlocked, and tried

1. restart box with `sudo shutdown -r now`
2. login via gdm
3. sleep box with `Fn-F4`
4. resume box by pressing power button
5. at lock screen, attempt to sleep box with `Fn-F4`: still fails as usual

So am I doing this incorrectly, or is this failing due to LMDE2 being not yet all-the-way `systemd`ed, or am I missing Something Completely Different?

Post Reply

Return to “Software & Applications”