Trucs et Astuces Fedora 10 : Fedora 10 et le double écran

A chaque nouvelle version de Fedora, c'est la grande bataille pour avoir une configuration de double écran fonctionnelle !

Après moult essai, tentative et échecs, voici, (pour une carte ati X1400 en tout cas), la démarche pour bénéficier du double écran :

Tout d'abord, le xorg.conf :

# Xorg configuration created by system-config-display

Section "ServerLayout"
        Identifier     "single head configuration"
        Screen      0  "Screen0" 0 0
        InputDevice    "Keyboard0" "CoreKeyboard"
        InputDevice    "Synaptics" "CorePointer"
EndSection

Section "InputDevice"
# keyboard added by rhpxl
        Identifier  "Keyboard0"
        Driver      "kbd"
        Option            "XkbModel" "pc105"
        Option            "XkbLayout" "fr"
        Option            "XkbVariant" "latin9"
EndSection

Section "InputDevice"
        Identifier  "Synaptics"
        Driver      "synaptics"
        Option      "Protocol" "auto-dev"
        Option      "Emulate3Buttons" "yes"
        Option      "SHMConfig" "true"
EndSection

Section "Monitor"
        Identifier "Monitor0"
        Option "PreferredMode" "1280x800"
        HorizSync    31.5 - 37.9
        VertRefresh  50.0 - 70.0
        Option "Position" "1680 0"
EndSection

Section "Monitor"
        Identifier "BenQ"
        Option "leftOf" "Monitor0"
        Option "PreferredMode" "1680x1050"
        Option "Position" "0 0"
EndSection

Section "Device"
        Identifier        "Videocard0"
        Driver                "radeon"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "Videocard0"
        DefaultDepth     24
        SubSection "Display"
                Viewport        0 0
                Depth                24
                Modes                "1280x800" "1680x1050"
                Virtual                2960 1050 # Ici l'écran virtuel
        EndSubSection
EndSection

Ensuite, le petit script "dualscreen" à mettre dans /usr/bin/ et à ajouter au démarrage de session :

#!/bin/bash
XRANDR_OUT=`xrandr -q`
if echo "$XRANDR_OUT"|grep -q 'VGA-0 connected'; then
        echo 'Detected External Screen';
        # placement des écrans 
        xrandr --output LVDS --auto --output VGA-0 --auto --left-of LVDS
 
        #définition des résolutions
        xrandr --output LVDS --mode 1280x800 --pos 1680x0 --output VGA-0 --mode 1680x1050 --pos 0x0
else
        echo 'No External Screen connected!';
        #turning off just incase
        xrandr --output VGA-0 --off
fi

Voilà ! Fermez la session, reconnectez-vous et tout devrait fonctionner ! :)

Filed under  //  Fedora   Unix/Linux   X11   bi écran   dual screen   xorg   xrandr  
Posted by Cyril Nicodème