I am running Ubuntu 9.04. When my laptop is plugged into power and I close the lid, it only turns off the screen, so when I open it up again, it comes back right away, and I can give use my media keys on the outside while it is closed.

But when I am running on battery and I close the lid, the laptop locks. This is kind of annoying, as I then have to retype my password when I resume, and my media keys don't work. It is also unnecessary since I'm not worried about the security of my laptop.

So my question is, how can I make Ubuntu not lock my screen (require a password when I come back) when I close my lid on battery?

Edit: I would like to note, that currently the power settings are set to "Blank Screen" on laptop close on battery. This causes the current behavior.

Also on some further investigation, the screen does not turn off while I am plugged in, because that power profile says to do nothing (to avoid the password). This is not acceptable for battery use, because of the power drain.

  • Can't even find an option for it, strange... – Ivo Flipse Aug 7 '09 at 5:30
  • I agree. At one time I had it the way I want, but after a reinstall I don't know how to put it back. – Mike Cooper Aug 7 '09 at 16:43

Ok, so I did some digging, and I found how to configure this behavior.

In gconf-editor the key /apps/gnome-power-mananager/lock/blank_screen controls whether to lock the screen when it is blanked or not. In my case it was checked, so I unchecked. Now it works exactly how I like.

I still wish that they exposed this in the power settings, but oh well.

Also, the key /apps/gnome-power-manager/buttons/lid_ac and /apps/gnome-power-manager/buttons/lid_battery controls what to do when the lid is closed using ac or battery respectively. The options are "suspend", "hibernate", "blank" and "nothing". Using "nothing" will keep your external monitor alive when the lid is closed.


I have my Ubuntu laptop set to "Blank Screen" on lid close on AC power, and it definitely turns the screen off (but doesn't require a password). I believe I explicitly set it to suspend on lid close on battery, but I think it could do the same thing (my battery just recently died, so I can't check right now).

Have you tried making sure that you've unchecked the "Lock screen" box in System -> Preferences -> Screen Saver? I have that unchecked and don't get a password (as mentioned) when I close my lid on AC. If that works, it should be about what you want, assuming you don't mind not suspending.

I don't know how to avoid a password when you resume from suspend though. That might be impossible to change.

  • My settings are like yours, but I still get a password. I changed my AC power to blank screen, and the password box comes back. Lock screen is unchecked in Screen Saver. I am fine with suspend wanting a password. – Mike Cooper Aug 7 '09 at 16:42

In Ubuntu 11.04 and above you can go to System Settings->Screensaver and uncheck "Lock screen when screen saver is active".


This is a duplicate of this and this particular answer fixed it for me.



Check System - Preferences - Power Management

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.