スクリーン解像度の変更

xrandr

ドライバーがサポートされているカード

まず始めに xrandr とだけタイプして使用中のカードがサポートされているかを試します。サポートされていなかったらsiduxccなどでxorgのバージョンや使用中のドライバーを確認してください。

(メイン)スクリーンの解像度を変更するには次のコマンドを使います。サポートされている解像度の中から選んでください。

xrandr --output VGA --mode 1440x900 
使用中のカードがxrandrにサポートされていない場合は解像度のデフォルトを変更するにはxorg.confを編集する必要があります。

コンソールからrootとして

siduxcc

を実行し、指示にしたがいます。もしくはGUIで:Kmenu>System>sidux Control Centre>Display

Xが自動的に再スタートしないときは次のコマンドで再スタートできます

ctrl+alt+backspace

デュアルモニターとxrandr

これからXorgの設定ファイルを変更します。 編集を始める前に必ず、必ず、必ずxorg.confのコピーを作ってください!

Xorg7.3の最大の強みはホットプラグです。xrandrを使ってメインとサブのスクリーンの解像度をXを再スタートしないで変更できます。xrandrは以前のxineramaやmergedFBといったプログラムの代わりをします。xrandr1.2が作動中の時は以前のxorg.conf(やxineramaまたはmergedFB)を使った設定方法はもう使えないことがあります。

ドライバーがサポートされているカード

Preparation for xrandr configurations of a PC with Dualhead

注意: 1つのPCを2つのモニターでずっと使う場合は xorg.confを編集して設定を保存するほうがいいでしょう。

ラップトップまたはノートブックは(上の2つのモニターの場合と違って)ダイナミックに設定を変更する必要があります。また、2つのモニターを使う場合のxrandrのパラメータをスクリプトに保存して ~/.kde/Autostart/に書き込んでしまわない限り、起動の際に設定をしなおす必要があるでしょう。

xrandrに親しみましょう

最初の一歩はコマンドラインにユーザーとしてただxrandrとタイプして、表示される出力に慣れておきましょう:

xrandr
Screen 0: minimum 320 x 200, current 2048 x 768, maximum 2048 x 768
VGA-0 connected 1024x768+0+0 (normal left inverted right x axis y axis) 304mm x 228mm
   1024x768       60.0*+   75.1     70.1     60.0*    59.9
   832x624        74.6
   800x600        72.2     75.0     60.3     56.2
   640x480        75.0     72.8     66.7     60.0
   720x400        70.1

この例ではVGAだけが表示されています。(出力の説明は付録Aを読んでください)使用中のモニターで使える解像度が表示されていて、これを見れば(2つのモニターの設定に重要な)最大解像度(この例では1024x768)が分かります。

ここで外部モニターを接続して、もう一度xrandrを実行します:

$ xrandr
Screen 0: minimum 320 x 200, current 2048 x 768, maximum 2048 x 768
VGA-0 connected 1024x768+0+0 (normal left inverted right x axis y axis) 304mm x 228mm
   1024x768       60.0*+   75.1     70.1     60.0*    59.9
   832x624        74.6
   800x600        72.2     75.0     60.3     56.2
   640x480        75.0     72.8     66.7     60.0
   720x400        70.1
DVI-0 connected 1024x768+1024+0 (normal left inverted right x axis y axis) 310mm x 230mm
   1024x768_85.00   85.0*+
   1024x768       85.0 +   84.9     74.9     75.1     70.1     60.0     43.5
   832x624        74.6
   800x600        84.9     72.2     75.0     60.3     56.2
   640x480        84.6     75.0     72.8     66.7     60.0
   720x400        87.8     70.1
S-video disconnected (normal left inverted right x axis y axis)

DVIスクリーンが接続されていることが表示されます。720x400から1024x768までが表示されているリフレッシュレートで使えることがわかります。

様々な設定シナリオ

基本構文

xrandr --output <output> --rate <rate> --mode <mode> --left-of|--right-of|--above|--below|--same-as <output>

解説:

メインスクリーンの解像度の変更
xrandr --output VGA --mode 1024x768
クローン

多くの外部スクリーンやビデオプロジェクターは1200x800は表示できず、例えば1280x768の解像度に設定する必要があります。その場合:

xrandr --output VGA --mode 1024x768 --output LVDS --mode 1024x768

外部スクリーンを消してメインスクリーンを通常の解像度にもどすには:

xrandr --output VGA --off --output LVDS --mode 1280x800
複数のディスプレイモニターのデスクトップ

インテルのgmaのバーチャルスクリーンの解像度は2048x2048までなので、両方のスクリーンを高い解像度で隣り合わせに使うことはできません。両方を1024x768に設定すればちゃんと作動します:

xrandr --output LVDS --mode 1024x768 --output VGA --mode 1024x768 --left-of LVDS

マルチスクリーンをやめるにはサブスクリーンをOFFにして、メインスクリーンの解像度を(必要なら)元に戻します:

xrandr --output VGA --off (--output LVDS --mode 1280x800)

Another option is to put the secondary screen above/below the primary:

xrandr --output LVDS --mode 1280x800 --output VGA --mode 1280x1024 --above LVDS

結果として1280x1824の解像度のバーチャルスクリーンになります。2048x2048以内に収まっているので作動します。他にスクリーンを横から縦に起こす設定もあります:

xrandr --verbose --output LVDS --mode 1280x800 --output VGA  --mode 1024x768 --rotate left --left-of LVDS

ノート: この設定のためには物理的にモニターの方向が変えられることが必要です。

xrandrでPCを継続的に2つのモニターで使う設定の例

Section "InputDevice"
        Identifier      "Generic Keyboard"
        Driver    "kbd"
        Option    "CoreKeyboard"
        Option    "XkbRules"        "xorg"
        Option    "XkbModel"        "pc104"
        Option    "XkbLayout"       "us"
EndSection
 
Section "InputDevice"
        Identifier      "Configured Mouse"
        Driver    "mouse"
        Option    "CorePointer"
        Option    "Device"    "/dev/input/mice"
        Option    "Protocol"                "ImPS/2"
        Option    "Emulate3Buttons" "true"
EndSection
 
Section "Device"
        Identifier      "ATI Technologies Inc RV370 [Sapphire X550 Silent]"
        Driver    "ati"
        BusID      "PCI:1:0:0"
        Option    "monitor-VGA-0" "ACER AL512"
        Option    "monitor-DVI-0" "VIEWSONIC E70"
EndSection
 
Section "Monitor"
        Identifier      "ACER AL512"
EndSection
 
Section "Monitor"
        Identifier      "VIEWSONIC E70"
        Option    "RightOf" "ACER AL512"
        # 1024x768 @ 85.00 Hz (GTF) hsync: 68.60 kHz; pclk: 94.39 MHz
        Modeline "1024x768_85.00"  94.39  1024 1088 1200 1376  768 769 772 807  -HSync +Vsync
        Option    "PreferredMode" "1024x768_85.00"
EndSection
 
Section "Screen"
        Identifier      "Default Screen"
        Device    "ATI Technologies Inc RV370 [Sapphire X550 Silent]"
        Monitor  "ACER AL512"
        DefaultDepth    24
        SubSection "Display"
                Virtual  2048 768
        EndSubSection
EndSection
 
Section "ServerLayout"
        Identifier      "Default Layout"
        Screen    "Default Screen"
        InputDevice     "Generic Keyboard"
        InputDevice     "Configured Mouse"
EndSection

ノート

付録 A
インテル
Output names:
* LVDS: internal laptop panel
* TMDS-1: external DVI port
* VGA: external VGA port
* TV: external TV output
ATI
Output names:
* LVDS: internal laptop panel
* DVI-0: first external DVI port
* DVI-1: second external DVI port (if present)
* VGA-0: first external VGA port
* VGA-1: second external VGA port (if present)
* S-video
Nvidia
nv driver supports RandR1.2 on G80 boards
Output names:
* LVDS: internal laptop panel
* DVI0: first external DVI port
* DVI1: second external DVI port (if present)
付録 B
Xorg 7.3のxorg.conf設定:

ノート: この設定方法だとシリアルマウスが使えません! 変更前にxorg.confをバックアップすること!

Section "ServerLayout"
        Identifier      "XFree86 Configured"
        Screen          0       "Screen0"       0       0
        InputDevice     "Touchpad"
EndSection

Section "Files"
        FontPath        "/usr/share/fonts/X11/misc"
        FontPath        "/usr/share/fonts/X11/100dpi/:unscaled"
        FontPath        "/usr/share/fonts/X11/75dpi/:unscaled"
        FontPath        "/usr/share/fonts/X11/100dpi"
        FontPath        "/usr/share/fonts/X11/75dpi"
        FontPath        "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection

Section "Module"
        Load            "ddc"           # ddc probing of monitor
        Load            "dbe"
        Load            "dri"
        Load            "extmod"
        Load            "glx"
        Load            "bitmap"        # bitmap-fonts
        Load            "freetype"
        Load            "record"
EndSection

Section "InputDevice"
        Identifier      "Keyboard0"
        Driver          "kbd"
        Option          "XkbRules"              "xorg"
        Option          "XkbModel"              "pc105"
        Option          "XkbLayout"             "de"
        Option          "XkbVariant"            "nodeadkeys"
        Option          "XkbOptions"            "lv3:rwin_switch"
EndSection

Section "InputDevice"
        Identifier      "Touchpad"
        Driver          "synaptics"
        Option  "LeftEdge"      "100"
        Option  "RightEdge"     "1120"
        Option  "TopEdge"       "50"
        Option  "BottomEdge"    "310"
        Option  "FingerLow"     "20"
        Option  "FingerHigh"    "30"
        Option  "MaxTapTime"    "150"
        Option  "MaxTapMove"    "220"
        Option  "MaxDoubleTapTime"      "180"
        Option  "VertScrollDelta"       "20"
        Option  "HorizScrollDelta"      "50"
        Option  "MinSpeed"      "0.94"
        Option  "MaxSpeed"      "1"
        Option  "AccelFactor"   "0.0015"
        Option  "SHMConfig"     "on"
#switch two/three-finger-tap:
        Option "TapButton2" "3"
        Option "TapButton3" "2"
#scroll with two fingers:
        Option "VertTwoFingerScroll"  "1"
        Option "HorizTwoFingerScroll" "0"
EndSection

# このセクションがxrandrにとって一番重要です。次の部分以外すべて消去します:
Section "Monitor"
        Identifier      "Monitor0"
        Option  "DPMS"  "true"
EndSection

Section "Device"
        Identifier      "Card0"
        Driver          "intel"
        # ここは必ずしも必要ではありません。大抵の場合、XAA"のほうが安定しているでしょう
        Option          "AccelMethod" "EXA"
EndSection

Section "Screen"
        Identifier      "Screen0"
        Device          "Card0"
        Monitor         "Monitor0"
        DefaultColorDepth 24
        SubSection "Display"
                Depth   24
                # ここでバーチャルスクリーンサイズを設定
                Virtual 2048 2048
        EndSubSection
EndSection
リンク

http://wiki.debian.org/XStrikeForce/HowToRandR12

http://bgoglin.livejournal.com/9846.html

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=420419

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

バイナリードライバーを使う2モニター設定

これからXorgの設定ファイルを変更します。 編集を始める前に必ず、必ず、必ずxorg.confのコピーを作ってください!

nVidia

nVidiaのnvまたはnon-freeドライバー使用の場合、単純にnVidiaのXorg configurator http://www.sorgonet.com/linux/nv-online/を使ってXorgファイルを変更します。

XorgのATIドライバー - 方法 1

siduxフォーラムの http://sidux.com/index.php?name=PNphpBB2&file=viewtopic&p=19794#19794のスレッドにフリーのRadeonドライバー用の設定があります。.

ノート: 2つめのモニターの設定のためのデータが必要です。そのためにはまず2つめのモニターを外してライヴCDを起動し、自動的に作成されたxorg.confを保存し、次にモニターを交換して同じ作業を繰り返します。

XorgのATIドライバー - 方法 2

この方法ではまずメインモニターの解像度を設定して、サブモニターを同じ設定で使います。そのためメインモニターをサブモニターが表示できる範囲内で設定する必要があります。

xorg.confのセクション

Section "Device"
	Identifier "devname"
	Driver "ati"
   ...
EndSection

設定方法についての詳しい情報はhttp://ftp.x.org/pub/X11R6.9.0/doc/html/radeon.4.htmlを参照

ノート: 上のリンクはradeonドライバーを使っていますが、atiドライバーでも同じ様につかえます。

Non-free ATI (fglrx)ドライバー

まずnon-freeの(fglrx)ドライバーをインストールします。

get-sidux-gfx
または
sgfxi / smxi

3Dドライバーのインストールについてはこちらへ

次に: Xウィンドウを終了します

ctrl+alt+F1
type: root
enter your password:
init 3

そして:

aticonfig --dtop=horizontal
init 5 && exit

モニターのポジションがおかしかったら

aticonfig --dtop=horizontal,reverse

helpを読んでください。様々な例やオプションが網羅されています:

aticonfig --help

ノート: 両方のモニターで同じ解像度を使わなければなりません。両方のモニターの取扱い説明書を読んで、共通の解像度を探してください。

siduxフォーラムの http://sidux.com/index.php?name=PNphpBB2&file=viewtopic&p=20231#20231のスレッドにいくつか追加の情報があります。

デュアルモニターの設定をシングルモニターに戻すには

aticonfig --initial --input=/etc/X11/xorg.conf
Page last revised 29/06/2008 1400