![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
|
Tutorials & Tips The place to find Ubuntu related Tips & Tricks. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
A Carafe of Ubuntu
![]() Join Date: Jun 2006
Location: Michigan, US
Beans: 119
Ubuntu 6.06
|
HOWTO: Change bootup and console resolution
I've seen a few questions about this on the forums, so I've decided to write a full-fledged tutorial on how to set this up in Ubuntu. This will show you how to change your screen's resolution while booting, during usplash, and at any time one one of the text consoles (by pressing CTRL+ALT+F1 through F6). I'll try to make this as friendly as possible for newbies, and I'll make sure to explain all acronyms and abbreviations at least once.
Explanation: (feel free to skip this section, it is only for educational purposes) Your computer system boots up in multiple stages, each one using the video card and monitor in its own way. This is important to know when tracking down resolution problems. First, your computer's BIOS (Basic Input-Output System) detects and powers up your video card during POST (the Power On Self Test) and uses it to display all of its relevant information, such as the memory check, a list of devices, and so on. Some motherboards will simply display a full-screen logo, particularly branded PCs, like Hewlett Packard and Compaq. You may have to press the spacebar or escape key to see what's going on behind the logo. Each PC is different, so consult your vendor's support site, your computer's manual, or, if all else fails, google.com. The BIOS generally chooses a generic resolution that will work on nearly any video card and monitor, like 640x480x8, so as to not have an error message that the user is unable to read. I've only seen a couple computers where this resolution could be configured, as it's not a high priority option. Then, your bootloader starts, using the resolution already in place. This may be ntldr, on Windows NT/2000/XP systems, darwin on macintosh systems, or Lilo/Grub on Linux systems. Ubuntu Dapper defaults with a basic plaintext grub. See the gfxboot grub tutorial here on ubuntuforums if you'd like to use the graphical grub that Suse has: http://www.ubuntuforums.org/showthread.php?t=208855 However, I'm going to assume you're using default options from here on. After you choose your operating system and kernel in grub, or it automatically defaults to the first option if you do not press a key during the 3 second countdown, it fires up the kernel and passes it bootup parameters. There are many different parameters you can send to the kernel before bootup, such as 'single', for single-user mode. The kernel uses it's own video card driver. In Ubuntu, it uses the basic vesafb driver, short for vesa framebuffer. This is a simple, generic, non-accelerated driver, which is optimal for compatibility. Once again, the point is to never have something bad happen and an error message displayed on the screen that the user cannot see. There are still users out there whose monitors cannot display above 800x600, and if your kernel tried to run the vesafb at a resolution higher than this, those users would be alienated. If grub does not pass a vga parameter to the kernel, it assumes vga=normal, which is 640x480 resolution. From then on, everything running will be at that basic vga resolution, except for the xserver. First, your usplash screen displays, while all other services are starting. This is the screen with an orange Ubuntu logo at the top of the screen and a list of processes starting up in the bottom half. There's also a howto on the forums for changing the colors of the usplash screen, located here: http://www.ubuntuforums.org/showthread.php?t=82835. Near the end of the bootup sequence, it starts up six consoles, using the getty program, and then the xserver. The first six consoles can be accessed any time by pressing CTRL+ALT+F(x) where x is the number of the console. The xserver then binds itself to F7, the next available number. Try it now if you feel like, by holding CTRL and ALT and go through F1 through F7. The consoles always use the vesafb driver to display, so they are at the same resolution that was passed to your kernel from grub. The xserver uses its own driver and resolution, defined by /etc/X11/xorg.conf, and then Gnome, KDE, or XFCE run on top of it. I won't go into detail here on how they work. End explanation section Okay, if you jumped ahead, here's where you should start paying attention. First, I'm going to give you the vesafb modes table. This was taken from http://www.tldp.org/HOWTO/Framebuffer-HOWTO-5.html, so feel free to go there for more information. The Table HTML Code:
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 ? (I apologize for the way this table looks, it's the only way I could get the columns to line up) So first, choose which resolution you'd like to run your consoles and usplash in from the chart above. Now, open your menu.lst file: Code:
sudo nano /boot/grub/menu.lst Code:
kernel /boot/vmlinuz-2.6.15-26-386 root=/dev/hda5 ro quiet splash Now, save the file, and it will take effect when you restart. Note: Normally, when you upgrade your kernel or run grub-reconfigure, it will remove this option and set it back to defaults. In order to make this change permanent, go up a couple lines to one that looks like this: Code:
# defoptions=quiet splash And add the same vga= option to the end of that as well, and it will make this new resolution permanent, even after new kernels are installed. Another ubuntuforums member, Herman, made a very important suggestion: you can make modifications to your grub boot sequence for a single boot by editing grub before you boot. Since it does not alter Grub's menu.lst file, the change isn't permanent. When grub first boots up, at the GUI menu, select an option you want to modify and press the 'e' key. This will bring up the full list of commands from the menu.lst file that grub uses to boot that particular option. From there, you can go to your kernel line and add the vga option there, just like in my instructions above, and it will boot Ubuntu a single time with a different vesafb resolution. As a bonus, here's some extra tidbits, some of it useless knowledge, for your perusal:
Also, if you're looking for some very well written, illustrated information on using grub to its fullest, please visit Herman's website on grub here: http://users.bigpond.net.au/hermanzone/p15.htm Last edited by Indras; September 17th, 2006 at 07:43 AM.. |
|
|
|
|
|
#2 |
|
A Carafe of Ubuntu
![]() Join Date: Jun 2006
Location: Michigan, US
Beans: 119
Ubuntu 6.06
|
Re: HOWTO: Change bootup and console resolution
Just a quick little update... here's the full table in easy to read (and easy to remember) decimal format.
HTML Code:
Colours 640x400 640x480 800x600 1024x768 1152x864 1280x1024 1600x1200 --------+-------------------------------------------------------------- 4 bits | ? ? 770 ? ? ? ? 8 bits | 768 769 771 773 353 775 796 15 bits | ? 784 787 790 354 793 797 16 bits | ? 758 788 791 355 794 798 24 bits | ? 786 789 792 ? 795 799 32 bits | ? ? ? ? 356 ? I've also seen questions from people wanting widescreen resolutions. I'm sorry, but it seems that vesafb doesn't support any resolution not in the table above. |
|
|
|
|
|
#3 |
|
5 Cups of Ubuntu
![]() |
Re: HOWTO: Change bootup resolution
Thanks so much for this post.
I have used all of the features you mentioned to great benefit. Much appreciated. Ethan Cane Web Developer |
|
|
|
|
|
#4 |
|
First Cup of Ubuntu
![]() Join Date: Sep 2005
Beans: 7
|
Re: HOWTO: Change bootup resolution
same 4 edgy?
|
|
|
|
|
|
#5 |
|
A Carafe of Ubuntu
![]() Join Date: Oct 2006
Location: Richmond, VA USA
Beans: 119
Ubuntu 9.04 Jaunty Jackalope
|
Re: HOWTO: Change bootup resolution
This works for me in edgy, but just a note that the 1152x864 resolution doesn't seem to be recognized. It gives an error message and presents the limited 1-9 menu listed in the explanation above.
|
|
|
|
|
|
#6 |
|
Just Give Me the Beans!
![]() Join Date: Nov 2004
Beans: 53
|
Re: HOWTO: Change bootup resolution
I've always used this nice feature, but now in Edgy it doesn't seem to work: the boot screen appears not centered on the screen, but rather in the top left corner.
|
|
|
|
|
|
#7 |
|
Just Give Me the Beans!
![]() |
Re: HOWTO: Change bootup resolution
Nice info, but I am trying to figure out for the default login screen.
|
|
|
|
|
|
#8 |
|
A Carafe of Ubuntu
![]() Join Date: Jun 2006
Location: Victoria Canada
Beans: 109
The Feisty Fawn Testing
|
Re: HOWTO: Change bootup resolution
Sorry, re-read the thread and saw anything other than what's in the table is not supported.
What do I need to use if I'm trying to achieve 1900 x 1200 at 24 or 32 bit? Last edited by Kerry Lange; October 31st, 2006 at 07:58 PM.. |
|
|
|
|
|
#9 |
|
Quad Shot of Ubuntu
![]() Join Date: Nov 2005
Beans: 473
Ubuntu 9.10 Karmic Koala
|
Re: HOWTO: Change bootup resolution
I've only just found the feature, and yes, the boot screen is not centred. Anyone know how to fix this? BTW,tty1-6 is awesome at high res, thanks for the pointer!
__________________
Compiz Config Settings Manager, Emerald Themes and Mouse Pointers |
|
|
|
|
|
#10 |
|
Just Give Me the Beans!
![]() Join Date: Mar 2005
Location: Denmark
Beans: 50
Ubuntu Karmic Koala (testing)
|
Re: HOWTO: Change bootup resolution
If only 1280x800 was supported...
__________________
Mainboard : Asus Striker-II | CPU : E8400 3 GHz RAM: 16GB DDR2 (1066) | Video: 2x Geforce 9800 GT HDD: 2x 320GB | Display: 2x 23" @ 1920x1084 (HP 2309m) Linux: Ubuntu 9.04 & 9.10 (testing) |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|