/
X Window Systemの調整
ThinkPad i1124-53JはSVGA(800×600)表示可能なLCDを備えている。この後のモデルからXGA(1024×768)を表示できるようになったのはまた別の話。
インストール後、コマンドラインでの操作だけではなくX Window Systemを起動しようとするとうまくいかないことに気づく。これはXconfiguratorというビデオデバイスの設定ソフトがうまく動いてくれないためである。これを解決するには、XF86Configというファイルを自分の手で書き換えてやる必要がある。ちなみに、このファイルは(/etc/X11/XF86Config)にある。
# **********************************************************************
# Refer to the XF86Config(4/5) man page for details about the format of
# this file.
# **********************************************************************
# **********************************************************************
# Files section. This allows default font and rgb paths to be set
# **********************************************************************
Section "Files"
# The location of the RGB database. Note, this is the name of the
# file minus the extension (like ".txt" or ".db"). There is normally
# no need to change the default.
RgbPath "/usr/X11R6/lib/X11/rgb"
# Multiple FontPath entries are allowed (they are concatenated together)
# By default, Red Hat 6.0 and later now use a font server independent of
# the X server to render fonts.
FontPath "unix/:-1"
FontPath "/usr/X11R6/lib/X11/fonts/TrueType"
EndSection
# **********************************************************************
# Server flags section.
# **********************************************************************
Section "ServerFlags"
# Uncomment this to cause a core dump at the spot where a signal is
# received. This may leave the console in an unusable state, but may
# provide a better stack trace in the core dump to aid in debugging
#NoTrapSignals
# Uncomment this to disable the <Crtl><Alt><BS> server abort sequence
# This allows clients to receive this key event.
#DontZap
# Uncomment this to disable the <Crtl><Alt><KP_+>/<KP_-> mode switching
# sequences. This allows clients to receive these key events.
#DontZoom
# useful for usb mouse
AllowMouseOpenFail
EndSection
# **********************************************************************
# Input devices
# **********************************************************************
# **********************************************************************
# Keyboard section
# **********************************************************************
Section "Keyboard"
Protocol "Standard"
# when using XQUEUE, comment out the above line, and uncomment the
# following line
Protocol "Standard"
AutoRepeat 500 5
# Let the server do the NumLock processing. This should only be
# required when using pre-R6 clients
#ServerNumLock
# Specify which keyboard LEDs can be user-controlled (eg, with xset(1))
#Xleds 1 2 3
#To set the LeftAlt to Meta, RightAlt key to ModeShift,
#RightCtl key to Compose, and ScrollLock key to ModeLock:
LeftAlt Meta
RightAlt Meta
ScrollLock Compose
RightCtl Control
# To disable the XKEYBOARD extension, uncomment XkbDisable.
XkbDisable
# To customise the XKB settings to suit your keyboard, modify the
# lines below (which are the defaults). For example, for a non-U.S.
# keyboard, you will probably want to use:
# XkbModel "pc102"
# If you have a US Microsoft Natural keyboard, you can use:
# XkbModel "microsoft"
#
# Then to change the language, change the Layout setting.
# For example, a german layout can be obtained with:
# XkbLayout "de"
# or:
# XkbLayout "de"
# XkbVariant "nodeadkeys"
#
# If you'd like to switch the positions of your capslock and
# control keys, use:
# XkbOptions "ctrl:swapcaps"
# These are the default XKB settings for XFree86
# XkbRules "xfree86"
# XkbModel "pc101"
# XkbLayout "us"
# XkbVariant ""
# XkbOptions ""
XkbKeycodes "xfree86"
XkbTypes "default"
XkbCompat "default"
XkbSymbols "japanese"
XkbGeometry "pc"
XkbRules "xfree86"
XkbModel "jp106"
XkbLayout "jp"
EndSection
# **********************************************************************
# XInput section
# **********************************************************************
Section "XInput"
Subsection "Mouse"
Protocol "IMPS/2"
Port "/dev/input/mice"
Device "/dev/input/mice"
DeviceName "Mixed USB Mouse"
ZAxisMapping 4 5
AlwaysCore
EndSubsection
EndSection
# **********************************************************************
# Pointer section
# **********************************************************************
Section "Pointer"
Protocol "PS/2"
Device "/dev/mouse"
# When using XQUEUE, comment out the above two lines, and uncomment
# the following line.
# Protocol "Xqueue"
# Baudrate and SampleRate are only for some Logitech mice
# BaudRate 9600
# SampleRate 150
# Emulate3Buttons is an option for 2-button Microsoft mice
# Emulate3Timeout is the timeout in milliseconds (default is 50ms)
Emulate3Buttons
Emulate3Timeout 50
# ChordMiddle is an option for some 3-button Logitech mice
# ChordMiddle
EndSection
# **********************************************************************
# Monitor section
# **********************************************************************
# Any number of monitor sections may be present
Section "Monitor"
Identifier "My Monitor"
VendorName "Unknown"
ModelName "Unknown"
# HorizSync is in kHz unless units are specified.
# HorizSync may be a comma separated list of discrete values, or a
# comma separated list of ranges of values.
# NOTE: THE VALUES HERE ARE EXAMPLES ONLY. REFER TO YOUR MONITOR'S
# USER MANUAL FOR THE CORRECT NUMBERS.
HorizSync 31.5 - 57.0
# VertRefresh is in Hz unless units are specified.
# VertRefresh may be a comma separated list of discrete values, or a
# comma separated list of ranges of values.
# NOTE: THE VALUES HERE ARE EXAMPLES ONLY. REFER TO YOUR MONITOR'S
# USER MANUAL FOR THE CORRECT NUMBERS.
VertRefresh 50-90
# Modes can be specified in two formats. A compact one-line format, or
# a multi-line format.
# These two are equivalent
# ModeLine "1024x768i" 45 1024 1048 1208 1264 768 776 784 817 Interlace
# Mode "1024x768i"
# DotClock 45
# HTimings 1024 1048 1208 1264
# VTimings 768 776 784 817
# Flags "Interlace"
# EndMode
# This is a set of standard mode timings. Modes that are out of monitor spec
# are automatically deleted by the server (provided the HorizSync and
# VertRefresh lines are correct), so there's no immediate need to
# delete mode timings (unless particular mode timings don't work on your
# monitor). With these modes, the best standard mode that your monitor
# and video card can support for a given resolution is automatically
# used.
ModeLine "800x600" 60.75 800 864 928 1088 600 616 621 657 -Hsync -Vsync
Modeline "640x400" 36.00 640 696 752 832 480 281 282 509 -HSync -VSync
EndSection
# **********************************************************************
# Graphics device section
# **********************************************************************
# Any number of graphics device sections may be present
Section "Device"
Identifier "My Video Card"
VendorName "SMI"
BoardName "SMI LynxEM2+"
VideoRam 2048
EndSection
# **********************************************************************
# Screen sections
# **********************************************************************
# The Colour SVGA server
Section "Screen"
Driver "svga"
Device "My Video Card"
Monitor "My Monitor"
DefaultColorDepth 16
Subsection "Display"
Depth 16
Modes "800x600"
ViewPort 0 0
EndSubsection
EndSection
ZDNetのTips for Linux に「MTRR機能を使ってXの描画を高速化させたい」
(http://www.zdnet.co.jp/help/tips/linux/l0173.html)という方法が掲載されている.
# cat /proc/cpuinfo
これを実行して表示された中のflagsという項目に,mtrrの文字が見られるかを確認する.
# ls /proc/mtrr
も確認し,mtrrファイルが存在すればMTRR機能が利用できることを意味している.これらが確認できなければ,カーネルの再構築が必要となる.
# startx 2>xlog
ログをxlogというファイルに残しつつX Windowを立ち上げる.
# cat xlog |grep Memory
(--) SVGA: PCI: Unknown vendor (0x126f) Unknown chipset (0x0712) rev 160, Memory @ 0xfd000000
表示結果の最後にあるメモリアドレスがビデオカードによって異なり,i1124-53Jでは"0xfd000000"であることが重要である.なお,VRAMの大きさは2MBであることが分かっているので,メモリサイズは0x200000である.
これをmtrrファイルに書き込んでやる.
# echo "base=0xfd000000 size=0x200000 type=write-combining" >| /proc/mtrr
X Windowを起動し直せば,極めて高速に描画されるXに驚くはずだ.
不調になったなどの理由で設定をクリアするときは次のコマンドでOKである.
# echo "disable=1" > /proc/mtrr
以上で、ThinkPad i1124-53JへのVine Linuxインストール記は完結とする。