I'm running 12.10 with xmonad.

Trying to ensure that the right things happen when I close laptop lid, etc. I see Internet search results for similar issues that mostly point towards gnome-power-manager. I have the package installed, but gnome-power-manager is not in my path anywhere.

The behavior I'm looking for is as following:

  • Sleep on lid close
  • Awaken on lid open
  • Turn off screen after 10 idle minutes
  • Most importantly, have better battery life. I'm supposed to be getting 9 hours and I haven't seen the battery life estimate above 2.5 hours yet.

Any tips on where to look or how to configure this would be much appreciated.


To set up the Laptop Lid Close Action you have to install Advanced Setting (or the Gnome Tweak Tool).I suppose you have installed it ( if not you can do that from USC (Ubuntu Software Center) under either tweak or Advanced Settings.), so here what you have to do,

Press the super button and type in tweak or advanced and choose the Advanced Settings. When it opens choose the shell tab;

enter image description here

choose you desired on both on AC and on battery

I dont know if xmonad effets this but you may even need to check your settings in


Make sure you have two settings in there

[Enable hibernate by default in upower] Identity=unix-user:* Action=org.freedesktop.upower.hibernate ResultActive=yes

[Enable hibernate by default in logind] Identity=unix-user:* Action=org.freedesktop.login1.hibernate ResultActive=yes

You can read more about the file and its settings here.

Hope it helps

| improve this answer | |

You can see the files installed by the gnome-power-manager package by executing dpkg -L gnome-power-manager.

Your PATH is used by your shell to find commands to execute. Packages can install files anywhere they need to. Your command line never needs to execute power management commands.

I suggest that you take a look at the pm-utlls package. It does most of the lid close/open stuff.

| improve this answer | |
  • It looks like gnome-power-manager only provides gnome-power-statistics. The statistics I see in that are pretty depressing -- it's depleting much faster than I'd anticipate. But I guess that's the subject of another question, maybe. I have jupiter running, I was under the impression that was supposed to greatly extend battery life. Any pointers? – Espressofa Nov 6 '12 at 1:16
  • You could run top and see what's eating CPU time, or look into "process accounting", see man -k accounting. Look at the scripts in dpkg -L pm-utils, and make sure that they work on your machine. – waltinator Nov 6 '12 at 5:32
  • I see quite a large number of scripts in /usr/lib/pm-utils/ but none of their titles have anything to do with laptop lid closing. pm-hibernate and pm-suspend work well. I turned on a bunch of the PowerTOP optimizations, either that or something else seemed to have improved its life a little bit. Thanks for your help so far! – Espressofa Nov 6 '12 at 17:19

[I run i3 without any other desktop managers (e.g, gnome), so it may work in your case]

comment out the screenblank line and add command to suspend below it in /etc/acpi/lid.sh, as shown below:

#. /usr/share/acpi-support/screenblank

man xset for your screen blank and power save settings (controls the blank time, etc). xset q to see what things are set to. If you don't want blanking (i.e., watching a movie) then you want to xset s off and xset -dpms.

When I open my lid the computer is still suspended. Pressing any keyboard key resumes very rapidly (even on a slow computer). I would love for the lid to trigger wakeup but have not yet figured out how to do it.

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.