Bug 461181 - Software cursor disappears when moving over right or bottom screen border in Wine games
Summary: Software cursor disappears when moving over right or bottom screen border in ...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.26.2
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2022-10-29 23:40 UTC by username
Modified: 2023-02-11 03:27 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description username 2022-10-29 23:40:18 UTC
SUMMARY
***
The bug only reproduce if you set environment variable KWIN_DRM_NO_AMS=1
Cursor disappears when moving over right or bottom screen border in Wine games
If you switch to another application or open application launcher then cursor become visible again
***


STEPS TO REPRODUCE
1. Set environment variable KWIN_DRM_NO_AMS=1
2. Launch some game through wine
3. Move mouse cursor over bottom or right screen border

OBSERVED RESULT
Mouse cursor will disappear

EXPECTED RESULT
You can see mouse cursor

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.0.5-zen1-1-zen
(available in About System)
KDE Plasma Version: 5.26.2
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.6

ADDITIONAL INFORMATION
The last release without bug is kwin-5.25.5-1. After updating to kwin-5.26.0 or newer you can see the bug
Comment 1 Vlad Zahorodnii 2023-01-23 13:51:48 UTC
Can you clarify what you mean by software cursor? The software cursor drawn by kwin or the wine game? also, can you list wine games that are affected? can you reproduce it with some free X11 apps?
Comment 2 username 2023-01-26 15:41:54 UTC
(In reply to Vlad Zahorodnii from comment #1)
> Can you clarify what you mean by software cursor? The software cursor drawn
> by kwin or the wine game? also, can you list wine games that are affected?
> can you reproduce it with some free X11 apps?

By software cursor I mean that KDE draws the cursor in a different way when the variable KWIN_DRM_NO_AMS=1 is enabled. I am forced to use this variable to get rid of this issue: https://gitlab.freedesktop.org/drm/amd/-/issues/1513

The issue only reproduced with Wayland. To better see the issue I recorded video: https://www.youtube.com/watch?v=J1dIrPxSANk

Wine games affected: World of Warcraft, The Sims 4
I tested some free games, can't reproduce it with SuperTux2, Warsow
I will try to test more games later
Comment 3 username 2023-02-06 15:29:38 UTC
I did some more tests
Games affected: Dota 2 (native)
Games unaffected: CS: GO (native), Paladins (wine)
Comment 4 Bug Janitor Service 2023-02-09 19:46:34 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/3572
Comment 5 Zamundaaa 2023-02-09 22:47:06 UTC
Git commit 815269a26f234758f95a729c2323de552723639b by Xaver Hugl.
Committed on 09/02/2023 at 22:35.
Pushed by zamundaaa into branch 'master'.

backends/drm: set cursor again after it was hidden

This isn't necessary with atomic modesetting, as moving and setting are
the same thing. With legacy though, if the cursor was hidden, moving it
with the layer visible does not automatically show it again, so that needs
to be done explicitly

M  +2    -1    src/backends/drm/drm_output.cpp

https://invent.kde.org/plasma/kwin/commit/815269a26f234758f95a729c2323de552723639b
Comment 6 Zamundaaa 2023-02-09 22:59:20 UTC
Git commit 5432ffb76d97f7d729e1b7dfaa8f3a724b36eac0 by Xaver Hugl.
Committed on 09/02/2023 at 22:59.
Pushed by zamundaaa into branch 'cherry-pick-815269a2'.

backends/drm: set cursor again after it was hidden

This isn't necessary with atomic modesetting, as moving and setting are
the same thing. With legacy though, if the cursor was hidden, moving it
with the layer visible does not automatically show it again, so that needs
to be done explicitly


(cherry picked from commit 815269a26f234758f95a729c2323de552723639b)

M  +2    -1    src/backends/drm/drm_output.cpp

https://invent.kde.org/plasma/kwin/commit/5432ffb76d97f7d729e1b7dfaa8f3a724b36eac0