Commit Graph

4235 Commits

Author SHA1 Message Date
Geoffrey McRae
039a759f85 [lgmp] core: harden shared-memory bounds
Some checks are pending
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Waiting to run
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Waiting to run
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Waiting to run
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Waiting to run
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Waiting to run
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Waiting to run
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Waiting to run
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Waiting to run
build / module (push) Waiting to run
build / host-linux (push) Waiting to run
build / host-windows-cross (push) Waiting to run
build / host-windows-native (push) Waiting to run
build / idd (push) Waiting to run
build / obs (clang) (push) Waiting to run
build / obs (gcc) (push) Waiting to run
build / docs (push) Waiting to run
2026-08-24 22:52:58 +10:00
Geoffrey McRae
0062db4eef [host] d12: stop invalid pointer shape copies 2026-08-24 19:13:11 +10:00
Geoffrey McRae
4e75351c78 [client] transport: allow packed BGR storage heights 2026-08-24 19:13:11 +10:00
Geoffrey McRae
f3a6964ade [client] lgmp: align cursor transform snapshots 2026-08-24 19:13:11 +10:00
Geoffrey McRae
957e4ee54b [client] lgmp: validate frame message alignment 2026-08-24 19:13:11 +10:00
Geoffrey McRae
357d5fd3c5 [client] lgmp: snapshot session records 2026-08-24 19:13:11 +10:00
Geoffrey McRae
56ea0cfaba [client] opengl: validate framebuffer uploads 2026-08-24 19:13:11 +10:00
Geoffrey McRae
50b7ca603a [client] opengl: retain deferred frame leases 2026-08-24 19:13:11 +10:00
Geoffrey McRae
6579fe9098 [host] d12: bound damage metadata 2026-08-24 19:13:11 +10:00
Geoffrey McRae
9bbccfdcb9 [host] lgmp: account for frame header capacity 2026-08-24 19:13:11 +10:00
Geoffrey McRae
f664be88bc [host] dxgi: clean up failed frame writes 2026-08-24 19:13:11 +10:00
Geoffrey McRae
8336a27192 [common] rects: validate copy geometry 2026-08-24 19:13:10 +10:00
Geoffrey McRae
b78b92a53f [client] opengl: clean up failed configuration 2026-08-24 19:13:10 +10:00
Geoffrey McRae
197b4d060f [common] framebuffer: bound row copies 2026-08-24 19:13:10 +10:00
Geoffrey McRae
556e771926 [client] lgmp: bound pointer payloads 2026-08-24 19:13:10 +10:00
Geoffrey McRae
ef8636cbeb [client] lgmp: snapshot and validate frame layouts 2026-08-24 19:13:10 +10:00
Geoffrey McRae
abf98c0267 [host] pipewire: report truncated frames correctly 2026-08-24 19:13:10 +10:00
Geoffrey McRae
50b1c9b2e2 [client] cursor: validate shape geometry 2026-08-24 19:13:10 +10:00
Geoffrey McRae
8cb6a6873e [client] audio: recover physical underrun debt
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
A stable clock model can request a negative recovery slew while the
unbounded ring is physically underrun. This leaves the reader ahead of
the writer indefinitely and outputs silence until playback is restarted.

Floor active recovery at the physical low-water requirement. Rebase the
device-clock phase by any extra refill so modeled latency remains at the
target without restarting the underrun correction cycle.

Add a deterministic regression for negative physical debt opposing the
stable clock model.
2026-08-22 19:33:27 +10:00
Geoffrey McRae
366a748549 [client] pipewire: honor playback quantum
Do not treat the capacity of an allocated PipeWire buffer as the
requested playback period when PipeWire supplies no per-buffer hint.
Use the current stream quantum when available and fall back to the
configured period.
2026-08-22 18:53:22 +10:00
Geoffrey McRae
ebf764ae25 [client] audio: reset playback cleanly on resume
Count one underrun per starvation episode and end the sync diagnostics
epoch when a logical source stops.

Resume a compatible backend synchronously so data after a same-wire
restart is accepted immediately. Rebase the first post-idle device tick
without passing a long gap through the short-step clock filter.

Cancel in-flight backlog trims before fresh audio can be queued.
2026-08-22 18:53:22 +10:00
Geoffrey McRae
d8e7966087 [client] audio: fix underrun clock recovery
Recover stable local playback in the device clock domain and restart
rate control from the measured feed-forward clock ratio.

Ignore catch-up packet sizing until the normal source cadence returns.
2026-08-22 18:53:22 +10:00
Geoffrey McRae
5b106015de [client] audio: ignore jitter after underruns
Do not learn late delivery from packets that already caused an
underrun and media-clock rebase. Preserve learned jitter only across
continuous playback.
2026-08-22 18:53:22 +10:00
Geoffrey McRae
7476e56ded [client] spice: terminate fallback after MAIN loss
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
Treat a missing SPICE MAIN channel as terminal in PureSpice.

Check fallback session health before activation and publication.
2026-08-21 20:36:36 +10:00
Geoffrey McRae
53917c4918 [client] input: synchronize host lock state over LGMP
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
Cache native keyboard lock state across input-provider transitions and
reconcile it with HID LED feedback over LGMP.

Project raw and corrective lock-key transitions through the reliable
input FIFO, defer correction until outstanding transitions settle, and
recover from delayed or missing feedback without double toggling.
2026-08-21 15:03:57 +10:00
Geoffrey McRae
efb397bbaf [client/idd] input: wait for valid keyboard LED feedback
Do not publish the default all-off LED value until Windows supplies a
real HID output report. Treat the first all-off report as valid and
retain known state across pipe reconnects.

Serialize feedback processing with connection invalidation so a stale
message cannot restore validity after disconnect.
2026-08-21 13:55:15 +10:00
Geoffrey McRae
7ca94e8959 [idd] helper: expose PNG clipboard images as DIB
Advertise PNG offers as delayed CF_DIBV5 data while retaining the
registered PNG representation. Decode requests with the native WIC
PNG decoder so applications that only accept DIB formats can paste
the image.
2026-08-21 13:40:34 +10:00
Geoffrey McRae
ccb80d6464 [client] clipboard: preserve formats after file import failure
Retain non-file clipboard representations while asynchronous file MIME
imports are validated. If an offered URI list is invalid or cannot be
read, publish the retained image and text formats instead of clearing
the clipboard.
2026-08-21 13:32:39 +10:00
Geoffrey McRae
423269802f [client] evdev: fix input capture and device handling
Classify configured devices by keyboard and pointer capability so
automatic keyboard capture leaves relative pointer devices with the
display server.

Run descriptor, grab, physical-state, and LED operations on one worker.
Marshal normalized events through each display server's event loop and
serialize ownership changes with per-lane barriers.

Fall back whole lanes to native input when an evdev cohort cannot be
owned, and retry missing or removed devices without disabling the rest.

Handle report framing, SYN_DROPPED, high-resolution wheels, queue
overflow, held-state cleanup, and guest-driven keyboard LEDs. Restore
host LEDs and kernel grabs during teardown.

Re-evaluate capture when the active input transport changes.
2026-08-21 13:10:34 +10:00
Geoffrey McRae
8b38546049 [client] displayserver: support external event sources
Allow display servers to dispatch a caller-owned event source on their
native event thread. This lets background input readers marshal events
to the thread that owns application and display-server state.

Poll X11 fairly when native events remain continuously available, and
use bounded polling if the external descriptor cannot be registered.
2026-08-21 13:07:51 +10:00
Geoffrey McRae
71733433ed [client/idd] input: synchronize keyboard LEDs
Report guest HID keyboard LED state from LGInput to LGIdd and
publish it with the LGMP input endpoint status.

Forward SPICE modifier updates through the same provider state so evdev
can synchronize physical keyboard LEDs across transport changes and
reconnects.

Bump the versioned pipe and KVMFR input status contracts for the new
feedback state.

Accept earlier LGMP input status versions without LED feedback so the
client retains input while the guest driver is being upgraded.
2026-08-21 13:07:46 +10:00
Geoffrey McRae
1a5bdc14aa [client] input: fix focus capture startup
Capture-on-focus could consume the initial focus event before an input
provider became available. The focused state then suppressed any later
attempt to establish capture.

Treat explicit capture as local window state, refresh keyboard ownership
on focus and input-policy changes, and preserve pre-ungrab availability
for key release. Fall back to the window center when guest cursor
geometry is not ready.
2026-08-21 04:23:42 +10:00
Geoffrey McRae
82c59cecf2 [idd] helper: retry topology after desktop access failure
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
The interactive Helper can start when the console user token exists but
before WinSta0\Default is ready. SetDisplayConfig then returns
ERROR_ACCESS_DENIED while recovery exit caches the failure and keeps
topology enforcement suppressed.

Keep the recovery request pending while desktop access is transient.
Move the pipe worker to the input desktop and retry without caching
intermediate failures. Leave an exhausted access failure uncached so a
later replay can recover.

Restore the periodic enforcement timer and retry topology without
reapplying a display mode that Windows has already accepted.
2026-08-21 01:02:10 +10:00
Geoffrey McRae
e2ee9244ed [client] recovery: add force keybind
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
Add a configured escape key plus Shift+R command that requests display
recovery from the LGMP transport and switches video to SPICE.

Track the request on the main thread, report its asynchronous result,
and return its producer instance with the request serial for exact
correlation.

Preserve normal escape+R rotation behavior, including custom Shift
escape keys.
2026-08-20 16:53:10 +10:00
Geoffrey McRae
60a51fccdf [idd] recovery: unplug monitor without helper
When LGIddHelper is unavailable, recovery requests could remain
pending until timeout while the virtual monitor stayed connected.
This could leave a logged-out guest without a usable display.

Fall back to departing the IDD monitor for active recovery, then
re-arrive it before normal recovery completes. Serialize monitor
lifecycle changes and preserve recovery ordering across Helper
reconnects, timeouts, and stale responses.
2026-08-20 16:12:24 +10:00
Geoffrey McRae
7b059ad67e [woodpecker] idd: there is no need to build the Debug release here
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
2026-08-17 13:24:07 +10:00
Geoffrey McRae
571a58b716 [idd] helper: preserve mode apply transaction 2026-08-17 13:22:52 +10:00
Quantum
cec1a16cfc [idd] helper: use registry boolean helper instead of duplication
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
2026-08-17 05:58:36 +10:00
Geoffrey McRae
2005ea5d69 [idd] capture: add forced indirect copy
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
2026-08-17 05:12:05 +10:00
Geoffrey McRae
96c3056cc9 [idd] capture: add direct full-copy workaround 2026-08-17 04:46:25 +10:00
Geoffrey McRae
4e15f3b68b [idd] transport: stream writes to WC mappings 2026-08-17 03:00:54 +10:00
Geoffrey McRae
4f695b93d6 [idd] helper: coalesce no-GPU notifications 2026-08-17 02:47:06 +10:00
Geoffrey McRae
66b9f18cb6 [idd] helper: scroll refresh rate input 2026-08-17 02:39:15 +10:00
Geoffrey McRae
c6bd370e3e [client] config: reject recursive resize options 2026-08-17 02:22:52 +10:00
Geoffrey McRae
94754051a8 [idd] helper: wait for display mode enumeration 2026-08-17 02:21:53 +10:00
Geoffrey McRae
9d074519b2 [idd] config: retain four-decimal refresh rates 2026-08-17 02:09:58 +10:00
Geoffrey McRae
c0de47b1e1 [idd] wcwrite: gate SIMD stores on SSE2 2026-08-17 02:08:29 +10:00
Geoffrey McRae
26cafbe3df [idd] lgmp: stream staged copies to WC memory 2026-08-17 01:27:38 +10:00
Geoffrey McRae
636e55db0d [client] egl: drop incomplete frames 2026-08-17 01:27:26 +10:00
Geoffrey McRae
86b83f3e23 [idd] lgmp: reject invalid frame layouts 2026-08-17 00:59:27 +10:00