Splitting two monitors in xorg

It was done in Ubuntu Linux 7.10 but must work on most Unixes where RandR is ported.

About RandR:

The RandR 1.2 extension first appeared in Xserver 1.3 (i.e DebianTesting, since 2007-08-21). It provides automatic discovery of modes (resolutions, refresh rates, ...) together with the ability to configure outputs dynamically (resize, rotate, move, ...).

As of today, the following drivers/boards support RandR 1.2:

  • the Intel driver on all boards (since 1.9.91),
  • the NV driver on G80 boards (since 2.0.95),
  • the ATI driver on r200/r300/r400/r500/r600 boards (since 6.7.191) where RandR 1.2 replaces MergedFB,
  • the MGA driver on all boards (since 1.9.99)
  • the RadeonHD driver on r500/r600 boards (since 1.1)

Other drivers still use the old/hard/non-standard way to configure modes.


There are 3 ways of doing this:
1. From graphical tool in your desktop environment. In Ubuntu this function was disabled for my video driver "intel". Very strange , because it supports these (may be because of experimental status ... :).
2. From command line : xrandr tool, good way of doing it but I am man who likes things to be done automatically :).
3. Xorg files customization - not very easy for newbies but most flexible and you actually have to do it once.

Hardware:

1. Laptop Dell D630
$lspci
00:00.0 Host bridge: Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub (rev 0c)
00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c)
00:02.1 Display controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c)
00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Contoller #4 (rev 02)
00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 02)
00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 02)
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 02)
00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 02)
00:1c.5 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 6 (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f2)
00:1f.0 ISA bridge: Intel Corporation 82801HEM (ICH8M) LPC Interface Controller (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) IDE Controller (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA IDE Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 02)
03:01.0 CardBus bridge: O2 Micro, Inc. Cardbus bridge (rev 21)
03:01.4 FireWire (IEEE 1394): O2 Micro, Inc. Firewire (IEEE 1394) (rev 02)
09:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5755M Gigabit Ethernet PCI Express (rev 02)
0c:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)

2. External monitor Samsung 710n

How to do it with xrundr.
Monitor is on the left of my laptop.
So to do it from command line;
1. $xrandr --output LVDS --right-of VGA --auto
Output will say that we must insert size of virtual work space to xorg.conf .
Display section of Screen must looks like this:
SubSection "Display"
Modes "1280x1024" "1152x864" "1024x768" "800x600" "640x480"
Virtual 2720 1024
EndSubSection
Actually we need this virtual string.
2. Restart X server.
3. Repeat "$xrandr --output LVDS --right-of VGA --auto"
4. We have two splited monitors.

But I did it in xorg.conf.
Problems:
Strange behavior of xorg:usage of RightOf for the 1 monitor is not the same as using LeftOf with 2 monitor object of xorg.conf.
It works correctly when use these option with the default monitor.

My xorg.conf:

Section "Files"
EndSection

Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/2"
Option "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
Identifier "Synaptics Touchpad"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option "HorizEdgeScroll" "0"
EndSection

Section "InputDevice"
Driver "wacom"
Identifier "stylus"
Option "Device" "/dev/input/wacom"
Option "Type" "stylus"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "InputDevice"
Driver "wacom"
Identifier "eraser"
Option "Device" "/dev/input/wacom"
Option "Type" "eraser"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "InputDevice"
Driver "wacom"
Identifier "cursor"
Option "Device" "/dev/input/wacom"
Option "Type" "cursor"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "Device"
Identifier "Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller"
Driver "intel"
BusID "PCI:0:2:0"
Option "monitor-LVDS" "Dell Monitor"
Option "monitor-VGA" "SyncMaster"
EndSection

Section "Monitor"
Identifier "Dell Monitor"
Option "DPMS"
HorizSync 30-70
VertRefresh 50-160
Option "PreferredMode" "1440x900"
# Option “Position” “0 0″
Option "RightOf" "SyncMaster"
EndSection



Section "Monitor"
Identifier "SyncMaster"
Option "DPMS"
HorizSync 30-81
VertRefresh 56-75
# Option “Position” “1440 0″
EndSection

Section "Screen"
Identifier "Default Screen"
Device "Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller"
Monitor "Dell Monitor"
DefaultDepth 24
SubSection "Display"
Modes "1280x1024" "1152x864" "1024x768" "800x600" "640x480"
Virtual 2720 1024
EndSubSection
EndSection

Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"

# Uncomment if you have a wacom tablet
# InputDevice "stylus" "SendCoreEvents"
# InputDevice "cursor" "SendCoreEvents"
# InputDevice "eraser" "SendCoreEvents"
InputDevice "Synaptics Touchpad"
EndSection


Reference : http://intellinuxgraphics.org/dualhead.html

Comments