Pinebook, Armbian Installed: Suspend on Lid Close?

Recommended Posts

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:



  HandleLidSwitch=..... Only input devices with the "power-switch" udev tag will be watched for key/lid switch events.




'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?

Link to post
Share on other sites
Donate and support the project!

mate-power-manager indeed works better in this respect.
i had to manually add screen locking via systemd though (not sure if installing mate-screensaver would have fixed that too).

one thing that doesn't work is automatic 'sleep' after a given amount of inactivity.
right now, it does nothing (just blanks the screen) unless i trigger the suspend with one of 3 configured methods (lid, power button, sleep button).

xfce4-power-manager let me define a "Sleep Action" - maybe there's something similar going on here, but no GUI dialog to set it?

Link to post
Share on other sites
This topic is now closed to further replies.