Skip to navigation
Suspend my gentoo laptop when i close the laptop lid
14.03.17
1. compile suspend and acpid: emerge --ask sys-power/suspend emerge --ask sys-power/acpid 2. register acpid as service to listen when i close the laptop lid: rc-update add acpid default 3. may test the actual events by running #acpi_listen now close and open the lid to see the event outputs 4. create a event file /etc/acpi/events/lid with: event=button/lid action=/etc/acpi/actions/lid.sh "%e" 5. create the below bash script /etc/acpi/actions/lid.sh this is checking the event and if its a closing event execute a suspend command #!/bin/bash if [ "$1" == "button/lid LID close" ] then #echo "$1" >> /ver/log/suspend.txt echo mem > /sys/power/state fi
https://forums.gentoo.org/viewtopic-t-936952-view-previous.html
Reply
Anonymous
Information Epoch 1714563929
Save trees.
Home
Notebook
Contact us