PDA

View Full Version : [ubuntu] Don't turn of external screen on Laptop Lid close event



Jense
June 7th, 2012, 04:52 PM
Hello,

I have been trying to figure this out for quite some time know and it's driving me crazy.

Problem:
I want to use an external monitor only. The laptop should be stored somewhere with the lid closed. But whatever I try the external screen tuns blank when I close the lid of the laptop.

Setup
Ubuntu 12.04, Nvidia Drivers installed, using xorg.conf settings to have only my external monitor activated on boot.

Tested solutions

Energy-settings -> When lid closed: do nothing
Brightness and Lock Screen: Don't turn of screen and don't block (yes I want it that way)
gconftool-2 --type string --set /apps/gnome-power-manager/buttons/lid_ac "nothing"
edit /etc/acpi/events/lidbtn and comment out line 5 (action line)


My interpretation of the problem:

As I am using the nvidia driver (and it seems I must as noveau apparently doesn't recognize my external screen) unity is unaware that I actually have an external screen attached. And though via xorg.conf my primary (laptop) screen is disabled unity will no matter what I do disable my screen because it still thinks it is the laptop screen.

Thanks for your help

4partee
June 9th, 2012, 01:04 AM
I sure hope someone has a solution for this using 10.04.

I am trying to set up a Lenovo notebook as a desktop where I can close the lid on the notebook and put it aside while using an external wireless keyboard and mouse, and an external monitor.

John

Jense
June 12th, 2012, 01:50 PM
Really? Nobody? I can't believe this is not possible. :(

jlmjlm
June 13th, 2012, 06:55 PM
So far, it is working for me to replace the /etc/acpi/lid.sh file with:

case $(awk '{ print $2 }' < /proc/acpi/button/lid/LID0/state) in
open) vbetool dpms on;;
close) vbetool dpms off;;
esacThen when I close the lid the backlight goes out and nothing else happens, and when I open it the backlight comes back on.
It's annoying that the default behavior is to blank external monitors when a laptop's lid is closed, and even more annoying that the "do nothing" settings aren't honored.

Jense
June 14th, 2012, 11:01 AM
Hi,

thanks for your advice. I will try that as soon as I get home.

Randy M
June 16th, 2012, 07:01 PM
So far, it is working for me to replace the /etc/acpi/lid.sh file with:

case $(awk '{ print $2 }' < /proc/acpi/button/lid/LID0/state) in
open) vbetool dpms on;;
close) vbetool dpms off;;
esacThen when I close the lid the backlight goes out and nothing else happens, and when I open it the backlight comes back on.
It's annoying that the default behavior is to blank external monitors when a laptop's lid is closed, and even more annoying that the "do nothing" settings aren't honored.

I tried this on my HP G60 and it didn't work. I'm running 10.04 there. The backlight it burned out and I want to use it with a monitor. Any other suggestions? Thanks in advance.

Randy M
June 16th, 2012, 07:15 PM
I think I found it.

If there's no "Do Nothing" option in the Power Settings, open a terminal and enter "gconf-editor". The select "apps", "gnome-power-manager", and "buttons". Then, set "lid_ac" and "lid_battery" to "nothing" (right click, select "Edit" and type in "nothing" without the quotes) and reboot.

thomhehl
June 17th, 2012, 06:33 PM
Hello,

I have been trying to figure this out for quite some time know and it's driving me crazy.

Problem:
I want to use an external monitor only. The laptop should be stored somewhere with the lid closed. But whatever I try the external screen tuns blank when I close the lid of the laptop.

Setup
Ubuntu 12.04, Nvidia Drivers installed, using xorg.conf settings to have only my external monitor activated on boot.

Tested solutions

Energy-settings -> When lid closed: do nothing
Brightness and Lock Screen: Don't turn of screen and don't block (yes I want it that way)
gconftool-2 --type string --set /apps/gnome-power-manager/buttons/lid_ac "nothing"
edit /etc/acpi/events/lidbtn and comment out line 5 (action line)


My interpretation of the problem:

As I am using the nvidia driver (and it seems I must as noveau apparently doesn't recognize my external screen) unity is unaware that I actually have an external screen attached. And though via xorg.conf my primary (laptop) screen is disabled unity will no matter what I do disable my screen because it still thinks it is the laptop screen.

Thanks for your help
I am having the same issue on 12.04 on my Acer Aspire laptop. Did you ever find a resolution?:confused:

Jense
June 20th, 2012, 08:45 PM
So far, it is working for me to replace the /etc/acpi/lid.sh file with:

case $(awk '{ print $2 }' < /proc/acpi/button/lid/LID0/state) in
open) vbetool dpms on;;
close) vbetool dpms off;;
esac

As this will also disable the backlight of the external screen this workaround doesn't work for me (tried it). I have not yet found any other solution. I am wondering... this isn't such an unusual use case. Why is this so difficult? Maybe it's just unity...

Jense
June 21st, 2012, 08:48 PM
I filed a bug report here:

https://bugs.launchpad.net/ubuntu/+bug/1015796

If you are also interested in getting this fixed, give it some heat :-)