Tip: Operating a guest OS at laptop's 2256 x 1504 resolution

As you may know, a Framework Laptop’s screen resolution is 2256 x 1504. In my experience, with Fedora 35 and Virtual Machine Manager (virt-manager) on the host system and Ubuntu 21.10 as the guest OS, that resolution is not among the choices in a VM of the guest OS:

While virt-manager can scale the VM’s resolution to the laptop’s resolution, the results aren’t optimal, particularly if the VM is being used in fullscreen mode.

To make the laptop’s 2256 x 1504 resolution available as a choice in the VM, you can proceed as follows in virt-manager:

  1. Enable XML editing via Edit Menu > Preferences > General.

  2. With the VM shut down, open it and go to View > Details. In the left-hand pane, select “Video Virtio”. In the right-hand pane, click XML.

    The XML should look like this:

    <video>
      <model type="virtio" heads="1" primary="yes"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0"/>
    </video>
    
  3. Add a <resolution> sub-element to the <model> element (libvirt documentation) as follows:

    <video>
      <model type="virtio" heads="1" primary="yes">
        <resolution x="2256" y="1504"/>
      </model>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0"/>
    </video>
    
  4. Apply changes and run the VM.

The 2256 x 1504 resolution should now be available as a choice in the VM!

9 Likes

I run Fedora 39 and wayland, with fractional scaling, which makes the spice display think the panel has a higher resolution. If I set the display to 2256 x 1504, it downscales and then upscales it, leaving it blurry even in fullscreen.

1 Like