/etc/acpi/events/lidbtn triggers /etc/acpi/lid.sh which triggers
/etc/acpi/local/lid.sh.post at the end of the script. /etc/acpi/local/*
allows you to add your own config (e.g. required for wmii).

generate /etc/acpi/local/lid.sh.post
make it executable
and add:

#!/bin/bash
grep -q closed /proc/acpi/button/lid/*/state
if [ $? = 0 ]
then
/usr/sbin/pm-suspend
fi

wmii will now go to suspend mode when closing the lid. It'll
automatically wake up when opening the lid.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to gnome-power-manager in Ubuntu.
https://bugs.launchpad.net/bugs/863834

Title:
  [regression] Suspend on lid close broken on Oneiric

Status in “gnome-power-manager” package in Ubuntu:
  Confirmed
Status in “upower” package in Ubuntu:
  Confirmed

Bug description:
  With Oneiric, I cannot have my laptop go into suspend mode by closing the lid 
anymore. In the gnome settings, the lid close action is configured to suspend 
(both on AC and on battery), but closing the lid does nothing. 
  Here is the output of "acpid -d" when I close the lid:
  No protocol specified
  xset:  unable to open display ":0"

  And here it what it says when I open the lid:
  Sessions still open, not unmounting

  Here is the output of acpi_listen when I close/open the lid:
  button/lid LID0 00000080 00000009
  button/lid LID0 00000080 0000000a

  Here is what /proc/acpi says with the lid open and closed:
  gpothier@tadzim:~$ cat /proc/acpi/button/lid/*/state
  state:      open
  gpothier@tadzim:~$ cat /proc/acpi/button/lid/*/state
  state:      closed

  Suspending in itself works fine with the laptop's suspend button.

  Suspend on lid close worked fine in Natty.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/863834/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to