ValveSoftware / csgo-osx-linux

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

High CPU usage regression with panorama #1736

Closed mlandalv closed 5 years ago

mlandalv commented 6 years ago

Your system information

Please describe your issue in as much detail as possible:

When launching with -panorama one core is constantly on 100%. That applies to both when in the menu (probably same as #1697) as well as when playing (couldn't find an issue for this).

I noticed there were activity in #1244 recently but I can't tell if this is HRTF related or not. I have the problem with both "Advanced 3D Audio Processing" on and off.

The problem goes away when removing -panorama from the launch options.

Steps for reproducing this issue:

  1. Launch with -panorama
  2. See one core constantly being 100%

Images

Without panorama no_panorama

With panorama panorama

lionblaze55 commented 6 years ago

Same exact issue here. It seems to add a bit of input lag as well as occasional game stutters even though the fps is minimally effected.

MaxXor commented 6 years ago

Maybe this has something to do with the issue I'm having. After ~3 games the CPU usage of csgo is so high that all I'm stuck with ~5 FPS and have to quit the game with ALT+F4 (happens only in panorama).

pbhj commented 6 years ago

Aye, I have the same issue, https://github.com/ValveSoftware/csgo-osx-linux/issues/1765.

One core (changes constantly) at 100%, CPU usage is much higher; memory usage is probably 1.5G higher.

Using " -scaleform" in launch options returns to former UI and works as normal for me.

mbugeia commented 6 years ago

I have the same issue, and the "-scaleform" launch option doesn't work anymore since the last update. For me, the high CPU usage makes the game almost unplayable. I sometimes drop under 20 fps in game.

Config : Ubuntu 18.04, Core i5-4440, GeForce GTX 1060 3GB

mlandalv commented 6 years ago

@mbugeia you can use -legacyscaleformui which still works. I presume they fix this before they remove the option to fall back to the old GUI.

tfaller commented 6 years ago

I have this issue as well. One core is always at 100% usage. Steam System Information It seems to affect AMD and Intel on the CPU side as well as AMD and Nvidia on the GPU side. Seems to be something general, nothing driver or device specific.

lionblaze55 commented 6 years ago

Issue still persists after various updates, only way to remove the CPU stress and in-game latency is to add the -legacyscaleformui command into the launch options. Hope this is fixed before the legacy option is removed!

g0ga commented 6 years ago

issue persists. archlinux, i5-2500, NVidia GF 950, one core is 100% always

xodotLBO commented 6 years ago

Had 300 fps with HD7850 oc 1gb card,now with 960 150 average (used hd7850 before panorama). Guess panorama f'd up a lot of stuff

xddj00 commented 6 years ago

The same problem: https://gist.github.com/xddj00/66c5148bf8bc1c968395f9efbdccdfe9

One core always at 100% -legacyscaleformui dont work.

xddj00 commented 6 years ago

note: -legacyscaleformui is not supported since the last Steam update (29/08/2018)

damianS7 commented 6 years ago

Same here, 1 core 100% and the others 50%

g0ga commented 6 years ago

decided to strace process a bit while it is in menu and loads CPU [root@home ~]# ps aux | grep -P '(2269|2270)' g0ga 2269 0.0 0.5 613692 131612 ? S 03:57 0:00 /home/g0ga/.local/share/Steam/ubuntu12_32/steam g0ga 2270 126 4.8 3437324 1188596 ? Sl 03:57 6:18 /home/g0ga/.local/share/Steam/SteamApps/common/Counter-Strike Global Offensive/csgo_linux64 -steam

result of # strace -p 2270 > 1.txt 2>&1

result of process strace 1.txt

kosshi-net commented 6 years ago

R5 1600 and a RX480 on Arch Linux with AMDGPU drivers, main menu runs at 50fps. Game stutters unbearably whenever theres any sort of GUI update in game. This is especially terrible in deathmatch when the invurnelability timer updates every 100ms, my framerate drops to 20. Enabling cl_draw_only_deathnotices fixes almost all the stutters.

Not entierly sure tho if this is panorama only for me, I didn't try cs on linux until recently.

bemug commented 6 years ago

@kosshishub this looks similar to 1788. Can you check if your symptoms are the same? I added a small video in description of mines in 1788.

I'll try cl_draw_only_deathnotices when I'll have the time.

xddj00 commented 6 years ago

I tried cl_draw_only_deathnotices but no change for me... Always one core at 100%

xddj00 commented 6 years ago

When will Valve do an update to correct this problem?

xddj00 commented 6 years ago

When will Valve do an update to correct this problem? capture d ecran de 2018-09-20 11-22-05

bemug commented 6 years ago

cl_draw_only_deathnotices seems to make the buy menu a bit less laggy.

kosshi-net commented 6 years ago

@bemug Yes, tab causes a terrible lagspike. Buy menu is unusable as well.

I'm interested in that deathmatch invurnelability timer, is that a issue unique to me?

xddj00 commented 6 years ago

I have no problem with the buy menu. Just a fall of fps during the game (20fps in some map, not all)

bemug commented 6 years ago

@kosshishub I just tried and I have the issue with deathmatch invulnerability timer.

@xddj00 Then these are 2 different issues, let's keep our issue is tracked in #1788. Sorry for the noise.

kisak-valve commented 6 years ago

CSGO burning CPU

Issue transferred from https://github.com/ValveSoftware/csgo-osx-linux/issues/1836. @844E posted on 2018-09-28T13:01:18:

Greetings!

Your system information

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.

Steps for reproducing this issue:

  1. Run CSGO.
  2. CSGO process is now burning a CPU core.

I attempted debugging of this problem, by executing these procedures: 1. Open the "system monitor" and extract the PID of CSGO 2. top -H -p [PID of CSGO] Extract the PID that is burning the CPU (Notice: This PID is normally not visible in the "system monitor") 3. (On Ubuntu, use "sudo") sudo gdb /path/of/CSGO/csgo_linux64 [Step #1 PID] 4. While being in GDB, write this command: info threads

GDB will enumerate CSGO-PID-s

  1. Find the thread with the Step #2 PID

What I receive:

14 Thread 0x7fc03d245700 (LWP 17909) "csgo_linux64" 0x00007fc056d1afa3 in __GI___pthread_mutex_lock (mutex=0x22a08a60) at ../nptl/pthread_mutex_lock.c:65

The function "pthread_mutex_lock" is the source of the CPU-burning?

--

In light of my experience with GNU/Linux programming I speculate, that the cause of the CPU-burning bug of the current CSGO-build must be the unaligned parameter. If the function "pthread_mutex_lock" takes a not properly aligned parameter, then it will do busy-waiting. 1

Regards,

lionblaze55 commented 6 years ago

Seems like users with all types of hardware are having this issue. I wonder if it's a general Linux issue or just specific cases... Maybe some people just aren't aware of it?

844E commented 6 years ago

correction:

sudo gdb /path/of/CSGO/csgo_linux64 [Step #1 PID]

g0ga commented 6 years ago

@844E i've given them strace with very similar information two weeks ago. they just don't care, there are less than 2% of linux users so why should they? :) as a workaround not to cause processor overheating i've limited its frequency from 2.5GHz to 2.1 which reduced processor temperature by 10*C without really noticable FPS drop.

844E commented 6 years ago

@g0ga

=\

Hopefully nevertheless the devteam will repair the game? m( )m

lionblaze55 commented 6 years ago

Well they will care, their whole steamplay push means Linux is steam's future. Just can't wait until that translates into higher priority patches 😀

xddj00 commented 6 years ago

@kisak-valve i'm not sure of what i need to do with gdb, look what i have now:

top - 10:37:01 up 1 day, 13:49, 1 user, load average: 2,11, 1,92, 1,45 Threads: 35 total, 1 running, 34 sleeping, 0 stopped, 0 zombie %Cpu(s): 36,8 us, 2,5 sy, 0,0 ni, 60,5 id, 0,0 wa, 0,0 hi, 0,1 si, 0,0 st MiB Mem : 7426,4 total, 229,8 free, 2645,4 used, 4551,2 buff/cache MiB Swap: 6030,0 total, 5831,0 free, 199,0 used. 4191,2 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
12810 slack 20 0 3312312 1,1g 235144 R 99,9 15,1 6:37.58 csgo_linux64
12711 slack 20 0 3312312 1,1g 235144 S 15,3 15,1 1:24.00 csgo_linux64
12829 slack 20 0 3312312 1,1g 235144 S 3,3 15,1 0:11.66 Video Decode Th
12831 slack 20 0 3312312 1,1g 235144 S 3,3 15,1 0:11.64 Video Decode Th
12780 slack 20 0 3312312 1,1g 235144 S 3,0 15,1 0:12.74 csgo_linux64
12834 slack 20 0 3312312 1,1g 235144 S 3,0 15,1 0:11.77 csgo_linux64
12830 slack 20 0 3312312 1,1g 235144 S 2,7 15,1 0:11.65 Video Decode Th
12832 slack 20 0 3312312 1,1g 235144 S 2,3 15,1 0:11.45 Video Decode Th
12819 slack 20 0 3312312 1,1g 235144 S 2,0 15,1 0:08.25 csgo_linux64
12779 slack 20 0 3312312 1,1g 235144 S 1,7 15,1 0:08.29 csgo_linux64
12820 slack 20 0 3312312 1,1g 235144 S 1,3 15,1 0:04.17 csgo_linux64
12801 slack 20 0 3312312 1,1g 235144 S 1,0 15,1 0:03.59 csgo_linux64
12818 slack 20 0 3312312 1,1g 235144 S 0,3 15,1 0:01.59 threaded-ml
12773 slack 20 0 3312312 1,1g 235144 S 0,0 15,1 0:00.85 csgo_linux64
12774 slack 20 0 3312312 1,1g 235144 S 0,0 15,1 0:00.25 csgo_linux64
12775 slack 20 0 3312312 1,1g 235144 S 0,0 15,1 0:00.24 csgo_linux64
12776 slack 20 0 3312312 1,1g 235144 S 0,0 15,1 0:00.29 csgo_linux64
12777 slack 20 0 3312312 1,1g 235144 S 0,0 15,1 0:00.00 disk_cache:0
12781 slack 20 0 3312312 1,1g 235144 S 0,0 15,1 0:00.00 disk_cache:0
12802 slack 20 0 3312312 1,1g 235144 S 0,0 15,1 0:00.31 csgo_linux64
12805 slack 20 0 3312312 1,1g 235144 S 0,0 15,1 0:00.12 csgo_linux64
12806 slack 20 0 3312312 1,1g 235144 S 0,0 15,1 0:00.11 csgo_linux64
12807 slack 20 0 3312312 1,1g 235144 S 0,0 15,1 0:00.11 csgo_linux64
12809 slack 20 0 3312312 1,1g 235144 S 0,0 15,1 0:00.00 V8 WorkerThread
12811 slack 20 0 3312312 1,1g 235144 S 0,0 15,1 0:00.11 csgo_linux64
12812 slack 20 0 3312312 1,1g 235144 S 0,0 15,1 0:00.00 csgo_linux64
12813 slack 20 0 3312312 1,1g 235144 S 0,0 15,1 0:00.00 csgo_linux64
12814 slack 39 19 3312312 1,1g 235144 S 0,0 15,1 0:00.00 PulseHotplug

Now in gdb:

slack@x552c:~$ gdb info threads GNU gdb (Debian 8.1-4) 8.1 Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from info...(no debugging symbols found)...done. /home/slack/threads: Aucun fichier ou dossier de ce type. (gdb) info threads No threads. (gdb) No threads. (gdb)

This don't work... Can you explain to me what i need to do with gdb please...

844E commented 6 years ago

ohh =o

On Ubuntu one must use "sudo" : sudo gdb /path/of/CSGO/csgo_linux64 [Step #1 PID]

I imagine, on Slackware one must use "su"? : su [your root password] gdb /path/of/CSGO/csgo_linux64 [Step #1 PID]

Without the root permission, the "info threads" can't show more PID?

844E commented 6 years ago

(So, to recap ... )

  1. Run CSGO, open "system monitor", note the CSGO-PID

my case: 29829

  1. Run this command, to get the sub-PID (of CSGO) of the CPU-burning thread: top -H -p [CSGO-PID from Step #1]

my case: top -H -p 29829

my output: 29934 myusername 20 0 3312412 1.014g 224320 R 99.7 7.4 0:43.79 csgo_linux64

my sub-PID: 29934

  1. GDB Apparently the root privilege is required

On Ubuntu use "sudo" : sudo gdb /path/of/CSGO/csgo_linux64 [Step #1 PID]

On another Linux-distro use "su" ? : su [your root password] gdb /path/of/CSGO/csgo_linux64 [Step #1 PID]

my case: sudo gdb "/media/ my dir /steamapps/common/Counter-Strike Global Offensive/csgo_linux64" 29829

  1. Skip the minor warnings. While being in GDB, write this command: info threads

A big list will be shown.

my big list:

................ 13 Thread 0x7f101ec66700 (LWP 29933) "V8 WorkerThread" 0x00007f10424886d6 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x2342a210) at ../sysdeps/unix/sysv/linux/futex-internal.h:205 14 Thread 0x7f101e465700 (LWP 29934) "csgo_linux64" 0x00007f1042fe9611 in pthread_mutex_unlock (mutex=0x234a7b80) at forward.c:194 15 Thread 0x7f101585d700 (LWP 29938) "csgo_linux64" 0x00007f1042485f85 in futex_abstimed_wait_cancelable (private=, abstime=0x7f101585cd90, expected=0, ................

  1. Find the thread with the Step #2 PID

my thread: 14 Thread 0x7f101e465700 (LWP 29934) "csgo_linux64" 0x00007f1042fe9611 in pthread_mutex_unlock (mutex=0x234a7b80) at forward.c:194

The source of CPU-burning is this function "pthread_mutex_unlock"?

I repeated the procedures -Step #3 onwards- and found this 14 Thread 0x7f101e465700 (LWP 29934) "csgo_linux64" 0x00007f1042482087 in __GI___pthread_mutex_lock (mutex=0x234a7b48) at ../nptl/pthread_mutex_lock.c:113

The source of CPU-burning is this function "pthread_mutex_lock"?


I speculate, the pthread functions somehow get set into fallback mode (i.e. using busy-waiting).

Cheers!

xddj00 commented 5 years ago

Thx @844E for the explanation.

top - 11:23:29 up 2 days, 14:35, 1 user, load average: 2,42, 1,57, 1,41 Threads: 35 total, 2 running, 33 sleeping, 0 stopped, 0 zombie %Cpu(s): 37,4 us, 2,8 sy, 0,0 ni, 59,8 id, 0,0 wa, 0,0 hi, 0,0 si, 0,0 st MiB Mem : 7426,4 total, 1388,6 free, 3579,7 used, 2458,1 buff/cache MiB Swap: 6030,0 total, 5712,5 free, 317,5 used. 3208,8 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
19526 slack 20 0 3315688 1,1g 232436 R 99,9 15,1 1:26.62 csgo_linux64
19427 slack 20 0 3315688 1,1g 232436 S 15,7 15,1 0:35.93 csgo_linux64
19549 slack 20 0 3315688 1,1g 232436 S 3,3 15,1 0:02.45 csgo_linux64
19498 slack 20 0 3315688 1,1g 232436 S 3,0 15,1 0:03.18 csgo_linux64
19546 slack 20 0 3315688 1,1g 232436 R 3,0 15,1 0:02.63 Video Decode Th
19545 slack 20 0 3315688 1,1g 232436 S 2,7 15,1 0:02.66 Video Decode Th
19547 slack 20 0 3315688 1,1g 232436 S 2,7 15,1 0:02.74 Video Decode Th
19544 slack 20 0 3315688 1,1g 232436 S 2,3 15,1 0:02.61 Video Decode Th
19497 slack 20 0 3315688 1,1g 232436 S 2,0 15,1 0:03.02 csgo_linux64
19535 slack 20 0 3315688 1,1g 232436 S 2,0 15,1 0:01.75 csgo_linux64
19536 slack 20 0 3315688 1,1g 232436 S 1,0 15,1 0:00.90 csgo_linux64
19518 slack 20 0 3315688 1,1g 232436 S 0,7 15,1 0:00.97 csgo_linux64
19519 slack 20 0 3315688 1,1g 232436 S 0,3 15,1 0:00.24 csgo_linux64
19521 slack 20 0 3315688 1,1g 232436 S 0,3 15,1 0:00.02 csgo_linux64
19534 slack 20 0 3315688 1,1g 232436 S 0,3 15,1 0:00.35 threaded-ml
19548 slack 20 0 3315688 1,1g 232436 S 0,3 15,1 0:00.43 SDLAudioDev2
19490 slack 20 0 3315688 1,1g 232436 S 0,0 15,1 0:00.85 csgo_linux64
19491 slack 20 0 3315688 1,1g 232436 S 0,0 15,1 0:00.16 csgo_linux64
19492 slack 20 0 3315688 1,1g 232436 S 0,0 15,1 0:00.19 csgo_linux64
19493 slack 20 0 3315688 1,1g 232436 S 0,0 15,1 0:00.18 csgo_linux64
19496 slack 20 0 3315688 1,1g 232436 S 0,0 15,1 0:00.00 disk_cache:0
19499 slack 20 0 3315688 1,1g 232436 S 0,0 15,1 0:00.00 disk_cache:0
19522 slack 20 0 3315688 1,1g 232436 S 0,0 15,1 0:00.03 csgo_linux64
19523 slack 20 0 3315688 1,1g 232436 S 0,0 15,1 0:00.01 csgo_linux64
19525 slack 20 0 3315688 1,1g 232436 S 0,0 15,1 0:00.00 V8 WorkerThread
19527 slack 20 0 3315688 1,1g 232436 S 0,0 15,1 0:00.01 csgo_linux64
19528 slack 20 0 3315688 1,1g 232436 S 0,0 15,1 0:00.00 csgo_linux64
19529 slack 20 0 3315688 1,1g 232436 S 0,0 15,1 0:00.00 csgo_linux64

root@x552c:~# gdb /home/slack/.steam/steam/steamapps/common/Counter-StrikeGlobalOffensive/csgo_linux64 19427 GNU gdb (Debian 8.1-4) 8.1 Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /home/slack/.steam/steam/steamapps/common/Counter-Strike Global Offensive/csgo_linux64...(no debugging symbols found)...done. Attaching to program: /home/slack/.steam/steam/steamapps/common/Counter-Strike Global Offensive/csgo_linux64, process 19427 [New LWP 19490] [New LWP 19491] [New LWP 19492] [New LWP 19493] [New LWP 19496] [New LWP 19497] [New LWP 19498] [New LWP 19499] [New LWP 19518] [New LWP 19519] [New LWP 19521] [New LWP 19522] [New LWP 19523] [New LWP 19525] [New LWP 19526] [New LWP 19527] [New LWP 19528] [New LWP 19529] [New LWP 19530] [New LWP 19534] [New LWP 19535] [New LWP 19536] [New LWP 19540] [New LWP 19541] [New LWP 19542] [New LWP 19543] [New LWP 19544] [New LWP 19545] [New LWP 19546] [New LWP 19547] [New LWP 19548] [New LWP 19549] [New LWP 19551] [New LWP 19553]

warning: Could not load shared library symbols for bin/linux64/launcher_client.so. Do you need "set solib-search-path" or "set sysroot"? [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". 0x00007fd2e6a38510 in __GI___nanosleep (requested_time=0x7ffc169436c0, remaining=0x7ffc169436b0) at ../sysdeps/unix/sysv/linux/nanosleep.c:28 28 ../sysdeps/unix/sysv/linux/nanosleep.c: Aucun fichier ou dossier de ce type. (gdb) info threads Id Target Id Frame

xddj00 commented 5 years ago

@844E I think I did what I had to do?

ghost commented 5 years ago

I am also experiencing this.

1 core running at 100%, the rest are not.

Xeon 1230v2/RX580 import-10-01-18-10-07-15-351704362

xddj00 commented 5 years ago

capture d ecran de 2018-10-03 10-51-51

ghost commented 5 years ago

Issue has been fixed with 1 core running at 100% with the update today.

Thank you

kisak-valve commented 5 years ago

Per "– Multiple performance improvements for OSX and Linux clients." in the 2018-09-03 CS:GO update, please retest this issue.

henrym11106 commented 5 years ago

This issue is also fixed for me. no maxed cores, and I think CPU usage is a bit lower overall.

xddj00 commented 5 years ago

Problem fixed also for me. All core at 20% in the menu.

g0ga commented 5 years ago

same here. thank you

mlandalv commented 5 years ago

Yep, this seems fixed. The sound is still broken though (#1701).

kisak-valve commented 5 years ago

Thanks for retesting, closing.