PDA

View Full Version : [ubuntu] Disable laptop monitor when external monitor is connected?



Kethinov
August 20th, 2008, 07:30 PM
I've got a Dell Latitude D620 laptop with an nvidia card in it. I've currently got xorg configured to use TwinView so I can have dual monitors. However, I'd like to reconfigure my setup so that if the external monitor is present, it uses ONLY that monitor and disables the laptop screen.

How can I do that?

Here's my current xorg.conf:


# xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg

Section "Files"
EndSection

Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "true"
EndSection

Section "InputDevice"
Identifier "Synaptics Touchpad"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option "HorizEdgeScroll" "0"
Option "SHMConfig" "on"
Option "MinSpeed" "0.7"
Option "MaxSpeed" "1.5"
Option "AccelFactor" "0.1"
EndSection

Section "InputDevice"
Driver "wacom"
Identifier "stylus"
Option "Device" "/dev/input/wacom"
Option "Type" "stylus"
Option "ForceDevice" "ISDV4"# Tablet PC ONLY
EndSection

Section "InputDevice"
Driver "wacom"
Identifier "eraser"
Option "Device" "/dev/input/wacom"
Option "Type" "eraser"
Option "ForceDevice" "ISDV4"# Tablet PC ONLY
EndSection

Section "InputDevice"
Driver "wacom"
Identifier "cursor"
Option "Device" "/dev/input/wacom"
Option "Type" "cursor"
Option "ForceDevice" "ISDV4"# Tablet PC ONLY
EndSection

Section "Device"
Identifier "nVidia Corporation G72M [Quadro NVS 110M/GeForce Go 7300]"
Driver "nvidia"
Busid "PCI:1:0:0"
Option "AddARGBVisuals" "True"
Option "AddARGBGLXVisuals" "True"
Option "NoLogo" "True"
EndSection

Section "Monitor"
Identifier "Generic Monitor"
Option "DPMS"
Horizsync 28-72
Vertrefresh 43-60
EndSection

Section "Screen"
Identifier "Default Screen"
Device "nVidia Corporation G72M [Quadro NVS 110M/GeForce Go 7300]"
Monitor "Generic Monitor"
Defaultdepth 24
Option "TwinView" "1"
Option "TwinViewOrientation" "LeftOf"
Option "UseDisplayDevice" "DFP,CRT"
Option "TwinViewXineramaInfoOrder" "DFP"
Option "metamodes" "DFP: nvidia-auto-select +0+0, CRT:
nvidia-auto-select +1440+0"
SubSection "Display"
Modes "1440x900" "1600x1200" "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
EndSection

Section "ServerLayout"
Identifier "Default Layout"
screen "Default Screen"
Inputdevice "Generic Keyboard"
Inputdevice "Configured Mouse"

# Uncomment if you have a wacom tablet
# InputDevice "stylus" "SendCoreEvents"
# InputDevice "cursor" "SendCoreEvents"
# InputDevice "eraser" "SendCoreEvents"
Inputdevice "Synaptics Touchpad"
EndSection
Section "Module"
Load "glx"
EndSection

Diggs808
August 20th, 2008, 10:14 PM
I have a D820 with Nvidia as well. I use nvidia-settings from the repos to turn off the laptop monitor when I have it connected to the external monitor.

1. Go to Synaptic (System > Administration> Synaptic Package Manager) and search for nvidia-settings. Once you find it, install it!

2. Go to: System > Administration > NVIDIA X Server Settings

3. once the app launches click on X Server Display Configuration

4. It should show both displays. The external monitor should be identified as disabled. (If not click on Detect Displays).

5. Click on the external monitor and click on the button that says configure. Click on Twinview. That activates the monitor on the program.

6. Click to select your laptop monitor

7. Click on configure

8. Change the setting to Disabled

9. Click on ok.

10. Change the resolution (if needed).

11. Click on Apply.

Hope that this helps......

ludicrous
August 22nd, 2008, 07:12 AM
I'm doing it with nvidia-settings too, but does anyone know of a way to do it automatically? Windows has it down pretty well, you can cycle through the external display modes with fn+f4 for me, and one is with only using the external display at it's correct resolution.

jure1873
August 22nd, 2008, 11:05 AM
When I use the fn keys the internal/ext display gets disabled but i don't think ubuntu recognizes that, for example when i switch to the external display the internal gets turned off but I think it still remains active from ubuntu's view.
Lately I just press Ctrl+alt+backspace and because I don't have a xorg.conf file everything is redetected but you loose your open programs.

pwnprog
August 22nd, 2008, 04:19 PM
I'm doing it with nvidia-settings too, but does anyone know of a way to do it automatically? Windows has it down pretty well, you can cycle through the external display modes with fn+f4 for me, and one is with only using the external display at it's correct resolution.


this sort of works in ubuntu, but it's sketchy at best. unfortunately this seems to be one of the area where this distro is still lacking a bit. i'd say your best is to keep doing things through nvidia settings for now. correct me if i'm wrong, but it seems like the architecture isn't quite there yet to have simple plug and play external monitors in ubuntu.

zerubbabel
September 2nd, 2008, 05:17 PM
I have a D820 with Nvidia as well. I use nvidia-settings from the repos to turn off the laptop monitor when I have it connected to the external monitor.

1. Go to Synaptic (System > Administration> Synaptic Package Manager) and search for nvidia-settings. Once you find it, install it!

2. Go to: System > Administration > NVIDIA X Server Settings

3. once the app launches click on X Server Display Configuration

4. It should show both displays. The external monitor should be identified as disabled. (If not click on Detect Displays).

5. Click on the external monitor and click on the button that says configure. Click on Twinview. That activates the monitor on the program.

6. Click to select your laptop monitor

7. Click on configure

8. Change the setting to Disabled

9. Click on ok.

10. Change the resolution (if needed).

11. Click on Apply.

Hope that this helps......
My Dell Latitude 830 doesn't have the nvidia controller, but an Intel controller instead. Has anyone figured out how to turn off the laptop display when an external monitor is attached in this case?