ValveSoftware / csgo-osx-linux

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

UI Element Updates Cause Hitching #2657

Open viasux opened 3 years ago

viasux commented 3 years ago

Your system information

Please describe your issue in as much detail as possible:

Hello! I have encountered an issue with consistent frame hitching. I use a surf timer plugin on my CS:GO community server, and, only on the linux version, there seems to be an issue where the game hitches (at a consistent interval) as soon as you leave the start zone. I believe this may have something to do with the info screen (screenshotted below) updating at a fast rate, however I'm not sure why this happens. This doesn't happen in normal gameplay/on other servers that don't have the HUD element updating/on windows for me either.

UPDATE: The issue is related to the HUD element. Surfing without the timer activated does not cause the hitching. This issue DOES happen on other servers, if they update the same HUD element.

image

Steps for reproducing this issue:

  1. Join server (my server ip is 173.230.156.220:27015 in case you need to test.)
  2. Exit the cksurf start zone (start surfing)
  3. observe game consistently hitching.

I created a log, showing the hitching with mangohud. The smooth parts at the beginning and the end of the graph are when the UI element is not being updated. https://flightlessmango.com/games/4777/logs/1400

henrym11106 commented 3 years ago

I'm having the same problem on two Linux machines, both with AMD GPUs (R9 380 and R9 390). I have not tested Nvidia. the same hardware running Win10 (dual-boot) does not have this issue.

interestingly, only specific timers cause problems. other third-party timer HUDs I've used are trouble-free.

on the Horizon servers the hitching is unbearable. connect 104.153.108.23:27015 is one such server. fortunately I have no problem surfing with the timer display disabled, I have a bind to show/hide it. speed messages in chat are wonderful btw. also this is not improved by fps, it's still horrible above 1000fps with the timer visible.

most surf servers I've been on are ok. the differences I notice between timers that run well and Horizon:

the hitches do seem to happen whenever a character changes. stand still while the timer is stopped and there is no hitching. below: HSTimer=Horizon timer, SurfTimer is on an eGO server that runs fine. Screen_2021-03-09 11:02:43 Screen_2021-03-09 11:02:30

edit: the aim_bots map also has this problem; anytime a challenge is running the timer causes hitching and lag. meanwhile the yprac bot arena runs fine.

henrym11106 commented 3 years ago

Correction: some of the timers are only almost trouble-free. the SurfTimer displays that run well cause a very small amount of hitching on my computers but it's slight enough that I didn't notice until I went looking for it.

the yprac bot arena timer (which is just plain text on screen, pic below) does seem fine though. looks like only the more complex hud elements with text, icons and translucent backgrounds cause trouble. 20210310131737_1

and here's aim_botz. same info box hud element, same hitching issue when active: 20210310131949_1

henrym11106 commented 3 years ago

looks like this might be related to disproportionate CPU usage by the Panorama hud. running low graphics with fps_max 0 my framerate dips with every update of the round timer in the regular hud while standing idle in a CPU-bound scenario. perhaps Panorama is forcing a full redraw for every character that is updated and it's using the CPU for everything. this does not appear to happen on Win10.

henrym11106 commented 2 years ago

This issue does not appear to be present with the Vulkan renderer

viasux commented 2 years ago

This issue does not appear to be present with the Vulkan renderer

I thought vulkan was default?