csgo-osx-linux icon indicating copy to clipboard operation
csgo-osx-linux copied to clipboard

3-5 FPS after playing 1 hour

Open maxekinge opened this issue 10 years ago • 36 comments

Huuuuge lags after playing 1-2 Competitive Games. Just restarting the game solves the problem, but its so annoying to leave Comp-Games!!! Usually playing with 150-250 FPS. But i recognized that if you lose focus on the game FPS drops to < 10 FPS.

Moreover the Game seems to have a lot more FPS when switching to this: screenshot

Distribution: Ubuntu 14.04 LTS CPU: AMD FX-8350 (4 GHz/Octa-Core) GPU: GTX 760 RAM: 12GB (1333 Mhz)

maxekinge avatar Jun 01 '15 20:06 maxekinge

For me it was the same, even after shorter times (a few minutes) until I disabled anti-aliasing completely - I have no idea what that could have to do with the powermizer though (I use an nvidia GTX 560 ti with 340.xx drivers). Now it happens only rarely - and not only that: I discovered that the more anti aliasing I have on the faster it happens, and turning it off doesn't seem to prevent it but makes it take like 6 hours w/o restart to happen. Very strange.

ghost avatar Jun 01 '15 22:06 ghost

Are you using the latest available driver version?

davidw-valve avatar Jun 01 '15 22:06 davidw-valve

I don't know if you're talking to me or maxekinge, but I'm using the latest available proprietary nvidia driver from debian testing. I know that newer ones are out, but I generally stick to what testing provides for stability reasons.

ghost avatar Jun 01 '15 22:06 ghost

I would suggest using the latest available drivers, as they may have fixes to the problems you are experiencing.

davidw-valve avatar Jun 01 '15 22:06 davidw-valve

The thing is, I always doubted that the problem is the graphics driver beacause in Dota 2, the problem never occured (while it did in TF2, which is maybe interesting). So it appeared to me as a fault in the games, not the driver. But I'm going to try out the newest (346.72) driver anyway just to be sure.

ghost avatar Jun 01 '15 23:06 ghost

Different games can exercise your graphics hardware in different ways. Some might exercise a troublesome code path while others may not. Getting the latest version of the driver is the normal first step of investigating an issue like this.

davidw-valve avatar Jun 01 '15 23:06 davidw-valve

Im currently using "NVIDIA binary driver - version 352.09 from nvidia-352 (open source)"

Moreover my installation is not very old (less than a month). Had previously the same problem and I thought reinstalling Ubuntu would solve the problem but it doesn't.

I’m still guessing that this has to do with window focus (not 100% sure) because like i said earlier if the game is not in the foreground (for example when i switch to TS3 or any other application) it seems to have low FPS too. (Need to compare those frame rates).

BTW: I'm running the game in 'Fullscreen' mode. Not in 'Windowed Fullsceen'

Hope this is helpful ;)

maxekinge avatar Jun 03 '15 06:06 maxekinge

This seem similar to a few other issues listed here that we have when playing the game for an extended period of time.

The issue first arose for me around October last year (I'm running Arch and an nvidia 760 all up to date). The game goes to around 1fps and this affects the entire gui. If I open glxgears then I get something like 0.1 fps, scrolling stutters etc. As soon as I quit the game it fixes itself, starting the game again resets how long till it will break.

Playing on community servers with more players or faster respawns causes it to happen faster. So a 30 player ffa deathmatch only takes about 20 minutes before it happens.

I suspect it is an nvidia issue that only CSGO seems to trigger. Bisecting their driver might help?

john-banks avatar Jun 03 '15 23:06 john-banks

Maybe someone didn't filled the destructor of some objects and that is causing an overflow of some kind. ;) But my game don't have any RAM-Problems so far.

maxekinge avatar Jun 05 '15 09:06 maxekinge

Next time the game is running slowly, could you run glxgears and see what frame rate you get out? It doesn't seem related to system memory but it might be a gpu memory leak?

john-banks avatar Jun 05 '15 10:06 john-banks

Yes. I will also check my GPU-Memory (maybe it ran full and used systemmemory instead? - which is much slower)

Gonna tell you the result when I'm back home (edit this comment)

Hope you can fix this prolem soon ;)

EDIT: Today I randomly found "/etc/security/limits.conf". (in a forum) but could this fix the problem?

maxekinge avatar Jun 05 '15 10:06 maxekinge

I can confirm it isn't a RAM problem, at least not for me, since the game doesn't use much more memory than normal when it happens (and I still have a few gigabytes left free)

ghost avatar Jun 05 '15 14:06 ghost

Ah I noticed something that I hadn't before. If I switch to the lowest resolution the game fixes itself, I can set it back to 1080p but it will then happen again within about 5 minutes.

latest-screenshot

Look at that, gpu usage 99% and PCIe bandwidth 99%.

How on earth is it using 99% of the PCIe bus? Something must be going very, very wrong for that to happen? Is csgo flooding the gpu somehow? If the gpu mem maxes, would the pcie bus be used to swap memory in and out to cope?

If I keep using the change resolution trick it eventually segfaults: [220715.148132] csgo_linux[4722]: segfault at 0 ip (null) sp 00000000ffc4315c error 14 in csgo_linux[8048000+1000]

john-banks avatar Jun 06 '15 14:06 john-banks

Sorry i hadn't time yet to give you my results, but does this problem only occurr with GTX 760 graphiccards?

maxekinge avatar Jun 08 '15 08:06 maxekinge

I found some related threads/issues showing this issue goes back to 2013, isn't limited to CSGO and affects a wide range of nvidia hardware.

The recent(ish) possibly related issue for CSGO is: https://github.com/ValveSoftware/Counter-Strike-Global-Offensive/issues/269 https://devtalk.nvidia.com/default/topic/813720/linux/gtx970-346-35-amp-346-47-linux-mint-17-1-steam-csgo-segfaults-during-play-crash-the-game/1/ https://devtalk.nvidia.com/default/topic/823726/linux/performance-drops-after-some-time-kde5-and-unity-/

The older issues showing it goes back to 2013:

Unigine - https://devtalk.nvidia.com/default/topic/657364/331-20-performance-drop-when-vram-full-pcie-bandwith-utilization-exceeds-nvrm-errors/ TF2 - https://devtalk.nvidia.com/default/topic/529521/linux/lasting-reproducible-frame-rate-drop-to-7fps-on-gtx-560-ti-313-18-driver/1/ TF2 - https://github.com/ValveSoftware/Source-1-Games/issues/23 L4D2 - https://github.com/ValveSoftware/Source-1-Games/issues/465

Other than Unigine it seems to only affect source games and is triggered when gpu memory usage nears 100%. Source might be causing the leak, it would be very useful it there was a way to flush the gpu memory without restarting the game.

john-banks avatar Jun 08 '15 10:06 john-banks

To confirm this is a gpu leak in CSGO (or somewhere down the pipeline) I played DM and typed memory in console every few minutes while monitoring nvidia-settings for gmem usage.

The graphics memory in CSGO remained constant at around 700MB. It dropped after map change then sat around 700MB. The whole time the memory in nvidia-settings increased until reaching around 92% (1900MB) at which point the game seg faulted csgo_linux[22906]: segfault at 0 ip 00000000f33dc00b sp 00000000ec82ee70 error 6 in libtier0_client.so[f33c8000+29000]

As soon as it seg faulted gpu memory dropped to around 300MB. No idea why sometimes it drops the fps to < 1fps and other times seg faults immediately.

john-banks avatar Jun 08 '15 18:06 john-banks

Could this be worse on a GTX970 because of the 3.5 vs 4.0 GB issues?

bsuttonq avatar Jun 09 '15 23:06 bsuttonq

@bsuttonq I cannot confirm this but at least it would make sense.

I decided to turn of Anti-Aliasing (it was simply so annoying to leave all the matches). And luckily I didn't see a difference. Quite strange right? There seems like to be an issue with Anti-Alias in general. If all source games have similar problems like we found out, the issue might be in the Source-Enginge. Or in the NVIDIA/OpenGL driver (but I don't have those issues in other non-steamgames.

maxekinge avatar Jun 10 '15 20:06 maxekinge

@maxekinge You say you didn't see a difference when turning off anti aliasing, so did you mean it didn't help? Because the rest of your post implies it actually did.. or am I understanding something wrong here?

ghost avatar Jun 10 '15 22:06 ghost

Well in the first moment I thought that I don't see a difference. There is one! Sorry :)

maxekinge avatar Jun 11 '15 18:06 maxekinge

Same problem here. Very high gpu memory and pcie bus usage. bildschirmfoto_2015-06-26_13-34-30

Maybe its related to mat_queue_mode. When setting mat_queue_mode to 0 I get lower fps but the huge lag after some time playing disappears.

0xBADEAFFE avatar Jun 26 '15 11:06 0xBADEAFFE

I used to start the match with 120 fps and after 6 rounds I was down to 20. But that was a long time ago, because I have found a fix:

  1. All you need to do is buy the latest Operation and 3<-- Sticker Capsules from the Market. Then you must open them in less than a minute. It works better if you are streaming the whole thing.
  2. Well done! The memory leaks should be gone now and chickens should spawn on every map!

ghost avatar Jul 01 '15 16:07 ghost

ceLoFaN, dont forget the music kit fix.

spychodelics avatar Jul 01 '15 20:07 spychodelics

btw, i have the same problem since the last patch in March 2015 / April 2015. And to be honest, the game is getting worse with every update.

spychodelics avatar Jul 01 '15 20:07 spychodelics

I think if Valve wants to release their upcoming Steammachines successfully they have to fix that.

Also - Ok this might be a bit offtopic - I think if Valve has to subsidize Linux/SteamOS games. If you have a shiny console that can only play a couple of games noone is interested in buying it. So first release as many games as you can on Linux and then release the Steammachine!

maxekinge avatar Jul 06 '15 12:07 maxekinge

I'm having this problem with the 352.21-1 driver on Arch Linux, though I've also had it on all previous versions. Someone suggested turning off multicore rendering and I did a comparison of RAM usage with/without. (I really regret not monitoring CPU usage or anything else at the same time!)

Comparison

It looks like disabling multicore rendering kept the RAM usage moderately stable, and the game lasted longer without crashing. It only crashed with multicore enabled, with it disabled I just stopped monitoring after a while.

Manypopes avatar Jul 07 '15 19:07 Manypopes

@Manypopes @LollenJumplan I have disabled all anti aliasing now and the problem is mostly fixed and I can play for hours. I initially disabled just one of the anti aliasing options (can't remember which, but it was the top one...) and that didn't seem to help so it might be just related to the other option, need to test a bit more.

The problem now is how horrible the game looks with jaggies everywhere. You forget how much of an impact it has until it's gone.

@davidw-valve It looks like we actually have somewhere to focus on now, is there anything we can do to help you narrow this down?

john-banks avatar Jul 08 '15 09:07 john-banks

I have 2GB VRAM in my GTX 770. When AA is turned on, it slowly starts to fill until it it's completely full and framerate drops to under 10 fps. VRAM doesn't get cleared even inbetween matches. No problems when AA is turned off. I've had this problem as long as I've played the game (late 2014).

Blodoffer avatar Jul 19 '15 10:07 Blodoffer

This issue affects my system aswell, using a single nvidia gtx760 with 358.09 proprietary drivers on fedora 22, it appears to have become rather frequent after disabling sli, but with sli enabled in AA mode, csgo has less 40fps, oh well you can't have everything :(

MaxPayneFH avatar Oct 26 '15 00:10 MaxPayneFH

Can someone please confirm that this issue still occurs with the 64 bit client?

Tele42 avatar Jun 25 '16 19:06 Tele42