Warning: THE VOID WIKI IS DEPRECATED. It is no longer being maintained, contains outdated and incorrect information, and will eventually be shut down. Please refer to the Void Handbook, https://docs.voidlinux.org/, for the official documentation. If you can't find the information you're seeking, please raise an issue at https://github.com/void-linux/void-docs/issues


From Void Linux Wiki
Jump to navigation Jump to search

ACPI (Advanced Configuration and Power Interface) allows the operating to interface with hardware, enabling functions such as control of the power or lid button, battery status, dock status and fan status.

Handling ACPI events

To enable handling of ACPI events, first enable the acpid service:

# ln -s /etc/sv/acpid /var/service 

Next, edit the handler script located in etc/acpi/handler.sh

Locking the screen on lid close

To lock the screen when the lid of a laptop is closed, edit the /etc/acpi/handler.sh script, adding a line to run your screen locker before the zzz command:

File: /etc/acpi/handler.sh

# suspend-to-ram
logger "LID closed, suspending..."
i3lock #replace with your screen locker