LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Gutsy - Ubuntu and Multi Monitors (https://www.linuxquestions.org/questions/linux-hardware-18/gutsy-ubuntu-and-multi-monitors-597618/)

seecoolguy 11-06-2007 05:43 PM

Gutsy - Ubuntu and Multi Monitors
 
I have Ubuntu64 (Gusty) installed on my Dell M65 (Core2Duo). I use it to host my VMware for my work Windows PC. It has been serving me well except for when I travel I need to constantly remember to edit my xorg.conf file I have saved each on my hdd so that I can do this easily Simply copy xorg.conf.laptop when I am on the go, or use xorg.conf.multi for when I work in the office and it is docked in the docking station.

My xorg.conf.laptop file looks like this:

Code:

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 1.0  (buildmeister@builder26)  Thu Nov  9 17:56:28 PST 2006

Section "ServerLayout"
    Identifier    "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
    RgbPath        "/usr/X11R6/lib/X11/rgb"
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      "DELL 1707FP"
    HorizSync      30.0 - 81.0
    VertRefresh    56.0 - 76.0
    Option        "DPMS"
EndSection

Section "Device"
    Identifier    "Videocard0"
    Driver        "nvidia"
    VendorName    "NVIDIA Corporation"
    BoardName      "Quadro FX 350M"
EndSection

Section "Screen"
    Identifier    "Screen0"
    Device        "Videocard0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option        "metamodes" "DFP-1: nvidia-auto-select +0+0"
    SubSection    "Display"
        Depth      24
        Modes      "1600x1200" "1280x1024" "1024x768" "800x600" "640x480"
    EndSubSection
EndSection




While my Multi-monitor xorg.conf.multi

Code:

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 1.0  (buildmeister@builder26)  Thu Nov  9 17:56:28 PST 2006

Section "ServerLayout"
    Identifier    "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
    RgbPath        "/usr/X11R6/lib/X11/rgb"
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      "Matrox"
    HorizSync      31.0 - 91.0
    VertRefresh    60.0 - 85.0
    Option        "DPMS"
EndSection

Section "Device"
    Identifier    "Videocard0"
    Driver        "nvidia"
    VendorName    "NVIDIA Corporation"
    BoardName      "Quadro FX 350M"
EndSection

Section "Screen"
    Identifier    "Screen0"
    Device        "Videocard0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option        "TwinView" "1"
    Option        "metamodes" "CRT: nvidia-auto-select +1280+0, DFP-1: nvidia-auto-select +0+0"
    SubSection    "Display"
        Depth      24
        Modes      "1600x1200" "1280x1024" "1024x768" "800x600" "640x480"
    EndSubSection
EndSection


Simon Bridge 11-08-2007 04:49 AM

Cool... and is there a question in there?

seecoolguy 11-08-2007 11:49 PM

hahaha, doh! I was so focused on making sure I placed both config files that I forgot to ask, how do I get my ubuntu laptop to do this sort of thing automatically that is to know that there is 3 monitors when on the docking station, or just the single monitor when I've undocked it?

Simon Bridge 11-09-2007 03:20 AM

Ahhh... don't think that can be done.
The way to make this easier would be to write a script to switch the configs.

SykeZareason 11-16-2007 04:52 PM

Automatically? Probably not. You can use xrandr to turn monitors on and off manually.

maroonbaboon 11-17-2007 06:11 PM

If Gutsy is similar to standard Debian there is a file /etc/init.d/xserver-xorg which is checked on boot to see if xorg.conf needs to be regenerated. This might be a good place to add a few lines to do the swap if the system can figure out which configuration is needed.

How to figure out the config? Maybe compare output of 'dmesg' in the two situations and see if there is a consistent difference? Then get the script to check for it. No idea if this would work.

seecoolguy 11-29-2007 10:30 PM

thanks for the input (and sorry for the late reply.


All times are GMT -5. The time now is 07:40 AM.