You are not logged in.
I'm trying to configure a laptop to suspend when the lid is closed, and despite my efforts, i can't get to it.
i use bspwm, acpid and systemd are installed, systemctl hybrid-sleep run fine by hand, and i configured logind like this :
❯ cat /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.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See logind.conf(5) for details.
[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
HandleSuspendKey=ignore
HandleHibernateKey=ignore
HandleLidSwitch=hybrid-sleep
HandleLidSwitchExternalPower=hybrid-sleep
HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
LidSwitchIgnoreInhibited=yes
#HoldoffTimeoutSec=30s
IdleAction=hybrid-sleep
IdleActionSec=5min
#RuntimeDirectorySize=10%
#RuntimeDirectoryInodes=400k
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192as far as i can tell, thereś no inhibitor involved :
❯ systemd-inhibit --list
WHO UID USER PID COMM WHAT WHY MODE
NetworkManager 0 root 447 NetworkManager sleep NetworkManager needs to turn off networks delay
UPower 0 root 438 upowerd sleep Pause device polling delay
2 inhibitors listed.Lid event are correctly intercepted :
❯ systemctl status acpid.service
● acpid.service - ACPI event daemon
Loaded: loaded (/usr/lib/systemd/system/acpid.service; enabled; preset: disabled)
Active: active (running) since Tue 2022-09-20 13:43:22 EDT; 21min ago
Docs: man:acpid(8)
Main PID: 433 (acpid)
Tasks: 1 (limit: 18962)
Memory: 344.0K
CPU: 3.249s
CGroup: /system.slice/acpid.service
└─433 /usr/bin/acpid --foreground --netlink
sept. 20 14:03:48 radium root[4971]: ACPI group/action undefined: button/up / UP
sept. 20 14:03:49 radium root[4973]: ACPI group/action undefined: button/down / DOWN
sept. 20 14:04:25 radium root[5105]: ACPI group/action undefined: button/down / DOWN
sept. 20 14:04:25 radium root[5107]: ACPI group/action undefined: button/down / DOWN
sept. 20 14:04:25 radium root[5109]: ACPI group/action undefined: button/down / DOWN
sept. 20 14:04:37 radium root[5184]: ACPI group/action undefined: button/right / RIGHT
sept. 20 14:05:06 radium root[5238]: ACPI group/action undefined: button/down / DOWN
sept. 20 14:05:14 radium root[5281]: LID closed
sept. 20 14:05:16 radium root[5283]: LID opened
sept. 20 14:05:18 radium root[5285]: ACPI group/action undefined: button/up / UPAny idea what i am missing here ?
Offline
IdleAction doesn't seem to work either
Offline
IdleAction needs WM support which I suppose bspwm lacks. Systemd properly handling Lid events needs them to not be caught by acpid instead (so try disabling and stopping that first) as well as your session being started correctly in general. Also make sure logind is actually aware of your session, if you are using xinit/startx to start the session pay attention to the notes in https://wiki.archlinux.org/title/Xinit#xinitrc
Offline