Results 1 to 2 of 2

Thread: Multiple Video Cards and getting xorg.conf set up properly for multihead

  1. #1
    Member registered user
    Join Date
    Apr 2007
    Posts
    94

    Multiple Video Cards and getting xorg.conf set up properly for multihead

    I've always wanted to run dual video cards with linux. However, every time I try it I get really frustrated (because I don't really know what I'm doing with regards to X) and give up.

    I wish it were as easy as windows, where you just click on a few dialogs and things come up magically. I struggled with this so mightily I could just really say #%@#$#@$ and be happy with dualhead on a single card. Fiddling with /etc/X11/xorg.conf and trying to start X and trying over and over again. I had to go back to the internet many times to look for more ideas to try... This is so 1980s with manual configuration files and very little feedback as to what's going wrong. And I like to think that I'm fairly techno savvy.

    Knoppix works awesomely with a single video card with dual heads. ARandR is marvelous and "just works." However, things get tricky when you want to run multiple video cards.

    So I've got two cards: a geforce 7300 pci-e card with 2 heads and a geforce mx420 pci card with vga.

    Knoppix actually detects both perfectly and brings up a text display on both cards. The hard part is configuring the /etc/X11/xorg.conf file.

    Here's what "works for me":

    lspci

    1:00.0 VGA compatible controller: NVIDIA Corporation G72 [GeForce 7300 LE] (rev a1)
    03:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5754 Gigabit Ethernet PCI Express (rev 02)
    04:02.0 VGA compatible controller: NVIDIA Corporation NV17 [GeForce4 MX 420] (rev a3)

    card0 is the geforce 7300LE
    card1 is the geforce mx420

    so I need to know the actual outputs of each card, and you can see the pci BusID address by looking at /sys/class/drm

    knoppix@Microknoppix:~$ ls -l /sys/class/drm
    total 0
    lrwxrwxrwx 1 root root 0 Nov 23 22:29 card0 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0
    lrwxrwxrwx 1 root root 0 Nov 24 05:26 card0-DVI-I-1 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0/card0-DVI-I-1
    lrwxrwxrwx 1 root root 0 Nov 24 05:26 card0-TV-1 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0/card0-TV-1
    lrwxrwxrwx 1 root root 0 Nov 24 05:26 card0-VGA-1 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0/card0-VGA-1
    lrwxrwxrwx 1 root root 0 Nov 24 05:26 card1 -> ../../devices/pci0000:00/0000:00:1e.0/0000:04:02.0/drm/card1
    lrwxrwxrwx 1 root root 0 Nov 24 05:26 card1-TV-2 -> ../../devices/pci0000:00/0000:00:1e.0/0000:04:02.0/drm/card1/card1-TV-2
    lrwxrwxrwx 1 root root 0 Nov 24 05:26 card1-VGA-2 -> ../../devices/pci0000:00/0000:00:1e.0/0000:04:02.0/drm/card1/card1-VGA-2

    and

    knoppix@Microknoppix:~$ cat /sys/class/drm/*/status
    disconnected
    disconnected
    connected
    connected
    connected

    so it's VGA-1 on card0, VGA-2 and TV-2 on card1 are connected


    and excerpts from my xorg.conf from /etc/X11/xorg.conf

    # /etc/X11/xorg.conf

    Section "ServerLayout"
    Identifier "XFree86 Configured"
    Screen 0 "Screen0" 0 0
    Screen 1 "Screen1" RightOf "Screen0"

    Option "Xinerama" "true"
    Option "Clone" "off"
    Option "AIGLX" "true"

    EndSection

    Section "Monitor"
    Identifier "Monitor0"
    ModelName "Generic Monitor"
    EndSection

    Section "Monitor"
    Identifier "Monitor1"
    ModelName "Generic Monitor"
    EndSection

    Section "Device"
    Identifier "Card1"
    Driver "nouveau"
    VendorName "All"
    BoardName "All"
    BusID "PCI:4:2:0"
    Option "ZaphodHeads" "VGA-2"
    EndSection

    Section "Device"
    Identifier "Card0"
    Driver "nouveau"
    VendorName "All"
    BoardName "All"
    BusID "PCI:1:0:0"
    Option "ZaphodHeads" "VGA-1"
    EndSection

    Section "Screen"
    Identifier "Screen0"
    Device "Card1"
    Monitor "Monitor0"
    EndSection

    Section "Screen"
    Identifier "Screen1"
    Device "Card0"
    Monitor "Monitor1"
    EndSection

    I got another monitor and wanted to hook it up to card 0, so I added a few things:


    Section "ServerLayout"
    Identifier "X.org Configured"
    Option "Xinerama" "on"
    Option "Clone" "off"
    Screen 0 "Screen0" 0 0
    Screen 1 "Screen1" RightOf "Screen0"
    Screen 2 "Screen2" RightOf "Screen1" #added screen 2 here

    InputDevice "Mouse0" "CorePointer"
    InputDevice "Keyboard0" "CoreKeyboard"
    Option "AllowEmptyInput" "off"
    EndSection

    Section "Monitor"
    Identifier "Monitor2"
    VendorName "Monitor Vendor"
    ModelName "Monitor Model"
    EndSection

    Section "Device"
    Option "ZaphodHeads" "VGA-1"
    Identifier "Card0"
    Driver "nouveau"
    BusID "PCI:1:0:0"
    Screen 0
    EndSection

    Section "Device"
    Option "ZaphodHeads" "DVI-I-1"
    Identifier "Card0-DVI"
    Driver "nouveau"
    BusID "PCI:1:0:0"
    Screen 1
    EndSection

    Section "Screen"
    Identifier "Screen2"
    Device "Card0-DVI"
    Monitor "Monitor1"
    EndSection


    note that if you set the wrong screen number (like Screen 1 instead of Screen 0) in the Section "Device" the configuration will not work and you will get a message like this in /var/log/Xorg.0.log

    Xorg Screen 1 deleted because of no matching config

    This is an easy fix, just swap the screen numbers until it works. So I tried Screen 0 for Section "Device" Identifier Card0-DVI", and it didn't work so I went with Screen 1 which did. Note that this Screen number in the Section "Device" refers to the screens "internally numbered" for each head on a given card, and does not have anything to do with the Section "Screen". That was something I found a bit confusing.


    You can omit the Screen number in the Section "Device" but it will only display a clone of the other head on the card.

    a few tips and tricks:

    boot with "knoppix 2" and then use

    X -configure (to have Xorg try to generate an autoconfiguration, it puts a heck of a lot of crud into the file, but it does show you some ideas and structure. I think it made 7 different devices and screens, duplicating the card 3 or 4 times for different drivers)

    X -config <filename> (to have Xorg use a different file location than /etc/X11/xorg.conf)

    X -retro (to test your xorg.conf with a checkerboard background and the retro X pointer because when you launch X, the background is black and there's no mouse pointer)

    and also the CTRL+ALT+BACKSPACE keystroke to kill the X server.

    less /var/log/Xorg.0.log to see any error messages
    less /var/log/Xorg.0.log | grep EE (to see any error events)

    So I'd do a bunch of edits with "emacs /etc/X11/xorg.conf", then save the changes, and then launch "X -retro" to test them out. I'd exit the X server with CTRL+ALT+BACKSPACE. Once I'd get a setup that would work, I'd save it and reboot knoppix normally. (and I removed the line at the top of xorg.conf that tells knoppix to autogenerate this file on reboot.) Also note that I'm using knoppix with a "persistent" imagefile so /etc/X11/xorg.conf persists through reboots.

    You can also do the editing within X-windows if you're brave, just emacs /etc/X11/xorg.conf from a terminal window, then CTRL+ALT+BACKSPACE which will kill and relaunch the X session, reading in your new xorg.conf.

    My full xorg.conf:

    Section "ServerLayout"
    Identifier "X.org Configured"
    Option "Xinerama" "on"
    Option "Clone" "off"
    Screen 0 "Screen0" 0 0
    Screen 1 "Screen1" RightOf "Screen0"
    Screen 2 "Screen2" RightOf "Screen1"

    InputDevice "Mouse0" "CorePointer"
    InputDevice "Keyboard0" "CoreKeyboard"
    Option "AllowEmptyInput" "off"
    EndSection

    Section "Files"
    ModulePath "/usr/lib/xorg/modules"
    FontPath "/usr/share/fonts/X11/misc"
    FontPath "/usr/share/fonts/X11/cyrillic"
    FontPath "/usr/share/fonts/X11/100dpi/:unscaled"
    FontPath "/usr/share/fonts/X11/75dpi/:unscaled"
    FontPath "/usr/share/fonts/X11/Type1"
    FontPath "/usr/share/fonts/X11/100dpi"
    FontPath "/usr/share/fonts/X11/75dpi"
    FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
    FontPath "built-ins"
    EndSection

    Section "Module"
    Load "dbe"
    Load "dri"
    Load "dri2"
    Load "extmod"
    Load "glx"
    Load "record"
    EndSection

    Section "InputDevice"
    Identifier "Keyboard0"
    Driver "kbd"
    EndSection

    Section "InputDevice"
    Identifier "Mouse0"
    Driver "mouse"
    Option "Protocol" "auto"
    Option "Device" "/dev/input/mice"
    Option "ZAxisMapping" "4 5 6 7"
    EndSection

    Section "Monitor"
    Identifier "Monitor0"
    VendorName "Monitor Vendor"
    ModelName "Monitor Model"
    EndSection

    Section "Monitor"
    Identifier "Monitor1"
    VendorName "Monitor Vendor"
    ModelName "Monitor Model"
    EndSection
    Section "Monitor"
    Identifier "Monitor2"
    VendorName "Monitor Vendor"
    ModelName "Monitor Model"
    EndSection

    Section "Device"
    Option "ZaphodHeads" "VGA-1"
    Identifier "Card0"
    Driver "nouveau"
    BusID "PCI:1:0:0"
    Screen 0
    EndSection

    Section "Device"
    Option "ZaphodHeads" "DVI-I-1"
    Identifier "Card0-DVI"
    Driver "nouveau"
    BusID "PCI:1:0:0"
    Screen 1
    EndSection

    Section "Device"
    Option "ZaphodHeads" "VGA-2"
    Identifier "Card1"
    Driver "nouveau"
    BusID "PCI:4:2:0"
    EndSection

    Section "Screen"
    Identifier "Screen0"
    Device "Card1"
    Monitor "Monitor0"
    EndSection

    Section "Screen"
    Identifier "Screen1"
    Device "Card0"
    Monitor "Monitor1"
    EndSection

    Section "Screen"
    Identifier "Screen2"
    Device "Card0-DVI"
    Monitor "Monitor1"
    EndSection


    Section "DRI"
    Mode 0666
    EndSection

  2. #2
    Member registered user
    Join Date
    Apr 2007
    Posts
    94
    I thought I had this multiple video card thing figured out... and so I tried a radeon 7000 PCI with my geforce 7300 PCI-E and couldn't get it work. And then I tried a geforce 6200 PCI with a geforce 7300 PCI-E and couldn't get that to work properly. I could actually get all 4 monitors to come up with "X -retro" with a heck of a lot of fiddling on xorg.conf... but it wouldn't work properly with the full X session GUI. I guess that getting the geforce 7300 PCI-E to work with a Geforce MX420 PCI was a lucky combination. Too bad. I really really wanted it to work.

Posting Permissions

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


HyperX FURY DDR4 16GB 32GB 64GB 2666MHz PC4-21300 Desktop RAM Memory DIMM 288Pin picture

HyperX FURY DDR4 16GB 32GB 64GB 2666MHz PC4-21300 Desktop RAM Memory DIMM 288Pin

$119.80



A-Tech 8GB DDR3 1600 PC3-12800 Laptop SODIMM 204-Pin Memory RAM PC3L DDR3L 1x 8G picture

A-Tech 8GB DDR3 1600 PC3-12800 Laptop SODIMM 204-Pin Memory RAM PC3L DDR3L 1x 8G

$13.99



Team T-FORCE VULCAN Z 16GB (2 x 8GB) 288-Pin PC RAM DDR4 3200 (PC4 25600) XMP picture

Team T-FORCE VULCAN Z 16GB (2 x 8GB) 288-Pin PC RAM DDR4 3200 (PC4 25600) XMP

$35.99



HyperX FURY DDR3 8GB 16GB 32GB 1600 MHz PC3-12800 Desktop RAM Memory DIMM 240pin picture

HyperX FURY DDR3 8GB 16GB 32GB 1600 MHz PC3-12800 Desktop RAM Memory DIMM 240pin

$12.90



Crucial DDR3L 16GB 1600 2x 8GB PC3-12800 Laptop SODIMM Memory RAM PC3 16G DDR3 picture

Crucial DDR3L 16GB 1600 2x 8GB PC3-12800 Laptop SODIMM Memory RAM PC3 16G DDR3

$21.50



Crucial 16GB (2x 8GB) Kit DDR3L 1600MHz PC3-12800 UDIMM Desktop 240-Pin CL11 RAM picture

Crucial 16GB (2x 8GB) Kit DDR3L 1600MHz PC3-12800 UDIMM Desktop 240-Pin CL11 RAM

$23.33



Patriot Viper Steel 16GB 288-Pin PC RAM DDR4 3600 (PC4 28800) Intel XMP 2.0 Desk picture

Patriot Viper Steel 16GB 288-Pin PC RAM DDR4 3600 (PC4 28800) Intel XMP 2.0 Desk

$31.95



Samsung  8 GB PC4-17000 DDR4-2133 1Rx8 DDR4 Desktop Memory HP P/N  798034-001 picture

Samsung 8 GB PC4-17000 DDR4-2133 1Rx8 DDR4 Desktop Memory HP P/N 798034-001

$10.00



HyperX FURY DDR4 16GB 3200 MHz PC4-25600 Desktop RAM Memory DIMM 288pin 2x 16GB picture

HyperX FURY DDR4 16GB 3200 MHz PC4-25600 Desktop RAM Memory DIMM 288pin 2x 16GB

$127.20



HyperX FURY DDR4 64GB (4x16GB) 3200MHz PC4-25600 Desktop RAM Memory DIMM 288PIN picture

HyperX FURY DDR4 64GB (4x16GB) 3200MHz PC4-25600 Desktop RAM Memory DIMM 288PIN

$129.95