Am Mittwoch, 27. Januar 2021, 10:55:53 CET schrieb Linux-Fan: > Linux-Fan writes: > > Rainer Dorsch writes: > >> Hi, > >> > >> with virtualbox, it is possible that the guest system rescales its screen > >> if I change the window for the guest (and virtualbox guest tools are > >> installed at > >> least). Does anybody know if that is possible with > >> virt-manager/libvirt/qemu/ kvm? > > > > It is certainly possible to set the guest resolution to exactly match the > > window size. I am not sure if it can be configured to _automatically_ > > adjust the guest resolution upon window size change though. > > > > The protocol must support it, because I know that for Windows guest > > systems, the Windows resolution adjusts to the window size. Unlike with > > Linux guests, it does this in fixed steps of "common" monitor resolutions > > and thus does not usually match the exact window size but something > > smaller. > > > > If you find out how to apply the sizes automatically on Linux, I'd be > > interested to learn how that works :) If no „solution” exists yet, it > > might > > be easy to script (although I have not bothered to do that so far). > > Update: I found out how to enable automatic resizing: > > * Install `qemu-guest-agent` in the VM in addition to running > `spice-vdagent` > * Set Video model to VGA > > This enables automatic resizing here although from "feeling" the graphics > performance is worse than with QXL or virtio.
Many thanks for the quick response again. I did not have spice-vdagent installed in the guest system. Installing spice- vdagent and switching from QXL to virtio was sufficient here. Interesting side effect: On the host system, I get rd@h370:~$ xrandr Screen 0: minimum 320 x 200, current 3840 x 2160, maximum 8192 x 8192 HDMI-1 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 609mm x 349mm 3840x2160 30.00* 25.00 24.00 29.97 23.98 2560x1440 59.95 2048x1280 59.99 2048x1080 24.00 1920x1080 60.00 60.00 50.00 59.94 30.00 25.00 24.00 29.97 23.98 1920x1080i 60.00 50.00 59.94 50.00 1600x1200 60.00 1600x900 60.00 1280x1024 75.02 60.02 1152x864 75.00 1280x720 60.00 50.00 59.94 1024x768 75.03 60.00 800x600 75.00 60.32 720x576 50.00 720x576i 50.00 720x480 60.00 59.94 720x480i 60.00 59.94 640x480 75.00 60.00 59.94 720x400 70.08 HDMI-2 disconnected (normal left inverted right x axis y axis) DP-1 disconnected (normal left inverted right x axis y axis) rd@h370:~$ After installing spice-vdagent on the guest, I get there rd@debianVM:~$ xrandr Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192 Virtual-0 connected primary 1920x1080+0+0 0mm x 0mm 3840x2160 60.00 + 1920x1200 59.95 1920x1080 60.00* 1600x1200 59.95 1680x1050 60.00 1400x1050 60.00 1280x1024 59.95 1440x900 59.99 1280x960 59.99 1280x854 59.95 1280x800 59.96 1280x720 59.97 1152x768 59.95 1024x768 59.95 800x600 59.96 848x480 59.94 720x480 59.94 640x480 59.94 Virtual-1 disconnected Virtual-2 disconnected Virtual-3 disconnected rd@debianVM:~$ Note, the repetition rate (at least virtually) doubles in the guest at 4K. Pretty cool! Thanks again Rainer -- Rainer Dorsch http://bokomoko.de/