特殊:Badtitle/NS100:ConsoleFramebuffer:修订间差异

来自Ubuntu中文
跳到导航跳到搜索
Oneleaf留言 | 贡献
新页面: {{From|https://help.ubuntu.com/community/ConsoleFramebuffer}} {{Languages|UbuntuHelp:ConsoleFramebuffer}} == Introduction == If you are having trouble with an embedded system giving you...
 
Wikibot留言 | 贡献
无编辑摘要
 
(未显示2个用户的9个中间版本)
第1行: 第1行:
{{From|https://help.ubuntu.com/community/ConsoleFramebuffer}}
{{From|https://help.ubuntu.com/community/ConsoleFramebuffer}}
{{Languages|UbuntuHelp:ConsoleFramebuffer}}
{{Languages|UbuntuHelp:ConsoleFramebuffer}}
== Introduction ==
== Introduction ==
In most GNU/Linux systems, you are provided with multiple TTYs or virtual consoles.  Typically 6.  These are accessed by pressing Ctrl+Alt+F1 through F6 with your XServer typically running on TTY7 or Ctrl+Alt+F7 and the console logging done to TTY8 or TTY12. (Ctrl+Alt+F8 or F12).  The default resolution for these console screens is 80 columns by 25 rows.  This default resolution is inconvenient for most activities done on the console.  Thankfully, this is an old problem and has been solved for a long time.
The following instructions will provide you the necessary steps to increase the resolution of console screens through the use of the vga kernel option.
'''Warning: Be careful to not chose a resolution that is higher than what your display device supports.  Doing so will require you to boot a rescue disk and adjust the vga mode to a supported value.'''
== Increase the resolution of the virtual consoles ==
=== Chose preferred console resolution ===
The default size of the console is 25x80 chars using vga (640x480 pixels) for historical reasons. In order to utilize modern display resolution you will need to override this settings during the operation system boot process. Please note that widescreen format support is very limited in the VESA standards. Pick a appropriate value from the matrix below, e.g. '''791''' for 16 bit 1280x1024.
<pre><nowiki>
320×200 640×400 640×480 800×500 800×600 896×672 1024×640
16 colors 770
256 colors 768 769 879 771 815 874
15-bit 781 801 784 880 787 816 875
16-bit 782 802 785 881 788 817 876
24-bit 783 803 786 882 789 818 877
32-bit 804 809 883 814 819 878


If you are having trouble with an embedded system giving you the following message
Console: switching to colour frame buffer device 80x30
then this answer will help you.
== The Blacklist Solution ==
The reason the console switches to a frame buffer device is that during boot time a frame buffer driver was loaded for your hardware.  To discover what frame buffer driver was loaded, you will have to run
#lsmod
and look at the output.  For my system, I noticed this line
gxfb                    8832  1
Now the question is, "How do I prevent the frame buffer driver from being loaded?"  Well, Ubuntu has an unusual system for preventing the automatic loading of drivers.  In /etc/modprobe.d there are a set of blacklist files.  To fix my problem, I simply added
blacklist gxfb
to the blacklist-framebuffer file and the system no longer tried to switch to a frame buffer console.
== TODO: Find a better solution ==


Feel free to add a better solution here.
1024×768 1152×720 1280×1024 1440×900 1600×1200
772 774
773 869 775 864 796
790 870 793 865 797
791 871 794 866 798
792 872 795 867 799
824 873 829 868 834
</nowiki></pre>
A more complete description and table can be found on the [http://en.wikipedia.org/wiki/VESA_BIOS_Extensions Wikipedia VESA BIOS Extension article].
=== Edit /boot/grub/menu.lst ===
Append ''vga=791'' in the end of the ''kernel'' line. Your root=UUID will look different .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.
<pre><nowiki>
title Ubuntu 8.10, kernel 2.6.27-9-generic
uuid 636dc411-e53a-4776-a9e9-4fc9e277f445
kernel /boot/vmlinuz-2.6.27-9-generic root=UUID=636dc411-e53a-4776-a9e9-4fc9e277f445 ro quiet splash vga=791
initrd /boot/initrd.img-2.6.27-9-generic
quiet


</nowiki></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=791. Continue to boot linux.
=== Set usplash resolution ===
To keep the Ubuntu slash logo centered, you must set the resolution to match what you chose from the table.
<pre><nowiki>
sudo vi /etc/usplash.conf
</nowiki></pre>
Change xres= to the first 1/2 of the resolution and yres= to the second 1/2.  e.g.
<pre><nowiki>
# Usplash configuration file
xres=1024
yres=768
</nowiki></pre>
=== Rebuild the kernel image ===
This step is necessary to rebuild the usplash graphics in the kernel image being used upon next reboot. This step might also be necessary to perform after a kernel upgrade.
<pre><nowiki>
sudo update-initramfs -u
</nowiki></pre>
=== Reboot ===
Hopefully you should see the boot messages with a smaller font upon the boot process.
=== Hints ===
If you are interested in seeing the supported modes of your video card, you can set the vga= line to ask and reboot.
<code><nowiki>vga=ask</nowiki></code>
Upon Grub loading, it will present you with a table of the supported modes of your video card.  The format is X by Y by Color Depth in bits.  The number to the left of the resolution is the VESA mode.  You need to convert the code to Linux VGA modes.  This is typically done by adding 512 to the VESA mode.  This is not always the case and can be values greater or lower. 
=== Links ===
This section was assembled using information from different sources.
* [http://ubuntuforums.org/showthread.php?p=3826742]
* [http://ubuntuforums.org/showthread.php?p=1505142]
* [https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.15/+bug/61285]
* [http://www.nnbfn.net/2008/11/28/ubuntu-810-console-framebuffer/]
----
----
[[category:CategoryDocumentation]]


[[category:UbuntuHelp]]
[[category:UbuntuHelp]]

2009年11月17日 (二) 18:49的最新版本

{{#ifexist: :ConsoleFramebuffer/zh | | {{#ifexist: ConsoleFramebuffer/zh | | {{#ifeq: {{#titleparts:ConsoleFramebuffer|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:ConsoleFramebuffer|1|-1|}} | zh | | }}

Introduction

In most GNU/Linux systems, you are provided with multiple TTYs or virtual consoles. Typically 6. These are accessed by pressing Ctrl+Alt+F1 through F6 with your XServer typically running on TTY7 or Ctrl+Alt+F7 and the console logging done to TTY8 or TTY12. (Ctrl+Alt+F8 or F12). The default resolution for these console screens is 80 columns by 25 rows. This default resolution is inconvenient for most activities done on the console. Thankfully, this is an old problem and has been solved for a long time. The following instructions will provide you the necessary steps to increase the resolution of console screens through the use of the vga kernel option. Warning: Be careful to not chose a resolution that is higher than what your display device supports. Doing so will require you to boot a rescue disk and adjust the vga mode to a supported value.

Increase the resolution of the virtual consoles

Chose preferred console resolution

The default size of the console is 25x80 chars using vga (640x480 pixels) for historical reasons. In order to utilize modern display resolution you will need to override this settings during the operation system boot process. Please note that widescreen format support is very limited in the VESA standards. Pick a appropriate value from the matrix below, e.g. 791 for 16 bit 1280x1024.

		320×200	640×400	640×480	800×500	800×600 896×672 1024×640	
16 colors 					770 				
256 colors 		768 	769 	879 	771 	815 	874 		
15-bit 		781 	801 	784 	880 	787 	816 	875 		
16-bit 		782 	802 	785 	881 	788 	817 	876 		
24-bit 		783 	803 	786 	882 	789 	818 	877 		
32-bit			804 	809 	883 	814 	819 	878 		


1024×768 	1152×720 	1280×1024 	1440×900 	1600×1200
772 				774
773 		869 		775 		864 		796
790 		870 		793 		865 		797
791 		871 		794 		866 		798
792 		872 		795 		867 		799
824 		873 		829 		868 		834

A more complete description and table can be found on the Wikipedia VESA BIOS Extension article.

Edit /boot/grub/menu.lst

Append vga=791 in the end of the kernel line. Your root=UUID will look different .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.

title		Ubuntu 8.10, kernel 2.6.27-9-generic
uuid		636dc411-e53a-4776-a9e9-4fc9e277f445
kernel		/boot/vmlinuz-2.6.27-9-generic root=UUID=636dc411-e53a-4776-a9e9-4fc9e277f445 ro quiet splash vga=791
initrd		/boot/initrd.img-2.6.27-9-generic
quiet

  • 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=791. Continue to boot linux.

Set usplash resolution

To keep the Ubuntu slash logo centered, you must set the resolution to match what you chose from the table.

sudo vi /etc/usplash.conf

Change xres= to the first 1/2 of the resolution and yres= to the second 1/2. e.g.

# Usplash configuration file
xres=1024
yres=768

Rebuild the kernel image

This step is necessary to rebuild the usplash graphics 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

Reboot

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

Hints

If you are interested in seeing the supported modes of your video card, you can set the vga= line to ask and reboot. vga=ask Upon Grub loading, it will present you with a table of the supported modes of your video card. The format is X by Y by Color Depth in bits. The number to the left of the resolution is the VESA mode. You need to convert the code to Linux VGA modes. This is typically done by adding 512 to the VESA mode. This is not always the case and can be values greater or lower.

Links

This section was assembled using information from different sources.