Bug 452188 - While playing Apex Legends player's aim (mouse) spins and looks straight downwards.
Summary: While playing Apex Legends player's aim (mouse) spins and looks straight down...
Status: ASSIGNED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.24.4
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 483133 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-04-02 19:29 UTC by emozdemir
Modified: 2024-03-26 15:13 UTC (History)
14 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
mouse cursor bug in apex under wayland kwin (3.55 MB, video/mp4)
2023-09-12 12:42 UTC, Pollux
Details
log woth debug (2.22 MB, text/x-log)
2024-03-08 18:54 UTC, Oleh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description emozdemir 2022-04-02 19:29:52 UTC
SUMMARY
While playing Apex Legends, player's aim (mouse) spins and looks straight downwards. I've checked kwin debug console and there is one unknown input device causes this. This doesn't happen on X11 or gnome wayland and other people having this issue too. Video of the bug https://streamable.com/1uc3uk 

STEPS TO REPRODUCE
1.  Going in firing range can reproduce instantly. If not happens on first time, it will happen on second attempt.
2.  Happens randomly while playing normal games.

OBSERVED RESULT
Aim (mouse) spins and turns to the floor.

EXPECTED RESULT
No weird action.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.17.1-xanmod1-1 (64bit)
(available in About System)
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3
Comment 1 emozdemir 2022-04-04 13:31:52 UTC
Gamescope fixes this issue but it still needs to be fixed. 

Launch option: gamescope -e -H 1080 -f --  %command%
Comment 2 David Edmundson 2022-04-04 14:24:16 UTC
Is Apex Legends running under xwayland?

If so can you get output where kwin has the KWIN_XWAYLAND_DEBUG env set
Comment 3 emozdemir 2022-04-04 14:53:40 UTC
(In reply to David Edmundson from comment #2)
> Is Apex Legends running under xwayland?
> 
> If so can you get output where kwin has the KWIN_XWAYLAND_DEBUG env set

It's under "X11 Client Windows" so i assume it is running under xwayland.

I couldn't manage how to get output with KWIN_XWAYLAND_DEBUG. If i put it on launch options game won't boot at all. If I'm doing something wrong please correct me. Also here is X11 Client Window outputs. https://imgur.com/a/7mUFNve
Comment 4 Bug Janitor Service 2022-04-19 04:35:03 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 5 emozdemir 2022-09-21 10:20:15 UTC
It works for me right now. Maybe someother bug fix did fix this one too.
Comment 6 Pollux 2023-09-11 04:48:04 UTC
This still happens on KDE plasma 5.27.7 in Wayland in apex legends  

Other desktop environments or tiling window managers don't have this issue under Wayland 

It happens randomly in game like other people have reported.

At first I thought it was my mouse but after trying x11 it didn't occur anymore but I would love to use Wayland as my main instead of x11 :)

If this could be fixed that would be awesome
Comment 7 emozdemir 2023-09-11 14:13:13 UTC
(In reply to Pollux from comment #6)
> This still happens on KDE plasma 5.27.7 in Wayland in apex legends  
> 
> Other desktop environments or tiling window managers don't have this issue
> under Wayland 
> 
> It happens randomly in game like other people have reported.
> 
> At first I thought it was my mouse but after trying x11 it didn't occur
> anymore but I would love to use Wayland as my main instead of x11 :)
> 
> If this could be fixed that would be awesome

Yes it started to show this behavior but not like before.
I suspect it's related to cursor's position and window focus but not sure. 
It could be that unknown input device again. Since it happens rarely testing it is hard.
It would be great if this bug won't resurrect again lol
Comment 8 Pollux 2023-09-12 12:42:27 UTC
Created attachment 161574 [details]
mouse cursor bug in apex under wayland kwin

as you can see here when i move my cursor down the bottom right i'm able to create the issue if i move quick enough when tabbing out, which from guess is the cursor is resetting to the center but the game reacts to it if the player is able to move out of the menu quickly enough.
Comment 9 Pollux 2023-09-12 12:55:17 UTC
also im able to push my cursor out of the window onto my other monitor in fullscreen if i flick my mouse hard enough lol
Comment 10 xdzzz 2023-10-12 01:38:55 UTC
This bug also happens for me consistently on 

Plasma 5.27.8
KDE Frameworks Version 5.110.0
Qt Version 5.15.10
Compositor: Wayland

https://www.youtube.com/watch?v=0p96iHa7mDI
Comment 12 dharam-gasala 2023-12-01 11:23:08 UTC
I was experiencing this bug in Apex Legends on Wayland as well. It happened when I started to use Proton-GE 8.x
Bug is present when using Steam's Proton 8 as well.
I just reverted to using Proton-GE 7.55 and it works fine. Not sure if it's a Wayland, KDE or Proton bug though, but seems that using Proton 7.55 makes the bug go away.
Comment 13 Yao Mitachi 2023-12-14 06:11:08 UTC
Tried Proton-GE 7.55, doesn't seem any different from Proton-GE 8.16. The issue happens with both when clicking onto the Final Fantasy XIV window.
Comment 14 Yao Mitachi 2024-01-20 02:47:55 UTC
This issue has been resolved for me in FFXIV by enabling the Wayland driver in Wine 9.0. I do not play Apex Legends, but I would bet that issue should be solved, too, so give it a try!

https://gitlab.winehq.org/wine/wine/-/releases/wine-9.0
Comment 15 xdzzz 2024-01-20 05:16:21 UTC
(In reply to Yao Mitachi from comment #14)
> This issue has been resolved for me in FFXIV by enabling the Wayland driver
> in Wine 9.0. I do not play Apex Legends, but I would bet that issue should
> be solved, too, so give it a try!
> 
> https://gitlab.winehq.org/wine/wine/-/releases/wine-9.0

Yao, I'm curious: is it possible to enable the Wayland driver with Proton in Steam?
Comment 16 Yao Mitachi 2024-01-20 07:54:02 UTC
(In reply to xdzzz from comment #15)
> (In reply to Yao Mitachi from comment #14)
> > This issue has been resolved for me in FFXIV by enabling the Wayland driver
> > in Wine 9.0. I do not play Apex Legends, but I would bet that issue should
> > be solved, too, so give it a try!
> > 
> > https://gitlab.winehq.org/wine/wine/-/releases/wine-9.0
> 
> Yao, I'm curious: is it possible to enable the Wayland driver with Proton in
> Steam?

You would have to download a Steam compatibility tool, such as: https://github.com/GloriousEggroll/proton-ge-custom

As far as I know there isn't yet a build of Proton that's rebased on Wine 9.0. I was using this: 

https://github.com/rankynbass/unofficial-wine-xiv-git/releases/tag/v9.0

but not as a compatibility tool, but as the Wine binaries used along with the rest of the compatibility tool, XIVLauncher-RB.

I used to run Steam in Wine before Proton was a thing. That might still be possible. Good luck.
Comment 17 Patrick Auernig 2024-03-02 17:27:57 UTC
I'm experiencing a similar issue in Warframe since updating to Plasma 6.0.
When I roll my system back to Plasma 5 everything works normally.

The issue goes away if I change the display mode as shown in the video, or when disabling one of my two screens through system settings and then enabling it again.

WARNING: be careful if you are prone to seizures or have motion sickness
https://www.youtube.com/watch?v=9wKei8hvvC0
Comment 18 Yao Mitachi 2024-03-02 18:11:53 UTC
(In reply to Patrick Auernig from comment #17)
> I'm experiencing a similar issue in Warframe since updating to Plasma 6.0.
> When I roll my system back to Plasma 5 everything works normally.
> 
> The issue goes away if I change the display mode as shown in the video, or
> when disabling one of my two screens through system settings and then
> enabling it again.
> 
> WARNING: be careful if you are prone to seizures or have motion sickness
> https://www.youtube.com/watch?v=9wKei8hvvC0
Comment 19 Oleh 2024-03-07 19:18:30 UTC
Same issue, randomly happens in Elden Ring. But in some game like Lethal Company camera just doesn't move instead
Comment 20 Oleh 2024-03-07 19:40:46 UTC
Link to the video for demonstration: https://www.youtube.com/watch?v=9Jnx5kf505U
Comment 21 Oleh 2024-03-08 18:54:01 UTC
Created attachment 166729 [details]
log woth debug

There is the log with KWIN_XWAYLAND_DEBUG env, approximate moment when the bug happened
Comment 22 David Edmundson 2024-03-11 10:13:10 UTC
*** Bug 482632 has been marked as a duplicate of this bug. ***
Comment 23 emozdemir 2024-03-11 11:53:23 UTC
I tested Apex Legends with the current KDE release in arch and didn't experience any cursor jumps. I recorded it all so you can check it here https://youtu.be/L4SqyzhR768
Comment 24 ernstp 2024-03-11 11:57:08 UTC
I had this problem with World of Warships the other day. I tried restarting the game several times and it happened every time.

Then I logged out and started a fresh session. Then it was working again.
Comment 25 Zesko 2024-03-16 18:09:05 UTC
* Did you disable KDE actions for screen corners?


* Try to disable many Desktop Effects, if the issue is gone?
Comment 26 hazelnot 2024-03-26 13:08:38 UTC
Seems to be the same issue as #483133. Disabling hot corners does not help, it seems to be focus-related as sometimes tabbing out and back in helps (often have to do this multiple times).
Comment 27 hazelnot 2024-03-26 13:09:08 UTC
*** Bug 483133 has been marked as a duplicate of this bug. ***
Comment 28 Patrick Auernig 2024-03-26 14:05:49 UTC
Switching to a different TTY (Ctrl+Alt+F2) and back fixes the problem for the current session.
Might also be worth noting that I'm using KMSCON instead of the default (which I think is getty).
Comment 29 ernstp 2024-03-26 15:13:46 UTC
I asked Xaver about it, and he suggested applying a patch and looking if there was a difference when it works vs. didn't work.
https://invent.kde.org/plasma/kwin/-/merge_requests/5422#note_900469

I haven't had time myself yet.