microsoft / wslg

Enabling the Windows Subsystem for Linux to include support for Wayland and X server related scenarios
MIT License
9.91k stars 296 forks source link

qemu mouse tracking issue with display scaling in WSLg #911

Open jblang opened 1 year ago

jblang commented 1 year ago

Version

Microsoft Windows [Version 10.0.22621.900]

WSL Version

Kernel Version

5.15.74.2-microsoft-standard-WSL2

Distro Version

Ubuntu 22.04

Other Software

QEMU emulator version 6.2.0 (Debian 1:6.2+dfsg-2ubuntu6.5)

Repro Steps

On Windows, set display scaling higher than 100%. Run qemu in WSL2 with a guest GUI that captures mouse input. Click into the qemu window to capture the mouse, then move the cursor. The movement will not track the host cursor.

For example, you can use X11 in the Debian 0.93 image from the QEMU Advent Calendar. Extract the downloaded tarball, and boot up the image in qemu using the provided run.sh script. A qemu window will appear, then boot Debian. Log in as root, then run startx to run X11.

Expected Behavior

The guest mouse cursor should track the host mouse cursor.

Actual Behavior

Two mouse cursors appear, and the guest mouse cursor's movement is accelerated by the scaling factor.

Diagnostic Logs

No response

biggestsonicfan commented 4 months ago

I realize this is an old, untouched, issue, but I am wondering what the purpose of running qemu within WSL as opposed to qemu in the Windows host?

weslleymurdock commented 4 months ago

I'm facing this issue right now My purpose is run osx into windows, using a custom build kernel with kvm intel module enabled

I followed some tutorials and successfully managed a osx run into qemu within wsl, but none of these have mentioned anything about setup some config to display scaling, or any setting related to inputs from host

Here are my setup info:

Windows 11 Pro [22H2] build 22621.3155 WSL 2.0.9.0 Kernel: 5.15.133.1-1 (compiled from WSL2-Kernel repo) WSLg: 1.0.59