Suspend on LID close: Difference between revisions

From Alpine Linux
No edit summary
m (Minor amendments; categorized: Power Management)
Line 1: Line 1:
This article explanis how to make your laptop go to Suspend when closing the LID.
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:
This can be done via <code>acpid</code> with a hook in {{path|/etc/acpi/LID/00000080}}:


'''a) with pm-utils:'''
'''a) with pm-utils:'''
Line 20: Line 20:
And that should be it. Make sure that the acpid daemon is running:
And that should be it. Make sure that the acpid daemon is running:
{{cmd|/etc/init.d/acpid start}}
{{cmd|/etc/init.d/acpid start}}
[[Category:Power Management]]

Revision as of 03:19, 21 September 2017

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