Summary: | cursor doesnt go away in fullscreen games like THE FINALS | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | pollux/ned <polluxau> |
Component: | xwayland | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | dakky198, linx.system.adm, nate, skeleton0199, stefanfunk1998, ustyancevnikita98, xaver.hugl, yaomtc |
Priority: | NOR | Keywords: | regression |
Version: | 6.2.0 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/kwin/-/commit/8090e0264fff32dd73197a5e39d3b2de6309fde0 | Version Fixed In: | 6.2.2 |
Sentry Crash Report: | |||
Attachments: |
real cursor (left) and after image (right)
drm_info after bug triggers |
Description
pollux/ned
2024-09-15 17:29:32 UTC
Created attachment 174734 [details]
real cursor (left) and after image (right)
i've been experiencing this issue on arch linux since upgrading to plasma 6.2.0, specifically on the game Final Fantasy XIV, which uses a custom cursor icon, i guess similarly to the finals? i have 2 monitors, and when i click-to-focus the game window, an after image of the cursor appears where i clicked the window, and will stay there until i tab out of the game again. alt-tabbing or clicking the icon in the task manager doesnt cause this to happen. also the fake cursor after image is not capturable by spectacle, regardless of the option to include the cursor in the screenshot, so i took a picture with my phone oh and my system info is arch linux, kde plasma version: 6.2.0 kde frameworks version 6.6.0 qt version: 6.7.3 Also experiencing this bug on Fedora 41 Beta. Alt+tabbing the game causes the second cursor to disappear. This does only happen in games with custom cursors (at least in DOTA 2 and PowerWash Simulator) but I'm not entirely sure how to consistently make this bug appear. It's mostly appearing when launching the game. Operating System: Fedora Linux 41 KDE Plasma Version: 6.2.0 KDE Frameworks Version: 6.7.0 Qt Version: 6.7.2 Kernel Version: 6.11.3-300.fc41.x86_64 (64-bit) Graphics Platform: Wayland Processors: 24 × AMD Ryzen 9 5900X 12-Core Processor Memory: 62.7 GiB of RAM Graphics Processor: AMD Radeon RX 6600 Manufacturer: Micro-Star International Co., Ltd. Product Name: MS-7A38 System Version: 6.0 I can confirm this bug still exists on version 6.2 in the Arch repos. Changing focus to the game via click it's icon on the taskbar is a workaround currently. Clicking inside of the window itself WILL leave a ghost image of the mouse 100% of the time. weirdly enough, since yesterday, on arch linux, i dont have the issue anymore, but the "about my system" section of the kde setting still tell me the same versions for everything, i dont know if some other package is responsible for this issue? Issue is still present both using lutris (wow, hots), steam (any game that uses custom cursor) Arch, KDE6.2 i thought it was mentioned here in this thread, but i saw somewhere, where i was talking with other people about this issue, that they fixed it by enabling vsync inside the games settings then i remembered that i changed the Plasma setting to enable tearing in fullscreen windows to no longer allow tearing (forcing global vsync?) and then the issue no longer appeared for me after now testing, enabling the setting again to allow tearing (and apparently restarting the system to make it take effect?), i can reproduce the error reliably again. (In reply to stefanfunk1998 from comment #8) > i thought it was mentioned here in this thread, but i saw somewhere, where i > was talking with other people about this issue, that they fixed it by > enabling vsync inside the games settings > > then i remembered that i changed the Plasma setting to enable tearing in > fullscreen windows to no longer allow tearing (forcing global vsync?) and > then the issue no longer appeared for me > > after now testing, enabling the setting again to allow tearing (and > apparently restarting the system to make it take effect?), i can reproduce > the error reliably again. Thanks, that's very useful information. Because of limitations in the kernel API (that are being resolved upstream), we can't currently use the hardware cursor and do tearing at the same time, so KWin disables the hardware cursor while trying to do tearing. Something must be going wrong with that. If you put KWIN_FORCE_SW_CURSOR=1 into /etc/environment and reboot, does this still happen (with allow tearing enabled)? It doesn't happen with KWIN_DRM_NO_AMS=1 and tearing enabled (In reply to Zamundaaa from comment #9) > If you put > KWIN_FORCE_SW_CURSOR=1 > into /etc/environment and reboot, does this still happen (with allow tearing > enabled)? I can confirm that putting that environment variable into /etc/environment and rebooting does stop this issue from happening, at least with the game I was having issues on. Okay, that's at least working then. My best guess would be that the hardware plane wrongly stays enabled then.
Please remove that environment variable again, reboot, run
> sleep 10; drm_info
in a terminal, trigger the second cursor to be visible before the 10s are up (increase the time if you need more) and attach the output here.
Created attachment 174923 [details]
drm_info after bug triggers
Fulfilled request for drm_info output after the bug triggers
Thanks. It's just as I thought, the hardware plane stays enabled: │ ├───"type" (immutable): enum {Overlay, Primary, Cursor} = Cursor │ ├───"FB_ID" (atomic): object framebuffer = 148 │ │ ├───Object ID: 148 │ │ ├───Size: 64×64 │ │ ├───Format: ARGB8888 (0x34325241) │ │ ├───Modifier: DRM_FORMAT_MOD_LINEAR (0x0000000000000000) │ │ └───Planes: │ │ └───Plane 0: offset = 0, pitch = 256 bytes Probably because tearing is enabled first, and the cursor would only be disabled afterwards (which fails, because we can't update the cursor at all with tearing). This shouldn't be too hard to fix. A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/6663 Git commit 21b11326959431073ca9a3d2a63e975be66ced00 by Xaver Hugl. Committed on 18/10/2024 at 14:42. Pushed by zamundaaa into branch 'master'. backends/drm: don't allow tearing until the cursor plane is disabled Once tearing is enabled, atomic tests that try to disable the cursor plane will fail. M +8 -0 src/backends/drm/drm_output.cpp https://invent.kde.org/plasma/kwin/-/commit/21b11326959431073ca9a3d2a63e975be66ced00 Git commit 8090e0264fff32dd73197a5e39d3b2de6309fde0 by Xaver Hugl. Committed on 18/10/2024 at 15:03. Pushed by zamundaaa into branch 'Plasma/6.2'. backends/drm: don't allow tearing until the cursor plane is disabled Once tearing is enabled, atomic tests that try to disable the cursor plane will fail. (cherry picked from commit 21b11326959431073ca9a3d2a63e975be66ced00) Co-authored-by: Xaver Hugl <xaver.hugl@gmail.com> M +8 -0 src/backends/drm/drm_output.cpp https://invent.kde.org/plasma/kwin/-/commit/8090e0264fff32dd73197a5e39d3b2de6309fde0 |