deep-entertainment / issues

Issue tracker for deep Entertainment projects
1 stars 0 forks source link

[EGOVENTURE] Mouse Warp on Ubuntu 21.10 'freezes' cursor #9

Closed ThmsKnz closed 2 years ago

ThmsKnz commented 2 years ago

Please make sure you talk to the community before creating an issue.

Describe the bug When picking up an inventory item or when releasing an inventory item on a game running on Ubuntu 21.10 the mouse motion freezes. The cursor is not getting moved anymore. When switching the windows focus with Alt-Tab and switching back to the game window, the mouse motion is working fine again.

To Reproduce To reproduce the issue I installed a fresh clean Ubuntu 21.10 in a VM and started a game once exported for Linux with Godot 3.4.2 and once exported for Linux with Godot 3.3.4. In both cases the mouse motion freezes when picking up or releasing an inventory item.

Cause There seems to be an issue with the get_viewport().warp_mouse() function on this Linux version. When commenting out the warp_mouse() function call in Speedy.set_custom_mouse_cursor() the issue does not occur. (Of course then the cursor position alignment with the hotspot position is missing.)

Observation Once the warp_mouse() function is called there is only one InputEventMouseMotion event that gets triggered afterwards but no further events anymore.

Versions

ThmsKnz commented 2 years ago

Here are the latest findings: All tests were conducted on Linux VMs using VMware Workstation 16 Player.

So this might be an issue depending on the graphics driver used.

ThmsKnz commented 2 years ago

Some more details on the configurations I tested it (VM only):

It's working fine on Linux ubuntu 5.13.0-27-generic (Ubuntu 21.10) with llvmpipe

Extended renderer info (GLX_MESA_query_renderer): Vendor: Mesa/X.org (0xffffffff) Device: llvmpipe (LLVM 12.0.1, 256 bits) (0xffffffff) Version: 21.2.2

It's not working on Linux ubuntu 5.13.0-27-generic (Ubuntu 21.10) with SVGA3D

Extended renderer info (GLX_MESA_query_renderer): Vendor: VMware, Inc. (0x15ad) Device: SVGA3D; build: RELEASE; LLVM; (0x405) Version: 21.2.2

It's working fine on Linux ubuntu 5.8.0-26-generic (Ubuntu 20.10) with SVGA3D

Extended renderer info (GLX_MESA_query_renderer): Vendor: VMware, Inc. (0x15ad) Device: SVGA3D; build: RELEASE; LLVM; (0x405) Version: 20.2.1

ThmsKnz commented 2 years ago

One more finding that indicates that this is a vmware specific mouse/graphic driver issue. I found an old page from 2013 (https://wiki.x.org/wiki/vmware/vmware3D/) which says:

Applications that warp the cursor, like games or the Compiz spinning cube will not work well with VMmouse enabled, since it uses the host cursor. If this becomes a problem for you, please use the following .vmx file option to disable VMmouse, and use the VMware relative USB mouse instead: (Motion ungrab will be lost and you'll see a slightly increased cursor lag). mouse.vusb.enable = "TRUE"

I gave it a try with this setting: and voilà the cursor doesn't freeze anymore. But it also sped up mouse movement within the game that it was hard to position the mouse cursor :-) so it's not a 'real' workaround, but it proofs that there's a dependency to vmware specific drivers.

dploeger commented 2 years ago

Hm. I wonder what to do with this, because in my eyes, it's pretty much a corner case. Do people really play games on Linux in a VM if the same game is available for their host platform?

Maybe we could document it as a known issue? I mean, it's interesting to know for developers who test their games in this environment (like you apparently are)

ThmsKnz commented 2 years ago

I completely agree. Now that we know more about the root cause and know that there are two workarounds available we can close the issue. I will check from time to time whether a future vmware driver update will resolve this bug.

dploeger commented 2 years ago

Thanks a lot for all your work!