Bug 483133 - Mouse cursor stuck in top-left corner in some fullscreen games on Wayland
Summary: Mouse cursor stuck in top-left corner in some fullscreen games on Wayland
Status: RESOLVED DUPLICATE of bug 452188
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (other bugs)
Version First Reported In: 6.0.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6, wayland-only
Depends on:
Blocks:
 
Reported: 2024-03-10 16:53 UTC by hazelnot
Modified: 2024-03-26 13:09 UTC (History)
5 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 hazelnot 2024-03-10 16:53:01 UTC
SUMMARY
The mouse cursor started getting stuck in the top-left corner after I turned on the computer today. It varies depending on game. In some games (I tested The Elder Scrolls IV: Oblivion, Command & Conquer: Renegade) it simply "teleports" to the corner and stays there when I move the mouse, while in others (I tested Command & Conquer: Red Alert 2) it periodically "blinks" into the corner and back, causing the screen to briefly scroll in that direction. Other games (I tested Grand Theft Auto: San Andreas and the native Linux version of Portal 2), nothing happens at all, and they play normally.

This did not happen until today (possibly related to an update that got installed yesterday), and it only happens on Wayland - on X the cursor is completely unaffected. 

Interestingly enough, someone suggested it might be related to Screen Edges, triggering the overview underneath the game, and after disabling that feature the mouse started working normally in Wayland for C&C Renegade, but the other games seem unaffected by this.

All the games tested were launched from Steam, if that's relevant.

STEPS TO REPRODUCE
1. Launch one of the affected games (there are probably more cases where this happens) while running a Plasma 6.0.1 Wayland session

OBSERVED RESULT
Mouse cursor gets stuck in the top-left corner of the screen

EXPECTED RESULT
Mouse functions normally

SOFTWARE/OS VERSIONS
Linux: EndeavourOS
KDE Plasma Version: Plasma 6.0.1
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2

ADDITIONAL INFORMATION
I disabled EndeavourOS' repos, and am using the vanilla Arch ones. In addition, I'm using a dual-monitor setup. Graphics card is AMD Radeon RX 5700 XT 50th Anniversary
Comment 1 hazelnot 2024-03-16 12:37:09 UTC
The issue seems to have been resolved, either by 6.0.2 or by a different package update that got pushed in the meantime.
Comment 2 db0 2024-03-17 11:37:27 UTC
I'm still encountering the same issue with Doom Eternal on Plasma 6.0.2. The cursor gets stuck at the top left corner and can't be moved. The cursor works without issues when the Steam overlay is opened but not in the game. I also use two monitors in case it matters.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Comment 3 hazelnot 2024-03-18 14:40:13 UTC
Yup, this is once again happening to me as well, after about a week of not having this issue anymore. Seems almost random.
Comment 4 hazelnot 2024-03-21 13:15:56 UTC
I just discovered that this might be related to focus loss. I managed to regain control of the pointer in one of the affected games by tabbing out and then tabbing back in.

I encountered similar focus loss issues in other programs as well when using Wayland, sometimes clicking on the window or the icon in the task manager doesn't fully focus it, and alt-tabbing is needed.
Comment 5 lolqweety 2024-03-22 20:15:30 UTC
as @hazelnot mentioned it is probably related to focus loss indeed. I saw people mentioning that running games with gamescope may work as an temporary fix and I can confirm that. Sadly the alt tab method is very random and unconsistent for me.
Comment 6 david.esotica 2024-03-24 21:33:45 UTC
I can confirm that this is happening to me on Nobara, KDE 6.0.2 in Warhammer III. Also happened in Red Alert II.

I've experimented with gamescope and it appears somewhat resolved.
Comment 7 hazelnot 2024-03-26 13:09:07 UTC

*** This bug has been marked as a duplicate of bug 452188 ***