Bug 478487 - VMware Workstation + atomic mode-settings needs KWIN_FORCE_SW_CURSOR=1
Summary: VMware Workstation + atomic mode-settings needs KWIN_FORCE_SW_CURSOR=1
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: platform-drm (show other bugs)
Version: git master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 479002 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-12-13 22:13 UTC by Stefan Hoffmeister
Modified: 2024-01-09 17:14 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Hoffmeister 2023-12-13 22:13:33 UTC
SUMMARY

When run on  VMware Workstation, in Wayland, and with atomic mode-setting force-enabled through

    export KWIN_DRM_NO_AMS=0

no cursor will be shown.

STEPS TO REPRODUCE
0. VMware Workstation 17.5
1. Fedora Rawide (40) + KDE Plasma 6 beta 1
2. have KWIN_DRM_NO_AMS=0 in the environment
3. boot / login

OBSERVED RESULT

No cursor rendered; cursor is alive and effective though (hover / click etc).

EXPECTED RESULT

Rendering of cursor.

Workaround: export KWIN_FORCE_SW_CURSOR=1

This is on kernel 6.7.0-rc5.
Comment 1 Stefan Hoffmeister 2023-12-13 22:19:55 UTC
With the environment set as above, this seems to work quite well.

I used Firefox to render two Youtube videos

* one on 4K fullscreen resolution at FullHD
* one on 3.5K fullscreen resolution at FullHD

plus some more wiggling and rendering experiments and everything looked ok (on an Intel 11800H integrated GPU, which is very much not high performance). I do not know how else to stress atomic mode-setting.

Cursor hotspots were perfect, in konsole, in Visual Studio Code, and in Firefox (those tended to cause problem under KDE 5.27 Wayland)
Comment 2 Stefan Hoffmeister 2023-12-14 16:24:22 UTC
Digging through the net finds https://github.com/swaywm/sway/issues/5834 and https://github.com/swaywm/sway/issues/3814 - also no way to get hardware cursors to work on the vmwgfx driver, with the workaround also being: force software cursors.

There is one report of Weston being able to successfully use hardware cursors on vmwgfx, see https://github.com/swaywm/sway/issues/5834#issuecomment-1234948941
Comment 3 Zamundaaa 2023-12-25 21:34:53 UTC
KWin and wlroots allocate buffers to render to (with gbm) and use those for the cursor, and afaik Weston uses dumb buffers. So I'm very certain this is a driver bug.

We can work around it, but please report it to the kernel too.
Comment 4 Stefan Hoffmeister 2023-12-27 10:20:19 UTC
I am currently digging into cursors in general, have already reached out in the matter of drmCloseBufferHandle (and the TTM/GEM mess) - and have received a response from Zack Rusin of VMware / Broadcom, see https://lore.kernel.org/all/CABQX2QPkEWDhE6xAaucaFh7QWvA06xJ8bfqrmPQTKM61X-YMmQ@mail.gmail.com/

Once I understand more about "the cursor situation in KDE on top of vmwgfx", I'll follow up on this.
Comment 5 Zamundaaa 2023-12-27 15:59:03 UTC
That response makes sense to me. While it's a weird workaround, using DRM_CLIENT_CAP_CURSOR_PLANE_HOTSPOT (or maybe better, DRM_CLIENT_CAP_ATOMIC) to ensure old clients don't get changed behavior is acceptable.
Comment 6 Zamundaaa 2024-01-09 17:14:44 UTC
As this is a driver bug, I'll close it with resolved upstream. Let me know if we still need to include a workaround though
Comment 7 Zamundaaa 2024-01-09 17:14:48 UTC
*** Bug 479002 has been marked as a duplicate of this bug. ***