GRUBによるboot時のVGA設定に関するまとめ - よっぱ主義。:
特别注意: 这些参数和我用vga=ask得到的参数还是有区别的. 比如: 0x36D是指1440x900的分辨率(Mac Air). 而在这个表里是1024x640.
Wiki上关于VBE的介绍----1680x1050还没有定义。所以对于这个分辨率的vga代码,不同厂商的定义似乎是不同的.
|
4bits |
8bits |
15bits |
16bits |
24bits |
32bits |
10進数 |
16進数 |
10進数 |
16進数 |
10進数 |
16進数 |
10進数 |
16進数 |
10進数 |
16進数 |
10進数 |
16進数 |
320x200 |
- |
- |
- |
- |
781 |
0x30d |
782 |
0x30e |
783 |
0x30f |
- |
- |
640x400 |
- |
- |
768 |
0x300 |
801 |
0x321 |
802 |
0x322 |
803 |
0x323 |
804 |
0x324 |
640x480 |
- |
- |
769 |
0x301 |
784 |
0x310 |
785 |
0x311 |
786 |
0x312 |
809 |
0x329 |
800x500 |
- |
- |
879 |
0x36f |
880 |
0x370 |
881 |
0x371 |
882 |
0x372 |
883 |
0x373 |
800x600 |
770 |
0x302 |
771 |
0x303 |
787 |
0x313 |
788 |
0x314 |
789 |
0x315 |
814 |
0x32e |
896x672 |
- |
- |
815 |
0x32f |
816 |
0x330 |
817 |
0x331 |
818 |
0x332 |
819 |
0x333 |
1024x640 |
- |
- |
874 |
0x36a |
875 |
0x36b |
876 |
0x36c |
877 |
0x36d |
878 |
0x36e |
1024x768 |
772 |
0x304 |
773 |
0x305 |
790 |
0x316 |
791 |
0x317 |
792 |
0x318 |
824 |
0x338 |
1152x720 |
- |
- |
869 |
0x365 |
870 |
0x366 |
871 |
0x367 |
872 |
0x368 |
873 |
0x369 |
1280x1024 |
774 |
0x306 |
775 |
0x307 |
793 |
0x319 |
794 |
0x31a |
795 |
0x31b |
829 |
0x33d |
1440x900 |
- |
- |
864 |
0x360 |
865 |
0x361 |
866 |
0x362 |
867 |
0x363 |
868 |
0x364 |
1400x1050 |
- |
- |
835 |
0x343 |
- |
- |
837 |
0x345 |
838 |
0x346 |
- |
- |
1600x1200 |
- |
- |
796 |
0x31c |
797 |
0x31d |
798 |
0x31e |
799 |
0x31f |
834 |
0x342 |
1920x1200 |
- |
- |
893 |
0x37d |
- |
- |
- |
- |
- |
- |
- |
- |
「GRUBによる」とタイトルに書きましたが、VESAStandardの設定値なので、LILOを使ったboot処理でもおそらく使えます。
【参考】
http://en.wikipedia.org/wiki/Intel_GMA
http://en.gentoo-wiki.com/wiki/Framebuffer
Kernel Configuration
Device Drivers ->
Graphics support --->
-*- Support for frame buffer devices --->
[*] Enable firmware EDID
...
*** Frame buffer hardware drivers ***
Console display driver support --->
<*> Framebuffer Console support
uvesafb
Device Drivers ->
<*> Connector - unified userspace <-> kernelspace linker --->
Graphics support ->
[*] Support for frame buffer devices --->
[*] Enable firmware EDID
...
<*> Userspace VESA VGA graphics support
Note: If you need to add v86d to an already existing initramfs source directory, look in /usr/share/v86d/initramfs and copy the files listed there.
General Setup ->
(/usr/share/v86d/initramfs) Initramfs source file(s)
vesafb
Device Drivers ->
<*> Connector - unified userspace <-> kernelspace linker --->
Graphics support ->
[*] Support for frame buffer devices --->
[*] Enable firmware EDID
...
[*] VESA VGA graphics support
# sudo hwinfo --framebuffer | grep Mode
输出内容示例1:
显卡品牌和型号: NVIDIA GW-P/N@PM898486GTQ14P:0
Model: "NVIDIA GW-P/N@PM898486GTQ14P:0"
======================================
Mode 0x0330: 320x200 (+320), 8 bits
Mode 0x030e: 320x200 (+640), 16 bits
Mode 0x030f: 320x200 (+1280), 24 bits
Mode 0x0334: 320x240 (+320), 8 bits
Mode 0x0335: 320x240 (+640), 16 bits
Mode 0x0336: 320x240 (+1280), 24 bits
Mode 0x0331: 320x400 (+320), 8 bits
Mode 0x0332: 320x400 (+640), 16 bits
Mode 0x0333: 320x400 (+1280), 24 bits
Mode 0x0300: 640x400 (+640), 8 bits
Mode 0x033d: 640x400 (+1280), 16 bits
Mode 0x033e: 640x400 (+2560), 24 bits
Mode 0x0301: 640x480 (+640), 8 bits
Mode 0x0311: 640x480 (+1280), 16 bits
Mode 0x0312: 640x480 (+2560), 24 bits
Mode 0x0362: 768x480 (+768), 8 bits
Mode 0x0303: 800x600 (+800), 8 bits
Mode 0x0314: 800x600 (+1600), 16 bits
Mode 0x0315: 800x600 (+3200), 24 bits
Mode 0x0305: 1024x768 (+1024), 8 bits
Mode 0x0317: 1024x768 (+2048), 16 bits
Mode 0x0318: 1024x768 (+4096), 24 bits
Mode 0x037b: 1280x720 (+5120), 24 bits
Mode 0x0360: 1280x800 (+1280), 8 bits
Mode 0x0361: 1280x800 (+5120), 24 bits
Mode 0x0307: 1280x1024 (+1280), 8 bits
Mode 0x031a: 1280x1024 (+2560), 16 bits
Mode 0x031b: 1280x1024 (+5120), 24 bits
Mode 0x0364: 1440x900 (+1440), 8 bits
Mode 0x0365: 1440x900 (+5760), 24 bits
Mode 0x0347: 1400x1050 (+1400), 8 bits
Mode 0x0348: 1400x1050 (+2800), 16 bits
Mode 0x0349: 1400x1050 (+5600), 24 bits
Mode 0x0345: 1600x1200 (+1600), 8 bits
Mode 0x0346: 1600x1200 (+3200), 16 bits
Mode 0x034a: 1600x1200 (+6400), 24 bits
Mode 0x0368: 1680x1050 (+1680), 8 bits
Mode 0x0369: 1680x1050 (+6720), 24 bits
Mode 0x037c: 1920x1200 (+1920), 8 bits
Mode 0x037d: 1920x1200 (+7680), 24 bits
Mode 0x0352: 2048x1536 (+8192), 24 bits
不过今天挺幸运,在Gentoo Wiki上看到一篇文章,讲Gensplash,里边讲了如何设置vga。大致的步骤是:
1. 安装lrmi, 里边包含一个vbetest工具;
2. 在终端中运行 vbetest,得到显卡支持的所有vga模式;
3. 在每行开头的中括号里的数字再加上512,就是给kernel传的vga的值了。
我的机器运行vbetest的结果是:
VBE Version 3.0
NVIDIA
[256] 640x400 (256 color palette)
[257] 640x480 (256 color palette)
[259] 800x600 (256 color palette)
[261] 1024x768 (256 color palette)
[263] 1280x1024 (256 color palette)
[270] 320x200 (5:6:5)
[271] 320x200 (8:8:8)
[273] 640x480 (5:6:5)
[274] 640x480 (8:8:8)
[276] 800x600 (5:6:5)
[277] 800x600 (8:8:8)
[279] 1024x768 (5:6:5)
[280] 1024x768 (8:8:8)
[282] 1280x1024 (5:6:5)
[283] 1280x1024 (8:8:8)
[304] 320x200 (256 color palette)
[305] 320x400 (256 color palette)
[306] 320x400 (5:6:5)
[307] 320x400 (8:8:8)
[308] 320x240 (256 color palette)
[309] 320x240 (5:6:5)
[310] 320x240 (8:8:8)
[317] 640x400 (5:6:5)
[318] 640x400 (8:8:8)
[352] 1280x800 (256 color palette)
[353] 1280x800 (8:8:8)
[354] 768x480 (256 color palette)
[360] 1680x1050 (256 color palette)
[361] 1680x1050 (8:8:8)
Type a mode number, or 'q' to quit -
比如我选1680x1050、24位模式,vga就是361+512=873。
后来又看了Wiki上关于VBE的介绍,才知道1680x1050的还没有定义。所以对于这个分辨率的vga代码,不同厂商的定义似乎是不同的,看来还不能像传统4:3的那些代码记住就行了。
不论如何,现在终端里的字体终于不再是矮胖型的了。