个人工具

“UbuntuHelp:ConsoleFramebuffer/zh”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
第21行: 第21行:
 
以后,我的系统不再尝试转换到frame buffer控制台。
 
以后,我的系统不再尝试转换到frame buffer控制台。
  
== Increase the number of visible rows and columns in console ==
+
== 增加控制台的可见行和可见列 ==
  
=== Chose preferred console resolution ===
+
=== 选择喜欢的控制台分辨率 ===
  
The default size of the console is 25x80 chars using vga (640x480 pixels) for historical reasons. I order to utilize modern display resolution you will need to override this settings during the operation system boot process. Please note that widescreen format is currently not supported by the kernel console driver. Pick a appropriate value from the matrix below, e.g. '''0x31A''' for 16 bit 1280x1024.
+
由于历史原因,控制台的默认大小为25x80字符,使用vga(640x480)模式。为了充分利用现代显示设备的分辨能力,你可以修改引导过程的设置。请注意,内核控制台驱动暂时还不能支持宽屏格式。从下表中选择一个合适的值,如'''0x31A'''(代表16位深1280x1024)。
 
<pre>Colours 640x400 640x480 800x600 1024x768 1152x864 1280x1024 1600x1200
 
<pre>Colours 640x400 640x480 800x600 1024x768 1152x864 1280x1024 1600x1200
 
--------+--------------------------------------------------------------
 
--------+--------------------------------------------------------------
第35行: 第35行:
 
32 bits | &nbsp;? &nbsp;? &nbsp;? &nbsp;? 0x164 &nbsp;? &nbsp;?
 
32 bits | &nbsp;? &nbsp;? &nbsp;? &nbsp;? 0x164 &nbsp;? &nbsp;?
 
</pre>  
 
</pre>  
=== Edit /boot/grub/menu.lst ===
+
=== 编辑/boot/grub/menu.lst ===
  
Append ''vga=0x31A'' in the end of the ''kernel'' line. Your root=UUID will look different and do '''not''' edit this since it will cause your computer to fail booting. Please be warned. In the kernel line below the option ''splash'' is removed since it might cause LCD monitors to entering sleep mode during the boot process when using DVI input. This is not a serious error but a very annoying side-effect from changing the console resolution. This failure might apply on other configurations as well.
+
在kernel行的末尾增加 ''vga=0x31A'' 。注意,root=UUID 在不同的机器上是不一样的,请不要编辑它,以免导致无法启动。将选项splash 删掉,不然在切换分辨率时可能导致液晶显示器进入睡眠模式,虽然这不是什么大问题,但却很烦人。
 
<pre>title Ubuntu 7.10, kernel 2.6.22-14-generic
 
<pre>title Ubuntu 7.10, kernel 2.6.22-14-generic
 
root (hd0,0)
 
root (hd0,0)
第44行: 第44行:
 
quiet
 
quiet
 
</pre>  
 
</pre>  
* Tip, If you would like to test the setting but not make a permanent change as above it's possible to edit grub options during computer booting. When grub is loading press ESC to enter the boot menu, chose to edit the kernel line and append vga=0x31A. Continue to boot linux.
+
* 小贴示:如果你只想暂时测试一下,那么可以在系统引导到grub的时候按下ESC键,进入引导菜单(boot menu),将vga=0x31A追加到kernel行末,继续引导Linux
  
=== Edit /etc/initramfs-tools/modules ===
+
=== &nbsp; 编辑/etc/initramfs-tools/modules ===
  
 
A framebuffer is the device forwarding the text to be outputted on your display. In order to make the operation system aware we changed the size of the console the framebuffer driver needs to be notified. Add two lines containing '''vesafb''' and '''fbcon''' to ''/etc/initramfs-tools/modules''
 
A framebuffer is the device forwarding the text to be outputted on your display. In order to make the operation system aware we changed the size of the console the framebuffer driver needs to be notified. Add two lines containing '''vesafb''' and '''fbcon''' to ''/etc/initramfs-tools/modules''

2008年6月9日 (一) 19:22的版本

如果你的嵌入式系统给出这样的信息:“控制台:正在将显卡切换至80x30模式(Console: switching to colour frame buffer device 80x30)“,那么下面内容将能帮助你。

方案:加入黑名单(The Blacklist Solution)

控制台切换至frame buffer设备,是因为引导期间加载了frame buffer设备驱动。查看哪个frame buffer设备驱动被加载,可以运行命令:

    #lsmod

在我的系统中,我注意到这样的一行:

    gxfb 8832 1

那么,我该如何阻止加载这个驱动呢?Ubuntu提供了一个阻止自动加载驱动的方法。在/etc/modprobe.d中存在着一个黑名单。对我来说,我只要简单地在黑名单文件中加入

    blacklist gxfb

以后,我的系统不再尝试转换到frame buffer控制台。

增加控制台的可见行和可见列

选择喜欢的控制台分辨率

由于历史原因,控制台的默认大小为25x80字符,使用vga(640x480)模式。为了充分利用现代显示设备的分辨能力,你可以修改引导过程的设置。请注意,内核控制台驱动暂时还不能支持宽屏格式。从下表中选择一个合适的值,如0x31A(代表16位深1280x1024)。

Colours 640x400 640x480 800x600 1024x768 1152x864 1280x1024 1600x1200
--------+--------------------------------------------------------------
4 bits |  ?  ? 0x302  ?  ?  ?  ?
8 bits | 0x300 0x301 0x303 0x305 0x161 0x307 0x31C
15 bits |  ? 0x310 0x313 0x316 0x162 0x319 0x31D
16 bits |  ? 0x311 0x314 0x317 0x163 0x31A 0x31E
24 bits |  ? 0x312 0x315 0x318  ? 0x31B 0x31F
32 bits |  ?  ?  ?  ? 0x164  ?  ?

编辑/boot/grub/menu.lst

在kernel行的末尾增加 vga=0x31A 。注意,root=UUID 在不同的机器上是不一样的,请不要编辑它,以免导致无法启动。将选项splash 删掉,不然在切换分辨率时可能导致液晶显示器进入睡眠模式,虽然这不是什么大问题,但却很烦人。

title Ubuntu 7.10, kernel 2.6.22-14-generic
root (hd0,0)
kernel /vmlinuz-2.6.22-14-generic root=UUID=98c2b6c5-4f08-4fbf-bd9c-c470b286f614 ro vga=0x31A
initrd /initrd.img-2.6.22-14-generic
quiet
  • 小贴示:如果你只想暂时测试一下,那么可以在系统引导到grub的时候按下ESC键,进入引导菜单(boot menu),将vga=0x31A追加到kernel行末,继续引导Linux

  编辑/etc/initramfs-tools/modules

A framebuffer is the device forwarding the text to be outputted on your display. In order to make the operation system aware we changed the size of the console the framebuffer driver needs to be notified. Add two lines containing vesafb and fbcon to /etc/initramfs-tools/modules

sudo bash
echo vesafb >> /etc/initramfs-tools/modules
echo fbcon >> /etc/initramfs-tools/modules

Rebuild the kernel image

This step is necessary to include these two modules in the kernel image being used upon next reboot. This step might also be necessary to perform after a kernel upgrade.

sudo update-initramfs -u

Edit /etc/modprobe.d/blacklist-framebuffer

Framebuffers are sometimes causing problems to wake up the computer from suspend mode and are hence disabled by default. Comment out the line blacklist vesafb to load the module anyway.

# blacklist vesafb

Edit /etc/modules

Although we stopped blacklisting the the vesa framebuffer we force to load it. Append one line with vesafb in /etc/modules

echo vesafb >> /etc/modules

Reboot

Hopefully you should see the boot messages with a smaller font upon the boot process.

Links

This section was assembled using information from different sources.