ValveSoftware / csgo-osx-linux

Counter-Strike: Global Offensive
http://counter-strike.net
787 stars 69 forks source link

Wayland SDL shows cursor and hits window limits #3856

Open VolRen-ShYK opened 1 month ago

VolRen-ShYK commented 1 month ago

Your system information

I'm using CS 2 natively under wayland. After the last big update it became unplayable. Before this update I was playing quietly for almost a year.

Steps for reproducing this issue:

  1. Go to the game folder and modify cs2.sh. Specifically change x11 to wayland
  2. Go to any server
  3. Sad. :(

UPDATE

This has been happening since the last 4GB CS 2 update, which was released on October 3. When logging into the server I now have a cursor on the screen at all times that restricts mouse movement, meaning I can't turn the mouse further than the cursor, once the cursor touches the edge of the screen there is no way to turn further.

I tried to play on xwayland, but there I often drop fps, also the scope in the game behaves strangely, as if it floats.

https://github.com/user-attachments/assets/2ee6bd52-7977-43c6-bf38-9cee51f4d846

kisak-valve commented 1 month ago

Hello @VolRen-ShYK, sorry, but you haven't effectively communicated what the issue is that makes the game unplayable for you. Please adjust your opening post to clarify what issue you're seeing and use a more descriptive title, then give me a ping to re-evaluate.

In general, altering cs2.sh and using SDL's wayland backend is not expected to be supported at this time.

VolRen-ShYK commented 1 month ago

@kisak-valve

kisak-valve commented 1 month ago

Hello @icculus, this issue report might be interesting to you, but I don't know the internal details to confirm.

firashacker commented 1 month ago

i had the same issue where the game keeps the cursor on the screen inside the match and you can't exceed screen border limits while you try turning around because the cursor gets blocked by the screen edges

ZeroYamaoka commented 1 month ago

@kisak-valve hes mean this

https://github.com/user-attachments/assets/6d41189c-eca4-463e-b0c1-3afb2c08dc4d

@VolRen-ShYK reminder Zrzut ekranu_20241011_122924 That means Source 2 still didnt support wayland in 100 %

VolRen-ShYK commented 1 month ago

@ZeroYamaoka Yeah, I realize that. But I wouldn't have written about it if this problem hadn't come up recently. I've been playing smoothly for the whole of this year.

ParadoxLeon commented 1 month ago

I'm having the same issue. before the armory update I had no issues using wayland.

playing on x11 is garbage having 200fps and it feels like 60

dyingwillow commented 1 month ago

same here, KDE Plasma 6.2 on Fedora 40. when switched to Wayland from X11, cursor is visible and stuck in the window limits, but the X11 performance is so flaky that it's still unplayable (for me, atleast)

Fxzzi commented 1 month ago

Can confirm this issue. With Wayland enabled since one of the recent updates, mouse cursor is visible in game and mouse can hit the limits of the window and block further movements, stopping you from looking around fully.

Edit: for now, I've opted to use gamescope with SDL video driver set to x11. This allows me to use stretched resolution correctly without black bars.

firashacker commented 3 weeks ago

i have this issue as well

this need to be fixed since wayland works way better than x11 for some users

VolRen-ShYK commented 3 weeks ago

@kisak-valve I apologize for the inconvenience, but wanted to ask you if there has been any progress in resolving this error?

firashacker commented 3 weeks ago

@kisak-valve I apologize for the inconvenience, but wanted to ask you if there has been any progress in resolving this error?

its still the same

Fxzzi commented 2 weeks ago

Issue still here after latest update

dineshdevkota001 commented 1 week ago

Seems to be related to the mouse_lookup update, maybe. Tested with -vulkan flag and without; same problem. Decreased the mouse speed in the compositor and it decreases sensitivity in game. So, it seems like SDL is not force-grabbing the cursor from the compositor. The compositor seems to be responsible to pass input events to the game.

Cg1340 commented 1 day ago

translated from Chinese

So when will Source 2 support Wayland? XWayland has been underperforming.

XWayland: about 150fps with stuttering Wayland: 230 ~ 250fps