Making suspend on lid-close work with Arch Linux on the HP Chromebook 11

This post was published in 2014 and is kept here for reference. It may contain information that's outdated or inaccurate. All external links and references have been updated to point to archived versions on archive.org where possible.

The more time that I spend using Arch Linux on my HP Chromebook 11, the more things I find to tweak and tinker with.

The latest thing I’ve addressed is making suspend work when the lid is closed. After speaking to my resident Arch guru about it, he pointed me to a blog post that he wrote on the subject, before actually showing me how to make it work.

The steps for what I wanted to achieve are actually a bit different to his guide, so I’ll summarise them here:

Install acpid and pm-utils

$ sudo pacman -S acpid pm-utils

Edit /etc/acpi/handler.sh

$ nano /etc/acpi/handler.sh

Find the button/lid case

button/lid)
case "$3" in
    close)
        logger 'LID closed'
        ;;
    open)
        logger 'LID opened'
        ;;
    *)
        logger "ACPI action undefined: $3"
        ;;
esac
;;

Add the pm-suspend command inside the close case

button/lid)
case "$3" in
    close)
        logger 'LID closed'
        pm-suspend
        ;;
    open)
        logger 'LID opened'
        ;;
    *)
        logger "ACPI action undefined: $3"
        ;;
esac
;;

And there you go. For this to work straight away you’ll need to restart the acpi service:

$ systemctl restart acpid

And that’s it. Now when you close the lid, you should see that the lights on the back turn off, so you can tell it has suspended. To make this permanent you’ll need to enable acpid on boot:

$ systemctl enable acpid

This post is also available in plain text

[Comments]

Want to comment? You can do so via Github.
Comments via Github are currently closed.

[Webmentions]

Want to reply? I've hooked up Webmentions, so give it a go!