nowrep / obs-vkcapture

OBS Linux Vulkan/OpenGL game capture
GNU General Public License v2.0
502 stars 24 forks source link

OBS-vkcapture-git not working or showing up in sources #99

Closed mercifulboss closed 1 year ago

mercifulboss commented 1 year ago

I did the necessary patches listed here: https://github.com/keylase/nvidia-patch

And downloaded obs-vkcapture-git and obs-nvfbc on archlinux.

Despite that, OBS won't show "Game Capture" in the sources window and I lose about 30fps in games when recording.

Here is the output in the terminal when I run OBS_USE_EGL=1 obs

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/Dark.qss

Attempted path: /usr/share/obs/obs-studio/themes/Dark.qss

info: Using EGL/X11

info: CPU Name: Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz

info: CPU Speed: 4600.238MHz

info: Physical Cores: 6, Logical Cores: 12

info: Physical Memory: 23908MB Total, 19771MB Free

info: Kernel Version: Linux 5.19.10-arch1-1

info: Distribution: "Arch Linux" Unknown

info: Session Type: x11

info: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.21.1

info: Qt Version: 5.15.6 (runtime), 5.15.5 (compiled)

info: Portable mode: false

Attempted path: share/obs/obs-studio/themes/Dark/no_sources.svg

Attempted path: /usr/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-2 (linux)

info: ---------------------------------

info: ---------------------------------

info: audio settings reset:

    samples per sec: 48000

    speakers:        2

info: ---------------------------------

info: Initializing OpenGL...

info: Loading up OpenGL on adapter Intel Mesa Intel(R) UHD Graphics (CML GT2)

info: OpenGL loaded successfully, version 4.6 (Core Profile) Mesa 22.1.7, shading language 4.60

info: ---------------------------------

info: video settings reset:

    base resolution:   1920x1200

    output resolution: 1920x1200

    downscale filter:  Bicubic

    fps:               60/1

    format:            NV12

    YUV mode:          709/Partial

info: NV12 texture support not available

info: Audio monitoring device:

    name: Default

    id: default

info: ---------------------------------

warning: Failed to load 'en-US' text for module: 'decklink-captions.so'

warning: Failed to load 'en-US' text for module: 'decklink-ouput-ui.so'

info: [pipewire] Available captures:

info: [pipewire]     - Desktop capture

info: [pipewire]     - Window capture

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

info: No blackmagic support

info: [linux-vkcapture] plugin loaded successfully (version 1.2.0)

Segmentation fault (core dumped)

It doesn't seem to detect my NVIDIA RTX 2060 laptop dedicated GPU either. I don't have nvidia-prime installed as Steam and lutris pick up my graphics card without it.

Please help.

nowrep commented 1 year ago

I can only see OBS crashing from the log. Can you run it in gdb and get a backtrace?

mercifulboss commented 1 year ago

I can only see OBS crashing from the log. Can you run it in gdb and get a backtrace?

Hello, thank you for your reply. I tried googling how to do a backtrace and it said to do something like this: Not sure if i did this correctly

Command I used: gdb -ex=r --args obs OBS_USE_EGL=1

Output:

'GNU gdb (GDB) 12.1 Copyright (C) 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: https://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/.`

`For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from obs... (No debugging symbols found in obs) Starting program: /usr/bin/obs OBS_USE_EGL=1 [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". [New Thread 0x7fffe3b936c0 (LWP 101802)] [New Thread 0x7fffe33926c0 (LWP 101803)] [New Thread 0x7fffe1ce36c0 (LWP 101804)] [New Thread 0x7fffe14e26c0 (LWP 101805)] [New Thread 0x7fffe099c6c0 (LWP 101806)] [New Thread 0x7fffcbfff6c0 (LWP 101807)] [New Thread 0x7fffcb7fe6c0 (LWP 101808)] [New Thread 0x7fffcaffd6c0 (LWP 101809)] 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/Dark.qss Attempted path: /usr/share/obs/obs-studio/themes/Dark.qss info: Command Line Arguments: OBS_USE_EGL=1 info: CPU Name: Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz info: CPU Speed: 2600.123MHz info: Physical Cores: 6, Logical Cores: 12 info: Physical Memory: 23908MB Total, 10286MB Free info: Kernel Version: Linux 5.19.10-arch1-1 info: Distribution: "Arch Linux" Unknown info: Session Type: x11 info: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.21.1 [New Thread 0x7fffca3ff6c0 (LWP 101810)] [New Thread 0x7fffc9bfe6c0 (LWP 101811)] info: Qt Version: 5.15.6 (runtime), 5.15.5 (compiled) info: Portable mode: false Attempted path: share/obs/obs-studio/themes/Dark/no_sources.svg Attempted path: /usr/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-2 (linux) info: --------------------------------- info: --------------------------------- info: audio settings reset: samples per sec: 48000 speakers: 2 [New Thread 0x7fffc93fd6c0 (LWP 101812)] info: --------------------------------- info: Initializing OpenGL... [New Thread 0x7fffc8abb6c0 (LWP 101813)] [New Thread 0x7fffb25ff6c0 (LWP 101814)] [New Thread 0x7fffb1dfe6c0 (LWP 101815)] [New Thread 0x7fffb15fd6c0 (LWP 101816)] [New Thread 0x7fffb0dfc6c0 (LWP 101817)] [New Thread 0x7fffa4dff6c0 (LWP 101818)] [New Thread 0x7fff8ffff6c0 (LWP 101819)] [New Thread 0x7fff8f7fe6c0 (LWP 101820)] [New Thread 0x7fff8effd6c0 (LWP 101821)] [New Thread 0x7fff8e7fc6c0 (LWP 101822)] [New Thread 0x7fff8dffb6c0 (LWP 101823)] info: Loading up OpenGL on adapter Intel Mesa Intel(R) UHD Graphics (CML GT2) info: OpenGL loaded successfully, version 4.6 (Core Profile) Mesa 22.1.7, shading language 4.60 info: --------------------------------- info: video settings reset: base resolution: 1920x1200 output resolution: 1920x1200 downscale filter: Bicubic fps: 60/1 format: NV12 YUV mode: 709/Partial [New Thread 0x7fff8d7fa6c0 (LWP 101824)] info: NV12 texture support not available [New Thread 0x7fff72bff6c0 (LWP 101825)] info: Audio monitoring device: name: Default id: default info: --------------------------------- warning: Failed to load 'en-US' text for module: 'decklink-captions.so' warning: Failed to load 'en-US' text for module: 'decklink-ouput-ui.so' [New Thread 0x7fff723fe6c0 (LWP 101826)] 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 info: No blackmagic support [Detaching after vfork from child process 101835] error: [linux-vkcapture] linux-vkcapture cannot run on non-EGL platforms warning: Failed to initialize module 'linux-vkcapture.so' error: OpenGL extension GLX_NV_copy_image not supported warning: Failed to initialize module 'nvfbc.so' info: NVENC supported info: FFMPEG VAAPI supported [New Thread 0x7fff70acf6c0 (LWP 101837)] [New Thread 0x7fff67fff6c0 (LWP 101838)] info: --------------------------------- info: Loaded Modules: info: text-freetype2.so info: sndio.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: decklink-ouput-ui.so info: decklink-captions.so info: --------------------------------- info: ==== Startup complete =============================================== [Thread 0x7fff67fff6c0 (LWP 101838) exited] info: All scene data cleared info: ------------------------------------------------ [New Thread 0x7fff67fff6c0 (LWP 101839)] info: pulse-input: Server name: 'PulseAudio (on PipeWire 0.3.58) 15.0.0' info: pulse-input: Audio format: s32le, 48000 Hz, 2 channels info: pulse-input: Started recording from 'alsa_output.pci-0000_00_1f.3.analog-stereo.monitor' info: [Loaded global audio device]: 'Desktop Audio' info: pulse-input: Server name: 'PulseAudio (on PipeWire 0.3.58) 15.0.0' info: pulse-input: Audio format: s16le, 48000 Hz, 1 channels info: pulse-input: Started recording from 'alsa_input.usb-046d_B525_HD_Webcam_244D2A10-00.mono-fallback' info: [Loaded global audio device]: 'Mic/Aux' info: - filter: 'Noise Suppression' (noise_suppress_filter_v2) info: - filter: 'Noise Gate' (noise_gate_filter) info: xshm-input: Geometry 1920x1200 @ 0,0 info: Switched to scene 'Scene' info: ------------------------------------------------ info: Loaded scenes: info: - scene 'Scene': info: - source: 'Screen Capture (XSHM)' (xshm_input) info: - source: 'Window Capture (Xcomposite)' (xcomposite_input) info: ------------------------------------------------ [New Thread 0x7fff659346c0 (LWP 101843)] [New Thread 0x7fff651336c0 (LWP 101844)] [New Thread 0x7fff649326c0 (LWP 101845)] [New Thread 0x7fff4ffff6c0 (LWP 101846)] [New Thread 0x7fff4f7fe6c0 (LWP 101847)] [New Thread 0x7fff4effd6c0 (LWP 101848)] [New Thread 0x7fff4e7fc6c0 (LWP 101849)] [New Thread 0x7fff4dffb6c0 (LWP 101850)] [New Thread 0x7fff4d7fa6c0 (LWP 101851)] [New Thread 0x7fff4cff96c0 (LWP 101852)] [Thread 0x7fff70acf6c0 (LWP 101837) exited] Attempted path: share/obs/obs-studio/images/overflow.png Attempted path: /usr/share/obs/obs-studio/images/overflow.png info: adding 64 milliseconds of audio buffering, total audio buffering is now 64 milliseconds (source: Desktop Audio)

info: adding 42 milliseconds of audio buffering, total audio buffering is now 106 milliseconds (source: Mic/Aux)

info: ==== Shutting down ================================================== info: pulse-input: Stopped recording from 'alsa_output.pci-0000_00_1f.3.analog-stereo.monitor' info: pulse-input: Got 1281 packets with 2623488 frames info: pulse-input: Stopped recording from 'alsa_input.usb-046d_B525_HD_Webcam_244D2A10-00.mono-fallback' info: pulse-input: Got 1281 packets with 2623488 frames [Thread 0x7fff67fff6c0 (LWP 101839) exited] error: X Error: BadWindow (invalid Window parameter), Major opcode: BadValue (integer parameter out of range for operation), Minor opcode: 0, Serial: 5298 error: X Error: BadWindow (invalid Window parameter), Major opcode: 142, Minor opcode: BadWindow (invalid Window parameter), Serial: 5299 info: All scene data cleared info: ------------------------------------------------ [Thread 0x7fff8d7fa6c0 (LWP 101824) exited] [Thread 0x7fff72bff6c0 (LWP 101825) exited] [Thread 0x7fffc93fd6c0 (LWP 101812) exited] [Thread 0x7fffca3ff6c0 (LWP 101810) exited] info: [Scripting] Total detached callbacks: 0 info: Freeing OBS context data [Thread 0x7fff723fe6c0 (LWP 101826) exited] [Thread 0x7fffc9bfe6c0 (LWP 101811) exited] [Thread 0x7fff8dffb6c0 (LWP 101823) exited] [Thread 0x7fff4cff96c0 (LWP 101852) exited] [Thread 0x7fff4d7fa6c0 (LWP 101851) exited] [Thread 0x7fff4dffb6c0 (LWP 101850) exited] [Thread 0x7fff4e7fc6c0 (LWP 101849) exited] [Thread 0x7fff4effd6c0 (LWP 101848) exited] [Thread 0x7fff4f7fe6c0 (LWP 101847) exited] [Thread 0x7fff4ffff6c0 (LWP 101846) exited] [Thread 0x7fff649326c0 (LWP 101845) exited] [Thread 0x7fff651336c0 (LWP 101844) exited] [Thread 0x7fff659346c0 (LWP 101843) exited] [Thread 0x7fffe099c6c0 (LWP 101806) exited] [Thread 0x7fffe33926c0 (LWP 101803) exited] [Thread 0x7fffcb7fe6c0 (LWP 101808) exited] [Thread 0x7fffcaffd6c0 (LWP 101809) exited] [Thread 0x7fffcbfff6c0 (LWP 101807) exited] info: == Profiler Results ============================= info: run_program_init: 1056.19 ms info: ┣OBSApp::AppInit: 2.15 ms info: ┃ ┗OBSApp::InitLocale: 1.03 ms info: ┗OBSApp::OBSInit: 838.287 ms info: ┣obs_startup: 1.828 ms info: ┗OBSBasic::OBSInit: 795.613 ms info: ┣OBSBasic::InitBasicConfig: 0.084 ms info: ┣OBSBasic::ResetAudio: 0.321 ms info: ┣OBSBasic::ResetVideo: 187.189 ms info: ┣OBSBasic::InitOBSCallbacks: 0.004 ms info: ┣OBSBasic::InitHotkeys: 0.042 ms info: ┣obs_load_all_modules: 230.857 ms info: ┃ ┣obs_init_module(decklink-captions.so): 0.026 ms info: ┃ ┣obs_init_module(decklink-ouput-ui.so): 0.521 ms info: ┃ ┣obs_init_module(frontend-tools.so): 78.449 ms info: ┃ ┣obs_init_module(image-source.so): 0.005 ms info: ┃ ┣obs_init_module(linux-alsa.so): 0.002 ms info: ┃ ┣obs_init_module(linux-capture.so): 0.393 ms info: ┃ ┣obs_init_module(linux-decklink.so): 0.105 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): 6.107 ms info: ┃ ┣obs_init_module(linux-vkcapture.so): 0.049 ms info: ┃ ┣obs_init_module(nvfbc.so): 11.74 ms info: ┃ ┣obs_init_module(obs-ffmpeg.so): 8.49 ms info: ┃ ┃ ┗nvenc_check: 8.357 ms info: ┃ ┣obs_init_module(obs-filters.so): 0.017 ms info: ┃ ┣obs_init_module(obs-libfdk.so): 0.001 ms info: ┃ ┣obs_init_module(obs-outputs.so): 0.002 ms info: ┃ ┣obs_init_module(obs-transitions.so): 0.005 ms info: ┃ ┣obs_init_module(obs-x264.so): 0.001 ms info: ┃ ┣obs_init_module(rtmp-services.so): 0.213 ms info: ┃ ┣obs_init_module(sndio.so): 0.002 ms info: ┃ ┗obs_init_module(text-freetype2.so): 0.009 ms info: ┣OBSBasic::ResetOutputs: 0.12 ms info: ┣OBSBasic::CreateHotkeys: 0.034 ms info: ┣OBSBasic::InitService: 0.979 ms info: ┣OBSBasic::InitPrimitives: 0.134 ms info: ┗OBSBasic::Load: 68.526 ms info: obs_hotkey_thread(25 ms): min=0.1 ms, median=7.145 ms, max=44.613 ms, 99th percentile=24.8 ms, 99.1202% below 25 ms info: audio_thread(Audio): min=0 ms, median=0.046 ms, max=0.221 ms, 99th percentile=0.147 ms info: obs_graphics_thread(16.6667 ms): min=0.035 ms, median=32.324 ms, max=75.683 ms, 99th percentile=58.307 ms, 4.13994% below 16.667 ms info: ┣tick_sources: min=0 ms, median=30.926 ms, max=68.418 ms, 99th percentile=37.376 ms info: ┣output_frame: min=0.019 ms, median=0.135 ms, max=18.899 ms, 99th percentile=0.223 ms info: ┃ ┗gs_context(video->graphics): min=0.018 ms, median=0.135 ms, max=18.898 ms, 99th percentile=0.223 ms info: ┃ ┣render_video: min=0.011 ms, median=0.07 ms, max=18.77 ms, 99th percentile=0.137 ms info: ┃ ┃ ┗render_main_texture: min=0.009 ms, median=0.067 ms, max=18.767 ms, 99th percentile=0.133 ms info: ┃ ┗gs_flush: min=0.003 ms, median=0.052 ms, max=4.633 ms, 99th percentile=0.09 ms info: ┗render_displays: min=0.002 ms, median=0.326 ms, max=36.958 ms, 99th percentile=24.555 ms info: ================================================= info: == Profiler Time Between Calls ================== info: obs_hotkey_thread(25 ms): min=25.166 ms, median=32.233 ms, max=69.722 ms, 0.762911% within ±2% of 25 ms (0% lower, 99.2371% higher) info: obs_graphics_thread(16.6667 ms): min=8.251 ms, median=32.334 ms, max=75.69 ms, 1.40023% within ±2% of 16.667 ms (2.68378% lower, 95.916% higher) info: ================================================= info: Number of memory leaks: 0 [Thread 0x7fff8e7fc6c0 (LWP 101822) exited] [Thread 0x7fff8effd6c0 (LWP 101821) exited] [Thread 0x7fff8f7fe6c0 (LWP 101820) exited] [Thread 0x7fffb0dfc6c0 (LWP 101817) exited] [Thread 0x7fffb15fd6c0 (LWP 101816) exited] [Thread 0x7fffb1dfe6c0 (LWP 101815) exited] [Thread 0x7fffa4dff6c0 (LWP 101818) exited] [Thread 0x7fff8ffff6c0 (LWP 101819) exited] [Thread 0x7fffb25ff6c0 (LWP 101814) exited] [Thread 0x7fffc8abb6c0 (LWP 101813) exited] [Thread 0x7fffe3b936c0 (LWP 101802) exited] [Thread 0x7fffe1ce36c0 (LWP 101804) exited] [Thread 0x7fffe40ed080 (LWP 101799) exited] [Thread 0x7fffe14e26c0 (LWP 101805) exited] [New process 101799] [Inferior 1 (process 101799) exited normally]`

I only get a crash when using OBS_USE_EGL=1 obs but I don't have "gamecapture" appear in sources despite having installed 'obs-vkcapture' and 'obs-nvfbc' packages. I am on Gnome Xorg with Nvidia. Crash appears when I run OBS_USE_EGL=1 obs in terminal (I was told that was the command that was necessary to get obs to show gamecapture in sources)

nowrep commented 1 year ago

It needs to be OBS_USE_EGL=1 gdb -ex=r --args obs

Also Game Capture will only be available when running with EGL.

mercifulboss commented 1 year ago

It needs to be OBS_USE_EGL=1 gdb -ex=r --args obs

Also Game Capture will only be available when running with EGL.

Thank you for your rapid response!

Using the above command I get the following output (with a crash):

GNU gdb (GDB) 12.1 Copyright (C) 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: https://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/.

For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from obs... (No debugging symbols found in obs) Starting program: /usr/bin/obs OBS_USE_EGL=1 [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". [New Thread 0x7fffe3b936c0 (LWP 101802)] [New Thread 0x7fffe33926c0 (LWP 101803)] [New Thread 0x7fffe1ce36c0 (LWP 101804)] [New Thread 0x7fffe14e26c0 (LWP 101805)] [New Thread 0x7fffe099c6c0 (LWP 101806)] [New Thread 0x7fffcbfff6c0 (LWP 101807)] [New Thread 0x7fffcb7fe6c0 (LWP 101808)] [New Thread 0x7fffcaffd6c0 (LWP 101809)] 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/Dark.qss Attempted path: /usr/share/obs/obs-studio/themes/Dark.qss info: Command Line Arguments: OBS_USE_EGL=1 info: CPU Name: Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz info: CPU Speed: 2600.123MHz info: Physical Cores: 6, Logical Cores: 12 info: Physical Memory: 23908MB Total, 10286MB Free info: Kernel Version: Linux 5.19.10-arch1-1 info: Distribution: "Arch Linux" Unknown info: Session Type: x11 info: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.21.1 [New Thread 0x7fffca3ff6c0 (LWP 101810)] [New Thread 0x7fffc9bfe6c0 (LWP 101811)] info: Qt Version: 5.15.6 (runtime), 5.15.5 (compiled) info: Portable mode: false Attempted path: share/obs/obs-studio/themes/Dark/no_sources.svg Attempted path: /usr/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-2 (linux) info: --------------------------------- info: --------------------------------- info: audio settings reset: samples per sec: 48000 speakers: 2 [New Thread 0x7fffc93fd6c0 (LWP 101812)] info: --------------------------------- info: Initializing OpenGL... [New Thread 0x7fffc8abb6c0 (LWP 101813)] [New Thread 0x7fffb25ff6c0 (LWP 101814)] [New Thread 0x7fffb1dfe6c0 (LWP 101815)] [New Thread 0x7fffb15fd6c0 (LWP 101816)] [New Thread 0x7fffb0dfc6c0 (LWP 101817)] [New Thread 0x7fffa4dff6c0 (LWP 101818)] [New Thread 0x7fff8ffff6c0 (LWP 101819)] [New Thread 0x7fff8f7fe6c0 (LWP 101820)] [New Thread 0x7fff8effd6c0 (LWP 101821)] [New Thread 0x7fff8e7fc6c0 (LWP 101822)] [New Thread 0x7fff8dffb6c0 (LWP 101823)] info: Loading up OpenGL on adapter Intel Mesa Intel(R) UHD Graphics (CML GT2) info: OpenGL loaded successfully, version 4.6 (Core Profile) Mesa 22.1.7, shading language 4.60 info: --------------------------------- info: video settings reset: base resolution: 1920x1200 output resolution: 1920x1200 downscale filter: Bicubic fps: 60/1 format: NV12 YUV mode: 709/Partial [New Thread 0x7fff8d7fa6c0 (LWP 101824)] info: NV12 texture support not available [New Thread 0x7fff72bff6c0 (LWP 101825)] info: Audio monitoring device: name: Default id: default info: --------------------------------- warning: Failed to load 'en-US' text for module: 'decklink-captions.so' warning: Failed to load 'en-US' text for module: 'decklink-ouput-ui.so' [New Thread 0x7fff723fe6c0 (LWP 101826)] 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 info: No blackmagic support [Detaching after vfork from child process 101835] error: [linux-vkcapture] linux-vkcapture cannot run on non-EGL platforms warning: Failed to initialize module 'linux-vkcapture.so' error: OpenGL extension GLX_NV_copy_image not supported warning: Failed to initialize module 'nvfbc.so' info: NVENC supported info: FFMPEG VAAPI supported [New Thread 0x7fff70acf6c0 (LWP 101837)] [New Thread 0x7fff67fff6c0 (LWP 101838)] info: --------------------------------- info: Loaded Modules: info: text-freetype2.so info: sndio.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: decklink-ouput-ui.so info: decklink-captions.so info: --------------------------------- info: ==== Startup complete =============================================== [Thread 0x7fff67fff6c0 (LWP 101838) exited] info: All scene data cleared info: ------------------------------------------------ [New Thread 0x7fff67fff6c0 (LWP 101839)] info: pulse-input: Server name: 'PulseAudio (on PipeWire 0.3.58) 15.0.0' info: pulse-input: Audio format: s32le, 48000 Hz, 2 channels info: pulse-input: Started recording from 'alsa_output.pci-0000_00_1f.3.analog-stereo.monitor' info: [Loaded global audio device]: 'Desktop Audio' info: pulse-input: Server name: 'PulseAudio (on PipeWire 0.3.58) 15.0.0' info: pulse-input: Audio format: s16le, 48000 Hz, 1 channels info: pulse-input: Started recording from 'alsa_input.usb-046d_B525_HD_Webcam_244D2A10-00.mono-fallback' info: [Loaded global audio device]: 'Mic/Aux' info: - filter: 'Noise Suppression' (noise_suppress_filter_v2) info: - filter: 'Noise Gate' (noise_gate_filter) info: xshm-input: Geometry 1920x1200 @ 0,0 info: Switched to scene 'Scene' info: ------------------------------------------------ info: Loaded scenes: info: - scene 'Scene': info: - source: 'Screen Capture (XSHM)' (xshm_input) info: - source: 'Window Capture (Xcomposite)' (xcomposite_input) info: ------------------------------------------------ [New Thread 0x7fff659346c0 (LWP 101843)] [New Thread 0x7fff651336c0 (LWP 101844)] [New Thread 0x7fff649326c0 (LWP 101845)] [New Thread 0x7fff4ffff6c0 (LWP 101846)] [New Thread 0x7fff4f7fe6c0 (LWP 101847)] [New Thread 0x7fff4effd6c0 (LWP 101848)] [New Thread 0x7fff4e7fc6c0 (LWP 101849)] [New Thread 0x7fff4dffb6c0 (LWP 101850)] [New Thread 0x7fff4d7fa6c0 (LWP 101851)] [New Thread 0x7fff4cff96c0 (LWP 101852)] [Thread 0x7fff70acf6c0 (LWP 101837) exited] Attempted path: share/obs/obs-studio/images/overflow.png Attempted path: /usr/share/obs/obs-studio/images/overflow.png info: adding 64 milliseconds of audio buffering, total audio buffering is now 64 milliseconds (source: Desktop Audio)

info: adding 42 milliseconds of audio buffering, total audio buffering is now 106 milliseconds (source: Mic/Aux)

info: ==== Shutting down ================================================== info: pulse-input: Stopped recording from 'alsa_output.pci-0000_00_1f.3.analog-stereo.monitor' info: pulse-input: Got 1281 packets with 2623488 frames info: pulse-input: Stopped recording from 'alsa_input.usb-046d_B525_HD_Webcam_244D2A10-00.mono-fallback' info: pulse-input: Got 1281 packets with 2623488 frames [Thread 0x7fff67fff6c0 (LWP 101839) exited] error: X Error: BadWindow (invalid Window parameter), Major opcode: BadValue (integer parameter out of range for operation), Minor opcode: 0, Serial: 5298 error: X Error: BadWindow (invalid Window parameter), Major opcode: 142, Minor opcode: BadWindow (invalid Window parameter), Serial: 5299 info: All scene data cleared info: ------------------------------------------------ [Thread 0x7fff8d7fa6c0 (LWP 101824) exited] [Thread 0x7fff72bff6c0 (LWP 101825) exited] [Thread 0x7fffc93fd6c0 (LWP 101812) exited] [Thread 0x7fffca3ff6c0 (LWP 101810) exited] info: [Scripting] Total detached callbacks: 0 info: Freeing OBS context data [Thread 0x7fff723fe6c0 (LWP 101826) exited] [Thread 0x7fffc9bfe6c0 (LWP 101811) exited] [Thread 0x7fff8dffb6c0 (LWP 101823) exited] [Thread 0x7fff4cff96c0 (LWP 101852) exited] [Thread 0x7fff4d7fa6c0 (LWP 101851) exited] [Thread 0x7fff4dffb6c0 (LWP 101850) exited] [Thread 0x7fff4e7fc6c0 (LWP 101849) exited] [Thread 0x7fff4effd6c0 (LWP 101848) exited] [Thread 0x7fff4f7fe6c0 (LWP 101847) exited] [Thread 0x7fff4ffff6c0 (LWP 101846) exited] [Thread 0x7fff649326c0 (LWP 101845) exited] [Thread 0x7fff651336c0 (LWP 101844) exited] [Thread 0x7fff659346c0 (LWP 101843) exited] [Thread 0x7fffe099c6c0 (LWP 101806) exited] [Thread 0x7fffe33926c0 (LWP 101803) exited] [Thread 0x7fffcb7fe6c0 (LWP 101808) exited] [Thread 0x7fffcaffd6c0 (LWP 101809) exited] [Thread 0x7fffcbfff6c0 (LWP 101807) exited] info: == Profiler Results ============================= info: run_program_init: 1056.19 ms info: ┣OBSApp::AppInit: 2.15 ms info: ┃ ┗OBSApp::InitLocale: 1.03 ms info: ┗OBSApp::OBSInit: 838.287 ms info: ┣obs_startup: 1.828 ms info: ┗OBSBasic::OBSInit: 795.613 ms info: ┣OBSBasic::InitBasicConfig: 0.084 ms info: ┣OBSBasic::ResetAudio: 0.321 ms info: ┣OBSBasic::ResetVideo: 187.189 ms info: ┣OBSBasic::InitOBSCallbacks: 0.004 ms info: ┣OBSBasic::InitHotkeys: 0.042 ms info: ┣obs_load_all_modules: 230.857 ms info: ┃ ┣obs_init_module(decklink-captions.so): 0.026 ms info: ┃ ┣obs_init_module(decklink-ouput-ui.so): 0.521 ms info: ┃ ┣obs_init_module(frontend-tools.so): 78.449 ms info: ┃ ┣obs_init_module(image-source.so): 0.005 ms info: ┃ ┣obs_init_module(linux-alsa.so): 0.002 ms info: ┃ ┣obs_init_module(linux-capture.so): 0.393 ms info: ┃ ┣obs_init_module(linux-decklink.so): 0.105 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): 6.107 ms info: ┃ ┣obs_init_module(linux-vkcapture.so): 0.049 ms info: ┃ ┣obs_init_module(nvfbc.so): 11.74 ms info: ┃ ┣obs_init_module(obs-ffmpeg.so): 8.49 ms info: ┃ ┃ ┗nvenc_check: 8.357 ms info: ┃ ┣obs_init_module(obs-filters.so): 0.017 ms info: ┃ ┣obs_init_module(obs-libfdk.so): 0.001 ms info: ┃ ┣obs_init_module(obs-outputs.so): 0.002 ms info: ┃ ┣obs_init_module(obs-transitions.so): 0.005 ms info: ┃ ┣obs_init_module(obs-x264.so): 0.001 ms info: ┃ ┣obs_init_module(rtmp-services.so): 0.213 ms info: ┃ ┣obs_init_module(sndio.so): 0.002 ms info: ┃ ┗obs_init_module(text-freetype2.so): 0.009 ms info: ┣OBSBasic::ResetOutputs: 0.12 ms info: ┣OBSBasic::CreateHotkeys: 0.034 ms info: ┣OBSBasic::InitService: 0.979 ms info: ┣OBSBasic::InitPrimitives: 0.134 ms info: ┗OBSBasic::Load: 68.526 ms info: obs_hotkey_thread(25 ms): min=0.1 ms, median=7.145 ms, max=44.613 ms, 99th percentile=24.8 ms, 99.1202% below 25 ms info: audio_thread(Audio): min=0 ms, median=0.046 ms, max=0.221 ms, 99th percentile=0.147 ms info: obs_graphics_thread(16.6667 ms): min=0.035 ms, median=32.324 ms, max=75.683 ms, 99th percentile=58.307 ms, 4.13994% below 16.667 ms info: ┣tick_sources: min=0 ms, median=30.926 ms, max=68.418 ms, 99th percentile=37.376 ms info: ┣output_frame: min=0.019 ms, median=0.135 ms, max=18.899 ms, 99th percentile=0.223 ms info: ┃ ┗gs_context(video->graphics): min=0.018 ms, median=0.135 ms, max=18.898 ms, 99th percentile=0.223 ms info: ┃ ┣render_video: min=0.011 ms, median=0.07 ms, max=18.77 ms, 99th percentile=0.137 ms info: ┃ ┃ ┗render_main_texture: min=0.009 ms, median=0.067 ms, max=18.767 ms, 99th percentile=0.133 ms info: ┃ ┗gs_flush: min=0.003 ms, median=0.052 ms, max=4.633 ms, 99th percentile=0.09 ms info: ┗render_displays: min=0.002 ms, median=0.326 ms, max=36.958 ms, 99th percentile=24.555 ms info: ================================================= info: == Profiler Time Between Calls ================== info: obs_hotkey_thread(25 ms): min=25.166 ms, median=32.233 ms, max=69.722 ms, 0.762911% within ±2% of 25 ms (0% lower, 99.2371% higher) info: obs_graphics_thread(16.6667 ms): min=8.251 ms, median=32.334 ms, max=75.69 ms, 1.40023% within ±2% of 16.667 ms (2.68378% lower, 95.916% higher) info: ================================================= info: Number of memory leaks: 0 [Thread 0x7fff8e7fc6c0 (LWP 101822) exited] [Thread 0x7fff8effd6c0 (LWP 101821) exited] [Thread 0x7fff8f7fe6c0 (LWP 101820) exited] [Thread 0x7fffb0dfc6c0 (LWP 101817) exited] [Thread 0x7fffb15fd6c0 (LWP 101816) exited] [Thread 0x7fffb1dfe6c0 (LWP 101815) exited] [Thread 0x7fffa4dff6c0 (LWP 101818) exited] [Thread 0x7fff8ffff6c0 (LWP 101819) exited] [Thread 0x7fffb25ff6c0 (LWP 101814) exited] [Thread 0x7fffc8abb6c0 (LWP 101813) exited] [Thread 0x7fffe3b936c0 (LWP 101802) exited] [Thread 0x7fffe1ce36c0 (LWP 101804) exited] [Thread 0x7fffe40ed080 (LWP 101799) exited] [Thread 0x7fffe14e26c0 (LWP 101805) exited] [New process 101799] [Inferior 1 (process 101799) exited normally] (gdb) quit [andrew@andrew-archbox ~]$ OBS_USE_EGL=1 gdb -ex=r --args obs GNU gdb (GDB) 12.1 Copyright (C) 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: https://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/.

For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from obs... (No debugging symbols found in obs) Starting program: /usr/bin/obs [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". [New Thread 0x7fffe3b936c0 (LWP 105489)] [New Thread 0x7fffe33926c0 (LWP 105490)] [New Thread 0x7fffe1ce36c0 (LWP 105491)] [New Thread 0x7fffe14e26c0 (LWP 105492)] [New Thread 0x7fffe099c6c0 (LWP 105493)] [New Thread 0x7fffcbfff6c0 (LWP 105494)] [New Thread 0x7fffc3fff6c0 (LWP 105495)] [New Thread 0x7fffcb7fe6c0 (LWP 105496)] 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/Dark.qss Attempted path: /usr/share/obs/obs-studio/themes/Dark.qss info: Using EGL/X11 info: CPU Name: Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz info: CPU Speed: 2600.187MHz info: Physical Cores: 6, Logical Cores: 12 info: Physical Memory: 23908MB Total, 10586MB Free info: Kernel Version: Linux 5.19.10-arch1-1 info: Distribution: "Arch Linux" Unknown info: Session Type: x11 info: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.21.1 [New Thread 0x7fffcabff6c0 (LWP 105497)] [New Thread 0x7fffca3fe6c0 (LWP 105498)] info: Qt Version: 5.15.6 (runtime), 5.15.5 (compiled) info: Portable mode: false Attempted path: share/obs/obs-studio/themes/Dark/no_sources.svg Attempted path: /usr/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-2 (linux) info: --------------------------------- info: --------------------------------- info: audio settings reset: samples per sec: 48000 speakers: 2 [New Thread 0x7fffc9bfd6c0 (LWP 105499)] info: --------------------------------- info: Initializing OpenGL... [New Thread 0x7fffc13ff6c0 (LWP 105500)] [New Thread 0x7fffc0bfe6c0 (LWP 105501)] [New Thread 0x7fffa33ff6c0 (LWP 105502)] [New Thread 0x7fffa2bfe6c0 (LWP 105503)] [New Thread 0x7fffa23fd6c0 (LWP 105504)] [New Thread 0x7fffa1bfc6c0 (LWP 105505)] [New Thread 0x7fffa13fb6c0 (LWP 105506)] [New Thread 0x7fffa0bfa6c0 (LWP 105507)] [New Thread 0x7fff83fff6c0 (LWP 105508)] [New Thread 0x7fff837fe6c0 (LWP 105509)] [New Thread 0x7fff82ffd6c0 (LWP 105510)] info: Loading up OpenGL on adapter Intel Mesa Intel(R) UHD Graphics (CML GT2) info: OpenGL loaded successfully, version 4.6 (Core Profile) Mesa 22.1.7, shading language 4.60 info: --------------------------------- info: video settings reset: base resolution: 1920x1200 output resolution: 1920x1200 downscale filter: Bicubic fps: 60/1 format: NV12 YUV mode: 709/Partial [New Thread 0x7fff827fc6c0 (LWP 105511)] info: NV12 texture support not available [New Thread 0x7fff6ffff6c0 (LWP 105512)] info: Audio monitoring device: name: Default id: default info: --------------------------------- warning: Failed to load 'en-US' text for module: 'decklink-captions.so' warning: Failed to load 'en-US' text for module: 'decklink-ouput-ui.so' [New Thread 0x7fff6f7fe6c0 (LWP 105513)] info: [pipewire] Available captures: info: [pipewire] - Desktop capture info: [pipewire] - Window capture 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 info: No blackmagic support [Detaching after vfork from child process 105514] [New Thread 0x7fff6eae86c0 (LWP 105516)] info: [linux-vkcapture] plugin loaded successfully (version 1.2.0)

Thread 1 "obs" received signal SIGSEGV, Segmentation fault. 0x00007ffff2cea323 in XInternAtom () from /usr/lib/libX11.so.6

Can you clarify what you mean by "running with EGL"?

nowrep commented 1 year ago

After it crashes, you need to type bt and press Enter to get the backtrace.

mercifulboss commented 1 year ago

After it crashes, you need to type bt and press Enter to get the backtrace.

Here is the output I get when I type bt after it crashes:

0 0x00007ffff2cea323 in XInternAtom () at /usr/lib/libX11.so.6

1 0x00007fffb3ec2c82 in obs_module_load () at /usr//lib/obs-plugins/nvfbc.so

2 0x00007ffff67b692e in obs_init_module () at /usr/lib/libobs.so.0

3 0x00007ffff67b6ccb in () at /usr/lib/libobs.so.0

4 0x00007ffff67b7239 in obs_find_modules () at /usr/lib/libobs.so.0

5 0x00007ffff67b78b4 in obs_load_all_modules () at /usr/lib/libobs.so.0

6 0x000055555562757a in ()

7 0x00005555555d8dd7 in main ()

nowrep commented 1 year ago

Remove nvfbc plugin as it doesn't work at all on EGL.

mercifulboss commented 1 year ago

Remove nvfbc plugin as it doesn't work at all on EGL.

After removing nvfbc plugin obs launches with the OBS_USE_EGL=1 obs command and I get the option to use pipewire as a source (did not have it previously). However, I am not sure if that is gamecapture that removes performance loss when recording games?

nowrep commented 1 year ago

No, the source from this plugin is called "Game Capture"

mercifulboss commented 1 year ago

No, the source from this plugin is called "Game Capture"

I found it. I added it to sources but it seems to record only sound and the screen is black even when a game is running (screen is black on both desktop and when i launch game). Am I making some error?

Edit: Is there a config file I can edit or something so that OBS will always launch with OBS_USE_EGL=1

nowrep commented 1 year ago

Am I making some error?

Please check game log. Probably the same issue as in #71

Edit: Is there a config file I can edit or something so that OBS will always launch with OBS_USE_EGL=1

You can edit your OBS .desktop file. Also EGL is default in OBS 28.0, so updating works too.

mercifulboss commented 1 year ago

Am I making some error?

Please check game log. Probably the same issue as in #71

The output of BS_VKCAPTURE_LINEAR=1 obs-vkcapture vkcube as was suggested in the linked thread gives me a spinning cube and the output of (also nvidia_modeset=1 in kernel parameters):

[obs-vkcapture] Init Vulkan 1.2.0 [obs-vkcapture] CreateInstance [obs-vkcapture] CreateInstance VK_SUCCESS MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0 Selected GPU 0: NVIDIA GeForce RTX 2060, type: DiscreteGpu [obs-vkcapture] CreateXcbSurfaceKHR [obs-vkcapture] CreateDevice [obs-vkcapture] Injecting VK_KHR_bind_memory2 extension [obs-vkcapture] Injecting VK_KHR_get_memory_requirements2 extension [obs-vkcapture] Injecting VK_KHR_external_memory_fd extension [obs-vkcapture] Injecting VK_EXT_image_drm_format_modifier extension [obs-vkcapture] CreateDevice VK_SUCCESS [obs-vkcapture] CreateSwapchainKHR VK_SUCCESS [obs-vkcapture] GetSwapchainImagesKHR VK_SUCCESS [obs-vkcapture] GetSwapchainImagesKHR VK_SUCCESS [obs-vkcapture] DestroySwapchainKHR [obs-vkcapture] DestroyDevice [obs-vkcapture] DestroySurfaceKHR [obs-vkcapture] DestroyInstance

How do I check game log?

Edit: Is there a config file I can edit or something so that OBS will always launch with OBS_USE_EGL=1

You can edit your OBS .desktop file. Also EGL is default in OBS 28.0, so updating works too.

Official Arch repos are on obs-studio 27.2.4-2, there doesn't seem to be an OBS 28.0 available (last update was September 11).

nowrep commented 1 year ago

Did you add the Game Capture source in OBS? It doesn't seem like the "game" (vkcube) was trying to connect to OBS. And another thing, you are running OBS on your integrated Intel GPU which may cause issues.

mercifulboss commented 1 year ago

Did you add the Game Capture source in OBS? It doesn't seem like the "game" (vkcube) was trying to connect to OBS. And another thing, you are running OBS on your integrated Intel GPU which may cause issues.

Yes, I added 'Gamecapture' to sources window and it only gives me one option to select "Availble window"

How do I run obs on my dedicated gpu? I thought it would automatically detect it (as steam and my other games do)? I am using a laptop with hybrid graphics and dont have optimus installed.

Edit: something else I have discovered thats interesting is that when I use pipewire as the source, it will record the desktop but when i launch s game I get black screen with sound recorded.

mercifulboss commented 1 year ago

Hello, I can confirm that obs-gamecapture works when run with prime-run obs and using the obs-gamecapture %command% in steam and adding the command obs-gamecapture to lutris Command Prefix