ValveSoftware / steam-for-linux

Issue tracking for the Steam for Linux beta client
4.26k stars 174 forks source link

[xwayland] cursor does not reset to center in games #10901

Open madness742 opened 6 months ago

madness742 commented 6 months ago

Your system information

Summary of the issue

https://github.com/ValveSoftware/steam-for-linux/assets/170082508/765e0f4a-8163-424c-8c56-1e31b68a91a8

When opening a menu in a game, the mouse isn't always reset to center, it will if the camera angle in-game doesn't change and the menu is closed and reopened. It feels inconsistent and I'm often looking for my cursor on screen. It also makes the use of the buy menu in Counter Strike 2 very tedious and impractical.

This only happens when Steam games are running on Wayland, starting a X11 session from SDDM solves this issue. The only game I was able to test outside of Steam was Minecraft through Prism Launcher, and that wasn't affected by this cursor reset bug.

Steam from Flatpak, OpenSUSE Tumbleweed and (k)Ubuntu all behave the same.

Steps for reproducing this issue:

  1. Launch a game from Steam (Proton/Native).
  2. Open up a menu where the cursor normally would be centered on the screen.
  3. Observe current cursor position.
  4. Exit the menu.
  5. Move mouse around in-game.
  6. Open up the menu again.
  7. Observe updated cursor position.

OBSERVED RESULT The cursor changes location when bringing up the menu after moving the camera angle in-game.

EXPECTED RESULT The cursor should be centered upon opening the menu after moving the camera angle in-game.

ADDITIONAL INFORMATION

All steam games I've tried so far are affected by this This does not happen when starting KDE in a X11 session from SDDM! Forcing Proton Experimental on two games in the list below solves the issue!

Affected games:


What I have tried:

SOFTWARE/OS VERSIONS Linux: OpenSUSE Tumbleweed (available in About System) KDE Plasma Version: 6.0.4 KDE Frameworks Version: 6.2.0 Qt Version: 6.7.0 Kernel Version: 6.8.9.1-default (64 bit)

Graphics: Device-1: AMD Navi 31 [Radeon RX 7900 XT/7900 XTX/7900M] driver: amdgpu v: kernel Device-2: AMD Raphael driver: amdgpu v: kernel Display: wayland server: X.org v: 1.21.1.12 with: Xwayland v: 23.2.6 compositor: kwin_wayland driver: X: loaded: modesetting unloaded: fbdev,vesa dri: radeonsi gpu: amdgpu,amdgpu resolution: 1: 2560x1440 2: 1440x2560 API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 24.0.5 renderer: AMD Radeon RX 7900 XTX (radeonsi navi31 LLVM 18.1.5 DRM 3.57 6.8.9-1-default)

madness742 commented 6 months ago

This issue seems to have been fixed in-game, but the problem still occurs in steam overlay.