* portal: mobile touch-mode drags become touch, consent asks once for it
In touch mode the Android viewer sends a finger as a left-button drag at
absolute positions (observed: press, mouse_move_absolute stream, release),
which on GNOME selects text instead of scrolling. SelectDevices now also
asks for the touchscreen type where AvailableDeviceTypes offers it, and a
drag from an Android/iOS controller (controller_platform 2/3) that follows
absolute motion is replayed as one finger through NotifyTouch* or EIS
touch, so the desktop scrolls and taps as on a touch screen. Relative
motion (the trackpad mode) and every other viewer keep mouse buttons.
A consent saved before this restores keyboard and pointer only. The first
mobile drag then asks the host once per run in the background (GNOME's
share dialog, also visible on the phone; the consent timeout closes it)
and swaps the new session in only when it grants the touchscreen for the
same monitor and size. The saved consent is never removed beforehand.
UU_TOUCH_INPUT=0 keeps mouse drags and never asks.
* input: type mobile IME text as portal keysyms on Latin GNOME layouts
Each mobile text_input was set as the clipboard and pasted with
Shift+Insert, which VTE terminals bind to the PRIMARY selection: text
typed from the phone into a terminal pasted whatever was last selected
(observed: a selected line of box-drawing characters for every letter).
When GNOME's active input source (first of mru-sources) is a Latin xkb
layout, printable ASCII, newline and tab now go through
NotifyKeyboardKeysym, where Mutter picks the key and Shift level of the
active layout. Other text, IBus engines, KDE and EIS sessions keep the
clipboard paste, which no longer replaces the clipboard for plain typing.
* portal test: accept libei before 1.3 rejecting a touch outside one of two regions
libei 1.2 (Ubuntu 24.04, CI) accepts a touch only inside every region of the
device; 1.3.0 checks any region. The harness device also carries a region for
another screen, so the older library rejects the touch with a client-bug
diagnostic. A real one-stream session has one region.
* viewer: decode at the host's native size and filter window scaling
Every frame was scaled into a fixed 1920x1080 canvas and SDL then stretched it
to the window with nearest-neighbour sampling, so remote text looked uneven and
blurry. Decode at the native size (read from ffmpeg's verbose scaler line),
restart the decoder when the host resolution changes, and use linear render
scaling. UU_VIEWER_SIZE keeps the fixed canvas, now resampled with Lanczos.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Add Chinese/English UI language
All GTK windows (viewer launcher, tool windows, host main window and QR login)
and viewer messages are available in Chinese and English. The language comes
from UU_LANG, the choice saved in Settings -> General, then the locale.
README: document the fork's changes and language selection.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Host main window: add the language selector
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* viewer: control center, network status, loading screen, device previews
In-window chrome drawn on the SDL canvas with a fontconfig font (ab_glyph):
- loading animation with the connection stage instead of a black window
- control center (Ctrl+Alt+M or the top tab): quality, fps, true color,
resolution, fit/1:1, volume, auto lock and host mute (SimpleAction 19,
14/18/16), system shortcut grab, file transfer, watch mode, full screen,
disconnect
- network status panel (Ctrl+Alt+G): time, route, fps, bitrate, RTT, loss
- launcher device previews from the last remote picture (local 0600 cache)
- viewer sign-in keeps the local host user service running, so this
computer joins the account's device list; the settings switch controls it
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* viewer: compact cascading control center
Narrow category list with an options card beside the selected row, sized to
its content; opaque cards with a hairline border and soft shadow, so the
remote picture no longer shows through.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* viewer: keep the control center responsive; resync on a key frame
The menu was rasterized on every mouse event just to hit-test it; hit testing
now uses the layout alone and the drawn menu is cached until what it shows
changes. A stalled UI overflowed the access-unit queue, and the reset decoder
then smeared P-frames into blocks; after a reset it now waits for an IDR/IRAP
while requesting key frames. The tab icon is drawn, since fonts without U+2630
showed a box.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* viewer: measured RTT, no crash on closing tool windows, account card
webrtc-ice never measured the round trip, so the network panel always read
'RTT --'. Binding responses now record it on their pair, and the selected
pair is pinged when the sample is older than the keepalive interval, since
a streaming pair never idles (vendor/webrtc-ice/PATCHES.md).
On Wayland, libdecor's GTK plugin drew SDL's title bar with GTK3 from SDL's
thread while the file window ran gtk_main on its own; closing that window
crashed in GTK's style code. GTK builds now offer libdecor only the cairo
plugin unless LIBDECOR_PLUGIN_DIR is set.
Settings > General gets an Account card with the signed-in user and Sign out.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* README: keep the language section, without the fork notes
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* viewer: English server errors in the English UI; stable type_ipc tests
UU servers answer in Chinese only. The English UI now translates the known
messages (2002 target already controlled, assistance refusals) and shows the
code for unknown ones instead of Chinese text.
type_ipc tests shared one temp directory per process and read
XDG_RUNTIME_DIR while another test pointed it at a planted directory; each
call now gets its own directory and socket tests hold the environment lock.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* viewer launcher: switching the language restarts the launcher
The choice was saved but took effect only on the next start, so the window
seemed to ignore it. The launcher now re-executes itself in place; session
windows are separate processes and stay connected.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* viewer: show pictures as soon as decoded; coalesce mouse motion
The raw-stream parser closed an access unit only when the next began, and
frames were collected only when another one arrived, so a single remote
change (a typed letter) waited for the next one. An access unit delimiter
now follows each unit and the loop drains finished frames between units.
Motions within one 8 ms poll collapse to the newest position (click order
kept), so a drag no longer queues behind itself on a relayed path.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* viewer launcher: hosting is opt-in
Signing in to the viewer no longer installs or enables uuremote-native.service.
Only the Settings switch enables or disables it, and the unit's enabled state is
the saved choice, so turning it off survives a restart. A new sign-in restarts the
host only when the user turned it on and it is running.
PATCHES.md: the RTT keepalive also runs on the host; checked with the official
Android client controlling a Linux host.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* viewer: drop SDL event types sdl2 0.37 does not define
sdl2 0.37 transmutes every event type into SDL_EventType. sdl2-compat on SDL3
delivers types SDL 2 does not define (0x207), which is undefined behaviour and
aborts with debug checks (clipboard_requests_use_existing_window on Fedora 44).
Poll raw events and skip those types before the crate converts them.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Keep the package version at 0.2.39
The maintainer sets the version at release time.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
* portal: switch monitors on GNOME, precise touch, stop sharing when idle
GNOME grants one monitor per portal consent and refuses multi-select, so
each Mutter monitor gets its own saved consent (gnome@<connector>). The
monitors are advertised as screens; a switch opens that monitor's session
(silently once consented, GNOME asks on the host the first time) and swaps
it into the shared PortalSession, whose frame size follows the monitor.
Absolute motion and clicks go through the portal session: a uinput tablet
spans every monitor, and clicks on the separate uinput queue could land
before the compositor moved the pointer.
An idle watch ends the portal session (screen-share indicator off) once no
desktop controller is left for two checks; the next one reopens it with the
saved consent.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* portal: stop screen sharing as soon as the last controller leaves
The idle watch stays as the fallback for controllers that vanish without
a release event.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* portal test: accept the runtime-engine message in portal builds
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
Upstream webrtc-ice only gathers UDP relays. Forced-relay sessions also offer
turns:<ip>:<port>?transport=tcp, the only media path on hosts whose UDP cannot
reach the TURN servers but whose TCP goes through an HTTP proxy. Vendor
webrtc-ice 0.10.1 with a TCP/TLS dialer (optional HTTP CONNECT) that frames
STUN/ChannelData for the unchanged turn client. Certificates are chain-verified;
a name mismatch is accepted only for IP-literal TURN URLs. Enabled only with
UU_USE_PROXY=1; default UDP gathering is unchanged.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Route host and viewer WebSocket signaling through the shared reqwest client so UU_USE_PROXY=1 applies to signaling as well (HTTP/HTTPS proxies only, no direct fallback, no redirects, strict upgrade validation). ICE/WebRTC media is not proxied.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Signaling: keep heartbeat detection alive when delivery stalls
The receive loop awaited event_sender.send() without a bound. When the main loop was parked in PeerConnection::close after a released peer, the 64-slot event queue filled and the receiver blocked inside the loop body, so the Engine.IO deadline in the same select! never ran. The host stayed online with a half-closed socket for hours.
- add a watchdog over the last inbound frame, independent of the receive loop
- bound event, pong and control sends with a timeout or try_send
- timeout PeerConnection::close so one dead peer cannot stall signaling
- regression test with a blocked event consumer
Co-Authored-By: Claude Code <[email protected]>
* Signaling: always report Disconnected when the receiver stops
The receive loop can break without enqueueing Disconnected: event delivery exceeded SEND_STALL_TIMEOUT, or the writer already stopped. receiver_done then lets the watchdog exit, while the main loop's rx_event stays open because the idle-renewal timer holds a sender. The host stays in a dead room until the 15-minute renewal, which is deferred while a peer is connected.
Hand a Disconnected off from a detached task after every loop exit. Duplicates are harmless: the main loop breaks on the first one and drops the old receiver.
The new test keeps the consumer blocked past SEND_STALL_TIMEOUT, then drains the queue and expects Disconnected.
Co-Authored-By: Claude Code <[email protected]>
---------
Co-authored-by: Claude Code <[email protected]>
When a port-mapping connection is already open, the Mac viewer opens the desktop by sending SimpleAction 4 (capture_desktop) on that connection's CONTROL channel instead of a new offer. The host now promotes that tool connection to the desktop: video, cursor, TEXT clipboard (with the capability echo replayed) and session counting follow a per-peer active flag. A later desktop demotes it without closing its port mappings. Stream tasks are fenced by an abort handle, and the X11 capture is rebuilt if the screen size changed.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
set-encoder / set-codec signal the running host (only when /proc/<pid>/exe is this exact binary); the live desktop stream re-plans its encoder at the next frame boundary, sends CaptureSettingSync when 4:4:4 falls back, and prints a note when no host was notified. Step 3 of #85.
Co-authored-by: ferstar <[email protected]>
* Restart X11 capture at the new size when the desktop is resized mid-stream
A RandR resize during a session made x11grab fail with BadMatch on the old
size. read_encoder treated that as an encoder failure and walked the whole
fallback chain (NVENC -> CPU, HEVC -> H.264) with the stale size, then the
stream stopped ("Encoder output ended") and the viewer froze. New connections
already re-probed the geometry (#18); live ones did not.
- When an X11 stream fails and the root size differs, skip the encoder
fallback and restart capture at the new size with the same settings.
- Absolute pointer mapping follows the refreshed X11 size.
- New connections compare the root size with their capture instead of the
engine's change flag, which a live stream may already have consumed.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Change the X11 desktop resolution when the viewer picks one
The official Windows host changes its display resolution for the viewer's
分辨率 choice; this host only scaled the encoded stream, so a smaller choice
made text smaller and blurrier instead of larger.
On X11 the capture/resolution RPC now switches the primary output's mode with
xrandr (an existing mode of that size, else a CVT reduced-blanking mode at
60 Hz, or 30 Hz above an HDMI 2.0 pixel clock), re-applying it when mutter
resets the mode after the list changes. resolution_type 3 (original) and the
end of the last desktop stream restore the mode in use before the first
change. The stream restarts capture at the new native size and reports it in
the screen sources and CaptureSettingSync. UU_DESKTOP_RESIZE=0 keeps the old
encoder scaling; Wayland is unchanged.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: VallierDev <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
systemctl start returns 0 when the unit is skipped by a Condition or keeps crashing under
Restart=; show now reads ActiveState/SubState/ConditionResult while waiting and names the real
problem. ffmpeg-sys-next's build script runs before ours, so FFmpeg >= 7 cannot be caught in
build.rs; the README and AGENTS state the 6.x requirement next to the build commands.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Mirrors the official Windows host (GameViewerServer reportLanInfo / PushMessageHandler::wakeOnLan /
send_wol): report the LAN identity after sign-in and answer wake_on_lan pushes with a magic packet
to the target's subnet broadcast. Field names come from the official log strings; off by default
and unverified end to end. wake_on_lan push key names are always logged for evidence.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Session, selected backend (and the X11-inside-Wayland trap), engine plugin load results, uinput
and render-node access, FFmpeg encoders/version, the default codec, sign-in and service state.
Prints booleans, names and versions only; home directory and user name are masked. The issue
template and READMEs ask for it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- KDE portal sessions hold an org.freedesktop.ScreenSaver inhibitor while a desktop connection
is active (GNOME keeps SessionManager.Inhibit), so the idle timeout no longer locks mid-session.
- Log a hint when the desktop locks: viewers only see black frames until it is unlocked.
- Warn when the X11 backend is selected while a Wayland session is running (XWayland root
capture is all black without any error).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The release tarball was X11 only, so Hyprland/niri and GNOME/KDE Wayland users had to build from
source (#43, #54). With --features engine-plugins the wayland and portal engines are built as
libuu-wayland.so / libuu-portal.so and dlopen'ed only when the session selects them, so X11 hosts
need none of their libraries. The wayland plugin is built on Ubuntu 22.04 with the main binary;
the portal plugin needs libei >= 1.1 and is built on 24.04 (glibc >= 2.39). Source builds without
engine-plugins keep linking the engines statically.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Release packages are X11 only; on GNOME/KDE Wayland auto selection picks the
portal backend, which then failed every 5 s with the opaque "portal
unavailable (code 2)".
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The mobile clients' input method sends `text_input {content}` over CONTROL. Upstream only
implements it for X11, so a Wayland host (Hyprland here) dropped the characters with a
warning. Wire it up: characters the session keymap already produces are pressed as
ordinary keycodes, and characters it cannot produce are carried by spare keycodes (the
keymap has ~33 named but unmapped ones) declared for the duration of one batch, in text
order, then removed again.
The focused client translates keycodes with the keymap the compositor last handed it, and
a keymap uploaded to a keyboard the seat already has is never handed on again: measured on
Hyprland 0.56.2, pressing the remapped keycodes then reproduces the previous message's
text (a space came out as the previous message's first character, and every message
repeated the one before it). Re-attaching the virtual keyboard is what makes the
compositor send the keymap to the client, so each batch does that, waits for the
compositor to install the keymap, and releases held keys first because the new keyboard
starts with none. No timing sleep is needed once the keyboard is re-attached, so there is
none. Plain latin text and spaces never touch the keymap at all. The pristine keymap is
restored after every call, so uu_wl_key keeps its own symbol map and the compositor is
never left with spare keys bound.
`wayland-text-probe` reports how many characters one upload can carry and types a sample;
UU_PROBE_SEQUENCE types one message per |-separated field, the way the phone's input
method sends them, which is what reproduced this locally.
Co-authored-by: Hey Claw <[email protected]>
Co-authored-by: Claude Code <[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
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]>
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]>
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]>
- UU_DESKTOP_BACKEND=none: host goes online without a display; terminal, file
transfer and port mapping stay available, desktop offers are ignored.
- Tool peers (file/terminal/port mapping) get a nominal ScreenSources/CaptureChange
and Allow permissions when no desktop is available: the port-mapping viewer
aborts otherwise (also affected portal hosts before local consent).
- x11_engine: an explicit DISPLAY that cannot be opened no longer falls back to
:0/:1 (would silently capture the physical screen).
- contrib/virtual-desktop: Xvfb + desktop session on the systemd user bus
(or a private dbus-run-session bus) and a uuremote-native drop-in.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- uinput.rs: kernel virtual keyboard + absolute pointer (Sunshine-style),
physical evdev keycodes so the compositor's keysym lookup cannot drop
shifted symbols (#3). Auto on Wayland/portal when /dev/uinput is
accessible (udev uaccess rule), XTest kept on X11 (it suppresses
autorepeat for held keys over latency). UU_INPUT_BACKEND=auto|uinput|native.
- Mac viewers send Cmd+V as Ctrl+V (verified: Cmd and Ctrl both arrive as
VK_LCONTROL). In a focused X11 terminal Ctrl+V becomes Ctrl+Shift+V so it
pastes instead of quoting the next key; Ctrl+C always interrupts (copy is
Cmd+Shift+C). UU_TERMINAL_SHORTCUTS=0 disables.
Verified on the 3090 with the official Mac viewer: paste, interrupt,
uinput typing incl. underscores.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The in-process encoder can now capture through XShm and XDamage in pure Rust
(x11rb) instead of libav's x11grab. Damage marks the picture dirty; a dirty
picture is captured and encoded on a fixed frame tick so the stream keeps a
steady cadence. An idle screen sends a keepalive every 40-67 ms (15-25 fps,
random) so the viewer does not treat a static desktop as stalled.
- src/damage_capture.rs: XDamage NonEmpty reports and XShm copy-out
- src/inproc_encoder.rs: run_damage loop; x11grab stays as the fallback
- UU_CAPTURE=grab forces the x11grab path
- x11rb is an optional dependency, enabled by the inproc-av feature only
Measured on a static desktop, CPU drops from about 12% to about 1% versus
x11grab. Moving content costs about the same CPU as x11grab.
Message field 27 PortMappingFrame {session_id, rule_id, stream_id, type,
payload} on FILE_DATA_CHANNEL: SYN {version, target_host, target_port} ->
TCP connect (10 s timeout) -> SYN_ACK {version, ok, error}; DATA both ways;
FIN closes; DATA_ACK ignored, matching the official PortMappingHandler.
Bounded write queue per stream, data-channel backpressure, all streams
closed with the peer. UU_PORT_MAPPING=0 disables it. Replaces the unused
port_forward.rs placeholder.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Address PR review:
- The FFmpeg 6 bindings (AVChannelLayout, ffmpeg-next 6.1) do not build on
the 22.04 runners, which ship FFmpeg 4.4. The default build no longer
depends on libav at all, so `cargo test --locked` and the release job on
22.04 no longer compile that code.
- The release tarball no longer links the build machine's libav SONAMEs.
Default builds use the FFmpeg child process for video and audio again.
- `UU_FFMPEG_ROOT` / config `ffmpeg_root` now selects the child-process path
even in an inproc-av build, so a bundled FFmpeg with working NVENC is not
silently bypassed.
Build with `--features inproc-av` (FFmpeg 6 dev packages, Ubuntu 24.04) to
get in-process capture, encoding and Opus. CI has a test-inproc job for it.
`UU_VIDEO_PIPELINE=process` still forces the child path for video.
Probes on ros2go-gpu (440 Hz tone, 5 s):
default (ffmpeg child): 44.0 packets/s, 132 kbps, max gap 43 ms
inproc-av: 49.7 packets/s, 133.5 kbps, max gap 22 ms
desktop-video-probe under inproc-av with UU_FFMPEG_ROOT=/usr uses the child
path (no `pipeline=in-process` in the log); without it, in-process.
The Opus encoder for desktop sound now runs in this process: PulseAudio
or PipeWire-pulse monitor input, resampled to s16 stereo 48 kHz, grouped
into 20 ms libopus frames, and sent as raw Opus packets. The Ogg muxing
and OpusTags skipping from the child-process path are gone.
Probe on ros2go-gpu with a 440 Hz tone on auto_null (desktop-audio-probe,
8 s): 49.7 packets/s, 134 kbps (target 128 kbps), largest gap between
packets 22 ms. No ffmpeg child process is started while it runs.
Not covered: the full viewer session start has not been checked against a
live UU client.
Also enables ffmpeg-next's software-resampling feature.
Capture (x11grab) and H.264 encoding (h264_nvenc / libx264) now run in
this process through ffmpeg-next, with the same codec options as the old
ffmpeg CLI. Each encoder packet is one access unit, fed to the existing
DependencyGate. A PLI or FIR from the viewer forces the next frame to be
an IDR. Wayland and portal capture still use the child-process path.
Set UU_VIDEO_PIPELINE=process to fall back to the old ffmpeg child.
desktop-video-probe accepts UU_PROBE_FRAMES to lengthen the sample.
Measured with desktop-video-probe on ros2go-gpu (RTX 4090 D, Xvfb
1920x1080 @60fps, 600 frames, mostly static desktop). CPU is the sum of
the probe process and its children, sampled from /proc once per second.
Probe only: no WebRTC send, no audio.
encoder pipeline CPU (%) wall (s) bitrate (kbps)
nvenc process ~138 10.17 5356
nvenc in-process ~43 10.34 5176
libx264 process ~135 10.09 5073
libx264 in-process ~72 10.08 4986
All four outputs decode without errors and start with an IDR.
Not covered: audio still runs its own ffmpeg child (src/audio.rs), PLI to
IDR has not been checked against a live viewer, and the CI jobs need the
libav*-dev and libclang-dev packages (added to ci.yml, release.yml,
AGENTS.md and the READMEs).
Version 0.1.1 with release notes; the start-up log reports the package
version instead of a hard-coded v1.0.0.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Any unrecognized first argument fell through to the server start-up, so a
mistyped or missing subcommand launched a second full host next to the
running service. Print usage and exit 2; help/-h/--help print usage.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Unofficial Linux host for NetEase UU Remote: X11 (production-tested on
GNOME/Ubuntu 24.04), experimental Wayland (Hyprland) and portal
(GNOME/KDE) backends; video, input, clipboard, file transfer, terminal,
sound, quality/fps/resolution settings, lock/unlock and system actions.
Co-Authored-By: Claude Opus 5.5 <[email protected]>