Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How can Fedora 17 (LXDE spin, if it matters) be configured to sleep or suspend when the lid of a laptop (Lenovo S10 netbook) is closed? With a 'stock' installation (from the LXDE spin live CD), closing the lid doesn't seem to change the machine's state at all (fan still cycles, front LEDs don't change state, uptime unaffected), and when the lid is reopened the keyboard is hot... Thanks!

share|improve this question

migrated from serverfault.com Nov 18 '12 at 4:14

This question came from our site for system and network administrators.

    
Fedora is a distro with one of the most solid documentation projects. Some of it is mundane and GUI oriented, but there is a lot of valuable information if only you look in the right place. I cannot imagine that the documentation has deteriorated since the days of redhat (when I was looking at those docs). –  Ярослав Рахматуллин Nov 18 '12 at 10:37

1 Answer 1

You may want to read the whole power management guide, but the section about acpid is exactly what you are looking for. On my system I have:

# cat /etc/acpi/events/lid
event=button[ /]lid
action=/etc/acpi/actions/lid_down.sh %e

# cat /etc/acpi/actions/lid_down.sh
#!/bin/bash

#mute alsa.
#amixer sset PCM 0

#echo $*

dec=`echo ibase=16\; ${4^^}|bc`

if [ $(($dec % 2 )) -eq 1 ]
then
        logger "lid down"
else
        logger "lid up"
fi

If I wanted to suspend, I'd call hibernate-ram (tuxonice) instead of logging "lid down". I think the same thing can be done in Fedora with the pm-suspend command. If you find that this command does nothing, then it's likely a driver issue. You will have to research how to properly configure ACPI on that laptop.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.