The render thread freed the overlays as soon as it exited, while the
main thread could still be dispatching display server input callbacks
that iterate them. Free the overlays in lg_shutdown instead, once the
render thread has been joined and the display server has shut down.
The overlays now outlive the renderer, so overlayFreeImage must not
call into it; renderer deinitialization has already destroyed all
textures along with the context.
evdev_stop was never called, and calling it revealed unsafe teardown:
the device list was freed before the thread was joined, a zero epoll
descriptor was mistaken for a valid one, and the device loops walked
past the end of the array through a sentinel that does not exist.
Join the thread in evdev_stop and defer the rest to the new evdev_free.
The display server grab hooks route into evdev until its event thread
is joined, so the device state must stay valid until the display
server has been freed; evdev_free then restores the hooks and releases
the state.
setWindowSize is called from the render, frame and transport threads,
but shellResize issues shell requests and, with the libdecor GTK
plugin, renders the window decorations through pango, none of which is
thread safe. A frame thread exiting after such a call crashed in the
pango fontmap destructor during thread teardown.
Publish the requested size atomically and wake the event loop through
an eventfd registered in the epoll; the poll callback applies the size
on the event-loop thread. Concurrent requests coalesce into the most
recent one.
Report expected and current protocol versions through the transport
interface and expose session-independent recovery operations.
Offer recovery from the version mismatch popup, publish requests through
the reserved IVSHMEM channel, and select the validated SPICE fallback.
Register SPICE connection and component options in the SPICE transport.
Move generic input and clipboard settings out of the SPICE namespace,
while retaining migration aliases for existing configurations.
Keep PureSpice and usbredir build requirements private to the transport,
and remove obsolete SPICE configuration state from the client core.
Track primary and fallback video with source-specific generations, and
publish a source only after its first frame or software surface is
ready.
Route SPICE surfaces and cursors through the generic render queue. Keep
the current image across handoffs, and switch input only after the new
source has been presented.
Move fallback activation to its worker so display callbacks cannot
block or deadlock the render path.
Treat autoCapture as keyboard ownership while the pointer is inside the
guest viewport. Predict the next local position for both absolute and
relative motion, then release the keyboard before the pointer crosses
an edge.
Keep capture, focus, and deferred evdev transitions consistent while
retaining the latest local position as the prediction baseline.
X11's legacy guest-position synchronization warps the host cursor to
delayed guest updates. With absolute input this feeds old positions back
through cooked motion and pulls the cursor away from window edges.
Skip display-server guest synchronization when the active input is
absolute. Relative input and explicit uncapture alignment are unchanged.
Normal input now uses absolute positioning, so retaining the XI pointer
grab after capture leaves no later path to release it.
Always release the grab so leaving the window works again and the
uncapture path can align the host cursor to the guest position.
Replay held keys after focus enters the client window.
Track modifiers and lock LEDs for cooked and grabbed raw input.
Handle external XKB indicator changes while the window stays focused.
Make cooked mouse input independent of keyboard focus.
Preserve button state across pointer leave events.
Match Wayland event order, wheel steps, and raw motion delivery.
Rework audio provider and backend lifecycles so playback and capture
callbacks quiesce without blocking real-time threads. Move activation,
teardown, controls, retries, and diagnostics onto bounded workers.
Harden USB audio cadence, feedback, and capture recovery.
Preserve source clocks through recording and pace packets from the
device clock. Bound queues, waits, conversion buffers, and packet sizes.
Make PipeWire and PulseAudio stream control thread-safe and recoverable.
Correct latency clock domains, coalesce rate updates, preserve recent
capture under overload, and keep logging outside real-time callbacks.
Add a composite UAC2 microphone function with its own clock so
recording and playback can use independent sample rates.
Packetize asynchronous capture through usbredir, follow the host
capture clock, and preserve the newest frames across stalls.
Reconfigure active recording without another permission prompt and
fix lost PipeWire capture wakeups.
Treat a negative provider-controlled playback ring as a timeline
discontinuity rather than carrying its underrun debt.
Rebase to the normal low-water target and reset feedback correction so
guest stalls resume at low latency instead of discarding audio for
seconds.
Sample the playback ring graph at its original 40 Hz rate so its
1,200 entries continue to represent 30 seconds of history.
Keep packet processing and asynchronous USB feedback at full rate.
Advertise an asynchronous UAC2 OUT endpoint with explicit feedback so
Windows paces USB audio from the host playback clock.
Drive feedback from measured backend consumption plus the existing
buffer phase controller. Preserve the local and backend resampler paths
for providers without active feedback.
Keep audio diagnostics in the correct clock domains, report ring and
backend latency separately, and avoid hot-path feedback wakeups.
We can not support 32-bit because Windows is buggy:
The exact Windows 11 mmsys.cpl from build 26100.8737 populates Speaker
Setup testing against hard-coded speaker masks and for each calls
IKsFormatSupport::IsFormatSupported() using 24 hard-coded PCM formats.
These formats do not include 32-bit in 32-bit, consequently, every one
of the wizard’s format probes fails and it inserts zero channel-list
entries.
It does however test for 24-bit in 32-bit which passes, however this
exposes another breakage due to an inconsistency inside Windows
usbaudio2.sys
For bSubslotSize = 4, bBitResolution = 24, Windows does this:
1. It publishes a KS range whose minimum and maximum bit depths are both
taken from bBitResolution, so the range says 24-bit.
2. It correctly constructs the actual stream format as:
wBitsPerSample = 32, wValidBitsPerSample = 24
3. KS range intersection rejects that 24-in-32 format because its
container is 32 bits while the published range says 24.
4. A packed 24-bit candidate passes range intersection, but the
subsequent exact stream check rejects it because it uses a three-byte
container while USB advertises four bytes.
Therefore no format can pass both checks. That exactly explains:
* USB Device Tree Viewer seeing 24-bit device ranges.
* The MMDevice endpoint exposing no usable formats.
* Windows being unable to start playback.
I verified this in the exact Windows 10.0.26100.8737 driver:
* KSPin::AddDataRange stores bBitResolution into both KS bit-depth
bounds.
* MiniportWave::DataRangeIntersection tests those bounds.
* WaveFormatInfo::IsMatchingStreamFormat separately compares both the
container width and valid-bit count.
Add an opt-in USB audio fallback and connect the emulator to an
available PureSpice USBREDIR channel.
Keep transport-provided audio in priority and serialize USB parser
processing and teardown on the PureSpice thread.
Add a fixed-format USB Audio Class 2 playback device for the
client-side USB redirection bridge.
Advertise stereo 48 kHz IEEE float audio and handle enumeration,
configuration, alternate settings, clock requests, and isochronous data.
Add a serialized bridge between PureSpice USB redirection channels and
libusbredirparser.
Claim one channel and stream borrowed fragments directly through the
parser without packet allocations. Provide an atomic device plug request
for later audio integration.
Route clipboard exchange through a provider interface. Connected
transports take priority while SPICE remains the fallback.
Track asynchronous X11 and Wayland transfers by request, preserving
clipboard ownership across provider changes.
Use PureSpice clipboard status notifications for capability and
lifecycle updates.
Route audio through a provider interface. Connected transports take
priority while SPICE remains the fallback.
Carry explicit sample formats, rates, channel layouts, and source clocks
through playback and recording. Add optional presentation clock feedback
for active synchronization.
Initialize the previous ImGui frame timestamp before rendering
overlays. Without this, the first DeltaTime equals host uptime.
Recent ImGui versions track background and foreground draw-list
activity using float time. At long host uptimes its precision can span
multiple display frames, preventing those lists from being reset and
submitting translucent overlay commands more than once.