You are not logged in.

#1 2008-11-18 12:10:24

mrmonday
Member
Registered: 2008-11-15
Posts: 11

Configuring X for multiple monitors

I've just installed arch (x86_64), and was wondering how to set up multiple monitors with the desktop being extended rather than mirrored.

My Specs:
* MacBook (SantaRosa, 3.1)
* Intel Core 2 Duo 2.2ghz
* 2GB Ram
* Built in 1280x800 LCD
* External DVI 1680x1050 LCD

Currently only the built in monitor works (at the correct resolution), and if I switch to a virtual console and back to X then I get mirrored output on both displays. After running xranr -q the external monitor stops mirroring and gives 'Out of Range'.

% sudo lspci -v | grep -A15 VGA
00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 03) (prog-if 00 [VGA controller])
    Subsystem: Apple Computer Inc. Device 00a1
    Flags: bus master, fast devsel, latency 0, IRQ 16
    Memory at 90100000 (64-bit, non-prefetchable) [size=1M]
    Memory at 80000000 (64-bit, prefetchable) [size=256M]
    I/O ports at 3110 [size=8]
    Capabilities: [90] Message Signalled Interrupts: Mask- 64bit- Count=1/1 Enable-
    Capabilities: [d0] Power Management version 3
    Kernel modules: intelfb

00:02.1 Display controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 03)
    Subsystem: Apple Computer Inc. Device 00a1
    Flags: bus master, fast devsel, latency 0
    Memory at 90200000 (64-bit, non-prefetchable) [size=1M]
    Capabilities: [d0] Power Management version 3
% xrandr -q                    

Screen 0: minimum 320 x 200, current 1280 x 800, maximum 1680 x 1680
VGA disconnected (normal left inverted right x axis y axis)
LVDS connected 1280x800+0+0 (normal left inverted right x axis y axis) 286mm x 179mm
   1280x800       59.9*+   60.0  
   1280x768       60.0  
   1024x768       60.0  
   800x600        60.3  
   640x480        59.9  
TMDS-1 connected 1280x720+0+0 (normal left inverted right x axis y axis) 473mm x 296mm
   1680x1050      60.0 +
   1280x1024      75.0     59.9  
   1440x900       75.0     59.9  
   1280x960       59.9  
   1360x765       59.8  
   1152x864       74.8  
   1280x720       59.9* 
   1024x768       75.1     70.1     60.0  
   832x624        74.6  
   800x600        72.2     75.0     60.3     56.2  
   640x480        75.0     72.8     66.7     60.0  
   720x400        70.1  
TV disconnected (normal left inverted right x axis y axis)

If you need the output of any other commands, let me know. Thanks for your help smile

Last edited by mrmonday (2008-11-18 12:35:43)

Offline

#2 2008-11-19 12:53:59

iamnafets
Member
Registered: 2006-12-28
Posts: 8

Re: Configuring X for multiple monitors

Let's see:
/etc/X11/xorg.conf

And for kicks and giggles try the following command and post the output (/what happens):
xrandr --output LVDS --right-of TMDS-1

If that fails with a message about virtual size look under your settings for the screen and under subsection display set:
Virtual 2960 1050

I can give more exact instructions if you post your xorg.conf.  Good luck!

Offline

#3 2008-11-19 13:18:24

schuay
Package Maintainer (PM)
From: Austria
Registered: 2008-08-19
Posts: 564

Re: Configuring X for multiple monitors

try setting Virtual in xorg.conf like iamnafets described above, and then running

 xrandr --output TMDS-1 --auto --right-of LVDS

err.. sorry for the doublepost

Last edited by schuay (2008-11-19 13:29:03)

Offline

#4 2008-11-19 16:16:24

mrmonday
Member
Registered: 2008-11-15
Posts: 11

Re: Configuring X for multiple monitors

Thanks for your replies. Here is my current xorg.conf (I've added in some additional comments to it):

Section "ServerLayout"
    Identifier     "X.org Configured"
    Screen      0  "Screen0"
    Screen      1  "Screen1" RightOf "Screen0"
    #InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Synaptics Touchpad" "CorePointer"
    InputDevice    "Keyboard0" "CoreKeyboard"
        # When I uncomment this line X refuses to start
    #Option        "Xinerama" "true"
EndSection

Section "Files"
    RgbPath      "/usr/share/X11/rgb"
    ModulePath   "/usr/lib/xorg/modules"
    FontPath     "/usr/share/fonts/misc"
    FontPath     "/usr/share/fonts/100dpi:unscaled"
    FontPath     "/usr/share/fonts/75dpi:unscaled"
    FontPath     "/usr/share/fonts/TTF"
    FontPath     "/usr/share/fonts/Type1"
EndSection

Section "Module"
    Load  "GLcore"
    Load  "dbe"
    Load  "dri"
    Load  "extmod"
    Load  "glx"
    Load  "record"
    Load  "xtrap"
    Load  "freetype"
    Load  "synaptics"
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

# Settings for the touchpad (unfinished)
Section "InputDevice"
    Identifier     "Synaptics Touchpad"
    Driver        "synaptics"
    Option        "CorePointer"
    Option        "Device" "/dev/input/mice"
    Option        "Protocol" "auto-dev"
    Option        "SendCoreEvents" "true"
#    Option        "LeftEdge" "100"
#    Option        "RightEdge" "1100"
#    Option        "TopEdge" "50"
#    Option        "BottomEdge" "300"
    Option        "FingerLow" "20"
    Option        "FingerHigh" "30"
#    Option        "MaxTapTime" "100"
#    Option        "MaxTapMove" "100"
#    Option        "MaxDoubleTapTime" "200"
#    Option        "VertScrollDelta" "10"
#    Option        "HorizScrollDelta" "10"
    Option        "VertTwoFingerScroll" "true"
    Option        "HorizTwoFingerScroll" "true"
    #Option        "FastTaps" "true"
    #Option        "RTCornerButton" "3"
#    Option        "TapButton1" "0"
    Option        "TapButton2" "3"
    Option        "TapButton3" "2"
#    Option        "MinSpeed" "0.8"
#    Option        "MaxSpeed" "1.2"
#    Option        "AccelFactor" "0.10"
    Option        "SHMConfig" "on"
#    Option        "MultiFingerButton" "3"
    Option        "VertEdgeScroll" "0"
    Option        "HorizEdgeScroll" "0"
    Option        "PressureMotionMinZ" "10"
EndSection

Section "Monitor"
    #DisplaySize      290   180    # mm
    Identifier   "Monitor0"
    VendorName   "APP"
    ModelName    "9c5f"
#    HorizSync     28-64
#    VertRefresh   60
EndSection

Section "Monitor"
    Identifier    "TMDS-1"
    Option        "Ignore" "False"
#    HorizSync    28-64
#    VertRefresh    50
        # Adding this line made no difference. In OS X my monitor reports that it is working happily at 1680x1050 with a 60Hz refresh rate
        # To get this line I used: gtf 1680 1050 "60" | grep Modeline | sed s/Modeline\ /
        # Edit: The Gnome configuration tool only gives the right resolution/refresh rate as an option with this line.
    Modeline    "1680x1050_60.00"  147.14  1680 1784 1968 2256  1050 1051 1054 1087  -HSync +Vsync
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "NoAccel"                # [<bool>]
        #Option     "SWcursor"               # [<bool>]
        #Option     "ColorKey"               # <i>
        #Option     "CacheLines"             # <i>
        #Option     "Dac6Bit"                # [<bool>]
        #Option     "DRI"                    # [<bool>]
        #Option     "NoDDC"                  # [<bool>]
        #Option     "ShowCache"              # [<bool>]
        #Option     "XvMCSurfaces"           # <i>
        #Option     "PageFlip"               # [<bool>]
    Identifier  "Card0"
    Driver      "intel"
    VendorName  "Intel Corporation"
    BoardName   "Mobile GM965/GL960 Integrated Graphics Controller"
    BusID       "PCI:0:2:0"
EndSection

Section "Screen"
    Identifier "Screen0"
    Device     "Card0"
    Monitor    "Monitor0"
    DefaultDepth 24
    SubSection "Display"
        Viewport   0 0
        Depth     1
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     4
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     8
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     15
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     16
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     24
        Modes       "1280x800"
    EndSubSection
EndSection

Section "Screen"
    Identifier    "Screen1"
    Device        "Card0"
    Monitor        "TMDS-1"
    DefaultDepth    24
    SubSection "Display"
        ViewPort    0 0
        Depth        24
        Modes        "1680x1050"
                # Adding this line made no difference
        Virtual        2960 1050
    EndSubSection
EndSection

Section "Extensions"
    Option "Composite" "Enable"
EndSection

Both of the xrandr commands (and variations) cause my external monitor to flicker and give the same 'Out Of Range' message. Thanks for your help!

Edit: I've also attempted to use Gnome's display configuration tool (System->Preferences->Screen Resolution). This detects both displays, and when I start it my monitor flickers. If I attempt to change any settings or rearrange the monitors it has no effect. (It lists the correct resolutions and refresh rates for both, but clicking apply has no effect).

Last edited by mrmonday (2008-11-19 16:22:37)

Offline

#5 2008-11-19 17:26:09

iamnafets
Member
Registered: 2006-12-28
Posts: 8

Re: Configuring X for multiple monitors

The flickering out of range is actually pretty good news, surprisingly.  If I'm not mistaken it means your graphics cards are pumping out to the monitors.  Try this:

Section "ServerLayout"
    Identifier     "X.org Configured"
    Screen      0  "MainScreen" 0 0
EndSection

Section "Files"
    RgbPath      "/usr/share/X11/rgb"
    ModulePath   "/usr/lib/xorg/modules"
    FontPath     "/usr/share/fonts/misc"
    FontPath     "/usr/share/fonts/100dpi:unscaled"
    FontPath     "/usr/share/fonts/75dpi:unscaled"
    FontPath     "/usr/share/fonts/TTF"
    FontPath     "/usr/share/fonts/Type1"
EndSection

Section "Module"
    Load  "GLcore"
    Load  "dbe"
    Load  "dri"
    Load  "extmod"
    Load  "glx"
    Load  "record"
    Load  "xtrap"
    Load  "freetype"
    Load  "synaptics"
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

# Settings for the touchpad (unfinished)
Section "InputDevice"
    Identifier     "Synaptics Touchpad"
    Driver        "synaptics"
    Option        "CorePointer"
    Option        "Device" "/dev/input/mice"
    Option        "Protocol" "auto-dev"
    Option        "SendCoreEvents" "true"
#    Option        "LeftEdge" "100"
#    Option        "RightEdge" "1100"
#    Option        "TopEdge" "50"
#    Option        "BottomEdge" "300"
    Option        "FingerLow" "20"
    Option        "FingerHigh" "30"
#    Option        "MaxTapTime" "100"
#    Option        "MaxTapMove" "100"
#    Option        "MaxDoubleTapTime" "200"
#    Option        "VertScrollDelta" "10"
#    Option        "HorizScrollDelta" "10"
    Option        "VertTwoFingerScroll" "true"
    Option        "HorizTwoFingerScroll" "true"
    #Option        "FastTaps" "true"
    #Option        "RTCornerButton" "3"
#    Option        "TapButton1" "0"
    Option        "TapButton2" "3"
    Option        "TapButton3" "2"
#    Option        "MinSpeed" "0.8"
#    Option        "MaxSpeed" "1.2"
#    Option        "AccelFactor" "0.10"
    Option        "SHMConfig" "on"
#    Option        "MultiFingerButton" "3"
    Option        "VertEdgeScroll" "0"
    Option        "HorizEdgeScroll" "0"
    Option        "PressureMotionMinZ" "10"
EndSection

Section "Monitor"
    #DisplaySize      290   180    # mm
    Identifier   "LVDS"
    VendorName   "APP"
    ModelName    "9c5f"
#    HorizSync     28-64
#    VertRefresh   60

  Option "DPMS"
  Option "RightOf" "TMDS-1"
EndSection

Section "Monitor"
    Identifier    "TMDS-1"
    Option        "Ignore" "False"
#    HorizSync    28-64
#    VertRefresh    50
        # Adding this line made no difference. In OS X my monitor reports that it is working happily at 1680x1050 with a 60Hz refresh rate
        # To get this line I used: gtf 1680 1050 "60" | grep Modeline | sed s/Modeline\ /
        # Edit: The Gnome configuration tool only gives the right resolution/refresh rate as an option with this line.
    # Modeline    "1680x1050_60.00"  147.14  1680 1784 1968 2256  1050 1051 1054 1087  -HSync +Vsync
  Option "DPMS"
  Option "LeftOf" "LVDS"

EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "NoAccel"                # [<bool>]
        #Option     "SWcursor"               # [<bool>]
        #Option     "ColorKey"               # <i>
        #Option     "CacheLines"             # <i>
        #Option     "Dac6Bit"                # [<bool>]
        #Option     "DRI"                    # [<bool>]
        #Option     "NoDDC"                  # [<bool>]
        #Option     "ShowCache"              # [<bool>]
        #Option     "XvMCSurfaces"           # <i>
        #Option     "PageFlip"               # [<bool>]
    Identifier  "Card0"
    Driver      "intel"
    VendorName  "Intel Corporation"
    BoardName   "Mobile GM965/GL960 Integrated Graphics Controller"
    BusID       "PCI:0:2:0"
Option "monitor-TMDS-1" "TMDS-1"
Option "monitor-LVDS" "LVDS"
EndSection

Section "Screen"
    Identifier "MainScreen"
    Device     "Card0"
    Monitor    "Monitor0"
    DefaultDepth 24
    SubSection "Display"
        Viewport   0 0
        Depth     1
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     4
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     8
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     15
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     16
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     24
        Modes       "1280x800"
       Virtual        2960 1050

    EndSubSection
EndSection

Section "Extensions"
    Option "Composite" "Disable"
EndSection

Changes:
-Xinerama should be false
-Disabling compositing until we get this working, feel free to tinker with it once you get a workable setup
-XRandR is "overriding" the typical screen layout of xorg.conf.  We're only going to use one screen.
-The virtual size will be on the screen that we're using.
-Get rid of the modeline stuff, hopefully X can figure this out.  It's 2008 smile
-DPMS
-Specify which monitors refer to what in the xorg.conf.
-Specify their arrangement (these last two supplant the xrandr)

Post the output and /var/log/X0.log (something like that)

Apologies for any typos, I'm doing this from school haha.

Offline

#6 2008-11-19 18:18:08

mrmonday
Member
Registered: 2008-11-15
Posts: 11

Re: Configuring X for multiple monitors

big_smile

It lives! big_smile

Now I have a new issue though. The displays aren't aligned properly, and using Gnomes monitor resolution settings only 'sort of' works. I'm guessing this is because of the 'Virtual' setting. I am able to go off the top of my built in monitor into nothingness, and the same with going to the left of my external monitor. Is there some way of fixing this, so that I can only go to places that actually exist? Is it possible to have a different desktop background on a per-monitor basis?

Thanks again for your help! big_smile

Edit: It seems it doesn't work OOTB as it were, I have to go into the gnome-display-properties and change the options to the right resolution.

Edit 2: It seems a bit temperamental, sometimes it works, sometimes it acts off. It seems to pick up the right resolutions now, but it seems unsure where it can let the mouse go (this changes as I open windows etc).

Last edited by mrmonday (2008-11-19 18:56:57)

Offline

#7 2008-11-19 19:50:57

iamnafets
Member
Registered: 2006-12-28
Posts: 8

Re: Configuring X for multiple monitors

mrmonday,

smile  Glad you got at least SOMETHING working.  As to the rest:

XRandR probably isn't the best solution to this problem.  The virtual specifier creates a virtual framebuffer on your graphics card.  Since (from what I can tell) both of your monitors are technically attached to this one card.  What you end up with looks like this, if I'm not mistaken:

http://www.thinkwiki.org/wiki/Image:Intel-DualHead.png

This site has a lot of info (found it while searching for that image, ironically) related to the intel chipset and XRandR

http://www.thinkwiki.org/wiki/Xorg_RandR_1.2

The issue is that most people are familiar with "Zaphod mode", where the screens are separate and independently sized, but you can drag windows (and the mouse) between them.  This seems most intuitive.  Xinerama/MergedFB/XRandR style is what we're dealing with right now.  XRandR stopped supporting Zaphod mode in 1.2, oddly enough.  Which is unfortunately where I get off sad.  I have a post in another section with similar problems.  I'm sure someone has the answer, but it is not I.

As a partial heuristic, there's potential that I'm just missing something that you might be able to fix with a *gasp* Ubuntu LiveCD.  I'd boot it up, look at the xorg.conf there and maybe get some ideas if it works how you'd like.  Zephyr might be something to look into too, which nests X sessions (so you could have two nested X sessions in your huge virtual framebuffer), and your intel driver might support something out of the box that I'm not familiar with.

Sorry I couldn't be of more help, but good luck!

~Stefan

Offline

Board footer

Powered by FluxBB