You are not logged in.

#1 2017-01-18 22:48:42

ShaneRoach
Member
Registered: 2016-04-20
Posts: 32

[Solved] OBS Thrashing CPU even when Idle

I think I have never streamed from Linux. I thought I had, but I think looking back I recorded using Simple Screen Recorder instead.

I installed OBS today from the Arch repository, and just starting it caused a spike in processor usage of over 50%, and then there it sat pegging my processor. The same happens when I uninstall the main repository version and install the AUR git version. I thought for sure that would fix it at least temporarily, but it did not.

Anyone stream from Arch? Do you use OBS? Can anyone think of a good cause for this behavior? I can't even find an older version to roll back to. Found some video online and no, cranking up the CPU usage in idle is not normal behavior.

I posted a query on OBS forums as well.

This issue was solved by using the nvidia-libgl instead of mesa-libgl dependency for the proprietary Nvidia driver. There is a way to switch back and forth between the two if you absolutely have to, but I am finding so far I do not need mesa-libgl for much of anything.

Last edited by ShaneRoach (2017-02-02 16:13:37)

Offline

#2 2017-01-21 22:18:45

Burning Smile
Member
Registered: 2016-09-05
Posts: 20

Re: [Solved] OBS Thrashing CPU even when Idle

Which version of OBS are you using?
What are your system specifications?
What settings are you using?

I use OBS Studio on my system for a while and use the NVEC encoder. 2500 bitrate and it downscale to 720p. I have also recorded at 60 FPS 1920*1080 locally with no issues.

Offline

#3 2017-02-01 18:06:58

ShaneRoach
Member
Registered: 2016-04-20
Posts: 32

Re: [Solved] OBS Thrashing CPU even when Idle

Version? The version in the Arch repository (Currently 17.0.2)? Is there something I should know to kick it off in 62 bit mode? I note I do not seem to have the option as I do in Windows to select myself.
I have an i5 4670k Haswell processory, 32g memory. This is not a memory issue though, and the issue begins the moment I start OBS - 50%+ CPU usage. So I am at a loss as to what difference the settings ought to make.
Video bitrate 2500, audio 160, again though pegging processor without recording or streaming.

I get the idea you are not having this issue though. big_smile so there's that.

This is what I get starting and stopping.

Attempted path: share/obs/obs-studio/locale/en-US.ini
Attempted path: /usr/share/obs/obs-studio/locale/en-US.ini
Attempted path: share/obs/obs-studio/locale.ini
Attempted path: /usr/share/obs/obs-studio/locale.ini
Attempted path: share/obs/obs-studio/themes/Default.qss
Attempted path: /usr/share/obs/obs-studio/themes/Default.qss
Attempted path: share/obs/obs-studio/license/gplv2.txt
Attempted path: /usr/share/obs/obs-studio/license/gplv2.txt
info: Processor: 4 logical cores
info: Processor: Intel(R) Core(TM) i5-4670K CPU @ 3.40GHz
info: Physical Memory: 32122MB Total
info: Kernel Version: Linux 4.9.6-1-ARCH
info: Distribution: "Arch Linux" Unknown
info: Portable mode: false
info: OBS 17.0.2.r50.g001f2a47 (linux)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
	samples per sec: 44100
	speakers:        2
info: OpenGL version: 3.3 (Core Profile) Mesa 13.0.4

error: glGetIntegerv(GL_MAX_TEXTURE_ANISOTROPY_MAX) failed, glGetError returned 0x500
error: glGetIntegerv(GL_MAX_TEXTURE_ANISOTROPY_MAX) failed, glGetError returned 0x500
error: glGetIntegerv(GL_MAX_TEXTURE_ANISOTROPY_MAX) failed, glGetError returned 0x500
error: glGetIntegerv(GL_MAX_TEXTURE_ANISOTROPY_MAX) failed, glGetError returned 0x500
error: glGetIntegerv(GL_MAX_TEXTURE_ANISOTROPY_MAX) failed, glGetError returned 0x500
error: glGetIntegerv(GL_MAX_TEXTURE_ANISOTROPY_MAX) failed, glGetError returned 0x500
error: glGetIntegerv(GL_MAX_TEXTURE_ANISOTROPY_MAX) failed, glGetError returned 0x500
error: glGetIntegerv(GL_MAX_TEXTURE_ANISOTROPY_MAX) failed, glGetError returned 0x500
error: glGetIntegerv(GL_MAX_TEXTURE_ANISOTROPY_MAX) failed, glGetError returned 0x500
error: glGetIntegerv(GL_MAX_TEXTURE_ANISOTROPY_MAX) failed, glGetError returned 0x500
error: glGetIntegerv(GL_MAX_TEXTURE_ANISOTROPY_MAX) failed, glGetError returned 0x500
error: glGetIntegerv(GL_MAX_TEXTURE_ANISOTROPY_MAX) failed, glGetError returned 0x500
error: glGetIntegerv(GL_MAX_TEXTURE_ANISOTROPY_MAX) failed, glGetError returned 0x500
error: glGetIntegerv(GL_MAX_TEXTURE_ANISOTROPY_MAX) failed, glGetError returned 0x500
error: glGetIntegerv(GL_MAX_TEXTURE_ANISOTROPY_MAX) failed, glGetError returned 0x500
error: glGetIntegerv(GL_MAX_TEXTURE_ANISOTROPY_MAX) failed, glGetError returned 0x500
error: glGetIntegerv(GL_MAX_TEXTURE_ANISOTROPY_MAX) failed, glGetError returned 0x500
error: glGetIntegerv(GL_MAX_TEXTURE_ANISOTROPY_MAX) failed, glGetError returned 0x500
error: glGetIntegerv(GL_MAX_TEXTURE_ANISOTROPY_MAX) failed, glGetError returned 0x500
error: glGetIntegerv(GL_MAX_TEXTURE_ANISOTROPY_MAX) failed, glGetError returned 0x500
error: glGetIntegerv(GL_MAX_TEXTURE_ANISOTROPY_MAX) failed, glGetError returned 0x500
error: glGetIntegerv(GL_MAX_TEXTURE_ANISOTROPY_MAX) failed, glGetError returned 0x500
info: ---------------------------------
info: video settings reset:
	base resolution:   1920x1080
	output resolution: 1280x720
	downscale filter:  Bicubic
	fps:               30/1
	format:            NV12
info: ---------------------------------
libDeckLinkAPI.so: cannot open shared object file: No such file or directory
info: No blackmagic support
info: NVENC supported
info: VLC found, VLC video source enabled
info: ---------------------------------
info:   Loaded Modules:
info:     vlc-video.so
info:     text-freetype2.so
info:     rtmp-services.so
info:     obs-x264.so
info:     obs-transitions.so
info:     obs-outputs.so
info:     obs-libfdk.so
info:     obs-filters.so
info:     obs-ffmpeg.so
info:     linux-v4l2.so
info:     linux-pulseaudio.so
info:     linux-jack.so
info:     linux-decklink.so
info:     linux-capture.so
info:     linux-alsa.so
info:     image-source.so
info:     frontend-tools.so
info: ==== Startup complete ===============================================
error: Service '' not found
info: All scene data cleared
info: ------------------------------------------------
error: glGetIntegerv(GL_MAX_TEXTURE_ANISOTROPY_MAX) failed, glGetError returned 0x500
info: pulse-input: Server name: 'pulseaudio 10.0'
error: pulse-input: An error occurred while getting the source info!
info: pulse-input: Server name: 'pulseaudio 10.0'
error: pulse-input: An error occurred while getting the source info!
info: xshm-input: Geometry 1920x1080 @ 0,0
info: Switched to scene 'Desktop'
info: ------------------------------------------------
info: Loaded scenes:
info: - scene 'Scene':
info: - scene 'Desktop':
info:     - source: 'Screen Capture (XSHM)' (xshm_input)
info: ------------------------------------------------
error: glTexParameteri failed, glGetError returned 0x500
error: device_load_texture (GL) failed
error: glTexParameteri failed, glGetError returned 0x500
error: device_load_texture (GL) failed
error: glTexParameteri failed, glGetError returned 0x500
error: device_load_texture (GL) failed
info: Update check: last known remote version is 0.4.0
error: glTexParameteri failed, glGetError returned 0x500
error: device_load_texture (GL) failed
error: glTexParameteri failed, glGetError returned 0x500
error: device_load_texture (GL) failed
error: glTexParameteri failed, glGetError returned 0x500
error: device_load_texture (GL) failed
error: glTexParameteri failed, glGetError returned 0x500
error: device_load_texture (GL) failed
error: glTexParameteri failed, glGetError returned 0x500
error: device_load_texture (GL) failed
info: ==== Shutting down ==================================================
info: Switched to scene '(null)'
info: All scene data cleared
info: ------------------------------------------------
info: Freeing OBS context data
info: == Profiler Results =============================
info: run_program_init: 320.069 ms
info:  ┣OBSApp::AppInit: 0.653 ms
info:  ┃ ┗OBSApp::InitLocale: 0.511 ms
info:  ┗OBSApp::OBSInit: 269.647 ms
info:    ┣obs_startup: 13.462 ms
info:    ┗OBSBasic::OBSInit: 229.047 ms
info:      ┣OBSBasic::InitBasicConfig: 0.057 ms
info:      ┣OBSBasic::ResetAudio: 0.092 ms
info:      ┣OBSBasic::ResetVideo: 120.496 ms
info:      ┣OBSBasic::InitOBSCallbacks: 0.007 ms
info:      ┣OBSBasic::InitHotkeys: 0.043 ms
info:      ┣obs_load_all_modules: 12.689 ms
info:      ┃ ┣obs_init_module(frontend-tools.so): 0.814 ms
info:      ┃ ┣obs_init_module(image-source.so): 0.003 ms
info:      ┃ ┣obs_init_module(linux-alsa.so): 0.001 ms
info:      ┃ ┣obs_init_module(linux-capture.so): 0.248 ms
info:      ┃ ┣obs_init_module(linux-decklink.so): 0.098 ms
info:      ┃ ┣obs_init_module(linux-jack.so): 0.001 ms
info:      ┃ ┣obs_init_module(linux-pulseaudio.so): 0.002 ms
info:      ┃ ┣obs_init_module(linux-v4l2.so): 0.002 ms
info:      ┃ ┣obs_init_module(obs-ffmpeg.so): 0.448 ms
info:      ┃ ┣obs_init_module(obs-filters.so): 0.005 ms
info:      ┃ ┣obs_init_module(obs-libfdk.so): 0.001 ms
info:      ┃ ┣obs_init_module(obs-outputs.so): 0.003 ms
info:      ┃ ┣obs_init_module(obs-transitions.so): 0.004 ms
info:      ┃ ┣obs_init_module(obs-x264.so): 0.006 ms
info:      ┃ ┣obs_init_module(rtmp-services.so): 0.076 ms
info:      ┃ ┣obs_init_module(text-freetype2.so): 0.017 ms
info:      ┃ ┗obs_init_module(vlc-video.so): 0.77 ms
info:      ┣OBSBasic::ResetOutputs: 0.433 ms
info:      ┣OBSBasic::CreateHotkeys: 0.025 ms
info:      ┣OBSBasic::InitService: 0.231 ms
info:      ┣OBSBasic::InitPrimitives: 0.05 ms
info:      ┗OBSBasic::Load: 9.784 ms
info: obs_hotkey_thread(25 ms): min=0.035 ms, median=0.071 ms, max=25.683 ms, 99th percentile=14.099 ms, 99.9678% below 25 ms
info: audio_thread(Audio): min=0 ms, median=0.016 ms, max=118.846 ms, 99th percentile=0.233 ms
info: obs_video_thread(33.3333 ms): min=1.673 ms, median=36.193 ms, max=355.242 ms, 99th percentile=69.034 ms, 0.795229% below 33.333 ms
info:  ┣tick_sources: min=0 ms, median=4.941 ms, max=16.433 ms, 99th percentile=9.779 ms
info:  ┣render_displays: min=0.005 ms, median=6.387 ms, max=90.81 ms, 99th percentile=19.173 ms
info:  ┗output_frame: min=1.663 ms, median=24.819 ms, max=348.59 ms, 99th percentile=46.872 ms
info:    ┣gs_context(video->graphics): min=1.662 ms, median=24.623 ms, max=348.59 ms, 99th percentile=46.67 ms
info:    ┃ ┣render_video: min=0.142 ms, median=21.537 ms, max=330.272 ms, 99th percentile=39.677 ms
info:    ┃ ┃ ┣render_main_texture: min=0.026 ms, median=0.107 ms, max=127.638 ms, 99th percentile=0.284 ms
info:    ┃ ┃ ┣render_output_texture: min=0.004 ms, median=5.725 ms, max=202.626 ms, 99th percentile=13.489 ms
info:    ┃ ┃ ┣render_convert_texture: min=0.001 ms, median=15.543 ms, max=121.494 ms, 99th percentile=28.196 ms
info:    ┃ ┃ ┗stage_output_texture: min=0 ms, median=0.169 ms, max=1.257 ms, 99th percentile=0.396 ms
info:    ┃ ┣download_frame: min=0 ms, median=0.002 ms, max=0.084 ms, 99th percentile=0.004 ms
info:    ┃ ┗gs_flush: min=1.504 ms, median=2.885 ms, max=18.284 ms, 99th percentile=8.529 ms
info:    ┗output_video_data: min=0.152 ms, median=0.181 ms, max=1.248 ms, 99th percentile=0.472 ms
info: video_thread(video): min=0 ms, median=0 ms, max=0.056 ms, 99th percentile=0.001 ms
info: =================================================
info: == Profiler Time Between Calls ==================
info: obs_hotkey_thread(25 ms): min=25.061 ms, median=25.165 ms, max=51.14 ms, 63.1613% within ±2% of 25 ms (0% lower, 36.8387% higher)
info: obs_video_thread(33.3333 ms): min=32.787 ms, median=36.206 ms, max=355.25 ms, 3.23222% within ±2% of 33.333 ms (0% lower, 96.7678% higher)
info: =================================================
info: Number of memory leaks: 0 

Not much info when reinstalling

loading packages...
warning: obs-studio-git-17.0.2.r50.g001f2a47-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) obs-studio-git-17.0.2.r50.g001f2a47-1

Total Installed Size:  7.28 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                                                                                 [#############################################################################] 100%
(1/1) checking package integrity                                                                                               [#############################################################################] 100%
(1/1) loading package files                                                                                                    [#############################################################################] 100%
(1/1) checking for file conflicts                                                                                              [#############################################################################] 100%
(1/1) checking available disk space                                                                                            [#############################################################################] 100%
:: Processing package changes...
(1/1) reinstalling obs-studio-git                                                                                              [#############################################################################] 100%
:: Running post-transaction hooks...
(1/3) Updating icon theme caches...
(2/3) Arming ConditionNeedsUpdate...
(3/3) Updating the desktop file MIME type cache...

Sample Video of the CPU Usage

Last edited by ShaneRoach (2017-02-01 20:38:00)

Offline

Board footer

Powered by FluxBB