Description of problem: Only 3 resolution modes available for windows VM for device VGA Version-Release number of selected component (if applicable): qemu-kvm-5.2.0-5.module+el8.4.0+9775+0937c167.x86_64 4.18.0-280.el8.dt3.x86_64 seabios-bin-1.14.0-1.module+el8.4.0+8855+a9e237a9.noarch How reproducible: 100% Steps to Reproduce: 1.Boot windows 10 20H2 with -device VGA, bios type is seabios 2.Check the resolution modes can be selected 3. Actual results: Only 800x600, 1024x768, 1920x1080 these three modes can be selected Expected results: Rich resolution modes can be selected Additional info: Change machine type from pc-q35-rhel8.4.0 to pc-q35-rhel8.0.0, I can get rich resolution modes instead of only 3 modes. This behavior starts at machine type pc-q35-rhel8.1.0 and newer
Might be edid support. Can you try whenever "-device VGA,edid={on,off}" makes a difference? Also: Using "-device VGA,edid=on,xres=<width>,yres=<height>" you should be able to set any resolution as default resolution (which should also show up in the list of course). And: With "edid=on" you should see "QEMU Monitor" in device manager instead of some generic model. The edid block provided by qemu has alot more resolutions. Maybe windows doesn't pick up all of them for some reason. Specifically all from the "Established timings III" and "CTA-861 Extension" blocks seem to be missing. Full decode for reference: root@fedora ~# edid-decode /sys/class/drm/card0/card0-Virtual-1/edid edid-decode (hex): 00 ff ff ff ff ff ff 00 49 14 34 12 00 00 00 00 2a 18 01 04 a5 1a 13 78 06 ee 91 a3 54 4c 99 26 0f 50 54 21 08 00 e1 c0 d1 c0 01 01 01 01 01 01 01 01 01 01 01 01 25 20 00 66 41 00 1a 30 00 1e 33 40 04 c3 10 00 00 18 00 00 00 fd 00 32 7d 1e a0 78 01 0a 20 20 20 20 20 20 00 00 00 fc 00 51 45 4d 55 20 4d 6f 6e 69 74 6f 72 0a 00 00 00 f7 00 0a 00 4a a2 24 29 20 00 00 00 00 00 00 01 2d 02 03 0a 00 45 7d 65 60 59 1f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f2 ---------------- Block 0, Base EDID: EDID Structure Version & Revision: 1.4 Vendor & Product Identification: Manufacturer: RHT Model: 4660 Made in: week 42 of 2014 Basic Display Parameters & Features: Digital display Bits per primary color channel: 8 DisplayPort interface Maximum image size: 26 cm x 19 cm Gamma: 2.20 Supported color formats: RGB 4:4:4 Default (sRGB) color space is primary color space First detailed timing includes the native pixel format and preferred refresh rate Color Characteristics: Red : 0.6396, 0.3300 Green: 0.2998, 0.5996 Blue : 0.1503, 0.0595 White: 0.3125, 0.3291 Established Timings I & II: DMT 0x04: 640x480 59.940 Hz 4:3 31.469 kHz 25.175 MHz DMT 0x09: 800x600 60.317 Hz 4:3 37.879 kHz 40.000 MHz DMT 0x10: 1024x768 60.004 Hz 4:3 48.363 kHz 65.000 MHz Standard Timings: DMT 0x54: 2048x1152 60.000 Hz 16:9 72.000 kHz 162.000 MHz (RB) DMT 0x52: 1920x1080 60.000 Hz 16:9 67.500 kHz 148.500 MHz Detailed Timing Descriptors: DTD 1: 1024x768 74.993 Hz 4:3 59.544 kHz 82.290 MHz (260 mm x 195 mm) Hfront 256 Hsync 30 Hback 72 Hpol N Vfront 3 Vsync 3 Vback 20 Vpol N Display Range Limits: Monitor ranges (Bare Limits): 50-125 Hz V, 30-160 kHz H, max dotclock 1200 MHz Display Product Name: 'QEMU Monitor' Established timings III: DMT 0x17: 1280x768 59.870 Hz 5:3 47.776 kHz 79.500 MHz DMT 0x20: 1280x960 60.000 Hz 4:3 60.000 kHz 108.000 MHz DMT 0x23: 1280x1024 60.020 Hz 5:4 63.981 kHz 108.000 MHz DMT 0x27: 1360x768 60.015 Hz 85:48 47.712 kHz 85.500 MHz DMT 0x2f: 1440x900 59.887 Hz 16:10 55.935 kHz 106.500 MHz DMT 0x2a: 1400x1050 59.978 Hz 4:3 65.317 kHz 121.750 MHz DMT 0x3a: 1680x1050 59.954 Hz 16:10 65.290 kHz 146.250 MHz DMT 0x33: 1600x1200 60.000 Hz 4:3 75.000 kHz 162.000 MHz DMT 0x3e: 1792x1344 60.000 Hz 4:3 83.640 kHz 204.750 MHz DMT 0x41: 1856x1392 59.995 Hz 4:3 86.333 kHz 218.250 MHz DMT 0x45: 1920x1200 59.885 Hz 16:10 74.556 kHz 193.250 MHz DMT 0x49: 1920x1440 60.000 Hz 4:3 90.000 kHz 234.000 MHz Extension blocks: 1 Checksum: 0x2d ---------------- Block 1, CTA-861 Extension Block: Revision: 3 Native detailed modes: 0 Video Data Block: VIC 125: 5120x2160 50.000 Hz 64:27 112.500 kHz 742.500 MHz VIC 101: 4096x2160 50.000 Hz 256:135 112.500 kHz 594.000 MHz VIC 96: 3840x2160 50.000 Hz 16:9 112.500 kHz 594.000 MHz VIC 89: 2560x1080 50.000 Hz 64:27 56.250 kHz 185.625 MHz VIC 31: 1920x1080 50.000 Hz 16:9 56.250 kHz 148.500 MHz Checksum: 0xf2
(In reply to Gerd Hoffmann from comment #1) > Might be edid support. > > Can you try whenever "-device VGA,edid={on,off}" makes a difference? With -device VGA,edid=on: Resolution modes are 800x600, 1024x768, 1920x1080 With -device VGA,edid=off: I get rich resolution modes back. > Also: Using "-device VGA,edid=on,xres=<width>,yres=<height>" you > should be able to set any resolution as default resolution > (which should also show up in the list of course). With '-device VGA,edid=on,xres=1280,yres=720', 1280x720 is visible from resolution modes list, but default resolution is 1024x768 > And: With "edid=on" you should see "QEMU Monitor" in device manager > instead of some generic model. I'm not sure where to find this information. Check windows device manager, the device under Monitors is 'Generic PnP Monitor'.
(In reply to Guo, Zhiyi from comment #2) > (In reply to Gerd Hoffmann from comment #1) > > Might be edid support. > > > > Can you try whenever "-device VGA,edid={on,off}" makes a difference? > With -device VGA,edid=on: > Resolution modes are 800x600, 1024x768, 1920x1080 > > With -device VGA,edid=off: > I get rich resolution modes back. Confirms my assumtion. Also provides an easy workaround. > > Also: Using "-device VGA,edid=on,xres=<width>,yres=<height>" you > > should be able to set any resolution as default resolution > > (which should also show up in the list of course). > > With '-device VGA,edid=on,xres=1280,yres=720', 1280x720 is visible from > resolution modes list, but default resolution is 1024x768 Hmm. > > And: With "edid=on" you should see "QEMU Monitor" in device manager > > instead of some generic model. > > I'm not sure where to find this information. > Check windows device manager, the device under Monitors is 'Generic PnP > Monitor'. Ok. "PnP" is "edid works" I think, so this is good. With "edid=off" this will probably become "non-PnP". Not sure why you can't see the "QEMU Monitor". Maybe it is somewhere hidden in the Preferences dialog.
(In reply to Gerd Hoffmann from comment #1) > Might be edid support. > > Can you try whenever "-device VGA,edid={on,off}" makes a difference? > Also: Using "-device VGA,edid=on,xres=<width>,yres=<height>" you > should be able to set any resolution as default resolution > (which should also show up in the list of course). > And: With "edid=on" you should see "QEMU Monitor" in device manager > instead of some generic model. > > The edid block provided by qemu has alot more resolutions. > Maybe windows doesn't pick up all of them for some reason. > Specifically all from the "Established timings III" and > "CTA-861 Extension" blocks seem to be missing. > > Full decode for reference: > > root@fedora ~# edid-decode /sys/class/drm/card0/card0-Virtual-1/edid > edid-decode (hex): > > 00 ff ff ff ff ff ff 00 49 14 34 12 00 00 00 00 > 2a 18 01 04 a5 1a 13 78 06 ee 91 a3 54 4c 99 26 > 0f 50 54 21 08 00 e1 c0 d1 c0 01 01 01 01 01 01 > 01 01 01 01 01 01 25 20 00 66 41 00 1a 30 00 1e > 33 40 04 c3 10 00 00 18 00 00 00 fd 00 32 7d 1e > a0 78 01 0a 20 20 20 20 20 20 00 00 00 fc 00 51 > 45 4d 55 20 4d 6f 6e 69 74 6f 72 0a 00 00 00 f7 > 00 0a 00 4a a2 24 29 20 00 00 00 00 00 00 01 2d > > 02 03 0a 00 45 7d 65 60 59 1f 00 00 00 00 00 00 > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f2 > > ---------------- > > Block 0, Base EDID: > EDID Structure Version & Revision: 1.4 > Vendor & Product Identification: > Manufacturer: RHT > Model: 4660 > Made in: week 42 of 2014 > Basic Display Parameters & Features: > Digital display > Bits per primary color channel: 8 > DisplayPort interface > Maximum image size: 26 cm x 19 cm > Gamma: 2.20 > Supported color formats: RGB 4:4:4 > Default (sRGB) color space is primary color space > First detailed timing includes the native pixel format and preferred > refresh rate > Color Characteristics: > Red : 0.6396, 0.3300 > Green: 0.2998, 0.5996 > Blue : 0.1503, 0.0595 > White: 0.3125, 0.3291 > Established Timings I & II: > DMT 0x04: 640x480 59.940 Hz 4:3 31.469 kHz 25.175 MHz > DMT 0x09: 800x600 60.317 Hz 4:3 37.879 kHz 40.000 MHz > DMT 0x10: 1024x768 60.004 Hz 4:3 48.363 kHz 65.000 MHz > Standard Timings: > DMT 0x54: 2048x1152 60.000 Hz 16:9 72.000 kHz 162.000 MHz (RB) > DMT 0x52: 1920x1080 60.000 Hz 16:9 67.500 kHz 148.500 MHz > Detailed Timing Descriptors: > DTD 1: 1024x768 74.993 Hz 4:3 59.544 kHz 82.290 MHz (260 mm x > 195 mm) > Hfront 256 Hsync 30 Hback 72 Hpol N > Vfront 3 Vsync 3 Vback 20 Vpol N > Display Range Limits: > Monitor ranges (Bare Limits): 50-125 Hz V, 30-160 kHz H, max dotclock > 1200 MHz > Display Product Name: 'QEMU Monitor' > Established timings III: > DMT 0x17: 1280x768 59.870 Hz 5:3 47.776 kHz 79.500 MHz > DMT 0x20: 1280x960 60.000 Hz 4:3 60.000 kHz 108.000 MHz > DMT 0x23: 1280x1024 60.020 Hz 5:4 63.981 kHz 108.000 MHz > DMT 0x27: 1360x768 60.015 Hz 85:48 47.712 kHz 85.500 MHz > DMT 0x2f: 1440x900 59.887 Hz 16:10 55.935 kHz 106.500 MHz > DMT 0x2a: 1400x1050 59.978 Hz 4:3 65.317 kHz 121.750 MHz > DMT 0x3a: 1680x1050 59.954 Hz 16:10 65.290 kHz 146.250 MHz > DMT 0x33: 1600x1200 60.000 Hz 4:3 75.000 kHz 162.000 MHz > DMT 0x3e: 1792x1344 60.000 Hz 4:3 83.640 kHz 204.750 MHz > DMT 0x41: 1856x1392 59.995 Hz 4:3 86.333 kHz 218.250 MHz > DMT 0x45: 1920x1200 59.885 Hz 16:10 74.556 kHz 193.250 MHz > DMT 0x49: 1920x1440 60.000 Hz 4:3 90.000 kHz 234.000 MHz > Extension blocks: 1 > Checksum: 0x2d > > ---------------- > > Block 1, CTA-861 Extension Block: > Revision: 3 > Native detailed modes: 0 > Video Data Block: > VIC 125: 5120x2160 50.000 Hz 64:27 112.500 kHz 742.500 MHz > VIC 101: 4096x2160 50.000 Hz 256:135 112.500 kHz 594.000 MHz > VIC 96: 3840x2160 50.000 Hz 16:9 112.500 kHz 594.000 MHz > VIC 89: 2560x1080 50.000 Hz 64:27 56.250 kHz 185.625 MHz > VIC 31: 1920x1080 50.000 Hz 16:9 56.250 kHz 148.500 MHz > Checksum: 0xf2 Vadim: do you know why Windows is not picking the additional resolutions from the EDID block?
EDID data processing function is not fully implemented yet https://github.com/virtio-win/kvm-guest-drivers-windows/blob/master/viogpu/viogpudo/viogpudo.cpp#L2678 There is another resolution-related bug https://bugzilla.redhat.com/show_bug.cgi?id=1923886 This bug is neither regression, nor linux/qemu problem. Best, Vadim.
(In reply to Vadim Rozenfeld from comment #6) > EDID data processing function is not fully implemented yet > https://github.com/virtio-win/kvm-guest-drivers-windows/blob/master/viogpu/ > viogpudo/viogpudo.cpp#L2678 > > There is another resolution-related bug > https://bugzilla.redhat.com/show_bug.cgi?id=1923886 > > This bug is neither regression, nor linux/qemu problem. > > Best, > Vadim. Note this is "for device VGA" (i.e. stdvga not virtio-vga) according to the initial report. vgabios recently got support for edid, so the microsoft basic display driver picking up the stdvga edid block that way is plausible, and turning off edid (-device VGA,edid=off) makes windows revert to old behavior. So the question is whenever you have any idea why windows ignores most resolutions. Might very well be a windows bug, but maybe something is broken in the edid block generated by qemu ...
(In reply to Gerd Hoffmann from comment #7) > (In reply to Vadim Rozenfeld from comment #6) > > EDID data processing function is not fully implemented yet > > https://github.com/virtio-win/kvm-guest-drivers-windows/blob/master/viogpu/ > > viogpudo/viogpudo.cpp#L2678 > > > > There is another resolution-related bug > > https://bugzilla.redhat.com/show_bug.cgi?id=1923886 > > > > This bug is neither regression, nor linux/qemu problem. > > > > Best, > > Vadim. > > Note this is "for device VGA" (i.e. stdvga not virtio-vga) according to the > initial report. Yes, this bug is reported against -device VGA only. > > So the question is whenever you have any idea why windows ignores most > resolutions. Might > very well be a windows bug, but maybe something is broken in the edid block > generated by > qemu ... Strat from qemu-kvm-5.2.0, I see virtio-vga also has edid enabled: bus: virtio-bus type virtio-pci-bus dev: virtio-gpu-device, id "" max_outputs = 1 (0x1) edid = true xres = 1024 (0x400) yres = 768 (0x300) But inside windows 10 VM, there are a lot of resolutions could be selected with microsoft basic display driver(I don't have viogpu driver installed). For VGA device, I see libvirt 7.0 doesn't support edid option for any video devices. Although we can use xres and yres option implemented by libvirt to provide a new resolution, however I'm afraid this will break the user experience for modifying resolution as everytime user need a new resolution, they need to shutdown VM and change options for VGA device.
> Strat from qemu-kvm-5.2.0, I see virtio-vga also has edid enabled: > bus: virtio-bus > type virtio-pci-bus > dev: virtio-gpu-device, id "" > max_outputs = 1 (0x1) > edid = true > xres = 1024 (0x400) > yres = 768 (0x300) Yep, but virtio-vga provides the edid block via virtio only, so edid data is not available to vgabios which runs the device in vga compat mode not virtio mode. So windows wouldn't see the edid block with the basic display driver, so edid=on|off has no effect.
A few hours debugging later: (1) Windows seems to fetch only the first 128 edid bytes from vgabios. In other words: It doesn't see any extensions, specifically the not the "CTA-861 Extension Block". (2) Windows seems to not parse the "Established timings III" block. So, the list of modes left over is: Established Timings I & II: DMT 0x04: 640x480 59.940 Hz 4:3 31.469 kHz 25.175 MHz DMT 0x09: 800x600 60.317 Hz 4:3 37.879 kHz 40.000 MHz DMT 0x10: 1024x768 60.004 Hz 4:3 48.363 kHz 65.000 MHz Standard Timings: DMT 0x54: 2048x1152 60.000 Hz 16:9 72.000 kHz 162.000 MHz (RB) DMT 0x52: 1920x1080 60.000 Hz 16:9 67.500 kHz 148.500 MHz 640x480 is probably filtered out because 800x600 is the minimum resolution. 2048x1152 is probably filtered out because that mode is not in the vgabios mode list. Which leaves exactly those three modes visible in the drop-down menu.
(In reply to Gerd Hoffmann from comment #12) > A few hours debugging later: > > (1) Windows seems to fetch only the first 128 edid bytes from vgabios. > In other words: It doesn't see any extensions, specifically the > not the "CTA-861 Extension Block". Actually Windows (DXGK) reads all EDID data, but by 128 byte blocks https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/dispmprt/ns-dispmprt-_dxgk_device_descriptor I've seen it many times debugging virtio-gpu dod driver for windows. > (2) Windows seems to not parse the "Established timings III" block. > > So, the list of modes left over is: > > Established Timings I & II: > DMT 0x04: 640x480 59.940 Hz 4:3 31.469 kHz 25.175 MHz > DMT 0x09: 800x600 60.317 Hz 4:3 37.879 kHz 40.000 MHz > DMT 0x10: 1024x768 60.004 Hz 4:3 48.363 kHz 65.000 MHz > Standard Timings: > DMT 0x54: 2048x1152 60.000 Hz 16:9 72.000 kHz 162.000 MHz (RB) > DMT 0x52: 1920x1080 60.000 Hz 16:9 67.500 kHz 148.500 MHz > > 640x480 is probably filtered out because 800x600 is the minimum resolution. > 2048x1152 is probably filtered out because that mode is not in the vgabios > mode list. > > Which leaves exactly those three modes visible in the drop-down menu.
https://patchwork.ozlabs.org/project/qemu-devel/list/?series=234315 https://patchwork.ozlabs.org/project/qemu-devel/patch/20210316143812.2363588-6-kraxel@redhat.com/
(In reply to Vadim Rozenfeld from comment #13) > (In reply to Gerd Hoffmann from comment #12) > > A few hours debugging later: > > > > (1) Windows seems to fetch only the first 128 edid bytes from vgabios. > > In other words: It doesn't see any extensions, specifically the > > not the "CTA-861 Extension Block". > > Actually Windows (DXGK) reads all EDID data, but by 128 byte blocks > https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/dispmprt/ns- > dispmprt-_dxgk_device_descriptor > I've seen it many times debugging virtio-gpu dod driver for windows. I expected that too and added a printk to the vgabios to see if something goes wrong fetching the second 128 bytes chunk, but windows never tries to read that ... (so this is specific to the basic display adapter driver).
https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=35495675 http://brew-task-repos.usersys.redhat.com/repos/scratch/ghoffman/qemu-kvm/5.2.0/11.el8.bz1925470.11/ Should re-add most resolutions between 1024x768 and 1920x1080 with edid=on
(In reply to Gerd Hoffmann from comment #16) > https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=35495675 > http://brew-task-repos.usersys.redhat.com/repos/scratch/ghoffman/qemu-kvm/5. > 2.0/11.el8.bz1925470.11/ > > Should re-add most resolutions between 1024x768 and 1920x1080 with edid=on With this change, resolution list now contains: 1920 x 1200 1920 x 1080 1680 x 1050 1600 x 1200 1440 x 900 1280 x 1024 1280 x 960 1024 x 768 800 x 600 With edid=off, resolution list contains: 2560 x 1600 2560 x 1440 1920 x 1200 1920 x 1080 1680 x 1050 1600 x 1200 1600 x 900 1440 x 900 1400 x 1050 1280 x 1024 1280 x 960 1280 x 800 1280 x 768 1280 x 720 1152 x 864 1024 x 768 800 x 600 Giving windows basic display driver only parse 128 byte edid data, maybe new resolution list is acceptable?
(In reply to Gerd Hoffmann from comment #14) > https://patchwork.ozlabs.org/project/qemu-devel/list/?series=234315 > https://patchwork.ozlabs.org/project/qemu-devel/patch/20210316143812.2363588- > 6-kraxel/ Merged upstream for qemu 6.0 (commit 40c503079ffcb5394be2b407e817de6104db9cfc).
Setting ITR to 8.5. In case a 8.4 fix is needed we have to go z-stream at this point I guess.
Test against windows 10 21H1 x64 VM with -device VGA, I can find these modes available for using: 1920 x 1200 1920 x 1080 1680 x 1050 1600 x 1200 1440 x 900 1280 x 1024 1280 x 960 1024 x 768 800 x 600 qemu used: qemu-kvm-6.0.0-19.module+el8.5.0+11385+6e7d542e.x86_64
I'm adding it to the errata.
Verified per comment 21
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (virt:av bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2021:4684