Thursday, February 20, 2014

Lid sleep on the Chromebook

This is a pretty easy one. Make sure you have acpid installed and add a file called lid to the /etc/acpi/events folder that contains the following:

event=button/lid
action=/etc/acpi/lid.sh

Then, add a script in your /etc/acpi folder that contains this:

#!/bin/bash
if [ -f /var/lock/lidsleep ]; then
rm /var/lock/lidsleep
else
touch /var/lock/lidsleep
/usr/sbin/pm-suspend
fi

You can also add lid-specific sleep commands here if you desire, but I'd use /etc/pm/sleep.d for global sleep commands. Be sure to see the prior post on disabling the trackpad during sleep, or your Chromebook is going to wake up if you even look at it wrong.

Reboot or restart acpid and lid sleep should be working.

No comments:

Post a Comment