You are not logged in.

#1 2015-04-17 11:36:37

Zucca
Member
From: KUUSANKOSKI, Finland
Registered: 2009-02-26
Posts: 135

systemd-logind - unable to hybrid-sleep - [SOLVED], reason [UNKNOWN]

I've been trying to solve this mysterious systemd-logind behaviour.
At some point in rescent months systemd was updated on my desktop PC.
I've been quite happy to give systemd a task to handle the acpi events it can handle. So I have configured /etc/systemd/logind.conf so that power button press does "hybrid-sleep".
But since (I think) last systemd update it doesn't work anymore. I've gone trough the internet and found out that there was a similar problem back in 2013.
https://bbs.archlinux.org/viewtopic.php?id=170841

Anyway here's some information on my case:

# /usr/lib/systemd/systemd --version
systemd 218
+PAM -AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID -ELFUTILS +KMOD +IDN
# lspci
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] RS780 Host Bridge
00:02.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] RS780 PCI to PCI bridge (ext gfx port 0)
00:04.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] RS780/RS880 PCI to PCI bridge (PCIE port 0)
00:06.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] RS780 PCI to PCI bridge (PCIE port 2)
00:11.0 SATA controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode]
00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:12.1 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0 USB OHCI1 Controller
00:12.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:13.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:13.1 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0 USB OHCI1 Controller
00:13.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 SMBus Controller (rev 3c)
00:14.1 IDE interface: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 IDE Controller
00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 Azalia (Intel HDA)
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 LPC host controller
00:14.4 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 PCI to PCI Bridge
00:14.5 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI2 Controller
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor HyperTransport Configuration
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor Address Map
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor Miscellaneous Control
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor Link Control
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde PRO [Radeon HD 7750 / R7 250E]
01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series]
02:00.0 USB controller: VIA Technologies, Inc. Device 3483 (rev 01)
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)

Part of journald log:

Apr 17 14:17:53 wren systemd-logind[477]: Power key pressed.
Apr 17 14:17:53 wren systemd-logind[477]: Requested operation not supported, ignoring.

But by running 'systemctl hybrid-sleep' as root or as user things go as they should.
EDIT: but when running as user I get this:

% systemctl -o verbose hybrid-sleep        
Failed to execute operation: Sleep verb not supported
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to manage system services or units.
Authenticating as: root
Password: 

So polkit... I've tried few tricks but polkit is SO confusing with its configuration.

Finally contents of relevant config files:

/etc/systemd/logind.conf

#  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.
#
# You can override the directives in this file by creating files in
# /etc/systemd/logind.conf.d/*.conf.
#
# See logind.conf(5) for details

[Login]
NAutoVTs=4
ReserveVT=2
KillUserProcesses=no
#KillOnlyUsers=
KillExcludeUsers=root
InhibitDelayMaxSec=120
HandlePowerKey=hybrid-sleep
HandleSuspendKey=suspend
HandleHibernateKey=hibernate
HandleLidSwitch=ignore
HandleLidSwitchDocked=ignore
PowerKeyIgnoreInhibited=no
SuspendKeyIgnoreInhibited=no
HibernateKeyIgnoreInhibited=no
LidSwitchIgnoreInhibited=no
IdleAction=hybrid-sleep
IdleActionSec=300s
RuntimeDirectorySize=2%
#RemoveIPC=yes

/etc/systemd/sleep.conf

#/etc/systemd/sleep.conf

# Settings for systemd how to hibernate and suspend.
# For more detailed info see
# - man systemd-sleep.conf
# - linux docs
# - - read them by running: cat /usr/lib/modules/$(uname -r)/build/Documentation/power/{swsusp{,-dmcrypt,-and-swap-files},userland-swsusp}.txt | less
# - - list all related documents: find /usr/lib/modules/$(uname -r)/build/Documentation/ -iname '*susp*'

# *Mode setting writes its value to /sys/power/disk
# *State setting writes its value to /sys/power/state


# Every configuration is under this "Sleep" -section.
[Sleep]

# Setting for suspend -action
SuspendState=freeze mem disk
SuspendMode=suspend

# Settings for hibernate -action
# Mode can be: suspend, platform, shutdown, reboot, test, testproc
# Which the three last ones are for testing (I think) 
HibernateMode=platform shutdown test
HibernateState=disk

# And finally settings for hybrid-sleep -action
HybridSleepMode=suspend platform
HybridSleepState=disk

EDIT01: hybrid-sleep requires root password when run as user. While suspend does not.

Last edited by Zucca (2015-04-28 18:17:58)


K.i.s.s. <3

Offline

#2 2015-04-26 12:05:39

Zucca
Member
From: KUUSANKOSKI, Finland
Registered: 2009-02-26
Posts: 135

Re: systemd-logind - unable to hybrid-sleep - [SOLVED], reason [UNKNOWN]

*bump*
No one else has this problem?

Anyway. I noticed that my user can perform reboot/shutdown/etc just fine. So it's something about the hibernation that the active user cannot perform.


K.i.s.s. <3

Offline

#3 2015-04-26 19:03:14

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: systemd-logind - unable to hybrid-sleep - [SOLVED], reason [UNKNOWN]

Why are you still on 218?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2015-04-26 21:04:10

Zucca
Member
From: KUUSANKOSKI, Finland
Registered: 2009-02-26
Posts: 135

Re: systemd-logind - unable to hybrid-sleep - [SOLVED], reason [UNKNOWN]

Nope. 219 now. Problem presists. sad


K.i.s.s. <3

Offline

#5 2015-04-27 07:51:51

Zucca
Member
From: KUUSANKOSKI, Finland
Registered: 2009-02-26
Posts: 135

Re: systemd-logind - unable to hybrid-sleep - [SOLVED], reason [UNKNOWN]

Oh but now if I try to hybrid-sleep from cli I get

% systemctl -o verbose hybrid-sleep                
Failed to execute operation: Sleep verb not supported

So no root password being asked anymore.

Last edited by Zucca (2015-04-27 07:52:37)


K.i.s.s. <3

Offline

#6 2015-04-28 18:16:57

Zucca
Member
From: KUUSANKOSKI, Finland
Registered: 2009-02-26
Posts: 135

Re: systemd-logind - unable to hybrid-sleep - [SOLVED], reason [UNKNOWN]

As of today, the problem vanished like a fart into the desert.
I must have upgraded some package that was partially broken.

Marking as problem [SOLVED], reason [UNKNOWN].


K.i.s.s. <3

Offline

Board footer

Powered by FluxBB