Post

Replies

Boosts

Views

Activity

Reply to M5 Pro external 5K 165Hz display: Window animations and scrolling UI appear to render at ~60Hz/jitter while cursor remains perfectly smooth
Feedback report draft Suggested title: M5 Pro drops about 40% of frames on an external 5K 165 Hz display during window drags; WindowServer main thread is blocked in IOMFB swap_submit / DCPLink::rpc. M4 Max on the same display and macOS build delivers every frame. Area: Displays / WindowServer (performance) Type: Performance, UI stutter Summary On a MacBook Pro with M5 Pro, moving a window (or switching Spaces) on an external high-refresh display visibly judders. The display controller's own counters show that during a steady window drag only about 101 new frames per second are delivered for 165 refreshes. A Mac with M4 Max, on the same display, same cable type, same macOS build and the same mouse, delivers 164 to 166 of 165. The CPU and GPU are mostly idle while this happens. A spindump taken during a drag shows the WindowServer main thread blocked for about 45% of wall time inside CA::IOMobileFramebuffer::swap_end / kern_SwapBegin, waiting in DCPLink::rpc, and contending on a lock with the hardware cursor thread, which spends 78% of its time in the same calls. Configuration AffectedComparisonMachineMacBook Pro (Mac17,8), Apple M5 Pro, 18 cores (6 super + 12 performance), 48 GBMac with Apple M4 Max, 64 GBmacOS27.2.1 (26B131)27.2.1 (26B131)Energy mode on power adapterHigh PowerHigh PowerBuilt-in displayOff (lid closed)Off (lid closed)Display: 27GX-Ultra, 5120 x 2880 at 165 Hz, "looks like 2560 x 1440" (HiDPI), SDR, fixed refresh rate, USB-C (DisplayPort). Both Macs drive it through two display pipes (DCPEXT1 + DCPEXT2 on the M5 Pro, DCPEXT2 + DCPEXT3 on the M4 Max). Input: USB mouse at 1000 Hz (same mouse on both Macs). The built-in trackpad shows the same judder, less strongly. The judder is also visible on a Samsung Odyssey G60SD (2560 x 1440 at 360 Hz, HDMI). I have frame counters only for the 5K display. Steps to reproduce Connect the 5K display over USB-C, set 165 Hz, close the lid, hide all apps except Finder. Drag a Finder window in circles for about 20 seconds. Watch the motion, or count frames with the attached dragprobe4 (it reads the IOReport groups DCPEXTn / swap and DCPEXTn / scanout once per second). A hands-free variant: run the attached movewin, which moves its own window in circles from a display link with no mouse input. Expected Every refresh gets a new frame while the window is moving, as on the M4 Max. Actual All figures are new frames delivered to the panel per second (sum of swap / subframes(n)), against refreshes per second (sum of scanout / subframes(n)). Scenario on the 5K displayM5 ProM4 MaxMouse drag, 165 Hz101 of 165 (96 to 107)164 to 166 of 165Mouse drag, 120 Hz94 of 120not measuredMouse drag, 120 Hz, recorder in passive mode86 of 122 (79 to 93)not measuredWindow moved by script, no input, 165 Hz84 to 90 of 167[to add]Window moved by script while the mouse is wiggled85 of 167[to add]Mouse wiggled, nothing else moving1 to 2[to add]Load during the mouse drag at 165 Hz: M5 ProM4 MaxGPU active residency20%, all in the lowest state (338 MHz), about 0.2 W23%, all in the lowest state (338 MHz)Fastest CPU cluster46% active, about 3690 MHz average75 to 95% active, about 4450 MHzSecond CPU cluster40% active, about 1500 MHz70 to 88% active, about 2500 MHzleftMouseDragged events delivered per secondabout 440about 760WindowServer CPUabout 36% of one corenot measuredForcing the clocks up on the M5 Pro recovers only part of the gap: Condition during a mouse drag, 165 HzNew frames per secondNothing102One spinning user-interactive thread (super cluster at 4608 MHz)126Background Metal compute load (GPU at about 1590 MHz)123Both128Trace findings Spindump, 8 s, 801 samples at 10 ms, taken during a mouse drag at 165 Hz (116 to 124 frames per second were delivered while it ran). Sample counts out of 801: WindowServer ws_main_thread (2.41 s CPU, 3.62 GHz average): 464 in CGXUpdateDisplay 361 in CA::WindowServer::IOMFBServer::finish_skylight_update 245 in CA::IOMobileFramebuffer::swap_end -> kern_SwapEnd -> IOMobileFramebufferShim::swap_submit 173 asleep in IOMobileFramebufferAP::swap_submit_dcp -> DCPLink::rpc -> rpc_caller_gated -> IOWorkLoop::sleepGate 53 in IORecursiveLockLock, blocked by a turnstile waiting for thread 0xe4f (the cursor thread) 116 in kern_SwapBegin -> IOMobileFramebufferUserClient::s_swap_start 74 asleep in IOMobileFramebufferAP::swap_start_dcp -> DCPLink::rpc 42 in IORecursiveLockLock, blocked by the same cursor thread about 61 in compositing and Metal command buffer submission 291 idle in mach_msg WindowServer thread com.apple.coreanimation.cursor.external-0 (0.11 s CPU): 625 in CA::WindowServer::IOMFBServer::cursor_callback 334 in CA::IOMobileFramebuffer::swap_end -> swap_submit_dcp -> DCPLink::rpc (asleep) 291 in CA::WindowServer::IOMFBDisplay::set_cursor_surface -> kern_SwapBegin Kernel threads active in the window all ran at about 1.2 to 1.36 GHz average (cycles divided by CPU time): IOGPU Completion (0.25 s), AGXHardwareWorkLoop (0.19 s), four AppleDCPLinkServiceSoC threads, IOSurfaceRoot, AppleT8142USBXHCI. sched_update_powered_cores -> ApplePMGR::enableCPUCluster also appears. powermetrics over the same 8 s: P1-Cluster 63% active with 61% of the time at 1344 MHz (its lowest state); P0-Cluster down 89% of the time; S-Cluster 83% active at about 3680 MHz (this includes the profilers themselves). Ruled out Variable refresh rate, HDR, HDMI versus USB-C, built-in display on versus off: the shortfall is present with VRR off, SDR, USB-C and the lid closed. GPU capacity: 20% active at the lowest performance state. Geekbench Metal and OpenCL scores are normal for this chip. Memory pressure and thermal throttling: 90% memory free, no swap, no thermal warnings. Other apps: all hidden during the measurements. Recorder overhead: a passive mode that only reads the counters once per second gives the same result. Refresh rate: at 120 Hz the Mac still delivers only 86 to 94 frames per second. The cursor alone: a scripted window move with no mouse input is still at about half rate. Moving the cursor at the same time costs about 5 more frames per second. Notes The reading of the swap and scanout counters is my own: scanout tracks the refresh rate exactly, and swap falls to 0 to 2 per second when nothing on screen changes and matches the refresh rate on the M4 Max during a drag.
1w
Reply to M5 Pro external 5K 165Hz display: Window animations and scrolling UI appear to render at ~60Hz/jitter while cursor remains perfectly smooth
Feedback report draft Suggested title: M5 Pro drops about 40% of frames on an external 5K 165 Hz display during window drags; WindowServer main thread is blocked in IOMFB swap_submit / DCPLink::rpc. M4 Max on the same display and macOS build delivers every frame. Area: Displays / WindowServer (performance) Type: Performance, UI stutter Summary On a MacBook Pro with M5 Pro, moving a window (or switching Spaces) on an external high-refresh display visibly judders. The display controller's own counters show that during a steady window drag only about 101 new frames per second are delivered for 165 refreshes. A Mac with M4 Max, on the same display, same cable type, same macOS build and the same mouse, delivers 164 to 166 of 165. The CPU and GPU are mostly idle while this happens. A spindump taken during a drag shows the WindowServer main thread blocked for about 45% of wall time inside CA::IOMobileFramebuffer::swap_end / kern_SwapBegin, waiting in DCPLink::rpc, and contending on a lock with the hardware cursor thread, which spends 78% of its time in the same calls. Configuration AffectedComparisonMachineMacBook Pro (Mac17,8), Apple M5 Pro, 18 cores (6 super + 12 performance), 48 GBMac with Apple M4 Max, 64 GBmacOS27.2.1 (26B131)27.2.1 (26B131)Energy mode on power adapterHigh PowerHigh PowerBuilt-in displayOff (lid closed)Off (lid closed)Display: 27GX-Ultra, 5120 x 2880 at 165 Hz, "looks like 2560 x 1440" (HiDPI), SDR, fixed refresh rate, USB-C (DisplayPort). Both Macs drive it through two display pipes (DCPEXT1 + DCPEXT2 on the M5 Pro, DCPEXT2 + DCPEXT3 on the M4 Max). Input: USB mouse at 1000 Hz (same mouse on both Macs). The built-in trackpad shows the same judder, less strongly. The judder is also visible on a Samsung Odyssey G60SD (2560 x 1440 at 360 Hz, HDMI). I have frame counters only for the 5K display. Steps to reproduce Connect the 5K display over USB-C, set 165 Hz, close the lid, hide all apps except Finder. Drag a Finder window in circles for about 20 seconds. Watch the motion, or count frames with the attached dragprobe4 (it reads the IOReport groups DCPEXTn / swap and DCPEXTn / scanout once per second). A hands-free variant: run the attached movewin, which moves its own window in circles from a display link with no mouse input. Expected Every refresh gets a new frame while the window is moving, as on the M4 Max. Actual All figures are new frames delivered to the panel per second (sum of swap / subframes(n)), against refreshes per second (sum of scanout / subframes(n)). Scenario on the 5K displayM5 ProM4 MaxMouse drag, 165 Hz101 of 165 (96 to 107)164 to 166 of 165Mouse drag, 120 Hz94 of 120not measuredMouse drag, 120 Hz, recorder in passive mode86 of 122 (79 to 93)not measuredWindow moved by script, no input, 165 Hz84 to 90 of 167[to add]Window moved by script while the mouse is wiggled85 of 167[to add]Mouse wiggled, nothing else moving1 to 2[to add]Load during the mouse drag at 165 Hz: M5 ProM4 MaxGPU active residency20%, all in the lowest state (338 MHz), about 0.2 W23%, all in the lowest state (338 MHz)Fastest CPU cluster46% active, about 3690 MHz average75 to 95% active, about 4450 MHzSecond CPU cluster40% active, about 1500 MHz70 to 88% active, about 2500 MHzleftMouseDragged events delivered per secondabout 440about 760WindowServer CPUabout 36% of one corenot measuredForcing the clocks up on the M5 Pro recovers only part of the gap: Condition during a mouse drag, 165 HzNew frames per secondNothing102One spinning user-interactive thread (super cluster at 4608 MHz)126Background Metal compute load (GPU at about 1590 MHz)123Both128Trace findings Spindump, 8 s, 801 samples at 10 ms, taken during a mouse drag at 165 Hz (116 to 124 frames per second were delivered while it ran). Sample counts out of 801: WindowServer ws_main_thread (2.41 s CPU, 3.62 GHz average): 464 in CGXUpdateDisplay 361 in CA::WindowServer::IOMFBServer::finish_skylight_update 245 in CA::IOMobileFramebuffer::swap_end -> kern_SwapEnd -> IOMobileFramebufferShim::swap_submit 173 asleep in IOMobileFramebufferAP::swap_submit_dcp -> DCPLink::rpc -> rpc_caller_gated -> IOWorkLoop::sleepGate 53 in IORecursiveLockLock, blocked by a turnstile waiting for thread 0xe4f (the cursor thread) 116 in kern_SwapBegin -> IOMobileFramebufferUserClient::s_swap_start 74 asleep in IOMobileFramebufferAP::swap_start_dcp -> DCPLink::rpc 42 in IORecursiveLockLock, blocked by the same cursor thread about 61 in compositing and Metal command buffer submission 291 idle in mach_msg WindowServer thread com.apple.coreanimation.cursor.external-0 (0.11 s CPU): 625 in CA::WindowServer::IOMFBServer::cursor_callback 334 in CA::IOMobileFramebuffer::swap_end -> swap_submit_dcp -> DCPLink::rpc (asleep) 291 in CA::WindowServer::IOMFBDisplay::set_cursor_surface -> kern_SwapBegin Kernel threads active in the window all ran at about 1.2 to 1.36 GHz average (cycles divided by CPU time): IOGPU Completion (0.25 s), AGXHardwareWorkLoop (0.19 s), four AppleDCPLinkServiceSoC threads, IOSurfaceRoot, AppleT8142USBXHCI. sched_update_powered_cores -> ApplePMGR::enableCPUCluster also appears. powermetrics over the same 8 s: P1-Cluster 63% active with 61% of the time at 1344 MHz (its lowest state); P0-Cluster down 89% of the time; S-Cluster 83% active at about 3680 MHz (this includes the profilers themselves). Ruled out Variable refresh rate, HDR, HDMI versus USB-C, built-in display on versus off: the shortfall is present with VRR off, SDR, USB-C and the lid closed. GPU capacity: 20% active at the lowest performance state. Geekbench Metal and OpenCL scores are normal for this chip. Memory pressure and thermal throttling: 90% memory free, no swap, no thermal warnings. Other apps: all hidden during the measurements. Recorder overhead: a passive mode that only reads the counters once per second gives the same result. Refresh rate: at 120 Hz the Mac still delivers only 86 to 94 frames per second. The cursor alone: a scripted window move with no mouse input is still at about half rate. Moving the cursor at the same time costs about 5 more frames per second. Notes The reading of the swap and scanout counters is my own: scanout tracks the refresh rate exactly, and swap falls to 0 to 2 per second when nothing on screen changes and matches the refresh rate on the M4 Max during a drag.
Replies
Boosts
Views
Activity
1w