The official Windows host only acknowledges the rich format-list offer
and never asks for the data. Each local change now also sends RpcRequest
case 10 ClipboardTextChangeRequest with the text (its
handle_text_change_request -> notifyReceiveText path); the host answers
case 6 err=1 (CB_SUCCEEDED), logged as a status only. This project's
host ignores case 10 and keeps using the rich offer. Note: on the tested
Windows host the acknowledged text still did not reach the desktop
clipboard; under investigation.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Live against an official Windows host (PowerShell via ConPTY):
- Its rpc_main.proto has no check_env (requests end at 25), so a missing
answer within 3 s no longer aborts; a negative answer still does.
- OPEN carries "option":"none"; the host rejects an OPEN without it
("terminal open: missing 'option' field", kError 1004). This
project's host ignores the key.
- The host answers OPEN with {code,message}, header session 0, and keeps
one terminal per connection as session 0; a nonzero header still
overrides the body for this project's host.
- Echo requests whose SimpleAction omits the default action 0 are
answered too.
Create/reattach on this project's host unchanged.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The official Windows host answers every PortMappingFrame with session_id
1 regardless of the viewer's value, so the random 64-bit session never
matched and every stream ended with a SYN timeout. One port-mapping peer
carries one session; use 1 (this project's host echoes it). Stream
failures and unmatched frames are now logged with reasons and wire types
only. Verified: HTTP through the official Windows host and this
project's host.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Live against an official Windows host:
- Uploads split Windows targets (C:\dir\name) on either separator and
keep the host's separator for the directory; '/x' keeps the root.
- The upload request carries FileInfo.modified_time, the zlib FileList in
list_data (field 6) and a task_unique_id, as official viewers with the
list-compress feature do; the Windows host rejected the inline-only
request with code 2. The inline copy stays for older hosts.
- Downloads accept blocks up to 256 KiB: the Windows host sent a 64 KiB
file as one block, which the old 32 KiB limit rejected with code 3.
64 KiB and 1 MiB round trips matched by sha256 on the Windows host and
on this project's host.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Offer H.265 (RFC 7798) next to H.264 and list H.265 and 4:4:4 decoder
caps; the host picks the codec. Depacketize single NAL, AP and FU units
with the existing reorder/loss handling and decode with the ffmpeg CLI
(-f hevc). UU_VIEWER_CHROMA=444 requests true color via
CaptureSettingRequest field 7 and follows CaptureSettingSync;
UU_VIEWER_CODEC=h264 keeps H.264 only.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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]>
* 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]>
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]>
* 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]>
* 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]>
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]>
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]>
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]>
* 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
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]>
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]>
* 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.
* 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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
* 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.
One video track carries H.264 or H.265 (RFC 7798 payloader); the host
announces its encoders with CONTROL Message 18 CodecNegotiation and picks
H.265 when the viewer negotiated it (the official Mac viewer offers H265
first; CaptureSettingRequest field 13 only reports the current codec).
hevc_nvenc / libx265 / hevc_vaapi with fallback to software HEVC, then
H.264; UU_VIDEO_CODEC=h264 forces H.264. True color 4:4:4 applies to H.265.
Verified with the official Mac viewer on NVENC.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The viewer sends CaptureSettingRequest field 7 = 3 when 真彩 is enabled
(ff_capture_setting versions are cumulative, so our version 4 already
implies chroma sampling). Encode yuv444p with NVENC high444p / x264
high444 and report the encoded chroma in CaptureSettingSync; VAAPI and
inproc stay 4:2:0. Log ConnectOptions decoder_cap_list (numbers only).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Tray menu: open main window, allow switch (synced), quit. Quit stops the
systemd user unit (found via /proc/self/cgroup) so Restart=always does not
bring it back; `uuremote-server show` starts the installed unit when the host
is not running. SIGUSR1 handler is installed before the pid file is written.
Verified on Ubuntu 24.04 GNOME (X11).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
With the viewer option 「使用 macOS 快捷键」 off, Cmd arrives as VK_LWIN
(verified: Cmd 0x5B, Option 0xA4, Ctrl 0xA2; controller_platform 4 = macOS).
For macOS controllers Cmd+C/V/A/F/X/Z become Ctrl+key, Cmd+C/V become
Ctrl+Shift+C/V in a focused terminal, Ctrl+C keeps interrupting; other
combos and Cmd alone stay Super. Verified with the official Mac viewer.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Like the official client: share a device ID + verification code; the other
person connects from 开始协助. Guest identity before sign-in, account identity
after (same share ID). One GTK window: 本设备 (allow switch, ID/code with copy,
verification modes incl. custom code, rotation schedule, copy & share) and
账号 (QR before sign-in, masked account + sign out after). Logged-in hosts keep
the window hidden; `uuremote-server show` / the desktop launcher opens it.
App icon and .desktop entry in contrib/desktop.
Protocol from the official Windows lite host; guest flow, wrong-code rejection,
rotation, switching off, sign-in/sign-out verified with the official Mac
viewer. Signed-in assistance from another account is not yet verified.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Squashed from the Codex v0.1.9 branch (reviewed):
- Clear stale input when a desktop session starts or ends and at service
start/stop: X11 releases every pressed key/button on the display (a stuck
XTest button blocked all clicks after a VM reboot), uinput resets its own
devices, Wayland/portal sweep the keys this host can emit. A per-desktop
lease stops late callbacks of an old connection from touching a new one;
file/terminal/port-mapping peers never release desktop input.
- Native Wayland (--features wayland): double-buffered screencopy pipeline,
viewer frame rate drives the capture rate, opt-in dma-buf (UU_WAYLAND_DMABUF=1,
linear only, falls back to SHM). VM-measured only.
- Internal QA records (docs/validation, contrib/tests) removed from the public
tree and ignored; they stay in the private project.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The 500 kbit cap left a 3296x2036 IDR (~130 KB at the 2M preset) no room, so
x264 emitted near-grey keyframes that sharpened over each 0.5 s GOP. Reproduced
with a static 3296x2036 desktop-like image at the 2M preset over 6 s: 250k and
1000k buffers produce grey keyframes (154/360 frames at 1000k), 2000k and 4000k
none. NVENC ull and VAAPI keep the small low-latency buffer. Thanks to
@liangjiahui01 for the analysis.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
ffmpeg lists h264_nvenc even without NVIDIA hardware, so AMD/Intel hosts ran a
doomed NVENC process before every libx264 stream. UU_VIDEO_ENCODER=nvenc forces it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>