Skip to content

Merge latest upstream moonlight-qt fixes - #11

Merged
BarMy49 merged 51 commits into
masterfrom
claude/project-thread-fkvk2k
Nov 28, 2026
Merged

BarMy49 merged 51 commits into
masterfrom
claude/project-thread-fkvk2k

Conversation

@BarMy49

@BarMy49 BarMy49 commented Nov 28, 2026

Copy link
Copy Markdown
Owner

Requested by Bartosz · project thread

Summary

Merges upstream moonlight-qt master (up to a85f933e) into Perigee. That's the 50 upstream commits made since Perigee's fork point (ac29686). There is no upstream release newer than 6.2.0, so this tracks upstream's development branch.

What comes in:

  • moonlight-common-c 0405384 → b618ef2: about 55 fixes covering races in video, input and timing, STUN and RTSP hardening, replay detection on control streams, and correct reinitialization when starting a second stream.
  • Renderer fixes for VAAPI (stops exporting YUV444 frames as separate planes), Vulkan/libplacebo, CUDA, D3D11VA and VideoToolbox, a DRM atomic commit that only modesets when needed (Only allow a modeset when a DRM atomic commit requires it moonlight-stream/moonlight-qt#2107), and V-Sync wait and dropped-frame counting fixes in the pacer.
  • Overlay callbacks are now synchronized with renderer teardown.
  • Gamepad, haptics and audio fixes. The audio renderer now restarts if SDL_QueueAudio() fails.
  • Pairing and identity fixes (AES key truncation, cached QSslSocket keys) and validation that a CLI PIN has 4 digits.
  • Startup warnings are skipped when config warnings are disabled, and the XWayland hardware decoding warning is removed.
  • Windows: prebuilt deps v22, the MSVC 14.52 redistributable, and /guard:signret on ARM64.

Conflict resolutions

  • build-appimage.yml / build-win-mac.yml: kept deleted as in Perigee. The relevant bumps went into Perigee's own workflows instead: Windows Qt 6.12.0 → 6.12.1 in release-windows.yml, and libplacebo → v7.387.0 in package-linux-appimage.yml and the Flatpak manifest.
  • libplacebo patch: upstream deleted libplacebo-disable-internally-synchronized-queues.patch because v7.387.0 makes internally synchronized queues opt-in, and plvk.cpp now enables them itself. The AppImage workflow no longer applies the patch. I didn't bump SDL, FFmpeg or dav1d in the AppImage/Flatpak, because those are pinned alongside their source notices.
  • NavigableToolButton.qml: kept Perigee's version. Its fixed 20px icon and custom background never bind the icon to the background width, so the upstream resize loop (macOS: main window hangs with runaway memory when dragged between displays with different scaling moonlight-stream/moonlight-qt#2092) doesn't affect it.
  • PcView.qml: kept Perigee's tile layout and added upstream's tooltip that shows the full host name when it's truncated.
  • OverlayManager: kept both Perigee's notification and command panel state and upstream's m_OverlayRendererLock. Upstream's notifyOverlayUpdated() takes the renderer lock and then Perigee's notification mutex. setOverlayState() and setCommandPanelVisible() called it while holding the notification mutex, which is the opposite order. That could deadlock once setOverlayRenderer() was waiting for the write lock. Both now release the mutex before notifying. setCommandPanelVisible() also reads m_Renderer under the renderer lock.

Testing

Built the debug app on Ubuntu 24.04 (Qt 6.4.2) with no compiler warnings, then ran the Linux checks:

  • apollo-capabilities, session-services, display-launch, identity-import, session-profiles, milestone6-options, shortcut-modifiers, translations, app-favorites and overlay-notifications all pass.
  • UIThemeTest::applicationThemeAndPopup and the two grid test_contextMenu cases fail. They also fail on master under Qt 6.4 and pass on Fedora CI.

I haven't tested streaming against a real host here.


Generated by Claude Code

cgutman and others added 30 commits October 29, 2026 00:55
This allows it to synchronize with the lifetime of the rendering context.
Many renderers do not properly synchronize these on their own, so let's do it for them.

HDR and window changes are infrequent enough not to really matter.
Vulkan Video supports these on all Nvidia GPUs.
…bo v7.387.0

This is now disabled by default in libplacebo and must be explicitly
enabled when the application knows that all other code sharing the
device has been enlightened about the new queue synchronization flags.

Since we know that Gamescope's WSI doesn't handle these new flags
correctly, we will disable internally synchronized queues when
that layer is present. See ValveSoftware/gamescope#2261
SDL3 -> 3.4.20
sdl2-compat -> bebc6eb0
libplacebo -> v7.387.0

Fixes moonlight-stream#2084
Fixes moonlight-stream#2079
Fixes moonlight-stream#2051
Fixes moonlight-stream#2031
Upstream libplacebo make internally synchronized queues opt-in.
…t-stream#2093)

NavigableToolButton bound its icon size to its background. Material's
ToolButton background is half the button height while the content is
square, but spans the full button width otherwise. When the window
straddles a 2x and a 1x display, the header row briefly lays out at a
smaller height, the content stops being square, and the icon width
becomes the button width. The button's implicit width is then icon +
padding, so every layout pass widens it by 12px without end and
reloads the SVG icon at each new size. The UI hangs and memory grows
until the process is killed.

Size the icon from the button's own height instead. That height comes
from Layout.preferredHeight, not from the icon, so there's no feedback
loop, and the icon stays 30x30 in the 60px toolbar as before.

Fixes moonlight-stream#2092
This is required to safely synchronize with the main loop.
Logging can happen from multiple threads at the same time.
cgutman and others added 21 commits November 15, 2026 00:34
These are not handled properly in the export (or import) paths.
…stream#2107)

amdgpu on DCN < 3.2 performs a full update for every commit that allows
a modeset, which halves the frame rate with V-Sync enabled at 120 Hz.

Fixes moonlight-stream#2106
FFmpeg -> 9.1
dav1d -> 1.5.5
SDL -> d3926e74bd
Some joystick backends can't hotplug without SDL_PumpEvents().

See moonlight-stream#2104.

This reverts commit d5b7ef0.
It doesn't properly handle hotplugging on all joystick backends,
so we want to use it only as long as we need to avoid crashing
during video subsystem shutdown.

Fixes moonlight-stream#2104
libva has supported DRI3 on XWayland for years now.
Build fixes:
- Re-enabled CFG and EHCont on OpenSSL (/OPT:REF fixes the ILT thunk issue)
- Fixed missing assembly optimizations on Windows ARM64 OpenSSL build
- Fixed missing /O2 flag for Windows OpenSSL builds
- Increased optimization level for Meson projects

Updates:
- SDL3 -> ae7dae5b630
- sdl2-compat -> 0cc83e9ad87
- discord-rpc rapidjson -> 297637bc0a0f00
- openssl -> 3.5.9 (downgraded to 3.5 LTS)
Brings in the 50 upstream commits since the fork point (ac29686), including
the moonlight-common-c update, renderer and pacer fixes, overlay callback
synchronization, gamepad and audio fixes, and Windows dependency updates.

Conflict resolutions:
- Keep Perigee's removal of upstream's build-appimage and build-win-mac
  workflows, and port their libplacebo and Windows Qt bumps into Perigee's
  own workflows instead.
- Keep Perigee's NavigableToolButton, whose fixed-size icon is already free
  of the upstream toolbar resize loop (moonlight-stream#2092).
- Keep Perigee's PC tile layout and add upstream's tooltip for truncated
  host names.
- Keep both Perigee's notification state and upstream's renderer lock in
  OverlayManager.

Because upstream's new renderer lock is taken before the notification mutex
in notifyOverlayUpdated(), setOverlayState() and setCommandPanelVisible() no
longer call it while holding the notification mutex. Taking the two locks in
opposite orders could deadlock once setOverlayRenderer() waited for the
write lock.

The AppImage and Flatpak builds move libplacebo to v7.387.0, which makes
internally synchronized queues opt-in, so the removed libplacebo patch is no
longer applied.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011f1yPGqpe2amt5jbXY2EYG
Copilot AI balanced review requested due to automatic review settings November 28, 2026 11:35
@BarMy49 BarMy49 self-assigned this Nov 28, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@BarMy49
BarMy49 merged commit 721cb9e into master Nov 28, 2026
11 checks passed
@BarMy49
BarMy49 deleted the claude/project-thread-fkvk2k branch November 28, 2026 12:10
@BarMy49 BarMy49 mentioned this pull request Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants