Commit Graph
31 Commits
Author SHA1 Message Date
VallierDevandClaude Opus 5.5 b1da297e42 Wayland: only a missing virtual pointer falls back to uinput (#78)
uu_wl_move returns -2 only when the compositor has no wlr-virtual-pointer; other failures are returned as before. Document UU_WAYLAND_NO_VIRTUAL_KEYBOARD.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 21:05:11 +08:00
ossSBandClaude Opus 5.5 c739036301 Wayland: virtual pointer and keyboard are optional; capture still starts (#72, #73)
Compositors without wlr-virtual-pointer, or that restrict the virtual keyboard to their input method (Denial), now bring up capture and fall back to uinput for input. UU_WAYLAND_NO_VIRTUAL_KEYBOARD=1 skips the virtual keyboard.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 16:29:19 +08:00
VallierDevandClaude Opus 5.5 5fdb98b0f5 QR login follows the official client: status_query_ticket, 60 s long poll, stop on failure (#68)
From the official Mac client (UURemote 4.42; QRCodeGenLoginResponse decodes only qrcode_jump_url
and status_query_ticket, the status/by_qrcode bodies carry that ticket under "token"):
- gen/login is sent without a body; the status ticket is status_query_ticket (older token as fallback).
- The status long poll re-asks right after each answer with a 60 s request timeout (was 12 s).
- Status 3 regenerates at once, status 0 after 0.35 s, 4 logs in (3 no longer calls by_qrcode).
- Errors such as HTTP 400 code 1190 and timeouts stop polling until the user clicks the new
  刷新二维码 button (Enter in a terminal; one minute when neither exists). This replaces the
  v0.2.19 backoff and the re-register hint.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 16:58:00 +08:00
axlrose c45e4749b5 Wayland: a failed output-power handshake must not block screencopy (#65)
Output power management is optional: the engine comment already says so, but
uu_wl_wake() only tolerated a *missing* power manager. When the compositor
offers zwlr_output_power_manager_v1 and then refuses the mode (headless
outputs, outputs without DPMS), power_failed is set and the function
reported an error. capture::keep_display_awake() propagates that error and
video.rs aborts the whole capture task with '?', so a client could connect
but never received a frame.

Treat a failed power handshake like a missing one: skip waking the screen
and keep streaming.
2026-10-20 16:28:46 +08:00
VallierDevandClaude Opus 5.5 68ad9759bd KDE idle inhibition during remote sessions; lock and X11-in-Wayland hints (#61)
- 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]>
2026-10-20 12:12:28 +08:00
ZoranandJuanZoran d90b4bccde Hyprland: bind absolute pointer to the captured output; opt-in monitor switching (#57)
Co-authored-by: JuanZoran <[email protected]>
2026-10-20 00:33:31 +08:00
70cb5ad57e Wayland/wlroots: type mobile IME text through the virtual keyboard's spare keycodes (#51)
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]>
2026-10-18 21:07:23 +08:00
VallierDevandClaude Opus 5.5 19d0563781 desktop: viewer launcher entry and window icon; explicit StartupWMClass (#13)
The viewer's GTK windows had no icon and no desktop entry, so docks showed a
generic icon next to the host's. Add uu-remote-linux-viewer.desktop and use the
host icon for viewer windows.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 17:25:14 +08:00
VallierDevandClaude Opus 5.5 63ebb3e78a Release v0.2.7: mobile text_input (#13, #46); platform-aware viewer clipboard
Host: accept the official text_input {content} action on any channel and type it on
X11 via spare-keycode Unicode keysyms (verified with xev); log non-CONTROL JSON
action names. Viewer: Windows-type hosts get only the case-10 text change (a rich
format list overwrote it and was never rendered), Mac gets only the rich offer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 09:41:56 +08:00
VallierDevandClaude Opus 5.5 aafc17e626 fix(ui): keep GTK windows on the light Adwaita theme (#43)
The CSS hard-codes a light palette; under a dark system theme unstyled
labels became white on white.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 22:45:34 +08:00
VallierDevandClaude Opus 5.5 2815a01569 feat(viewer): remove a device from the account (unbind)
POST /api/v1/device/{id}/unbind, the path the official Windows host and Mac
viewer use for 「删除设备」. Verified live on a disposable test device; the
shared-device path (/api/v1/device/share/{id}/unbind) comes from strings only.
CLI: uuremote-viewer unbind DEVICE [--shared]; launcher: 更多工具 → 删除设备
with a confirmation dialog.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 22:26:14 +08:00
VallierDevandClaude Opus 5.5 5c5958115a viewer: keep the open device page usable across list refreshes
The device list refresh (startup and every 30 s) reset the selected
device to none while its page stayed open, so every button on that page
silently did nothing. Re-select the same device by id after a refresh.
The replace-session confirmation now uses Chinese button labels like the
other dialogs instead of locale-dependent OK/Cancel.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 17:08:46 +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
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
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
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
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 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]>
2026-10-16 12:36:06 +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
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 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
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
VallierDevandClaude Opus 5.5 d4483e2bbd Tray icon (AppIndicator via dlopen, GtkStatusIcon fallback); show restarts the service
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]>
2026-10-15 23:02:08 +08:00
VallierDevandClaude Opus 5.5 94039c092a Remote assistance (experimental) and unified host window
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]>
2026-10-15 22:17:25 +08:00
VallierDevandClaude Opus 5.5 b5cc5ed736 Release input at desktop session boundaries; pipelined native Wayland capture
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]>
2026-10-15 19:45:12 +08:00
VallierDev d461ef9bed Add opt-in linear KMS capture prototype with explicit security limitations 2026-10-15 10:49:12 +08:00
VallierDevandClaude Opus 5.5 26d4812480 Headless mode, virtual desktop scripts, tool peers without a desktop
- 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]>
2026-10-15 10:13:58 +08:00
VallierDevandClaude Opus 5.5 49edf1d389 uinput input backend and terminal-aware paste
- 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]>
2026-10-15 09:49:03 +08:00
VallierDev 66c8bb3249 Preserve granted clipboard capability across locked-session handshake and test closed state 2026-10-15 02:10:59 +08:00
VallierDev 050b8710a8 Fix GNOME fractional-scale absolute pointer coordinates and add precise GTK target probe 2026-10-15 02:10:59 +08:00
VallierDevandClaude Opus 5.5 502635b156 Initial import of uu-remote-linux
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]>
2026-10-14 23:53:16 +08:00