Need help with the Power Management preferences

Asked by Linux_Cheeta on 2011-01-16

Hi all,

I'm trying to connect my Ubuntu laptop with my samsung TV with a HDMI cable. So far i have successfully connected the both but i'm stuck with the power management preferences, i want to close the lid of my laptop once i'm connected to the TV so that i can only have TV working as a monitor while laptop working as a CPU. As in windows when i connect my laptop to the TV i can choose the option from the drop down menu where i can select " Do nothing when laptop lid is closed " but i dont see any such option in Ubuntu. Any suggestions, how i can achieve this????

Question information

English Edit question
Ubuntu gnome-power-manager Edit question
No assignee Edit question
Solved by:
Eliah Kagan
Last query:
Last reply:

This question was reopened

Revision history for this message
actionparsnip (andrew-woodhead666) said :

What windows does or doesn't do is of no value. It is a completely different OS with different support.

Revision history for this message
Linux_Cheeta (syedasifraza1) said :

Dear actionparnip, thanks for the clarification but i need to do the same thing in linux, if you have any suggestions please let me know.

Revision history for this message
Eliah Kagan (degeneracypressure) said :

You have marked this as Solved. Are you no longer experiencing the problem?

Revision history for this message
Linux_Cheeta (syedasifraza1) said :

Oops does'nt realize its not resolved yet! Need a solution for this.....BTW how can i change the status of this post??

Revision history for this message
Eliah Kagan (degeneracypressure) said :

To change the status of a Question, you can post again, requesting further assistance. Which you just did, and now the status of this Question has gone back from Solved to Open.

Revision history for this message
Eliah Kagan (degeneracypressure) said :

Click the battery icon on your GNOME panel (near the upper right corner of your screen), to bring up Power Management Preferences. (If you're unable to do that, or it doesn't work, then press Alt+F2 and run the command gnome-power-preferences.)

Under actions, there is a drop-down menu immediately to the right of the text "When laptop lid is closed". Set that to the action you want (e.g. "Blank screen"). Then click Close.

Revision history for this message
Linux_Cheeta (syedasifraza1) said :

Thanks Eliah for your answer. But i know this already, what i'm looking for is the option that can enable me to close the lid of the laptop but do not spin don the hardisks nor disturb any other functions. As in windows thre is an option in the power preferences which states that "when the lid is closed do nothing". Which helps me to see the display only on the TV and the lid of the laptop is closed.

Appreciate if any one can help me to do so.

Revision history for this message
Eliah Kagan (degeneracypressure) said :

You seem to be saying that you're experiencing three issues--your external monitor is turning off, your computer is entering suspend mode, and your hard disks are spinning down. If I understand you correctly, you don't want any of these things to occur. Please bear with me if all or most of what I say in this post is stuff you already know. I just want to make sure we're on the same page.

In the Power Management Preferences, there should be four options in the drop-down menu to the immediate right of the text "When laptop lid is closed": Blank screen, Suspend, Hibernate, and Shutdown.

If you configure Ubuntu so that closing the lid puts the computer to sleep (i.e. Suspend), hibernates, or shuts down, then obviously that action will disturb all functions, including spinning down your hard drives. If you configure it so that closing the lid just turns off the monitor, then it will *not* do anything else. I understand that this may including turning off external screens (and not just the built-in screen), which you do not want.

Your computer might still enter suspend mode for other reasons once the lid is closed. For example, in the Power Management Preferences, you can control if the computer goes to sleep when inactive for a certain amount of time. Making it so that closing the lid doesn't put it to sleep won't stop it from going to sleep after that amount of time passes (if it's configured to do so). Similarly, the hard drive(s) will spin down if you configure your system to allow that; this is also separate from what happens when you close the lid.

By the way, generally speaking there is nothing problematic about allowing the hard drive(s) to spin down automatically. They will automatically spin back up again when they are accessed.

When adjusting Power Management Preferences, it is important to remember that there are two sets of preferences to adjust--the settings in the On AC Power tab, and the settings in the On Battery Power tab. (There is also the General tab, but that doesn't contain the settings that control under what circumstances, if any, Ubuntu will put your computer in Suspend mode.)

In light of the above information, are you still experiencing any undesirable power management behaviors from Ubuntu when you close the lid, *other* than the blanking of external screens? If not, we (and anyone else who offers assistance) can focus solely on that.

Revision history for this message
Linux_Cheeta (syedasifraza1) said :

Dear Eliah thanks for the elaborated response and i'm really grateful to you for all the help and support. Really appreciate your concerns and the valueable information that you have shared with me.

For the problem, infact i would say it is not a problem its just some thing that i want to do with linux but i dont see any such options in linux to do so. The thing is, i dont want the TV screen to go black when i close the lid, the laptop screen should go black only. In this way i would be using my TV as the monitor but i dont see any option saying " Do Nothing when lid is closed". When i choose the option "Blank screen" the TV screen also goes black which i dont want.

Appreciate if you can help to do so. Thanks once again for your earlier post :)

Revision history for this message
Best Eliah Kagan (degeneracypressure) said :

Thanks for clarifying that the "close lid" issue is the only problem you're experiencing.

I did a bit of research, and it seems that gnome-power-manager *can* make closing the lid "do nothing", rather than blanking displays, even though the option to do so is not listed in the gnome-power-preferences. To do so, you have to select that option manually. One way to do this is by opening up a Terminal window (Applications > Accessories > Terminal) and running the command:

gconftool-2 --type string --set /apps/gnome-power-manager/buttons/lid_ac "nothing"

If you issue that command and appear to get no result, that's the expected behavior--it would give an error if it failed to make the configuration change. If you want to check that the change was made (and this works if you make it with the GUI as described below, too), then you can run

gconftool-2 -R /apps/gnome-power-manager/buttons

in the terminal, and examine the value of lid_ac.

As an alternative to using the Terminal to change this setting, you can open up the Gconf Editor (Alt+F2 and run gconf-editor), navigate to /apps/gnome-power-manager/buttons in the left pane, and then in the right pane set the value of lid_ac to "nothing" (without the quotes).

Interestingly, even though the "nothing" option is not provided in gnome-power-preferences, it is documented in the "Key Documentation" shown in gconf-editor.

Please feel free to post again if that doesn't work or you have additional questions on this topic. For example, the above technique will make all displays remain on when you close the lid, whether or not any external display is connected. It may be possible to produce more finely tuned behavior (though, at least at this point, I don't know how).

Note also that this forum topic contains a discussion of these issues (and was the source I used, to answer your question):

I would encourage you to continue using Launchpad Answers for support, but you may find the forums useful as well.

Revision history for this message
Linux_Cheeta (syedasifraza1) said :

Thanks Eliah Kagan, that solved my question.

Revision history for this message
Linux_Cheeta (syedasifraza1) said :

Wow! i'm impressed with your knowledge, thanks a ton buddy i finally am able to do what i wanted to do. I used the gconf editor to change the value of the lid_ac and now it is also apprearing in the power management preferences select list. I'm in my office right now but will go home and try connecting the TV. Let's c if it work correctly or not.

Eliah you are the man!!!! buddy thanks for the great info!

Revision history for this message
Eliah Kagan (degeneracypressure) said :

I'm glad to have been able to help. When you test the solution after work, if it doesn't work as intended, please feel free to reopen this question.