Bugzilla – Bug 1218457
wayland, wmctrl -l does not see "QEMU" window
Last modified: 2024-01-03 15:32:57 UTC
With plasma-wayland When I launch a QEMU VM. A window with the title "QEMU" is opened. With the command "wmctrl -l" I can list all the windows in the desktop. wmctrl does list the "QEMU" window. This is a problem because the end of the lunching is never executed. the loop "while" doezs not finish. Here is the script ******************************************************************************* #!/bin/bash bash -c ' qemu-kvm -enable-kvm \ -m 3G -smp 4 -cpu host -M q35 \ -display gtk,gl=on,zoom-to-fit=off \ -device virtio-vga-gl \ -device qemu-xhci,p2=5,p3=5,id=xhci \ -device usb-kbd \ -device usb-mouse \ -device intel-hda \ -device hda-duplex,audiodev=snd0 \ -audiodev pipewire,id=snd0 \ -device usb-host,vendorid=0x046d,productid=0x0825 \ -device usb-host,vendorid=0x0b05,productid=0x190e \ -boot menu=on \ -nic bridge,mac=00:16:3e:70:2f:99 \ ~/QEMU_VM/android_x86_64_9.0-r2.img \ &' while [ true ] do sleep 5s status=$(wmctrl -l | grep "QEMU") if [ "$status" != "" ] ; then break fi done WID="$(wmctrl -lx | grep "QEMU")"; QT_QPA_PLATFORM=xcb kdocker -qtw "${WID%% *}" -i ///usr/share/icons/breeze/devices/64/smartphone.svg & sleep 30s adb connect 192.168.0.168:5555 adb shell dumpsys battery set level 100 ******************************************************************************* Curiously, other script as the one I use to launch a Chrome web app does not get this problem. For example ****************************************************************************** #!/bin/bash bash -c '/opt/google/chrome/google-chrome --profile-directory=Default --app-id=kippjfofjhjlffjecoapiogbkgbpmgej &' while [ true ] do sleep 5 status=$(wmctrl -l | grep "Facebook") if [ "$status" != "" ] ; then break fi done WID="$(wmctrl -lx | grep "Facebook")"; QT_QPA_PLATFORM=xcb kdocker -qtw "${WID%% *}" -i ~/.local/share/icons/hicolor/32x32/apps/chrome-kippjfofjhjlffjecoapiogbkgbpmgej-Default.png & ******************************************************************************
qemu is not compliant with wayland. to launch qemu you need to use : GDK_BACKEND=x11 qemu-kvm -enable-kvm ...