* 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]>
The 100-500 kbit NVENC default squeezes a 1440p IDR into ~62 KB, so the
picture blurs and sharpens once per GOP. Share the VAAPI buffer parser so
UU_NVENC_BUFFER_MS (10-1000 ms of the bitrate cap) applies to the FFmpeg
pipeline and the in-process engine; default unchanged.
Co-Authored-By: Claude Opus 5.5 <[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]>
Opt-in X11 monitor selection for #98: RandR monitors from xrandr --listmonitors through the existing screen-switch path; x11grab reads display+x,y at the monitor size, absolute input adds the monitor offset, in-process engine and xrandr resize are skipped while a region is captured.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The WARN filter let webrtc_ice/dtls lines push the useful ones out of the
last 80 lines (#99). Also mask IPv6 and MAC addresses, and ask for the
graphical session terminal: doctor from SSH/tty reports no DISPLAY.
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]>
v0.2.25 showed KDE's unknown icon on Plasma 6.8 (#87). Plasma resolves
SNI icons theme by theme, trying dash-trimmed names in each theme before
the IconThemePath app theme, which comes last, so a cache-only icon is
easy to lose. Write it to $XDG_DATA_HOME/icons/hicolor (found by every
panel's default lookup; only when changed) and keep that as the theme
path. The new name "uuremote-tray-symbolic" cannot trim into the colored
"uu-remote-linux" app icon and avoids entries cached under the old name.
Checked with KIconLoader on Plasma 6.7 (Plasma's IconThemePath setup and
the global loader both resolve it, with the colored icon installed too).
Co-authored-by: VallierDev <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
#16: with display, capture and encode all on an RTX 5070 the packed-RGB
input path is 19% slower in the probe and 25% end to end than CPU
swscale, while on an iGPU-composited desktop it was neutral to faster.
Keep it on by default only when no connected DRM connector belongs to an
nvidia-bound card; UU_NVENC_RGB=1 forces it, =0 still disables it.
Co-authored-by: VallierDev <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
* Tray: monochrome icon that follows light/dark panels
The tray used the colored app icon (or the theme's "computer" when it was
not installed), which is hard to see on dark panels. Ship a 16px symbolic
icon embedded in the binary, write it to the user cache and pass that
directory as the indicator's icon theme path: GTK and the GNOME
AppIndicator extension recolor "-symbolic" names, KDE recolors the
ColorScheme-Text class. Fixes#87.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* AGENTS: config.json is parsed once, re-read only on LoginExpired
Reported in #85: the 60 s sleep is the room renewal poll, not a config reload.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: VallierDev <[email protected]>
Co-authored-by: Claude Opus 5.5 <[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]>
webrtc-srtp 0.12.0 stored every sequence number and used a 100-packet window to
guess the rollover counter. A NACK retransmission of a pre-wrap packet sent after
the wrap (65000 after 85) rewound that state, so the next new packets were
protected with ROC+1 and the viewer failed authentication on all of them: frozen
video after the Windows viewer returned from the background.
Vendor webrtc-srtp 0.12.0 with the RFC 3711 Appendix A half-space estimate and a
high-water index that retransmissions cannot move back. Regression tests fail on
upstream (65000 != 85) and pass with the fix for AES-CM/HMAC and AES-GCM.
Co-authored-by: VallierDev <[email protected]>
Co-authored-by: AYssu <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
README/README.en/AGENTS: AMD iGPUs (HawkPoint, Cezanne) are accepted on the inproc-av VAAPI engine with the official
Mac viewer; the FFmpeg process pipeline on AMD is not separately verified. inproc-av now covers VAAPI in process;
build headers listed. Thanks @ferstar.
With --features inproc-av on X11 and UU_VIDEO_ENCODER=vaapi, VAAPI runs in process: a DRI3 DMA-BUF of the root
(XShm upload without DRI3) goes through VPP to NV12 and the hardware encoder. SPS/PPS(/VPS) and slice headers are
packed by the host because radeonsi (Mesa 26) does not write them. libva/libva-drm are dlopen'ed; release builds do
not enable inproc-av. The NVENC path is unchanged.
Accepted by the contributor on AMD HawkPoint1 (Mesa 26.2.3), 1920x1200@60, with the official Mac viewer
(HEVC, presets, fps, scaling). Intel iHD and 4K are not verified. Thanks @ferstar.
H.264 High 4:4:4 / HEVC FRExt with chromaFormatIDC 3 and AQ off when 真彩 is requested; GPUs without YUV444 encode fail the capability check and fall back. full_chroma_available() no longer excludes the in-process path. UU_PROBE_CHROMA=444 for the probe.
Co-authored-by: ferstar <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Replaces the FFmpeg-based in-process encoder with a native NVENC engine (vendored nv-codec-headers n12.1.14.0, libcuda/libnvidia-encode dlopen'ed at runtime, primary context reuse). Fallback: native NVENC -> FFmpeg NVENC process -> libx264. inproc-av no longer links FFmpeg; VAAPI/CPU always use the process pipeline. Default builds are unchanged.
Co-authored-by: ferstar <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The official viewer (libstreamer, Mac 4.43) treats a video_codec_capability entry
with width or height 0 as unsupported. The 4.37 Windows host we copied in #49 ran on
a GTX 660 without HEVC/4:4:4, so its 0x0 entries meant exactly that. Evidence by
@ferstar in #77.
Co-authored-by: VallierDev <[email protected]>
Co-authored-by: ferstar <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
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]>
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]>
Drop the hard-coded DISPLAY=:0 and install under graphical-session.target like packaging/deb; Xfce/i3, headless and the virtual desktop keep WantedBy=default.target. AGENTS.md recipe aligned.
Co-authored-by: ferstar <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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]>
- Never spin on immediate unchanged status answers or transport errors (2 s backoff); repeated
QR codes that expire within seconds back off exponentially and point to re-registering the
device identity, which recovered a flagged device in #68.
- Custom bitrate field 8 is bit/s (#67); values that can only be Mbit/s or kbit/s are scaled
instead of capping the encoder at 1 kbit/s.
- doctor: without DISPLAY the X11 engine still tries :0/:1, so the #66 warning says that.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Without DISPLAY and without WAYLAND_DISPLAY the desktop backend cannot
capture anything: the host logs 'Desktop unavailable ... x11_init failed'.
The report named X11 as the selected backend and nothing else, which reads
like a working setup. Name the missing display and note that the terminal,
file transfer and port mapping tools still work.
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.
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]>
Built and install-tested in the release workflow (and CI) with dependencies taken from the
binaries by dpkg-shlibdeps. The unit starts with graphical-session.target; uinput access stays
opt-in (the udev rule ships under /usr/share/doc).
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]>