特殊:Badtitle/NS100:ConsoleFramebuffer/zh:修订间差异
无编辑摘要 |
无编辑摘要 |
||
(未显示同一用户的5个中间版本) | |||
第1行: | 第1行: | ||
{{ | {{Copyedit translation}} {{From|https://help.ubuntu.com/community/ConsoleFramebuffer}} {{Languages|UbuntuHelp:ConsoleFramebuffer}} {{Translator|杏林小草}} | ||
== 序 == | == 序 == | ||
第19行: | 第19行: | ||
blacklist gxfb<br> | blacklist gxfb<br> | ||
以後,我的系统不再尝试转换到frame buffer控制台。 | |||
== 增加控制台的可见行和可见列 == | == 增加控制台的可见行和可见列 == | ||
第52行: | 第52行: | ||
echo vesafb >> /etc/initramfs-tools/modules | echo vesafb >> /etc/initramfs-tools/modules | ||
echo fbcon >> /etc/initramfs-tools/modules | echo fbcon >> /etc/initramfs-tools/modules | ||
</pre> | </pre> | ||
杏林小草注:粗略地讲,vesafb和fbcon是两种显卡驱动。 | |||
=== 重建内核镜像(Rebuild the kernel image) === | === 重建内核镜像(Rebuild the kernel image) === | ||
这一步是必须的,以便内核在下次引导的时候加载上述两个模块。升级内核後也需要重复这一步。 | |||
<pre>sudo update-initramfs -u | <pre>sudo update-initramfs -u | ||
</pre> | </pre> | ||
=== 编辑/etc/modprobe.d/blacklist-framebuffer === | |||
=== | |||
在某些时候,Framebuffers会将计算机从睡眠状态中唤醒,然後自动失效(to wake up the computer from suspend mode and are hence disabled by default)。此时,可以找到''blacklist vesafb''这一行,在前面加上“#”(注释符)重现载入模块。 | |||
<pre># blacklist vesafb | <pre># blacklist vesafb | ||
</pre> | </pre> | ||
=== | === 编辑/etc/modules === | ||
虽然,我们已经将vesa framebuffer从黑名单中剔除,但还是要在'''''/etc/modules'''''中追加一行:'''vesafb''' | |||
<pre>echo vesafb >> /etc/modules | <pre>echo vesafb >> /etc/modules | ||
</pre> | </pre> | ||
=== | === 重启 === | ||
希望你在重启後看到引导过程中出现的字体都变小了。 | |||
=== | === 链接 === | ||
本节综述了不同来源的信息。 | |||
* [http://ubuntuforums.org/showthread.php?p=3826742] | * [http://ubuntuforums.org/showthread.php?p=3826742] |
2008年6月9日 (一) 19:44的最新版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/ConsoleFramebuffer }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/af | • {{#if: UbuntuHelp:ConsoleFramebuffer|Afrikaans| [[::ConsoleFramebuffer/zh/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/ar | • {{#if: UbuntuHelp:ConsoleFramebuffer|العربية| [[::ConsoleFramebuffer/zh/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/az | • {{#if: UbuntuHelp:ConsoleFramebuffer|azərbaycanca| [[::ConsoleFramebuffer/zh/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/bcc | • {{#if: UbuntuHelp:ConsoleFramebuffer|جهلسری بلوچی| [[::ConsoleFramebuffer/zh/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/bg | • {{#if: UbuntuHelp:ConsoleFramebuffer|български| [[::ConsoleFramebuffer/zh/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/br | • {{#if: UbuntuHelp:ConsoleFramebuffer|brezhoneg| [[::ConsoleFramebuffer/zh/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/ca | • {{#if: UbuntuHelp:ConsoleFramebuffer|català| [[::ConsoleFramebuffer/zh/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/cs | • {{#if: UbuntuHelp:ConsoleFramebuffer|čeština| [[::ConsoleFramebuffer/zh/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/de | • {{#if: UbuntuHelp:ConsoleFramebuffer|Deutsch| [[::ConsoleFramebuffer/zh/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/el | • {{#if: UbuntuHelp:ConsoleFramebuffer|Ελληνικά| [[::ConsoleFramebuffer/zh/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/es | • {{#if: UbuntuHelp:ConsoleFramebuffer|español| [[::ConsoleFramebuffer/zh/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/fa | • {{#if: UbuntuHelp:ConsoleFramebuffer|فارسی| [[::ConsoleFramebuffer/zh/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/fi | • {{#if: UbuntuHelp:ConsoleFramebuffer|suomi| [[::ConsoleFramebuffer/zh/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/fr | • {{#if: UbuntuHelp:ConsoleFramebuffer|français| [[::ConsoleFramebuffer/zh/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/gu | • {{#if: UbuntuHelp:ConsoleFramebuffer|ગુજરાતી| [[::ConsoleFramebuffer/zh/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/he | • {{#if: UbuntuHelp:ConsoleFramebuffer|עברית| [[::ConsoleFramebuffer/zh/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/hu | • {{#if: UbuntuHelp:ConsoleFramebuffer|magyar| [[::ConsoleFramebuffer/zh/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/id | • {{#if: UbuntuHelp:ConsoleFramebuffer|Bahasa Indonesia| [[::ConsoleFramebuffer/zh/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/it | • {{#if: UbuntuHelp:ConsoleFramebuffer|italiano| [[::ConsoleFramebuffer/zh/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/ja | • {{#if: UbuntuHelp:ConsoleFramebuffer|日本語| [[::ConsoleFramebuffer/zh/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/ko | • {{#if: UbuntuHelp:ConsoleFramebuffer|한국어| [[::ConsoleFramebuffer/zh/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/ksh | • {{#if: UbuntuHelp:ConsoleFramebuffer|Ripoarisch| [[::ConsoleFramebuffer/zh/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/mr | • {{#if: UbuntuHelp:ConsoleFramebuffer|मराठी| [[::ConsoleFramebuffer/zh/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/ms | • {{#if: UbuntuHelp:ConsoleFramebuffer|Bahasa Melayu| [[::ConsoleFramebuffer/zh/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/nl | • {{#if: UbuntuHelp:ConsoleFramebuffer|Nederlands| [[::ConsoleFramebuffer/zh/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/no | • {{#if: UbuntuHelp:ConsoleFramebuffer|norsk| [[::ConsoleFramebuffer/zh/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/oc | • {{#if: UbuntuHelp:ConsoleFramebuffer|occitan| [[::ConsoleFramebuffer/zh/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/pl | • {{#if: UbuntuHelp:ConsoleFramebuffer|polski| [[::ConsoleFramebuffer/zh/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/pt | • {{#if: UbuntuHelp:ConsoleFramebuffer|português| [[::ConsoleFramebuffer/zh/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/ro | • {{#if: UbuntuHelp:ConsoleFramebuffer|română| [[::ConsoleFramebuffer/zh/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/ru | • {{#if: UbuntuHelp:ConsoleFramebuffer|русский| [[::ConsoleFramebuffer/zh/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/si | • {{#if: UbuntuHelp:ConsoleFramebuffer|සිංහල| [[::ConsoleFramebuffer/zh/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/sq | • {{#if: UbuntuHelp:ConsoleFramebuffer|shqip| [[::ConsoleFramebuffer/zh/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/sr | • {{#if: UbuntuHelp:ConsoleFramebuffer|српски / srpski| [[::ConsoleFramebuffer/zh/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/sv | • {{#if: UbuntuHelp:ConsoleFramebuffer|svenska| [[::ConsoleFramebuffer/zh/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/th | • {{#if: UbuntuHelp:ConsoleFramebuffer|ไทย| [[::ConsoleFramebuffer/zh/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/tr | • {{#if: UbuntuHelp:ConsoleFramebuffer|Türkçe| [[::ConsoleFramebuffer/zh/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/vi | • {{#if: UbuntuHelp:ConsoleFramebuffer|Tiếng Việt| [[::ConsoleFramebuffer/zh/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/yue | • {{#if: UbuntuHelp:ConsoleFramebuffer|粵語| [[::ConsoleFramebuffer/zh/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/zh | • {{#if: UbuntuHelp:ConsoleFramebuffer|中文| [[::ConsoleFramebuffer/zh/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/zh-hans | • {{#if: UbuntuHelp:ConsoleFramebuffer|中文(简体)| [[::ConsoleFramebuffer/zh/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ConsoleFramebuffer | UbuntuHelp:ConsoleFramebuffer | {{#if: | :}}ConsoleFramebuffer/zh}}/zh-hant | • {{#if: UbuntuHelp:ConsoleFramebuffer|中文(繁體)| [[::ConsoleFramebuffer/zh/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:ConsoleFramebuffer|:ConsoleFramebuffer/zh|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :ConsoleFramebuffer/zh/zh | | {{#ifexist: ConsoleFramebuffer/zh/zh | | {{#ifeq: {{#titleparts:ConsoleFramebuffer/zh|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:ConsoleFramebuffer/zh|1|-1|}} | zh | | }}
序
如果你的嵌入式系统给出这样的信息:“控制台:正在将显卡切换至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 ? ?
在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
字符在传递到显示器之前,先寄存在帧缓存(framebuffer)中。我们需要告诉操作系统,我们修改了控制台的分辨率,以便显卡驱动程序做出相应调整。要做到这一点,只需将 vesafb 和 fbcon 加入到/etc/initramfs-tools/modules中
sudo bash echo vesafb >> /etc/initramfs-tools/modules echo fbcon >> /etc/initramfs-tools/modules
杏林小草注:粗略地讲,vesafb和fbcon是两种显卡驱动。
重建内核镜像(Rebuild the kernel image)
这一步是必须的,以便内核在下次引导的时候加载上述两个模块。升级内核後也需要重复这一步。
sudo update-initramfs -u
编辑/etc/modprobe.d/blacklist-framebuffer
在某些时候,Framebuffers会将计算机从睡眠状态中唤醒,然後自动失效(to wake up the computer from suspend mode and are hence disabled by default)。此时,可以找到blacklist vesafb这一行,在前面加上“#”(注释符)重现载入模块。
# blacklist vesafb
编辑/etc/modules
虽然,我们已经将vesa framebuffer从黑名单中剔除,但还是要在/etc/modules中追加一行:vesafb
echo vesafb >> /etc/modules
重启
希望你在重启後看到引导过程中出现的字体都变小了。
链接
本节综述了不同来源的信息。