Hello! I've been having issues with not being able to capture and paste screenshots after boot, so I had claude do some digging:
Description
After every boot/login, the screenshot portal (org.freedesktop.impl.portal.Screenshot) is non-functional — screenshots cannot be taken or pasted — until xdg-desktop-portal-cosmic is manually restarted (e.g., pkill -f xdg-desktop-portal-cosmic). After the restart, D-Bus re-activates the portal and screenshots work perfectly for the remainder of the session.
This has been reproducible on every boot for over a month.
Root Cause Analysis
The portal starts via D-Bus activation during login, but appears to race with cosmic-comp output initialization. The journal shows multiple Received Done for dead wl_output warnings from smithay_client_toolkit immediately after the portal starts, suggesting it connects to the Wayland compositor before outputs are fully settled:
Apr 15 07:33:45 s76-cwhi-0346 cosmic-session[3265]: got environmental variables from cosmic-comp: [("WAYLAND_DISPLAY", "wayland-1"), ("DISPLAY", ":1")]
Apr 15 07:33:46 s76-cwhi-0346 systemd[3210]: Started dbus-:1.1-org.freedesktop.impl.portal.desktop.cosmic@0.service.
Apr 15 07:33:46 s76-cwhi-0346 xdg-desktop-portal-cosmic[4561]: [2026-04-15T12:33:46Z WARN wgpu_hal::vulkan::instance] Unable to find extension: VK_EXT_physical_device_drm
Apr 15 07:33:49 s76-cwhi-0346 xdg-desktop-portal-cosmic[4561]: [2026-04-15T12:33:49Z WARN smithay_client_toolkit::output] Received Done for dead wl_output
Apr 15 07:33:49 s76-cwhi-0346 xdg-desktop-portal-cosmic[4561]: [2026-04-15T12:33:49Z WARN smithay_client_toolkit::output] Received Done for dead wl_output
Apr 15 07:33:49 s76-cwhi-0346 xdg-desktop-portal-cosmic[4561]: [2026-04-15T12:33:49Z WARN smithay_client_toolkit::output] Received Done for dead wl_output
Apr 15 07:33:49 s76-cwhi-0346 xdg-desktop-portal-cosmic[4561]: [2026-04-15T12:33:49Z WARN smithay_client_toolkit::output] Received Done for dead wl_output
Apr 15 07:33:49 s76-cwhi-0346 xdg-desktop-portal-cosmic[4561]: [2026-04-15T12:33:49Z WARN smithay_client_toolkit::output] Received Done for dead wl_output
Apr 15 07:33:49 s76-cwhi-0346 xdg-desktop-portal-cosmic[4561]: [2026-04-15T12:33:49Z WARN smithay_client_toolkit::output] Received Done for dead wl_output
The portal appears to get stuck in a bad state with stale output references, which breaks the Screenshot interface. Killing and re-spawning the process gives it a fresh Wayland connection with valid outputs.
Steps to Reproduce
- Boot the system and log in to COSMIC
- Attempt to take a screenshot (Print Screen key or any tool using the portal)
- Screenshot fails / cannot be pasted
Workaround
Kill the portal process; D-Bus will re-activate it on the next portal request:
pkill -f xdg-desktop-portal-cosmic
Expected Behavior
Screenshots should work immediately after login without manual intervention. The portal should either:
- Start later in the session after the compositor outputs are fully initialized, or
- Handle output re-initialization gracefully when outputs change during early startup
System Information
- OS: Pop!_OS 24.04 LTS
- Kernel: 6.18.7-76061807-generic
- cosmic-comp: 0.1
177618137724.04~4df9519
- xdg-desktop-portal-cosmic: 0.1.0pop1
177618193624.04~08b9ed8
- Hardware: System76 laptop
Related Issues
Hello! I've been having issues with not being able to capture and paste screenshots after boot, so I had claude do some digging:
Description
After every boot/login, the screenshot portal (
org.freedesktop.impl.portal.Screenshot) is non-functional — screenshots cannot be taken or pasted — untilxdg-desktop-portal-cosmicis manually restarted (e.g.,pkill -f xdg-desktop-portal-cosmic). After the restart, D-Bus re-activates the portal and screenshots work perfectly for the remainder of the session.This has been reproducible on every boot for over a month.
Root Cause Analysis
The portal starts via D-Bus activation during login, but appears to race with
cosmic-compoutput initialization. The journal shows multipleReceived Done for dead wl_outputwarnings fromsmithay_client_toolkitimmediately after the portal starts, suggesting it connects to the Wayland compositor before outputs are fully settled:The portal appears to get stuck in a bad state with stale output references, which breaks the Screenshot interface. Killing and re-spawning the process gives it a fresh Wayland connection with valid outputs.
Steps to Reproduce
Workaround
Kill the portal process; D-Bus will re-activate it on the next portal request:
Expected Behavior
Screenshots should work immediately after login without manual intervention. The portal should either:
System Information
177618137724.04~4df9519177618193624.04~08b9ed8Related Issues