GeezerVison is showing github.com — RustDesk: login succeeds but no video — PipeWire ScreenCast negotiation stalls under Hyprland (amd-6) · Issue #5509 · developing-today/code
RustDesk: login succeeds but no video — PipeWire ScreenCast negotiation stalls under Hyprland (amd-6) #5509Labels task/triageQueue packet kind: verify, reproduce, and route this item DescriptionSymptom
RustDesk login to the laptop (amd-6) now succeeds, but the session never delivers video: the client sits at "Connecting…" and then fails with "Connection error: Timeout". Zero PipeWire frames ever flow.
What is proven working (not the problem)
- Credentials: the password reset is complete — Bitwarden
rustdesk.amd-6-password is now accepted by the host (config field 118 chars, prefix 01; RustDesk service active on :21118). This is not a credential issue.
- Route / transport: the connection reaches the host and authenticates; this is not a routing issue.
- Client rendering: the sandbox client's GL/render path was already fixed separately (llvmpipe, direct rendering); this is not a client-render issue.
Evidence (2026-11-04 reset run)
- Post-auth, the session reaches the host's screen-share picker.
- The picker was automated once end-to-end (ydotool + hyprctl geometry on
hyprland-share-picker; "Remember this choice" ticked) and the share was granted.
- Despite the granted share, zero PipeWire frames flow: client shows "Connecting…" → "Connection error: Timeout".
- Host log shows the connection closed on Timeout after encoder selection (AV1) with no frames delivered.
Evidence files:
~/workspace/rd-work/rd-portal3.jpg — live screenshot of the host screen-share picker
client-timeout-error.png (sandbox) — client-side timeout error
Diagnosis
The stall is in ScreenCast Start / PipeWire negotiation on the laptop's Hyprland/portal stack: authentication and share consent complete, encoder selection (AV1) completes, but the PipeWire stream never starts producing frames. RustDesk's own UI flags Wayland capture as experimental.
Family / cross-link
Same family as #5415 (KRdp dead under Hyprland — its KWallet user store never loads): the laptop's remote-desktop capture paths are rotting under the Hyprland session in different places. #5415 explicitly scoped RustDesk out ("RustDesk is the other fallback … out of scope here"); this issue is that separate failure.
Acceptance
- A RustDesk session from the sandbox client displays the laptop desktop (frames actually flowing, not just auth + consent), or
- a documented switch of the laptop's remote-desktop path to a working capture stack, with the RustDesk/Hyprland-PipeWire stall recorded as the reason.
Activitydeveloping-today commented on Nov 4, 2026 ContributorAuthor More actions RESOLVED 2026-11-04 — video leg fixed; acceptance met with screenshot proof.
Root cause — two stacked defects, neither in RustDesk's capture code
- xdg-desktop-portal-hyprland was wedged on amd-6. Its main thread spun at 100% CPU (utime+stime delta 299 ticks / 3s, thread state R) and the daemon was D-Bus-deaf: ScreenCast Start never received a Response (
wl-stage:start:no-response: in the RustDesk server log), session Close timed out in the frontend ("Failed to close session implementation: Timeout was reached"), and even busctl get-property org.freedesktop.portal.Desktop /org/freedesktop/portal/desktop org.freedesktop.portal.ScreenCast version timed out. CreateSession/SelectSources intermittently squeaked through, which made it look like a PipeWire negotiation problem — but no PipeWire node is ever created when Start is never answered. It had arrived wedged (the day's first CreateSession already returned NoReply at 07:37) after the frontend portal was restarted at 06:57 against a backend started at 06:00.
- The client route rode the shared SSH ControlMaster. The sandbox→laptop forward was owned by the single mux process that also carries every other fleet session (25-minute cargo-test output, 1700s sleep-pollers, build watches). Under mux contention the forwarded stream froze in both directions: server-side
Connection closed: Timeout at ~100–170s per connection, client-side "Connection error: Timeout", endless auto-reconnect — and each reconnect minted a new portal session and a new share picker on the desktop. (A --server process that had absorbed this churn later failed CreateSession with NoReply even against the freshly restarted daemon, until the service stack was restarted clean.)
Fix
systemctl --user restart xdg-desktop-portal-hyprland (later also the frontend portal + rustdesk service, to clear a morning of poisoned session state). Post-restart: Start completes <1s, GStreamer pipeline confirms PLAYING, wpctl shows a live rustdesk node ← capture_1 [active]. Hyprland itself was never restarted.
- Dedicated SSH forward for RustDesk (sandbox tooling,
~/tools/rustdesk-gl/): new forward.sh (ControlMaster=no / ControlPath=none); launch.sh now cancels any mux-owned :21118 forwarding and always runs the dedicated forward; auth.sh corrected to the proven no-click paste (the dialog auto-focuses its field; the old baked click coordinate defocused it); picker grant helper preserved as share-grant.py; README "Video leg" rewritten with this diagnosis.
- No flake change needed and none made: no NixOS-side defect was found — xdph 1.4.1-git + Hyprland 0.56 stream correctly once the daemon is not wedged, and the transport defect was in sandbox-side tooling. Deliberately not pinning xdph to the older 1.3.6 in the store: the wedge did not recur across ~10 Start attempts post-restart, and there is no evidence the older build prevents it.
Acceptance evidence
Fresh sandbox-client session (launch.sh + auth.sh + picker grant): streamed the real laptop desktop (Zed workspace + host connection-manager panel) continuously — per-frame pixel diffs nonzero for 5.5 minutes, an injected client-side mouse move produced a 26% frame change (input round-trip works), and the host's own cm panel read "Connected 00:06:47" and counting in the final frame, versus the ~170s death ceiling all morning. Screenshots: ~/workspace/rd-work/proof-desktop-frames.png (+ -early.png, series fp-1..fp-9).
Noise explicitly not chased: RustDesk 1.5.0 --server processes panic on exit ("cannot access a Thread Local Storage value during or after destruction", 22× that day) — fires during teardown after the connection's fate is decided; the service respawns. Client 1.4.5 ↔ server 1.5.0 streams fine.
Note: a final re-validation of the shipped scripts was cut short when amd-6 rebooted at ~09:39 CST (sddm greeter up, no graphical login since). auth.sh as-shipped had already submitted successfully (rc=0) seconds before the reboot; the fix itself was proven end-to-end before it, as above. Nothing in the fix depends on the reboot. developing-today commented on Nov 4, 2026 ContributorAuthor More actions REOPENED — regression: the reconciled RustDesk password reverted after the 09:39 reboot; repair re-applied and re-proven 13:21 CST, durability fix still owed
This issue was closed this morning on the strength of two acceptances: (1) the Bitwarden rustdesk.amd-6-password value is accepted by the host (permanent-password storage reconciled), and (2) video streams. Acceptance (1) silently regressed within hours; (2) is unaffected.
Regression evidence (2026-11-04, amd-6)
- 13:12–13:13 CST: two client auth attempts with the vault value were rejected by the host.
- Live
~/.config/rustdesk/RustDesk.toml at inspection held a 214-char password field with the legacy 00 prefix (the double-wrapped form) — not the reconciled 118-char 01 storage written this morning. File mtime 09:39:27, size back to 1256.
- The reverted file is not a byte-restore of any backup: md5 differs from
RustDesk.toml.bak-prewrite at identical length and identical key set; salt unchanged; enc_id refreshed — i.e. the field was re-serialized, not restored.
Mechanism (from host evidence, not theory)
The toml is not declarative state: it is a plain regular file (no symlink), it does not appear in home-manager's generation file set, dezren39/darwin-nix contains no rustdesk configuration at all, and the rustdesk.service user unit is a hand-written file dating from Oct 23. The generation-switch activation (09:39:15) did not write it, and the later 10:36 home-manager activation provably did not touch it either.
The write at 09:39:27.117 matches to the second the post-reboot recovery launches of rustdesk --server under sudo with DISPLAY=:0 (journal: PIDs 9762/9918, both dying with cannot open display: :0). A rustdesk process starting in that foreign session context re-serialized the password field into the legacy double-wrapped form. So: the switch reboot created the occasion; the writer was the stray --server start, not NixOS. Corollary, verified today: a plain systemctl --user restart rustdesk.service does not revert the field.
Repair re-applied (13:17–13:21 CST) and proven
Same procedure as the original fix: setter-exact storage computed on amd-6 (libsodium via ctypes; vault value by name, piped on stdin only, channel integrity asserted by sha256, never printed/logged), self-verified by decrypting the computed field back to SHA256(pw ‖ salt), single-line splice with the service stopped (backup RustDesk.toml.bak-step1-20261104), service restarted.
Proof, config-shape alone explicitly not accepted:
- Sandbox client (
~/tools/rustdesk-gl/launch.sh + auth.sh): password accepted, session advanced to the host's Wayland share step; share granted; desktop streamed (Zed session visible in the client).
- Post-restart, the live field decrypt-verifies against the vault value's hash and is byte-stable.
Durability fix spec (why this stays open)
- Self-healing assertion: hold the reconciled storage in the fleet SOPS layer for amd-6 and add a guard (user timer or
ExecStartPre wrapper on rustdesk.service) that decrypt-verifies the live password field against the vault value's SHA256(pw ‖ salt) and, on mismatch, rewrites just that line from the SOPS-held storage with the service stopped. Verification is a boolean/decrypt check only — values never printed or logged.
- Operational rule until (1) lands: never launch
rustdesk --server via sudo or with a foreign DISPLAY/session env; recovery goes through systemctl --user restart rustdesk.service only.
- Re-acceptance: after the next generation switch + reboot, the vault value must authenticate on the first attempt with no manual repair.
dezren39 commented on Nov 5, 2026 🤖 Agent note · handed off
dezren39 commented on Nov 8, 2026 🤖 Agent note · parked
- Agent: queue worker (repo-worker-code), lane code-e
- Session / ID: task 12824
- Found via: queue claim (assigned_lane direct; worked by this lane)
- Task: Close-out verification for issue RustDesk: login succeeds but no video — PipeWire ScreenCast negotiation stalls under Hyprland (amd-6) #5509 — deployment leg VERIFIED, live session leg NOT completed this shift; issue RustDesk: login succeeds but no video — PipeWire ScreenCast negotiation stalls under Hyprland (amd-6) #5509 stays OPEN.
- Deployment evidence (fresh, 2026-11-08 ~08:24Z, amd-6):
rustdesk-password-assert.service Result=success, ExecMainStatus=0; journal shows "Done!" at 2026-11-08 01:16 CST (and at boot). The deployed assert script contains the runuser-child PATH pin from commit da89bd8. User rustdesk.service is active (running) since boot 2026-11-06 01:13 CST. Acceptance item 1 is satisfied.
- Session evidence: at 2026-11-08 08:27Z a sandbox RustDesk client was started under Xvfb :99 and pointed at the laptop via an SSH forward to 127.0.0.1:21118 (forward verified open). The client failed BEFORE any auth attempt, at the client render stage: "Failed to initialize GLArea: No available configurations for the given pixel format". No first-attempt vault-auth result and no frames verdict were obtained; the remaining verification route could not be used in this run.
- Expectation: resume task 12824 (or its successor) with a working sandbox client render path, run ONE first-attempt session using the vault password, record the result here, and close issue RustDesk: login succeeds but no video — PipeWire ScreenCast negotiation stalls under Hyprland (amd-6) #5509 only if frames flow.
- Links: issue RustDesk: login succeeds but no video — PipeWire ScreenCast negotiation stalls under Hyprland (amd-6) #5509, issue design: remote desktop through the fleet brokers (RustDesk transport, secrets, pre-warming, virtual desktops) #5694
developing-today commented on Nov 8, 2026 ContributorAuthor More actions dezren39 commented on Nov 8, 2026 Resolved 2026-11-08 — root cause found, durable fix deployed and acceptance-tested
Root cause (evidence-first). Auth was never the problem (permanent password accepted every time; :21118 answers on tailnet + LAN). The video leg dies in the Wayland portal grant:
- The laptop's
xdg-desktop-portal-hyprland 1.4.1 (frontend xdg-desktop-portal 1.22.1, Hyprland 0.56, pipewire 1.6.9) has no restore-token / persisted-grant support — zero restore/persist strings in the backend binary, and RustDesk's wayland-restore-token is therefore always empty. Empirically, the picker's "Remember this choice for future requests" does not persist either: three consecutive manual ScreenCast flows (own Gio client, one D-Bus connection) each spawned a fresh picker, and a grant made with Remember checked did not carry to the next request. Every RustDesk session requires a fresh interactive picker grant at the laptop.
- The picker opens on whichever workspace is active at request time (observed on ws3 while the user is on ws2) and sits un-granted. RustDesk retries with a second CreateSession while the first SelectSources is still pending; xdph then doesn't answer the second CreateSession (observed: CreateSession response OK for attempt 1,
wl-stage:create-session: org.freedesktop.DBus.Error.NoReply for the retry ~2.6 s after it started), the client surfaces "Login error — xdp-portal-unavailable", and the leaked session leaves the frontend logging "Failed to close session implementation: Timeout was reached".
- The Nov-4 fix (restart user services) only cleared state; an agent granted the picker live that day, so it looked fixed. It regressed as soon as a session was attempted with nobody watching the picker. The portal stack itself is healthy when granted promptly (single attempt, granted: CreateSession → SelectSources → Start → PipeWire stream node for eDP-1 2880×1920 +
OpenPipeWireRemote OK, reproduced 4×).
Fix deployed (laptop, user level — no flake change, no switch). rd-picker-autogrant.service (enabled, running): a small watcher (~/.local/bin/rd-picker-autogrant.py, log ~/.local/share/logs/rd-autogrant.log) that, only while a RustDesk client connection is established on :21118 and only for hyprland-share-picker windows, performs the grant a local human would: switches to the picker's workspace if needed, clicks the monitor row and Share (ydotool, with its absolute-move scale calibrated against hyprctl cursorpos at grant time; fallback anchor pairs if the first doesn't close the picker), and switches back. Kill switch: ~/.config/rd-autogrant.DISABLED. One mid-incident cleanup was also done: restarted xdg-desktop-portal-hyprland, xdg-desktop-portal, rustdesk user services to clear the leaked session from the dead attempts. Sunshine and the rest of the session were not touched and stayed up throughout.
Acceptance (Nov-4 standard), 2026-11-08 16:34–16:43 CST, sandbox client via ~/tools/rustdesk-gl/:
- Fresh connection → password → picker auto-granted by the watcher in ~5 s (16:34:27 detected, 16:34:32 grant OK) → video streaming; PipeWire nodes
rustdesk + xdg-desktop-portal-hyprland present continuously 16:34:34–16:40:47 (≥6 min; host panel read "Connected 00:11:11").
- Input round-trip: mouse move in the client moved the host cursor (2,2) → (1455,906); a click changed the host app's UI and the change streamed back. Proof screenshots:
~/workspace/rustdesk-acceptance-2026-11-08.png (cycle 1) in the sandbox.
- Second full cycle (client relaunched): connection 16:42:59, watcher grant OK 16:43:17, stream live again —
~/workspace/rustdesk-acceptance-cycle2-2026-11-08.png.
- Watcher also validated standalone against manual portal flows (both picker geometries 1280×800 and 720×800/720×710, and the workspace-switch path with return to the original workspace), and it does not fire when no :21118 connection is established.
Caveats / follow-ups for Drew's call:
- The watcher is a user-level unit, not in the Nix flake — a reinstall/reimage of amd-6 loses it. Recommend upstreaming it into home-manager when convenient. Not done here (a
nix build for an unrelated change was in flight on the laptop, and the fix didn't require a switch).
- Picker click anchors are empirical for xdph 1.4.1's picker layout; an xdph upgrade that rearranges the picker could need the anchors re-derived (the watcher logs grant failures loudly in its log when the picker survives all attempts).
- During the investigation the earlier "xdph goes D-Bus-deaf" reading was refined: simple property queries stay fast; it is the pending-picker state that makes subsequent CreateSession calls go unanswered. The grim+ydotool workaround is no longer needed for RustDesk.
dezren39 commented on Nov 13, 2026 Steer applied 2026-11-13 under Drew's order "fix all fixable and reblocked": Drew's recorded answer (rustdesk-session-5509) applied — queue task(s) released to the queue to execute it. Set: decisions-2026-11-13-blocked-review.
MetadataMetadatatask/triageQueue packet kind: verify, reproduce, and route this item DevelopmentNo branches or pull requestsIssue actions
|