You are not logged in.

#1 2014-08-26 12:19:39

anomin
Member
Registered: 2014-08-26
Posts: 1

systemd lid event

Hi!

Can systemd catch lid close/open events?

Details:

I'm strugling with "laptop suspend with external monitor attached" issue. Thist hread was discussed but none of solution mentioned was working for me. Problem is when I have an external monitor attached to my laptop, closing lid doesn't suspend laptop. Current desktop is Cinnamon and doesn't work with gnome-tweak-tools or other utils that are solution mentioned on forums. In https://wiki.archlinux.org/index.php/Po … leep_hooks wiki I found that I can create hooks for sleep/hybernate. So the question is: Can I create the same event just for lid open/close to triger something like "systemctl suspend" ?

Offline

#2 2014-08-26 15:47:50

Rob_H
Member
Registered: 2012-06-19
Posts: 72

Re: systemd lid event

Did you read through the ACPI events section of the page? You can customize the actions taken by systemd on lid open/close by modifying /etc/systemd/logind.conf. I had to tweak these on my laptop to prevent hibernation during bootup when the lid was closed and external monitor was attached.

This might not work once the desktop environment starts up, though. If not, look into acpid. It may already be running under Cinnamon.

Offline

#3 2014-08-27 12:37:32

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: systemd lid event

Arch wiki wrote:

The HandleLidSwitch option does not trigger an action if an external monitor is connected when the lid is closed.

Does the event get noticed by 'udevadm monitor -pu'?

Offline

Board footer

Powered by FluxBB