diff mbox

seavgabios resolutions, win8

Message ID 5298ABB3.80501@msgid.tls.msk.ru
State New
Headers show

Commit Message

Michael Tokarev Nov. 29, 2013, 2:58 p.m. UTC
I tried switching from plex/bochs vgabios to seavgabios,
and made this switch for qemu-1.7 package in debian, at
least to see how it goes.

And almost immediately got a complain that with new qemu
(which uses seavgabios not vgabios), windows VMs don't
support 1920x1080 resolutions anymore.

Almost immediately we cooked a patch which restored the
mode(s) in question, here it is:


Should something like this be applied?

Of the same theme, there's a wishlist bugreport against vgabios in
Debian, to add a few more resolutions, http://bugs.debian.org/669114 --
it adds 2048x1536 resolution, which is also missing in seavgabios.

Also, vgabios 0.7 provided a few more resolutions, like 1280x768 and
1280x720.

I'm not sure I understand how list of modes is maintained/used in
seavgabios.  The above patch at least allows one of the very common
modes to be selected in windows clients.


And while at it, there's another bugreport against vgabios package in
Debian, see http://bugs.debian.org/685097 .  It looks like windows8
isn't happy with vgabios-provided modes and does not let to change
resolution at all, sticking at 1024x768.  That bugreport points to
a patchset, http://lists.xen.org/archives/html/xen-devel/2012-05/msg00260.html
(this is just one patch from it), which has been applied to xen copy
of vgabios to solve exactly this issue with win8, and reportedly it
works there.  It looks like something similar should be done in
seavgabios too, since with it, win8 guest is also stuck at the same
resolution.

Thanks,

/mjt

Comments

Gerd Hoffmann Nov. 29, 2013, 3:23 p.m. UTC | #1
Hi,

> +    { 0x18d, { MM_DIRECT, 1920, 1080, 16, 8, 16, SEG_GRAPH } },
> +    { 0x18e, { MM_DIRECT, 1920, 1080, 24, 8, 16, SEG_GRAPH } },
> +    { 0x18f, { MM_DIRECT, 1920, 1080, 32, 8, 16, SEG_GRAPH } },

> I'm not sure I understand how list of modes is maintained/used in
> seavgabios.  The above patch at least allows one of the very common
> modes to be selected in windows clients.

Just get-send-email a proper patch to the seabios list.

> And while at it, there's another bugreport against vgabios package in
> Debian, see http://bugs.debian.org/685097 .  It looks like windows8
> isn't happy with vgabios-provided modes and does not let to change
> resolution at all, sticking at 1024x768.  That bugreport points to
> a patchset, http://lists.xen.org/archives/html/xen-devel/2012-05/msg00260.html
> (this is just one patch from it), which has been applied to xen copy
> of vgabios to solve exactly this issue with win8, and reportedly it
> works there.  It looks like something similar should be done in
> seavgabios too, since with it, win8 guest is also stuck at the same
> resolution.

Hmm, last time I tried resolution switching in win8 worked just fine
with seavgabios.  Can you double-check?

cheers,
  Gerd
Michael Tokarev Nov. 29, 2013, 3:59 p.m. UTC | #2
29.11.2013 19:23, Gerd Hoffmann wrote:
>   Hi,
> 
>> +    { 0x18d, { MM_DIRECT, 1920, 1080, 16, 8, 16, SEG_GRAPH } },
>> +    { 0x18e, { MM_DIRECT, 1920, 1080, 24, 8, 16, SEG_GRAPH } },
>> +    { 0x18f, { MM_DIRECT, 1920, 1080, 32, 8, 16, SEG_GRAPH } },
> 
>> I'm not sure I understand how list of modes is maintained/used in
>> seavgabios.  The above patch at least allows one of the very common
>> modes to be selected in windows clients.
> 
> Just get-send-email a proper patch to the seabios list.

It isn't about patch submission.  It is about _writing_ the patch, --
I mentioned that there are a few other modes which are requested by
users, and also - which I didn't mention - I don't know which mode
identifiers to use, -- does it matter which IDs to use?  In the above
example, added modes are 0x18[def], does it matter?

>> And while at it, there's another bugreport against vgabios package in
>> Debian, see http://bugs.debian.org/685097 .  It looks like windows8
>> isn't happy with vgabios-provided modes and does not let to change
>> resolution at all, sticking at 1024x768.  That bugreport points to
>> a patchset, http://lists.xen.org/archives/html/xen-devel/2012-05/msg00260.html
>> (this is just one patch from it), which has been applied to xen copy
>> of vgabios to solve exactly this issue with win8, and reportedly it
>> works there.  It looks like something similar should be done in
>> seavgabios too, since with it, win8 guest is also stuck at the same
>> resolution.
> 
> Hmm, last time I tried resolution switching in win8 worked just fine
> with seavgabios.  Can you double-check?

I just installed a fresh win8 VM, and it is indeed stuck with 1024x768,
with the "screen resolution" combo-box grayed out in the appropriate
control panel screen, -- there's no way to choose any other resolution.

However I'm not sure whenever this is because of some (vga)bios issue
or because of the lack of my windows8 activation (I activated it in
qemu-1.1 and it works fine there, but it immediately becomes "not
activated" with any later version of qemu, despite the usage of
-M pc-1.1) -- reportedly, win8 has some restrictions in display area
when not activated, but I don't know details.  I'd expect it to block
the "themes/personalization" part, not screen resolution part...

I'll try to get hold of win8.1, maybe there things are a bit different...

Thanks,

/mjt
Michael Tokarev Nov. 29, 2013, 4:17 p.m. UTC | #3
29.11.2013 19:59, Michael Tokarev wrote:
[]
>>> And while at it, there's another bugreport against vgabios package in
>>> Debian, see http://bugs.debian.org/685097 .  It looks like windows8
>>> isn't happy with vgabios-provided modes and does not let to change
>>> resolution at all, sticking at 1024x768.  That bugreport points to
>>> a patchset, http://lists.xen.org/archives/html/xen-devel/2012-05/msg00260.html
>>> (this is just one patch from it), which has been applied to xen copy
>>> of vgabios to solve exactly this issue with win8, and reportedly it
>>> works there.  It looks like something similar should be done in
>>> seavgabios too, since with it, win8 guest is also stuck at the same
>>> resolution.
>>
>> Hmm, last time I tried resolution switching in win8 worked just fine
>> with seavgabios.  Can you double-check?
> 
> I just installed a fresh win8 VM, and it is indeed stuck with 1024x768,
> with the "screen resolution" combo-box grayed out in the appropriate
> control panel screen, -- there's no way to choose any other resolution.

It was a false alarm really.  I'm sorry for this.

After numerous experiments with different vga bioses, I had a leftover
file named vgabios-stdvga.bin in the current directory.  It was some
version of plex/bochs vgabios.  And that one didn't work.  When I actually
removed it and tried with seavgabios, it worked correctly and it lets me
to change resolutions.

It doesn't have 1920x1024 resolution still, but it is a significantly
better behavour.

So the win8 part of my question goes away :)

Thanks,

/mjt
Kevin O'Connor Nov. 29, 2013, 6:48 p.m. UTC | #4
On Fri, Nov 29, 2013 at 07:59:25PM +0400, Michael Tokarev wrote:
> 29.11.2013 19:23, Gerd Hoffmann wrote:
> >   Hi,
> > 
> >> +    { 0x18d, { MM_DIRECT, 1920, 1080, 16, 8, 16, SEG_GRAPH } },
> >> +    { 0x18e, { MM_DIRECT, 1920, 1080, 24, 8, 16, SEG_GRAPH } },
> >> +    { 0x18f, { MM_DIRECT, 1920, 1080, 32, 8, 16, SEG_GRAPH } },
> > 
> >> I'm not sure I understand how list of modes is maintained/used in
> >> seavgabios.  The above patch at least allows one of the very common
> >> modes to be selected in windows clients.
> > 
> > Just get-send-email a proper patch to the seabios list.
> 
> It isn't about patch submission.  It is about _writing_ the patch, --
> I mentioned that there are a few other modes which are requested by
> users, and also - which I didn't mention - I don't know which mode
> identifiers to use, -- does it matter which IDs to use?  In the above
> example, added modes are 0x18[def], does it matter?

SeaVGABIOS started as a port of the "lgpl vgabios" code from
assembler/bcc to gcc.  What likely happened is that patches were made
to the original "lgpl vgabios" code after the port started.  So, we
just need to patch SeaVGABIOS with whatever has been recently added to
"lgpl vgabios".

The choice of mode ids, generally speaking, doesn't matter.  It's good
form to match the ids chosen in "lgpl vgabios" though.

-Kevin
Kevin O'Connor Nov. 29, 2013, 6:57 p.m. UTC | #5
On Fri, Nov 29, 2013 at 06:58:59PM +0400, Michael Tokarev wrote:
> I tried switching from plex/bochs vgabios to seavgabios,
> and made this switch for qemu-1.7 package in debian, at
> least to see how it goes.
> 
> And almost immediately got a complain that with new qemu
> (which uses seavgabios not vgabios), windows VMs don't
> support 1920x1080 resolutions anymore.

Where do you get your "lgpl vgabios" from?  The standard QEMU repo (
git://git.qemu.org/vgabios.git ) doesn't have these modes either.

> And while at it, there's another bugreport against vgabios package in
> Debian, see http://bugs.debian.org/685097 .  It looks like windows8
> isn't happy with vgabios-provided modes and does not let to change
> resolution at all, sticking at 1024x768.  That bugreport points to
> a patchset, http://lists.xen.org/archives/html/xen-devel/2012-05/msg00260.html

The logic in the patch in the link above is already in SeaVGABIOS.

-Kevin
Michael Tokarev Nov. 29, 2013, 7:05 p.m. UTC | #6
29.11.2013 22:57, Kevin O'Connor wrote:
> On Fri, Nov 29, 2013 at 06:58:59PM +0400, Michael Tokarev wrote:
>> I tried switching from plex/bochs vgabios to seavgabios,
>> and made this switch for qemu-1.7 package in debian, at
>> least to see how it goes.
>>
>> And almost immediately got a complain that with new qemu
>> (which uses seavgabios not vgabios), windows VMs don't
>> support 1920x1080 resolutions anymore.
> 
> Where do you get your "lgpl vgabios" from?  The standard QEMU repo (
> git://git.qemu.org/vgabios.git ) doesn't have these modes either.

http://cvs.savannah.gnu.org/viewvc/vgabios/vbetables-gen.c?revision=1.6&root=vgabios&view=markup

It is the "upstream" vgabios repository (v. 0.7a).  Modes 0x19[012].

qemu version is based on upstream version 0.6c.

The original complain comes from one of debian users, and in debian
we always used upstream version.

The patch which added some of these modes:

http://cvs.savannah.gnu.org/viewvc/vgabios/vbetables-gen.c?root=vgabios&r1=1.5&r2=1.6

I'm preparing a patch to add remaining bits from there.

Thanks,

/mjt
diff mbox

Patch

--- a/vgasrc/bochsvga.c
+++ b/vgasrc/bochsvga.c
@@ -89,6 +89,9 @@ 
     { 0x18a, { MM_DIRECT, 2560, 1600, 16, 8, 16, SEG_GRAPH } },
     { 0x18b, { MM_DIRECT, 2560, 1600, 24, 8, 16, SEG_GRAPH } },
     { 0x18c, { MM_DIRECT, 2560, 1600, 32, 8, 16, SEG_GRAPH } },
+    { 0x18d, { MM_DIRECT, 1920, 1080, 16, 8, 16, SEG_GRAPH } },
+    { 0x18e, { MM_DIRECT, 1920, 1080, 24, 8, 16, SEG_GRAPH } },
+    { 0x18f, { MM_DIRECT, 1920, 1080, 32, 8, 16, SEG_GRAPH } },
 };

 static int is_bochsvga_mode(struct vgamode_s *vmode_g)