Question / Help [Solved] OBS thrashing CPU when idle

Shane Roach

New Member
I don't know what log file you would like to see. I have installed OBS from the Arch Linux repository, and when I start it, it begins grinding the processor to the tune of +50% before I even start to record or stream, or even set up a scene.

Is this a known issue of some sort? I went back to Windows 10 to be sure I was not crazy, and OBS cruises along using little if any processor in Windows when idle.

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:

Shane Roach

New Member
I just tried installing the git version (still through arch) and no difference. I may try just straight compiling it from github next. I have done that before with Blender just to learn how it works, so maybe now is a good time to test my mad github skills
 

restorent

New Member
This bug still occurs for me (Ubuntu 16.10). After 30-40 mins of streaming my pc runs out of memory which results in massive slowdown to the point where I have to restart it. Will try building from source.
 

Shane Roach

New Member
To be very clear, the CPU usage I am experiencing here is before even streaming anything. I have updated twice now and no improvement. Is that the same thing happening in Ubuntu? I am using Arch.


This is what I get starting and stopping.
Code:
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
Code:
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:

Shane Roach

New Member
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.
 

cRaZy-bisCuiT

New Member
Did you include a Screen capture of a whole screen while the CPU load was that high? I get the same when trying it (AMD RX480 + amdgpu + mesa + x264 (software)). While just recording a window (or even multiple windows) the problen does not occour.
 
Top