OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
hyprland-config medium common DISPUTE

Screen sharing fails instantly: the share picker never appears, or the shared window is black

hyprlandomarchyarchendeavouroscachyosmanjarowaylandnvidia
CORRECTED An auditor found the fix wrong or incomplete and rewrote it.
AUDIT NOTE

Checked against xdg-desktop-portal-hyprland source on master, the Hyprland wiki repo, omacom/omarchy issue 3989 read in full, and this workstation (omarchy 4.0.2-1, xdg-desktop-portal-hyprland 1.4.1-1, xdg-desktop-portal 1.22.1-2, hyprland-preview-share-picker 0.2.1-1). The load-bearing mechanism is exact and I confirmed it in source rather than assuming: selection -1 is SSelectionData.type printed as an int by Debug::log(LOG, "[screencopy] SHAREDATA returned selection {}", (int)SHAREDATA.type) in src/portals/Screencopy.cpp, and TYPE_INVALID = -1 in src/shared/ScreencopyShared.hpp. The config file path ~/.config/hypr/xdph.conf is built in CPortalManager::CPortalManager() in src/core/PortalManager.cpp, and the four option names and defaults are registered there as screencopy:max_fps 120, screencopy:allow_token_by_default 0, screencopy:custom_picker_binary empty string, screencopy:force_shm 0, with promptForScreencopySelection() substituting hyprland-share-picker when the string is empty, so the record's fallback advice is right. Issue 3989 supports the claim in full, including the exact two log lines and the exact working config, and the bitdepth and XWayland claims are still on the wiki verbatim (content/configuring/core/monitors/colors.md says "Some applications do not support screen capture with 10 bit enabled", content/useful-utilities/screen-sharing.md carries the XWayland explanation and the bitdepth-must-match line). Three defects. First, the qt6-wayland diagnosis is mis-attached: Omarchy's configured picker hyprland-preview-share-picker is GTK4 and gtk4-layer-shell (confirmed by pacman -Qi depends and by ldd /usr/bin/hyprland-preview-share-picker, which links libgtk-4.so.1 and libgtk4-layer-shell.so.0 and no Qt at all), while the Qt6 dependency belongs to the stock /usr/bin/hyprland-share-picker shipped by xdg-desktop-portal-hyprland (ldd shows libQt6Widgets, libQt6Gui, libQt6Core, libQt6DBus), and XDPH only emits that notification on the specific string qt.qpa.plugin: Could not find the Qt platform plugin. Second, sudo pacman -S --needed hyprland-preview-share-picker only works on Omarchy, where it comes from the [omarchy] repo in /etc/pacman.conf and is listed in /usr/share/omarchy/install/omarchy-base.packages. The archlinux.org package search returns zero results for that name and the AUR RPC returns only hyprland-preview-share-picker-git, so the command fails on the arch, endeavouros, cachyos and manjaro targets this record claims. The supported Omarchy wrapper is omarchy-pkg-add, and the ALPM guard /usr/share/libalpm/hooks/00-omarchy-update-guard.hook does not block a plain -S because it triggers only on Operation = Upgrade and /usr/bin/omarchy-update-pacman-guard only aborts when both sync and sysupgrade are present. Third, the fix's ELECTRON_OZONE_PLATFORM_HINT advice ignores that Omarchy already sets it to wayland (not auto) in /usr/share/omarchy/default/hypr/envs.lua, along with MOZ_ENABLE_WAYLAND. Corrections applied, plus the Omarchy-specific picker config at ~/.config/hyprland-preview-share-picker/config.yaml with its debug flag and theme stylesheet path, both read on this machine. Both portal units exist and are running here (xdg-desktop-portal.service and xdg-desktop-portal-hyprland.service, active for 6 days, both static and D-Bus activated). I did NOT exercise a screen share, restart either portal unit, or install or remove anything, per the job's safety constraint on the operator's daily workstation, so the recovery path is verified from source and from the shipped files rather than by reproducing the failure. Severity and frequency left alone: the failure is total for screen sharing but loses no data, and the black-capture half of the record stays common even though the Omarchy 3.2.3 picker regression itself is historical. The cited basecamp issue URL now returns a hard 404 to an ordinary fetch (only the gh API follows the rename), so it is replaced with the omacom URL.

The cause above was rewritten on 2026-09-13 to match this note; the fix was corrected by the audit itself.
RISK

allow_token_by_default = true pre-ticks "Allow restore token", which lets an app silently resume capturing the same screen on later requests without showing you the picker. Convenient for Meet, but it means an app you shared with once can start capturing again without a prompt. Set it to false if that matters to you.

Symptom

Clicking "Share screen" in Google Meet, Discord, Zoom or Teams does nothing at all: no window/monitor picker dialog, the request just fails. journalctl --user -u xdg-desktop-portal-hyprland shows [LOG] [screencopy] SHAREDATA returned selection -1 followed by [LOG] [screencopy] Session destroyed. Or the picker does appear, you choose a screen, and the far end sees a black rectangle.

Cause

Two distinct failures.

**(1) The picker never returned a selection.** XDPH shells out to whatever screencopy:custom_picker_binary names in ~/.config/hypr/xdph.conf, and when the spawned process fails, exits without printing a [SELECTION] marker, or is cancelled by the user, XDPH keeps the default-constructed selection and tears the session down. selection -1 is literally SSelectionData.type cast to int, and TYPE_INVALID = -1 in src/shared/ScreencopyShared.hpp. The log line is Debug::log(LOG, "[screencopy] SHAREDATA returned selection {}", (int)SHAREDATA.type) in src/portals/Screencopy.cpp.

Omarchy 4 ships custom_picker_binary = hyprland-preview-share-picker in /usr/share/omarchy/config/hypr/xdph.conf, copied to ~/.config/hypr/xdph.conf on install. When that package is missing or broken, every screen share fails this way. That is exactly what bit Omarchy 3.2.3 (omacom/omarchy issue 3989, whose logs match this record line for line).

Note which picker you are debugging, because the two are different toolkits:

  • hyprland-preview-share-picker is GTK4 plus gtk4-layer-shell. Omarchy's default.
  • /usr/bin/hyprland-share-picker ships inside xdg-desktop-portal-hyprland itself and is Qt6 (libQt6Widgets, libQt6Gui, libQt6Core, libQt6DBus). This is the one that needs qt6-wayland. XDPH only raises the "qt5-wayland or qt6-wayland doesn't seem to be installed" notification when the picker's output contains qt.qpa.plugin: Could not find the Qt platform plugin, so that diagnosis does not apply to the GTK picker.

Neither picker is drawn by Quickshell. omarchy-shell draws the bar and the lock screen, not the share picker.

**(2) Black capture** is usually XWayland. An app running under XWayland can only see other XWayland windows, so it cannot capture a Wayland window or a whole screen. A bitdepth on the monitor that does not match the panel also breaks capture, and 10-bit output in particular stops some apps capturing at all.

Fix

**Confirm the whole stack is installed and running:**


pacman -Q pipewire wireplumber xdg-desktop-portal xdg-desktop-portal-hyprland xdg-desktop-portal-gtk qt6-wayland
systemctl --user status xdg-desktop-portal xdg-desktop-portal-hyprland

Both units are static and D-Bus activated, so they will not show enabled. active (running) is what you want. A crash in the status output, when you are using the stock Qt picker, usually means qt6-wayland (or qt5-wayland) is missing.

**Fix a picker that returns -1.** First check the binary is actually there and runnable:


command -v hyprland-preview-share-picker

On Omarchy 4 the package comes from the [omarchy] pacman repo (it is listed in /usr/share/omarchy/install/omarchy-base.packages), so reinstall it with Omarchy's own wrapper:


omarchy-pkg-add hyprland-preview-share-picker

On plain Arch, EndeavourOS, CachyOS or Manjaro that package name does not exist. It is in neither the official repositories nor the AUR. The AUR carries only hyprland-preview-share-picker-git. Do not run pacman -S hyprland-preview-share-picker there, it will just fail to resolve.

Whatever the distro, the reliable recovery is to fall back to the picker that ships with XDPH itself:


# ~/.config/hypr/xdph.conf
screencopy {
    custom_picker_binary = hyprland-share-picker
    allow_token_by_default = true
    max_fps = 60
}

Then restart the portal:


systemctl --user restart xdg-desktop-portal-hyprland xdg-desktop-portal

custom_picker_binary defaults to the empty string and XDPH substitutes hyprland-share-picker when it is empty, so deleting the line entirely has the same effect and is the safest thing to do while debugging.

**If the preview picker is the one failing, turn its own logging on.** It reads ~/.config/hyprland-preview-share-picker/config.yaml, and Omarchy's copy sets debug: false and points stylesheets at ~/.local/state/omarchy/current/theme/hyprland-preview-share-picker.css. Set debug: true there and check that the stylesheet path resolves, since a theme switch that left the CSS missing is a plausible way for the picker to die on launch:


ls -l ~/.local/state/omarchy/current/theme/hyprland-preview-share-picker.css

**Fix black capture:**


# Is the app on XWayland? If `xwayland: 1`, that is your answer.
hyprctl clients | grep -B8 -A2 'xwayland: 1'

Run the app natively on Wayland instead. Omarchy 4 already sets both of these in /usr/share/omarchy/default/hypr/envs.lua, so check before adding them:


hl.env("ELECTRON_OZONE_PLATFORM_HINT", "wayland")  -- Discord/Vesktop, Slack, VSCodium
hl.env("MOZ_ENABLE_WAYLAND", "1")                  -- Firefox

or per-app: --enable-features=UseOzonePlatform --ozone-platform=wayland.

Make sure the bitdepth in your monitor rule matches the panel. Drop bitdepth = 10 while debugging, since some apps cannot screen-capture with 10-bit enabled. On Omarchy 4 that is Lua:


hl.monitor({ output = "DP-1", bitdepth = 10 })

On a multi-GPU box where DMA-BUF allocation fails, force the slower but reliable path:


screencopy {
    force_shm = true
}

**Portal not autostarting and producing no logs at all** almost always means the XDG environment is wrong:


systemctl --user show-environment | grep -E 'XDG_CURRENT_DESKTOP|WAYLAND_DISPLAY'

On Omarchy 4 both are normally present, because /usr/share/omarchy/default/hypr/autostart.lua imports the whole session environment on hyprland.start. If they are missing, you are almost certainly looking at a user manager that was started by ssh or by lingering rather than by the graphical session.

Verify

journalctl --user -u xdg-desktop-portal-hyprland -f while starting a share shows a picker session created and no selection -1. The picker window appears. The receiving end sees live video rather than black.

Sources

share-picker-never-appears-selection-minus-one