ValveSoftware / Proton

Compatibility tool for Steam Play based on Wine and additional components
Other
23.86k stars 1.04k forks source link

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

Open AQDuck97 opened 6 months ago

AQDuck97 commented 6 months ago

Compatibility Report

System Information

I confirm:

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

RodoMa92 commented 6 months ago

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.

AQDuck97 commented 6 months ago

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.

dakohler commented 6 months ago

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.

flavionm commented 6 months ago

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.

demanuPL commented 6 months ago

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

AQDuck97 commented 5 months ago

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

boaglio commented 5 months ago

Same here, system update fixed, thanks guys.

AQDuck97 commented 5 months ago

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 commented 5 months ago

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]:

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]:

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.

dakohler commented 5 months ago

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)

boaglio commented 5 months ago

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

mooseh commented 5 months ago

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

FabulousSoldier commented 5 months ago

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.

ManuGithubSteam commented 5 months ago

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

mooseh commented 5 months ago

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

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.

RodoMa92 commented 5 months ago

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

Dehir commented 5 months ago

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

Athemis commented 5 months ago

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

AQDuck97 commented 4 months ago

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.

FelipeAfonso commented 4 months ago

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

MrM3ph commented 3 months ago

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

Wartybix commented 2 months ago

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.

entailz commented 2 months ago

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%

nlgranger commented 1 week ago

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