Wednesday, October 10th, 2007

Changing Bootup and Console Screen Resolutions

I was browsing the Ubuntu questions the other day when I came across a question about changing the bootup and console screen resolution for Ubuntu server edition. The question was:

Hello,

I am running Ubuntu 6.10 Server Edition on a Toshiba Tecra8000 laptop and I need some help changing the screen resolution from 640X480 to 1024X768. I am also running Xubuntu on a Satellite 4080XCDT and I was able to fairly easily correct the screen resolution by editing xorg.conf. Unfortunately, I noticed that Ubuntu Server Edition does not have an xorg.conf. Is there a similar configuration file that I should edit on the Server Edition? If so, can anyone tell where to find it and some advice on editing it?

Thanks,
Sam

Funnily enough, my server has the same issue - although I only tend to access it via SSH so it's never really been much of a problem. Anyhow, on reading the question I thought I might as well find out more and see if I could find a fix.

So, I Googled a few queries and found an excellent howto by Indras on the Ubuntu forums entitled, "HOWTO: Change bootup resolution". I suggested to Sam that he read through the article and give it a try.

Eating Dog Food

Having suggested it to Sam it was only right to try it myself. For future reference here is what I did:

1. Selected my vesafb mode [0x317] from the following table:

          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      ?

2. Edited my menu.lst file with the command:

sudo vim /boot/grub/menu.lst

3. Changed the line that read:

kernel          /boot/vmlinuz-2.6.15-26-server root=/dev/hda1 ro quiet splash

to

kernel          /boot/vmlinuz-2.6.15-26-server root=/dev/hda1 ro quiet splash vga=0x317

4. Saved the file, exited vim and issued the following to reboot:

sudo shutdown -r now

Moments later the screen on my old Toshiba Satellite Pro flickered back to life. I can happily report that the console is now full screen.

I never doubted it would work :)

Tagged with: linux, ubuntu


6 Responses to “Changing Bootup and Console Screen Resolutions”

  1. ikt wrote,

    cheers :)

  2. Linux Commando wrote,

    OMG this is great, much needed and much appreciated!

  3. Johan wrote,

    Thanks!

    Before I could only see 1/4 of the console screen. After 4 tries I found the one that worked: 0x311 (640x480) on my old PC. (Though it's showing like being a 1024x780 :) )

    — Johan

  4. phillip wrote,

    THANKS! that works perfectly even on 9.04 server! finally i can see the left edge of my screen, i no longer have to guess which lines are commented! LOL 0x317 worked on my qptiquest (viewsonic) q19wb (not intrested in using the widescreen that much)

  5. david wrote,

    sudo hwinfo —framebuffer | grep 'Mode'

    will give you a list of supported modes for your framebuffer. You of course have to have hwinfo installed

  6. Matthew wrote,

    This appears to fail in Ubuntu 9.10. It could be that I upgraded with these settings already applied in 9.04. I upgraded two machines; both acknowledged during the upgrade that /boot/grub/menu.lst had been altered. On one, I installed the new version. On the other, I told it to leave the one I had altered. With the new version, I fell into a rescue shell. I dumped that VM. On the other, once the startup disk was chosen, the screen went blank, but I can ssh in and do everything. The server's running, but the console is black.

Add Your Comment

Use the form below to add your comment. Markdown syntax is available. Note, comments are moderated by me for spam filtering. Alternatively, feel free to contact me privately.