No auto-resize with QXL driver

When the “Auto resize VM with window” option is checked, the VM window becomes unresponsive. My host’s DE is Cinnamon. I have all the necessary spice packages installed * services running on the host and the VMs. Interestingly, when I use the Cirrus video driver, all runs fine.

Apparently the Cirrus driver is quite dated and buggy, but I am yet to encounter any issues. Is it also outdated with regard to security as well or can I continue to use it instead of QXL?

You must never use any other drivers except QXL/SPICE (or virGL if 3D is needed). The rest have crappy performance and long standing security issues.

Recently one of our users discovered that xfce resolution settings can survive reboots. Test them out and pick a resolution that works for your screen and take a snapshot after to preserve it. Unfortunately not all resolutions work for all screen dimensions so its something you must try and choose.

1 Like

Yes, I disliked KVM because of low-resolution problems, as I expected an auto-resize behavior as in VirtualBox, until I found out that you can adjust the setting in the VM, at least with XFCE, and it will survive reboot.
Very simple: Whisker Menu → display → change Resolution to 1920x1080
Then you can go full screen for a seamless desktop experience.
Works 100% on all my machines (desktop and laptop). Using it as I write.

The resolution is then hard-coded in this file (again, with XFCE, don’t know how it works with other DE):

  <?xml version="1.0" encoding="UTF-8"?>
    <channel name="displays" version="1.0">
      <property name="Default" type="empty">
        <property name="Virtual-0" type="string" value="Virtual-0">
          <property name="Active" type="bool" value="true"/>
          <property name="Resolution" type="string" value="1920x1080"/>
          <property name="RefreshRate" type="double" value="59.962844"/>
          <property name="Rotation" type="int" value="0"/>
          <property name="Reflection" type="string" value="0"/>
          <property name="Primary" type="bool" value="true"/>
          <property name="Position" type="empty">
            <property name="X" type="int" value="0"/>
            <property name="Y" type="int" value="0"/>

See also:


Instructions updated:

Thanks for finding a workaround @onion_knight!

1 Like

Could you please work with upstream (bug report) to get this bug fixed upstream?

Whisker Menudisplayselect resolution [15]
Save and then take a snapshot.

Why mention the snapshot there? Isn’t snapshot creation kinda separate? Might be useful after doing x, y, z but does it need to be mentioned at that very point?


GUI ConsoleViewScale DisplayCheck: Always + Auto resize VM with window .

(Preferably) Could this be pre-configured using KVM XML settings files?

(Still ok but inferior solution:) Or could this be done on the command line? Because then this can perhaps be automated for Whonix-Host.

1 Like


To preserve the custom settings, but you’re right that I mentioned it in a confusing way

No, unfortunately either autoresize works or it doesn’t.

None of the xrandr commands ever had an acceptable effect in my experience.

1 Like

The following…

…doesn’t look like a xrandr command. Or does this get translated into an xrandr command by virt-manager GUI? If yes, how does such a command get sent to the VM?

KVM “guestcontrol” does not seem easy as per post CS Student Capstone (Bachelor's Senior project) for Whonix - #12 by HulaHoop

(“guestcontrol” is a VirtualBox feature. I haven’t seen something similar for KVM yet. I.e. a way for the host to send commands to a KVM VM.)

Or is that some other virt-manager / KVM feature? If so, I guess “Check: Always” would be a setting that gets stored somewhere - hence could be pre-configured somehow.

Does XFCE Start MenuSettingsDisplayResolution:Choose a higher resolution resolutionApply work?
xrandr did have no effect at all or non-ideal screen resolution?
If so, I can probably translate that into an xrandr command. xrandr use on command line isn’t the most simple thing…
But above would be preferred.

There is a many years old bug, also documented here

Is there anyone in the Whonix team willing to submit a PR upstream. I know a little programming but would have no idea where to start. From very little reading it sounds like XFCE does not even use xrandr?

I know there is a “workaround” but none of the resolutions fit without black bars. I know I could go full screen also, but that has its own pains for seemlessly switching back to my host system.

1 Like

Probably best to coordinate and report this to the libvirt/QEMU projects.

1 Like