stopping a netbook from sleeping

Rashkae ubuntu at
Mon Feb 8 15:00:49 UTC 2010

Karl Auer wrote:
> Hi all.
> I have a netbook that is acting as a little router. It has the Ubuntu
> Netbook Remix 9.10 on it. I want it to come up at the GDM greeter
> screen,but I do NOT want it to sleep if the lid is closed (or time
> passes or anything else).
> I have set all the gnome preferences. Once I am logged in, they are
> honoured. BUT: If I log out (or never log in) the netbook sleeps if I
> close the lid, and after a certain amount of time passes without any
> keyboard/mouse activity.
> If I stop the GUI by killing GDM, the netbook never sleeps, so I have
> modified /etc/init/gdm.conf to exit without doing anything if a certain
> file exists. This is a bit of a kludge though, and I would prefer to
> have the GUI available.
> Is there any way to tell GDM not to sleep? I've been through all the
> options in gdmsetup and none look useful in this regard.
> Regards, K.

These instructions will disable the gdm hibernate and Suspend commands 
from working.  I'm sorry that I have yet tested if they will also 
disable the "Lid Close" actions.

In a move that I still complain about whenever I have a soapbox handy, 
Ubuntu has switched to a new version of policykit that requires any 
changes such as this to be made with a text editor.

sudo gedit 

There you will find xml configuration for 

as well as:

And change the  <allow_active>yes</allow_active>
to <allow_active>no</allow_active>.

Alternatively, you can use auth_admin if you want a logged in user to 
use those commands with password.  There is another file you have to 
edit if you wan to find grain these permissions by user or group.

More information about the ubuntu-users mailing list