Hi all
So I’m only a few days into nix but I’m very keen to try to understand what’s going on here a little better…
I am on a vanilla fedora 36 installation right now, nvidia GPU and all that stuff natively…
So I just installed the 22.05
release of obs-studio
via nix however when I run the package I get an odd error:
Failed to initialize video. Your GPU may not be supported, or your graphics drivers may need to be updated.
This doesn’t make sense as I can run the obs flatpak and rpm versions just fine right now…
am I missing some nvidia deps maybe?
(The reason I’m here is so that I can just run OBS and the “backgroundremoval” plugin, plus I really like what I’ve learned about nix thus far)
To install I have ran: $ nix-env -iA nixpkgs.obs-studio
To launch OBS I ran: $ nix-shell -p obs-studio $ obs
Logs and screenshot follow
❯ nix-channel --list
unstable https://nixos.org/channels/nixpkgs-unstable
~
❯ nix-env -q "*"
~
❯ nix-env -iA nixpkgs.obs-studio
installing 'obs-studio-27.2.4'
building '/nix/store/50r0lypb9a0gzgd0jv98q9p4d74hy7dx-user-environment.drv'...
~
❯ nix-env -iA nixpkgs.obs-studio-plugins.obs-backgroundremoval
installing 'obs-backgroundremoval-0.4.0'
~
❯ nix-env -q "*"
obs-backgroundremoval-0.4.0
obs-studio-27.2.4
~
❯ nix-shell -p obs-studio
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
[nix-shell:~]$ pwd
/home/starkers
[nix-shell:~]$ git remote -v
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
[nix-shell:~]$ obs
obs obs-ffmpeg-mux
[nix-shell:~]$ which obs
/nix/store/6cn8zxys4lqb7r8zycapqq2x0sbfxsyd-obs-studio-27.2.4/bin/obs
[nix-shell:~]$ obs
(process:253611): Gtk-WARNING **: 14:21:09.021: Locale not supported by C library.
Using the fallback 'C' locale.
Gtk-Message: 14:21:09.041: Failed to load module "canberra-gtk-module"
Gtk-Message: 14:21:09.041: Failed to load module "pk-gtk-module"
Gtk-Message: 14:21:09.041: Failed to load module "canberra-gtk-module"
Gtk-Message: 14:21:09.041: Failed to load module "pk-gtk-module"
Attempted path: share/obs/obs-studio/locale/en-US.ini
Attempted path: /nix/store/6cn8zxys4lqb7r8zycapqq2x0sbfxsyd-obs-studio-27.2.4/share/obs/obs-studio/locale/en-US.ini
Attempted path: share/obs/obs-studio/themes/Dark.qss
Attempted path: /nix/store/6cn8zxys4lqb7r8zycapqq2x0sbfxsyd-obs-studio-27.2.4/share/obs/obs-studio/themes/Dark.qss
info: CPU Name: AMD Ryzen 5 3600 6-Core Processor
info: CPU Speed: 4200.039MHz
info: Physical Cores: 6, Logical Cores: 12
info: Physical Memory: 64246MB Total, 33863MB Free
info: Kernel Version: Linux 5.19.14-200.fc36.x86_64
info: Distribution: "Fedora Linux" 36
info: Session Type: x11
info: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.20.14
info: Qt Version: 5.15.6 (runtime), 5.15.6 (compiled)
info: Portable mode: false
Attempted path: share/obs/obs-studio/themes/Dark/no_sources.svg
Attempted path: /nix/store/6cn8zxys4lqb7r8zycapqq2x0sbfxsyd-obs-studio-27.2.4/share/obs/obs-studio/themes/Dark/no_sources.svg
QMetaObject::connectSlotsByName: No matching signal for on_tbar_position_valueChanged(int)
QMetaObject::connectSlotsByName: No matching signal for on_actionShowTransitionProperties_triggered()
QMetaObject::connectSlotsByName: No matching signal for on_actionHideTransitionProperties_triggered()
info: OBS 27.2.4 (linux)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
samples per sec: 48000
speakers: 2
info: ---------------------------------
info: Initializing OpenGL...
error: ARB_GLX_create_context not supported!
error: Failed to create context!
error: device_create (GL) failed
error: Failed to initialize video. Your GPU may not be supported, or your graphics drivers may need to be updated.
qt.glx: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::NoProfile)
No XVisualInfo for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::NoProfile)
Falling back to using screens root_visual.
^Cinfo: ==== Shutting down ==================================================
info: All scene data cleared
info: ------------------------------------------------
info: Freeing OBS context data
info: == Profiler Results =============================
info: run_program_init: 399824 ms
info: ┣OBSApp::AppInit: 1.454 ms
info: ┃ ┗OBSApp::InitLocale: 0.558 ms
info: ┗OBSApp::OBSInit: 196.267 ms
info: ┣obs_startup: 1.07 ms
info: ┗OBSBasic::OBSInit: 13.348 ms
info: ┣OBSBasic::InitBasicConfig: 0.055 ms
info: ┣OBSBasic::ResetAudio: 0.084 ms
info: ┗OBSBasic::ResetVideo: 13.18 ms
info: obs_hotkey_thread(25 ms): min=0.039 ms, median=0.069 ms, max=27.346 ms, 99th percentile=0.171 ms, 99.9937% below 25 ms
info: audio_thread(Audio): min=0 ms, median=0.005 ms, max=0.03 ms, 99th percentile=0.015 ms
info: =================================================
info: == Profiler Time Between Calls ==================
info: obs_hotkey_thread(25 ms): min=25.061 ms, median=25.129 ms, max=52.404 ms, 99.7484% within ±2% of 25 ms (0% lower, 0.25162% higher)
info: =================================================
info: Number of memory leaks: 0
[nix-shell:~]$ ^C