hyprwm / xdg-desktop-portal-hyprland

xdg-desktop-portal backend for Hyprland
BSD 3-Clause "New" or "Revised" License
307 stars 49 forks source link

Screen sharing doesn't work. No pipewire outputs #97

Open ZerdoX-x opened 1 year ago

ZerdoX-x commented 1 year ago

Manually compiled and installed xdph from master

Output of xdg-desktop-portal-hyprland --verbose ``` [LOG] Initializing xdph... [LOG] XDG_CURRENT_DESKTOP set to Hyprland [LOG] Gathering exported interfaces [LOG] | Got interface: wl_shm (ver 1) [LOG] | Got interface: wl_drm (ver 2) [LOG] | Got interface: zwp_linux_dmabuf_v1 (ver 4) [LOG] | Got interface: wl_compositor (ver 6) [LOG] | Got interface: wl_subcompositor (ver 1) [LOG] | Got interface: wl_data_device_manager (ver 3) [LOG] | Got interface: zwlr_export_dmabuf_manager_v1 (ver 1) [LOG] | Got interface: zwlr_data_control_manager_v1 (ver 2) [LOG] | Got interface: zwp_primary_selection_device_manager_v1 (ver 1) [LOG] | Got interface: wp_viewporter (ver 1) [LOG] | Got interface: zwlr_gamma_control_manager_v1 (ver 1) [LOG] | Got interface: zwlr_output_power_manager_v1 (ver 1) [LOG] | Got interface: xdg_wm_base (ver 5) [LOG] | Got interface: wl_seat (ver 8) [LOG] | Got interface: wp_presentation (ver 1) [LOG] | Got interface: org_kde_kwin_idle (ver 1) [LOG] | Got interface: ext_idle_notifier_v1 (ver 1) [LOG] | Got interface: zwlr_layer_shell_v1 (ver 4) [LOG] | Got interface: org_kde_kwin_server_decoration_manager (ver 1) [LOG] | Got interface: zxdg_decoration_manager_v1 (ver 1) [LOG] | Got interface: zwlr_output_manager_v1 (ver 4) [LOG] | Got interface: zwlr_input_inhibit_manager_v1 (ver 1) [LOG] | Got interface: zwp_keyboard_shortcuts_inhibit_manager_v1 (ver 1) [LOG] | Got interface: zext_workspace_manager_v1 (ver 1) [LOG] | Got interface: zwp_pointer_constraints_v1 (ver 1) [LOG] | Got interface: zwp_relative_pointer_manager_v1 (ver 1) [LOG] | Got interface: zwp_virtual_keyboard_manager_v1 (ver 1) [LOG] | Got interface: zwlr_virtual_pointer_manager_v1 (ver 2) [LOG] | Got interface: zwlr_foreign_toplevel_manager_v1 (ver 3) [LOG] | Got interface: wp_drm_lease_device_v1 (ver 1) [LOG] | Got interface: zwp_tablet_manager_v2 (ver 1) [LOG] | Got interface: zwp_idle_inhibit_manager_v1 (ver 1) [LOG] | Got interface: zxdg_exporter_v1 (ver 1) [LOG] | Got interface: zxdg_importer_v1 (ver 1) [LOG] | Got interface: zxdg_exporter_v2 (ver 1) [LOG] | Got interface: zxdg_importer_v2 (ver 1) [LOG] | Got interface: zwp_pointer_gestures_v1 (ver 3) [LOG] | Got interface: zwp_text_input_manager_v3 (ver 1) [LOG] | Got interface: zwp_input_method_manager_v2 (ver 1) [LOG] | Got interface: xdg_activation_v1 (ver 1) [LOG] | Got interface: ext_session_lock_manager_v1 (ver 1) [LOG] | Got interface: wp_cursor_shape_manager_v1 (ver 1) [LOG] | Got interface: wp_single_pixel_buffer_manager_v1 (ver 1) [LOG] | Got interface: hyprland_toplevel_export_manager_v1 (ver 2) [LOG] | Got interface: wp_fractional_scale_manager_v1 (ver 1) [LOG] | Got interface: zwp_text_input_manager_v1 (ver 1) [LOG] | Got interface: hyprland_global_shortcuts_manager_v1 (ver 1) [LOG] [globalshortcuts] registered [LOG] | Got interface: zwlr_screencopy_manager_v1 (ver 3) [LOG] [pipewire] connected [LOG] [screencopy] init successful [LOG] | Got interface: zxdg_output_manager_v1 (ver 3) [LOG] | Got interface: wl_output (ver 4) [LOG] [screencopy] Registered for toplevel export [LOG] [core] dmabufFeedbackMainDevice [TRACE] [core] createGBMDevice: render node /dev/dri/renderD128 [TRACE] [core] dmabufFeedbackFormatTable [TRACE] [core] dmabufFeedbackTrancheTargetDevice [TRACE] [core] dmabufFeedbackTrancheFormats [TRACE] [core] dmabufFeedbackTrancheDone [TRACE] [core] dmabufFeedbackDone [TRACE] [toplevel] New toplevel at 0xaaab7321db40 [TRACE] [toplevel] toplevel at 0xaaab7327dd40 set title to github.com [TRACE] [toplevel] toplevel at 0xaaab7327dd40 set class to librewolf [LOG] Found output name eDP-1 [TRACE] [core] got poll event ```

To reproduce issue I am trying to record screen using obs

Here is obs logs: ``` debug: Found portal inhibitor debug: Attempted path: share/obs/obs-studio/locale/en-US.ini debug: Attempted path: /usr/share/obs/obs-studio/locale/en-US.ini debug: Attempted path: share/obs/obs-studio/themes/Yami.qss debug: Attempted path: /usr/share/obs/obs-studio/themes/Yami.qss info: Platform: Wayland info: Physical Cores: 8, Logical Cores: 8 info: Physical Memory: 15709MB Total, 4342MB Free info: Kernel Version: Linux 6.4.0-asahi-10-edge-ARCH info: Distribution: Gentoo "2.14" info: Desktop Environment: Hyprland (Hyprland) info: Session Type: wayland info: Qt Version: 5.15.10 (runtime), 5.15.10 (compiled) info: Portable mode: false QMetaObject::connectSlotsByName: Connecting slot on_transitionDuration_valueChanged() with the first of the following compatible signals: ("valueChanged(int)", "valueChanged(QString)") info: OBS 29.1.3 (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: Using EGL/Wayland info: Initialized EGL 1.4 info: Loading up OpenGL on adapter Mesa Apple M1 (G13G B1) info: OpenGL loaded successfully, version 3.3 (Core Profile) Mesa 23.3.0-devel, shading language 3.30 info: --------------------------------- info: video settings reset: base resolution: 2560x1600 output resolution: 2560x1600 downscale filter: Bicubic fps: 60/1 format: NV12 YUV mode: Rec. 709/Partial info: NV12 texture support not available info: P010 texture support not available info: Audio monitoring device: name: Default id: default info: --------------------------------- info: [pipewire] No captures available warning: v4l2loopback not installed, virtual camera disabled info: FFmpeg VAAPI H264 encoding not supported info: FFmpeg VAAPI HEVC encoding not supported info: --------------------------------- info: Loaded Modules: info: text-freetype2.so info: rtmp-services.so info: obs-x264.so info: obs-vst.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-capture.so info: linux-alsa.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 (on PipeWire 0.3.80) 15.0.0' info: pulse-input: Audio format: s32le, 48000 Hz, 2 channels info: pulse-input: Started recording from 'alsa_output.platform-sound.HiFi__hw_J313_0__sink.monitor' (default) info: [Loaded global audio device]: 'Desktop Audio' info: pulse-input: Server name: 'PulseAudio (on PipeWire 0.3.80) 15.0.0' info: pulse-input: Audio format: s32le, 48000 Hz, 1 channels info: pulse-input: Started recording from 'alsa_input.platform-sound.HiFi__hw_J313_0__source' (default) info: [Loaded global audio device]: 'Mic/Aux' info: Switched to scene 'Scene' info: ------------------------------------------------ info: Loaded scenes: info: - scene 'Scene': info: ------------------------------------------------ qt.qpa.wayland: Wayland does not support QWindow::requestActivate() info: adding 21 milliseconds of audio buffering, total audio buffering is now 21 milliseconds (source: Desktop Audio) info: adding 21 milliseconds of audio buffering, total audio buffering is now 42 milliseconds (source: Mic/Aux) ```

The problem line is info: [pipewire] No captures available, so I can't even add capture source to obs. Screen sharing also doesn't work in LibreWolf and Chromium as expected.

Pipewire itself works fine, I use it for audio.

vaxerski commented 1 year ago

are you running xdg-desktop-portal too?

GoldsteinE commented 1 year ago

Also reproduces for me. xdg-desktop-portal is running, as is pipewire and wireplumber

0xk1f0 commented 1 year ago

I can't reproduce this, OBS screenshare works perfectly fine here

xdg-desktop-portal-hyprland 1.1.0-2
pipewire 1:0.3.80-1
wireplumber 0.4.14-1
OBS Logs ```text info: ==== Startup complete =============================================== info: All scene data cleared info: ------------------------------------------------ info: pulse-input: Server name: 'PulseAudio (on PipeWire 0.3.80) 15.0.0' info: pulse-input: Audio format: s24le, 48000 Hz, 2 channels info: pulse-input: Sample format s24le not supported by OBS,using float32le instead for recording info: pulse-input: Started recording from 'alsa_output.usb-Tdlasunnic_Sharkoon_Gaming_DAC_Pro_S_20181228.1-00.analog-stereo.monitor' (default) info: [Loaded global audio device]: 'Desktop Audio' info: pulse-input: Server name: 'PulseAudio (on PipeWire 0.3.80) 15.0.0' info: pulse-input: Audio format: s24le, 48000 Hz, 2 channels info: pulse-input: Sample format s24le not supported by OBS,using float32le instead for recording info: pulse-input: Started recording from 'alsa_input.usb-the_t.bone_SC_360_USB_the_t.bone_SC_360_USB-00.analog-stereo' (default) info: [Loaded global audio device]: 'Mic/Aux' info: PipeWire initialized info: Switched to scene 'Scene' info: ------------------------------------------------ info: Loaded scenes: info: - scene 'Scene': info: - source: 'Screen Capture (PipeWire)' (pipewire-desktop-capture-source) info: ------------------------------------------------ info: [pipewire] Screencast session created info: adding 42 milliseconds of audio buffering, total audio buffering is now 42 milliseconds (source: Mic/Aux) info: [pipewire] Asking for desktop info: [pipewire] desktop selected, setting up screencast info: [pipewire] Server version: 0.3.80 info: [pipewire] Library version: 0.3.80 info: [pipewire] Header version: 0.3.72 info: [pipewire] Created stream 0x55e061131360 info: [pipewire] Stream 0x55e061131360 state: "connecting" (error: none) info: [pipewire] Playing stream 0x55e061131360 info: [pipewire] Stream 0x55e061131360 state: "paused" (error: none) info: [pipewire] Negotiated format: info: [pipewire] Format: 8 (Spa:Enum:VideoFormat:BGRx) info: [pipewire] Modifier: 0x0 info: [pipewire] Size: 2560x1440 info: [pipewire] Framerate: 0/1 info: [pipewire] Negotiated format: info: [pipewire] Format: 8 (Spa:Enum:VideoFormat:BGRx) info: [pipewire] Modifier: 0x0 info: [pipewire] Size: 2560x1440 info: [pipewire] Framerate: 0/1 info: [pipewire] Stream 0x55e061131360 state: "streaming" (error: none) info: ==== Shutting down ================================================== ```
ZerdoX-x commented 1 year ago

@vaxerski sorry for late response. Yes, I am running xdg-desktop-portal too. I also tried killing gtk portal so only xdph would run alone. And in my hyprland config file I don't launch anything manually, I just use my system as usual

limu520 commented 11 months ago

Yep,i also ran into this issus: For my Os:gentoo, desktop: wayland+hyprland(sys-apps/xdg-desktop-portal,gui-libs/xdg-desktop-portal-hyprland)

Also,my sys-apps/xdg-desktop-portal has also used screencast,and the xdg-desktop-portal haven't any error log ,my pipewire also no capture here.