Skip to content

lichengzhe/xdr-light

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XDR Light

480 KB macOS menu bar app — unlock the full brightness ceiling of your MacBook Pro Liquid Retina XDR display.

Release License Platform Downloads Stars

English · 简体中文


Gamma >1.0 in EDR headroom — same technique as BetterDisplay ($18), in ~800 lines of Swift.

Contents

Requirements

  • macOS 14 (Sonoma) or later
  • MacBook Pro with a Liquid Retina XDR display (M1 Pro/Max or later)

Install

Homebrew (recommended)

brew tap lichengzhe/tap
brew install --cask xdr-light

Download DMG

Grab the latest from Releases, open the DMG, drag to Applications.

"App is damaged" on first launch? That's macOS Gatekeeper blocking ad-hoc signing. Open System Settings → Privacy & Security, scroll down and click Open Anyway. Or from the terminal: xattr -cr "/Applications/XDR Light.app".

From source

Requires Xcode Command Line Tools:

swiftc -O -o "XDR Light.app/Contents/MacOS/xdr-light" main.swift \
  -framework Cocoa -framework Metal -framework QuartzCore \
  -framework ServiceManagement -framework IOKit

cp -r "XDR Light.app" /Applications/

Usage

GUI (menu bar app)

Launch the app — XDR brightness activates automatically. A sun icon appears in the menu bar.

Action How
Adjust boost factor Settings → drag slider (1.0x – 1.6x)
Toggle XDR Menu → Enable / Disable XDR
Hide menu bar icon Settings → toggle off
Launch at login Settings → toggle on
Quit Menu → Quit (gamma auto-restored)

Boost factor is persisted across restarts.

CLI

The same binary runs headless when given arguments:

# Alias the binary inside the .app bundle
alias xdr-light='/Applications/XDR\ Light.app/Contents/MacOS/xdr-light'

xdr-light --on           # enable at 1.2x (~600 nit)
xdr-light --on 1.4       # enable at 1.4x (~700 nit)
xdr-light --off          # restore gamma to default
xdr-light --status       # show current state
xdr-light --help         # show help

--on blocks until you press Ctrl+C, at which point gamma is restored. Ideal for scripting, keyboard shortcut apps, or window-manager integrations.

Multi-display

Only the built-in MacBook Pro XDR panel is touched. External displays — including Studio Display and other monitors that report a small EDR headroom but aren't actually HDR — are left alone. Pro Display XDR is excluded by the same rule; if you use one and want it boosted, file an issue.

How It Works

Two-Part Architecture

Step What How
1. EDR Trigger Unlock XDR headroom so gamma can exceed 1.0 1×1 px CAMetalLayer (.rgba16Float) with wantsExtendedDynamicRangeContent = true, clearColor = 8.0. Keepalive render every 5s.
2. Gamma Table Boost SDR content into the XDR luminance range CGSetDisplayTransferByTable — multiply R/G/B by factor. Values >1.0 map directly into the XDR range (zero clipping). A 5s watchdog re-applies if the system silently resets.

EDR trigger is activated before the gamma table — headroom must be allocated first, otherwise the display pipeline silently clamps any value >1.0 back to 1.0.

Activation is instant. The app polls NSScreen.maximumExtendedDynamicRangeColorComponentValue at frame rate and writes the gamma table the moment headroom rises above 1.0 — typically 1–3 frames (16–50 ms).

XDR Light does not touch hardware backlight or ambient light compensation. Your F1/F2 keys and the system brightness slider keep working exactly as before. The peak nit reached by a given gamma factor scales linearly with your current SDR slider position (see table below).

Display Specs by Generation

Model Chip SDR HDR (sustained) XDR (peak)
MBP 2021 M1 Pro/Max 500 nit 1000 nit 1600 nit
MBP 2023 M2 Pro/Max 500 nit 1000 nit 1600 nit
MBP 2023 Nov M3 Pro/Max 600 nit 1000 nit 1600 nit
MBP 2024 M4 Pro/Max 1000 nit 1000 nit 1600 nit
MBP 2026 M5 Pro/Max 1000 nit 1000 nit 1600 nit

14" and 16" share identical brightness specs. Pro and Max variants are identical.

What XDR Light Adds

Peak nit at each gamma factor, assuming the system brightness slider is at its maximum SDR level:

Factor M1/M2 (SDR 500) M3 (SDR 600) M4/M5 (SDR 1000)
1.0x 500 nit 600 nit 1000 nit
1.2x 600 nit 720 nit 1200 nit
1.4x 700 nit 840 nit 1400 nit
1.6x 800 nit 960 nit 1600 nit

Actual peak = current_slider_nit × factor. Drop the slider to half and peaks halve too — XDR Light multiplies on top of whatever SDR baseline you've set. All gamma values map into EDR headroom, so there's zero highlight clipping at any level.

Side Effects

Activating XDR Light puts the display compositor into EDR mode. Independent of the boost factor, this introduces two measurable side effects:

Side effect Magnitude
GPU compositor overhead 16-bit float blending replaces 8-bit/channel on the display path — ~0.1–0.3 W extra
Tone mapping shift EDR mode uses a wider luminance curve; some users perceive SDR content as marginally less saturated

At 1.0x boost the gamma table is the identity transform — pixel values reach the LCD bit-perfect identical to the unboosted state. Mini-LED local backlight zones are only driven into XDR luminance when post-gamma values exceed the SDR ceiling, so backlight power is unchanged whenever the effective peak stays below the panel's SDR cap.

Practical guidance: set-and-forget is fine for general use. Disable XDR Light when doing color-critical work (video grading, photo retouching, design review) to keep the native SDR color pipeline.

Resilience

Event Source Response
Sleep / wake screensDidWakeNotification Reapply (0.5s debounce)
Display config change didChangeScreenParametersNotification Reapply
AC ↔ battery IOPSNotificationCreateRunLoopSource Reapply
Display reconfiguration CGDisplayRegisterReconfigurationCallback Reapply
Silent gamma reset 5s watchdog timer Re-apply gamma
Quit / crash applicationWillTerminate + signal handlers Restore gamma

Comparison

BetterDisplay ($18) Vivid ($20) BrightIntosh XDR Light
Technique Gamma + EDR + SkyLight Gamma + EDR Gamma + EDR Gamma >1.0 + EDR
Max boost 1.66x (~830 nit) ~1.45x (~725 nit) ~1.45x 1.6x (~800 nit)
Gamma >1.0 Yes Unknown No (clamped) Yes
Brightness slider Yes No Yes Yes
Nit display Yes No No Yes
Recovery Yes Yes Partial Yes (5 sources + watchdog)
Auto-update In-app No App Store GitHub Releases
Size ~50 MB ~50 MB ~15 MB 480 KB
Code Closed Closed ~2000 lines (GPL) ~800 lines (MIT)
Price $18 $20 IAP Free

Note: BetterDisplay's "Native XDR" mode (SLSDisplaySetPreset) was blocked by Apple in macOS 26.3. Its fallback "Software XDR" uses the same gamma + EDR technique as XDR Light. Both produce identical gamma table shapes at matching boost levels.

License

MIT


If this tool saves you $18, consider dropping a ⭐.

GitHub · Releases · Report Issue