Page 1 of 1

Changing Console Mode Resolution

Posted: 27. Jul 2010, 15:40
by Mario F.
Host: Windows 7
Guest: Ubuntu 10.04
VBox: 3.2.6 PUEL
Guest Additions: Installed

Hello all,

I'm trying to change the resolution of the console mode of this Ubuntu VM. I'm trying to do that by setting GRUB_GFXMODE in /etc/default/grub. Changes are having no effect. However, I don't have the VESA BIOS extension installed. Grub tells me this much when I run vbeprobe. Meanwhile, dmesg confirms(?) no VESA module is ever loaded and insmod vbe returns "can't read 'vbe': No such file or directory".

Ideally I'd like to set it to a non standard mode supported by that monitor (a WXGA operating at 16:9 with 1366 × 768 pixels). But I can understand if this mode isn't supported. But setting at least a 1024x 768 mode would be much appreciated.

What am I doing wrong or missing?

Re: Changing Console Mode Resolution

Posted: 27. Jul 2010, 20:38
by Sasquatch
When you boot, hold down the shift key and you will get the Grub2 menu. Now edit the line that mentions the kernel. At the end, add 'vga=794' without the quotes and boot it using Ctrl+x I believe (it's on the screen which key will boot the system). When that works, you need to change /etc/default/grub to include that added line as a default value (it should already have 'quiet splash'). Run 'sudo update-grub' after the change, reboot and check if it works.

This answer could've been found by a simple query in a search engine.

Re: Changing Console Mode Resolution

Posted: 27. Jul 2010, 22:03
by Mario F.
Thanks for the answer, but I had tried that first... exactly because I did a search on the forums. There's no change to the console mode current resolution of 640x480.

I also tried to set a new resolution with (on my host console)

Code: Select all

VBoxManage setextradata "Ubuntu 10.04 LTS" "CustomVideoMode1" "1024x768x32" 
and then changing /etc/default/grub to (making sure GRUB_GFXMODE is commented out) :

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet text vga=0x160"
This didn't work either. No change whatsoever. Ubuntu boots into the console in 640x480.

Re: Changing Console Mode Resolution

Posted: 27. Jul 2010, 22:24
by Perryg
Check this out http://ubuntuforums.org/showpost.php?p= ... stcount=10 and see if it will help.
I use it to fix the framebuffer problem in Ubuntu 10.04 Server but it does go into setting different resolutions.
Keep in mind that you will need to actually edit different files since this has of course changed but you get the idea.

Re: Changing Console Mode Resolution

Posted: 27. Jul 2010, 22:36
by Sasquatch
Trying to get the OS run in a higher resolution and trying to get Grub in a higher resolution are two very different things. Grub in a higher resolution is easy, getting Ubuntu 10.04 server do that isn't.
The VBoxManage command won't help either, because it's a hint for when you run a GUI. A display manager probes the monitor and video card for acceptable resolutions and represents appropriate options for that. A CLI system doesn't.

Re: Changing Console Mode Resolution

Posted: 27. Jul 2010, 22:49
by Mario F.
Perryg wrote:I use it to fix the framebuffer problem in Ubuntu 10.04 Server but it does go into setting different resolutions.
Keep in mind that you will need to actually edit different files since this has of course changed but you get the idea.
Thanks Perryg. This makes sense. I'll try it later and will give some feedback.

Re: Changing Console Mode Resolution

Posted: 27. Jul 2010, 23:40
by Perryg
Yup works really well. I just did it and while I edited the boot parm at the start of grub by hitting e set the vga=0x0305 then ctrl-x it boots at 1024x768 and I don't see any screen problems.
U-1004-Server-1024x768.jpg
U-1004-Server-1024x768.jpg (222.62 KiB) Viewed 75892 times

Re: Changing Console Mode Resolution

Posted: 28. Jul 2010, 15:17
by Mario F.
Sounded promising, but couldn't make it work. Also the latest version of ubuntu introduces Grub2 which removes menu.lst. I believe all I need to perform step 6 is to edit /etc/default/grub instead. And I did. To be sure I also boot-shift and edited the menu entry to include the vga line. But to no avail.

In any case. thanks for the help.

Re: Changing Console Mode Resolution

Posted: 28. Jul 2010, 16:18
by Perryg
You must do everything in the order they are listed.
/etc/modprobe.d/blacklist-framebuffer.conf is the file that is listed instead of just blacklist-framebuffer
then look for the line GRUB_CMDLINE_LINUX="" in /etc/default/grub and put the resolution you want between the "" save and exit
Then run update-grub Reboot and there you have it.
Since this is all done from the CLI and no X, I selected an 8 bit resolution. Not sure if the others actually work.

Re: Changing Console Mode Resolution

Posted: 28. Jul 2010, 16:19
by fixedwheel
Mario F. wrote:Sounded promising, but couldn't make it work.
work around:

sudo apt-get install openssh-server
... and use PuTTY from the host

Re: Changing Console Mode Resolution

Posted: 28. Jul 2010, 16:32
by Mario F.
Perryg wrote:Since this is all done from the CLI and no X, I selected an 8 bit resolution. Not sure if the others actually work.
Bingo!
Slap me for my stupidity. That did it, of course.

Thanks a bunch, Perry.

Re: Changing Console Mode Resolution

Posted: 28. Jul 2010, 16:43
by Perryg
I wish I had done this when I first saw the post while working with my framebuffer issue. Working from the CLI like I do most of the time this is far better since the line wrap is less and I can actually control the size of the screen. Much better indeed.

Re: Changing Console Mode Resolution

Posted: 31. Aug 2010, 21:21
by Nox Metus
Mario F. wrote:I'm trying to do that by setting GRUB_GFXMODE in /etc/default/grub. Changes are having no effect.
Using GRUB_GFXPAYLOAD_LINUX=1280x1024x24 instead of GRUB_GFXMODE and then update-grub worked for me with exactly the same configuration.