Bug 505959

Summary: Problems with mouse pointer alignment within game menus when using Wayland and exclusive fullscreen mode
Product: [Plasma] kwin Reporter: Marcus Seyfarth <m.seyfarth>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: REPORTED ---    
Severity: normal CC: jan.selchow, nate, Tyler
Priority: NOR Keywords: regression
Version First Reported In: 6.4.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: The bug in Plasma 6.4.0 that affects rendering/clicking in game
Bug with Plasma 6.4.0

Description Marcus Seyfarth 2025-06-22 08:56:55 UTC
SUMMARY
As reported in the Phoronix Forums, using Wayland in some proton games on CachyOS (via PROTON_ENABLE_WAYLAND=1) regressed with Plasma 6.4 vs. 6.3.5. Specifically, in Total War: Troy and Sniper Elite 5 (exclusive full screen mode), within the game menu, the mouse pointer is not aligned with the in-game mouse pointer any longer which makes navigation in the game menu very difficult as you cannot hit the menu buttons correctly any longer. However, once within the 3D mode in the affected games, the mouse pointer seems to be fine and correctly aligned.

STEPS TO REPRODUCE
1. Start up Total War: Troy or Sniper Elite 5 in exclusive full screen mode
2. Try to navigate in the in-game menu with the mouse
3. You'll notice that the mouse pointer doesn't hit the menu buttons any longer.

OBSERVED RESULT
You'll notice that the mouse pointer doesn't hit the menu buttons any longer.

EXPECTED RESULT
Perfect alignment of the mouse pointer.

SOFTWARE/OS VERSIONS
Linux Kernel: 6.15.3 
KDE Plasma Version: 6.4.0
KDE Frameworks Version: 6.15.0 
Qt Version: 6.9.1

ADDITIONAL INFORMATION
With these workarounds the issue can be circumvented:

1) Disabling Wayland for the game via PROTON_ENABLE_WAYLAND=0 (albeit that brings back micro-stutters - wayland is the superior gaming experience)
2) Using borderless mode instead of exclusive fullscreen mode, but that forces me to use a higher screen resolution (1440p native display) and tanks performance on my Vega 64.
Comment 1 Tyler 2025-06-24 05:18:44 UTC
Created attachment 182583 [details]
The bug in Plasma 6.4.0 that affects rendering/clicking in game
Comment 2 Tyler 2025-06-24 05:20:52 UTC
I have the same/similar bug here with mouse problem and what worse it affects the rendering of Baldur Gate 3 launcher which I attached the screenshot for. When opening the game, Baldur Gate 3, I noticed that I can't click anything beyond like 20% of space on left-hand side of the monitor to other 80% of the area on right-hand side of the monitor. Anything I click on right hand side coalesce into click on the left hand side. It affects the rendering of Launcher as well.

I'm on latest version of Arch Linux for Plasma 6.4.0

Operating System: Arch Linux 
KDE Plasma Version: 6.4.0
KDE Frameworks Version: 6.15.0
Qt Version: 6.9.1
Kernel Version: 6.15.3-arch1-1 (64-bit)
Graphics Platform: Wayland

Processors: Threadripper
Memory: 128 GiB of RAM (125.7 GiB usable)
Graphics Processor: AMD Radeon RX 7900 XTX
Comment 3 Tyler 2025-06-24 05:24:44 UTC
Ok, seems Spectacle is broken as well... It won't capture the game and instead it capture the image behind the one I was trying to screenshot for...
Comment 4 Tyler 2025-06-24 05:30:02 UTC
Created attachment 182584 [details]
Bug with Plasma 6.4.0

I literally cannot screenshot anymore on Plasma 6.4/Spectacle, everything is broken. I had to use my phone for picture
Comment 5 Marcus Seyfarth 2025-06-24 10:30:50 UTC
Thanks for confirming the Wayland/mouse pointer issue! I also can confirm the Spectacle issue. But let's leave that issue for a different bug report.
Comment 6 Vlad Zahorodnii 2025-06-24 11:21:04 UTC
Do you have scaled outputs? Is the issue reproducible with 100%? Do you know if the issue is reproducible with some free video game?
Comment 7 Marcus Seyfarth 2025-06-24 11:57:55 UTC
1) I've just tested the native resolution of the monitor (1440p) with the affected Total War: Troy. And indeed, it works fine when using the native resolution. There is no mouse pointer issue in that setup. However, for better performance on my Vega 64, I use 1080p in many games. 

2) Unfortunately, I cannot name a free game that reproduces this issue.