-   Linux - Hardware (
-   -   Dual head xinerama gives weird issues (

davidm3 07-13-2013 04:01 PM

Dual head xinerama gives weird issues
Hi everyone,

I was tinkering with some old hardware I had lying around with a fresh install of Debian. The motherboard has an onboard ProSavage card, and I added a PCI Matrox VGA card (yes, I know, most of you will tell me to throw that junk away, but bear with me :-P ).

Output of `lspci':

00:09.0 VGA compatible controller: Matrox Graphics, Inc. MGA 1064SG [Mystique] (rev 03)
01:00.0 VGA compatible controller: S3 Inc. VT8375 [ProSavage8 KM266/KL266]

So both cards are clearly recognized (no `dmesg' errors).

I wanted to try if I could use both displays in Xinerama mode. The only available video card option in my bios was to select the default device (which I set to the on-board S3 savage).
If I started an X server with no xorg.conf, only one videocard was activated (`xrandr' only gave options for one display). To avoid this restriction, I generated a xorg.conf (with `X -configure'), which suprisingly lists both cards. I configured the file to use minimum resolutions and color dept (to avoid running out of RAM):


Section "ServerLayout"
        Identifier    " Configured"
        Screen      0  "Screen0"
        Screen      1  "Screen1" RightOf "Screen0"
        Option        "Xinerama" "1"
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"

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"                                                                                                                                                   

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

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

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

Section "Monitor"
        Identifier  "Monitor0"
        VendorName  "HWP"
        ModelName    "HP L1950"
        HorizSync    24.0 - 83.0
        VertRefresh  50.0 - 77.0
        Option      "DPMS"

Section "Monitor"
        Identifier  "Monitor1"
        VendorName  "Dell"
        ModelName    "Dell Monitor"

Section "Device"
        Identifier  "Card0"
        Driver      "savage"
        VendorName  "S3 Inc."
        BoardName  "VT8375 [ProSavage8 KM266/KL266]"
        BusID      "PCI:1:0:0"

Section "Device"
      Identifier  "Card1"
      Driver      "mga"
      VendorName  "Matrox Graphics, Inc."
      BoardName  "MGA 1064SG [Mystique]"
      BusID      "PCI:0:9:0"

Section "Screen"
        Identifier "Screen0"
        Device    "Card0"
        Monitor    "Monitor0"
        DefaultDepth 16
        SubSection "Display"
              Depth    16
              Modes    "640x480"
              ViewPort  0 0
              Virtual  640 480

Section "Screen"
      Identifier "Screen1"
      Device    "Card1"
      Monitor    "Monitor1"
        DefaultDepth 16
      SubSection "Display"
              Depth    16
              Modes    "640x480"
              Viewport  0 0
              Virtual  640 480

When I start up the x server, both displays work. However, when I try to move the mouse pointer to the other screen, my PC freezes, and I have to reboot (ctrl-alt-escape does not work, and I can't get back to another tty terminal). I tried out every combination of settings (different default device in bios, without xinerama option enabled, with other color depths and resolutions, etc.). The problem remains the same. When I change the header of the xorg.conf to only enable one screen, my screen shows a lot of flickering (is usable, but there is obviously something wrong). When I comment out one of the video cards, the remaining display is working just fine as should.
I uploaded a copy of the Xorg.log file, but it isn't giving me any hints.

I was merely wondering why both devices cannot be used together?

Any comment or remarks (even silly ones :-P) are welcome. Thanks in advance!

davidm3 07-15-2013 03:23 AM

I looked into it somewhat further. I really can't find any issue (both cards work perfectly when the other is deactivated).
Just for testing, I tried to do the same in Windows 2000 (that was still present on the hard drive). After installing the new PCI Matrox card drivers and rebooting, windows freezes while booting, so I don't even manage to get something to the second screen there.
My best guess would be that the motherboard (Asrock K7VM2) bios only initializes the primary card that was selected in the bios.

davidm3 07-18-2013 09:11 AM

I've managed to get the dual screen setup working in windows 2000 by reinstalling the motherboard drivers (asrock K7VM2).
In debian on the contrary, the situation still seems hopeless.
When I configure the external PCI card as primary card (in the bios) and try to run my xserver on the on-board S3 card, it works, but with a lot of glitches on the screen.
When I try to run both the PCI card and on-board card in Xinerama-mode, the system still freezes.
I've tried to replace the 'mga' driver with a generic 'vesa' one, which seemed to work at first, but the system still crashes at random points.

jp734 07-18-2013 06:42 PM

Try only one virtual option and put it on screen 0. If two 640x480, make it "virtual 1280 960" and see how that goes.

davidm3 07-19-2013 01:39 AM

I tried both with the virtual options on and off.
If I put both screens in 640x480 mode and define one virtual 1280x480 as you suggested,
the first screen only shows part of the 1280x480 virtual screen (as in: when you move the cursor the screen is panning along). It still crashes when trying to move the cursor to the other screen though.

What I find weird: when the xserver crashes, I can't just go back to tty1 to kill it. No key combination seems to respond (except for the AltGr-SysRq ones).

jp734 07-19-2013 04:55 AM

Have you tried using xrandr? What does it show yiu after executing it without options?

davidm3 07-19-2013 07:08 AM

If I start my x server without any xorg.conf file, only the primary video card's display is activated and listed in xrandr (the `primary video card' being the one I selected in my bios as primary).
If I start my x server with a custom xorg.conf file, well, I can't really comment on the output of xrandr because before I can open an xterm the system freezes.

jp734 07-20-2013 08:30 PM

My guess, and this is really just guessing, would be the alloted memory to your on-board video card. Being an on-board card (savage), it is probably using a shared memory. How much RAM is installed on the motherboard? If you have the RAM maxed out, try going to BIOS setup and allot as much RAM as possible to the video card, max it out if you think you will have enough left for the system. The Mystique will probably have 8MB of ram.

Research something about virtual screen size and memory needed to accomodate it. This is pretty much in response to you getting the spanning with one virtual option 1280 480 on screen 0.

You asked for silly response, you might have gotten it. LOL :-)

davidm3 07-21-2013 12:53 AM

That could indeed a problem. The on-board is sharing memory with the main RAM (I can set the number in the bios, and set it to the minimum of 8MB). The main board has a total of 512MB, which should be fine, I guess? The Matrox card has an on-board 2MB which I expanded to 4MB.
Considering that both screens can run at a resolution of 1280x1024x8bit per pixel < 4MB, that should not be the issue. Also, `top' isn't showing any unusual high or low RAM usage.

I certainly thank you for your help :-) The virtual screen option seems not really a viable route to me. My best guess would be that the linux driver support for the motherboard chipset/graphics card is inadequate for what I am trying to do.
Oh well, easy come, easy go?

All times are GMT -5. The time now is 10:53 AM.