obs-studio fails to run on freebsd 13.2

I'm trying to run obs-studio, installed as a package on freebsd 13.2-RELEASE. Unfortunately I'm getting the following runtime error (segmentation fault while initializing the OpenGL lib).

Code:
debug: Found dbus service: org.freedesktop.ScreenSaver
debug: Attempted path: share/obs/obs-studio/locale/en-US.ini
debug: Attempted path: /usr/local/share/obs/obs-studio/locale/en-US.ini
debug: Attempted path: share/obs/obs-studio/locale.ini
debug: Attempted path: /usr/local/share/obs/obs-studio/locale.ini
debug: Attempted path: share/obs/obs-studio/themes/Yami.qss
debug: Attempted path: /usr/local/share/obs/obs-studio/themes/Yami.qss
info: Using EGL/X11
info: CPU Name: Intel(R) Xeon(R) CPU E5-2658 v2 @ 2.40GHz
info: CPU Speed: 2400.11MHz
info: Physical Cores: 20, Logical Cores: 40
info: Physical Memory: 55755MB Total, 40068MB Free
info: Kernel Version: FreeBSD 13.2-RELEASE
info: Distribution: FreeBSD "13.2"
info: Session Type: x11
info: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.21.1
info: Qt Version: 6.4.2 (runtime), 6.4.2 (compiled)
info: Portable mode: false
qt.core.qmetaobject.connectslotsbyname: QMetaObject::connectSlotsByName: No matching signal for on_tbar_position_valueChanged(int)
info: OBS 29.0.2 (freebsd)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
        samples per sec: 48000
        speakers:        2
        max buffering:   960 milliseconds
        buffering type:  dynamically increasing
info: ---------------------------------
info: Initializing OpenGL...
Segmentation fault (core dumped)

I've tried then to install from ports also but the result is still the same.
Thanks
Marco
 
What graphics do you have and what driver are you running on it?

The adapter is a GTX550ti.
The driver is:
Code:
# pkg info | grep nvidia
nvidia-driver-390-390.154      NVidia graphics card binary drivers for hardware OpenGL rendering
nvidia-settings-470.86_1       Display Control Panel for X NVidia driver
nvidia-xconfig-470.86          Tool to manipulate X configuration files for the NVidia driver

# pkg info nvidia-driver-390-390.154
Nvidia-driver-390-390.154
Name           : nvidia-driver-390
Version        : 390.154
Installed on   : Sat Apr 29 16:27:46 2023 CEST
Origin         : x11/nvidia-driver-390
Architecture   : FreeBSD:13:amd64
Prefix         : /usr/local
Categories     : x11 kld
Licenses       : NVIDIA
Maintainer     : danfe@FreeBSD.org
WWW            : https://www.nvidia.com/object/unix.html
Comment        : NVidia graphics card binary drivers for hardware OpenGL rendering
Options        :
        ACPI_PM        : on
        DOCS           : on
        LINUX          : on
        WBINVD         : off
Shared Libs required:
        libXext.so.6
        libX11.so.6
Shared Libs provided:
        libvdpau_nvidia.so.1
        libnvidia-tls.so.1
        libnvidia-ml.so.1
        libnvidia-glsi.so.1
        libnvidia-glcore.so.1
        libnvidia-eglcore.so.1
        libnvidia-cfg.so.1
        libGLESv2.so.2
        libGL.so.1
        libEGL.so.1
Annotations    :
        FreeBSD_version: 1301000
        repo_type      : binary
        repository     : FreeBSD
Flat size      : 99.6MiB
Description    :
These are the official NVidia binary drivers for hardware OpenGL rendering
in X11, using the GLX extensions.

WWW: https://www.nvidia.com/object/unix.html
 
Definitely the graphics drm. Obs works on Celeron N5095 and amd A10-8700 with webcamd and the Logitech c270 on my two systems I've tested. I'm using drm-kmod for both systems.
 
I also had a segmentation fault problem: (FreeBSD 14.0, E5-2650V4*2, AMD RX580)
Code:
$ obs
debug: Found dbus service: org.freedesktop.ScreenSaver
debug: Attempted path: share/obs/obs-studio/locale/en-US.ini
debug: Attempted path: /usr/local/share/obs/obs-studio/locale/en-US.ini
debug: Attempted path: share/obs/obs-studio/locale.ini
debug: Attempted path: /usr/local/share/obs/obs-studio/locale.ini
debug: Attempted path: share/obs/obs-studio/locale/zh-CN.ini
debug: Attempted path: /usr/local/share/obs/obs-studio/locale/zh-CN.ini
info: Using preferred locale 'zh-CN'
debug: Attempted path: share/obs/obs-studio/themes
debug: Attempted path: /usr/local/share/obs/obs-studio/themes
debug: Attempted path: share/obs/obs-studio/themes/Yami.qss
debug: Attempted path: /usr/local/share/obs/obs-studio/themes/Yami.qss
info: Using EGL/X11
info: CPU Name: Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz
info: CPU Speed: 2194.98MHz
info: Physical Cores: 24, Logical Cores: 48
info: Physical Memory: 15781MB Total, 11635MB Free
info: Kernel Version: FreeBSD 14.0-RELEASE
info: Distribution: FreeBSD "14.0"
info: Desktop Environment: KDE
info: Session Type: x11
info: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.21.1
info: Qt Version: 6.7.1 (runtime), 6.7.1 (compiled)
info: Portable mode: false
info: OBS 30.1.2 (freebsd)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
        samples per sec: 48000
        speakers:        2
        max buffering:   960 milliseconds
        buffering type:  dynamically increasing
info: ---------------------------------
info: Initializing OpenGL...
amdgpu: os_same_file_description couldn't determine if two DRM fds reference the same file description.
If they do, bad things may happen!
info: Loading up OpenGL on adapter AMD AMD Radeon RX 580 Series (radeonsi, polaris10, LLVM 15.0.7, DRM 3.42, 14.0-RELEASE)
info: OpenGL loaded successfully, version 4.6 (Core Profile) Mesa 24.0.7, shading language 4.60
info: ---------------------------------
info: video settings reset:
        base resolution:   1920x1080
        output resolution: 1280x720
        downscale filter:  Bicubic
        fps:               30/1
        format:            NV12
        YUV mode:          Rec. 709/Partial
info: NV12 texture support enabled
info: P010 texture support not available
info: Audio monitoring device:
        name: 默认
        id: default
info: ---------------------------------
info: [pipewire] No captures available
warning: v4l2loopback not installed, virtual camera disabled
error: os_dlopen(libnvidia-encode.so.1->libnvidia-encode.so.1): Shared object "libnvidia-encode.so.1" not found, required by "obs"

error: VAAPI: Failed to open device '/dev/dri/renderD128'
info: FFmpeg VAAPI H264 encoding not supported
error: VAAPI: Failed to open device '/dev/dri/renderD128'
info: FFmpeg VAAPI AV1 encoding not supported
error: VAAPI: Failed to open device '/dev/dri/renderD128'
info: FFmpeg VAAPI HEVC encoding not supported
info: [obs-websocket] [obs_module_load] you can haz websockets (Version: 5.4.2 | RPC Version: 1)
info: [obs-websocket] [obs_module_load] Qt version (compile-time): 6.7.1 | Qt version (run-time): 6.7.1
info: [obs-websocket] [obs_module_load] Linked ASIO Version: 102800
info: [obs-websocket] [obs_module_load] Module loaded.
info: [vlc-video]: VLC 3.0.20 Vetinari found, VLC video source enabled
info: ---------------------------------
info:   Loaded Modules:
info:     vlc-video.so
info:     text-freetype2.so
info:     sndio.so
info:     rtmp-services.so
info:     oss-audio.so
info:     obs-x264.so
info:     obs-websocket.so
info:     obs-webrtc.so
info:     obs-transitions.so
info:     obs-outputs.so
info:     obs-filters.so
info:     obs-ffmpeg.so
info:     linux-v4l2.so
info:     linux-pulseaudio.so
info:     linux-pipewire.so
info:     linux-jack.so
info:     linux-capture.so
info:     image-source.so
info:     frontend-tools.so
info: ---------------------------------
info: ==== Startup complete ===============================================
info: All scene data cleared
info: ------------------------------------------------
info: pulse-input: Server name: 'pulseaudio 16.1'
info: pulse-input: Audio format: s16le, 44100 Hz, 2 channels
info: pulse-input: Started recording from 'oss_output.dsp8.monitor' (default)
info: [Loaded global audio device]: '桌面音频'
info: pulse-input: Server name: 'pulseaudio 16.1'
info: pulse-input: Audio format: s16le, 44100 Hz, 2 channels
info: pulse-input: Started recording from 'oss_input.dsp0' (default)
info: [Loaded global audio device]: '麦克风/Aux'
info: Switched to scene '场景'
info: ------------------------------------------------
info: Loaded scenes:
info: - scene '场景':
info: ------------------------------------------------
[1]    4275 segmentation fault  obs
 
Same issue with OBS (FreeBSD 14.0-RELEASE)

Code:
GRAPHICS OUTPUT *************************************************************************

nvidia-driver-390-390.154_1    NVidia graphics card binary drivers for hardware OpenGL rendering
nvidia-settings-535.146.02_1   Display Control Panel for X NVidia driver

nvidia-driver-390-390.154_1
Name           : nvidia-driver-390
Version        : 390.154_1
Installed on   : Thu Jul 18 14:44:55 2024 PDT
Origin         : x11/nvidia-driver-390
Architecture   : FreeBSD:14:amd64
Prefix         : /usr/local
Categories     : x11 kld
Licenses       : NVIDIA
Maintainer     : danfe@FreeBSD.org
WWW            : https://www.nvidia.com/object/unix.html
Comment        : NVidia graphics card binary drivers for hardware OpenGL rendering
Options        :
    ACPI_PM        : on
    DOCS           : on
    LINUX          : on
    WBINVD         : off
Shared Libs required:
    libXext.so.6
    libX11.so.6
Shared Libs provided:
    libvdpau_nvidia.so.1
    libnvidia-tls.so.1
    libnvidia-ml.so.1
    libnvidia-glsi.so.1
    libnvidia-glcore.so.1
    libnvidia-eglcore.so.1
    libnvidia-cfg.so.1
    libGLESv2.so.2
    libGL.so.1
    libEGL.so.1
Annotations    :
    FreeBSD_version: 1400097
    build_timestamp: 2024-07-07T03:48:00+0000
    built_by       : poudriere-git-3.4.1-30-g79e3edcd
    port_checkout_unclean: no
    port_git_hash  : 854c13714
    ports_top_checkout_unclean: no
    ports_top_git_hash: 854c13714
    repo_type      : binary
    repository     : FreeBSD
Flat size      : 99.6MiB
Description    :
These are the official NVidia binary drivers for hardware OpenGL rendering
in X11, using the GLX extensions.

OBS STARTUP OUTPUT *************************************************************

debug: Attempted path: share/obs/obs-studio/locale/en-US.ini
debug: Attempted path: /usr/local/share/obs/obs-studio/locale/en-US.ini
debug: Attempted path: share/obs/obs-studio/locale.ini
debug: Attempted path: /usr/local/share/obs/obs-studio/locale.ini
debug: Attempted path: share/obs/obs-studio/themes
debug: Attempted path: /usr/local/share/obs/obs-studio/themes
debug: Attempted path: share/obs/obs-studio/themes/Yami.qss
debug: Attempted path: /usr/local/share/obs/obs-studio/themes/Yami.qss
warning: [Safe Mode] Unclean shutdown detected!
warning: [Safe Mode] User elected to launch normally.
info: Using EGL/X11
info: CPU Name: AMD Ryzen 5 1400 Quad-Core Processor         
info: CPU Speed: 3200.16MHz
info: Physical Cores: 2, Logical Cores: 8
info: Physical Memory: 7886MB Total, 5531MB Free
info: Kernel Version: FreeBSD 14.0-RELEASE
info: Distribution: FreeBSD "14.0"
info: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.21.1
info: Qt Version: 6.7.2 (runtime), 6.7.2 (compiled)
info: Portable mode: false
info: OBS 30.1.2 (freebsd)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
    samples per sec: 48000
    speakers:        2
    max buffering:   960 milliseconds
    buffering type:  dynamically increasing
info: ---------------------------------
info: Initializing OpenGL...
Segmentation fault
 
Last edited:
Just tried - it is working on my 14.1
Screenshot from 2024-09-04 20-10-50.png
 
14-stable (1401501) On gtx570 with nvidia-driver-390-390.154_1:

obs --verbose

...

info: Initializing OpenGL...
debug: Created EGLDisplay 0x1
Segmentation fault (core dumped)

brings back memory of prusa-slicer crashing on startup (though now gives an error dialog that EGL is too old for more recent versions). Last I recall finding from other programs bugs+fixes it seemed to be a mix of an incomplete NVIDIA's EGL proprietary implementation that other parts of the opensource graphics stack didn't want to fight to fix/workaround (mesa?). Without the graphics stack properly working with the incomplete form, any program interacting with the incomplete parts had to implement fixes/workarounds themselves. The proper fix would be NVIDIA giving a completed EGL support and a workaround is removing the only partially implemented support but the cards that need that driver don't receive new feature development effort from NVIDIA; not sure if it could be brought up as a bug breaking programs to get them to do it.

I've wondered if it is possible to replace incomplete EGL library of 390 with a copy from a newer driver that is more complete, an older driver that didn't give the partial support, or just remove the library. I thought I also recall that on FreeBSD the Linux EGL support was more complete in 390 than FreeBSD's support.
 
Same issue with OBS-studio 31.0.0_2, I also have a segmentation fault problem on FreeBSD 14.2.

The processor : Intel Core i7-3770 CPU @ 3.40GHz
The graphics card : GeForce GTX 650

Code:
root@desktopfreebsd:~ # pkg info | grep nvidia
nvidia-driver-390-390.154.1401000_1 NVidia graphics card binary drivers for hardware OpenGL rendering
nvidia-settings-535.146.02_1   Display Control Panel for X NVidia driver
root@desktopfreebsd:~ #
root@desktopfreebsd:~ # pkg info nvidia-driver-390-390.154.1401000_1
nvidia-driver-390-390.154.1401000_1
Name           : nvidia-driver-390
Version        : 390.154.1401000_1
Installed on   : Sat Jan 11 14:51:10 2025 CET
Origin         : x11/nvidia-driver-390
Architecture   : FreeBSD:14:amd64
Prefix         : /usr/local
Categories     : x11 kld
Licenses       : NVIDIA
Maintainer     : danfe@FreeBSD.org
WWW            : https://www.nvidia.com/object/unix.html
Comment        : NVidia graphics card binary drivers for hardware OpenGL rendering
Options        :
        ACPI_PM        : on
        DOCS           : on
        LINUX          : on
        WBINVD         : off
Shared Libs required:
        libXext.so.6
        libX11.so.6
Shared Libs provided:
        libvdpau_nvidia.so.1
        libnvidia-tls.so.1
        libnvidia-ml.so.1
        libnvidia-glsi.so.1
        libnvidia-glcore.so.1
        libnvidia-eglcore.so.1
        libnvidia-cfg.so.1
        libGLESv2.so.2
        libGL.so.1
        libEGL.so.1
Annotations    :
        FreeBSD_version: 1401000
        build_timestamp: 2025-01-07T21:52:36+0000
        built_by       : poudriere-git-3.4.2
        port_checkout_unclean: no
        port_git_hash  : dddb9bab3
        ports_top_checkout_unclean: no
        ports_top_git_hash: dddb9bab3
        repo_type      : binary
        repository     : FreeBSD
Flat size      : 99.6MiB
Description    :
These are the official NVidia binary drivers for hardware OpenGL rendering
in X11, using the GLX extensions.
root@desktopfreebsd:~ #

Starting obs-studio :
Code:
root@desktopfreebsd:~ # obs -debug -verbose
error: Could not create dbus connection: The connection is closed
error: Could not create dbus connection: The connection is closed
debug: Attempted path: /usr/local/bin/../share/obs/obs-studio/locale/en-US.ini
debug: Attempted path: /usr/local/bin/../share/obs/obs-studio/locale.ini
debug: Attempted path: /usr/local/bin/../share/obs/obs-studio/themes
debug: Attempted path: /usr/local/bin/../share/obs/obs-studio/themes/
warning: Get on org.freedesktop.portal.Settings returned an invalid reply
warning: [Safe Mode] Unclean shutdown detected!
warning: [Safe Mode] User elected to launch normally.
info: Command Line Arguments: -debug -verbose
info: Using EGL/X11
info: CPU Name: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
info: CPU Speed: 3392.44MHz
info: Physical Cores: 4, Logical Cores: 8
info: Physical Memory: 23573MB Total, 17986MB Free
info: Kernel Version: FreeBSD 14.2-RELEASE-p1
info: Distribution: FreeBSD "14.2"
info: Desktop Environment: KDE
info: Session Type: x11
info: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.21.1
info: Qt Version: 6.8.2 (runtime), 6.8.2 (compiled)
info: Portable mode: false
info: OBS 31.0.0 (freebsd)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
        samples per sec: 48000
        speakers:        2
        max buffering:   960 milliseconds
        buffering type:  dynamically increasing
info: ---------------------------------
info: Initializing OpenGL...
Segmentation fault (core dumped)
root@desktopfreebsd:~ #

obs-studio [install from packages - without debugging mode] stack trace after crash :
Code:
root@desktopfreebsd:~ # gdb -q -iex "set auto-load safe-path /root/.config/gdb" obs
Reading symbols from obs...
(No debugging symbols found in obs)
(gdb) r
Starting program: /usr/local/bin/obs  
warning: File "/usr/local/lib/libpython3.11.so.1.0-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "/root/.config/gdb".
To enable execution of this file add
        add-auto-load-safe-path /usr/local/lib/libpython3.11.so.1.0-gdb.py
line to your configuration file "/root/.config/gdb/gdbinit".
To completely disable this security protection add
        set auto-load safe-path /
line to your configuration file "/root/.config/gdb/gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
        info "(gdb)Auto-loading safe path"
warning: File "/usr/local/share/gdb/auto-load/lib/libc++.so.1-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "/root/.config/gdb".
warning: File "/usr/local/share/gdb/auto-load/usr/local/lib/libglib-2.0.so.0.8000.5-gdb.py" auto-loading has been declined by your `auto-load safe-path' set t
o "/root/.config/gdb".
warning: File "/usr/local/share/gdb/auto-load/usr/local/lib/libgobject-2.0.so.0.8000.5-gdb.py" auto-loading has been declined by your `auto-load safe-path' se
t to "/root/.config/gdb".
[New LWP 114031 of process 60079]
[New LWP 114032 of process 60079]
warning: Temporarily disabling breakpoints for unloaded shared library "/usr/local/llvm15/lib/libLLVM-15.so"
[New LWP 114033 of process 60079]
[New LWP 114034 of process 60079]
[New LWP 114035 of process 60079]
[New LWP 114036 of process 60079]
[New LWP 114037 of process 60079]
[New LWP 114038 of process 60079]
[New LWP 114039 of process 60079]
[New LWP 114040 of process 60079]
[New LWP 114041 of process 60079]
[New LWP 114042 of process 60079]
[New LWP 114043 of process 60079]
[New LWP 114044 of process 60079]
[New LWP 114045 of process 60079]
[New LWP 114046 of process 60079]
[New LWP 114047 of process 60079]
[New LWP 114048 of process 60079]
[New LWP 114049 of process 60079]
[New LWP 114050 of process 60079]
[New LWP 114051 of process 60079]
error: Could not create dbus connection: The connection is closed
error: Could not create dbus connection: The connection is closed
debug: Attempted path: /usr/local/bin/../share/obs/obs-studio/locale/en-US.ini
debug: Attempted path: /usr/local/bin/../share/obs/obs-studio/locale.ini
debug: Attempted path: /usr/local/bin/../share/obs/obs-studio/themes
debug: Attempted path: /usr/local/bin/../share/obs/obs-studio/themes/
warning: Get on org.freedesktop.portal.Settings returned an invalid reply
[New LWP 114053 of process 60079]
warning: [Safe Mode] Unclean shutdown detected!
[New LWP 114054 of process 60079]
[New LWP 114055 of process 60079]
[New LWP 114056 of process 60079]
warning: [Safe Mode] User elected to launch normally.
info: Using EGL/X11
info: CPU Name: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
info: CPU Speed: 3392.44MHz
info: Physical Cores: 4, Logical Cores: 8
info: Physical Memory: 23573MB Total, 15891MB Free
info: Kernel Version: FreeBSD 14.2-RELEASE-p1
info: Distribution: FreeBSD "14.2"
info: Desktop Environment: KDE
info: Session Type: x11
info: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.21.1
[New LWP 114063 of process 60079]
[New LWP 114064 of process 60079]
info: Qt Version: 6.8.2 (runtime), 6.8.2 (compiled)
info: Portable mode: false
info: OBS 31.0.0 (freebsd)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
        samples per sec: 48000
        speakers:        2
        max buffering:   960 milliseconds
        buffering type:  dynamically increasing
[New LWP 114065 of process 60079]
info: ---------------------------------
info: Initializing OpenGL...

Thread 1 received signal SIGSEGV, Segmentation fault.
Address not mapped to object.
0x000000082087da2f in ?? () from /usr/local/lib/libobs-opengl.so.30
(gdb) bt
#0 0x000000082087da2f in ?? () from /usr/local/lib/libobs-opengl.so.30
#1 0x00000008208c1df0 in ?? () from /usr/local/lib/libobs-opengl.so.30
#2 0x00000008208c9938 in device_create () from /usr/local/lib/libobs-opengl.so.30
#3 0x0000000803b3fb50 in gs_create () from /usr/local/lib/libobs.so.30
#4 0x0000000803b0b7ef in obs_reset_video () from /usr/local/lib/libobs.so.30
#5 0x00000000004d5182 in ?? ()
#6 0x00000000004d8e57 in ?? ()
#7 0x0000000000635e42 in ?? ()
#8 0x000000000063aeba in ?? ()
#9 0x00000008055a7c3a in __libc_start1 () from /lib/libc.so.7
#10 0x000000000040f040 in ?? ()
(gdb)
 
Same issue with OBS-studio 31.0.0_2, I also have a segmentation fault problem on FreeBSD 14.2.

The processor : Intel Core i7-3770 CPU @ 3.40GHz
The graphics card : GeForce GTX 650

Code:
root@desktopfreebsd:~ # pkg info | grep nvidia
nvidia-driver-390-390.154.1401000_1 NVidia graphics card binary drivers for hardware OpenGL rendering
nvidia-settings-535.146.02_1   Display Control Panel for X NVidia driver
root@desktopfreebsd:~ #
root@desktopfreebsd:~ # pkg info nvidia-driver-390-390.154.1401000_1
nvidia-driver-390-390.154.1401000_1
Name           : nvidia-driver-390
Version        : 390.154.1401000_1
Installed on   : Sat Jan 11 14:51:10 2025 CET
Origin         : x11/nvidia-driver-390
Architecture   : FreeBSD:14:amd64
Prefix         : /usr/local
Categories     : x11 kld
Licenses       : NVIDIA
Maintainer     : danfe@FreeBSD.org
WWW            : https://www.nvidia.com/object/unix.html
Comment        : NVidia graphics card binary drivers for hardware OpenGL rendering
Options        :
        ACPI_PM        : on
        DOCS           : on
        LINUX          : on
        WBINVD         : off
Shared Libs required:
        libXext.so.6
        libX11.so.6
Shared Libs provided:
        libvdpau_nvidia.so.1
        libnvidia-tls.so.1
        libnvidia-ml.so.1
        libnvidia-glsi.so.1
        libnvidia-glcore.so.1
        libnvidia-eglcore.so.1
        libnvidia-cfg.so.1
        libGLESv2.so.2
        libGL.so.1
        libEGL.so.1
Annotations    :
        FreeBSD_version: 1401000
        build_timestamp: 2025-01-07T21:52:36+0000
        built_by       : poudriere-git-3.4.2
        port_checkout_unclean: no
        port_git_hash  : dddb9bab3
        ports_top_checkout_unclean: no
        ports_top_git_hash: dddb9bab3
        repo_type      : binary
        repository     : FreeBSD
Flat size      : 99.6MiB
Description    :
These are the official NVidia binary drivers for hardware OpenGL rendering
in X11, using the GLX extensions.
root@desktopfreebsd:~ #

Starting obs-studio :
Code:
root@desktopfreebsd:~ # obs -debug -verbose
error: Could not create dbus connection: The connection is closed
error: Could not create dbus connection: The connection is closed
debug: Attempted path: /usr/local/bin/../share/obs/obs-studio/locale/en-US.ini
debug: Attempted path: /usr/local/bin/../share/obs/obs-studio/locale.ini
debug: Attempted path: /usr/local/bin/../share/obs/obs-studio/themes
debug: Attempted path: /usr/local/bin/../share/obs/obs-studio/themes/
warning: Get on org.freedesktop.portal.Settings returned an invalid reply
warning: [Safe Mode] Unclean shutdown detected!
warning: [Safe Mode] User elected to launch normally.
info: Command Line Arguments: -debug -verbose
info: Using EGL/X11
info: CPU Name: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
info: CPU Speed: 3392.44MHz
info: Physical Cores: 4, Logical Cores: 8
info: Physical Memory: 23573MB Total, 17986MB Free
info: Kernel Version: FreeBSD 14.2-RELEASE-p1
info: Distribution: FreeBSD "14.2"
info: Desktop Environment: KDE
info: Session Type: x11
info: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.21.1
info: Qt Version: 6.8.2 (runtime), 6.8.2 (compiled)
info: Portable mode: false
info: OBS 31.0.0 (freebsd)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
        samples per sec: 48000
        speakers:        2
        max buffering:   960 milliseconds
        buffering type:  dynamically increasing
info: ---------------------------------
info: Initializing OpenGL...
Segmentation fault (core dumped)
root@desktopfreebsd:~ #

obs-studio [install from packages - without debugging mode] stack trace after crash :
Code:
root@desktopfreebsd:~ # gdb -q -iex "set auto-load safe-path /root/.config/gdb" obs
Reading symbols from obs...
(No debugging symbols found in obs)
(gdb) r
Starting program: /usr/local/bin/obs
warning: File "/usr/local/lib/libpython3.11.so.1.0-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "/root/.config/gdb".
To enable execution of this file add
        add-auto-load-safe-path /usr/local/lib/libpython3.11.so.1.0-gdb.py
line to your configuration file "/root/.config/gdb/gdbinit".
To completely disable this security protection add
        set auto-load safe-path /
line to your configuration file "/root/.config/gdb/gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
        info "(gdb)Auto-loading safe path"
warning: File "/usr/local/share/gdb/auto-load/lib/libc++.so.1-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "/root/.config/gdb".
warning: File "/usr/local/share/gdb/auto-load/usr/local/lib/libglib-2.0.so.0.8000.5-gdb.py" auto-loading has been declined by your `auto-load safe-path' set t
o "/root/.config/gdb".
warning: File "/usr/local/share/gdb/auto-load/usr/local/lib/libgobject-2.0.so.0.8000.5-gdb.py" auto-loading has been declined by your `auto-load safe-path' se
t to "/root/.config/gdb".
[New LWP 114031 of process 60079]
[New LWP 114032 of process 60079]
warning: Temporarily disabling breakpoints for unloaded shared library "/usr/local/llvm15/lib/libLLVM-15.so"
[New LWP 114033 of process 60079]
[New LWP 114034 of process 60079]
[New LWP 114035 of process 60079]
[New LWP 114036 of process 60079]
[New LWP 114037 of process 60079]
[New LWP 114038 of process 60079]
[New LWP 114039 of process 60079]
[New LWP 114040 of process 60079]
[New LWP 114041 of process 60079]
[New LWP 114042 of process 60079]
[New LWP 114043 of process 60079]
[New LWP 114044 of process 60079]
[New LWP 114045 of process 60079]
[New LWP 114046 of process 60079]
[New LWP 114047 of process 60079]
[New LWP 114048 of process 60079]
[New LWP 114049 of process 60079]
[New LWP 114050 of process 60079]
[New LWP 114051 of process 60079]
error: Could not create dbus connection: The connection is closed
error: Could not create dbus connection: The connection is closed
debug: Attempted path: /usr/local/bin/../share/obs/obs-studio/locale/en-US.ini
debug: Attempted path: /usr/local/bin/../share/obs/obs-studio/locale.ini
debug: Attempted path: /usr/local/bin/../share/obs/obs-studio/themes
debug: Attempted path: /usr/local/bin/../share/obs/obs-studio/themes/
warning: Get on org.freedesktop.portal.Settings returned an invalid reply
[New LWP 114053 of process 60079]
warning: [Safe Mode] Unclean shutdown detected!
[New LWP 114054 of process 60079]
[New LWP 114055 of process 60079]
[New LWP 114056 of process 60079]
warning: [Safe Mode] User elected to launch normally.
info: Using EGL/X11
info: CPU Name: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
info: CPU Speed: 3392.44MHz
info: Physical Cores: 4, Logical Cores: 8
info: Physical Memory: 23573MB Total, 15891MB Free
info: Kernel Version: FreeBSD 14.2-RELEASE-p1
info: Distribution: FreeBSD "14.2"
info: Desktop Environment: KDE
info: Session Type: x11
info: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.21.1
[New LWP 114063 of process 60079]
[New LWP 114064 of process 60079]
info: Qt Version: 6.8.2 (runtime), 6.8.2 (compiled)
info: Portable mode: false
info: OBS 31.0.0 (freebsd)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
        samples per sec: 48000
        speakers:        2
        max buffering:   960 milliseconds
        buffering type:  dynamically increasing
[New LWP 114065 of process 60079]
info: ---------------------------------
info: Initializing OpenGL...

Thread 1 received signal SIGSEGV, Segmentation fault.
Address not mapped to object.
0x000000082087da2f in ?? () from /usr/local/lib/libobs-opengl.so.30
(gdb) bt
#0 0x000000082087da2f in ?? () from /usr/local/lib/libobs-opengl.so.30
#1 0x00000008208c1df0 in ?? () from /usr/local/lib/libobs-opengl.so.30
#2 0x00000008208c9938 in device_create () from /usr/local/lib/libobs-opengl.so.30
#3 0x0000000803b3fb50 in gs_create () from /usr/local/lib/libobs.so.30
#4 0x0000000803b0b7ef in obs_reset_video () from /usr/local/lib/libobs.so.30
#5 0x00000000004d5182 in ?? ()
#6 0x00000000004d8e57 in ?? ()
#7 0x0000000000635e42 in ?? ()
#8 0x000000000063aeba in ?? ()
#9 0x00000008055a7c3a in __libc_start1 () from /lib/libc.so.7
#10 0x000000000040f040 in ?? ()
(gdb)
Hi,

Why are you trying to run obs-studio as root? Maybe that's the cause.
 
I think that your drm package version is built for FreeBSD 14.1 version and this can cause issues but i am not sure about nvidia drivers. Can you try compiling your drm driver from ports (you need to have src tree installed in /usr/src.)?
 
I think that your drm package version is built for FreeBSD 14.1 version and this can cause issues but i am not sure about nvidia drivers. Can you try compiling your drm driver from ports (you need to have src tree installed in /usr/src.)?
Excuse me, I can't compile the drm from ports, unfortunately I have this one PC only, I have all my work on it. I'm really sorry.
 
Same issue with OBS-studio 31.0.0_2, I also have a segmentation fault problem on FreeBSD 14.2.

The processor : Intel Core i7-3770 CPU @ 3.40GHz
The graphics card : GeForce GTX 650

Code:
root@desktopfreebsd:~ # pkg info | grep nvidia
nvidia-driver-390-390.154.1401000_1 NVidia graphics card binary drivers for hardware OpenGL rendering
nvidia-settings-535.146.02_1   Display Control Panel for X NVidia driver
root@desktopfreebsd:~ #
root@desktopfreebsd:~ # pkg info nvidia-driver-390-390.154.1401000_1
nvidia-driver-390-390.154.1401000_1
Name           : nvidia-driver-390
Version        : 390.154.1401000_1
Installed on   : Sat Jan 11 14:51:10 2025 CET
Origin         : x11/nvidia-driver-390
Architecture   : FreeBSD:14:amd64
Prefix         : /usr/local
Categories     : x11 kld
Licenses       : NVIDIA
Maintainer     : danfe@FreeBSD.org
WWW            : https://www.nvidia.com/object/unix.html
Comment        : NVidia graphics card binary drivers for hardware OpenGL rendering
Options        :
        ACPI_PM        : on
        DOCS           : on
        LINUX          : on
        WBINVD         : off
Shared Libs required:
        libXext.so.6
        libX11.so.6
Shared Libs provided:
        libvdpau_nvidia.so.1
        libnvidia-tls.so.1
        libnvidia-ml.so.1
        libnvidia-glsi.so.1
        libnvidia-glcore.so.1
        libnvidia-eglcore.so.1
        libnvidia-cfg.so.1
        libGLESv2.so.2
        libGL.so.1
        libEGL.so.1
Annotations    :
        FreeBSD_version: 1401000
        build_timestamp: 2025-01-07T21:52:36+0000
        built_by       : poudriere-git-3.4.2
        port_checkout_unclean: no
        port_git_hash  : dddb9bab3
        ports_top_checkout_unclean: no
        ports_top_git_hash: dddb9bab3
        repo_type      : binary
        repository     : FreeBSD
Flat size      : 99.6MiB
Description    :
These are the official NVidia binary drivers for hardware OpenGL rendering
in X11, using the GLX extensions.
root@desktopfreebsd:~ #

Starting obs-studio :
Code:
root@desktopfreebsd:~ # obs -debug -verbose
error: Could not create dbus connection: The connection is closed
error: Could not create dbus connection: The connection is closed
debug: Attempted path: /usr/local/bin/../share/obs/obs-studio/locale/en-US.ini
debug: Attempted path: /usr/local/bin/../share/obs/obs-studio/locale.ini
debug: Attempted path: /usr/local/bin/../share/obs/obs-studio/themes
debug: Attempted path: /usr/local/bin/../share/obs/obs-studio/themes/
warning: Get on org.freedesktop.portal.Settings returned an invalid reply
warning: [Safe Mode] Unclean shutdown detected!
warning: [Safe Mode] User elected to launch normally.
info: Command Line Arguments: -debug -verbose
info: Using EGL/X11
info: CPU Name: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
info: CPU Speed: 3392.44MHz
info: Physical Cores: 4, Logical Cores: 8
info: Physical Memory: 23573MB Total, 17986MB Free
info: Kernel Version: FreeBSD 14.2-RELEASE-p1
info: Distribution: FreeBSD "14.2"
info: Desktop Environment: KDE
info: Session Type: x11
info: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.21.1
info: Qt Version: 6.8.2 (runtime), 6.8.2 (compiled)
info: Portable mode: false
info: OBS 31.0.0 (freebsd)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
        samples per sec: 48000
        speakers:        2
        max buffering:   960 milliseconds
        buffering type:  dynamically increasing
info: ---------------------------------
info: Initializing OpenGL...
Segmentation fault (core dumped)
root@desktopfreebsd:~ #

obs-studio [install from packages - without debugging mode] stack trace after crash :
Code:
root@desktopfreebsd:~ # gdb -q -iex "set auto-load safe-path /root/.config/gdb" obs
Reading symbols from obs...
(No debugging symbols found in obs)
(gdb) r
Starting program: /usr/local/bin/obs 
warning: File "/usr/local/lib/libpython3.11.so.1.0-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "/root/.config/gdb".
To enable execution of this file add
        add-auto-load-safe-path /usr/local/lib/libpython3.11.so.1.0-gdb.py
line to your configuration file "/root/.config/gdb/gdbinit".
To completely disable this security protection add
        set auto-load safe-path /
line to your configuration file "/root/.config/gdb/gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
        info "(gdb)Auto-loading safe path"
warning: File "/usr/local/share/gdb/auto-load/lib/libc++.so.1-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "/root/.config/gdb".
warning: File "/usr/local/share/gdb/auto-load/usr/local/lib/libglib-2.0.so.0.8000.5-gdb.py" auto-loading has been declined by your `auto-load safe-path' set t
o "/root/.config/gdb".
warning: File "/usr/local/share/gdb/auto-load/usr/local/lib/libgobject-2.0.so.0.8000.5-gdb.py" auto-loading has been declined by your `auto-load safe-path' se
t to "/root/.config/gdb".
[New LWP 114031 of process 60079]
[New LWP 114032 of process 60079]
warning: Temporarily disabling breakpoints for unloaded shared library "/usr/local/llvm15/lib/libLLVM-15.so"
[New LWP 114033 of process 60079]
[New LWP 114034 of process 60079]
[New LWP 114035 of process 60079]
[New LWP 114036 of process 60079]
[New LWP 114037 of process 60079]
[New LWP 114038 of process 60079]
[New LWP 114039 of process 60079]
[New LWP 114040 of process 60079]
[New LWP 114041 of process 60079]
[New LWP 114042 of process 60079]
[New LWP 114043 of process 60079]
[New LWP 114044 of process 60079]
[New LWP 114045 of process 60079]
[New LWP 114046 of process 60079]
[New LWP 114047 of process 60079]
[New LWP 114048 of process 60079]
[New LWP 114049 of process 60079]
[New LWP 114050 of process 60079]
[New LWP 114051 of process 60079]
error: Could not create dbus connection: The connection is closed
error: Could not create dbus connection: The connection is closed
debug: Attempted path: /usr/local/bin/../share/obs/obs-studio/locale/en-US.ini
debug: Attempted path: /usr/local/bin/../share/obs/obs-studio/locale.ini
debug: Attempted path: /usr/local/bin/../share/obs/obs-studio/themes
debug: Attempted path: /usr/local/bin/../share/obs/obs-studio/themes/
warning: Get on org.freedesktop.portal.Settings returned an invalid reply
[New LWP 114053 of process 60079]
warning: [Safe Mode] Unclean shutdown detected!
[New LWP 114054 of process 60079]
[New LWP 114055 of process 60079]
[New LWP 114056 of process 60079]
warning: [Safe Mode] User elected to launch normally.
info: Using EGL/X11
info: CPU Name: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
info: CPU Speed: 3392.44MHz
info: Physical Cores: 4, Logical Cores: 8
info: Physical Memory: 23573MB Total, 15891MB Free
info: Kernel Version: FreeBSD 14.2-RELEASE-p1
info: Distribution: FreeBSD "14.2"
info: Desktop Environment: KDE
info: Session Type: x11
info: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.21.1
[New LWP 114063 of process 60079]
[New LWP 114064 of process 60079]
info: Qt Version: 6.8.2 (runtime), 6.8.2 (compiled)
info: Portable mode: false
info: OBS 31.0.0 (freebsd)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
        samples per sec: 48000
        speakers:        2
        max buffering:   960 milliseconds
        buffering type:  dynamically increasing
[New LWP 114065 of process 60079]
info: ---------------------------------
info: Initializing OpenGL...

Thread 1 received signal SIGSEGV, Segmentation fault.
Address not mapped to object.
0x000000082087da2f in ?? () from /usr/local/lib/libobs-opengl.so.30
(gdb) bt
#0 0x000000082087da2f in ?? () from /usr/local/lib/libobs-opengl.so.30
#1 0x00000008208c1df0 in ?? () from /usr/local/lib/libobs-opengl.so.30
#2 0x00000008208c9938 in device_create () from /usr/local/lib/libobs-opengl.so.30
#3 0x0000000803b3fb50 in gs_create () from /usr/local/lib/libobs.so.30
#4 0x0000000803b0b7ef in obs_reset_video () from /usr/local/lib/libobs.so.30
#5 0x00000000004d5182 in ?? ()
#6 0x00000000004d8e57 in ?? ()
#7 0x0000000000635e42 in ?? ()
#8 0x000000000063aeba in ?? ()
#9 0x00000008055a7c3a in __libc_start1 () from /lib/libc.so.7
#10 0x000000000040f040 in ?? ()
(gdb)
Obs-studio will crash if you install these plugins : obs-streamfx , obs-recursion-effect.
Please remove obs-streamfx and obs-recursion-effect, this will correct the issue.

OBS-Studio on FreeBSD 14-2-P3.png
 
Back
Top