Suspend on LID close: Difference between revisions

From Alpine Linux
m (Reformat)
mNo edit summary
Line 11: Line 11:
echo mem > /sys/power/state
echo mem > /sys/power/state
}}
}}


Make the hook executable:
Make the hook executable:

Revision as of 20:39, 11 September 2022

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

Busybox acpid

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

  1. with pm-utils:

    apk add pm-utils

    Contents of /etc/acpi/LID/00000080

    #!/bin/sh exec pm-suspend
  2. or with 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

That should be it. To make sure that the acpid daemon is running, execute:

/etc/init.d/acpid start