atrium-portal
The xdg-desktop-portal backend that makes screen sharing work: OBS, browsers, Signal, anything that asks the portal for a screen cast.
App → xdg-desktop-portal → atrium-portal → atrium (IPC: StartCast) → PipeWire stream → App
atrium-portal implements org.freedesktop.impl.portal.ScreenCast. It is D-Bus activated when an app first asks, shows a GTK4 picker for the monitor or window, sends StartCast to the compositor over IPC, waits for the pw_node_id on the event stream, and hands that node back to the main portal. Everything else (file chooser, settings, access) is left to xdg-desktop-portal-gtk. There is no Mutter-compatible D-Bus surface anywhere.
Build and install
From the portal repository, run make build as the ordinary user, then doas make install. Build dependencies include Rust/Cargo, Make, a C linker, pkg-config and GTK4 development libraries. Keep the compositor checkout beside the portal checkout: the portal uses its atrium-ipc crate as a source dependency. The installation renderer requires Python 3. Runtime needs GTK4, PipeWire, a session D-Bus, xdg-desktop-portal and the GTK fallback backend.
The default prefix is /usr; PREFIX, DATADIR and DESTDIR support another layout and staging. Installation copies the prebuilt executable, portal descriptor and a D-Bus activation file naming the selected executable path. It does not rebuild or update the compositor or Network application.
Configuration
~/.config/xdg-desktop-portal/portals.conf:
[preferred]
default=gtk
org.freedesktop.impl.portal.ScreenCast=atrium
The compositor’s make install also installs /usr/share/xdg-desktop-portal/atrium-portals.conf, which applies when XDG_CURRENT_DESKTOP=atrium.
The picker floats by rule (match app-id="atrium-portal", in the default config).
Hybrid GPUs
Capture supports DMA-BUF and shared-memory buffers. Intel and NVIDIA may expose incompatible DMA-BUF modifiers when compositor and consumer use different GPUs. To isolate that negotiation, force new casts to shared memory:
debug {
disable-pipewire-dmabuf
}
Reload the configuration and start a new share; existing streams do not change. Shared memory adds GPU readback and a CPU copy per frame.
An explicit render device can instead align compositor DMA-BUF allocation with the consumer:
debug {
render-drm-device "/dev/dri/renderD129"
}
Find the actual node with ls -l /dev/dri/by-path/; node numbers are machine-specific. Changing the render device requires a compositor restart. It is not a universal requirement for hybrid-GPU capture.
Debugging
- Log:
~/.local/state/atrium/atrium-portal.log. - Capabilities should read 3/7, not 0/0:
gdbus call --session --dest=org.freedesktop.portal.Desktop \
--object-path /org/freedesktop/portal/desktop \
--method org.freedesktop.DBus.Properties.GetAll org.freedesktop.portal.ScreenCast
atrium msg castslists the compositor’s active streams.