Proton icon indicating copy to clipboard operation
Proton copied to clipboard

[General issue] Mouse stuck/unusable in games on Wayland

Open AQDuck97 opened this issue 11 months ago • 26 comments

Compatibility Report

  • Name of the game with compatibility issues: Every game
  • Steam AppID of the game: N/A

System Information

  • GPU: RTX 3080
  • Video driver version: Nvidia 550.54
  • Kernel version: 6.7.8-Zen Arch
  • Link to full system information report as Gist: Gist
  • Proton version: 8

I confirm:

  • [X] that I haven't found an existing compatibility report for this game.
  • [X] that I have checked whether there are updates for my system available.

Symptoms

Mouse unusable in most games as it's completely stuck at the center or corner of the screen. Some games the menu works fine. A bug report was also created on KDE's bugzilla page, but I'm not sure if this is a KDE, Wayland or Proton bug. I found some very old reports from years ago that mentions VRR to be the cause, however, disabling that doesn't help. I checked and confirm that I have no controller plugged in (the game glyphs also don't change, keyboard works fine)

Steam overlay works perfectly fine

Reproduction

Launch a game through Proton on Wayland in Plasma 6 Get past the menu if it works, try to move mouse while playing the game.

steam-1091500.log

AQDuck97 avatar Mar 08 '24 18:03 AQDuck97

Same on Plasma 6 at least on HellDivers 2. Not sure if it's a Plasma bug or a proton issue. Running on an AMD RX 580.

RodoMa92 avatar Mar 08 '24 20:03 RodoMa92

Someone on Steam said that it works in gamescope by adding --force-grab-cursor I'm on Nvidia so can't really try it myself unfortunately.

AQDuck97 avatar Mar 09 '24 02:03 AQDuck97

I have the same issue with Unity based games running in Steam on KDE/Plasma-6/Wayland. This makes Planet Crafter and Valheim unusable games as of today. I have CPU Brand: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz "Arch Linux" (64 bit) Kernel Name: Linux Kernel Version: 6.7.9-arch1-1 Steam Runtime Version: steam-runtime_0.20240304.79797 Proton Experimental Video Card: AMD AMD Radeon RX 6700 XT (radeonsi, navi22, LLVM 17.0.6, DRM 3.57, 6.7.9-arch1-1)

Interesting clue: I find that switching KDE at login to run Plasma/X11 and all the games work fine. The failures only occur when I switch to Plasma/Wayland[my normal choice]. This did not happen 2 days ago.

dakohler avatar Mar 09 '24 22:03 dakohler

I can confirm --force-grab-cursor works. Interestingly, however, is that reverting to Proton 8 did not fix it, only the gamescope flag did. Tested on Wayland Gnome.

flavionm avatar Mar 10 '24 15:03 flavionm

I have the same in most games like Horizon Zero Dawn, Wither3, No Mans Sky. Its a plasma 6 bug, specific kwin bug

demanuPL avatar Mar 10 '24 23:03 demanuPL

~~Did a system update yesterday and seems to be working now on Arch, I'm still on qt 6.6.2.~~

Ignore that, stopped working again

AQDuck97 avatar Mar 11 '24 15:03 AQDuck97

Same here, system update fixed, thanks guys.

boaglio avatar Mar 13 '24 01:03 boaglio

I'm going to do some extensive testing tomorrow, I feel like there's something I do in Plasma that breaks the mouse in games. Maybe it's overview or the "new" cube or something.

AQDuck97 avatar Mar 13 '24 01:03 AQDuck97

Ok, I have absolutely no idea what's causing it, but I was able to reproduce it once today.

Things I tried (Cyberpunk 2077):

[Before starting game]:

  • Switched desktop
  • Used the cube
  • Used desktop "grid" (which is no longer a grid, but that's an unrelated bug)
  • Launched application dashboard (another monitor)
  • Locked the screen
  • Suspended the system
  • Entered tiling editor
  • Moved Steam to different desktop
  • Clicked on the desktop and another monitor while the game was launching
  • Used a custom shortcut (Alt+R) for a script that runs a pretty niche screen recorder called "GPU-Screen-Recorder" (this one did coincide with the mouse locking up ingame, but only once so probably just coincidence. It captures directly from the GPU, and the GPU used to render the game is a different one)

After a reboot I redid the above but in backwards order (and the GSR scripts a few extra times to make sure)

[After starting the game]:

  • Used the cube and overview (switched desktop)
  • Started GSR script
  • Launched application dashboard
  • Saved GSR clips (another script)
  • Clicked the screen and random keys while I still saw the breeze cursor

I was unable to reproduce it after the reboot, I got nothing other than it's definitely still here. It does seem to be partly fixed in some update however, as rebooting did nothing before.

AQDuck97 avatar Mar 13 '24 13:03 AQDuck97

After system update a few hours ago, I started testing to see if the problem still persisted.

When I login to KDE with Plasma/X11 the problem does not exhibit at all.

When I logout and relog with Plasma/Wayland the problem appears in Valheim and The Planet Crafter: i.e. After game launches and saved game session is resumed, moving the mouse left/right/up/down has no visual action in either game other than a tiny wiggle. So I am unable to use the mouse to target objects in either game.

As mentioned before these are both Unity3D games running under Steam on Linux. I always force compatibility mode with Proton Experimental. I have tested with and without game mods but see no difference.

I have a HiDPI screen as my primary screen, so Steam does not handle the higher resolution well; the Steam Library tab window has text size that is far to small to read comfortably. So for some months now I have launched steam with the arguments '%U -forcedesktopscaling=2.0. This has worked fine and makes the Steam windows readable.

As a test to eliminate this factor, I stopped Steam and restarted without the forcedesktop argument. Steam restarted with ultra-small characters on my primary screen, but when I launch the two test games mentioned above, the games appear normally and work correctly. Hopefully this info will help others find and fix the underlying problem(s)

dakohler avatar Mar 13 '24 15:03 dakohler

I think the problem is back, at least with From Software games (Dark Souls 3, Sekiro)

Operating System: Arch Linux KDE Plasma Version: 6.0.2 KDE Frameworks Version: 6.0.0 Qt Version: 6.6.2 Kernel Version: 6.7.9-arch1-1 (64-bit) Graphics Platform: Wayland

boaglio avatar Mar 14 '24 23:03 boaglio

I have bean having the same problem too on helldivers 2, I first thought it was a game bug, but after testing X11 I now know its not, its super annoying and weird as it sometimes does it sometimes doesn't, all i know is the issue does not exist on X11.

Operating System: KDE neon 6.0 KDE Plasma Version: 6.0.2 KDE Frameworks Version: 6.0.0 Qt Version: 6.6.2 Kernel Version: Linux 6.5.0-25-generic Graphics Platform: Wayland

mooseh avatar Mar 15 '24 09:03 mooseh

Same problem here. Mouse works fine on X11. With Wayland mouse only works in the game menu of Helldivers 2.

Operating System: Arch Linux KDE Plasma Version: 6.0.2 KDE Frameworks Version: 6.0.0 Qt Version: 6.6.2 Kernel Version: 6.7.9-arch1-1 (64-bit) Graphics Platform: Wayland

Graphics Card: Nvidia GeFOrce RTX 3080

--force-grab-cursor does not fix this for me.

FabulousSoldier avatar Mar 16 '24 11:03 FabulousSoldier

Kerbal Space Programm 2 ist also affted by this with Wayland and KDE 6.02.

ManuGithubSteam avatar Mar 17 '24 22:03 ManuGithubSteam

for anyone who is stuck with this issue, please follow this as a workaround solution, hopefully a full fix will come in the future, this will fix it by wrapping the game in the gamescope micro-compositor

  • firstly you will need to install gamescope https://github.com/ValveSoftware/gamescope if you are using a ubuntu distro such as myself (kde neon 6) then i strongly suggest getting the deb from here: https://github.com/akdor1154/gamescope-pkg/releases/tag/v3.12.5-2

  • once you have installed gamescope test it is installed by running gamescope --help you should see a help output.

  • update your command against your game like so: click Library -> right click your chosen game -> properties, you should see a launch options box, here is an example command implementing the --force-grab-cursor flag as mentioned by @AquaDuck97

gamescope --force-grab-cursor -w 1920 -h 1080 -H 1440 -f -F fsr %command%

please also note the command above is optimized for a radeon card, for a 30 series nvidia or higher you will be better off with

gamescope --force-grab-cursor -w 1920 -h 1080 -H 1440 -f -F nis %command%

lastly do not use the -b flag in gamescope it will make your mouse click in the wrong places, hope this helps anyone avoid the painful process i had to follow to get this working.

mooseh avatar Mar 19 '24 13:03 mooseh

I haven't been able to reproduce it again yet, oddly enough.

RodoMa92 avatar Mar 19 '24 18:03 RodoMa92

Could give some upgrade to this issue. And my finding regards to it.

  • Running plasma under wayland
  • With plasma 5.27.9-1 (aka plasma 5) had 0 issues with mouse not working
  • Upgraded system and got Plasma 6. Mouse issues started to happen
  • Managed to get rid of mouse not working issues one time by dropping vsync off (Which i had on) and adjusting my framecap to 75 which is my monitors freesync framerate. However after i launched the game today method i mentioned didn't fix the mouse anymore. No upgrades were done between.
  • Running on gamescope seems to fix the mouse for now. Thou i prefer playing without gamescope
  • Without gamescope mouse seems to work fine within menus. But the issue is that i cannot mouse look normally when ingame. Character view is locked to stagnated position

Dehir avatar Mar 22 '24 12:03 Dehir

This will probably be fixed with the upcoming 6.0.3 release of kwin. I've applied the change to kwin 6.0.2 and the issue was gone in all cases I previously saw it (e.g. Helldivers 2, Witch it, Enshrouded).

Athemis avatar Mar 25 '24 10:03 Athemis

I can confirm that this is also happening on Hyprland, so it is NOT a KDE bug.

It might have to do with the vulkan-radeon driver as I didn't have this issue on Hyprland before installing that. It happens on both the Nvidia GPU and Radeon GPU after installing the vulkan-radeon driver.

AQDuck97 avatar Apr 26 '24 19:04 AQDuck97

Can confirm as well, running arch and hyprland, having issues with general mouse weirdness. It stopped after uninstalling vulkan-radeon.

FelipeAfonso avatar May 03 '24 16:05 FelipeAfonso

My wife has this problem with Kubuntu 24.04 and Proton, doesn´t use steam though! System becomes unusable, reboot and it works fine again. She thinks it happens mostly when working in LibreOffice Calc

MrM3ph avatar Jun 04 '24 09:06 MrM3ph

Someone on Steam said that it works in gamescope by adding --force-grab-cursor I'm on Nvidia so can't really try it myself unfortunately.

Thank you for this 😁. This removed the erratic camera problem I had in Sleeping Dogs using gamescope.

Wartybix avatar Jun 11 '24 03:06 Wartybix

Same issue here, even when using gamescope with nvidia launch options suggested above: gamescope --force-grab-cursor -w 1920 -h 1080 -H 1440 -f -F nis %command%

entailz avatar Jun 13 '24 05:06 entailz

Hitting this bug as well well launching steam itself within gamescope from the tty.

nlgranger avatar Aug 25 '24 14:08 nlgranger