gamescope icon indicating copy to clipboard operation
gamescope copied to clipboard

Cursor not locking (not respecting --force-grab-cursor)

Open HaydenBat opened this issue 1 year ago • 13 comments
trafficstars

When using --force-grab-cursor, the cursor is initially grabbed until another window or workspace is interacted with, then the cursor is not locked when back in gamescope. Without the --force-grab-cursor argument, the issue was still present, some games fixing the problem by opening and closing the pause menu, others not. There is also a window border which was not present beforehand, but probably irrelevant.

  • OS: Arch Linux
  • Kernel: 6.8.9-zen1-1-zen
  • Hyprland latest git
  • Using latest git - aur gamescope-git package

https://github.com/ValveSoftware/gamescope/assets/65262176/56fe3ed6-1378-43cc-8246-5113a0af8178

HaydenBat avatar May 06 '24 08:05 HaydenBat

I have the same issue still, Final Fantasy XIV basically became unplayable for me since I can't reliable move with mouse only and i keep getting turned around and running the wrong way.

It even used to work correctly without --force-grab-cursor

cptn-cosmo avatar May 06 '24 14:05 cptn-cosmo

I found similar issues here https://github.com/ValveSoftware/gamescope/issues/1181 and here https://github.com/hyprwm/Hyprland/issues/5076 , but these were fixed using --force-grab-cursor which doesn't work.

HaydenBat avatar May 06 '24 21:05 HaydenBat

I don't think this is our bug, it works on every other compositor I tested just fine.

misyltoad avatar May 06 '24 22:05 misyltoad

I am using niri on archlinux and it worked fine until the last package update (3.14.3). i have since switched to the -git version and it is still broken for me

cptn-cosmo avatar May 07 '24 07:05 cptn-cosmo

https://github.com/ValveSoftware/gamescope/assets/7382310/0671b1d3-ed35-4da1-93de-a210ce3ba357

Here is an example i recorded, at first just left clicking and the camera moving without input, which happens twice at the start of the video, then i walked around a bit and it happened with both left & right click simultaneously as well at the end of the video. This was working fine in a previous release of gamescope with the same compositor, unfortunately I did not take note of the version that was last working.

cptn-cosmo avatar May 07 '24 16:05 cptn-cosmo

Same here on archlinux using plasma6 wayland session. From version 3.14.3 onwards --force-grab-cursor doesn't work anymore.

lodriguez avatar May 10 '24 19:05 lodriguez

Hi I have the same problem in War Thunder. I use Arch with Plasma 6, Wayland and dual monitor.

I have managed to find a workaround like a user sugested in ProtonDB.

So I downloaded an older version and downgraded the package with: pacman -U

So far everything it worksfine, maybe it also works for the version 3.14.2.

JechtShinryaku avatar May 16 '24 01:05 JechtShinryaku

I found similar issues here #1181 and here hyprwm/Hyprland#5076 , but these were fixed using --force-grab-cursor which doesn't work.

I can confirm that since that hyprland issue has closed, any gamescope release past 3.14.3 has broken --force-grab-cursor for me

bfalk8 avatar May 16 '24 02:05 bfalk8

Turns out my issue was a Hyprland one. Downgrading to Hyprland 0.39.1 looks to have fixed the issue for me. Sorry for the inconvenience. Looks like others in this issue seem to be having slightly different problems so I'll leave this open for now as theirs still fit the title description, unless anyone wants otherwise. Thanks for the help.

HaydenBat avatar May 17 '24 08:05 HaydenBat

Looking into this currently. More info in https://github.com/hyprwm/Hyprland/issues/6159.

The-Briel-Deal avatar May 22 '24 03:05 The-Briel-Deal

Looking into this currently. More info in hyprwm/Hyprland#6159.

It's not only Hyprland, Plasma6 as well. 3.14.2 is the last working Version.

Edit: Looks like it works again for me. Using Lutris with UMU (gamescope 3.14.29).

lodriguez avatar May 25 '24 14:05 lodriguez

Encountering this under X11 running KDE Plasma 6.1.0, did previously work on Plasma 6. Seems to happen when games allow cursor movement like in menus. For War Thunder this is a problem, it never tries to bind the cursor properly on linux, previously gamescope resolved this, now its unusable on linux again :(

Gamescope version 3.14.18-2.git.20240528.420eb91.fc40

tannertechnology avatar Jun 28 '24 09:06 tannertechnology

why isn't there a simple hotkey like SUPER+G available for forced mouse grab beside "Super + G toggle keyboard grab" ???? I can't understand. Shall i create a PR?

DocMAX avatar Jan 02 '25 00:01 DocMAX

I just had this show up for me after upgrading from 3.16.1 to 3.16.3.

After downgrading back to 3.16.1 --force-grab-cursor works for me.

Edit: I am using Wayland KDE on Manjaro Linux

LJ-Software avatar Apr 13 '25 01:04 LJ-Software

Can confirm, was having this issue with xcom2, downgraded from .3 to .1 and now it captures cursor correctly.

jarrard avatar Apr 15 '25 14:04 jarrard

Same.

Gigantoad avatar Apr 17 '25 22:04 Gigantoad

3.16.2 also works. (Arch + hyprland)

codevski avatar Apr 18 '25 09:04 codevski

Still broken in 3.16.4 as well.

jarrard avatar Apr 18 '25 09:04 jarrard

Since this will be a year old in a few days I'd like to chip in as well.

I can confirm that 3.16.4 is broken. I can confirm that 3.16.2 does work.

Using:

Operating System NixOS 25.05
KDE Plasma Version 6.3.4
KDE Frameworks Version 6.13.0
Qt Version 6.9.0
Kernel Version 6.14.2 (64-bit)
Graphics Platform Wayland
Processors 8 × Intel® Core™ i5-9300H CPU @ 2.40GHz
Memory 15,5 GiB of RAM
Graphics Processor 1 Intel® UHD Graphics 630
Graphics Processor 2 NVIDIA GeForce GTX 1650 with Max-Q Design

jiriks74 avatar Apr 20 '25 21:04 jiriks74

Maybe will need to do a debug between these versions ourself to find the exact bit of code that does it, then produce a fix patch ourselves. I've done it once before years ago, going to need to relearn how to do it as I forgot, pretty basic github stuff but!

jarrard avatar Apr 20 '25 21:04 jarrard

The most recent issue in 3.16.4 has been bisected to https://github.com/ValveSoftware/gamescope/issues/1806#issuecomment-2791215115

matte-schwartz avatar Apr 20 '25 21:04 matte-schwartz

Neat, yeah bisect is what I was searching for.

Hope a fix can be found then.

jarrard avatar Apr 20 '25 21:04 jarrard

Can confirm this on CachyOS with version 3.16.4

kekonn avatar Apr 23 '25 15:04 kekonn

Can confirm on Arch with Snowbreak. The --force-grab-cursor doesn't help. KDE Plasma + Wayland

morti86 avatar Apr 27 '25 10:04 morti86

Can confirm on Bazzite version 42. The --force-grab-cursor doesn't help on this OS either. KDE Plasma + Wayland

OriginalAlienOne avatar May 09 '25 00:05 OriginalAlienOne

Can confirm on Nobara 42 with KDE Plasma and Wayland: Issue exist on 3.16.4-2 and 3.16.4-1. Downgrading to 3.16.2-1 fixes the issue.

BigFatWizard avatar May 11 '25 13:05 BigFatWizard

Can confirm on Bazzite/Arch/EndeavourOS, downgrading to 3.16.2-1 fixes the issue.

Mondrethos avatar May 13 '25 05:05 Mondrethos

the fix for this landed in the latest release

matte-schwartz avatar May 14 '25 15:05 matte-schwartz

Anyone have a chance to test this?

Mondrethos avatar May 19 '25 22:05 Mondrethos

Well I've been using 3.16.9 and it seems to be working again.

jarrard avatar May 19 '25 22:05 jarrard