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

Game: cursor warps to center when it's near screen edges #6078

Closed
krims0n32 opened this issue May 15, 2024 · 10 comments
Closed

Game: cursor warps to center when it's near screen edges #6078

krims0n32 opened this issue May 15, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@krims0n32
Copy link

Hyprland Version

System/Version info
Hyprland, built from branch makepkg at commit 94c20a186372aace78b188842848b873eb3ebbd7  (primary-selection: move to hyprland impl).
Date: Wed May 15 00:13:35 2024
Tag: v0.40.0-87-g94c20a18, commits: 4693

flags: (if any)


System Information:
System name: Linux
Node name: nyx
Release: 6.8.9-arch1-1
Version: #1 SMP PREEMPT_DYNAMIC Thu, 02 May 2024 17:49:46 +0000


GPU information: 
03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 31 [Radeon RX 7900 XT/7900 XTX/7900M] [1002:744c] (rev c8) (prog-if 00 [VGA controller])
19:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Raphael [1002:164e] (rev c9) (prog-if 00 [VGA controller])


os-release: NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=archlinux-logo


plugins:

Bug or Regression?

Bug

Description

Game is Star Citizen, running in Wine. Fullscreen mode or borderless window.

When you move the mouse to the screen edges, the cursor is being warped to the center of the screen, except for the upper edge (I have two monitors above the one I game on). See video.

I'm trying to pinpoint if this is a game/wine issue or a Hyprland thing. It is affected by Hyprlands mouse acceleration setting, when enabled (default settings) the issue happens even before hitting the screen edges. With acceleration disabled you get the behaviour in the video. It only happens when using "interaction mode", it doesn't happen in the games' options menu for example.

I've been trying various Hyprland options, no_warps and off_window_axis_events have no effect.

Maybe this is related to #6035 ?

How to reproduce

Let me know what I can do to debug this issue :)

Crash reports, logs, images, videos

sc-cursor-warp.webm
@krims0n32 krims0n32 added the bug Something isn't working label May 15, 2024
@ssvx
Copy link

ssvx commented May 15, 2024

+1

I need at least these to get the cursor in SC not rubberbanding or jumping "on click/scroll mouse inputs":

sensitivity = 0
accel_profile = flat

While that fixes the warp issues it leaves me with broken hover features and non-selectable/-clickable ui elements. In the center of the screen there seems to be a box in which dragging items behaves differently (drag ghost outline visible inside box, not outside). There's all kinds of funky stuff and within a rootful and -host-grab Xwayland session i noticed that toggling grab (ctrl+shift) switches between the two observed modes of broken (click-jumpy-cursor vs edge-pan-jump and no-hover).

@krims0n32
Copy link
Author

Here are the relevant hyperlogs of opening the interaction menu, then hitting the screen edge (surface gets removed, cursor warps to center).

[LOG] cursorImage request: surface 597a964ecf90
[LOG] Registered signal for owner 59790cdf57e0: 597a964ed2a8 -> 59790cdf5860 (owner: CWLSurface)
[LOG] Registered signal for owner 59790cdf57e0: 597a964ed268 -> 59790cdf58c8 (owner: CWLSurface)
[LOG] CWLSurface 59790cdf57e0 called init()
[LOG] Registered signal for owner 0: 597a964ed268 -> 59790c2900d8 (owner: CPointerManager)
[LOG] Registered signal for owner 597a9855b680: 597a98558028 -> 597a9855b688 (owner: CRenderbuffer)
[LOG] Callback 597a9855b6b0 -> 597a9855b6a8, CRenderbuffer removed.
[LOG] Registered signal for owner 597a9855b680: 597a98565218 -> 597a9855b688 (owner: CRenderbuffer)
[LOG] Callback 597a9855b6b0 -> 597a9855b6a8, CRenderbuffer removed.
[LOG] Registered signal for owner 597a9855b680: 597a9855d378 -> 597a9855b688 (owner: CRenderbuffer)
[LOG] Callback 597a9855b6b0 -> 597a9855b6a8, CRenderbuffer removed.
[LOG] Registered signal for owner 597a9855b680: 597a98558028 -> 597a9855b688 (owner: CRenderbuffer)
[LOG] Callback 597a9855b6b0 -> 597a9855b6a8, CRenderbuffer removed.
[LOG] Registered signal for owner 597a9855b680: 597a98565218 -> 597a9855b688 (owner: CRenderbuffer)
[LOG] Callback 597a9855b6b0 -> 597a9855b6a8, CRenderbuffer removed.
[LOG] Registered signal for owner 597a9855b680: 597a9855d378 -> 597a9855b688 (owner: CRenderbuffer)
[LOG] Callback 597a9855b6b0 -> 597a9855b6a8, CRenderbuffer removed.
[LOG] cursorImage request: surface 0
[LOG] Callback 59790c290100 -> 59790c2900f8, CPointerManager removed.
[LOG] Callback 59790cdf5888 -> 59790cdf5880, CWLSurface removed.
[LOG] Callback 59790cdf58f0 -> 59790cdf58e8, CWLSurface removed.
[LOG] CWLSurface 59790cdf57e0 called destroy()
[LOG] cursorImage request: surface 597a964ecf90
[LOG] Registered signal for owner 59790cdf57e0: 597a964ed2a8 -> 59790cdf5860 (owner: CWLSurface)
[LOG] Registered signal for owner 59790cdf57e0: 597a964ed268 -> 59790cdf58c8 (owner: CWLSurface)
[LOG] CWLSurface 59790cdf57e0 called init()
[LOG] Registered signal for owner 0: 597a964ed268 -> 59790c2900d8 (owner: CPointerManager)
[LOG] Registered signal for owner 597a9855b680: 597a9636cc98 -> 597a9855b688 (owner: CRenderbuffer)
[LOG] Callback 597a9855b6b0 -> 597a9855b6a8, CRenderbuffer removed.
[LOG] Registered signal for owner 597a9855b680: 597a9855d218 -> 597a9855b688 (owner: CRenderbuffer)
[LOG] Callback 597a9855b6b0 -> 597a9855b6a8, CRenderbuffer removed.
[LOG] Registered signal for owner 597a9855b680: 597a9658fe68 -> 597a9855b688 (owner: CRenderbuffer)
[LOG] Callback 597a9855b6b0 -> 597a9855b6a8, CRenderbuffer removed.
[LOG] Registered signal for owner 597a9855b680: 597a9608edc8 -> 597a9855b688 (owner: CRenderbuffer)
[LOG] Callback 597a9855b6b0 -> 597a9855b6a8, CRenderbuffer removed.
[LOG] Registered signal for owner 597a9855b680: 597a9855d218 -> 597a9855b688 (owner: CRenderbuffer)
[LOG] Callback 597a9855b6b0 -> 597a9855b6a8, CRenderbuffer removed.
[LOG] Registered signal for owner 597a9855b680: 597a9658fe68 -> 597a9855b688 (owner: CRenderbuffer)
[LOG] Callback 597a9855b6b0 -> 597a9855b6a8, CRenderbuffer removed.

@Rcomian
Copy link

Rcomian commented May 25, 2024

I'm also having trouble in hyprland with star citizen. for me it's warping to the bottom right corner whenever i interact with a 2D design element. so inventory management is a pain, as is selecting lift destinations, as is vehicle management etc.

it isn't a problem on other window managers like plasma. sadly running Xwayland in full screen with a different window manager causes other unrelated issues, like not responding until the mouse hits the edges in fps mode or not capturing the mouse at all in fps mode so that it runs away onto my second screen.

(actually scratch that, plasma wayland is waaaay worse, pinning the mouse entirely in the bottom right, X11 window managers are better).

@krims0n32
Copy link
Author

I have zero issues with the mouse cursor anymore in Star Citizen. Not sure what fixed it.

@ssvx
Copy link

ssvx commented Jul 18, 2024

I have zero issues with the mouse cursor anymore in Star Citizen. Not sure what fixed it.

Great. For me nothing changed ¯_(ツ)_/¯

@krims0n32
Copy link
Author

Sucks. I have nothing special in my Hyprland config anymore when it comes to mouse sensitivity or warp settings. You can try tweaking mouse sensitivity in SC though. I am using Lutris, with latest Wine as runner and mouse warping disabled. I use arch btw.

@ssvx
Copy link

ssvx commented Jul 19, 2024

I'll try some more. Didn't get it to run through vanilla Wine yet, only wine-ge 8.26 and wine-lutris-GE-proton 8.26 and such. Need to check if there's an update for them.

Runner options | Mouse Warp Override : disable
System options | Enable Gamescope: off

Relating hyprland.conf
input {
follow_mouse = 0
mouse_refocus = 0
float_switch_override_focus = 0
sensitivity = 0
accel_profile = flat
}
cursor {
no_hardware_cursors = true
no_warps = true
}

Issues are:

  1. in inventory cursor warps to the center when touching screen edges
  2. in inventory holding RMB doesn't let me pan around the character (workaround: while holding RMP edge panning works)
  3. in inventory no items on the character can be hovered (workaround: induce issue 1 and keep dragging off-screen to make the cursor warp location slowly creep to the desired item, then it highlights and can be dragged by clicking anywhere in the environment)
  4. view doesn't pan when holding F so elements like cockpit knobs can't be interacted with (workaround: enter free look, know exactly where to look, then hold F (and instantly move mouse, else view snaps back to center)
  5. holding F and scrolling forward to zoom in or scroll elevator panels up sends the look direction flying (chance: ~30%)
  6. click and hold to enter qt jump warps the virtual joystick to the lower right (chance ~5%)

It's playable but pretty annoying. I'll check again if vanilla Wine works now and if there's updates to the runners that i can get through lug-helper...

@krims0n32
Copy link
Author

Your config looks similar to mine. I had most of these issues as well. Might indeed be the vanilla wine then that fixes things 🤞

@ssvx
Copy link

ssvx commented Jul 19, 2024

Vanilla Wine 9.13 just gives me a JavaScript error.
image

But i fear this goes quite off-topic now.. 👀

/edit/update
Oh, i enabled CLI mode and the JavaScript error is gone. SC launches fine and i don't have ANY of the previously mentioned issues anymore.

THANKS @krims0n32 for sticking around, isolating the difference. This is awesome! \o/

@krims0n32
Copy link
Author

Woop woop!

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

3 participants