Proper way to change terminal resolution in Ubuntu Server 13.04?

120,918

Solution 1

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.

Solution 2

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

Solution 3

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.

Solution 4

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.

Share:
120,918

Related videos on Youtube

David Allie
Author by

David Allie

Updated on September 18, 2022

Comments

  • David Allie
    David Allie over 1 year

    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?

  • David Allie
    David Allie almost 11 years
    Thanks for the thought, but this Ubuntu Server 13.04 is a VMware VM on my local Mac Pro. I'm not using this as a production server, but as a test-bed for several other Ubuntu Server VMs at work... and since I'm only working on it when I'm sitting at my Mac, launching the VM but working on it through ssh seems unpractical. If it was a production server running 24x7x365 then ssh might've been a good option. I can tolerate working at 640x480---I would prefer a higher resolution and I'd like to learn how to resolve this problem without reverting to ssh.
  • guntbert
    guntbert almost 11 years
    I was assuming such a scenario, thats what I do all the time, ssh is much more convenient - give it a try :-)
  • David Allie
    David Allie almost 11 years
    I'm very familiar and comfortable with ssh. I was just hoping to learn how to properly set a console size for when I don't want to use ssh.
  • David Allie
    David Allie almost 11 years
    I saw that page/solution before I posted and tried it, but it doesn't permanently change it. After editing /etc/default/grub and /etc/grub.d/00_header, running 'sudo update-grub2' and 'sudo reboot', the console briefly switches from 640x480 to 800x600 for 1-2 seconds during startup, but always returns back to 640x480 by the time it gets to the logon prompt. In the above-mentioned two files, I've tried '800x600x8', '800x600x16' and '800x600x24' with the same results.
  • David Allie
    David Allie almost 11 years
    I also tried '1024x768x8', '1024x768x16' and '1024x768x24' with the same results. Running 'sudo hwinfo --framebuffer' indicates that those modes are also available, but I am still stuck at 640x480.
  • user643722
    user643722 over 10 years
    Even locally, this is great. Cut and paste - yes! And even freedom from random update black screen stuff like "vga=..." is deprecated.
  • CMCDragonkai
    CMCDragonkai about 10 years
    I'm in text mode? Does this work with text mode?
  • Erik
    Erik over 9 years
    @CMCDragonkai , this works for Ubuntu Server.. which has no GUI installed. It's CLI only (as stated by the poster)
  • Kiril
    Kiril over 9 years
    Tried this in Virtualbox, now it doesn't boot/show anything.
  • Auspex
    Auspex about 9 years
    Wonderful idea... except that the only reason I'm trying to access the console is because I've broken the networking and can't SSH...
  • Tyler Crompton
    Tyler Crompton almost 9 years
    From where did you get the value 789? I thought that maybe it's the decimal representation of the mode in the question, but 789 == 0x315, which isn't in the list you provided.
  • Zac
    Zac almost 8 years
    This answer should be above the others, as the keep option is the mandatory parameter to make it all work
  • Alex
    Alex almost 8 years
    @Kiril: Same here. Don't try this in virtual box