Difference between revisions of "Suspend on LID close"

From Alpine Linux
Jump to: navigation, search
m (+ link pm-utils (arch wiki))
m
 
Line 23: Line 23:
 
= =
 
= =
 
* [https://unix.stackexchange.com/questions/484550/pm-suspend-vs-systemctl-suspend pm-suspend vs systemd...]
 
* [https://unix.stackexchange.com/questions/484550/pm-suspend-vs-systemctl-suspend pm-suspend vs systemd...]
* [http://archive.fo/Bcqlz pm-utils (arch wiki)]
+
* [http://archive.md/Bcqlz pm-utils (arch wiki)]
  
 
[[Category:Power Management]]
 
[[Category:Power Management]]
 
[[category: Desktop]]
 
[[category: Desktop]]

Latest revision as of 08:08, 9 November 2019

This article explains how to make your laptop go to Suspend when closing the LID.

This can be done via acpid with a hook in /etc/acpi/LID/00000080:

a) with pm-utils:

apk add pm-utils

Contents of /etc/acpi/LID/00000080

#!/bin/sh exec pm-suspend

b) with this raw variant:

Contents of /etc/acpi/LID/00000080

#!/bin/sh echo mem > /sys/power/state


Make the hook executable:

chmod +x /etc/acpi/LID/00000080

And that should be it. Make sure that the acpid daemon is running:

/etc/init.d/acpid start