i'm trying to make suspend on lid close work.
i saw in this thread that some people are aware that there's a problem.
i'd prefer to achieve this from within xfce4-power-manager.
here's the thing:
1. using the normal xfce desktop
* for "when laptop lid is closed", only 'lock screen' and 'switch off diplay' are available
* "System sleep mode" is completely grayed out, as well as security 'lock screen when system is going to sleep'
* the 'Ask' option is available only for "Buttons". Choosing it, then choosing "Suspend" from the dialog, causes the ui to hang (desktop darkened), but after a minute i can 'escape' out of it.
* 'systemctl suspend' suspends as expected (without locking the screen)
2. using plain openbox without display manager (i.e. console login & startx instead of nodm) or desktop environment, xfce4-power-manager autostarted
* for "when laptop lid is closed", 'lock screen', 'switch off diplay', 'suspend' and 'hibernate' are available, but only the first 2 work
* "System sleep mode" gives me a choice between 'suspend' and 'hibernate' - only suspend works (!) as expected.
* security 'lock screen when system is going to sleep' is not greyed out, and un/checking it works as advertised
* the 'Ask' option is available only for "Buttons". It does nothing.
* 'systemctl suspend' suspends as expected (without locking the screen)
in other words, choice nr. 2. works in all aspects except the lid switch!
i tried to let systemd handle the lid switch - to no avail.
i also tried to not use xfce4-power-manager at all, only systemd - to no avail.
reading `man logind.conf` i notice this:
Interesting...
'udevadm monitor' showed nothing for opening/closing the lid.
dmesg showed this:
hall: (D) hall_isr
hall: (I) HALL_CLOSE
hall: (D) hall_isr
hall: (I) HALL_OPEN
every time i open/close the lid...
so, where exactly would i have to add this "power-switch" udev tag?
phew, my head swims...
any ideas? maybe a secret solution already exists?