Vine Linux のテキストモードが点滅してしまうという障害の原因が判明した。起動時に vga オプションをつければよいことが分かった。
■ ■ ■
Vine Linux 3.1 を ThinkPad T22 にインストールしたところ,グラフィカルモードから Ctrl+Alt+F2 でテキストモードに切り替えると,ログインプロンプトが出るどころか画面がしましまで点滅状態で使い物にならないという障害が起こっていた(nlog(n): ThinkPad T22 に Vine Linux 3.1 をインストール)。

しましまで点滅状態のディスプレイ
シマシマになってしまうというのは,こういう感じである。画面は点滅し,色は刻々と変わっていく。
この問題はカーネルが液晶ディスプレイをフレームバッファデバイスとして認識することが原因のようだ。OS の起動オプションに vga オプションをつけることにより,解決することができる。「791」は「解像度 1024x768,16 bpp」であることを示している。bpp は bits per pixel で,1画素あたりのビット数の意味になる。Windows なら,16 bpp は「High Color」,32 bpp は「True Color」にあたる。
boot: linux vga=791

「Vine Linux」のロゴが表示された起動画面
このオプションをつけて起動したところ,画面の左上に「Vine Linux」のロゴが表示されるようになった。今までは表示されていなかったのだ。つまり,起動画面だけでも判定ができるのである。これは Vine Linux 以外でも同じで,ディストリビューションによってはペンギンのマークであることもある。
起動が上手くいって,Ctrl+Alt+F2 で正常な表示ができるのを確認したら,lilo.conf を編集してこのオプションを追加しておく。追加できる場所は2通りある。「image」より前のグローバルセクションに追加すると,それ以下の全てのイメージに対して適用が行われる。
prompt
timeout=50
default=linux
boot=/dev/hda
map=/boot/map
install=menu
message=/boot/message
vga=791
image=/boot/vmlinuz-2.4.27-0vl7.3
label=linux
read-only
root=/dev/hda2
append=" resume2=swap:/dev/hda3"
もう1つは image セクションに記述する方法で,ここにサブオプションとして vga を書く。すると全体ではなく,そのイメージだけに適用される。
prompt
timeout=50
default=linux
boot=/dev/hda
map=/boot/map
install=menu
message=/boot/message
image=/boot/vmlinuz-2.4.27-0vl7.3
label=linux
read-only
root=/dev/hda2
append=" resume2=swap:/dev/hda3"
vga=791
vga オプションで指定する数字については,Linux X-Server で非常に詳しく解説されている。そのサイトで配布されているプログラム VBE.EXE を使うと対応するモード一覧が表示される。
ThinkPad T22 のグラフィックチップは S3 Savage/IX である。VBE.EXE の実行結果は以下の通り。
A:\> VBE
OemString : S3 Incorporated. M7 BIOS
TotalMemory : 8 MB
Mode 0x100(256) Linear : 640 x 400, 8bits, Packed pixel
Mode 0x101(257) Linear : 640 x 480, 8bits, Packed pixel
Mode 0x102(258) : 800 x 600, 4bits, Planar
Mode 0x103(259) Linear : 800 x 600, 8bits, Packed pixel
Mode 0x104(260) : 1024 x 768, 4bits, Planar
Mode 0x105(261) Linear : 1024 x 768, 8bits, Packed pixel
Mode 0x106(262) : 1280 x 1024, 4bits, Planar
Mode 0x107(263) Linear : 1280 x 1024, 8bits, Packed pixel
Mode 0x10e(270) Linear : 320 x 200, 16bits, Direct color
Mode 0x10f(271) Linear : 320 x 200, 32bits, Direct color
Mode 0x111(273) Linear : 640 x 480, 16bits, Direct color
Mode 0x112(274) Linear : 640 x 480, 32bits, Direct color
Mode 0x114(276) Linear : 800 x 600, 16bits, Direct color
Mode 0x115(277) Linear : 800 x 600, 32bits, Direct color
Mode 0x117(279) Linear : 1024 x 768, 16bits, Direct color
Mode 0x118(280) Linear : 1024 x 768, 32bits, Direct color
Mode 0x11a(282) Linear : 1280 x 1024, 16bits, Direct color
Mode 0x11b(283) Linear : 1280 x 1024, 32bits, Direct color
Mode 0x11d(285) Linear : 640 x 400, 16bits, Direct color
Mode 0x11e(286) Linear : 640 x 400, 32bits, Direct color
Mode 0x120(288) Linear : 1600 x 1200, 8bits, Packed pixel
Mode 0x122(290) Linear : 1600 x 1200, 16bits, Direct color
Mode 0x124(292) Linear : 1600 x 1200, 32bits, Direct color
Mode 0x12a(298) Linear : 640 x 480, 24bits, Direct color
Mode 0x12b(299) Linear : 800 x 600, 24bits, Direct color
Mode 0x12c(300) Linear : 1024 x 768, 24bits, Direct color
Mode 0x12d(301) Linear : 1280 x 1024, 24bits, Direct color
Mode 0x12e(302) Linear : 320 x 200, 8bits, Packed pixel
Mode 0x131(305) Linear : 320 x 240, 8bits, Packed pixel
Mode 0x133(307) Linear : 320 x 240, 16bits, Direct color
Mode 0x134(308) Linear : 320 x 240, 32bits, Direct color
Mode 0x13b(315) Linear : 1400 x 1050, 8bits, Packed pixel
Mode 0x13c(316) Linear : 1400 x 1050, 16bits, Direct color
Mode 0x13e(318) Linear : 1400 x 1050, 32bits, Direct color
Mode 0x141(321) Linear : 400 x 300, 8bits, Packed pixel
Mode 0x143(323) Linear : 400 x 300, 16bits, Direct color
Mode 0x144(324) Linear : 400 x 300, 32bits, Direct color
Mode 0x151(337) Linear : 512 x 384, 8bits, Packed pixel
Mode 0x153(339) Linear : 512 x 384, 16bits, Direct color
Mode 0x154(340) Linear : 512 x 384, 32bits, Direct color
Mode 0x171(369) Linear : 720 x 480, 8bits, Packed pixel
Mode 0x173(371) Linear : 720 x 480, 16bits, Direct color
Mode 0x174(372) Linear : 720 x 480, 24bits, Direct color
Mode 0x175(373) Linear : 720 x 480, 32bits, Direct color
Mode 0x176(374) Linear : 720 x 576, 8bits, Packed pixel
Mode 0x178(376) Linear : 720 x 576, 16bits, Direct color
Mode 0x179(377) Linear : 720 x 576, 24bits, Direct color
Mode 0x17a(378) Linear : 720 x 576, 32bits, Direct color
ThinkPad T22 の解像度である 1400x1050 もちゃんと表示されている。赤色で示したのは「1024x768, 16 bpp」で,vga オプションで指定したモードである。モード番号は 10 進法で 279 となっている(16 進法では 117)。このモード番号に 512 (16 進法なら 200) を加えたもの「791」が vga オプションの数字となるのである。
ここでは「791」を指定したが,もちろん違うモードを指定することもできる。試しに vga=828 (1400x1050, 16 bpp) を指定すると,起動メッセージが画面いっぱいに表示された。文字の大きさは小さいままなので,1画面の行数が数えられないくらい多くなっていた。X Window を 1400x1050 で使うには,/etc/X11/XF86Config に設定を加えなければならない。
Posted by n at 2005-03-27 21:43 | Edit | Comments (0) | Trackback(0)