NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.24k stars 14.23k forks source link

OBS Studio hangs in uninterruptible sleep since updating from 23.11 #330149

Open n-sweep opened 3 months ago

n-sweep commented 3 months ago

Describe the bug

obs-studio hangs on launch since updating from 23.11

Steps To Reproduce

Steps to reproduce the behavior:

After updating from 23.11...

  1. obs-studio installed via home-manager (the same behavior is observed when using nix-shell, as we'll see below)
  2. run obs via dmenu

Expected behavior

OBS launches as normal

Actual behavior

  1. if this is the first time the command has been run since boot, nothing happens
  2. if the command has been run before, the window below is shown, then nothing happens

Screenshots

image

Additional context

Output of ps aux | rg obs:

n        1986423  0.1  0.2 644540 77992 ?        Sl   07:02   0:00 /etc/profiles/per-user/n/bin/obs
n        1991240  0.0  0.0   8884  6560 pts/14   S+   07:05   0:00 rg obs
n        2396316  1.3  0.7 2037344 235816 ?      Dl   Jul24  38:34 /etc/profiles/per-user/n/bin/obs

Running via nix-shell:

  1. run nix-shell -p obs-studio
  2. run obs to start OBS Studio

Output:

debug: Attempted path: share/obs/obs-studio/locale/en-US.ini
debug: Attempted path: /nix/store/p5dnqxjnaksck2rk930d833dahj9sb3k-obs-studio-30.1.2/share/obs/obs-studio/locale/en-US.ini
debug: Attempted path: share/obs/obs-studio/locale.ini
debug: Attempted path: /nix/store/p5dnqxjnaksck2rk930d833dahj9sb3k-obs-studio-30.1.2/share/obs/obs-studio/locale.ini
debug: Attempted path: share/obs/obs-studio/themes
debug: Attempted path: /nix/store/p5dnqxjnaksck2rk930d833dahj9sb3k-obs-studio-30.1.2/share/obs/obs-studio/themes
debug: Attempted path: share/obs/obs-studio/themes/Yami.qss
debug: Attempted path: /nix/store/p5dnqxjnaksck2rk930d833dahj9sb3k-obs-studio-30.1.2/share/obs/obs-studio/themes/Yami.qss

at this point, the window in the screenshot above is shown. if I select "Launch Anyway":

warning: ================================
warning: Warning: OBS is already running!
warning: ================================
warning: User is now running multiple instances of OBS!
info: Using EGL/X11
info: CPU Name: 12th Gen Intel(R) Core(TM) i7-12700H
info: CPU Speed: 1702.877MHz
info: Physical Cores: 14, Logical Cores: 20
info: Physical Memory: 31786MB Total, 15459MB Free
info: Kernel Version: Linux 6.6.41
info: Distribution: NixOS "24.05"
info: Desktop Environment: none+i3 (none+i3)
info: Session Type: x11
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 (linux)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
        samples per sec: 48000
        speakers:        2
        max buffering:   960 milliseconds
        buffering type:  dynamically increasing
info: ---------------------------------
info: Initializing OpenGL...
info: Loading up OpenGL on adapter Intel Mesa Intel(R) Graphics (ADL GT2)
info: OpenGL loaded successfully, version 4.6 (Core Profile) Mesa 24.0.7, shading language 4.60
info: ---------------------------------
info: video settings reset:
        base resolution:   2560x1440
        output resolution: 1920x1080
        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: Default
        id: default
info: ---------------------------------
warning: No AJA devices found, skipping loading AJA UI plugin
warning: Failed to initialize module 'aja-output-ui.so'
warning: No AJA devices found, skipping loading AJA plugin
warning: Failed to initialize module 'aja.so'
warning: Failed to load 'en-US' text for module: 'decklink-captions.so'
warning: Failed to load 'en-US' text for module: 'decklink-output-ui.so'
libDeckLinkAPI.so: cannot open shared object file: No such file or directory
warning: A DeckLink iterator could not be created.  The DeckLink drivers may not be installed
warning: Failed to initialize module 'decklink.so'
info: [pipewire] No captures available
warning: v4l2loopback not installed, virtual camera disabled
info: [obs-browser]: Version 2.23.4
info: [obs-browser]: CEF Version 121.0.6167.184 (runtime), 121.3.13+g5c4a81b+chromium-121.0.6167.184 (compiled)
error: os_dlopen(libnvidia-encode.so.1->libnvidia-encode.so.1): libnvidia-encode.so.1: cannot open shared object file: No such file or directory

error: VAAPI: Failed to initialize display in vaapi_device_h264_supported

Notify maintainers

@eclairevoyant @jb55 @materus @fpletz

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

n@xps:~ λ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.41, NixOS, 24.05 (Uakari), 24.05.20240719.0c53b6b`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.5`
 - nixpkgs: `/nix/store/qszplw617r895nbcprgyj139c9a3r0xs-source`

Add a :+1: reaction to issues you find important.

eclairevoyant commented 3 months ago

Based on the last error... mind running nix-shell -p libva-utils --run vainfo?

n-sweep commented 3 months ago

thanks for the response @eclairevoyant! here's the result:

n@xps λ nix-shell -p libva-utils --run vainfo
this path will be fetched (0.49 MiB download, 3.39 MiB unpacked):
  /nix/store/ppybbrla0h9sq54wars85j89iiag9xh0-libva-utils-2.21.0
copying path '/nix/store/ppybbrla0h9sq54wars85j89iiag9xh0-libva-utils-2.21.0' from 'https://cache.nixos.org'...
Trying display: wayland
Trying display: x11
libva info: VA-API version 1.21.0
libva info: Trying to open /run/opengl-driver/lib/dri/iHD_drv_video.so
libva info: Trying to open /usr/lib/dri/iHD_drv_video.so
libva info: Trying to open /usr/lib32/dri/iHD_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Trying to open /usr/lib/i386-linux-gnu/dri/iHD_drv_video.so
libva info: va_openDriver() returns -1
libva info: Trying to open /run/opengl-driver/lib/dri/i965_drv_video.so
libva info: Trying to open /usr/lib/dri/i965_drv_video.so
libva info: Trying to open /usr/lib32/dri/i965_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Trying to open /usr/lib/i386-linux-gnu/dri/i965_drv_video.so
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit
eclairevoyant commented 3 months ago

probably a config error then, look into https://wiki.archlinux.org/title/Hardware_video_acceleration#Configuring_VA-API etc.

n-sweep commented 3 months ago

@eclairevoyant thanks for the documentation, any insight into what changed from 23.11 to 24.05 that would lead to this? aside from the channel, my config hasn't changed since the package worked.

fpletz commented 3 months ago

But why would obs show no UI if there is no VAAPI support? This is a weird issue.

n-sweep commented 3 months ago

the config steps at https://wiki.archlinux.org/title/Hardware_video_acceleration#Configuring_VA-API unfortunately didn't affect the behavior

But why would obs show no UI if there is no VAAPI support? This is a weird issue.

I also cannot kill the obs processes once started, they can only be stopped by rebooting