Click to See Complete Forum and Search --> : Switch between single and dual monitors
skubiszm
11-11-2004, 04:04 PM
Is there an easy way to switch between a single or dual monitor setup? I know I could go into my X.conf change a bunch of lines and then restart X, but I wonder if there is a simpler way.
I am using Suse 9.0, XFree86 4.3.0.1-46, and an NVidia video card with the latest Nvidia driver. Since I am using the NVidia driver, the Suse X config program doesn't work anymore.
Thanks in advance,
skubiszm
gehidore
11-11-2004, 04:23 PM
I remember something About hardware or X profiles inside of the xorg/xf86conf but I didn't pay too much attention.
EnigmaOne
11-11-2004, 05:53 PM
It's a kludge....
Set up dual-monitors the way you want it, and cp the config file to something like "dual-{config_file_name}"
Set up single monitor the way you want it, and cp the config file to something like "single-{config_file_name}"
Use a script to cp -f the appropriate file to your active config file name and Ctrl-Alt-Backspace to restart the x server.
skubiszm
11-11-2004, 11:00 PM
Thanks, that sounds like as good of a solution as any. Now why didn't I think of that...
-skubiszm
voidinit
11-12-2004, 03:24 AM
It's actually pretty easy to do this if you are using the NVidia OEM drivers. If you have one "TwinView" card that runs two monitors this snippet will probably work as is. If you are using two video cards or whatever see NVidia's documentation supplied with the driver. It covers this configuration as well.
Put something like this in your xorg.conf or XFree86.conf file.
Section "Device"
Identifier "nv"
VendorName "NVidia"
Driver "nvidia"
Option "TwinView"
Option "SecondMonitorHorizSync" "29-70"
Option "SecondMonitorVertRefresh" "47-120"
Option "TwinViewOrientation" "RightOf"
Option "MetaModes" "1280x1024,1024x768"
Option "ConnectedMonitor" "crt,crt"
EndSection
Section "Device"
Identifier "nv-single"
VendorName "NVidia"
Driver "nvidia"
EndSection
Section "Screen"
Identifier "Screen 1"
Device "nv"
Monitor "My Monitor"
DefaultDepth 24
Subsection "Display"
Depth 24
Modes "1280x1024"
EndSubsection
EndSection
Section "Screen"
Identifier "Screen 2"
Device "nv-single"
Monitor "My Monitor"
DefaultDepth 24
Subsection "Display"
Depth 24
Modes "1280x1024"
EndSubsection
EndSection
Section "ServerLayout"
Identifier "DoubleLayout"
Screen "Screen 1"
InputDevice "Mouse1" "CorePointer"
InputDevice "Keyboard1" "CoreKeyboard"
EndSection
Section "ServerLayout"
Identifier "SingleLayout"
Screen "Screen 2"
InputDevice "Mouse1" "CorePointer"
InputDevice "Keyboard1" "CoreKeyboard"
EndSection
Then if you startx, you can startx like:
startx -- -layout DoubleLayout
or
startx -- -layout SingleLayout
Well, the startx command is close to that, have a look at it's man page.
If you boot to a graphical login like gdm, xdm whatever, look at their documentation and find the scripts they use to start the xserver. You can probably add screenlayout profiles in a similar manner to adding Desktop Managers to the list of managers to choose from.
I've never done it, but I'm sure it's possible.
gehidore
11-12-2004, 03:38 AM
Originally posted by voidinit
Then if you startx, you can startx like:
startx -- -layout DoubleLayout
or
startx -- -layout SingleLayout
That's it! layouts! ( I think they work with anything not just nvidia/twinview )
Alex Cavnar, aka alc6379
11-12-2004, 06:33 PM
Originally posted by voidinit
Then if you startx, you can startx like:
startx -- -layout DoubleLayout
or
startx -- -layout SingleLayout
Beautiful!
But, are you sure that's specific to NVIDIA cards? That looks like it'd work for any dual monitor setup.
voidinit
12-01-2004, 01:40 AM
Wow, been away for awhile.
Yes, that works with any dual monitor setup. I think I was trying to say that setting up dual monitors was very easy with the Nvidia drivers....or something...I dunno, it was late. :)
je_fro
12-01-2004, 08:27 AM
I've got it setup to do with a keystroke using Twinview:
Section "Device"
Identifier "GeForce4 MMX"
Driver "nvidia"
#VideoRam 65536
# Insert Clocks lines here if appropriate
Option "RenderAccel" "On"
Option "NoLogo" "On"
Option "HWCursor" "On"
Option "NvAGP" "1"
Option "IgnoreDisplayDevices" "DFP"
Option "ConnectedMonitor" "CRT,CRT"
Option "UseEdidFreqs" "true"
Option "TwinView" "true"
Option "SecondMonitorHorizSync" "30-50"
Option "SecondMonitorVertRefresh" "60"
Option "ConnectedMonitor" "CRT,CRT"
Option "TVStandard" "NTSC-M"
Option "TVOutFormat" "SVIDEO"
Option "TwinViewOrientation" "Clone"
Option "MetaModes" "1600x1200,NULL;1600x1200,800x600"
EndSection
I'm using a TV here, and switching MetaModes with Ctrl-Alt + or Ctrl-Alt -
With my new video card, a 6800GT, the monitors are reversed...at least the default plug is some sort of DVI input which I don't use for my monitor...here's what it looks like now:
Section "Device"
Identifier "nvidia 6800"
Driver "nvidia"
#VideoRam 256000
# Insert Clocks lines here if appropriate
Option "RenderAccel" "false"
Option "NoLogo" "On"
Option "HWCursor" "On"
Option "NvAGP" "1"
Option "IgnoreDisplayDevices" "DFP"
Option "UseEdidFreqs" "true"
Option "TwinView" "true"
Option "ConnectedMonitor" "CRT-0,CRT-1"
# Option "SecondMonitorHorizSync" "30-50"
Option "SecondMonitorHorizSync" "38-96"
# Option "SecondMonitorVertRefresh" "60"
Option "SecondMonitorVertRefresh" "48-160"
Option "TVStandard" "NTSC-M"
Option "TVOutFormat" "SVIDEO"
Option "TwinViewOrientation" "Clone"
Option "MetaModes" "NULL,1600x1200;NULL,1280x1024;800x600,1600x1200"
EndSection
Notice that for both configs, the NULL value sends no signal, so the TV/monitor is effectively off.
justlinux.com
Copyright 2007 Jupitermedia Corporation All Rights Reserved.