Skip to content

Implementation notes

okwang edited this page May 12, 2026 · 1 revision

Implementation notes

Goal

This fork makes Moonlight on macOS default to the Metal renderer for normal Finder, Launchpad, Spotlight, and Homebrew launches.

The practical goal is to avoid the slower-feeling AVSampleBufferDisplayLayer presentation path observed on an iMac18,3 Radeon Pro 580 client when streaming real 5120x2880 content.

Source-level default

app/Info.plist in master includes:

<key>LSEnvironment</key>
<dict>
  <key>VT_FORCE_METAL</key>
  <string>1</string>
</dict>

This makes GUI launches inherit:

VT_FORCE_METAL=1

Moonlight already supports this environment variable in:

app/streaming/video/ffmpeg-renderers/vt_metal.mm

Homebrew casks

This repository now also acts as a Homebrew tap.

Online cask

Casks/moonlight-metal.rb

Install command:

brew tap latel/moonlight-qt https://github.com/latel/moonlight-qt.git
brew install --cask latel/moonlight-qt/moonlight-metal

The online cask downloads the official Moonlight 6.1.0 macOS universal DMG:

https://github.com/moonlight-stream/moonlight-qt/releases/download/v6.1.0/Moonlight-6.1.0.dmg

DMG SHA-256:

d494740eead8ad4e620cdc8feedb56083bc29cabbbeef34cb82585fd87725fa2

After installation, the cask:

  • Writes LSEnvironment:VT_FORCE_METAL = 1 into /Applications/Moonlight.app/Contents/Info.plist.
  • Removes com.apple.quarantine.
  • Re-signs /Applications/Moonlight.app ad-hoc with codesign -s - --force --deep.

Offline/local cask

Casks/moonlight-metal-local.rb

Install command for a no-external-network iMac:

brew tap latel/moonlight-qt /tmp/moonlight-qt
brew install --cask latel/moonlight-qt/moonlight-metal-local

The local cask expects:

/tmp/moonlight-metal-offline/Moonlight-Metal-imac18_3.zip

Local ZIP SHA-256:

2afd18a364fc2c2da4d62d410e34a73a800fe2e4746b4052ee7daf24c80d8581

Validation performed

Validated on an iMac18,3 client:

  • The installed Moonlight binary is universal and includes x86_64 and arm64.
  • VT_FORCE_METAL reads back as 1 from Info.plist.
  • codesign --verify --deep --strict --verbose=2 /Applications/Moonlight.app succeeds.
  • The app launches with open /Applications/Moonlight.app.

Clone this wiki locally