Page 1 of 1

Setting a default VESA resolution in BIOS mode

Posted: 20. Jul 2016, 16:16
by noorez
If I boot an ubuntu cd in EFI mode (and set the EFI Gop mode to 1440x900 the same as my native resolution), the grub menu immediately shows up in that particular resolution and everything else including the ubuntu desktop functions in that resolution.

However, in the traditional BIOS mode, even though I set a custom vesa resolution of the same, the initial boot screen is of a very small resolution vs when booting the cd directly on a physical machine it comes up in the correct resolution... The vga parameter only effects the terminal showing the boot information and the desktop reverts back to the smaller resolution.

Is there any way to set the default resolution to 1440x900 so that it takes effect immediately?

Re: Setting a default VESA resolution in BIOS mode

Posted: 20. Jul 2016, 16:53
by michaln
There is no such thing as a default VBE resolution. The guest software always chooses the resolution from a list. So you'd have to ask Ubuntu why they choose the resolution they choose.

Re: Setting a default VESA resolution in BIOS mode

Posted: 20. Jul 2016, 17:27
by noorez
Ahh. Okay. Thanks for the clarification.

Re: Setting a default VESA resolution in BIOS mode

Posted: 20. Jul 2016, 17:40
by michaln
I should add that EFI is a complete opposite and there is only one resolution which cannot be changed (without a chip-specific driver).

Re: Setting a default VESA resolution in BIOS mode

Posted: 20. Jul 2016, 17:48
by socratis
So what does the EfiGopMode do in VirtualBox?
http://www.virtualbox.org/manual/ch03.html#efividmode

Re: Setting a default VESA resolution in BIOS mode

Posted: 20. Jul 2016, 20:53
by michaln
It picks that one resolution which can't be changed by the guest OS.

Re: Setting a default VESA resolution in BIOS mode

Posted: 21. Jul 2016, 08:59
by socratis
michaln wrote:It picks that one resolution which can't be changed by the guest OS.
I think I'm getting what you're saying, but I just want to make sure. So, if you use the EfiGopMode the guest is presented with one and only one available resolution, while if you don't use it the guest is "free" to use custom resolutions?

Re: Setting a default VESA resolution in BIOS mode

Posted: 21. Jul 2016, 09:37
by socratis
OK, scratch that. I tried a Mint Live CD (linuxmint-18-mate-64bit.iso) with and without the EfiGopMode set. To be accurate, the exact setting that I changed in the .vbox:

Code: Select all

<ExtraDataItem name="VBoxInternal2/EfiGopMode" value="3"/>
The only difference was the initial Mint screen. With the EfiGopMode set, the initial screen was 1280x1024 (as it should be). Without the EfiGopMode set, the initial screen was 640x480. In both cases the same resolutions were presented when asked to change the display resolution. Which is something, btw, that I wish my Mac guests would do... :(

So, michaln, can you please elaborate on your explanation?

Re: Setting a default VESA resolution in BIOS mode

Posted: 21. Jul 2016, 09:46
by michaln
socratis wrote:The only difference was the initial Mint screen. With the EfiGopMode set, the initial screen was 1280x1024 (as it should be). Without the EfiGopMode set, the initial screen was 640x480. In both cases the same resolutions were presented when asked to change the display resolution. Which is something, btw, that I wish my Mac guests would do... :(

So, michaln, can you please elaborate on your explanation?
Without knowing exactly what your guest does, not really. But I can tell you that there are two completely different EFI graphics interfaces, GOP and UGA. UGA supports mode switching, acceleration, and other goodies. GOP is just a dumb framebuffer. Windows and OS X only support GOP so as far as I'm concerned, that's the only interface which matters.

Have I ever mentioned that unless you really really can't, you should avoid EFI like the plague it is?

Re: Setting a default VESA resolution in BIOS mode

Posted: 22. Jul 2016, 18:57
by socratis
michaln wrote:Have I ever mentioned that unless you really really can't, you should avoid EFI like the plague it is?
I really, really, really have to use it. OSX guests won't boot otherwise ;)

I just did a quick test with an Ubuntu LiveCD to see if there are any differences. And they were. Somehow Ubuntu is able to change the screen resolution, OSX can't. It is stuck with one, and only one resolution. No biggie, I just wanted to see if it was a result of having the EfiGopMode set. Maybe Ubuntu doesn't use the GOP mode and ignores it completely and goes with UGA? Don't know and to tell you the truth it doesn't really matter.

I know about the state of EFI in VirtualBox and I use it either on OSX guest, or experimentally once in a blue moon just for temporary tests on other guests.

Thanks.

Re: Setting a default VESA resolution in BIOS mode

Posted: 25. Jul 2016, 16:10
by michaln
socratis wrote:I really, really, really have to use it. OSX guests won't boot otherwise ;)
OK, then EFI and GOP is the only choice.
No biggie, I just wanted to see if it was a result of having the EfiGopMode set. Maybe Ubuntu doesn't use the GOP mode and ignores it completely and goes with UGA?
Entirely possible. As you say, it doesn't really matter for OS X guests, they only use GOP.
I know about the state of EFI in VirtualBox and I use it either on OSX guest, or experimentally once in a blue moon just for temporary tests on other guests.
It's just EFI, period. Incredibly bad design. The industry went from not designed, organically grown, messy BIOS to overdesigned, simultaneously overengineered and underengineered, and horribly implemented EFI. Hard to say which is worse.

The only advantage of EFI seems to be that writing in C lowered the barrier to entry so now we have more clueless people writing firmware code :)