Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

Mouse spinning in games

Open jabuxas opened this issue 1 year ago • 15 comments

Hyprland Version

Hyprland, built from branch HEAD at commit 9afdd61adeaf413afbe853dbc5fdf6853c8bde21 (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 avatar Dec 01 '23 00:12 jabuxas

does zis happen on sway?

vaxerski avatar Dec 01 '23 01:12 vaxerski

Confirming it happens for me in 0.30.0 in FFXIV.

jbalme avatar Dec 01 '23 02:12 jbalme

@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.

h0tc0d3 avatar Dec 01 '23 03:12 h0tc0d3

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

phonetic112 avatar Dec 01 '23 07:12 phonetic112

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.

jabuxas avatar Dec 27 '23 00:12 jabuxas

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?

MightyPlaza avatar Dec 27 '23 00:12 MightyPlaza

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.

jabuxas avatar Dec 27 '23 01:12 jabuxas

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.

led0nk avatar Feb 06 '24 17:02 led0nk

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.

quadbyte avatar Feb 06 '24 17:02 quadbyte

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.

MoonBurst avatar Feb 20 '24 23:02 MoonBurst

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.

jabuxas avatar Feb 21 '24 00:02 jabuxas

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.

Enovale avatar Mar 07 '24 03:03 Enovale

I wonder if https://github.com/hyprwm/Hyprland/pull/4889 fixed this issue or changed the behavior. Is anyone on a -git build able to replicate this?

tchofy avatar Mar 07 '24 07:03 tchofy

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 ?

quadbyte avatar Mar 07 '24 12:03 quadbyte

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

Enovale avatar Mar 07 '24 18:03 Enovale

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

quadbyte avatar Mar 21 '24 12:03 quadbyte

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.

h0tc0d3 avatar Mar 21 '24 13:03 h0tc0d3

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

Enovale avatar Apr 02 '24 19:04 Enovale

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

MROvaiz avatar Apr 14 '24 14:04 MROvaiz

please check with above

vaxerski avatar Apr 15 '24 16:04 vaxerski

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

JonathanMathBoi avatar Apr 15 '24 23:04 JonathanMathBoi

@jabuxas can this be closed?

vaxerski avatar Apr 16 '24 00:04 vaxerski

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

MROvaiz avatar Apr 16 '24 16:04 MROvaiz

seems fine by me

jabuxas avatar Apr 17 '24 01:04 jabuxas

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

MROvaiz avatar Apr 17 '24 05:04 MROvaiz

i cant get it to spin in NMS

gulafaran avatar Apr 17 '24 07:04 gulafaran

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 avatar Apr 17 '24 13:04 MROvaiz

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.

MROvaiz avatar Apr 19 '24 18:04 MROvaiz

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?

Nama avatar Apr 29 '24 20:04 Nama