Results 1 to 10 of 10

Thread: Switch between Dual and Single Monitor

  1. #1
    Join Date
    Apr 2008
    Location
    /home
    Beans
    66

    Switch between Dual and Single Monitor

    Hello everyone,

    I am running Fluxbox as my desktop and having trouble trying to setup and easy way to switch between dual and single monitor setups. In Windows i can do this easily with a program called Ultramon. I have it setup so i use Ctrl-Alt-F1 and Ctrl-Alt-F2 to switch between single and dual. I tried to follow this tutorial but was unsuccessful;

    http://blog.dotkam.com/2007/06/02/sw..._ubuntu_linux/ .

    Heres is my single xorg.conf and my dual xorg.conf;

    DUAL

    Code:
    # nvidia-settings: X configuration file generated by nvidia-settings
    # nvidia-settings:  version 1.0  (buildd@vernadsky)  Thu Jun  5 09:26:53 UTC 2008
    # xorg.conf (X.Org 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 "Screen"
    	Identifier	"Default Screen"
    	Device		"Configured Video Device"
    	Monitor		"Configured Monitor"
    	Option		"AddARGBGLXVisuals"	"True"
    	Defaultdepth	24
    EndSection
    
    Section "Screen"
    	# Removed Option "metamodes" "DFP-0: nvidia-auto-select +0+0, DFP-1: nvidia-auto-select +1680+0"
    	# Removed Option "TwinViewXineramaInfoOrder" "DFP-1"
    	# Removed Option "TwinView" "1"
    	# Removed Option "metamodes" "DFP-0: nvidia-auto-select +0+0, DFP-1: 1920x1080_60 +1680+0"
    	# Removed Option "TwinView" "0"
    	# Removed Option "metamodes" "DFP-0: nvidia-auto-select +0+0"
    	Identifier	"Screen0"
    	Device		"Videocard0"
    	Monitor		"Monitor0"
    	Option		"TwinView"	"1"
    	Option		"TwinViewXineramaInfoOrder"	"DFP-0"
    	Option		"metamodes"	"DFP-0: nvidia-auto-select +0+0, DFP-1: nvidia-auto-select +1680+0"
    	Option		"AddARGBGLXVisuals"	"True"
    	Defaultdepth	24
    EndSection
    
    Section "Device"
    	Identifier	"Configured Video Device"
    	Driver		"nvidia"
    	Option		"NoLogo"	"True"
    EndSection
    
    Section "Device"
    	Identifier	"Videocard0"
    	Driver		"nvidia"
    	Vendorname	"NVIDIA Corporation"
    	Boardname	"GeForce 8800 GTS 512"
    	Option		"NvAGP"		"1"
    EndSection
    
    Section "InputDevice"
    	Identifier	"Generic Keyboard"
    	Driver		"kbd"
    	Option		"XkbRules"	"xorg"
    	Option		"XkbModel"	"pc105"
    	Option		"XkbLayout"	"us"
    EndSection
    
    Section "InputDevice"
    	Identifier	"Configured Mouse"
    	Driver		"mouse"
    	Option		"CorePointer"
    EndSection
    
    Section "ServerLayout"
    	Identifier	"Default Layout"
      screen 0 "Screen0" 0 0
    EndSection
    
    Section "Module"
    	Load		"glx"
    EndSection
    
    Section "Monitor"
    	Identifier	"Configured Monitor"
    EndSection
    
    Section "Monitor"
    	Identifier	"Monitor0"
    	Vendorname	"Unknown"
    	Modelname	"CMO CMC 22 W"
    	Horizsync	30.0	-	82.0
    	Vertrefresh	56.0	-	76.0
    EndSection
    
    Section "ServerFlags"
    	Option		"Xinerama"	"0"
    EndSection
    
    Section "Extensions"
    	Option		"Composite"	"Enable"
    EndSection
    SINGLE

    Code:
    # nvidia-settings: X configuration file generated by nvidia-settings
    # nvidia-settings:  version 1.0  (buildd@vernadsky)  Thu Jun  5 09:26:53 UTC 2008
    
    # xorg.conf (X.Org 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 "ServerLayout"
        Identifier     "Default Layout"
        Screen      0  "Screen0" 0 0
    EndSection
    
    Section "Module"
        Load           "glx"
    EndSection
    
    Section "ServerFlags"
        Option         "Xinerama" "0"
    EndSection
    
    Section "InputDevice"
        Identifier     "Generic Keyboard"
        Driver         "kbd"
        Option         "XkbRules" "xorg"
        Option         "XkbModel" "pc105"
        Option         "XkbLayout" "us"
    EndSection
    
    Section "InputDevice"
        Identifier     "Configured Mouse"
        Driver         "mouse"
        Option         "CorePointer"
    EndSection
    
    Section "Monitor"
        Identifier     "Configured Monitor"
    EndSection
    
    Section "Monitor"
        Identifier     "Monitor0"
        VendorName     "Unknown"
        ModelName      "CMO CMC 22 W"
        HorizSync       30.0 - 82.0
        VertRefresh     56.0 - 76.0
    EndSection
    
    Section "Device"
        Identifier     "Configured Video Device"
        Driver         "nvidia"
        Option         "NoLogo" "True"
    EndSection
    
    Section "Device"
        Identifier     "Videocard0"
        Driver         "nvidia"
        VendorName     "NVIDIA Corporation"
        BoardName      "GeForce 8800 GTS 512"
        Option         "NvAGP" "1"
    EndSection
    
    Section "Screen"
        Identifier     "Default Screen"
        Device         "Configured Video Device"
        Monitor        "Configured Monitor"
        DefaultDepth    24
        Option         "AddARGBGLXVisuals" "True"
    EndSection
    
    Section "Screen"
    
    	# Removed Option "metamodes" "DFP-0: nvidia-auto-select +0+0, DFP-1: nvidia-auto-select +1680+0"
    	# Removed Option "TwinViewXineramaInfoOrder" "DFP-1"
    	# Removed Option "TwinView" "1"
    	# Removed Option "metamodes" "DFP-0: nvidia-auto-select +0+0, DFP-1: 1920x1080_60 +1680+0"
    	# Removed Option "TwinView" "0"
    	# Removed Option "metamodes" "DFP-0: nvidia-auto-select +0+0"
    # Removed Option "metamodes" "DFP-0: nvidia-auto-select +0+0, DFP-1: nvidia-auto-select +1680+0"
        Identifier     "Screen0"
        Device         "Videocard0"
        Monitor        "Monitor0"
        DefaultDepth    24
        Option         "AddARGBGLXVisuals" "True"
        Option         "TwinView" "1"
        Option         "TwinViewXineramaInfoOrder" "DFP-0"
        Option         "metamodes" "DFP-0: nvidia-auto-select +0+0, DFP-1: NULL"
    EndSection
    
    Section "Extensions"
        Option         "Composite" "Enable"
    EndSection
    Any ideas on how to accomplish this? Thanks,

    GriFF

  2. #2
    Join Date
    Oct 2006
    Beans
    Hidden!

    [ SOLVED ] Switch between Dual and Single Monitor

    I finally found out a nice easy way to do this using xorg.conf and xrandr, which works with nvidia and maybe others.

    First, if you didn't already, set up the computer to use both monitors using nvidia-settings, and save the settings. I'm using twinview.

    Now make a backup of your /etc/X11/xorg.conf,

    Code:
    sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.before-metamodes.bak
    If you need to restore the backup at some time, you'll need to log in to the console (ctrl-alt-f1) and do:

    Code:
    sudo cp /etc/X11/xorg.conf.before-metamodes.bak /etc/X11/xorg.conf
    Now, edit /etc/X11/xorg.conf. If you use gedit:

    Code:
    sudo gedit /etc/X11/xorg.conf
    find the "metamodes" option, and add a mode for each monitor separately. Mine used to look like this:

    Code:
    Option "metamodes" "CRT: 1440x900_60 +0+0, DFP: 1280x800_60 +80+900"
    now it looks like this:

    Code:
    Option "metamodes" "CRT: 1440x900_60 +0+0, DFP: 1280x800_60 +80+900; CRT: NULL, DFP: 1280x800_60 +0+0; CRT: 1440x900_60 +0+0, DFP: NULL"
    There are three metamodes there, separated by semicolons ;

    To make the single-monitor metamodes, you should just copy the metamode for both monitors, and replace one monitor's settings with "NULL". Also, change the offset to +0+0.

    GriFF3n, for your setup I think you can use:

    Code:
    Option "metamodes" "DFP-0: nvidia-auto-select +0+0, DFP-1: nvidia-auto-select +1680+0; DFP-0: nvidia-auto-select +0+0, DFP-1: NULL; DFP-0: NULL, DFP-1: nvidia-auto-select +0+0"

    Now logout and login again, then type:

    Code:
    xrandr
    I get:

    Code:
    Screen 0: minimum 1280 x 800, current 1440 x 1700, maximum 1440 x 1700
    default connected 1440x1700+0+0 0mm x 0mm
       1440x1700      50.0* 
       1280x800       51.0  
       1440x900       52.0
    You can see xrandr now knows about 3 modes, you can select them like:

    Code:
    xrandr -s 0
    xrandr -s 1
    xrandr -s 2
    or:

    Code:
    xrandr -s 1440x1700

    If you have two monitors at the same resolution, you can use the first way "xrandr -s 1" etc, or something like:

    Code:
    xrandr -s 1280x800 --rate 51
    Nvidia uses the "rate" option in xrandr to distinguish metamodes that have the same resolution.

    I tried using nv-control-dpy and some different scripts that I found, it didn't work properly and it's complicated, I think this is a much better and easier way.
    Last edited by swatkins; January 2nd, 2009 at 08:22 PM.

  3. #3
    Join Date
    Oct 2007
    Location
    Atlanta, GA
    Beans
    9
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Switch between Dual and Single Monitor

    sweet fancy moses, thank you. This is exactly what I needed.

  4. #4
    Join Date
    Apr 2008
    Location
    Donetsk, Ukraine
    Beans
    8
    Distro
    Ubuntu 10.04 Lucid Lynx

    Question Re: Switch between Dual and Single Monitor

    Hi, all.

    I had a trouble with Dual/Single Monitor configuration for my laptop last night.
    So, I am tired with switching my active monitor: when I am at home I use external LCD, and laptop's DFP otherwise. I was trying to make X.org automatically detect if external monitor is connected and if it is use it as default. I have succeed in most of the deal, but got a strange bug with GNOME desktop (at least I think with it).
    All is working fine, so GDM correctly chooses external LCD if it is plugged but when I am logginh in I see GNOME desktop loading and then it suddenly switches to laptop's DFP. Then I am able to use
    Code:
    xrandr -s 0
    to switch me back to plugged LCD.
    All my magic with xorg.conf didn't make me feel happy.
    Googling and other explorations weren't successful in finding solution.
    So, here is my xorg.conf:
    Code:
    Section "ServerLayout"
        Identifier     "Layout0"
        Screen      0  "Screen0" 0 0
        InputDevice    "Keyboard0" "CoreKeyboard"
        InputDevice    "Mouse0" "CorePointer"
    EndSection
    
    Section "Files"
    EndSection
    
    Section "Module"
        Load           "dbe"
        Load           "extmod"
        Load           "type1"
        Load           "freetype"
        Load           "glx"
    EndSection
    
    Section "ServerFlags"
        Option         "Xinerama" "0"
    EndSection
    
    Section "InputDevice"
    
        # generated from default
        Identifier     "Mouse0"
        Driver         "mouse"
        Option         "Protocol" "auto"
        Option         "Device" "/dev/psaux"
        Option         "Emulate3Buttons" "no"
        Option         "ZAxisMapping" "4 5"
    EndSection
    
    Section "InputDevice"
    
        # generated from default
        Identifier     "Keyboard0"
        Driver         "kbd"
    EndSection
    
    Section "Monitor"
        # HorizSync source: edid, VertRefresh source: edid
        Identifier     "Monitor0"
        VendorName     "Unknown"
        ModelName      "AUO"
        HorizSync       30.0 - 75.0
        VertRefresh     60.0
        Option         "DPMS"
    EndSection
    
    Section "Monitor"
        # HorizSync source: edid, VertRefresh source: edid
        Identifier     "Monitor1"
        VendorName     "Unknown"
        ModelName      "Samsung SyncMaster"
        HorizSync       30.0 - 81.0
        VertRefresh     56.0 - 75.0
        Option         "DPMS"
    EndSection
    
    Section "Device"
        Identifier     "Device0"
        Driver         "nvidia"
        VendorName     "NVIDIA Corporation"
        BoardName      "GeForce Go 6200"
    EndSection
    
    Section "Screen"
        Identifier     "Screen0"
        Device         "Device0"
        Monitor        "Monitor0"
        DefaultDepth    24
        Option         "NoLogo"
    CRT: NULL +0+0; CRT: nvidia-auto-select +0+0, DFP: NULL +0+0"
        Option         "TwinView"
        Option         "metamodes" "CRT-0: nvidia-auto-select +0+0, DFP-0: NULL +0+0; DFP-0: nvidia-auto-select +0+0, CRT-0: NULL +0+0"
        SubSection     "Display"
            Depth       24
        EndSubSection
    EndSection
    And my /var/log/Xorg.0.log (look at the last line first):
    Code:
    X.Org X Server 1.5.2
    Release Date: 10 October 2008
    X Protocol Version 11, Revision 0
    Build Operating System: Linux 2.6.24-19-server i686 Ubuntu
    Current Operating System: Linux trollik 2.6.27-9-generic #1 SMP Thu Nov 20 21:57:00 UTC 2008 i686
    Build Date: 24 October 2008  08:00:16AM
    xorg-server 2:1.5.2-2ubuntu3 (buildd@rothera.buildd) 
    	Before reporting problems, check http://wiki.x.org
    	to make sure that you have the latest version.
    Module Loader present
    Markers: (--) probed, (**) from config file, (==) default setting,
    	(++) from command line, (!!) notice, (II) informational,
    	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
    (==) Log file: "/var/log/Xorg.0.log", Time: Fri Jan 23 20:07:02 2009
    (==) Using config file: "/etc/X11/xorg.conf"
    (==) ServerLayout "Layout0"
    (**) |-->Screen "Screen0" (0)
    (**) |   |-->Monitor "Monitor0"
    (**) |   |-->Device "Device0"
    (**) |-->Input Device "Keyboard0"
    (**) |-->Input Device "Mouse0"
    (**) Option "Xinerama" "0"
    (==) Automatically adding devices
    (==) Automatically enabling devices
    (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
    	Entry deleted from font path.
    (==) FontPath set to:
    	/usr/share/fonts/X11/misc,
    	/usr/share/fonts/X11/100dpi/:unscaled,
    	/usr/share/fonts/X11/75dpi/:unscaled,
    	/usr/share/fonts/X11/Type1,
    	/usr/share/fonts/X11/100dpi,
    	/usr/share/fonts/X11/75dpi,
    	/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType
    (==) ModulePath set to "/usr/lib/xorg/modules"
    (II) Open ACPI successful (/var/run/acpid.socket)
    (II) Loader magic: 0x81d9a40
    (II) Module ABI versions:
    	X.Org ANSI C Emulation: 0.4
    	X.Org Video Driver: 4.1
    	X.Org XInput driver : 2.1
    	X.Org Server Extension : 1.1
    	X.Org Font Renderer : 0.6
    (II) Loader running on linux
    (++) using VT number 9
    
    (--) PCI:*(0@3:0:0) nVidia Corporation NV43 [GeForce Go 6200/6400] rev 161, Mem @ 0xfd000000/0, 0xc0000000/0, 0xfc000000/0, BIOS @ 0x????????/131072
    (II) System resource ranges:
    	[0] -1	0	0xffffffff - 0xffffffff (0x1) MX[B]
    	[1] -1	0	0x000f0000 - 0x000fffff (0x10000) MX[B]
    	[2] -1	0	0x000c0000 - 0x000effff (0x30000) MX[B]
    	[3] -1	0	0x00000000 - 0x0009ffff (0xa0000) MX[B]
    	[4] -1	0	0x0000ffff - 0x0000ffff (0x1) IX[B]
    	[5] -1	0	0x00000000 - 0x00000000 (0x1) IX[B]
    (II) "extmod" will be loaded. This was enabled by default and also specified in the config file.
    (II) "dbe" will be loaded. This was enabled by default and also specified in the config file.
    (II) "glx" will be loaded. This was enabled by default and also specified in the config file.
    (II) "freetype" will be loaded. This was enabled by default and also specified in the config file.
    (II) "record" will be loaded by default.
    (II) "dri" will be loaded by default.
    (II) LoadModule: "dbe"
    
    (II) Loading /usr/lib/xorg/modules/extensions//libdbe.so
    (II) Module dbe: vendor="X.Org Foundation"
    	compiled for 1.5.2, module version = 1.0.0
    	Module class: X.Org Server Extension
    	ABI class: X.Org Server Extension, version 1.1
    (II) Loading extension DOUBLE-BUFFER
    (II) LoadModule: "extmod"
    
    (II) Loading /usr/lib/xorg/modules/extensions//libextmod.so
    (II) Module extmod: vendor="X.Org Foundation"
    	compiled for 1.5.2, module version = 1.0.0
    	Module class: X.Org Server Extension
    	ABI class: X.Org Server Extension, version 1.1
    (II) Loading extension SHAPE
    (II) Loading extension MIT-SUNDRY-NONSTANDARD
    (II) Loading extension BIG-REQUESTS
    (II) Loading extension SYNC
    (II) Loading extension MIT-SCREEN-SAVER
    (II) Loading extension XC-MISC
    (II) Loading extension XFree86-VidModeExtension
    (II) Loading extension XFree86-Misc
    (II) Loading extension XFree86-DGA
    (II) Loading extension DPMS
    (II) Loading extension TOG-CUP
    (II) Loading extension Extended-Visual-Information
    (II) Loading extension XVideo
    (II) Loading extension XVideo-MotionCompensation
    (II) Loading extension X-Resource
    (II) LoadModule: "type1"
    
    (WW) Warning, couldn't open module type1
    (II) UnloadModule: "type1"
    (EE) Failed to load module "type1" (module does not exist, 0)
    (II) LoadModule: "freetype"
    
    (II) Loading /usr/lib/xorg/modules//fonts/libfreetype.so
    (II) Module freetype: vendor="X.Org Foundation & the After X-TT Project"
    	compiled for 1.5.2, module version = 2.1.0
    	Module class: X.Org Font Renderer
    	ABI class: X.Org Font Renderer, version 0.6
    (II) Loading font FreeType
    (II) LoadModule: "glx"
    
    (II) Loading /usr/lib/xorg/modules/extensions//libglx.so
    (II) Module glx: vendor="NVIDIA Corporation"
    	compiled for 4.0.2, module version = 1.0.0
    	Module class: X.Org Server Extension
    (II) NVIDIA GLX Module  177.82  Tue Nov  4 14:03:48 PST 2008
    (II) Loading extension GLX
    (II) LoadModule: "record"
    
    (II) Loading /usr/lib/xorg/modules/extensions//librecord.so
    (II) Module record: vendor="X.Org Foundation"
    	compiled for 1.5.2, module version = 1.13.0
    	Module class: X.Org Server Extension
    	ABI class: X.Org Server Extension, version 1.1
    (II) Loading extension RECORD
    (II) LoadModule: "dri"
    
    (II) Loading /usr/lib/xorg/modules/extensions//libdri.so
    (II) Module dri: vendor="X.Org Foundation"
    	compiled for 1.5.2, module version = 1.0.0
    	ABI class: X.Org Server Extension, version 1.1
    (II) Loading extension XFree86-DRI
    (II) LoadModule: "nvidia"
    
    (II) Loading /usr/lib/xorg/modules/drivers//nvidia_drv.so
    (II) Module nvidia: vendor="NVIDIA Corporation"
    	compiled for 4.0.2, module version = 1.0.0
    	Module class: X.Org Video Driver
    (II) LoadModule: "kbd"
    
    (II) Loading /usr/lib/xorg/modules/input//kbd_drv.so
    (II) Module kbd: vendor="X.Org Foundation"
    	compiled for 1.4.99.905, module version = 1.3.1
    	Module class: X.Org XInput Driver
    	ABI class: X.Org XInput driver, version 2.1
    (II) LoadModule: "mouse"
    
    (II) Loading /usr/lib/xorg/modules/input//mouse_drv.so
    (II) Module mouse: vendor="X.Org Foundation"
    	compiled for 1.4.99.905, module version = 1.3.0
    	Module class: X.Org XInput Driver
    	ABI class: X.Org XInput driver, version 2.1
    (II) NVIDIA dlloader X Driver  177.82  Tue Nov  4 13:42:45 PST 2008
    (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
    (II) Primary Device is: PCI 03@00:00:0
    (II) Loading sub module "fb"
    (II) LoadModule: "fb"
    
    (II) Loading /usr/lib/xorg/modules//libfb.so
    (II) Module fb: vendor="X.Org Foundation"
    	compiled for 1.5.2, module version = 1.0.0
    	ABI class: X.Org ANSI C Emulation, version 0.4
    (II) Loading sub module "wfb"
    (II) LoadModule: "wfb"
    
    (II) Loading /usr/lib/xorg/modules//libwfb.so
    (II) Module wfb: vendor="X.Org Foundation"
    	compiled for 1.5.2, module version = 1.0.0
    	ABI class: X.Org ANSI C Emulation, version 0.4
    (II) Loading sub module "ramdac"
    (II) LoadModule: "ramdac"
    (II) Module "ramdac" already built-in
    (II) resource ranges after probing:
    	[0] -1	0	0xffffffff - 0xffffffff (0x1) MX[B]
    	[1] -1	0	0x000f0000 - 0x000fffff (0x10000) MX[B]
    	[2] -1	0	0x000c0000 - 0x000effff (0x30000) MX[B]
    	[3] -1	0	0x00000000 - 0x0009ffff (0xa0000) MX[B]
    	[4] -1	0	0x0000ffff - 0x0000ffff (0x1) IX[B]
    	[5] -1	0	0x00000000 - 0x00000000 (0x1) IX[B]
    (**) NVIDIA(0): Depth 24, (--) framebuffer bpp 32
    (==) NVIDIA(0): RGB weight 888
    (==) NVIDIA(0): Default visual is TrueColor
    (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
    (**) NVIDIA(0): Option "NoLogo"
    (**) NVIDIA(0): Option "TwinView"
    (**) NVIDIA(0): Option "MetaModes" "CRT-0: nvidia-auto-select +0+0, DFP-0: NULL +0+0; DFP-0: nvidia-auto-select +0+0, CRT-0: NULL +0+0"
    (**) NVIDIA(0): Enabling RENDER acceleration
    (II) NVIDIA(0): Support for GLX with the Damage and Composite X extensions is
    (II) NVIDIA(0):     enabled.
    (II) NVIDIA(0): NVIDIA GPU GeForce Go 6200 (NV44) at PCI:3:0:0 (GPU-0)
    (--) NVIDIA(0): Memory: 262144 kBytes
    (--) NVIDIA(0): VideoBIOS: 05.44.02.31.12
    (II) NVIDIA(0): Detected PCI Express Link width: 16X
    (--) NVIDIA(0): Interlaced video modes are supported on this GPU
    (--) NVIDIA(0): Connected display device(s) on GeForce Go 6200 at PCI:3:0:0:
    (--) NVIDIA(0):     Samsung SyncMaster (CRT-0)
    (--) NVIDIA(0):     AUO (DFP-0)
    (--) NVIDIA(0): Samsung SyncMaster (CRT-0): 400.0 MHz maximum pixel clock
    (--) NVIDIA(0): AUO (DFP-0): 310.0 MHz maximum pixel clock
    (--) NVIDIA(0): AUO (DFP-0): Internal Dual Link LVDS
    (**) NVIDIA(0): TwinView enabled
    (II) NVIDIA(0): Display Devices found referenced in MetaMode: CRT-0, DFP-0
    (II) NVIDIA(0): Assigned Display Devices: CRT-0, DFP-0
    (II) NVIDIA(0): Validated modes:
    (II) NVIDIA(0):     "CRT-0:nvidia-auto-select+0+0,DFP-0:NULL+0+0"
    (II) NVIDIA(0):     "DFP-0:nvidia-auto-select+0+0,CRT-0:NULL+0+0"
    (II) NVIDIA(0): Virtual screen size determined to be 1680 x 1050
    (--) NVIDIA(0): DPI set to (90, 88); computed from "UseEdidDpi" X config
    (--) NVIDIA(0):     option
    (==) NVIDIA(0): Enabling 32-bit ARGB GLX visuals.
    (--) Depth 24 pixmap format is 32 bpp
    (II) do I need RAC?  No, I don't.
    (II) resource ranges after preInit:
    	[0] -1	0	0xffffffff - 0xffffffff (0x1) MX[B]
    	[1] -1	0	0x000f0000 - 0x000fffff (0x10000) MX[B]
    	[2] -1	0	0x000c0000 - 0x000effff (0x30000) MX[B]
    	[3] -1	0	0x00000000 - 0x0009ffff (0xa0000) MX[B]
    	[4] -1	0	0x0000ffff - 0x0000ffff (0x1) IX[B]
    	[5] -1	0	0x00000000 - 0x00000000 (0x1) IX[B]
    (II) NVIDIA(0): Initialized GPU GART.
    (II) NVIDIA(0): ACPI display change hotkey events enabled: the X server is new
    (II) NVIDIA(0):     enough to receive ACPI display change hotkey events.
    (II) NVIDIA(0): Setting mode "CRT-0:nvidia-auto-select+0+0,DFP-0:NULL+0+0"
    (II) Loading extension NV-GLX
    (II) NVIDIA(0): NVIDIA 3D Acceleration Architecture Initialized
    (II) NVIDIA(0): Using the NVIDIA 2D acceleration architecture
    (==) NVIDIA(0): Backing store disabled
    (==) NVIDIA(0): Silken mouse enabled
    (**) Option "dpms"
    (**) NVIDIA(0): DPMS enabled
    (II) Loading extension NV-CONTROL
    (II) Loading extension XINERAMA
    (==) RandR enabled
    (II) Initializing built-in extension MIT-SHM
    (II) Initializing built-in extension XInputExtension
    (II) Initializing built-in extension XTEST
    (II) Initializing built-in extension XKEYBOARD
    (II) Initializing built-in extension XC-APPGROUP
    (II) Initializing built-in extension SECURITY
    (II) Initializing built-in extension XINERAMA
    (II) Initializing built-in extension XFIXES
    (II) Initializing built-in extension RENDER
    (II) Initializing built-in extension RANDR
    (II) Initializing built-in extension COMPOSITE
    (II) Initializing built-in extension DAMAGE
    (II) Initializing built-in extension XEVIE
    (II) Initializing extension GLX
    (**) Option "CoreKeyboard"
    (**) Keyboard0: always reports core events
    (**) Option "Protocol" "standard"
    (**) Keyboard0: Protocol: standard
    (**) Option "AutoRepeat" "500 30"
    (**) Option "XkbRules" "xorg"
    (**) Keyboard0: XkbRules: "xorg"
    (**) Option "XkbModel" "pc105"
    (**) Keyboard0: XkbModel: "pc105"
    (**) Option "XkbLayout" "us"
    (**) Keyboard0: XkbLayout: "us"
    (**) Option "CustomKeycodes" "off"
    (**) Keyboard0: CustomKeycodes disabled
    (**) Option "Protocol" "auto"
    (**) Option "Device" "/dev/psaux"
    (II) Mouse0: Setting mouse protocol to "ExplorerPS/2"
    (**) Mouse0: Device: "/dev/psaux"
    (**) Mouse0: Protocol: "auto"
    (**) Option "CorePointer"
    (**) Mouse0: always reports core events
    (**) Option "Device" "/dev/psaux"
    (**) Option "Emulate3Buttons" "no"
    (**) Option "ZAxisMapping" "4 5"
    (**) Mouse0: ZAxisMapping: buttons 4 and 5
    (**) Mouse0: Buttons: 9
    (**) Mouse0: Sensitivity: 1
    (II) evaluating device (Keyboard0)
    (II) XINPUT: Adding extended input device "Keyboard0" (type: KEYBOARD)
    (II) evaluating device (Mouse0)
    (II) XINPUT: Adding extended input device "Mouse0" (type: MOUSE)
    (II) Mouse0: Setting mouse protocol to "ExplorerPS/2"
    (II) Mouse0: ps2EnableDataReporting: succeeded
    (II) config/hal: Adding input device Microsoft Natural? Ergonomic Keyboard 4000
    (II) LoadModule: "evdev"
    
    (II) Loading /usr/lib/xorg/modules/input//evdev_drv.so
    (II) Module evdev: vendor="X.Org Foundation"
    	compiled for 1.5.2, module version = 2.0.99
    	Module class: X.Org XInput Driver
    	ABI class: X.Org XInput driver, version 2.1
    (**) Microsoft Natural? Ergonomic Keyboard 4000: always reports core events
    (**) Microsoft Natural? Ergonomic Keyboard 4000: Device: "/dev/input/event11"
    (II) Microsoft Natural? Ergonomic Keyboard 4000: Found 1 mouse buttons
    (II) Microsoft Natural? Ergonomic Keyboard 4000: Found keys
    (II) Microsoft Natural? Ergonomic Keyboard 4000: Configuring as keyboard
    (II) XINPUT: Adding extended input device "Microsoft Natural? Ergonomic Keyboard 4000" (type: KEYBOARD)
    (**) Option "xkb_rules" "evdev"
    (**) Microsoft Natural? Ergonomic Keyboard 4000: xkb_rules: "evdev"
    (**) Option "xkb_model" "microsoft"
    (**) Microsoft Natural? Ergonomic Keyboard 4000: xkb_model: "microsoft"
    (**) Option "xkb_layout" "us"
    (**) Microsoft Natural? Ergonomic Keyboard 4000: xkb_layout: "us"
    (**) Option "xkb_options" "grp:lctrl_lshift_toggle,altwin:left_meta_win"
    (**) Microsoft Natural? Ergonomic Keyboard 4000: xkb_options: "grp:lctrl_lshift_toggle,altwin:left_meta_win"
    (**) Microsoft Natural? Ergonomic Keyboard 4000: YAxisMapping: buttons 4 and 5
    (**) Microsoft Natural? Ergonomic Keyboard 4000: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
    (II) config/hal: Adding input device Microsoft Natural? Ergonomic Keyboard 4000
    (**) Microsoft Natural? Ergonomic Keyboard 4000: always reports core events
    (**) Microsoft Natural? Ergonomic Keyboard 4000: Device: "/dev/input/event10"
    (II) Microsoft Natural? Ergonomic Keyboard 4000: Found keys
    (II) Microsoft Natural? Ergonomic Keyboard 4000: Configuring as keyboard
    (II) XINPUT: Adding extended input device "Microsoft Natural? Ergonomic Keyboard 4000" (type: KEYBOARD)
    (**) Option "xkb_rules" "evdev"
    (**) Microsoft Natural? Ergonomic Keyboard 4000: xkb_rules: "evdev"
    (**) Option "xkb_model" "microsoft"
    (**) Microsoft Natural? Ergonomic Keyboard 4000: xkb_model: "microsoft"
    (**) Option "xkb_layout" "us"
    (**) Microsoft Natural? Ergonomic Keyboard 4000: xkb_layout: "us"
    (**) Option "xkb_options" "grp:lctrl_lshift_toggle,altwin:left_meta_win"
    (**) Microsoft Natural? Ergonomic Keyboard 4000: xkb_options: "grp:lctrl_lshift_toggle,altwin:left_meta_win"
    (II) config/hal: Adding input device Macintosh mouse button emulation
    (**) Macintosh mouse button emulation: always reports core events
    (**) Macintosh mouse button emulation: Device: "/dev/input/event0"
    (II) Macintosh mouse button emulation: Found x and y relative axes
    (II) Macintosh mouse button emulation: Found 3 mouse buttons
    (II) Macintosh mouse button emulation: Configuring as mouse
    (II) XINPUT: Adding extended input device "Macintosh mouse button emulation" (type: MOUSE)
    (**) Macintosh mouse button emulation: YAxisMapping: buttons 4 and 5
    (**) Macintosh mouse button emulation: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
    (II) config/hal: Adding input device AT Translated Set 2 keyboard
    (**) AT Translated Set 2 keyboard: always reports core events
    (**) AT Translated Set 2 keyboard: Device: "/dev/input/event1"
    (II) AT Translated Set 2 keyboard: Found keys
    (II) AT Translated Set 2 keyboard: Configuring as keyboard
    (II) XINPUT: Adding extended input device "AT Translated Set 2 keyboard" (type: KEYBOARD)
    (**) Option "xkb_rules" "evdev"
    (**) AT Translated Set 2 keyboard: xkb_rules: "evdev"
    (**) Option "xkb_model" "microsoft"
    (**) AT Translated Set 2 keyboard: xkb_model: "microsoft"
    (**) Option "xkb_layout" "us"
    (**) AT Translated Set 2 keyboard: xkb_layout: "us"
    (**) Option "xkb_options" "grp:lctrl_lshift_toggle,altwin:left_meta_win"
    (**) AT Translated Set 2 keyboard: xkb_options: "grp:lctrl_lshift_toggle,altwin:left_meta_win"
    (II) config/hal: Adding input device Logitech USB Receiver
    (**) Logitech USB Receiver: always reports core events
    (**) Logitech USB Receiver: Device: "/dev/input/event3"
    (II) Logitech USB Receiver: Found 1 mouse buttons
    (II) Logitech USB Receiver: Found keys
    (II) Logitech USB Receiver: Configuring as keyboard
    (II) XINPUT: Adding extended input device "Logitech USB Receiver" (type: KEYBOARD)
    (**) Option "xkb_rules" "evdev"
    (**) Logitech USB Receiver: xkb_rules: "evdev"
    (**) Option "xkb_model" "microsoft"
    (**) Logitech USB Receiver: xkb_model: "microsoft"
    (**) Option "xkb_layout" "us"
    (**) Logitech USB Receiver: xkb_layout: "us"
    (**) Option "xkb_options" "grp:lctrl_lshift_toggle,altwin:left_meta_win"
    (**) Logitech USB Receiver: xkb_options: "grp:lctrl_lshift_toggle,altwin:left_meta_win"
    (**) Logitech USB Receiver: YAxisMapping: buttons 4 and 5
    (**) Logitech USB Receiver: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
    (II) config/hal: Adding input device Logitech USB Receiver
    (**) Logitech USB Receiver: always reports core events
    (**) Logitech USB Receiver: Device: "/dev/input/event2"
    (II) Logitech USB Receiver: Found x and y relative axes
    (II) Logitech USB Receiver: Found 16 mouse buttons
    (II) Logitech USB Receiver: Configuring as mouse
    (II) XINPUT: Adding extended input device "Logitech USB Receiver" (type: MOUSE)
    (**) Logitech USB Receiver: YAxisMapping: buttons 4 and 5
    (**) Logitech USB Receiver: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
    (II) config/hal: Adding input device Video Bus
    (**) Video Bus: always reports core events
    (**) Video Bus: Device: "/dev/input/event9"
    (II) Video Bus: Found keys
    (II) Video Bus: Configuring as keyboard
    (II) XINPUT: Adding extended input device "Video Bus" (type: KEYBOARD)
    (**) Option "xkb_rules" "evdev"
    (**) Video Bus: xkb_rules: "evdev"
    (**) Option "xkb_model" "microsoft"
    (**) Video Bus: xkb_model: "microsoft"
    (**) Option "xkb_layout" "us"
    (**) Video Bus: xkb_layout: "us"
    (**) Option "xkb_options" "grp:lctrl_lshift_toggle,altwin:left_meta_win"
    (**) Video Bus: xkb_options: "grp:lctrl_lshift_toggle,altwin:left_meta_win"
    (II) config/hal: Adding input device Video Bus
    (**) Video Bus: always reports core events
    (**) Video Bus: Device: "/dev/input/event8"
    (II) Video Bus: Found keys
    (II) Video Bus: Configuring as keyboard
    (II) XINPUT: Adding extended input device "Video Bus" (type: KEYBOARD)
    (**) Option "xkb_rules" "evdev"
    (**) Video Bus: xkb_rules: "evdev"
    (**) Option "xkb_model" "microsoft"
    (**) Video Bus: xkb_model: "microsoft"
    (**) Option "xkb_layout" "us"
    (**) Video Bus: xkb_layout: "us"
    (**) Option "xkb_options" "grp:lctrl_lshift_toggle,altwin:left_meta_win"
    (**) Video Bus: xkb_options: "grp:lctrl_lshift_toggle,altwin:left_meta_win"
    AUDIT: Fri Jan 23 20:07:07 2009: 8994 X: client 4 rejected from local host ( uid=0 gid=0 pid=9029 )
    AUDIT: Fri Jan 23 20:07:14 2009: 8994 X: client 4 rejected from local host ( uid=1000 gid=1000 pid=9037 )
    AUDIT: Fri Jan 23 20:07:14 2009: 8994 X: client 4 rejected from local host ( uid=1000 gid=1000 pid=9038 )
    AUDIT: Fri Jan 23 20:07:14 2009: 8994 X: client 4 rejected from local host ( uid=1000 gid=1000 pid=9039 )
    (II) NVIDIA(0): Setting mode "DFP-0:nvidia-auto-select+0+0,CRT-0:NULL+0+0"
    And one more question. As I have understood X.org disables TwinView extension if only one monitor is connected. Isn't there any workaround to make X.org know when I connect second LCD to load TwinView and enable me to switch to it using xrandr without restart my X session?

    Thanks in advance.

  5. #5
    Join Date
    Feb 2005
    Beans
    130

    Re: Switch between Dual and Single Monitor

    Quote Originally Posted by WiseTroll View Post
    And one more question. As I have understood X.org disables TwinView extension if only one monitor is connected. Isn't there any workaround to make X.org know when I connect second LCD to load TwinView and enable me to switch to it using xrandr without restart my X session?
    There are two options for this:

    a) load up nvidia-settings and click "detect displays" and then enable twinview on the new display. not suitable for automation.

    b) use the sample code nv-control-dpy provided in the source tarball for nvidia-settings. For me, this means executing this:

    Code:
    ./nv-control-dpy --probe-dpys            #this detects the newly attached display
    ./nv-control-dpy --dynamic-twinview      #this turns on twinview
    ./nv-control-dpy --add-metamode 'DFP-0: NULL, CRT-0: nvidia-auto-select'
    Then if you look at "xrandr -q", you will see a new mode corresponding to your external display (CRT-0 in my case).

  6. #6
    Join Date
    Apr 2008
    Location
    Donetsk, Ukraine
    Beans
    8
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Switch between Dual and Single Monitor

    pestilence4hr, thanks I'll play with it on weekends.

    Unfortunately, I still haven't found any solution with the GNOME switching my metamode...

  7. #7
    Join Date
    Dec 2007
    Beans
    2

    Re: Switch between Dual and Single Monitor

    Pretty slick... Worked on karmic. Thanks alot.

  8. #8
    Join Date
    Feb 2009
    Location
    Bay Area, CA
    Beans
    117
    Distro
    Xubuntu 12.10 Quantal Quetzal

    Re: Switch between Dual and Single Monitor

    Unplug one of your monitors imo.
    Ah nuts.

  9. #9
    Join Date
    Jul 2010
    Beans
    1

    Smile Re: Switch between Dual and Single Monitor

    Thanks swatkins, your solution works wonderfully, I finally managed to switch between monitors easily by adding a shortcut key associated with xrandr -s command!!

    THANKS!!

  10. #10
    Join Date
    Aug 2011
    Beans
    1

    Re: Switch between Dual and Single Monitor

    Thank you guys. That was exactly what I was looking for. Thumbs up (y)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •