XFree86-4.2.0-72の設定

[サーバの実験室 Redhat/Fedora]

作成 : 2002/12/08

"サーバの実験室"の検索


インストール

Redhat インストール・アップグレード時に、X Window Systemパッケージを選択する。 XFree86 関連のパッケージは、次のとおり。 それぞれのパッケージ情報は、rpm -qvi などで確認。

# rpm -qa | grep XFree86

XFree86-truetype-fonts-4.2.0-72
XFree86-100dpi-fonts-4.2.0-72
XFree86-xdm-4.2.0-72
XFree86-ISO8859-9-75dpi-fonts-4.2.0-72
XFree86-ISO8859-2-100dpi-fonts-4.2.0-72
XFree86-font-utils-4.2.0-72
XFree86-Mesa-libGLU-4.2.0-72
XFree86-doc-4.2.0-72
XFree86-xfs-4.2.0-72
XFree86-base-fonts-4.2.0-72
XFree86-xauth-4.2.0-72
XFree86-twm-4.2.0-72
XFree86-ISO8859-15-100dpi-fonts-4.2.0-72
XFree86-Xnest-4.2.0-72
XFree86-libs-4.2.0-72
XFree86-cyrillic-fonts-4.2.0-72
XFree86-75dpi-fonts-4.2.0-72
XFree86-tools-4.2.0-72
XFree86-ISO8859-15-75dpi-fonts-4.2.0-72
XFree86-xtrap-clients-4.2.0-72
XFree86-devel-4.2.0-72
XFree86-Xvfb-4.2.0-72
XFree86-Mesa-libGL-4.2.0-72
XFree86-4.2.0-72
XFree86-ISO8859-9-100dpi-fonts-4.2.0-72
XFree86-ISO8859-2-75dpi-fonts-4.2.0-72

ビデオカードとディスプレイの確認

ビデオカード

ビデオカードは、チップセットとVRAMサイズを確認しておく。

チップセット: S3 864
VRAM: 2MB

ディスプレイ

ディスプレイは、水平周波数(HorizSync)と垂直周波数(VertRefresh)を確認しておく。

水平周波数: 24-64kHz
垂直周波数: 50-100Hz
(Acer 76i)

Redhat インストールプログラムによる設定

Redhat インストールプログラムで、X の設定(ビデオカードとディスプレイ)を行うことができる。

グラフィックインターフェース: S3 864 (generic)
ディスプレイ: Acer 76i

インストールプログラムによって作成された /etc/X11/XF86Config をつけておく。

startx を実行してみたが、エラーで終了してしまう。 /var/log/XFree86.0.log を確認してみたら、次のようなエラーになっていた。 どうやら、ビデオカードのドライバがよくないらしい。 (とわかったのは、ずっと後の話....)

Fatal server error:
AddScreen/ScreenInit failed for driver 0

xf86config による設定

次に、/usr/X11R6/bin/xf86config で設定してみる。 xf86config を使用すると、ランレベル 3 で対話的に X の設定をすることができる。

First specify a mouse protocol type. Choose one from the following list:
        4 (PS/2 Mouse)
Do you want to enable Emulate3Buttons?
        y
Mouse device:
        (/dev/psaux)
Enter a number to choose the keyboard.
        11 (Japanese 106-key)
Enter a number to choose the country.
        40 (Japanese)
Please enter a variant name for 'jp' layout. Or just press enter for default variant
        (jp)
Do you want to select additional XKB options (group switcher, group indicator, etc.)?
        n
Enter your choice (1-11):
        8 (31.5 - 64.3; Monitor that can do 1280x1024 @ 60 Hz)
Enter your choice:
        3 (50-100)
Enter an identifier for your monitor definition:
        (My Monitor)
Do you want to look at the card database?
        y
Enter a number to choose the corresponding card definition.
        496 (S3 864 (generic))
How much video memory do you have on your video card:
        4 (2048K)
Enter an identifier for your video card definition:
        (S3 864 (generic))
Enter your choice:
        "640x480" "800x600" "1024x768" "1280x1024" for 8-bit
        "640x480" "800x600" "1024x768" for 16-bit
        "640x480" "800x600" for 24-bit
Please specify which color depth you want to use by default:
        4 (16bits (65536 colors)))
Shall I write it to /etc/X11/XF86Config?
        y

xf86config によって作成された /etc/X11/XF86Config をつけておく。

startx を実行してみたが、エラーで終了してしまう。 /var/log/XFree86.0.log を確認してみたら、次のようなエラーになっていた。 どうやら、ビデオカードのドライバがよくないらしい。 (とわかったのは、ずっと後の話....)

Fatal server error:
AddScreen/ScreenInit failed for driver 0

XFree86 -configure による設定

今度は、/usr/X11R6/bin/XFree86 -configure で設定してみる。 実行すると、ホームディレクトリに XF86Config.new という雛形を作成してくれる。 作成された XF86Config.new をつけておく。

XF86Config の編集

XFree86 -configure の雛形を見ると、Device セクションの Driver が "vesa" になっている。 xf86config で作成した /etc/X11/XF86Config の Device セクションを編集する。

Section "Device"
        Identifier  "S3 864 (generic)"
        Driver      "vesa"
EndSection

これで startx を実行してみると、エラーにならず X が起動するようになったが、画面の表示がめちゃくちゃ。 インストールプログラムが作成した XF86Config と、xf86config が作成した XF86Config を比べてみると、Screen セクションの Display サブセクションの Modes の順番が違っている。 もしかして、このせい? とりあえず、順番を変更してみる。

Subsection "Display"
    Depth       8
    Modes       "1280x1024" "1024x768" "800x600" "640x480"
    ViewPort    0 0
EndSubsection
Subsection "Display"
    Depth       16
    Modes       "1024x768" "800x600" "640x480"
    ViewPort    0 0
EndSubsection
Subsection "Display"
    Depth       24
    Modes       "800x600" "640x480"
    ViewPort    0 0
EndSubsection

再度 startx を実行してみると、正常に起動。 なんでやねん。 最終的な XF86Config をつけておく。

xfs サービス

xfs サービスは停止しないこと。 X server Font Service。


Redhat インストールプログラムによって作成された XF86Config

Section "Module"
        Load  "dbe"
        Load  "extmod"
        Load  "fbdevhw"
        Load  "dri"
        Load  "glx"
        Load  "record"
        Load  "freetype"
        Load  "type1"
EndSection

Section "Files"
        RgbPath      "/usr/X11R6/lib/X11/rgb"
        FontPath     "unix/:7100"
EndSection

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "keyboard"
        Option      "XkbRules" "xfree86"
        Option      "XkbModel" "jp106"
        Option      "XkbLayout" "jp"    #Option "XkbVariant"    ""
EndSection

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "PS/2"
        Option      "Device" "/dev/psaux"
        Option      "ZAxisMapping" "4 5"
        Option      "Emulate3Buttons" "yes"
EndSection

Section "InputDevice"
        Identifier  "Mouse1"
        Driver      "mouse"
        Option      "Device" "/dev/input/mice"
        Option      "Protocol" "IMPS/2"
        Option      "Emulate3Buttons" "no"
        Option      "ZAxisMapping" "4 5"
EndSection

Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
        HorizSync    30.0 - 64.0
        VertRefresh  50.0 - 110.0
        Option      "dpms"
EndSection

Section "Device"
        Identifier  "S3 864 (generic)"
        Driver      "vesa"
        VendorName  "S3 864 (generic)"
        BoardName   "S3 864 (generic)"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "S3 864 (generic)"
        Monitor    "Monitor0"
        DefaultDepth     8
        SubSection "Display"
                Depth     16
                Modes    "1024x768" "800x600" "640x480"
        EndSubSection
        SubSection "Display"
                Depth     8
                Modes    "1024x768" "800x600" "640x480"
        EndSubSection
EndSection

Section "ServerLayout"
        Identifier     "Anaconda Configured"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Mouse1" "SendCoreEvents"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "DRI"
        Mode         0666
EndSection

xf86config によって作成された XF86Config

Section "Module"
    Load        "dbe"   # Double buffer extension
    SubSection  "extmod"
      Option    "omit xfree86-dga"   # don't initialise the DGA extension
    EndSubSection
    Load        "type1"
    Load        "freetype"
EndSection

Section "Files"
    RgbPath    "/usr/X11R6/lib/X11/rgb"
    FontPath   "/usr/X11R6/lib/X11/fonts/local/"
    FontPath   "/usr/X11R6/lib/X11/fonts/misc/"
    FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
    FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
    FontPath   "/usr/X11R6/lib/X11/fonts/Type1/"
    FontPath   "/usr/X11R6/lib/X11/fonts/Speedo/"
    FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/"
    FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/"
EndSection

Section "ServerFlags"
EndSection

Section "InputDevice"
    Identifier  "Keyboard1"
    Driver      "Keyboard"
    Option "AutoRepeat" "500 30"
    Option "XkbRules"   "xfree86"
    Option "XkbModel"   "jp106"
    Option "XkbLayout"  "jp"
EndSection

Section "InputDevice"
    Identifier  "Mouse1"
    Driver      "mouse"
    Option "Protocol"    "PS/2"
    Option "Device"      "/dev/psaux"
    Option "Emulate3Buttons"
EndSection

Section "Monitor"
    Identifier  "My Monitor"
    HorizSync   31.5 - 64.3
    VertRefresh 50-100
EndSection

Section "Device"
    Identifier  "Standard VGA"
    VendorName  "Unknown"
    BoardName   "Unknown"
    Driver      "vga"
EndSection

Section "Device"
    Identifier  "S3 864 (generic)"
    Driver      "vga"
EndSection

Section "Screen"
    Identifier  "Screen 1"
    Device      "S3 864 (generic)"
    Monitor     "My Monitor"
    DefaultDepth 16

    Subsection "Display"
        Depth       8
        Modes       "640x480" "800x600" "1024x768" "1280x1024"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       16
        Modes       "640x480" "800x600" "1024x768"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       24
        Modes       "640x480" "800x600"
        ViewPort    0 0
    EndSubsection
EndSection

Section "ServerLayout"
    Identifier  "Simple Layout"
    Screen "Screen 1"
    InputDevice "Mouse1" "CorePointer"
    InputDevice "Keyboard1" "CoreKeyboard"
EndSection

XFree86 -configure によって作成された XF86Config.new

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

Section "Files"
        RgbPath      "/usr/X11R6/lib/X11/rgb"
        ModulePath   "/usr/X11R6/lib/modules"
        FontPath     "/usr/X11R6/lib/X11/fonts/misc/"
        FontPath     "/usr/X11R6/lib/X11/fonts/Speedo/"
        FontPath     "/usr/X11R6/lib/X11/fonts/Type1/"
        FontPath     "/usr/X11R6/lib/X11/fonts/CID/"
        FontPath     "/usr/X11R6/lib/X11/fonts/75dpi/"
        FontPath     "/usr/X11R6/lib/X11/fonts/100dpi/"
EndSection

Section "Module"
        Load  "dbe"
        Load  "dri"
        Load  "extmod"
        Load  "glx"
        Load  "record"
        Load  "xtrap"
        Load  "speedo"
        Load  "type1"
EndSection

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "keyboard"
EndSection

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "PS/2"
        Option      "Device" "/dev/mouse"
EndSection

Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
EndSection

Section "Device"
        Identifier  "Card0"
        Driver      "vesa"
        VendorName  "S3"
        BoardName   "864"
        BusID       "PCI:0:13:0"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        SubSection "Display"
                Depth     1
        EndSubSection
        SubSection "Display"
                Depth     4
        EndSubSection
        SubSection "Display"
                Depth     8
        EndSubSection
        SubSection "Display"
                Depth     15
        EndSubSection
        SubSection "Display"
                Depth     16
        EndSubSection
        SubSection "Display"
                Depth     24
        EndSubSection
EndSection

最終的な XF86Config

Section "Module"
    Load        "dbe"   # Double buffer extension
    SubSection  "extmod"
      Option    "omit xfree86-dga"   # don't initialise the DGA extension
    EndSubSection
    Load        "type1"
    Load        "freetype"
EndSection

Section "Files"
    RgbPath    "/usr/X11R6/lib/X11/rgb"
    FontPath   "/usr/X11R6/lib/X11/fonts/local/"
    FontPath   "/usr/X11R6/lib/X11/fonts/misc/"
    FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
    FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
    FontPath   "/usr/X11R6/lib/X11/fonts/Type1/"
    FontPath   "/usr/X11R6/lib/X11/fonts/Speedo/"
    FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/"
    FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/"
EndSection

Section "ServerFlags"
EndSection

Section "InputDevice"
    Identifier  "Keyboard1"
    Driver      "Keyboard"
    Option "AutoRepeat" "500 30"
    Option "XkbRules"   "xfree86"
    Option "XkbModel"   "jp106"
    Option "XkbLayout"  "jp"
EndSection

Section "InputDevice"
    Identifier  "Mouse1"
    Driver      "mouse"
    Option "Protocol"    "PS/2"
    Option "Device"      "/dev/psaux"
    Option "Emulate3Buttons"
EndSection

Section "Monitor"
    Identifier  "My Monitor"
    HorizSync   31.5 - 64.3
    VertRefresh 50-100
EndSection

Section "Device"
    Identifier  "Standard VGA"
    VendorName  "Unknown"
    BoardName   "Unknown"
    Driver      "vga"
EndSection

Section "Device"
    Identifier  "S3 864 (generic)"
    Driver      "vesa"
EndSection

Section "Screen"
    Identifier  "Screen 1"
    Device      "S3 864 (generic)"
    Monitor     "My Monitor"
    DefaultDepth 16

    Subsection "Display"
        Depth       8
        Modes       "1280x1024" "1024x768" "800x600" "640x480"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       16
        Modes       "1024x768" "800x600" "640x480"
        ViewPort    0 0
    EndSubsection
    Subsection "Display"
        Depth       24
        Modes       "800x600" "640x480"
        ViewPort    0 0
    EndSubsection
EndSection

Section "ServerLayout"
    Identifier  "Simple Layout"
    Screen "Screen 1"
    InputDevice "Mouse1" "CorePointer"
    InputDevice "Keyboard1" "CoreKeyboard"
EndSection

[サーバの実験室 Redhat/Fedora]