21

I have a VM machine running ubuntu 14.04 (guest) on a Win7 host. I currently have the resolution of the server set to 1024*768 by adding this

GRUB_CMDLINE_LINUX_DEFAULT="splash xvga=1024x768x24" 
GRUB_GFXMODE=1024x768x24

to /etc/default/grub.

However I cannot get higher resolutions. When I set for example 1200*800 it resets to 640*480. I have allocated 128MB video memory.

Can I get to higher resolutions?

20

The answer I found was a combination of How do I increase console-mode resolution? and How to use ubuntu server full screen in virtualbox? The former provided information for changing grub's display resolution, and the latter assisted me in diagnosing why the former wasn't resulting in any resolution change.

Combining the two answers:

  1. Identify the resolution that your VirtualBox environment supports. Reboot the system and keep the Shift key till the grub windows appears then hit c. This will drop you into the grub console. Enter the commend vbeinfo to see a list of resolutions. Select the resolution that works for you (in my case, 1152x864x32).

  2. Edit /etc/default/grub to modify/create a line GRUB_GFXMODE=1152x864x32 (where you replace the resolution with the one appropriate for your environment).

  3. Edit /etc/grub.d/00_header to modify the line

    if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=auto ; fi
    

    to

    if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=1152x864x32 ; fi
    

    (again, replacing the resolution)

  4. Update grub and reboot: update-grub2 && shutdown -r now

Grub should boot at the new, higher resolution, and then that resolution should continue through after you are logged in.

  • 1
    I didn't need step 3, works fine with steps 1-2-4. Also in step 1 you don't actually need to do anything to "select" the resolution, just write it down. – Zook Oct 1 '14 at 14:58
  • Thanks for the comment. The semantics that I intended when I said 'select' was 'pick one, remember it', and I hadn't realized that it was ambiguous. – Rob Hall Oct 1 '14 at 15:08
  • Right, I figured it out when there was no way to actually select it, I was just clarifying for other people reading. – Zook Oct 1 '14 at 22:18
  • 3
    Should add to the answer: GRUB_CMDLINE_LINUX_DEFAULT="nomodeset" GRUB_GFXPAYLOAD_LINUX=keep – Pete Sep 17 '17 at 3:33
16

I have been trying this for a few hours now and a few days ago also for a few hours. Rob Halls solution worked for me only during the boot period, when GRUB is showing the menu entries. After the server (I am using an Ubuntu server, latest release) booted, the resolution was back to "normal".

Adding the following line to /etc/default/grub:

GRUB_GFXPAYLOAD_LINUX=1152x864x32

and then

update-grub2 && reboot

I had the higher resolution during the boot process (grub menu) and within the console.

  • 3
    ^ this answer. That finally did it for me. – ereOn May 5 '16 at 13:11
  • 2
    worked for ubuntu server 16.04 – lsborg Nov 22 '16 at 10:34
  • For me it did not work. Ubuntu 16.04 – avp Mar 27 '17 at 16:04
  • this made the boot sequence use the higher resolution, but once the logon prompt is shown it's back to the low res. Ubuntu server 17.01 – Nicolas Mommaerts Jan 31 '18 at 20:17
  • adding this worked also for the logon prompt and terminal: GRUB_CMDLINE_LINUX_DEFAULT="nomodeset" – Nicolas Mommaerts Jan 31 '18 at 20:22
5

As @Zook pointed out in the comments, it was enough for me to (as superuser) enable and change the following line in /etc/default/grub:

GRUB_GFXMODE=1152x864x16

and then

update-grub && reboot

GRUB version is 2.02~beta2-9ubuntu1.

Virtualbox version 4.3.16, Windows 7 Host, native resolution 1600x1050.

Important for that to work was to remove any vga= or xvga= or video= lines from the kernel, e.g. in GRUB_CMDLINE_LINUX_DEFAULT.

This hint i found here. I did not have to perform the proposed changes in the possible duplicate.

1

Running Virtualbox 5.1.34 under Ubuntu 16.04 I was disappointed all attempts at 1920x1080 or 1600x900 resulted in 640x480. Like many I discovered 1024x768 was the highest allowed and anything over would downgrade to 640x480.

Running vbeinfo at the grub prompt I discovered 1600x1200x32 was supported even though my monitor was 1900x1080. So I changed /etc/default/grub to:

GRUB_GFXMODE="1600x1200x32"

And wow what a difference!

Part of the top and bottom is clipped / truncated but it's not a big deal and it's nice to see the window larger and legible:

image3o.gif

I had to compress the .GIF to make it fit here, it's nicer live. I have two monitors (one above the other) so Virtual desktop size is 3840x1080

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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