ovmf 0~20191122.bd85bf54-2ubuntu3.4 breaks video resolution selection

Bug #2009155 reported by Gioele Barabucci
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
edk2 (Ubuntu)
New
Undecided
Unassigned
Focal
Incomplete
Undecided
Unassigned

Bug Description

After ovmf version 0~20191122.bd85bf54-2ubuntu3.4 is installed, it is no longer possible to change the screen resolution. Regardless of what is set in "Device Manager" → "OVMF Platform Configuration" → "Change preferred resolution", the framebuffer resolution is blocked at 640x480.

This issue is not present with 0~20191122.bd85bf54-2ubuntu3.3 and disappears when one downgrades.

Host configuration:

* Ubuntu 20.04.5 LTS
* Linux 5.4.0-137-generic
* libvirt-daemon-driver-qemu 6.0.0-0ubuntu8.16

Guest configuration (snippet, full XML attached):

  <os>
    <type arch='x86_64' machine='pc-i440fx-focal'>hvm</type>
    <loader readonly='yes' secure='no' type='pflash'>/usr/share/OVMF/OVMF_CODE.fd</loader>
    <nvram template='/usr/share/OVMF/OVMF_VARS.fd'>/var/lib/libvirt/nvram/vm_VARS.fd</nvram>
    <boot dev='hd'/>
    <bootmenu enable='no'/>
  </os>

  <features>
    <acpi/>
    <apic/>
    <vmport state='off'/>
  </features>

  <cpu mode='custom' match='exact' check='partial'>
    <model fallback='allow'>IvyBridge</model>
  </cpu>

  <video>
    <model type='virtio' heads='1' primary='yes'>
      <acceleration accel3d='yes'/>
      <resolution x='1600' y='900'/>
    </model>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
  </video>

Revision history for this message
Gioele Barabucci (gioele) wrote :
Revision history for this message
dann frazier (dannf) wrote :

That's odd - nothing should have changed about/usr/share/OVMF/OVMF_VARS.fd between those two releases, 0~20191122.bd85bf54-2ubuntu3.4 just adds new images.

Revision history for this message
Mustafa Kemal Gilor (mustafakemalgilor) wrote :

Hello Gioele,

I tried to come up with a minimal reproducer, but I could not reproduce it on my end directly with OVMF + QEMU (no libvirt/virt-manager/virt-install involved), it behaves exactly the same with ubuntu3.3:

Test steps:

- mkdir -p /tmp/test
- cd /tmp/test
- apt install ovmf=ovmf=0~20191122.bd85bf54-2ubuntu3.4
- cp /usr/share/OVMF/OVMF_VARS.fd vars.fd
- qemu-system-x86_64 -net none -drive if=pflash,format=raw,unit=0,file=/usr/share/OVMF/OVMF_CODE.fd,readonly=on -drive if=pflash,format=raw,unit=1,file=vars.fd
- Type "exit" to enter config screen -> "Device Manager" → "OVMF Platform Configuration" → "Change preferred resolution" -> Set to 1680x1050 -> F10 -> Y -> ESC -> ESC -> Reset- Frame buffer resized to 1680x1050

With 4M image:
- cp /usr/share/OVMF/OVMF_VARS.fd vars_4m.fd
- qemu-system-x86_64 -net none -drive if=pflash,format=raw,unit=0,file=/usr/share/OVMF/OVMF_CODE_4M.fd,readonly=on -drive if=pflash,format=raw,unit=1,file=vars_4m.fd
- Type "exit" to enter config screen -> "Device Manager" → "OVMF Platform Configuration" → "Change preferred resolution" -> Set to 1680x1050 -> F10 -> Y -> ESC -> ESC -> Reset
- Frame buffer resized to 1680x1050

I've tried weird combinations like 4M image 2M vars and vice versa, and it still works. Maybe it's not directly related to the edk2, and caused by virt-manager. I'll try the virt-manager as well.

Revision history for this message
Mustafa Kemal Gilor (mustafakemalgilor) wrote :
Revision history for this message
Mustafa Kemal Gilor (mustafakemalgilor) wrote :

Tried virt-manager with the provided XML as well, still the same:

- qemu-img create -f qcow2 test.img 512M
- virsh create test.xml
- virt-viewer VM
- Type "exit" to enter config screen -> "Device Manager" → "OVMF Platform Configuration" → "Change preferred resolution" -> Set to 1680x1050 -> F10 -> Y -> ESC -> ESC -> Reset
- Frame buffer resized to 1680x1050

I had to make the following changes to the provided XML file, but I think they're irrelevant to our context:

- changed ovmf-vars path
- removed CPU model
- removed network
- updated disk image path

toor@test:~$ git --no-pager diff test_original.xml test.xml
diff --git a/test_original.xml b/test.xml
index c1de8b6..79557eb 100644
--- a/test_original.xml
+++ b/test.xml
@@ -18,7 +18,7 @@ or other application using the libvirt API.
 <os>
 <type arch="x86_64" machine="pc-i440fx-focal">hvm</type>
 <loader readonly="yes" secure="no" type="pflash">/usr/share/OVMF/OVMF_CODE.fd</loader>
-<nvram template="/usr/share/OVMF/OVMF_VARS.fd">/var/lib/libvirt/nvram/vm_VARS.fd</nvram>
+<nvram template="/usr/share/OVMF/OVMF_VARS.fd">/tmp/vars.fd</nvram>
 <boot dev="hd"/>
 <bootmenu enable="no"/>
 </os>
@@ -27,9 +27,6 @@ or other application using the libvirt API.
 <apic/>
 <vmport state="off"/>
 </features>
-<cpu mode="custom" match="exact" check="partial">
-<model fallback="allow">IvyBridge</model>
-</cpu>
 <clock offset="utc">
 <timer name="rtc" tickpolicy="catchup"/>
 <timer name="pit" tickpolicy="delay"/>
@@ -46,7 +43,7 @@ or other application using the libvirt API.
 <emulator>/usr/bin/qemu-system-x86_64</emulator>
 <disk type="file" device="disk">
 <driver name="qemu" type="qcow2"/>
-<source file="/home/vms/vm.qcow2"/>
+<source file="/home/toor/test.img"/>
 <target dev="vda" bus="virtio"/>
 <address type="pci" domain="0x0000" bus="0x00" slot="0x06" function="0x0"/>
 </disk>
@@ -69,12 +66,6 @@ or other application using the libvirt API.
 <controller type="virtio-serial" index="0">
 <address type="pci" domain="0x0000" bus="0x00" slot="0x05" function="0x0"/>
 </controller>
-<interface type="network">
-<mac address="52:54:00:cc:78:2e"/>
-<source network="default"/>
-<model type="virtio"/>
-<address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x0"/>
-</interface>
 <serial type="pty">
 <target type="isa-serial" port="0">
 <model name="isa-serial"/>

Changed in edk2 (Ubuntu Focal):
status: New → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.