ValveSoftware / csgo-osx-linux

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

Click inputs (Shooting, throwing/aiming grenades) frequently dropped many times per match seemingly randomly; X11 debugging shows the dropped inputs were seen. The player also rubber bands a lot without network issues (Observed on fibre) - particularly noticible if buying weapons while walking, but also randomly. #3651

Closed ipaqmaster closed 7 months ago

ipaqmaster commented 8 months ago

Your system information

https://gist.github.com/ipaqmaster/708df8db26013c6b54894020549eeb14

Please describe your issue in as much detail as possible:

Describe what you expected should happen and what did happen. Please link any large pastes as a Github Gist.

All month from early Feb 2024 CS2 has been dropping my mouse inputs during competitive MM. This has lead to countless entry frag encounters where I peak into an enemy and fire to defend myself, but the weapon does nothing. Countless more scenarios where I go to throw or aim a grenade (Pin pulled) but it also sits there as if I didn't click at all. This seems to frequently happens in moments where I have my crosshair over an enemy player.

I'm using a 1038:1838 (SteelSeries ApS SteelSeries Aerox 3 Wireless) and the issue persisted when wired. However, tests in later comments of this thread revealed that the X11 display server IS seeing the dropped inputs. Implying CS2 itself is dropping the clicks.

Steps for reproducing this issue:

  1. Start a comp match (Others have confirmed this issue is CS2-wide; not limited to competitive matches)
  2. Click a few times to check at any time (or go fight an enemy after the match starts)
  3. Notice weapons and utility grenades frequently don't react to mouse clicks countless times per match leading to a compromised gameplay experience despite best efforts and strategy. Noticeably this seems to happen a lot more frequently and worse when I'm pointing right at an enemy ready to act.
mackatozis commented 8 months ago

You'll observe identical behavior in any mode, not just limited to competitive. Give Deathmatch mode a try.

ipaqmaster commented 8 months ago

You'll observe identical behavior in any mode, not just limited to competitive. Give Deathmatch mode a try.

Sorry are you confirming that you experience this too and it's not just me?

For more information regarding this report

It happened many more times in a match I had just this past hour on Inferno today (CT start). It actually entirely stopped happening once we became T side halfway into the match.

The game version in the corner during this match was observed as Feb 08 18:07:47 - V 06-14-08-00-00 0:0:0:0:0 15-04-41 when I noted it down about halfway in.

This seems to be happening anywhere from 3-10 times in a single match. I will be click-spraying someone with say, a pistol and some of the clicks do not shoot. Or I will walk into someone at a common peak intersection (or behind them as a flank) and go to fire.. but my primary weapon does not start firing with my clicks/click-hold resulting in a late reaction once it eventually does start firing, or me dying as a result. Sometimes I will panic click trying to make the gun fire, bursts of a few clicks, and I will still die having not shot a single time where an AK could have emptied half a magazine.

My desktop (X11, LightDM, Xfce4) does not experience this leading me to believe this problem is limited to the game's input handling or a latent update (Rolling / Arch)

I have also noticed this week that CS2 is also logging frame rendering stutters around the 115ms range in the console as the game stutters sometimes. Also new to this week is that I will peak into an enemy ready to take them out but my character will rubber band a ton just before we fight confusing both parties. Multiple times a match - both of these problems never before seen and possibly related to this week's mouse input drops I've been experiencing.

This is on a fibre connection where ping-flooding my gateway with ping -i0.02 gateway in a terminal window shows no loss, latency spikes nor jitter when the game rubber bands my player. Leading me to believe something funky is going on either with a recent system update (rolling, Arch) or this CS2 build.

ipaqmaster commented 8 months ago

I quickly wrote this overcomplicated mess during my last comp match to try and see if my X11 server is actually registering my mouse events when these ignored-mouse-click situations happen in-game. The next match I play, I will run this at the same time and if a mouse input gets dropped, I will check the console window running this script to verify whether or not X registered a click event for that moment in time:

# cat ~/scripts/mouseWatch
#!/bin/bash
# Written: Sat 10 Feb 2024 12:49:50 AEDT
# This is to check if this mouse input problem is X11-wide or just CS2 having input troubles.

xinput test-xi2 --root |grep --line-buffered RawButtonPress | \
  while read line
  do
    now=$(date +%s)
    nowDate=$(date -d@${now})
    delta=$(((${now} - ${prev:-${now}})))
    # Make as many newlines as there were deltas to help break apart bursts of clicks visually.
    printf %${delta}s |tr " " "\n"

    prev=${now}
    echo -e "[${nowDate}]\t[${delta}]\t${line}"
  done

If the click event appears here after I watch my weapon not fire in CS2, that will confirm that it's not my mouse, its receiver or the display server. Limiting the impact to just CS2's window.

ipaqmaster commented 7 months ago

Using the above script I have confirmed that X is still receiving mouse inputs when my weapon doesn't fire. With that, it must be CS2 itself which is occasionally ignoring my clicks.

mackatozis commented 7 months ago

Sorry are you confirming that you experience this too and it's not just me?

Correct, I had the same issue. I managed to resolve it by doing the following:

Audio Settings

This helped a bit; I experienced fewer lags.

Game settings

This reduced the stutters even more, but I occasionally had moments where clicking MOUSE1 would not fire.

Steam Client Actions

Finally, what really helped was clearing the Shaders of the game.

Go to Steam -> Settings -> Downloads

Disable the option "Enable Shader Pre-Caching" and enable it again.

I also cleared the download cache.

After doing that, my game is more responsive, but I still get way lower fps than before.

My System Information in a gist.

ipaqmaster commented 7 months ago

Thanks for sharing these tips.

I've noticed cs2 compiles the shaders for a map as the player loads in which is nicer than Steam having to pre-compile everything (much more) regardless of what maps you will see any given evening. That said, I have conky running in the corner of my secondary monitor and my top five process list from it was showing an effectively idle system at the time of these input issues. Steam's fossilize_replay threads make themselves apparent when its working on shaders. I will disable Steam's shader pre-generation for CS2 anyway as it seems to be a thing of the past at least for this title.

It also appears the Xorg server I'm running here also saw the mouse clicks which leaves me thinking this is most likely something funky and new with this CS2 build. Steam's many fossilize_replay threads are easy to spot in the list maxing out the CPU when they're running and they were not running during these dropped input/rubber banding events.

The tick smoothing is a nice new feature but on a well capable PC here and fibre with seemingly no network problems on the LAN nor the uplink I'd rather avoid using the feature when everything here should be capable.

I find it interesting that you're experiencing this issue on Ubuntu which isn't rolling. Sometimes rolling packages can introduce quirks and my distribution here rolls. Maybe another pointer towards the CS2 update introducing something problematic.

Here is my own Steam System Information gist. It does seem we both have RTX cards in the 20XX series and are both running 4.6.0 NVIDIA 545.29.06 though I installed that back in late November so I doubt it's to blame for these recent issues.

mackatozis commented 7 months ago

Thanks for sharing your experience. This issue was introduced with the "A Call To Arms" update. I had no issues until February 6th, 2024.

ipaqmaster commented 7 months ago

Unbearable tonight. I cannot fire half of my rounds on pistol/eco rounds and had to second guess my grenade throw 'clicks' by holding the button uncertain of whether the pin will be pulled or not.

ipaqmaster commented 7 months ago

Just experienced a very frustrating round about 15 ignored clicks to throw nades and initiate enemy fire in a single moment resulting in a horrific gameplay experience and death from the game ignoring my inputs and no contribution to the round. That's enough of gambling with this bug. Ceasing gameplay until this is fixed.

FilterUnfiltered commented 7 months ago

I am also experiencing this issue, getting impossible to play. Was anything found as to why this actually happens?

ipaqmaster commented 7 months ago

Build Feb 15 18:24:56 is out and claims to address keyboard mapping issues with a heads up message to the player on first launch since updating.

This update also comes with a nice frame-time, ping and packet flow jitter counter top right which goes away in stable conditions. Very nice.


The mouse input dropping problem is still occurring. I can panic-click a grenade up to 11 times in a flurry and watch as my character does absolutely nothing with it. Same with firing weapons which is painful to watch as unfair deaths continue to pile up.

This can happen while the top right network/frame status indicator makes no appearance.


The "random latency spiking" problem is still occurring. I've noticed it the most as I'm buying my weapons while holding W down in "late to round" fashion, the purchasing of items seems to sometimes trigger this network problem in the game.

The top right network/frame status indicator is sometimes present during these moments.


Random long frame times are still happening as logged in the console (e.g. Excessive frame time of 102.26ms clamped. Acting as if the frame only took 100.00ms) while trying to play which is of course jarring to experience in MM.

Despite the desktop experience being flawless and other GPU-accelerated activities which utilize the card being perfectly fine (Granted cuda grunt-work is not latency sensitive like FPS frame timing)

ipaqmaster commented 7 months ago

It seems there are community posts also addressing these headaches: https://www.reddit.com/r/GlobalOffensive/comments/1am9fku/console_flooded_with_client_last_server_executed/

This one above demonstrates the "random" rubber-banding issue well graphically.

ipaqmaster commented 7 months ago

It may be a separate issue, but I've also noticed that if I buy items while w'ing towards my play area - each purchase causes my player to rubber-band as the purchase is made.

AzureWoof commented 7 months ago

My friend and I are also experiencing these issues, even on local servers with bots. I've seen countless people complain about this on Reddit as well. Nothing I have tried so far has fixed this. In the top right of my screen, with network settings enabled, I see something along the lines of "Slow server frametime" whenever I lag. It makes the game almost unplayable.

We're both running on Windows 11 (and both have the highest-end specs), so this definitely isn't an issue restricted to OSX and Linux.

AzureWoof commented 7 months ago

Something interesting I noticed is that these issues almost do not occur at all when there are no player entities in a match aside from yourself. Running a local server without bots almost completely eliminates the problem, aside from a few extremely minor stutters here and there that barely inhibit movement and aren't nearly bad enough to trigger the 100ms frametime warning.

Hoping this extra info can help get this resolved for good. I really wanna get into this game more, and this has been a pretty big roadblock.

ipaqmaster commented 7 months ago

Loaded into nuke this evening. More than 50% of my mouse inputs were ignored. Couldn't even change my clock's fire mode half of my right clicks for round 1.

I too find it very interesting how the mouse input drop problem seems to be directly 1:1 related to entities on the screen. In my experience for most of this, enemy entities. Though this experience just now as horrid with more than half my inputs being dropped, clicking mouse buttons among only team mates.

ipaqmaster commented 7 months ago

I hate to just complain. But this is so insanely unbearable to peak into people and not be able to attack them and die. Multiple times a match

death-ncn commented 7 months ago

My problem relates to weapons won't fire and grenades won't throw on Linux. No problem with network(paketloss etc.) / lagging / rubberbanding on my side. Can confirm ipaqmaster's theory (haven't found any better explanation) with relation to entities / opponents in direction of "sight". Walls don't matter in this case as it's more often happening in direction of spawn / rush / choke points. For example rush / choke point in-front (or behind wall) and no or only one opponent is visible but no shooting / knife / grenade throw possible. You can cycle through weapons and click as you like but nothing happens. If you turn around you can hold a grenade and turn back to the spot to throw it. But seriously this is no viable workaround (if you even live long enough for this performance).

Not much as a common denominator in hardware/software. Arch Linux: Linux 6.7.5, KDE 5.27.10 on X.Org, Ryzen 5800X3D, Radeon 6900XT on mesa 24.0.1, glibc 2.39, libinput 1.25.0, steam stable

jaxwilko commented 7 months ago

I'm seeing similar issues on Debian Sid, Gnome, Xorg, Nvidia GPU

ipaqmaster commented 7 months ago

Build Feb 16 15:04:58 - Weapon still fails to fire as I engage targets frequently resulting in frustrating outcomes.

ipaqmaster commented 7 months ago

Feb 28th 13:25:59 build - clicking issue persists. Still getting rubber-banded when buying items.

Tonight I find myself clicking the mouse over 15 times in a row in panic trying to make a grenade throw where I need coverage and the game refused to do so. After a 2 second pause I was able to throw it.

This bug seems to be at its absolute worst impact at points where CT & T intersect after a few minutes of no problem elsewhere. It almost feels like its giving away that I'm about to encounter an enemy. (Before promptly getting me killed)

vonclutch commented 7 months ago

Same for me, hero not responding command is the worst i've ever experienced

"Manjaro Linux" (64 bit) Kernel Version: 6.6.16-2-MANJARO X Server Vendor: The X.Org Foundation

Can the janitor do something plz

ipaqmaster commented 7 months ago

Patch Mar 01 09:50:62 unfortunately the dropped mouse click bug and buy-menu-purchase-rubber-banding bugs are both still present.

ipaqmaster commented 7 months ago

I finally found a consistency.

The problem only happens when you're pulling your mouse down. Which of course is something you'll be doing most frequently while trying to spray an enemy.

When I pull my mouse down and try clicking, none of the clicks register. But if I pull left, right or up, my held weapon or grenade work fine.

ipaqmaster commented 7 months ago

I think I've now pinned the cause or at least the interaction which shouldn't be happening. After that discovery I realized the issue kicks in after dragging the mouse from the centre of the screen (Where the game is supposed to be locking it, transparently) to the bottom of the display. About that much distance and I can no longer click in-game.

I then ran pkill panel to kill the xfce4-panel process which draws the panel at the bottom of the screen (Tray icons, start menu, horizontal list of open graphical programs) and the ability to intentionally cause this mouse problem by dragging down stopped happening.

I started xfce4-panel again and the issue came back when dragging down. My panel is configured to auto-hide when not in use so it only takes up maybe 2-4 pixels horizontally at the bottom of my display.

So I guess the workaround for me at least will involve killing the panel process during gameplay. I wouldn't recommend moving its position elsewhere because that's just asking for a different mouse direction (left, right, up) to cause this problem.

It seems something has recently changed either in CS2 or xfce4 which has caused the mouse to 'invisibly' sneak its way down to the desktop panel instead of being locked to the center of the screen like it's supposed to be. I will look into this more later (Trying older package versions, etc)

kisak-valve commented 7 months ago

Hello @ipaqmaster, that makes your issue a duplicate of #3566. Closing in favor of the older issue report.