Question / Help Ubuntu dropping Frames Nvidia

Keyz

New Member
Hello,

for some reason OBS is dropping frames in Ubuntu where as in Arch it doesn't. I am not talking about streaming or recording, simply having OBS open and moving windows around (without recording) results in sub 30 FPS, which is unusable. Hardware or settings is not the issue (14 Core Xeon, GTX Titan X). Disabling the preview helps a bit, but even with preview disabled it barely holds ~35FPS when moving windows etc.

This problem persists on all Ubuntu flavors. Only Linux distro where this is not happening is Arch or Manjaro.
 

Harold

Active Member
That's not dropped frames then, as dropped frames are purely an internet connection issue.

Post your session log from one of the sessions where you're having trouble.
 

Keyz

New Member
Well, when recording or streaming on Ubuntu with OBS it can't hold the FPS. It dropps frames like it would when the system is overloaded, with the exception that it isn't as I am not even recording. And yes when I press record the actual footage is very choppy.
Here is the log:

03:39:59 PM.065: Processor: 28 logical cores
03:39:59 PM.065: Processor: Intel(R) Xeon(R) CPU E5-2683 v3 @ 2.00GHz
03:39:59 PM.066: Physical Memory: 32092MB Total
03:39:59 PM.066: Kernel Version: Linux 4.4.0-97-generic
03:39:59 PM.066: Distribution: "Ubuntu" "16.04"
03:39:59 PM.067: Portable mode: false
03:39:59 PM.113: OBS 18.0.1 (linux)
03:39:59 PM.113: ---------------------------------
03:39:59 PM.113: ---------------------------------
03:39:59 PM.113: audio settings reset:
03:39:59 PM.113: samples per sec: 44100
03:39:59 PM.113: speakers: 2
03:39:59 PM.292: OpenGL version: 3.2.0 NVIDIA 375.66
03:39:59 PM.292:
03:39:59 PM.305: ---------------------------------
03:39:59 PM.305: video settings reset:
03:39:59 PM.305: base resolution: 1920x1080
03:39:59 PM.305: output resolution: 1920x1080
03:39:59 PM.305: downscale filter: Bicubic
03:39:59 PM.305: fps: 60/1
03:39:59 PM.305: format: NV12
03:39:59 PM.305: ---------------------------------
03:39:59 PM.322: No blackmagic support
03:39:59 PM.334: os_dlopen(libvlc.so.5->libvlc.so.5): libvlc.so.5: cannot open shared object file: No such file or directory
03:39:59 PM.334:
03:39:59 PM.334: Couldn't find VLC installation, VLC video source disabled
03:39:59 PM.334: ---------------------------------
03:39:59 PM.334: Loaded Modules:
03:39:59 PM.334: vlc-video.so
03:39:59 PM.334: text-freetype2.so
03:39:59 PM.334: rtmp-services.so
03:39:59 PM.334: obs-x264.so
03:39:59 PM.334: obs-transitions.so
03:39:59 PM.334: obs-outputs.so
03:39:59 PM.334: obs-libfdk.so
03:39:59 PM.334: obs-filters.so
03:39:59 PM.334: obs-ffmpeg.so
03:39:59 PM.334: linux-v4l2.so
03:39:59 PM.334: linux-pulseaudio.so
03:39:59 PM.334: linux-jack.so
03:39:59 PM.334: linux-decklink.so
03:39:59 PM.334: linux-capture.so
03:39:59 PM.334: linux-alsa.so
03:39:59 PM.334: image-source.so
03:39:59 PM.334: frontend-tools.so
03:39:59 PM.334: ==== Startup complete ===============================================
03:39:59 PM.334: Service '' not found
03:39:59 PM.404: All scene data cleared
03:39:59 PM.404: ------------------------------------------------
03:39:59 PM.415: pulse-input: Server name: 'pulseaudio 8.0'
03:39:59 PM.415: pulse-input: An error occurred while getting the source info!
03:39:59 PM.415: pulse-input: Server name: 'pulseaudio 8.0'
03:39:59 PM.415: pulse-input: An error occurred while getting the source info!
03:39:59 PM.416: xshm-input: Geometry 1920x1080 @ 0,0
03:39:59 PM.418: Switched to scene 'Scene'
03:39:59 PM.418: ------------------------------------------------
03:39:59 PM.418: Loaded scenes:
03:39:59 PM.418: - scene 'Scene':
03:39:59 PM.418: - source: 'Screen Capture (XSHM)' (xshm_input)
03:39:59 PM.418: ------------------------------------------------
03:40:55 PM.616: ==== Shutting down ==================================================
03:40:55 PM.619: Switched to scene '(null)'
03:40:55 PM.668: All scene data cleared
03:40:55 PM.668: ------------------------------------------------
03:40:55 PM.747: Freeing OBS context data
03:40:55 PM.778: == Profiler Results =============================
03:40:55 PM.778: run_program_init: 679.384 ms
03:40:55 PM.778: ┣OBSApp::AppInit: 2.087 ms
03:40:55 PM.778: ┃ ┗OBSApp::InitLocale: 0.846 ms
03:40:55 PM.778: ┗OBSApp::OBSInit: 518.422 ms
03:40:55 PM.778: ┣obs_startup: 1.334 ms
03:40:55 PM.778: ┗OBSBasic::OBSInit: 357.298 ms
03:40:55 PM.778: ┣OBSBasic::InitBasicConfig: 0.095 ms
03:40:55 PM.778: ┣OBSBasic::ResetAudio: 0.089 ms
03:40:55 PM.778: ┣OBSBasic::ResetVideo: 191.852 ms
03:40:55 PM.778: ┣OBSBasic::InitOBSCallbacks: 0.007 ms
03:40:55 PM.778: ┣OBSBasic::InitHotkeys: 0.047 ms
03:40:55 PM.778: ┣obs_load_all_modules: 28.556 ms
03:40:55 PM.778: ┃ ┣obs_init_module(frontend-tools.so): 1.549 ms
03:40:55 PM.778: ┃ ┣obs_init_module(image-source.so): 0.005 ms
03:40:55 PM.778: ┃ ┣obs_init_module(linux-alsa.so): 0.005 ms
03:40:55 PM.778: ┃ ┣obs_init_module(linux-capture.so): 3.314 ms
03:40:55 PM.778: ┃ ┣obs_init_module(linux-decklink.so): 0.237 ms
03:40:55 PM.778: ┃ ┣obs_init_module(linux-jack.so): 0.003 ms
03:40:55 PM.779: ┃ ┣obs_init_module(linux-pulseaudio.so): 0.004 ms
03:40:55 PM.779: ┃ ┣obs_init_module(linux-v4l2.so): 0.002 ms
03:40:55 PM.779: ┃ ┣obs_init_module(obs-ffmpeg.so): 0.076 ms
03:40:55 PM.779: ┃ ┣obs_init_module(obs-filters.so): 0.008 ms
03:40:55 PM.779: ┃ ┣obs_init_module(obs-libfdk.so): 0.002 ms
03:40:55 PM.779: ┃ ┣obs_init_module(obs-outputs.so): 0.003 ms
03:40:55 PM.779: ┃ ┣obs_init_module(obs-transitions.so): 0.005 ms
03:40:55 PM.779: ┃ ┣obs_init_module(obs-x264.so): 0.001 ms
03:40:55 PM.779: ┃ ┣obs_init_module(rtmp-services.so): 0.09 ms
03:40:55 PM.779: ┃ ┣obs_init_module(text-freetype2.so): 0.009 ms
03:40:55 PM.779: ┃ ┗obs_init_module(vlc-video.so): 0.335 ms
03:40:55 PM.779: ┣OBSBasic::ResetOutputs: 0.235 ms
03:40:55 PM.779: ┣OBSBasic::CreateHotkeys: 0.028 ms
03:40:55 PM.779: ┣OBSBasic::InitService: 0.037 ms
03:40:55 PM.779: ┣OBSBasic::InitPrimitives: 69.222 ms
03:40:55 PM.779: ┗OBSBasic::Load: 14.224 ms
03:40:55 PM.779: obs_hotkey_thread(25 ms): min=0.074 ms, median=0.16 ms, max=36.078 ms, 99th percentile=11.35 ms, 99.63% below 25 ms
03:40:55 PM.779: audio_thread(Audio): min=0 ms, median=0.029 ms, max=0.156 ms, 99th percentile=0.052 ms
03:40:55 PM.779: obs_video_thread(16.6667 ms): min=4.599 ms, median=6.523 ms, max=83.804 ms, 99th percentile=34.43 ms, 93.4542% below 16.667 ms
03:40:55 PM.779: ┣tick_sources: min=0 ms, median=4.989 ms, max=69.946 ms, 99th percentile=30.094 ms
03:40:55 PM.779: ┣render_displays: min=0.1 ms, median=0.516 ms, max=83.002 ms, 99th percentile=5.904 ms
03:40:55 PM.779: ┗output_frame: min=0.792 ms, median=1.021 ms, max=20.013 ms, 99th percentile=13.716 ms
03:40:55 PM.779: ┣gs_context(video->graphics): min=0.289 ms, median=0.407 ms, max=19.35 ms, 99th percentile=13.089 ms
03:40:55 PM.779: ┃ ┣render_video: min=0.188 ms, median=0.268 ms, max=17.375 ms, 99th percentile=2.714 ms
03:40:55 PM.779: ┃ ┃ ┣render_main_texture: min=0.053 ms, median=0.096 ms, max=5.974 ms, 99th percentile=0.139 ms
03:40:55 PM.779: ┃ ┃ ┣render_output_texture: min=0.002 ms, median=0.048 ms, max=2.029 ms, 99th percentile=0.077 ms
03:40:55 PM.779: ┃ ┃ ┣render_convert_texture: min=0.001 ms, median=0.069 ms, max=2.205 ms, 99th percentile=0.102 ms
03:40:55 PM.779: ┃ ┃ ┗stage_output_texture: min=0 ms, median=0.034 ms, max=17.162 ms, 99th percentile=2.384 ms
03:40:55 PM.779: ┃ ┣download_frame: min=0 ms, median=0 ms, max=0.03 ms, 99th percentile=0.003 ms
03:40:55 PM.779: ┃ ┗gs_flush: min=0.004 ms, median=0.006 ms, max=14.203 ms, 99th percentile=0.011 ms
03:40:55 PM.779: ┗output_video_data: min=0.469 ms, median=0.605 ms, max=2.789 ms, 99th percentile=0.708 ms
03:40:55 PM.779: video_thread(video): min=0 ms, median=0 ms, max=0.066 ms, 99th percentile=0.001 ms
03:40:55 PM.779: =================================================
03:40:55 PM.779: == Profiler Time Between Calls ==================
03:40:55 PM.779: obs_hotkey_thread(25 ms): min=25.135 ms, median=25.244 ms, max=61.186 ms, 84.5442% within ±2% of 25 ms (0% lower, 15.4558% higher)
03:40:55 PM.779: obs_video_thread(16.6667 ms): min=6.602 ms, median=16.667 ms, max=83.814 ms, 91.8844% within ±2% of 16.667 ms (1.78297% lower, 6.33262% higher)
03:40:55 PM.779: =================================================
03:40:55 PM.804: Number of memory leaks: 0
 

Keyz

New Member
Yes, on window capture it starts dropping frames as well, though only when resizing the window. It is super annoying as I'd like to use Ubuntu over Arch and this is literally the only thing that is stopping me from doing so. At first I thought it's just because the Unity DE is more resource heavy/ unoptimized for capturing compared to KDE that I run on Manjaro but on Kubuntu it dropps frames aswell.
 

Keyz

New Member
Just checked if OBS also dropps frames when a capture device is being used to capture a 2nd PC/ or console and yes it does. So OBS as it is now is completely useless in Ubuntu.
 

Osiris

Active Member
With comments like that people aren't going to be inclined to help you either way.
Besides the linux user base of OBS is significantly smaller then Windows, so there aren't nearly enough people that have a lot of experience with OBS on Linux (myself included)
 

Lucas_D

New Member
That is interesting. Have you tried it with a small window or full screen. The frame rendering time seems to be quicker with a smaller window (at least that is what I have noticed).

My experience is; If I set the Frame Rate to 30 FPS, the frames render in under 10ms and hence no problems. However, If I set the Frame Rate to 60, it takes over 20ms per frame and hence frames get dropped. The per frame render time should not change but it does.

Also, I tested with both Windows and Linux and both operate the same. The render time should be less than 16.6ms (at 60 FPS) to cause no dropped frames.
 
Top