Refreshing: a workaround to fix kernel panics on macOS with refresh rates higher than 120Hz
5 Mar 2026 18:21 | macOS
Refreshing
A macOS menu bar app that prevents kernel panics (DCPEXT PANIC) on Apple Silicon Macs with external monitors running above 120Hz.
The Problem
macOS Sequoia (and versions of macOS since then) have a bug in the Display Coprocessor (DCP) firmware that causes kernel panics when Apple Silicon Macs wake from sleep or reconnect to external monitors running at refresh rates above 120Hz. This primarily affects 4K 240Hz QD-OLED panels (Samsung, ASUS ROG, MSI MPG, etc.) and manifests as DCPEXT2 PANIC - apt firmware: dual_pipe in crash logs.
The issue is a regression introduced in Sequoia - it does not occur on Sonoma.
How It Works
Refreshing allows you to run the monitor at refresh rates above 120Hz but ensures that whenever the monitor is reconnected or the machine wakes from sleep the default refresh rate on initialisation is kept at 120Hz. The app then upshifts back to 240Hz after the initial connection, avoiding the codepath that triggers the panic.
This does introduce a mild annoyance in that after connecting the monitor back to the mac it will show the screen for a couple of seconds and then go black again as it upshifts back to the higher refresh rate, but this is still way more preferable than a kernel panic.
It uses a two-layer strategy to achieve this:
Permanent 120Hz in the WindowServer plist
When the app sets the display to 120Hz, it uses CGCompleteDisplayConfiguration(.permanently), which writes the mode to macOS’s display preferences plist. This means WindowServer will request 120Hz when negotiating with the display on reconnection, avoiding the dangerous >120Hz DCP code path.
When upshifting to 240Hz for active use, it uses .forSession - a temporary change that is not written to the plist. If the display disconnects while at 240Hz, the plist still says 120Hz, so the next connection is safe.
Display reconfiguration callback
The app registers a CGDisplayRegisterReconfigurationCallback to react immediately when an external display is connected or disconnected:
- Display connected → immediately set 120Hz (permanently)
- Wait 3 seconds for the display link to stabilize
- Upshift to 240Hz (session-only) at the target resolution
Sleep/wake safety net
As a secondary defense, the app uses IORegisterForSystemPower to intercept sleep events with acknowledgement gating - the system cannot sleep until the refresh rate change completes. On sleep, it applies the pre-cached 120Hz mode permanently.
Requirements
- macOS 15 (Sequoia) or later
- Apple Silicon Mac
- External monitor with refresh rate above 120Hz
- Xcode Command Line Tools (
xcode-select --install)
