viernes, agosto 22, 2008

howto dual screen with ubuntu hardy

En este howto voy a explicar como conseguir utilizar dos monitores como si fueran uno único.
Para ello voy a utilizar un único ordenador con una tarjeta ati Sapphire X550 Silent a la cual le conectaré un monitor por la salida VGA y el otro por la salida DVI.

Primero de todo hay que instalar el driver de ati. Para hacerlo he instalado la aplicación envyng:
$ sudo apt-get install envyng-gtk envyng-core

Una vez instalada, se puede ejecutar desde la terminal y en la interfaz grafica indicar que se quiere instalar el driver. Para ejecutarla desde la terminal basta con:
$ sudo envyng-gtk

Una vez instalado el driver, hay que modificar el archivo /etc/X11/xorg.conf, para indicarle que tenemos una tarjeta grafica ficticia a la cual le asociaremos el segundo monitor, al segundo monitor le asignaremos otro "screen" y finalmente pondremos unas opciones para especificar como se comportaran los dos monitores.

Mi fichero a terminado asi:

Section "Files"
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"
# path to defoma fonts
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection

Section "Module"
Load "i2c"
Load "bitmap"
Load "ddc"
Load "extmod"
Load "freetype"
Load "int10"
Load "vbe"
EndSection

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

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "true"
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 "ATI Technologies Inc RV370 [Sapphire X550 Silent] - 0"
Driver "fglrx"
BusID "PCI:1:0:0"
Option "VideoOverlay" "on"
Option "OpenGLOverlay" "off"
Screen 0
EndSection

Section "Device"
Identifier "ATI Technologies Inc RV370 [Sapphire X550 Silent] - 1"
Driver "fglrx"
BusID "PCI:1:0:0"
Option "VideoOverlay" "on"
Option "OpenGLOverlay" "off"
Screen 1
EndSection

Section "Monitor"
Identifier "derecha"
Option "DPMS"
EndSection

Section "Monitor"
Identifier "izquierda"
Option "DPMS"
EndSection

Section "Screen"
Identifier "derecha"
Device "ATI Technologies Inc RV370 [Sapphire X550 Silent] - 0"
Monitor "derecha"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1680x1050" "1280x1024" "1152x864" "1024x768" "800x600" "720x400" "640x480"
EndSubSection
EndSection
Section "Screen"
Identifier "izquierda"
Device "ATI Technologies Inc RV370 [Sapphire X550 Silent] - 1"
Monitor "izquierda"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1680x1050" "1280x1024" "1152x864" "1024x768" "800x600" "720x400" "640x480"
EndSubSection
EndSection

Section "ServerLayout"
Identifier "Default Layout"
Option "Xinerama" "on"
Screen "derecha"
Screen "izquierda" RightOf "derecha"
Screen "izquierda"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
InputDevice "stylus" "SendCoreEvents"
InputDevice "cursor" "SendCoreEvents"
InputDevice "eraser" "SendCoreEvents"
EndSection

Section "DRI"
Mode 0666
EndSection


Una vez modificado el archivo, basta con reiniciar el ordenador y ya tenemos ambos monitores funcionando como uno único.