After, further testing (basically 2 days of reading all QEMU docs and changelogs I found and messing around with various QEMU options:) I was able to solve my problems with the "-full-screen" option.

The solution was to add the following option to my QEMU command:

-display gtk,gl=on,grab-on-hover=on,zoom-to-fit=on

The important bit that solved the display overflowing behavior is the "zoom-to-fit=on" suboption. This lets my VM to have the screen resolution I configure in it (e.g. 1920x1080) and when not in full screen mode it zooms the VM display to fit any QEMU window size without changing the screen resolution inside my VM. Although, the "-full-screen" option should probably work correctly on its own, so my solution is just a workaround.

Also, remember the problem with "-soundhw hda" option, which prevented VM from starting with QEMU version from Debian Backports (5.0-14~bpo10+1)? It seems to occur in a different way also in QEMU version from Debian Stable (3.1+dfsg-8+deb10u8). In QEMU version 3.1+dfsg-8+deb10u8 my VM can start with the "-soundhw hda" option, but unfortunatelly the VM cannot produce any usable sound. I noticed there is already bug 949111 for this, so I described the details I observed in that bug (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=949111#15).

Finally, the initial delay on VM start is still there and it still shortens after repeated VM starts.

Taken together, I guess QEMU is now usable enough for me on Debian 10, but it could be better if at least some of the problems I described are fixed properly.

Anyway, here is my QEMU test command (updated with the display overflowing workaround) if someone wants to try reproduce and debug the problems I described (it is single line in case email reformats it):

QEMU_PA_SERVER='/run/user/1000/pulse/native' QEMU_AUDIO_DRV='pa' qemu-system-x86_64 -display gtk,gl=on,grab-on-hover=on,zoom-to-fit=on -full-screen -enable-kvm -machine type=q35,accel=kvm -soundhw hda -netdev user,id=vnet -device e1000,netdev=vnet -cpu host -smp cores=2 -m 2048 -drive file=DISK.raw,format=raw,index=0,media=disk -drive file=IMAGE.iso,index=2,media=cdrom

Regards
Bakhelit

Reply via email to