Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mouse spinning in games #4015

Open
jabuxas opened this issue Dec 1, 2023 · 34 comments
Open

Mouse spinning in games #4015

jabuxas opened this issue Dec 1, 2023 · 34 comments
Labels
bug Something isn't working

Comments

@jabuxas
Copy link

jabuxas commented Dec 1, 2023

Hyprland Version

Hyprland, built from branch HEAD at commit 9afdd61 (props: bump ver to 0.32.3). Tag: v0.32.3 flags: (if any) debug

Bug or Regression?

Bug

Description

Mouse spins in games and camera is unusable, just moving a bit moves the camera around a whole lot. Gamescope fixes it, but I experience a lot of input lag using gamescope.

How to reproduce

I think it has got to do with having a multi-monitor setup, not really sure apart from that. Sometimes I just leave the window in another workspace and then come back and the mouse is bugged. Other times, just moving my mouse to the 2nd monitor and then coming back bugs out.

Crash reports, logs, images, videos

showing bug: https://youtu.be/KsKSGZCjw6g

@jabuxas jabuxas added the bug Something isn't working label Dec 1, 2023
@vaxerski
Copy link
Member

vaxerski commented Dec 1, 2023

does zis happen on sway?

@jbalme
Copy link

jbalme commented Dec 1, 2023

Confirming it happens for me in 0.30.0 in FFXIV.

@h0tc0d3
Copy link

h0tc0d3 commented Dec 1, 2023

@vaxerski I have this error in overwatch 2, 1 monitor. As I understand, the event occurs only when some application blocks the input device (for example, mouse control software), and the mouse temporarily stops transmitting position data, i.e. the mouse is busy processing codes from the control software, and does not send data about the mouse displacement. For example, for Razer mice the device is blocked for 30ms, because any request, for example changing DPI, requires processing of the request by the mouse processor, and this does not happen immediately. Probably, if the input device does not respond for a short time, then CInputManager::simulateMouseMovement is probably triggered, and then the InputManager stops processing some of the events from the mouse. I also noticed that my cursor is very nervous and moves in place, I solved this by removing the CInputManager::simulateMouseMovement call and replacing vec() with goalv() in https://github.com/hyprwm/Hyprland/blob/main/src/managers/input/InputManager.cpp
I've never had anything like this in sway.

@phonetic112
Copy link
Contributor

sometimes this happens to me in beamng, usually just wiggling around the window a bit fixes it

@jabuxas
Copy link
Author

jabuxas commented Dec 27, 2023

happens on monster hunter world as well. wiggling the window works if the game is running in windowed mode, but if it runs in windowed mode it doesn't automatically get 1920x1080 resolution even when fullscreening the window.

@MightyPlaza
Copy link
Contributor

happens on monster hunter world as well. wiggling the window works if the game is running in windowed mode, but if it runs in windowed mode it doesn't automatically get 1920x1080 resolution even when fullscreening the window.

does fakefullscreen/nofullscreenrequest/nomaximizerequest make any differnece?

@jabuxas
Copy link
Author

jabuxas commented Dec 27, 2023

it doesn't seem to make any difference with fullscreening the window originally windowed, the then fullscreened window is still with black borders on some sides. (example with warframe)
image

about the mouse spin, it doesn't seem to be happening anymore, but it's kinda random. i put all of the 3 options on the games, i'll try for a bit and if it doesn't happen anymore and if it's considered a fix, i'll close.

edit: nvm, still happening.

@led0nk
Copy link

led0nk commented Feb 6, 2024

I kind of got the same issue.
I use a multi-monitor setup and randomly sometimes after i switched from a game to another browser workspace my mouse sensitivity is like 10 times as high as before.

On top of that i got the issue that i cannot 360 my cameraview in e.g. Ark SE and the camera sometimes stutters like it went upside down.
Maximized-window-modus, window-modus etc. doesn't make any difference.

@quadbyte
Copy link

quadbyte commented Feb 6, 2024

I'm affected too. It happens about 20% of the time after I launch Overwatch 2, sometimes it's easy to fix (getting in the menus doing a few mouse move and clicks). Sometimes it's super difficult to get the focus back. Have not found a proper way to fix it.

When it's happening the character is looking straight up to the ceiling and any touch of the mouse will make it spins super fast.

@MoonBurst
Copy link

Yeah, this issue, and poor grouping (which can be mostly fixed by hy3) are the main things keeping me off Hyprland. The spinning when I'm in games. I can't figure out exactly what causes it, nor a solid fix though. As far as I can guess, it has something to do with alt+tabbing out, and maybe multi-monitor.

@jabuxas
Copy link
Author

jabuxas commented Feb 21, 2024

it is multi monitor related, but it's hard to reproduce consistently, sometimes it happens on its own, sometimes i change workspaces a lot and then it happens, sometimes it doesn't happen at all.

@Enovale
Copy link

Enovale commented Mar 7, 2024

I get this problem as well with overwatch 2, ffxiv, and lethal company as well iirc.

It happens regardless of the window mode (windowed, fullscreen, borderless) but sometimes fixes if i change between them (At random) and resize the window a bunch in floating mode (still only randomly fixes it).

Also even if its fixed it will sometimes start happening again after a focus change, especially using a hotkey to switch to the workspace from a different workspace.

EDIT: I forgot to mention that this is NOT fixed with gamescope for me. It often works for a little while and then happens with gamescope anyway.

@tchofy
Copy link

tchofy commented Mar 7, 2024

I wonder if #4889 fixed this issue or changed the behavior. Is anyone on a -git build able to replicate this?

@quadbyte
Copy link

quadbyte commented Mar 7, 2024

I'm on a -git build of hyprland that I update daily.
Situation has slightly improved lately, it happens less frequently.
But the bug it's still there, I got it two days ago.

Is there any log we could turn on or provide, to help pin pointing the issue ?

@Enovale
Copy link

Enovale commented Mar 7, 2024

I'm also on -git and get it at least once a day if I'm gaming.

@quadbyte
Copy link

For what it's worth, I also have the issue with KDE Plasma 6, playing OW2.

@h0tc0d3
Copy link

h0tc0d3 commented Mar 21, 2024

For what it's worth, I also have the issue with KDE Plasma 6, playing OW2.

Sway does not have this problem and I use native wayland in wine 9.0 to play Overwatch 2, maybe this is a xwayland bug.

@Enovale
Copy link

Enovale commented Apr 2, 2024

This bug report describes the exact issue and it apparently got fixed in kwin: https://bugs.kde.org/show_bug.cgi?id=482476
It seems to possibly have been handled by this commit: https://invent.kde.org/plasma/kwin/-/commit/630ba5fab4b02c2b496553c79d4a315da9271b53

@MROvaiz
Copy link

MROvaiz commented Apr 14, 2024

Having same issue with all COD Series and NMS as of now which i have tested.
Facing this for 1 year now.

@vaxerski
Copy link
Member

please check with above

@JonathanMathBoi
Copy link

Running on the git AUR version rn, and that seems to have fixed the problem for me. Thanks.

@vaxerski
Copy link
Member

@jabuxas can this be closed?

@MROvaiz
Copy link

MROvaiz commented Apr 16, 2024

It's Still spinning in NMS, I'm on latest version

[mro@nixbin:~]$ hyprctl systeminfo Hyprland, built from branch at commit 9a66514e26319e41c8661f57097a73b1c8579ccf (). Date: 2024-04-16 Tag: , commits: @COMMITS@

Here link, https://www.youtube.com/watch?v=kFkrFvZnCng

@jabuxas
Copy link
Author

jabuxas commented Apr 17, 2024

seems fine by me

@MROvaiz
Copy link

MROvaiz commented Apr 17, 2024

Can you or anyone check with NMS(no man's sky)

@gulafaran
Copy link
Contributor

i cant get it to spin in NMS

@MROvaiz
Copy link

MROvaiz commented Apr 17, 2024

it still spins for me, little stable spin if i move my mouse.
it follows extra long where i move.
Newly recorded video
https://youtu.be/zZUhFm4Vj0c

@MROvaiz
Copy link

MROvaiz commented Apr 19, 2024

Last update from me, It's working.
Problem with Lutris or wine, i checked in steam as non steam game with proton 8.
It's working smoothly, No issues so far 3 hours playing. Please close this.

Thank you.

@jabuxas jabuxas closed this as completed Apr 19, 2024
@Nama
Copy link

Nama commented Apr 29, 2024

I still have this issue on 0.39.1 in overwatch D:
Using steam version.

Problem with Lutris or wine, i checked in steam as non steam game with proton 8.

What?

@bljordan
Copy link

This problem still exists on hyprland-0.42.0. I've tested running from Steam and Lutris with the same results.
Gamescope may fix the problem but introduces other stability issues.

The problem does not exist in wayland Gnome for me.

Should I make a new issue or can we reopen this one?

@bljordan
Copy link

I've confirmed disabling the second monitor fixes this.
monitor=DP-2,disable

Obviously not a great solution, but confirming it is related.

@Nama
Copy link

Nama commented Aug 29, 2024

Didn't have any second monitor enabled while gaming, still occurred.

@lpuv
Copy link

lpuv commented Oct 24, 2024

Unfortunately still occurs for me.

@sr-tream
Copy link

Hello, have same or similar issue - resolved by disabling explicit sync for me (nvidia gpu)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests