Bug#974969: The "-full-screen" option causes guest display to overflow outside the host screen
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
Bug#974969: The "-full-screen" option causes guest display to overflow outside the host screen
Ok, I was able to test "qemu-system-x86" from Debian Backports - the following packages were upgraded on my system: libpmem11.5.1-1 (new installed package) libslirp0 4.3.1-1~bpo10+1 (new installed package) liburing1 0.6-3~bpo10+1 (new installed package) qemu-system-common 5.0-14~bpo10+1 (upgraded package) qemu-system-data5.0-14~bpo10+1 (upgraded package) qemu-system-gui 5.0-14~bpo10+1 (upgraded package) qemu-system-x86 5.0-14~bpo10+1 (upgraded package) qemu-utils 5.0-14~bpo10+1 (upgraded package) Unfortunately, the problem persists - the "-full-screen" option still behaves exactly as described in the initial bug report (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=974969#5). Further more another option seems to be broken in the backports version. The "-soundhw hda" option seems to prevent VM from starting at all. The following modified test command (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 -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 Results in QEMU processes appearing in HTOP for a while and then disappearing. No QEMU window appears and no output is produced by QEMU (not even a warning or error). Only after QEMU processes disappear PULSEAUDIO complains with the following: pulseaudio: Wrong context state pulseaudio: Reason: Timeout pulseaudio: Failed to initialize PA contextaudio: warning: Using timer based audio emulation Aborted Looks like I will have to finish tuning my Debian 10 configs on my old Debian 9 system, where QEMU is working without problems. But, I hope to make QEMU usable on my Debian 10 systems eventually, so let me know if you need some more info:). Thanks Bakhelit
Bug#974969: The "-full-screen" option causes guest display to overflow outside the host screen
Package: qemu-system-x86 Version: 3.1 Dear Maintainers, On each VM start with the "-full-screen" option there is a delay. Duration varies from about a minute to a few seconds. With repeated VM starts the delay seems to shorten. Then the following message quickly appears (usually for less than 1 or 2 seconds) before the real guest display is shown: "Guest has not initialized display (yet).". When guest display is shown it is expanded and overflows outside the host screen. Using "Ctrl+Alt+f" two times to toggle the QEMU fullscreen seems to rescale the guest display correctly. Also after the first "Ctrl+Alt+f" the QEMU non-fullscreen window is expanded and overflows outside the host monitor. The QEMU non-fullscreen window seems to rescale the guest display correctly after using "Ctrl+Alt+2" followed by "Ctrl+Alt+1". I tested this with my dual monitor setup (laptop screen + external monitor both with the same resolution 1920x1080) for which I use the following "xrandr" commands: xrandr --output "$displayOne" --below "$displayTwo" # <- Extended xrandr --output "$displayOne" --same-as "$displayTwo" # <- Mirrored The described overflowing of the VM display was identical in both dual monitor modes and also in a single monitor setup. Single monitor test was with just the laptop screen and without any "xrandr" commands. HOW TO REPRODUCE: The overflowing behavior is reproducible with the following simplified "qemu-system-x86" command when I run it manually from terminal (it is single line in case email reformats it): qemu-system-x86_64 -full-screen -enable-kvm -machine type=q35,accel=kvm -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 Test is reproducible with empty/formated "DISK.raw" and for example Debian 10 Netinst ISO as "IMAGE.iso" (= no need to install VM just start the empty one:). Then it is very easy: if you do not see the Debian swirl in bottom right corner after starting VM, the guest display overflows outside the host screen:). RELEVANT SYSTEM DETAILS: My system has enabled only the integrated graphics in Intel Core i7-3632QM CPU and uses XFCE with "xfwm4" window manager. All packages are automatically updated from Debian 10 "main" repository - current versions for relevant packages are: linux-image-4.19.0-12-amd64 4.19.152-1 qemu-system-gui 3.1+dfsg-8+deb10u8 qemu-system-x86 3.1+dfsg-8+deb10u8 qemu-utils 3.1+dfsg-8+deb10u8 xfce4-session 4.12.1-6 xfdesktop4 4.12.4-2 xfwm4 4.12.5-1 xserver-xorg7.7+19 xserver-xorg-video-fbdev0.5.0-1 xserver-xorg-video-vesa 2.4.0-1 Let me know if you need any more info. I will try to test "qemu-system-x86" 5.0 or 5.1 from Debian Backports or Unstable when I have more time. Best Regards Bakhelit