The keyboard is only insufficiently released by QEMU/KVM for the host when 3D acceleration is enabled

  Kernel: 5.17.1-3-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 11.2.0
    Desktop: KDE Plasma v: 5.24.4 tk: Qt v: 5.15.3 wm: kwin_x11 vt: 1 dm: SDDM
    Distro: Manjaro Linux base: Arch Linux
  Type: Laptop System: TUXEDO product: TUXEDO Book XP14 Gen12 v: N/A
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: NB01 model: NV4XMB,ME,MZ serial: <superuser required> UEFI: INSYDE
    v: 1.07.14NRTR1 date: 08/24/2021
  ID-1: BAT0 charge: 44.9 Wh (100.0%) condition: 44.9/49.4 Wh (91.0%)
    volts: 17.1 min: 15.2 model: Notebook BAT type: Li-ion serial: <filter>
    status: full
  RAM: total: 31.13 GiB used: 14.72 GiB (47.3%)
  RAM Report:
    permissions: Unable to run dmidecode. Root privileges required.
  Info: quad core model: 11th Gen Intel Core i7-1165G7 bits: 64 type: MT MCP
    smt: enabled arch: Tiger Lake rev: 1 cache: L1: 320 KiB L2: 5 MiB
    L3: 12 MiB
  Speed (MHz): avg: 894 high: 1038 min/max: 400/4700 cores: 1: 1035 2: 969
    3: 751 4: 690 5: 1038 6: 1007 7: 671 8: 995 bogomips: 44864
  Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat
    arch_capabilities arch_perfmon art avx avx2 avx512_bitalg avx512_vbmi2
    avx512_vnni avx512_vp2intersect avx512_vpopcntdq avx512bw avx512cd
    avx512dq avx512f avx512ifma avx512vbmi avx512vl bmi1 bmi2 bts cat_l2
    cdp_l2 clflush clflushopt clwb cmov constant_tsc cpuid cpuid_fault cx16
    cx8 de ds_cpl dtes64 dtherm dts epb ept ept_ad erms est f16c flexpriority
    flush_l1d fma fpu fsgsbase fsrm fxsr gfni ht hwp hwp_act_window hwp_epp
    hwp_notify hwp_pkg_req ibpb ibrs ibrs_enhanced ida intel_pt invpcid
    invpcid_single lahf_lm lm mca mce md_clear mmx monitor movbe movdir64b
    movdiri msr mtrr nonstop_tsc nopl nx ospke pae pat pbe pcid pclmulqdq
    pdcm pdpe1gb pebs pge pku pln pni popcnt pse pse36 pts rdpid rdrand
    rdseed rdt_a rdtscp rep_good sdbg sep sha_ni smap smep split_lock_detect
    ss ssbd sse sse2 sse4_1 sse4_2 ssse3 stibp syscall tm tm2 tpr_shadow tsc
    tsc_adjust tsc_deadline_timer tsc_known_freq umip vaes vme vmx vnmi
    vpclmulqdq vpid x2apic xgetbv1 xsave xsavec xsaveopt xsaves xtopology
  Device-1: Intel TigerLake-LP GT2 [Iris Xe Graphics] vendor: CLEVO/KAPOK
    driver: i915 v: kernel ports: active: DP-1 off: eDP-1
    empty: DP-2, DP-3, DP-4, HDMI-A-1 bus-ID: 00:02.0 chip-ID: 8086:9a49
    class-ID: 0300
  Display: x11 server: X.Org v: compositor: kwin_x11 driver: X:
    loaded: modesetting alternate: fbdev,vesa gpu: i915 display-ID: :0
    screens: 1
  Screen-1: 0 s-res: 3840x2160 s-dpi: 96 s-size: 1015x571mm (39.96x22.48")
    s-diag: 1165mm (45.85")
  Monitor-1: DP-1 pos: primary model: Gigabyte M32U serial: <filter>
    res: 3840x2160 dpi: 140 size: 697x392mm (27.44x15.43") diag: 800mm (31.5")
    modes: max: 3840x2160 min: 720x400
  Monitor-2: eDP-1 note: disabled model: Najing CEC Panda 0x0050
    res: 3840x2160 dpi: 158 size: 309x174mm (12.17x6.85") diag: 355mm (14")
    modes: 1920x1080
  OpenGL: renderer: Mesa Intel Xe Graphics (TGL GT2) v: 4.6 Mesa 21.3.8
    direct render: Yes


I use QEMU/KVM with virt-manager as frontent to virtualize other Linux. This also works well. But my keyboard is often not released when I move the mouse out of the VM and type something into e.g. a terminal on the host.

I have attached a picture, the guest is Manjaro with LXQT:

My mouse pointer is at point 1:

  • If I move the mouse directly to point 2, I can’t type into the terminal.
  • If I move the mouse over 3, 4, 5 to 2, I can type in the terminal.
  • If I move the mouse over 6 to 2, I can’t type into the terminal.

I have 3D acceleration enabled for the guest. See these pictures:

The problem does not occur when I set QXL as the graphics for the guest.

I also have this problem with Ubuntu, Arch and Opensuse as guest.

What do I have to change to always release the keyboard by itself without always moving the mouse over the top bar?

I wish you a nice and sunny day. :slight_smile: (Push)

What’s the weather like where you are? :sunflower: (Does anyone know a solution to my problem?)