Commit Graph
128 Commits
Author SHA1 Message Date
VallierDevandClaude Opus 5.5 94fd3c2fa7 fix(actions): never wait for a polkit prompt on remote reboot/shutdown
Without polkit permission (for example no active local session)
systemctl reboot/poweroff waited for an authentication dialog on the
controlled screen. Pass --no-ask-password so the action fails and is
logged instead. README: the viewer's terminal session list, reboot and
shutdown, and its Wayland window/clipboard were tested in a VM.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 16:31:41 +08:00
VallierDevandClaude Opus 5.5 1b10a22c8c Release v0.2.0
Co-Authored-By: Claude Opus 5.5 <[email protected]>
v0.2.0
2026-10-17 15:41:51 +08:00
809ce1697d Add the experimental native viewer (uuremote-viewer) (#36)
* Add the experimental native viewer (uuremote-viewer)

A Linux viewer/controller for UU Remote hosts, built separately with
--features native-viewer,viewer-sdl; the host build and behaviour are
unchanged.

- Cloud join by device and remote assistance by share ID + code (code
  via stdin only), WebRTC offer side, SDL desktop window with ffmpeg CLI
  H.264 decoding, Opus sound, keyboard/mouse, view-only mode, text
  clipboard on TEXT_DATA_CHANNEL.
- Tools: file browser/transfer (zero- and one-based download blocks),
  terminal and terminal session list, port mapping (127.0.0.1 only),
  reboot/shutdown; tools reuse the desktop peer while one is open.
- GTK launcher with device list and tool windows.
- CI builds and tests the viewer; release tarballs include it.

Logs carry field numbers, sizes and states only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* ci: install the ffmpeg CLI for the viewer audio tests

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: VallierDev <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-17 15:41:20 +08:00
VallierDevandClaude Opus 5.5 6f1dd77ab5 Release v0.1.31
Co-Authored-By: Claude Opus 5.5 <[email protected]>
v0.1.31
2026-10-17 14:40:20 +08:00
VallierDevandClaude Opus 5.5 e5bb214f99 test: run CONTROL lifecycle tests on the virtual network
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 14:27:41 +08:00
25edc41b9f fix(portal): recover capture sooner after GNOME display changes (#35)
* fix(portal): recover capture sooner after GNOME display changes

Use Mutter notifications to enable a 200 ms grace for correlated, continuously paused capture without a valid format. Cancel stale hints on healthy renegotiation and retain the five-second fallback.

Test event ordering, repeated and stale notifications, natural recovery, and subscription teardown. Document measured recovery gains and limits.

Fixes #27

* docs: keep the #27 experiment record in the PR instead of the repository

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: VallierDev <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-17 14:26:54 +08:00
VallierDevandClaude Opus 5.5 1fa58904d7 Release v0.1.30
Co-Authored-By: Claude Opus 5.5 <[email protected]>
v0.1.30
2026-10-17 14:22:20 +08:00
VallierDevandClaude Opus 5.5 da49e71b9d fix(x11): keep the shared display open until the last capture is dropped
The X11 engine has one process-wide display connection, but every
ScreenCapture closed it on drop. During guest assistance the device
init's screen-size probe created and dropped a capture after the main
one, closing the display under it: the stream stopped with
"X11 display wake failed" and the viewer got no video. A capture
replaced after a resize had the same hazard. Count live X11 captures
and close only on the last drop.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 14:19:49 +08:00
VallierDevandClaude Opus 5.5 80ac4448d6 Release v0.1.29
Co-Authored-By: Claude Opus 5.5 <[email protected]>
v0.1.29
2026-10-17 11:46:30 +08:00
cc01b3e2a5 fix(portal): send black video while locked so iPhone starts auto unlock (#34)
* fix(portal): bootstrap video for iPhone locked auto unlock

* docs: keep the #29 experiment record in the PR instead of the repository

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: VallierDev <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-17 11:44:15 +08:00
bb95774ecb fix(portal): establish desktop CONTROL while GNOME is locked and auto unlock cold connections (#30)
* fix(portal): establish locked desktop control before capture

* test(portal): preserve v4 pixel inventory after deferred capture settings

* fix(control): refresh lock state after viewer Echo handshake

* fix(portal): announce desktop target before locked capture wait

* ci: run the desktop_power native test under ASan/UBSan

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* input: skip the Portal release sweep while no session is bound

The first locked connection creates its peer before any Portal exists; the sweep
then logged two failed injections and a 'reset incomplete' warning for nothing.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* docs: describe locked cold connections, auto unlock limits and iPhone status

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* fix(portal): treat a cached screen with a closed Portal session as not ready

begin() now marks the state as waiting when the cached session is dead, and
permission/video/clipboard consumers honor it instead of reporting Allow and
starting the stale video path before maintain() has rebuilt capture.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* fix(portal): gate input on a ready desktop and share recovery backoff

Input dispatch kept only the cached screen and dropped State.waiting, so a closed
Portal passed the gate once the screen unlocked. The supervisor's recover() and the
encoder's stream-loss recovery now share failure backoff and a terminal-denial flag,
so a denied consent is not re-prompted by the other path.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* fix(control): keep unknown lock state unlocked, stop waits on Closing, never drop capture settings

- QuerySystemState with no logind lock state (Xvfb/linger) reports unlocked as before.
- The Portal wait loop also exits while the channel is Closing.
- Capture-setting requests back-pressure instead of try_send dropping the latest setting.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
Co-authored-by: VallierDev <[email protected]>
2026-10-17 10:48:43 +08:00
VallierDevandClaude Opus 5.5 369b493e47 Release v0.1.28
Co-Authored-By: Claude Opus 5.5 <[email protected]>
v0.1.28
2026-10-17 02:38:28 +08:00
VallierDevandClaude Opus 5.5 ce28d7e230 Tests: run local WebRTC peers on a virtual network
The codec-negotiation and ICE/SCTP acceptance tests used real local sockets
and occasionally hit the 30 s connect timeout when the whole suite ran in
parallel. They now use webrtc-rs vnet (shared test_network helper), so they
are deterministic and the acceptance test no longer needs #[ignore].
Test-only change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 02:37:53 +08:00
VallierDevandClaude Opus 5.5 b0beba1a4e desktop-video-probe: fixed input via UU_PROBE_INPUT (#9)
UU_PROBE_INPUT=<video or image sequence> bypasses desktop capture and encodes
the file with the production FFmpeg encoder arguments, so encoder
measurements no longer depend on desktop content; UU_PROBE_LOOP=1 repeats the
input up to UU_PROBE_FRAMES. Missing/undecodable input exits non-zero. The
session path is unchanged. Verified with Y4M, MP4 and PNG sequences (repeat
runs byte-identical); NVENC/VAAPI not hardware-verified.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 01:50:24 +08:00
VallierDevandClaude Opus 5.5 77a556c674 Release v0.1.27
Co-Authored-By: Claude Opus 5.5 <[email protected]>
v0.1.27
2026-10-17 01:26:24 +08:00
VallierDevandClaude Opus 5.5 e89c91e83b Portal: a failed staleness check no longer ends the host loop
Follow-up to #26: retire_if_closed errors (poisoned lock, panicked task) are
logged and treated as not stale instead of returning from serve().

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 01:08:59 +08:00
wanglz111 f35ec3b2c7 Portal: recover capture after live scaling changes (#26)
* fix(portal): recover capture after live scaling changes

* fix(portal): keep input available during session recovery

* fix(portal): serialize reconnect recovery and throttle lock probes
2026-10-17 01:08:32 +08:00
VallierDevandClaude Opus 5.5 aa4dca75d2 Release v0.1.26
Co-Authored-By: Claude Opus 5.5 <[email protected]>
v0.1.26
2026-10-17 00:50:13 +08:00
VallierDevandClaude Opus 5.5 d1791ef861 File transfer: omit the inline listing copy when the reply would not fit
Large folders (5600 entries) were sent both inline and as zlib dir_data in one
message, beyond the 256 KB SCTP limit, so the reply was dropped and the viewer
spun until its timeout. dir_data (what current viewers read) is always sent.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 00:46:58 +08:00
VallierDevandClaude Opus 5.5 90e802b94a Report the display refresh rate; NVENC encodes BGRA directly (#16)
display_info/capability/codec negotiation reported a fixed 60 fps; they now
use the monitor mode (hyprctl on Hyprland, xrandr on X11, UU_DISPLAY_FPS
override, 60 otherwise; external tools bounded to 1 s). NVENC 4:2:0 without
scaling takes bgra/bgr0 input and converts on the GPU (BT.601 limited range,
same tagging as swscale), saving the CPU conversion; UU_NVENC_RGB=0 restores it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 00:34:46 +08:00
VallierDevandClaude Opus 5.5 6226e723b5 SCTP: send messages up to 256 KB like libwebrtc peers advertise
webrtc-rs fixed the association send limit at 64 KB regardless of the remote
a=max-message-size, so a large directory listing (5600 entries, ~73 KB
compressed) failed with 'outbound packet larger than maximum message size'
and the viewer waited until its timeout.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 00:34:46 +08:00
VallierDevandClaude Opus 5.5 296f0fdbcc Release v0.1.25
Co-Authored-By: Claude Opus 5.5 <[email protected]>
v0.1.25
2026-10-16 21:45:44 +08:00
wanglz111 b20fd6ccef Portal: map scaled GNOME input through EIS regions (#24)
* fix(portal): map scaled GNOME input through EIS regions

Keep unsupported portals on legacy input and leave capture/uinput independent of EIS. Cache logical geometry without the native handle lock and reject geometry changes during recovery.

Add native capability, handshake, geometry and lifecycle regression coverage with sanitizer checks; preserve existing non-portal paths. Refs #23.

* fix(portal): keep version 4 capture settings in pixel coordinates

Keep native, selectable and current screen rectangles in pixels with DPR 1 so legacy setting requests cannot implicitly downscale a scaled desktop. Leave Portal and EIS coordinate mapping local and unchanged.

Add inventory/request/ack/sync roundtrip regression coverage, including repeated settings changes and restoring native output. Refs #23.
2026-10-16 21:45:17 +08:00
VallierDevandClaude Opus 5.5 51b489b1e2 Log whether an offer's client_id equals the be-controlled client_id (boolean only)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-16 18:19:22 +08:00
VallierDevandClaude Opus 5.5 fb09b60b8a Release v0.1.24
Co-Authored-By: Claude Opus 5.5 <[email protected]>
v0.1.24
2026-10-16 18:09:38 +08:00
GuanchengLiandClaude Code 37504c7fe8 Adapt FFmpeg output timing args to detected capabilities (#22)
* Adapt FFmpeg output timing args to detected capabilities

Probe the selected FFmpeg (PATH or UU_FFMPEG_ROOT/config ffmpeg_root)
once per process with `-h full` and cache the result per executable
environment (program + LD_LIBRARY_PATH + PATH). FFmpeg 5+ gets
`-fps_mode vfr -enc_time_base 1/<fps>`; older builds such as Ubuntu
22.04's FFmpeg 4.4 fall back to `-vsync 0`. Probe failures, timeouts
and unparseable help output all take the legacy path, and no output
side `-r` is ever emitted. HEVC availability probing stays independent.

Verified on FFmpeg 4.4.2: 20 video tests pass and desktop-video-probe
emits 5 H.264 frames with the first frame an IDR.

Co-Authored-By: Claude Code <[email protected]>

* Keep modern timing args when the FFmpeg probe fails

A failed probe (spawn error, non-zero exit, timeout, or no parseable
help text) previously fell back to -vsync 0, but -vsync is deprecated
since FFmpeg 5.1 and a newer build may reject it, killing the encoder.
Legacy is now selected only from a completed help dump that visibly
lacks -fps_mode/-enc_time_base; everything else keeps
-fps_mode vfr -enc_time_base 1/fps. Also fix the encoder comment: the
same-slot drop belongs to vfr on a 1/fps timebase, while -vsync 0
passes catch-up frames through (a known degradation on FFmpeg 4.x).

Co-Authored-By: Claude Code <[email protected]>

---------

Co-authored-by: Claude Code <[email protected]>
2026-10-16 18:09:13 +08:00
VallierDevandClaude Opus 5.5 41ba1e9440 Log whether an offer's ice_id equals the be-controlled ice_id (boolean only)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-16 17:17:54 +08:00
VallierDevandClaude Opus 5.5 1e4bec4514 Log offer SDP structure (attribute names, extmap URIs, payload counts only)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-16 15:57:49 +08:00
VallierDevandClaude Opus 5.5 b4b872878f Log the structure of incoming SOAC offers (keys, types, lengths only)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-16 15:44:14 +08:00
VallierDevandClaude Opus 5.5 b5b5120ef7 Release v0.1.23
Co-Authored-By: Claude Opus 5.5 <[email protected]>
v0.1.23
2026-10-16 13:26:02 +08:00
VallierDevandClaude Opus 5.5 5028ba1663 Test: pair only UDP/IPv4 host candidates in the codec negotiation test
Pairing every host interface (VPNs, IPv6) let ICE exceed the 10 s connect
timeout when the suite ran in parallel; the suite now finishes in 5 s.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-16 13:25:53 +08:00
VallierDevandClaude Opus 5.5 6058185d1f desktop-video-probe: UU_PROBE_QUALITY selects a viewer bitrate preset
The probe always used Auto (CRF), so the ABR path of the bitrate presets
(#15) could not be measured without a viewer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-16 13:24:31 +08:00
VallierDevandClaude Opus 5.5 6882b76801 Wayland: free cached dma-buf on SHM fallback; recapture after a stall
Review follow-ups to #20: the copy-failure fallback cleared frame state
but no longer released cached dma-buf buffers, and after a backpressure
stall the engine's prefetched frame was as old as the stall. Release
v0.1.22.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
v0.1.22
2026-10-16 12:36:06 +08:00
VallierDevandClaude Opus 5.5 145bf9d25b Release v0.1.21
Co-Authored-By: Claude Opus 5.5 <[email protected]>
v0.1.21
2026-10-16 12:31:38 +08:00
wenmou e603761aa8 Video: reuse capture buffers, cache unchanged frames and propagate send backpressure (#20)
* Wayland: reuse DMA-BUF capture buffers and release protocol objects

* Video: cache unchanged frames and propagate send backpressure
2026-10-16 12:31:00 +08:00
VallierDevandClaude Opus 5.5 a28800ba44 Trust system certificates and show transport error causes (#21)
reqwest used only the bundled webpki roots, so TLS-intercepting proxies
with a custom CA (SSL_CERT_FILE) failed with a bare "error sending
request". Enable native roots (rustls-native-certs honors SSL_CERT_FILE
and SSL_CERT_DIR) and report the error source chain with URL user-info
and query strings removed. Release v0.1.20.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
v0.1.20
2026-10-16 12:27:19 +08:00
VallierDevandClaude Opus 5.5 c080b5f653 Do not report a viewer-closed desktop stream as an error
The final send after the viewer closes fails with "codec is not supported
by remote", which read like an encoder negotiation bug.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-16 11:47:58 +08:00
VallierDevandClaude Opus 5.5 c5ba87f3ad Log streamer_data element shapes and control id relation
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-16 11:45:04 +08:00
VallierDevandClaude Opus 5.5 edaa27fe6b Log the structure of connect requests (numbers, types, lengths only)
Documents what the viewer and cloud send in be-controlled (ConnectOptions
nesting, streamer_data and header value types) without rendering string
or byte contents, large numbers or identifiers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-16 11:34:12 +08:00
VallierDevandClaude Opus 5.5 d630fc4128 Release v0.1.19
Co-Authored-By: Claude Opus 5.5 <[email protected]>
v0.1.19
2026-10-16 11:24:51 +08:00
VallierDevandClaude Opus 5.5 aeaf818c39 Signaling: treat a connection without pings as dead and reconnect (#19)
Only a close frame or read error ended the signaling loop, so a half-open
socket after suspend or a NAT drop left the host believing it was online.
Per Engine.IO 4, report Disconnected when no ping arrives within the
server's pingInterval + pingTimeout so the existing reconnect loop runs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-16 11:24:51 +08:00
VallierDevandClaude Opus 5.5 d5e9007dd6 Release v0.1.18
Co-Authored-By: Claude Opus 5.5 <[email protected]>
v0.1.18
2026-10-16 11:16:49 +08:00
VallierDevandGemini 4 Argon f876ee1ff3 Wayland: reuse per-slot SHM buffers across screencopy frames
Retain memfd, mmap, wl_shm_pool, and wl_buffer per pipeline slot when
dimensions, stride, and format remain unchanged, avoiding 33 MB 4K
allocations and unmaps on every frame. Rebuild on geometry/format
changes or aborted in-flight copies, and release all SHM resources on
reset/shutdown.

Co-Authored-By: Gemini 4 Argon <[email protected]>
2026-10-16 11:01:26 +08:00
VallierDevandClaude Opus 5.5 6cdc177b9e Wayland capture: pace from buffer availability; log capture exit
Review follow-ups to f0506bc: a stalled encoder read no longer shortens the
next capture interval, and the capture process exit status is logged
because nothing awaits its task.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-16 11:01:26 +08:00
VallierDevandClaude Opus 5.5 567662a576 X11: pick up desktop resizes between connections (#18)
The root geometry and XShm image were read once at startup, so after a
RandR or xrdp resize every new connection asked x11grab for the old size
and stalled on "transferring picture". Query the root geometry before
each desktop connection and rebuild the capture when it changed; guard
capture with a lock and reject a stale-sized buffer instead of
overflowing it. The HEVC fallback log now includes the actual failure.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-16 10:56:48 +08:00
VallierDevandClaude Opus 5.5 f0506bcf48 Wayland: pipe capture straight into the encoder and overlap capture with writes; fix terminal races
The native Wayland session relayed each 33 MB 4K frame through this process
and the capture loop wrote synchronously, so a slow encoder read delayed the
next screencopy request (~65 fps at a 144 fps request versus 87-92 fps for
bare capture, #16). Hand the capture stdout to FFmpeg directly, double-buffer
capture against the pipe write on a separate thread, and enlarge the pipe.

Terminal: hold the size lock across the ioctl so the delayed redraw restore
cannot reapply a stale size, and record scrollback and live output under the
sink lock so a reattach never replays a chunk that is also sent live.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-16 10:29:09 +08:00
VallierDevandClaude Opus 5.5 3d08d81b0d Log per-window frame counts in latest-frame stats
sent/skipped are cumulative while max_* are per-window peaks, which was
easy to misread (#16). Add window_s, window_sent and window_skipped.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-16 09:46:10 +08:00
VallierDevandClaude Opus 5.5 5e92abe373 Release v0.1.17
Co-Authored-By: Claude Opus 5.5 <[email protected]>
v0.1.17
2026-10-16 01:30:24 +08:00
VallierDevandClaude Opus 5.5 b63bedd4dc Repaint full-screen terminal programs on reattach; ABR for libx265 bitrate presets
Reattaching replays the scrollback tail, which starts mid-redraw for
full-screen programs (tmux, vim, TUIs), and an unchanged size raises no
SIGWINCH. Shrink the PTY by one row and restore the latest requested size
after a pause so the program repaints (#17).

Apply the #15 ABR change to the libx265 path as well, clarify the
non-wayland build error, and document the Wayland systemd unit and uinput
module autoload (#16).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-16 01:30:09 +08:00
wenmou 9c1ae123db Wayland: keep capturing without output power management; x264 ABR for bitrate presets (#15)
* Wayland: keep capturing when output power management is unavailable

keep_display_awake() runs on the desktop video start path, so a compositor\nwithout wlr-output-power-management made uu_wl_wake() return -1 and aborted\nthe whole desktop stream. Treat the missing protocol as nothing to wake.

* x264: average bitrate for the bitrate presets so 4K keyframes fit

Capped CRF plus VBV cannot fit a large IDR frame at 4K and a low cap, so\nkeyframes came out near-grey. NVENC and VAAPI already carry a target bitrate;\ngive x264 the same and keep CRF only for automatic quality.
2026-10-16 01:30:00 +08:00