Virt-manager won't resize VM resolution with window

,

I’m trying to use virt-manager, but when I launch a VM, the resolution doesn’t scale properly. See the black bars on the left and right sides in the attached screenshot:

I followed this post, but the VM still doesn’t scale: Under qeum-kvm / virt-manager, how to add custom resolution

It doesn’t scale normally in fullscreen mode either.

hostnamectl output:
Icon name: computer-laptop
Chassis: laptop :laptop:
Machine ID: 2caa7f889eb84500a609464996089977
Boot ID: d1f3b9f7a5a745eb937cb68c3a8e0bab
Operating System: Fedora Linux 43.20251102.0 (Silverblue)
CPE OS Name: cpe:/o:fedoraproject:fedora:43
OS Support End: Wed 2026-12-02
OS Support Remaining: 1y 3w 6d
Kernel: Linux 6.17.5-300.fc43.x86_64
Architecture: x86-64
Hardware Vendor: Dell Inc.
Hardware Model: Latitude 3520
Hardware SKU: 0B21
Hardware Version: A01
Firmware Version: 1.43.2
Firmware Date: Mon 2025-09-01
Firmware Age: 2month 3d

I am using workstation and am able to set the resolution in the display settings for the VM. Once I have done that then I resize the window to match the size of the VM desktop.

In your image it may scale if you expand the window vertically. The layout (16x9) is normally fixed to avoid distortion of images that expand in one direction but not the other.

virsh list does not know any of my VMs it seems?

In the XML that I can view in VMM I have these sections:

    <video>
      <model type="virtio" heads="1" primary="yes"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0"/>
    </video>
    <graphics type="spice" autoport="yes">
      <listen type="address"/>
      <image compression="off"/>
    </graphics>

I have vdagent services running and I do not see the VM resize when I change the Windows size.

I do have these errors

Nov 05 12:49:34 f43kde.internal spice-vdagent[1966]: Adding graphics device info: channel_id: 0 monitor_id: 0 device_address: pci/0000/01.0, device_display_id: 0 xrandr output ID: 33
Nov 05 12:49:34 f43kde.internal spice-vdagent[1966]: display: failed to call GetCurrentState from mutter over DBUS
Nov 05 12:49:34 f43kde.internal spice-vdagent[1966]:    error message: Cannot invoke method; proxy is for the well-known name org.gnome.Mutter.DisplayConfig without an owner, and proxy was constructed with the G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag

Host is f42 kde guess in f43 kde.

FYI On my mac I use UTM that is kvm/qemu based and the VM screen does resizes when I change the window size.

kscreen-doctor -o shows the changed screen size.

If you use xorg and wayand mixed, the resize has to be don in the terminal manually as a workaround.

I used xfce in a virt-manager window while running Workstation/Wayland.
One workaround is to run the following in the guest every time you resize your window:

$ xrandr --output Virtual-1 --auto

Please check if your output also is Virtual-1.

1 Like

The agent is running but I’m not using gnome, which I hope is not required!

Do you see that error I hilighted? If not I think I need to report the error as a bug.

Host output:

I included the Virtual Machine Manager window just to confirm I spelled the VM name correctly.

Guest output:

I’m using the system defaults, so I assume Silverblue is using xorg or wayland.

My system doesn’t come with xrandr:

Screenshot From 2025-11-05 20-22-34

Please do that first what @vgaetera wrote.

I am on Workstation too. After installing the pakage mentioned, and if you are in a xfce guest, and still get the issue of not increasing to window size, you will need the command i posted.

Remember, it is for x11 guests on a wayland v-machine.

So you need to execute in the terminal of the guest.

This has mostly solved my issue. A few things to note:

spice-vdagent is already installed, but I got an error message when I tried installing it. I’m not sure if I should be concerned about the “–allow-inactive” flag:

I can’t enable spice-vdagent, but I can start it:

I ran the following command in my guest, then rebooted:

And now the resolution is scaling properly.

However, upon rebooting again, the resolution fails to scale again. Presumably because spice-vdagent is not enabled?

You enabled it - do you mean is it running? Not sure if you did the systemctl --user start spice-vdagent.service command.

You can check that with the systemctl --user status spice-vdagent.service command.

FYI: Please post text output as pre-formmatted text and not as screen shots. Use the </> button to do this.

You can also check the amount of VRM in the VM’s XML file. If you have big screen, e.g., widescreen, you might need to increase VRAM in the config and then VM screen size will follow virt-manager window dimensions.

I can set the resolution of the VM larger then my physical screen and that works. Does not mean that VRAM is not an issue I need to address?

I do not see a VRAM setting in the XML for my kde f43 VM.
I do not see a setting in the GUI’s Display section to set such a number.

Where are you seeing VRAM?

You have to install it additionally, the package xrandr, on the guest.
I am testing this solution discussed here in F44 Rawhide.

p.s.
It would be indeed better if you post the output as text. This would save us a lot of typing on the keyboard, while test what you do.

@barryascott I allowed me to eliminate typos in the commands you posted. To make them cut & paste ready.

It works for me to on Gnome Workstation:

output of 'busctl --user call/introspect'


 busctl --user introspect \
    org.gnome.Mutter.DisplayConfig \
    /org/gnome/Mutter/DisplayConfig \
    org.gnome.Mutter.DisplayConfig
NAME                           TYPE      SIGNATURE                  RESULT/VALUE                             FLAGS
.ApplyConfiguration            method    uba(uiiiuaua{sv})a(ua{sv}) -                                        -
.ApplyMonitorsConfig           method    uua(iiduba(ssa{sv}))a{sv}  -                                        -
.ChangeBacklight               method    uui                        i                                        deprecated
.GetCrtcGamma                  method    uu                         aqaqaq                                   -
.GetCurrentState               method    -                          ua((ssss)a(siiddada{sv})a{sv})a(iiduba(ssss)a{sv})a{sv} -
.GetResources                  method    -                          ua(uxiiiiiuaua{sv})a(uxiausauaua{sv})a(uxuudu)ii -
.ResetLuminance                method    su                         -                                        -
.SetBacklight                  method    usi                        -                                        -
.SetCrtcGamma                  method    uuaqaqaq                   -                                        -
.SetLuminance                  method    sud                        -                                        -
.SetOutputCTM                  method    uu(ttttttttt)              -                                        -
.ApplyMonitorsConfigAllowed    property  b                          true                                     emits-change
.Backlight                     property  (uaa{sv})                  2 0                                      emits-change
.HasExternalMonitor            property  b                          true                                     emits-change
.Luminance                     property  aa{sv}                     1 5 "connector" s "HDMI-1" "color-mode"… emits-change
.NightLightSupported           property  b                          true                                     emits-change
.PanelOrientationManaged       property  b                          false                                    emits-change
.PowerSaveMode                 property  i                          0                                        emits-change writable
.MonitorsChanged               signal    -                          -                                        -




 busctl --user call \
    org.gnome.Mutter.DisplayConfig \
    /org/gnome/Mutter/DisplayConfig \
    org.gnome.Mutter.DisplayConfig GetCurrentState
ua((ssss)a(siiddada{sv})a{sv})a(iiduba(ssss)a{sv})a{sv} 1 1 "HDMI-1" "GSM" "LG ULTRAWIDE" "0x01010101" 20 "2560x1080@60.000" 2560 1080 59.9995 1 6 1 1.25 1.48148 1.73913 2 2.5 2 "is-current" b true "is-preferred" b true "1920x1080@60.000" 1920 1080 60 1 6 1 1.25 1.5 1.73913 2 2.30769 0 "1920x1080@59.940" 1920 1080 59.9402 1 6 1 1.25 1.5 1.73913 2 2.30769 0 "1920x1080@50.000" 1920 1080 50 1 6 1 1.25 1.5 1.73913 2 2.30769 0 "1920x1080i@30.000" 1920 1080 30 1 6 1 1.25 1.5 1.73913 2 2.30769 1 "is-interlaced" b true "1920x1080i@29.970" 1920 1080 29.9701 1 6 1 1.25 1.5 1.73913 2 2.30769 1 "is-interlaced" b true "1920x1080i@25.000" 1920 1080 25 1 6 1 1.25 1.5 1.73913 2 2.30769 1 "is-interlaced" b true "1680x1050@59.883" 1680 1050 59.8833 1 5 1 1.25 1.5 1.75 2 0 "1600x900@60.000" 1600 900 60 1 4 1 1.25 1.49254 1.75439 0 "1280x1024@75.025" 1280 1024 75.0247 1 4 1 1.24878 1.49708 1.75342 0 "1280x1024@60.020" 1280 1024 60.0197 1 4 1 1.24878 1.49708 1.75342 0 "1280x720@60.000" 1280 720 60 1 3 1 1.25 1.50943 0 "1280x720@59.940" 1280 720 59.9402 1 3 1 1.25 1.50943 0 "1280x720@50.000" 1280 720 50 1 3 1 1.25 1.50943 0 "1152x864@75.000" 1152 864 75 1 3 1 1.25217 1.5 0 "1024x768@75.029" 1024 768 75.0286 1 2 1 1.24878 0 "1024x768@60.004" 1024 768 60.0038 1 2 1 1.24878 0 "800x600@75.000" 800 600 75 1 1 1 0 "800x600@60.317" 800 600 60.3165 1 1 1 0 "720x576@50.000" 720 576 50 1 1 1 0 6 "is-builtin" b false "display-name" s "LG Electronics 29\"" "min-refresh-rate" i 56 "is-for-lease" b false "color-mode" u 0 "supported-color-modes" au 1 0 1 0 0 1 0 true 1 "HDMI-1" "GSM" "LG ULTRAWIDE" "0x01010101" 0 2 "layout-mode" u 1 "supports-changing-layout-mode" b true


Just an addition I observed from the OP’s first screenshot is, that it is Kali Linux (Guest) they test with. The Default desktop is in Kali Xfce and this again is still using x11.

So I tried with XFCE on Fedora which just comes with:

liveuser@localhost-live:~$ echo $XDG_SESSION_TYPE
x11

I can copy and paste between Gnome <> Xfce. Autoresize on the other hand is not working and I can use

As a workaround.

Thanks for the tip about posting output.

You are right about spice-vdagent being enabled, but it isn’t running. This is the output on my guest:

systemctl --user status spice-vdagent.service
○ spice-vdagent.service - Spice guest session agent
     Loaded: loaded (/usr/lib/systemd/user/spice-vdagent.service; enabled; preset: enabled)
     Active: inactive (dead) since Thu 2025-11-13 19:45:35 MST; 37s ago
   Duration: 171ms
 Invocation: eb6ed1e1b1b84a31a56c01391986c398
       Docs: man:spice-vdagent(1)
    Process: 1512 ExecStart=/usr/bin/spice-vdagent -x (code=exited, status=0/SUCCESS)
   Main PID: 1512 (code=exited, status=0/SUCCESS)
   Mem peak: 22.5M
        CPU: 128ms

Nov 13 19:45:35 concrete-jungle spice-vdagent[1512]: vdagent started
Nov 13 19:45:35 concrete-jungle spice-vdagent[1512]: libEGL warning: DRI3 error: Could not get DRI3 device
Nov 13 19:45:35 concrete-jungle spice-vdagent[1512]: libEGL warning: Ensure your X server supports DRI3 to get accelerated rendering
Nov 13 19:45:35 concrete-jungle spice-vdagent[1512]: spice-vdagent[1512]: display: failed to call GetCurrentState from mutter over DBUS
Nov 13 19:45:35 concrete-jungle spice-vdagent[1512]: spice-vdagent[1512]:    error message: Cannot invoke method; proxy is for the well-known name org.gnom>
Nov 13 19:45:35 concrete-jungle spice-vdagent[1512]: display: failed to call GetCurrentState from mutter over DBUS
Nov 13 19:45:35 concrete-jungle spice-vdagent[1512]: spice-vdagent[1512]: No guest output map, using output index as display id
Nov 13 19:45:35 concrete-jungle spice-vdagent[1512]:    error message: Cannot invoke method; proxy is for the well-known name org.gnome.Mutter.DisplayConfi>
Nov 13 19:45:35 concrete-jungle spice-vdagent[1512]: No guest output map, using output index as display id
Nov 13 19:45:39 concrete-jungle systemd[875]: /usr/lib/systemd/user/spice-vdagent.service:23: Unknown key 'StandardError' in section [Install], ignoring.

Once I run systemctl --user status spice-vdagent.service, I can reboot, and the resolution scales– specifically if I enable it again. If I shutdown and then power on, it does not scale.

(these are some weird quirks that I do not fully understand. I may be missing some steps in the setup process)

However, as @ilikelinux posted, xrandr --output Virtual-1 --auto fixes the resolution. I will mark that as the solution.

$ xrandr --output Virtual-1 --auto

This works. Thanks for the help.

1 Like

It is just a Workaround, however as you can not select that, solution sounds good :slight_smile:

p.s. might be a good Idea to put xrandr back to the live iso. So we not have to install it everytime.
At least as long we do not have a definitive solution.

I faced the same problem after not so smooth upgrade to F43 that required manual intervention using dnf distro-sync and some other magic.

The spice-vdagent service worked fine, but the screen resolution just didn’t follow the virt-manager window size.

In my case, I had to manually select the appropriate resolution in KDE Display Configuration that matched current virt-manager window dimensions. After that, automatic resolution change on window resize started working again.

How exactly did you do this work around?
I tried a few variations and no luck in getting resizing to work.

I have KDE plasma F43 for my desktop and the VM.
In Perferences I have:

  • Graphics Console Scaling: Always
  • Resize Guest with Window: On (was off)
    In the VM under View I have:
  • Scale Display: Always
  • Scale Display: Auto resize VM with Windows: Ticked

When I resize the window the contents is shrunk/stretched only.

What do you have as settings and how does it behave?