1

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!

  • 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

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.

0

By installing acpid and creating the above files is only half the solution. The suggested /etc/acpi/actions/lid_down.sh produces errors.

Here is a fixed version:

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

[ "$1" = "button/lid" ] && [ "$2" = "LID" ] && [ "$3" = "close" ] && systemctl suspend

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy