snapcrafters / obs-studio

This is a community-supported modified build of OBS Studio.
https://snapcraft.io/obs-studio
118 stars 35 forks source link

OBS 27-rc3 and wayland #117

Closed nicocarbone closed 3 years ago

nicocarbone commented 3 years ago

I am trying OBS 27-rc3 using the edge channel of the snap, under Ubuntu 21.04 running wayland. I don't seem to be able to record the screen or a window. Am I missing a plug-in? Or do I need to connect an interface to the snap?

Captura de pantalla de 2021-05-05 12-28-42

flexiondotorg commented 3 years ago

Are you logged into a Wayland session? It doesn't appear so.

nicocarbone commented 3 years ago

Yes, I am. Captura de pantalla de 2021-05-21 14-01-06

flexiondotorg commented 3 years ago

Thanks. This will require more investigation on my part for a seamless solution. But can you try this:

env OBS_USE_EGL=1 snap run obs-studio

That should start OBS Studio using EGL rather than GLX, and you should be able to use "Screen Capture (Pipewire)" and "Window Capture (Pipewire)". Please let me know how you get on :slightly_smiling_face:

flexiondotorg commented 3 years ago

Revision 1243 of the snap (currently in the edge channel only) should detect the display server and enable EGL if Wayland is in use.

snap refresh obs-studio --edge
nicocarbone commented 3 years ago

I tested revision 1244 of the snap and now Pipewire capture options are there. Thanks! However OBS segfaults after choosing the window or the screen to capture :/ I guess this is a different issue? Is there any additional permission I have to give to the snap for pipewire capture?

Thanks!

El vie, 21 de may. de 2021 a la(s) 16:14, Martin Wimpress ( @.***) escribió:

Revision 1243 of the snap (currently in the edge channel only) should detect the display server and enable EGL if Wayland is in use.

snap refresh obs-studio --edge

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/snapcrafters/obs-studio/issues/117#issuecomment-846188821, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACHI3V2P6MCQTUK3MWRZNQTTO2WK3ANCNFSM44FGLP5A .

--

Nicolás Abel Carbone

Doctor en Física - Becario Posdoctoral

CIFICEN-CONICET-UNCPBA

Research Gate https://www.researchgate.net/profile/Nicolas_Carbone

epsilon.h https://epsilonh.com.ar

Bionirs http://bionirs.com

Mi horario de trabajo puede no coincidir con el suyo. Salvo que así lo indique el mail, por favor no se sienta obligado a responder este mensaje fuera de su horario de trabajo habitual.

My working hours may not be your working hours. Unless otherwise specified in the mail, please do not feel obligated to reply outside of your normal work schedule.

flexiondotorg commented 3 years ago

EDIT: These upstream bugs are not related. More investigation required...

There are a couple of upstream bugs that look related. I'll track them:

flexiondotorg commented 3 years ago

Pipewire is not fully support by snapd it seems. But I've added what I think will be required to have it work when support lands.

flexiondotorg commented 3 years ago

This is now fixed in revision 1249 or newer, currently in the edge channel only.

snap refresh obs-sudio --edge
nicocarbone commented 3 years ago

Thank you! Unfortunately, with revision 1249 I get a segfault on start:

`snap run obs-studio /bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) ln: failed to create symbolic link '/home/nicolas/snap/obs-studio/1249/.local/share/glib-2.0/schemas/org.gnome.desktop.a11y.applications.gschema.xml': File exists ln: failed to create symbolic link '/home/nicolas/snap/obs-studio/1249/.local/share/glib-2.0/schemas/org.gnome.desktop.a11y.gschema.xml': File exists ln: failed to create symbolic link '/home/nicolas/snap/obs-studio/1249/.local/share/glib-2.0/schemas/org.gnome.desktop.a11y.keyboard.gschema.xml': File exists ln: failed to create symbolic link '/home/nicolas/snap/obs-studio/1249/.local/share/glib-2.0/schemas/org.gnome.desktop.a11y.magnifier.gschema.xml': File exists ln: failed to create symbolic link '/home/nicolas/snap/obs-studio/1249/.local/share/glib-2.0/schemas/org.gnome.desktop.a11y.mouse.gschema.xml': File exists ln: failed to create symbolic link '/home/nicolas/snap/obs-studio/1249/.local/share/glib-2.0/schemas/org.gnome.desktop.app-folders.gschema.xml': File exists ln: failed to create symbolic link '/home/nicolas/snap/obs-studio/1249/.local/share/glib-2.0/schemas/org.gnome.desktop.background.gschema.xml': File exists ln: failed to create symbolic link '/home/nicolas/snap/obs-studio/1249/.local/share/glib-2.0/schemas/org.gnome.desktop.calendar.gschema.xml': File exists ln: failed to create symbolic link '/home/nicolas/snap/obs-studio/1249/.local/share/glib-2.0/schemas/org.gnome.desktop.datetime.gschema.xml': File exists ln: failed to create symbolic link '/home/nicolas/snap/obs-studio/1249/.local/share/glib-2.0/schemas/org.gnome.desktop.default-applications.gschema.xml': File exists ln: failed to create symbolic link '/home/nicolas/snap/obs-studio/1249/.local/share/glib-2.0/schemas/org.gnome.desktop.enums.xml': File exists ln: failed to create symbolic link '/home/nicolas/snap/obs-studio/1249/.local/share/glib-2.0/schemas/org.gnome.desktop.input-sources.gschema.xml': File exists ln: failed to create symbolic link '/home/nicolas/snap/obs-studio/1249/.local/share/glib-2.0/schemas/org.gnome.desktop.interface.gschema.xml': File exists ln: failed to create symbolic link '/home/nicolas/snap/obs-studio/1249/.local/share/glib-2.0/schemas/org.gnome.desktop.lockdown.gschema.xml': File exists ln: failed to create symbolic link '/home/nicolas/snap/obs-studio/1249/.local/share/glib-2.0/schemas/org.gnome.desktop.media-handling.gschema.xml': File exists ln: failed to create symbolic link '/home/nicolas/snap/obs-studio/1249/.local/share/glib-2.0/schemas/org.gnome.desktop.notifications.gschema.xml': File exists ln: failed to create symbolic link '/home/nicolas/snap/obs-studio/1249/.local/share/glib-2.0/schemas/org.gnome.desktop.peripherals.gschema.xml': File exists ln: failed to create symbolic link '/home/nicolas/snap/obs-studio/1249/.local/share/glib-2.0/schemas/org.gnome.desktop.privacy.gschema.xml': File exists ln: failed to create symbolic link '/home/nicolas/snap/obs-studio/1249/.local/share/glib-2.0/schemas/org.gnome.desktop.screensaver.gschema.xml': File exists ln: failed to create symbolic link '/home/nicolas/snap/obs-studio/1249/.local/share/glib-2.0/schemas/org.gnome.desktop.search-providers.gschema.xml': File exists ln: failed to create symbolic link '/home/nicolas/snap/obs-studio/1249/.local/share/glib-2.0/schemas/org.gnome.desktop.session.gschema.xml': File exists ln: failed to create symbolic link '/home/nicolas/snap/obs-studio/1249/.local/share/glib-2.0/schemas/org.gnome.desktop.sound.gschema.xml': File exists ln: failed to create symbolic link '/home/nicolas/snap/obs-studio/1249/.local/share/glib-2.0/schemas/org.gnome.desktop.thumbnail-cache.gschema.xml': File exists ln: failed to create symbolic link '/home/nicolas/snap/obs-studio/1249/.local/share/glib-2.0/schemas/org.gnome.desktop.thumbnailers.gschema.xml': File exists ln: failed to create symbolic link '/home/nicolas/snap/obs-studio/1249/.local/share/glib-2.0/schemas/org.gnome.desktop.wm.keybindings.gschema.xml': File exists ln: failed to create symbolic link '/home/nicolas/snap/obs-studio/1249/.local/share/glib-2.0/schemas/org.gnome.desktop.wm.preferences.gschema.xml': File exists ln: failed to create symbolic link '/home/nicolas/snap/obs-studio/1249/.local/share/glib-2.0/schemas/org.gnome.system.locale.gschema.xml': File exists ln: failed to create symbolic link '/home/nicolas/snap/obs-studio/1249/.local/share/glib-2.0/schemas/org.gnome.system.location.gschema.xml': File exists ln: failed to create symbolic link '/home/nicolas/snap/obs-studio/1249/.local/share/glib-2.0/schemas/org.gnome.system.proxy.gschema.xml': File exists ln: failed to create symbolic link '/home/nicolas/snap/obs-studio/1249/.local/share/glib-2.0/schemas/org.gtk.Settings.ColorChooser.gschema.xml': File exists ln: failed to create symbolic link '/home/nicolas/snap/obs-studio/1249/.local/share/glib-2.0/schemas/org.gtk.Settings.EmojiChooser.gschema.xml': File exists ln: failed to create symbolic link '/home/nicolas/snap/obs-studio/1249/.local/share/glib-2.0/schemas/org.gtk.Settings.FileChooser.gschema.xml': File exists ln: failed to create symbolic link '/home/nicolas/snap/obs-studio/1249/.local/share/glib-2.0/schemas/10_gsettings-desktop-schemas.gschema.override': File exists bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. QSocketNotifier: Can only be used with threads started with QThread

(process:10898): Gtk-WARNING **: 11:02:39.766: Locale not supported by C library. Using the fallback 'C' locale.

(obs:10898): dbind-WARNING **: 11:02:39.826: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-AkqznW3ImE: No such file or directory 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/themes/Dark.qss Attempted path: /usr/share/obs/obs-studio/themes/Dark.qss info: User enabled --multi flag and is now running multiple instances of OBS. info: Command Line Arguments: --multi info: Platform: Wayland info: CPU Name: AMD Ryzen 5 2600 Six-Core Processor info: CPU Speed: 1550.000MHz info: Physical Cores: 6, Logical Cores: 12 info: Physical Memory: 16011MB Total, 1980MB Free info: Kernel Version: Linux 5.11.0-17-generic info: Distribution: "Ubuntu Core" "20" info: Session Type: wayland 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.0.0-rc5-modified (linux) info: --------------------------------- info: --------------------------------- info: audio settings reset: samples per sec: 48000 speakers: 2 info: --------------------------------- info: Initializing OpenGL... info: Using EGL/Wayland info: Initialized EGL 1.5 info: Loading up OpenGL on adapter X.Org Radeon RX 5500 XT (NAVI14, DRM 3.40.0, 5.11.0-17-generic, LLVM 11.0.0) info: OpenGL loaded successfully, version 4.6 (Core Profile) Mesa 20.2.6, shading language 4.60 info: --------------------------------- info: video settings reset: base resolution: 1920x1080 output resolution: 1920x1080 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: --------------------------------- info: [StreamFX] Loading Version 0.10.0.0-g5888c7d2 info: [StreamFX] Loaded Version 0.10.0.0-g5888c7d2 info: [adv-ss] version: 2ce0b35921be892c987c7dbb5fc90db38f15f0a6 info: [adv-ss] trying '/home/nicolas' info: [adv-ss] trying '/usr/lib' info: [adv-ss] trying '/usr/local/lib' info: [adv-ss] trying '/usr/lib/x86_64-linux-gnu' info: [adv-ss] trying '/usr/local/opt/curl/lib' warning: [adv-ss] can't find the curl library 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: [Freeze Filter] loaded version 0.3.2 info: [Gradient Source] loaded version 0.1.0 info: [pango]: Loaded system fontconfig 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 warning: v4l2loopback not installed, virtual camera disabled info: [linux-vkcapture] plugin loaded successfully (version 0.5) info: [Move Transition] loaded version 2.4.1 error: Unable to load NvFCB library warning: Failed to initialize module 'nvfbc.so' warning: Failed to load 'en-US' text for module: 'obs-audio-pan-filter.so' info: [obs-audio-pan-filter] plugin loaded successfully (version 0.1.0) info: [obs-browser]: Version 2.14.3 info: [obs-browser]: CEF Version 87.1.14+ga29e9a3+chromium-87.0.4280.141 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

info: FFMPEG VAAPI supported warning: Failed to load 'en-US' text for module: 'obs-gphoto.so' info: obs-gstreamer build: 2b6aa8d info: [obs-ndi] hello ! (version 4.9.1) info: [obs-ndi] Trying '' info: [obs-ndi] Trying '/usr/lib' info: [obs-ndi] Trying '/usr/local/lib' info: [obs-ndi] Found NDI library at '/usr/local/lib/libndi.so.4' info: [obs-ndi] NDI runtime loaded successfully info: [obs-ndi] NDI library initialized successfully (NDI SDK LINUX 18:32:11 Jun 30 2020 4.5.3) warning: Failed to load 'en-US' text for module: 'obs-vnc.so' info: [obs-vnc] plugin loaded successfully (version 0.3.0) info: [obs-websocket] you can haz websockets (version 4.9.0) info: [obs-websocket] qt version (compile-time): 5.15.2 ; qt version (run-time): 5.15.2 info: [obs-websocket] module loaded! info: [Replay Source] loaded version 1.6.8 info: [Source Copy] loaded version 0.1.1 info: [Source Record] loaded version 0.1.4 info: [Source Switcher] loaded version 0.3.0 info: [spectralizer] Loading v1.3.2 build time 2021.05.24 21:08 info: [TimeWarpScan] loaded version 0.1.6 info: [Transition Table] loaded version 0.2.0 info: VLC found, VLC video source enabled info: --------------------------------- info: Loaded Modules: info: vlc-video.so info: transition-table.so info: time-warp-scan.so info: text-freetype2.so info: spectralizer.so info: source-switcher.so info: source-record.so info: source-copy.so info: sndio.so info: rtmp-services.so info: replay-source.so info: recursion-effect.so info: obs-x264.so info: obs-websocket.so info: obs-vst.so info: obs-vnc.so info: obs-transitions.so info: obs-rtspserver.so info: obs-rgb-levels-filter.so info: obs-outputs.so info: obs-ndi.so info: obs-libfdk.so info: obs-gstreamer.so info: obs-gphoto.so info: obs-filters.so info: obs-ffmpeg.so info: obs-browser.so info: obs-audio-pan-filter.so info: nvfbc.so info: move-transition.so info: linux-vkcapture.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: libtext-pango.so info: image-source.so info: gradient-source.so info: frontend-tools.so info: freeze-filter.so info: dynamic-delay.so info: dvd-screensaver.so info: downstream-keyer.so info: dir-watch-media.so info: decklink-ouput-ui.so info: decklink-captions.so info: advanced-scene-switcher.so info: StreamFX.so info: --------------------------------- info: ==== Startup complete =============================================== info: All scene data cleared info: ------------------------------------------------ info: pulse-input: Server name: 'pulseaudio 14.2' info: pulse-input: Audio format: s16le, 44100 Hz, 2 channels info: pulse-input: Started recording from 'alsa_output.pci-0000_0b_00.3.analog-stereo.monitor' info: [Loaded global audio device]: 'Desktop Audio' info: pulse-input: Server name: 'pulseaudio 14.2' info: pulse-input: Audio format: s16le, 44100 Hz, 2 channels info: pulse-input: Started recording from 'alsa_input.pci-0000_0b_00.3.analog-stereo' info: [Loaded global audio device]: 'Mic/Aux' info: PipeWire initialized (sender name: 1_150) info: pulse-input: Server name: 'pulseaudio 14.2' info: pulse-input: Audio format: s16le, 44100 Hz, 2 channels info: pulse-input: Started recording from 'alsa_input.pci-0000_0b_00.3.analog-stereo' error: Source ID 'xshm_input' not found error: Failed to create source 'Screen Capture (XSHM)'! info: Switched to scene 'Scene' info: [adv-ss] trying to reconnect to in 10 seconds. info: ------------------------------------------------ info: Loaded scenes: info: [adv-ss] started info: - scene 'Scene': info: - source: 'Audio Input Capture (PulseAudio)' (pulse_input_capture) info: - filter: 'Noise Suppression' (noise_suppress_filter_v2) info: - source: 'Screen Capture (XSHM)' (xshm_input) info: - source: 'Window Capture (PipeWire)' (pipewire-window-capture-source) info: ------------------------------------------------ info: [obs-websocket] WSServer::start: Not locked to IPv4 bindings info: [obs-websocket] server started successfully on port 4444 info: [obs-websocket] io thread started qt.qpa.wayland: Wayland does not support QWindow::requestActivate() Attempted path: share/obs/obs-studio/images/overflow.png Attempted path: /usr/share/obs/obs-studio/images/overflow.png info: [pipewire] available cursor modes: info: [pipewire] - Metadata info: [pipewire] - Always visible info: [pipewire] - Hidden info: [pipewire] screencast session created info: [pipewire] asking for window… X Error of failed request: BadWindow (invalid Window parameter) Major opcode of failed request: 20 (X_GetProperty) Resource id in failed request: 0x0 Serial number of failed request: 13 Current serial number in output stream: 13 QObject::killTimer: Timers cannot be stopped from another thread QObject::~QObject: Timers cannot be stopped from another thread info: [obs-websocket] server stopped successfully [2021-05-25 11:02:41] [info] asio handle_accept error: asio.system:125 (Operation aborted.) [2021-05-25 11:02:41] [info] Error getting remote endpoint: asio.system:9 (Bad file descriptor) [2021-05-25 11:02:41] [fail] WebSocket Connection Unknown - "" - 0 asio.system:125 Operation aborted. [1] 10898 segmentation fault (core dumped) snap run obs-studio`

nicocarbone commented 3 years ago

Ok, I think I have a clue of what's happening. After removing and purging the snap and reinstalling, it worked. But just once. After I close and reopen obs, it crashes again. It seems to be trying to restore the previous session and then is when it segfaults.

Damarus999 commented 3 years ago

I'm having the same error and crash with the snap on Ubuntu 21.04 in a Wayland session. For what it's worth, the Flatpak of OBS 27 works fine.

ilarrain commented 3 years ago

I'm experiencing the same issue on Ubuntu 21.04 (Wayland), and using current stable and edge snaps. If I delete the scene files, it works ok (1 time, until restarted). rm ~/snap/obs-studio/current/.config/obs-studio/basic/scenes/Untitled.json* This happens even If the scene is blank.