Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
    
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

5 Answers 5

up vote 9 down vote accepted

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.

share|improve this answer

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.

share|improve this answer
    
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".

share|improve this answer

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

http://askubuntu.com/a/111448/11929

share|improve this answer

Check System - Preferences - Power Management

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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