Commit Graph

4135 Commits

Author SHA1 Message Date
Geoffrey McRae
6631fde35f [client] clipboard: reduce remote file transfer latency
Mark the last non-empty FILE_DATA payload with BEGIN and END when the
producer knows it is terminal. Complete producer bookkeeping in the
following fileDataEnd call without consuming another LGMP grant. Keep
the standalone terminal record for empty and legacy unknown streams.

Drain up to 64 queued clipboard records per worker pass instead of
sleeping after every message. Poll at 1 ms while transfers, blocked
writes, held input, or pending output are active, and retain the 10 ms
interval while idle.

This removes a serialized grant round trip from every non-empty file
response and reduces scheduling delay while a large transfer is active.
Keep the 1 MiB payload size because the bottleneck was stop-and-wait
latency, not the chunk capacity.

Exercise a full 1 MiB response in a single BEGIN|END grant and retain
coverage for empty unknown-size responses.
2026-08-15 01:13:13 +10:00
Geoffrey McRae
f9ffce528a [idd] helper: run interactive process as desktop user
Explorer file copies were invisible to the Helper because the service
launched its child with a duplicate of the LocalSystem token and changed
only TokenSessionId. The child therefore remained a System-integrity
process. Windows filtered Explorer's file clipboard formats across that
integrity boundary. Basic text and bitmap formats continued to work.

Keep only the SCM service privileged. Obtain the active session user's
primary token with WTSQueryUserToken. For elevated accounts, prefer the
linked limited token. Validate its session and security properties.
Build the user environment and launch the interactive Helper on
WinSta0\Default. Gate Helper activation until the service has rechecked
the active session and registered the clipboard authority.

Use random lifetime, stop, and activation objects owned by the service.
Give the target logon SID synchronization access only. Recheck the
active console session and service state before activation. Make the
lifetime mutex terminate the Helper if the service exits unexpectedly.
Restart it when the active session, IDD host, or authority changes.

Replace the old process-handle mapping transfer with a device-bound
authority protocol on the LGIdd device interface. The service verifies
the exact driver host instance, duplicates only section map rights into
that process, and registers the session, mapping identifier, and handle.
Bind authority lifetime to its WDF file object, revoke it synchronously
on cleanup, and poll the driver host identity while the child is active.

Restrict the device stack to SYSTEM and isolate LGIdd in a unique UMDF
device group. Restrict the shared section to SYSTEM and the target logon
SID. Apply a medium mandatory label that prevents low-integrity readers
and writers. Map it with read/write rights instead of all access.

Give each clipboard mapping a second random authority identifier. Store
it only inside the logon-SID-protected mapping and send it in the
mandatory HELLO. LGIdd matches it against the service-injected mapping.
This authenticates the user Helper without the unsupported UMDF call to
GetNamedPipeClientSessionId. Have the Helper verify that its pipe server
is in session zero.

Extend the pipe endpoint with bounded authentication reads, cancellable
overlapped I/O, periodic authorization checks, and explicit disconnects.
Serialize authority changes with clipboard attach and detach. Prevent
stale cleanup from tearing down a replacement mapping. Disconnect the
user pipe immediately when its owning authority is revoked.

Run clipboard, OLE, display, configuration, and file access in the
user's interactive process. Retain its process token for worker-thread
file operations instead of querying and impersonating the desktop user
from a System process. Store Helper logs in LocalAppData and grant only
the registry rights needed by interactive configuration and UMDF.

Keep immediate, stage-specific Win32 and HRESULT diagnostics throughout
clipboard capture. Probe CF_HDROP while holding the Win32 clipboard and
enumerate the OLE object's advertised file formats. Validate returned
storage and fall back to Shell item paths when direct retrieval fails.
Validate clipboard sequence changes and defer retries during contention
without publishing incomplete clipboard state.

Complete the 1 MiB transfer work with full-sized Windows copy buffers.
Use full-sized FUSE reads and retain the named 64 KiB X11 chunk limit.
Validate the user-writable mapping with CClipboardRing before attaching.

The pipe, mapping, and authority protocols change together. LGIdd.dll,
the INF, and LGIddHelper.exe must be rebuilt and installed as one
matching set.
2026-08-15 00:42:24 +10:00
Geoffrey McRae
e40dc19c7e [idd] helper: capture file clipboard under lock 2026-08-14 21:26:47 +10:00
Geoffrey McRae
352c3c42b6 [common] clipboard: enlarge transfer buffers 2026-08-14 19:09:11 +10:00
Geoffrey McRae
42cec4774b [client] clipboard: expose shared headers 2026-08-14 19:09:11 +10:00
Geoffrey McRae
a841be3515 [client] lgmp: transport clipboard files 2026-08-14 19:09:11 +10:00
Geoffrey McRae
a91343be96 [client] clipboard: add seamless file backends 2026-08-14 19:09:11 +10:00
Geoffrey McRae
9679c94b91 [idd] helper: synchronize clipboard files 2026-08-14 19:09:11 +10:00
Geoffrey McRae
9ce121f97e [idd] helper: add clipboard file primitives 2026-08-14 18:13:22 +10:00
Geoffrey McRae
3525796a00 [idd] lgmp: route clipboard file operations 2026-08-14 16:09:08 +10:00
Geoffrey McRae
88fd0da19e [idd] clipboard: route file dataset records 2026-08-14 16:09:08 +10:00
Geoffrey McRae
dbf52cb405 [common] clipboard: define remote file datasets 2026-08-14 16:09:08 +10:00
Geoffrey McRae
71acbe71ad [idd] clipboard: accept restarted client generations
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-14 12:46:11 +10:00
Geoffrey McRae
20c63464a7 [client] clipboard: retain local Wayland offers 2026-08-14 12:36:43 +10:00
Geoffrey McRae
608e85fe5d [client] clipboard: preserve newer Wayland selections 2026-08-14 12:36:43 +10:00
Geoffrey McRae
dc2ab76c36 [client] clipboard: suppress Wayland self-copy feedback 2026-08-14 12:36:43 +10:00
Geoffrey McRae
c868082a7f [client/idd] fix copyright headers 2026-08-14 12:36:43 +10:00
Geoffrey McRae
be2f79a412 [client] clipboard: add direct LGMP synchronization 2026-08-14 10:22:37 +10:00
Geoffrey McRae
b786167f72 [idd] clipboard: add direct synchronization 2026-08-14 10:22:37 +10:00
Geoffrey McRae
a8d531b797 [client] clipboard: introduce streamed transfers 2026-08-14 10:09:10 +10:00
Geoffrey McRae
4602f20e62 [common] clipboard: define streamed clipboard ABIs 2026-08-14 10:06:34 +10:00
Geoffrey McRae
1e4f274553 [idd] helper: follow the active console session 2026-08-14 09:40:48 +10:00
Geoffrey McRae
df9a34d6d0 [lgmp] protocol: support a sixth queue 2026-08-14 09:40:38 +10:00
Geoffrey McRae
caf8515e9d [idd] logging: make periodic statistics opt-in 2026-08-14 03:14:36 +10:00
Geoffrey McRae
879b8429e7 [idd] capture: log committed frame graph 2026-08-14 02:30:31 +10:00
Geoffrey McRae
1dcab65ab9 [idd] capture: version frame graph changes 2026-08-14 02:30:31 +10:00
Geoffrey McRae
70bc66b3f1 [idd] capture: execute texture frame graphs 2026-08-14 02:30:31 +10:00
Geoffrey McRae
deb963774e [idd] transport: route immutable texture frames 2026-08-14 02:30:31 +10:00
Geoffrey McRae
ba7a037f23 [idd] d3d: add leased D3D11 texture interop 2026-08-14 02:30:31 +10:00
Geoffrey McRae
3dd5abb05e [idd] capture: define immutable texture products 2026-08-14 02:30:31 +10:00
Geoffrey McRae
a8eb49fb17 [idd] postprocess: separate calibrated frame branches 2026-08-14 02:30:31 +10:00
Geoffrey McRae
43d918b5f3 [idd] capture: build frame processing graph 2026-08-14 02:30:31 +10:00
Geoffrey McRae
081dcf8879 [idd] transport: isolate frame configuration 2026-08-14 02:30:30 +10:00
Geoffrey McRae
eb74a8ec9d [idd] transport: define texture frame profiles 2026-08-14 02:30:30 +10:00
Geoffrey McRae
91c501d602 [idd] logging: suppress duplicate pipeline initialization 2026-08-14 02:30:30 +10:00
Geoffrey McRae
8c21f61e91 [idd] postprocess: centralize compute effect utilities 2026-08-13 21:48:37 +10:00
Geoffrey McRae
af309de438 [idd] common: centralize atomic operations 2026-08-13 21:44:31 +10:00
Geoffrey McRae
5d12ee4bce [idd] common: centralize nonzero sequences 2026-08-13 21:44:07 +10:00
Geoffrey McRae
cd6bcc3a41 [idd] transport: centralize source identity 2026-08-13 21:42:24 +10:00
Geoffrey McRae
84bda112ac [idd] postprocess: centralize color transform state 2026-08-13 21:41:45 +10:00
Geoffrey McRae
3d7df86a01 [idd] postprocess: centralize frame format utilities 2026-08-13 21:40:53 +10:00
Geoffrey McRae
34835dd1af [idd] lgmp: pointer motion data doesn't require 1MB buffers
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-13 16:01:29 +10:00
Geoffrey McRae
5b9d4923a7 [idd] transport: coordinate recovery requests
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-13 04:28:09 +10:00
Geoffrey McRae
fbc4640623 [idd] transport: arbitrate interaction requests 2026-08-13 04:28:09 +10:00
Geoffrey McRae
5b09d4f90a [idd] transport: intersect frame capabilities 2026-08-13 04:28:09 +10:00
Geoffrey McRae
c601468871 [idd] transport: configure active instances 2026-08-13 04:28:09 +10:00
Geoffrey McRae
4768396180 [client] transport: track video component availability 2026-08-13 04:28:09 +10:00
Geoffrey McRae
c92acb0a34 [idd] transport: isolate interactive services 2026-08-13 04:08:49 +10:00
Geoffrey McRae
51f432db00 [idd] transport: track asynchronous frame readiness 2026-08-13 04:08:49 +10:00
Geoffrey McRae
8792c3c446 [idd] transport: fan out frame publication 2026-08-13 04:08:49 +10:00