デュアルディスプレイ on X

さっきから立て続けに書いてるけど,「今書いとこう」と思ったから一気に書くよっ.

先に参考 URI を挙げておく.

どっちも Gentoo Linux Wiki 内のページだけど,今回の話は X の設定だから,Gentoo に特化した記述はそんなにない.

さて,今回デュアルディスプレイ環境を構築したハードウェア構成は次の通り.

ディスプレイ
I-O DATA LCD-AD172C (入力端子: DVI, D-sub)
I-O DATA LCD-A171VS (入力端子: D-sub)
GPU
GeForce 7300 GS (出力端子: DVI, D-sub)
GeForce 6100 (出力端子: D-sub)

そしてパッケージ等のバージョンは以下の通り.

  • sys-kernel/gentoo-sources-2.6.19-r5
  • x11-base/xorg-x11-7.1
  • media-drivers/nvidia-drivers-1.0.9755-r1

(訳ありで) できることなら 2 つの D-sub 端子を使ってのデュアルディスプレイ環境を構築したかったんだけど,どうもうまくいかなかった.っつーか その設定を探る過程でファイルシステムを破損するはめに ! (但し直接の因果関係はない.)結局 GeForce 7300 GS の出力端子 2 つを使うことにした.

となると TwinView という選択肢が浮上する.実際に試してみたけどこれは使いにくかった.今は Xinerama を使うということで落ち着いている.つまり 上に挙げた参考 URI の後者の文中にある I prefer (3). という主張に同意.

設定の手順は参考 URI 先で丁寧に述べられてるんで,ここでは設定後の xorg.conf を晒すにとどめる.


Section "ServerFlags"
    Option "DefaultServerLayout" "Xinerama"
EndSection

# Global settings {{{

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

Section "Module"
    Load  "glx"
    Load  "extmod"
    SubSection "extmod"
       Option  "omit XFree86-DGA"
    EndSubSection
    Load  "xtrap"
    Load  "record"
    Load  "dbe"
#   Load  "dri"
    Load  "freetype"
    Load  "type1"
EndSection

Section "DRI"
    Mode  0666
EndSection

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

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

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

Section "Monitor"
    Identifier   "Monitor0 (DVI)"
    VendorName   "I-O DATA"
    ModelName    "LCD-AD172C"
EndSection

Section "Monitor"
    Identifier   "Monitor0 (D-sub)"
    VendorName   "I-O DATA"
    ModelName    "LCD-AD172C"
EndSection

Section "Monitor"
    Identifier   "Monitor1 (D-sub)"
    VendorName   "I-O DATA"
    ModelName    "LCD-A171VS"
EndSection

# }}}
# Single monitor {{{

Section "ServerLayout"
    Identifier  "Single"
    Screen      0 "Screen0" 0 0
    InputDevice "Mouse0" "CorePointer"
    InputDevice "Keyboard0" "CoreKeyboard"
EndSection

# }}}
# Double monitor with Xinerama {{{

Section "Device"
    Identifier "GeForce 7300 GS (DVI)"
    Driver     "nvidia"
    VendorName "nVidia Corporation"
    BoardName  "G71 [GeForce 7300 GS]"
    BusID      "PCI:3:0:0"
    Screen     0
    Option     "NoLogo" "true"
    Option     "UseDisplayDevice" "DFP"
EndSection

Section "Device"
    Identifier "GeForce 7300 GS (D-sub)"
    Driver     "nvidia"
    VendorName "nVidia Corporation"
    BoardName  "G71 [GeForce 7300 GS]"
    BusID      "PCI:3:0:0"
    Screen     1
    Option     "NoLogo" "true"
    Option     "UseDisplayDevice" "CRT"
EndSection

Section "Screen"
    Identifier   "Screen0"
    Device       "GeForce 7300 GS (DVI)"
    Monitor      "Monitor0 (DVI)"
    DefaultDepth 24
    SubSection "Display"
        Viewport 0 0
        Depth    16
        Modes    "1280x1024"
    EndSubSection
    SubSection "Display"
        Viewport 0 0
        Depth    24
        Modes    "1280x1024"
    EndSubSection
EndSection

Section "Screen"
    Identifier   "Screen1"
    Device       "GeForce 7300 GS (D-sub)"
    Monitor      "Monitor0 (D-sub)"
    DefaultDepth 24
    SubSection "Display"
        Viewport 0 0
        Depth    16
        Modes    "1280x1024"
    EndSubSection
    SubSection "Display"
        Viewport 0 0
        Depth    24
        Modes    "1280x1024"
    EndSubSection
EndSection

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

# }}}
# Double monitor with TwinView {{{

Section "Device"
    Identifier "GeForce 7300 GS (TwinView)"
    Driver     "nvidia"
    VendorName "nVidia Corporation"
    BoardName  "G71 [GeForce 7300 GS]"
    BusID      "PCI:3:0:0"
    Option     "NoLogo" "true"
    Option     "TwinView" "true"
    Option     "UseDisplayDevice" "DFP-0,CRT-0"
    Option     "MetaModes" "1280x1024,1280x1024"
    Option     "TwinViewOrientation" "DFP-0 LeftOf CRT-0"
EndSection

Section "Screen"
    Identifier   "TwinScreen"
    Device       "GeForce 7300 GS (TwinView)"
    Monitor      "Monitor0 (DVI)"
    DefaultDepth 24
    SubSection "Display"
        Viewport 0 0
        Depth    16
        Modes    "1280x1024"
    EndSubSection
    SubSection "Display"
        Viewport 0 0
        Depth    24
        Modes    "1280x1024"
    EndSubSection
EndSection

Section "ServerLayout"
    Identifier  "TwinView"
    Screen      0 "TwinScreen" 0 0
    InputDevice "Mouse0" "CorePointer"
    InputDevice "Keyboard0" "CoreKeyboard"
EndSection

# }}}

研究室の模様替えとかして各人へのディスプレイの割り当てが変わるかも知れんけど,まぁそん時はそん時でしょ.