Skip to content

Instantly share code, notes, and snippets.

@brunoanc
Last active May 23, 2025 09:39
Show Gist options
  • Save brunoanc/2dea6ddf6974ba4e5d26c3139ffb7580 to your computer and use it in GitHub Desktop.
Save brunoanc/2dea6ddf6974ba4e5d26c3139ffb7580 to your computer and use it in GitHub Desktop.
Screen sharing on Hyprland (Arch Linux)

Screen sharing on Hyprland (Arch Linux)

Table of contents

Introduction

This guide will go through the setup and troubleshooting steps required to get screen sharing working on OBS with the Hyprland compositor.

This guide will use the yay AUR helper for AUR package installation, but the commands should be similar for other helpers such as paru.

WARNING: This guide demands that the user has a basic understanding on installing packages (both official and AUR), using git, compiling from source, and some patience.

Install PipeWire and friends

First, we need to install pipewire and wireplumber. To do that, run the following command:

sudo pacman -S pipewire wireplumber

Install xdg-desktop-portal and friends

Option #1: xdg-desktop-portal-hyprland (recommended)

We will install the xdg-desktop-portal-hyprland-git package from the AUR, which provides additional functionality such as window sharing. With an AUR helper such as yay, you can install it this way:

yay -S xdg-desktop-portal-hyprland-git

Option #2: xdg-desktop-portal-wlr (not recommended)

This option provides less options than xdg-desktop-portal-wlr, but it will still allow fullscreen sharing. Install it running the following command:

sudo pacman -S xdg-desktop-portal-wlr

WARNING: The rest of this guide will assume xdg-desktop-portal-hyprland was choosed. If you picked this option, replace any -hyprland mentions for -wlr in the rest of this guide.

Remove other portal implementations

Make sure you don't have any other xdg-desktop-portal-* packages installed (except possibly xdg-desktop-portal-gtk for file dialogs), as this could cause problems later. To check if you have any, run the following command:

pacman -Q | grep xdg-desktop-portal-

then delete all of the listed packages except the -hyprland one we just installed and the -gtk one if you so chose.

Also make sure to install the optional dependencies grim and slurp:

sudo pacman -S grim slurp

Editing the configuration file

Open your Hyprland config file (usually located at ~/.config/hypr/hyprland.conf) with a text editor, and add the following line at the end:

exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP

This will make sure that xdg-desktop-portal-hyprland can get the required variables on startup.

Restart your session

Now log out and then log back in, or reboot your system. Once you're back into Hyprland, try sharing in OBS with the "Screen Capture (PipeWire)" option.

If it works, congratulations! You may exit this guide now. If not, follow along:

Troubleshooting PipeWire

Make sure both pipewire and wireplumber are running. Run the following command:

systemctl --user status pipewire wireplumber

This should return "active (running)" for both. If it doesn't, follow the Arch Wiki article for troubleshooting.

Troubleshooting desktop portal

Run the following command to check for errors in xdg-desktop-portal-hyprland:

systemctl --user status xdg-desktop-portal-hyprland

This should return "active (running)". If it doesn't, check the errors it gives you. Here's some workarounds for common errors:

Portal service (wlroots implementation) was skipped because of a failed condition check

Make sure you added the required line to the Hyprland configuration. Check for typos.

unsupported wl_shm format 0x34324742 (after trying to share the screen on NVIDIA)

Install the modified hyprland-nvidia-git AUR package:

yay -S hyprland-nvidia-git

Alternatively, you can modify the source code manually:

We'll need to modify the wlroots submodule source code to make it choose a viable format.

First, clone the Hyprland repo if you haven't already:

git clone --recursive https://github.com/vaxerski/Hyprland

Then, install all required dependencies for building, as specified in the wiki:

sudo pacman -S gdb ninja gcc cmake libxcb xcb-proto xcb-util xcb-util-keysyms libxfixes libx11 libxcomposite xorg-xinput libxrender pixman wayland-protocols cairo pango --needed

Open the wlroots/types/output/render.c file, look for the wlr_output_preferred_read_format, and replace it with the following:

uint32_t wlr_output_preferred_read_format(struct wlr_output *output) {
    return DRM_FORMAT_XRGB8888;
}

Afterwards, compile and install by running sudo make install, then restart your session.

Troubleshooting OBS

You can try the wlrobs-hg plugin.

Troubleshooting your browser

If you're trying to share your screen in your browser, first make sure that it supports Wayland and screen sharing on it, else it will not work.

Firefox

Make sure you're running on Wayland. To do this, go to about:support, look for "Window Protocol", and make sure it is set to "wayland". If it isn't, set the environment variable MOZ_ENABLE_WAYLAND=1 in an environment file, like /etc/environment, /etc/profile, ~/.bash_profile, ~/.zshenv, etc.

If it still doesn't work, open about:config and make sure the media.peerconnection.enabled flag is set to true.

Chromium

To run on Wayland, set the --ozone-platform-hint=auto flag in the chromium flags file (~/.config/chromium-flags.conf for the default package, ~/.config/chrome-flags.conf for Chrome).

Also ensure the "WebRTC PipeWire support" flag is enabled by opening chrome://flags/#enable-webrtc-pipewire-capturer and enabling it.

Troubleshooting your app

Make sure the app you're trying to share the screen with supports Wayland and sharing the screen with it.

Notable programs that still don't have full support for this are Discord and Zoom.

It still doesn't work!

Follow the official xdg-desktop-portal-wlr troubleshooting guide.

If it still doesn't work, consider opening an issue in the xdg-desktop-portal-hyprland repo.

References

@aliign
Copy link

aliign commented May 13, 2025

@JcBernack I had all these installed save for pipewire-libcamera, but it still doesn't work. However, I did notice that suddenly (before installing or updating anything), the system dialogue was back to appearing instead of simply being ignored. Here is my output of the commands you used.

-> uname -a
Linux archlinux 6.14.6-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 09 May 2025 17:36:18 +0000 x86_64 GNU/Linux
-> pacman -Q | grep nvidia
lib32-nvidia-utils 570.144-1
nvidia-dkms 570.144-3
nvidia-utils 570.144-3
-> pacman -Q | grep wire
gst-plugin-pipewire 1:1.4.2-1
lib32-libpipewire 1:1.4.2-1
lib32-pipewire 1:1.4.2-1
libpipewire 1:1.4.2-1
libwireplumber 0.5.8-1
pipewire 1:1.4.2-1
pipewire-alsa 1:1.4.2-1
pipewire-audio 1:1.4.2-1
pipewire-jack 1:1.4.2-1
pipewire-libcamera 1:1.4.2-1
pipewire-pulse 1:1.4.2-1
wireless_tools 30.pre9-4
wireplumber 0.5.8-1
-> pacman -Q | grep xdg-desktop
xdg-desktop-portal 1.20.0-2
xdg-desktop-portal-gtk 1.15.3-1
xdg-desktop-portal-hyprland 1.3.9-9
-> systemctl --user -t service | grep xdg-desktop
xdg-desktop-portal-gtk.service loaded active running Portal service (GTK/GNOME implementation)
xdg-desktop-portal-hyprland.service loaded active running Portal service (Hyprland implementation)
xdg-desktop-portal.service loaded active running Portal service

(sorry I'm using quotes, I don't know how to get linebreaks working in codeblocks).

@JcBernack
Copy link

That looks basically identical to me, but still no luck?
I always use this page to test: https://mozilla.github.io/webrtc-landing/gum_test.html

(sorry I'm using quotes, I don't know how to get linebreaks working in codeblocks).

Use triple back-ticks

@MrVideo
Copy link

MrVideo commented May 15, 2025

Alright, I'm back. Sorry for not continuing the thread @JcBernack and @aliign.

I am using a full AMD laptop. The following is my configuration:

❯ uname -a
Linux pukei-pukei 6.14.6-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 09 May 2025 17:36:18 +0000 x86_64 GNU/Linux

❯ yay -Q | grep -i wire
libpipewire 1:1.4.2-1
libwireplumber 0.5.8-1
pipewire 1:1.4.2-1
pipewire-alsa 1:1.4.2-1
pipewire-audio 1:1.4.2-1
pipewire-jack 1:1.4.2-1
pipewire-pulse 1:1.4.2-1
wireplumber 0.5.8-1

❯ yay -Q | grep xdg-desktop
xdg-desktop-portal 1.20.0-2
xdg-desktop-portal-hyprland 1.3.9-9

❯ systemctl --user -t service | grep -i xdg-desktop
  xdg-desktop-portal-hyprland.service          loaded active running Portal service (Hyprland implementation)
  xdg-desktop-portal.service                   loaded active running Portal service

I've tried the page you've sent @JcBernack, but Firefox doesn't work with screenshare either, even though I'm certain it is not on Xwayland:

Window 5786ad9e0de0 -> Screen sharing on Hyprland (Arch Linux) — Mozilla Firefox:
	mapped: 1
	hidden: 0
	at: 22,54
	size: 1876,1004
	workspace: 2 (2)
	floating: 0
	pseudo: 0
	monitor: 0
	class: firefox
	title: Screen sharing on Hyprland (Arch Linux) — Mozilla Firefox
	initialClass: firefox
	initialTitle: Mozilla Firefox
	pid: 1026
	xwayland: 0
	pinned: 0
	fullscreen: 0
	fullscreenClient: 0
	grouped: 0
	tags: 
	swallowing: 0
	focusHistoryID: 1
	inhibitingIdle: 0
	xdgTag: 
	xdgDescription: 

I've also tried Discord and Discord Canary with the ozone tags:

discord --enable-features=UseOzonePlatform --ozone-platform=wayland
discord-canary --enable-features=UseOzonePlatform --ozone-platform=wayland

I am at a loss. I don't know how to troubleshoot this further.

@iuliandita
Copy link

I've been having screen sharing issues as well, for a few months now., even though it used to work just fine.
I've been following all the arch and hyprland guides, installed and reinstalled the stable and git version of packages, still can't figure it out...

~ as   
  uname -a
Linux machine 6.14.6-1-cachyos #1 SMP PREEMPT_DYNAMIC Fri, 09 May 2025 17:20:29 +0000 x86_64 GNU/Linux

~ as   
  paru -Q | \grep -i wire                  
gst-plugin-pipewire 1:1.4.2-1
kpipewire 6.3.5-1
lib32-libpipewire 1:1.4.2-1
lib32-pipewire 1:1.4.2-1
lib32-pipewire-jack 1:1.4.2-1
libpipewire 1:1.4.2-1
libwireplumber 0.5.8-1
pipewire 1:1.4.2-1
pipewire-alsa 1:1.4.2-1
pipewire-audio 1:1.4.2-1
pipewire-jack 1:1.4.2-1
pipewire-pulse 1:1.4.2-1
wireguard-tools 1.0.20210914-2
wireplumber 0.5.8-1

~ as   
  paru -Q | \grep -i xdg-desktop           
xdg-desktop-portal 1.20.0-2
xdg-desktop-portal-hyprland-git 1.3.9.r6.g76bbf1a-1

~ as   
  systemctl --user -t service | \grep xdg-desktop
  xdg-desktop-portal-hyprland.service          loaded active running Portal service (Hyprland implementation)

The service xdg-desktop-portal is not in this list... but it shows as loaded if I check

~ as   
  systemctl --user status xdg-desktop-portal          
○ xdg-desktop-portal.service - Portal service
     Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal.service; static)
     Active: inactive (dead)

May 16 10:17:33 machine systemd[1704]: Starting Portal service...
May 16 10:17:34 machine systemd[1704]: Started Portal service.
May 16 10:54:37 machine systemd[1704]: Starting Portal service...
May 16 10:54:37 machine systemd[1704]: Started Portal service.
May 16 10:55:18 machine systemd[1704]: Starting Portal service...
May 16 10:55:18 machine systemd[1704]: Started Portal service.

When I try to share my screen, the "monitor select" window pops up, I select the one i want, and then nothing... The hyprland service shows this:

~ as   
 3   systemctl --user status xdg-desktop-portal-hyprland        
● xdg-desktop-portal-hyprland.service - Portal service (Hyprland implementation)
     Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal-hyprland.service; static)
     Active: active (running) since Fri 2025-05-16 11:03:46 CEST; 13min ago
 Invocation: a2c1f8e20e334852a5d41ec944d6dcf6
   Main PID: 42233 (xdg-desktop-por)
      Tasks: 6 (limit: 38038)
     Memory: 8.5M (peak: 9.5M)
        CPU: 62ms
     CGroup: /user.slice/user-1000.slice/[email protected]/session.slice/xdg-desktop-portal-hyprland.service
             └─42233 /usr/lib/xdg-desktop-portal-hyprland

May 16 11:03:46 machine systemd[1704]: xdg-desktop-portal-hyprland.service: Main process exited, code=dumped, status=11/SEGV
May 16 11:03:46 machine systemd[1704]: xdg-desktop-portal-hyprland.service: Failed with result 'core-dump'.
May 16 11:03:46 machine systemd[1704]: xdg-desktop-portal-hyprland.service: Scheduled restart job immediately on client request, restart counter is at 1.
May 16 11:03:46 machine systemd[1704]: Starting Portal service (Hyprland implementation)...
May 16 11:03:46 machine systemd[1704]: Started Portal service (Hyprland implementation).

@cpiber
Copy link

cpiber commented May 16, 2025

@iuliandita The log clearly says that the portal crashes (segfault), you should figure out why and where it crashes. Since it created a core dump, you can open that in a debugger to get a basic idea, if that doesn't help you need to compile it yourself with debug symbols.

Before that, you might want to check out journalctl -u xdg-desktop-portal-hyprland --user to get the full logs, it might be telling you more

@iuliandita
Copy link

right, I get that it crashes, but I don't know how to check why...
here's the journal:

May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG] Initializing xdph...
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG] XDG_CURRENT_DESKTOP set to Hyprland
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG] Gathering exported interfaces
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: wl_seat (ver 9)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: wl_data_device_manager (ver 3)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: wl_compositor (ver 6)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: wl_subcompositor (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: wl_shm (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: wp_viewporter (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: wp_tearing_control_manager_v1 (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: wp_fractional_scale_manager_v1 (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: zxdg_output_manager_v1 (ver 3)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: wp_cursor_shape_manager_v1 (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: zwp_idle_inhibit_manager_v1 (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: zwp_relative_pointer_manager_v1 (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: zxdg_decoration_manager_v1 (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: wp_alpha_modifier_v1 (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: zwlr_gamma_control_manager_v1 (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: ext_foreign_toplevel_list_v1 (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: zwp_pointer_gestures_v1 (ver 3)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: zwlr_foreign_toplevel_manager_v1 (ver 3)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG] [toplevel] (activate) locks: 1
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: zwp_keyboard_shortcuts_inhibit_manager_v1 (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: zwp_text_input_manager_v1 (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: zwp_text_input_manager_v3 (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: zwp_pointer_constraints_v1 (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: zwlr_output_power_manager_v1 (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: xdg_activation_v1 (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: ext_idle_notifier_v1 (ver 2)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: hyprland_lock_notifier_v1 (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: ext_session_lock_manager_v1 (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: zwp_input_method_manager_v2 (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: zwp_virtual_keyboard_manager_v1 (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: zwlr_virtual_pointer_manager_v1 (ver 2)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: zwlr_output_manager_v1 (ver 4)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: org_kde_kwin_server_decoration_manager (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: hyprland_focus_grab_manager_v1 (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: zwp_tablet_manager_v2 (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: zwlr_layer_shell_v1 (ver 5)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: wp_presentation (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: xdg_wm_base (ver 6)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: zwlr_data_control_manager_v1 (ver 2)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: zwp_primary_selection_device_manager_v1 (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: xwayland_shell_v1 (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: zwlr_screencopy_manager_v1 (ver 3)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG] [pipewire] connected
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG] [screencopy] init successful
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: hyprland_toplevel_export_manager_v1 (ver 2)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: hyprland_toplevel_mapping_manager_v1 (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG] [toplevel mapping] registered manager
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: hyprland_global_shortcuts_manager_v1 (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG] [globalshortcuts] registered
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: xdg_wm_dialog_v1 (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: wp_single_pixel_buffer_manager_v1 (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: wp_security_context_manager_v1 (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: hyprland_ctm_control_manager_v1 (ver 2)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: hyprland_surface_manager_v1 (ver 2)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: wp_content_type_manager_v1 (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: xdg_toplevel_tag_manager_v1 (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: xdg_system_bell_v1 (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: wp_color_manager_v1 (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: wp_drm_lease_device_v1 (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: wp_linux_drm_syncobj_manager_v1 (ver 1)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: wl_drm (ver 2)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: zwp_linux_dmabuf_v1 (ver 5)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: wl_output (ver 4)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: wl_output (ver 4)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG]  | Got interface: wl_output (ver 4)
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG] [core] dmabufFeedbackMainDevice
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG] Found output name eDP-1
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG] Found output name DP-6
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG] Found output name DP-7
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG] [toplevel] Activated, bound to 1, toplevels: 0
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG] [screencopy] Registered for toplevel export
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG] [screenshot] init successful
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG] [toplevel] (activate) locks: 2
May 16 11:03:40 machine xdg-desktop-portal-hyprland[2040]: [LOG] [screencopy] New session:
May 16 11:03:46 machine systemd-coredump[42223]: Process 2040 (xdg-desktop-por) of user 1000 dumped core.
                                                 
                                                 Stack trace of thread 2040:
                                                 #0  0x00007cc4e08b6dd0 __libc_free (libc.so.6 + 0xa6dd0)
                                                 #1  0x00005767c5ecf98b n/a (/usr/lib/xdg-desktop-portal-hyprland + 0x3b98b)
                                                 #2  0x00005767c5ed65c2 n/a (/usr/lib/xdg-desktop-portal-hyprland + 0x425c2)
                                                 #3  0x00007cc4e0fcf30c _ZN5sdbus8internal6Object21sdbus_method_callbackEP14sd_bus_messagePvP12sd_bus_error (libsdbus-c++.so.2 + 0x2e30c)
                                                 #4  0x00007cc4e07519aa n/a (libsystemd.so.0 + 0x619aa)
                                                 #5  0x00007cc4e0765201 n/a (libsystemd.so.0 + 0x75201)
                                                 #6  0x00007cc4e0fc1e71 _ZN5sdbus8internal10Connection19processPendingEventEv (libsdbus-c++.so.2 + 0x20e71)
                                                 #7  0x00005767c5eaec54 n/a (/usr/lib/xdg-desktop-portal-hyprland + 0x1ac54)
                                                 #8  0x00005767c5ea696a n/a (/usr/lib/xdg-desktop-portal-hyprland + 0x1296a)
                                                 #9  0x00007cc4e08376b5 n/a (libc.so.6 + 0x276b5)
                                                 #10 0x00007cc4e0837769 __libc_start_main (libc.so.6 + 0x27769)
                                                 #11 0x00005767c5ea7fc5 n/a (/usr/lib/xdg-desktop-portal-hyprland + 0x13fc5)
                                                 
                                                 Stack trace of thread 2091:
                                                 #0  0x00007cc4e08ade22 n/a (libc.so.6 + 0x9de22)
                                                 #1  0x00007cc4e08a1fda n/a (libc.so.6 + 0x91fda)
                                                 #2  0x00007cc4e08a2024 n/a (libc.so.6 + 0x92024)
                                                 #3  0x00007cc4e0929475 epoll_wait (libc.so.6 + 0x119475)
                                                 #4  0x00007cc4e101b447 n/a (libspa-support.so + 0x17447)
                                                 #5  0x00007cc4e100acaf n/a (libspa-support.so + 0x6caf)
                                                 #6  0x00007cc4e0f460d7 n/a (libpipewire-0.3.so.0 + 0x710d7)
                                                 #7  0x00007cc4e08a57eb n/a (libc.so.6 + 0x957eb)
                                                 #8  0x00007cc4e092918c n/a (libc.so.6 + 0x11918c)
                                                 
                                                 Stack trace of thread 2094:
                                                 #0  0x00007cc4e08ade22 n/a (libc.so.6 + 0x9de22)
                                                 #1  0x00007cc4e08a1fda n/a (libc.so.6 + 0x91fda)
                                                 #2  0x00007cc4e08a264c n/a (libc.so.6 + 0x9264c)
                                                 #3  0x00007cc4e08a4d1e pthread_cond_wait (libc.so.6 + 0x94d1e)
                                                 #4  0x00007cc4dd75ab9e n/a (libgallium-25.0.5-arch1.1.so + 0x55ab9e)
                                                 #5  0x00007cc4dd7156bd n/a (libgallium-25.0.5-arch1.1.so + 0x5156bd)
                                                 #6  0x00007cc4dd75aacd n/a (libgallium-25.0.5-arch1.1.so + 0x55aacd)
                                                 #7  0x00007cc4e08a57eb n/a (libc.so.6 + 0x957eb)
                                                 #8  0x00007cc4e092918c n/a (libc.so.6 + 0x11918c)
                                                 
                                                 Stack trace of thread 2095:
                                                 #0  0x00007cc4e08a2880 n/a (libc.so.6 + 0x92880)
                                                 #1  0x00007cc4e08a8e61 pthread_mutex_lock (libc.so.6 + 0x98e61)
                                                 #2  0x00005767c5eb54eb n/a (/usr/lib/xdg-desktop-portal-hyprland + 0x214eb)
                                                 #3  0x00007cc4e0ae51a4 execute_native_thread_routine (libstdc++.so.6 + 0xe51a4)
                                                 #4  0x00007cc4e08a57eb n/a (libc.so.6 + 0x957eb)
                                                 #5  0x00007cc4e092918c n/a (libc.so.6 + 0x11918c)
                                                 
                                                 Stack trace of thread 2096:
                                                 #0  0x00007cc4e08ade22 n/a (libc.so.6 + 0x9de22)
                                                 #1  0x00007cc4e08a1fda n/a (libc.so.6 + 0x91fda)
                                                 #2  0x00007cc4e08a264c n/a (libc.so.6 + 0x9264c)
                                                 #3  0x00007cc4e08a5152 pthread_cond_clockwait (libc.so.6 + 0x95152)
                                                 #4  0x00005767c5eb3032 n/a (/usr/lib/xdg-desktop-portal-hyprland + 0x1f032)
                                                 #5  0x00007cc4e0ae51a4 execute_native_thread_routine (libstdc++.so.6 + 0xe51a4)
                                                 #6  0x00007cc4e08a57eb n/a (libc.so.6 + 0x957eb)
                                                 #7  0x00007cc4e092918c n/a (libc.so.6 + 0x11918c)
                                                 
                                                 Stack trace of thread 2093:
                                                 #0  0x00007cc4e08ade22 n/a (libc.so.6 + 0x9de22)
                                                 #1  0x00007cc4e08a1fda n/a (libc.so.6 + 0x91fda)
                                                 #2  0x00007cc4e08a264c n/a (libc.so.6 + 0x9264c)
                                                 #3  0x00007cc4e08a4d1e pthread_cond_wait (libc.so.6 + 0x94d1e)
                                                 #4  0x00007cc4dd75ab9e n/a (libgallium-25.0.5-arch1.1.so + 0x55ab9e)
                                                 #5  0x00007cc4dd7156bd n/a (libgallium-25.0.5-arch1.1.so + 0x5156bd)
                                                 #6  0x00007cc4dd75aacd n/a (libgallium-25.0.5-arch1.1.so + 0x55aacd)
                                                 #7  0x00007cc4e08a57eb n/a (libc.so.6 + 0x957eb)
                                                 #8  0x00007cc4e092918c n/a (libc.so.6 + 0x11918c)
                                                 ELF object binary architecture: AMD x86-64
May 16 11:03:46 machine xdg-desktop-portal-hyprland[2040]: [LOG] [screencopy]  | /org/freedesktop/portal/desktop/request/1_75/webrt
May 16 11:03:46 machine systemd[1704]: xdg-desktop-portal-hyprland.service: Main process exited, code=dumped, status=11/SEGV
May 16 11:03:46 machine systemd[1704]: xdg-desktop-portal-hyprland.service: Failed with result 'core-dump'.
May 16 11:03:46 machine systemd[1704]: xdg-desktop-portal-hyprland.service: Scheduled restart job immediately on client request, restart counter is at 1.
May 16 11:03:46 machine systemd[1704]: Starting Portal service (Hyprland implementation)...
May 16 11:03:46 machine systemd[1704]: Started Portal service (Hyprland implementation).

@cpiber
Copy link

cpiber commented May 16, 2025

@iuliandita Seems like an invalid free inside xdg-desktop-portal-hyprland. You'll want to report it. As is, it's difficult to tell, check out https://wiki.archlinux.org/title/Core_dump#Analyzing_a_core_dump and https://wiki.archlinux.org/title/Debugging/Getting_traces#Manually_getting_debug_info on how to get more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment