26

I'm running Ubuntu Server 13.04 in a VMware VM running only in command-line mode (i.e. no GUI). It defaults to a 640x480 screen resolution, but I'd like to increase that to either 800x600 or 1024x768.

Lines in /etc/default/grub that I've changed include:

GRUB_CMDLINE_LINUX_DEFAULT=""  
GRUB_CMDLINE_LINUX="consoleblank=0"  
GRUB_GFXMODE=800x600  

I've tried many of the suggestions I've seen online, variants of the above three lines, and many have simply hung the reboot with a blank screen, forcing a force-shutdown of the VM... at which point I backed up one VMware snapshot.

Running sudo hwinfo --framebuffer gives me a lot of info:

    Model: "Vmware virtual machine"  
    Revision: "2.0"  
    Memory Size: 64 MB  
Lines for 800x600 include:  
    Mode 0x0303: 800x600 (+800), 8 bits  
    Mode 0x0314: 800x600 (+1600), 16 bits  
    Mode 0x0324: 800x600 (+800), 8 bits  
    Mode 0x0332: 800x600 (+1600), 16 bits  
    Mode 0x0340: 800x600 (+3200), 24 bits  

I've excluded all the other resolutions as I'm just interested in 800x600 at the moment. Apparently Ubuntu Server 13.04 using grub2, so how do I accomplish this?

Jin Kwon
  • 117
  • 7

4 Answers4

21

I solved it... and all I had to do was edit /etc/default/grub thus:

GRUB_CMDLINE_LINUX_DEFAULT="splash vga=789"

I ran sudo update-grub, sudo reboot and it sticks in a larger-size console mode... just what I wanted.

Jin Kwon
  • 117
  • 7
13

Read How do I increase console-mode resolution? The first answer is what you are looking for. Requires tweaking grub parameters.

Edit: There seems to be an omission to the answer in the link I gave you. You also have to add the following line to grub.conf:

GRUB_GFXPAYLOAD_LINUX=keep

Without this the system drops to default lower resolution after booting and you end up with low resolution in login screen.

Also keep in mind that (I don't remember where I read this) the "vga=" parameter is deprecated from grub, so unless you want to risk coming across this problem again after a future update of grub, I suggest you use this method.

hmayag
  • 2,266
  • 5
  • 22
  • 24
13

I had the same issue, and I applied a small change to the solution you give and it worked, but you have to keep in mind some restrictions when it comes to the console display:

  1. The VGA mode’s resolution can't exceed 800x600 in maximum, so if you want a 1024x768 resolution, you should use XVGA instead of simple VGA.
  2. The resolution you can apply to the console display depends on your graphical card capabilities, that's means if your card have 800x600 at maximum as a resolution, you can't force it to display 1024x768.

I wild end up with the solution that worked for me :

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

The “x24” is optional, since it makes no change, add to this you can use only the second line and it will work.

Have a nice day

ghaliloo
  • 139
6

If you don't succeed (or if you decide it is not worth the trouble) use the much simpler solution to access your VM via ssh - there are no restrictions on display size in a terminal window :-)

ssh username@ip-address will open a session.

guntbert
  • 13,475