Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I did a fresh install of Ubuntu 11.04 on a HP 550 Notebook. But grub2 isn't really fit in the best screen resolution that this Notebook can support (1280x800).

How can I do this without using a third party application ?

share|improve this question
up vote 39 down vote accepted

To do this safely requires two steps.

Step 1: find the preferred mode

Reboot and press and hold Shift to display your grub. Press C to enter console mode. Then type:

$ vbeinfo

This will display various stuff how grub recognizes your display. At the bottom is "preferred mode" - in your case it should say 1280x800. Note down the value.

Note: sometimes, some buggy video cards incorrectly give Grub the wrong preferred resolution - if the preferred mode is much higher than you were expecting, then select the nearest mode in the list displayed that you were expecting.

Press Esc to return to grub and press Enter to boot.

Step 2: Setting the resolution in grub

Reach for your terminal and type

$ sudo nano /etc/default/grub

find the line


remove the # and change 640x480 with the preferred mode you wrote down. E.g.:


save, then type

$ sudo update-grub

Note: the preferred mode has to be among those listed by vbeinfo. For example, if your preferred mode is 1920x1080 (a common 16x9 aspect ratio setting), your preferred mode is NOT supported by vbeinfo and may not work correctly. In fact, there do not seem to be any 16x9 modes supported by vbeinfo, as of Ubuntu 13.04. In that case you could try falling back to something common like 640x480, which, it seems most monitors support and vbeinfo supports. Also, not all the modes supported by vbeinfo are necessarily supported by your monitor and you may have to experiment.

share|improve this answer
Exactly what I wanted, Thanks a lot:) – Binarylife Jul 22 '11 at 7:39
@fossfreedom: I dont see anything when the grub is shown, my screen says "Out of range signal". Thus I cannot see the output of vbeinfo. How do I rectify in that case ? – user01 Jan 3 '14 at 21:38
@user01 - you'll need to first boot into ubuntu - set the GRUB_GFXMODE in grub to something low like 640x480. Then the next reboot you'll have grub and you can then see the output of vbeinfo – fossfreedom Jan 3 '14 at 21:42
You can use sudo hwinfo --framebuffer shows the same information as vbeinfo. – Chris K Jan 12 '14 at 1:48
Just a note, the resolution stated in the answer should be 1280x800. Obviously done by mistake. – Babbzzz Oct 17 '15 at 13:18

Grub Customizer:

Easy to use Grub2 settings customizer. Go to "Preferences" -> "Appearance"

  • check "custom resolution" and select one of the available resolution
  • click "close"
  • hit "save"
  • close program and restart computer

enter image description here

share|improve this answer
i've found this method to be unreliable, my menu colors never update and the resolution list is not valid in all cases. luckily nothing breaks when choosing an unsupported resolution, it just doesn't change anything – Dirk Hartzer Waldeck Jul 22 '11 at 7:44
I used to have the same issue where no visual settings applied would take hold... under the "Advanced" tab in "Preference" make sure "GRUB_GFXMODE" is checked and when using a background picture make sure it is in the same "/boot" folder as the grub installation. Now all options w/in the program works perfectly for me w/ no issues at all. – 13east Jul 22 '11 at 14:51
awesome! thanks – Dirk Hartzer Waldeck Jul 22 '11 at 14:57

I am running 14.04LTS on an ASUS M51AC with an Nvidia 625GT OEM. I found that in addition to the accepted answer, I needed to also add the line:


to /etc/default/grub.

share|improve this answer
Not needed for me on Ubuntu Desktop 14.04.4 LTS. – Sopalajo de Arrierez Aug 23 '15 at 21:38

I'm using Ubuntu 16.04 and things are a little different in the packaged version of Grub for me.

The vbeinfo command does not exist.

  1. Turn on
  2. At the grub menu press c to get the grub comand line
  3. Type videoinfo
    This lists all the modes - it is the <width>x<height> you need to make note of.
  4. Optionally, there is a videotest command which you can use to test a given resolution, e.g. videotest 1280x1024. However, while this test worked for me, I could not then get back to the grub menu! So that's not quite as useful (unless anyone can explain how to escape the test.)
  5. Boot up fully and edit (sudo) /etc/default/grub but the line you're looking for is now called GRUB_GFXMODE. So un-comment and set that to your desired mode.
  6. Run update-grub and reboot.
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.