GRAPHICS MUX(9)
π Graphics mux π
okay bestie, welcome to Graphics mux(9) from the Kernel API Manual β this is the whole gmux lore, and it's honestly iconic. π
On pre-retinas, the LVDS outputs of both GPUs feed into gmux, and gmux muxes either of them to the panel. One of the tricks gmux has up its sleeve is literally lengthening the blanking interval of its output during a switch to synchronize it with the GPU switched to. That's what gives you a flicker-free switch that's imperceptible by the user (US 8,687,007 B2). β¨
On retinas, muxing is no longer done by gmux itself β it's done by a separate chip that gmux controls. That chip is triple sourced: it's either an NXP CBTL06142, a TI HD3SS212, or a Pericom PI3VDP12412. The panel is driven with eDP instead of LVDS because the pixel clock required for retina resolution exceeds LVDS' limits. π
Pre-retinas can switch the panel's DDC pins separately. That's handled by a TI SN74LV4066A controlled by gmux, so the inactive GPU can probe the panel's EDID without switching over the entire panel. Retinas lack this functionality because the chips used for eDP muxing are incapable of switching the AUX channel separately (check the linked data sheets β Pericom would be capable, but this is unused). However, the retina panel has the NO_AUX_HANDSHAKE_LINK_TRAINING bit set in its DPCD, which allows the inactive GPU to skip the AUX handshake and set up the output with link parameters pre-calibrated by the active GPU. π₯
The external DP port is only fully switchable on the first two unibody MacBook Pro generations, MBP5 2008/09 and MBP6 2010. That's done by an NXP CBTL06141 controlled by gmux. It's the predecessor of the eDP mux on retinas, with the difference being support for 2.7 versus 5.4 Gbit/s. β
The following MacBook Pro generations replaced the external DP port with a combined DP/Thunderbolt port and lost the ability to switch it between GPUs, connecting it either to the discrete GPU or the Thunderbolt controller. Oddly enough, while the full port is no longer switchable, AUX and HPD are still switchable by way of an NXP CBTL03062 (on pre-retinas MBP8 2011 and MBP9 2012) or two TI TS3DS10224 (on pre-t2 retinas) under the control of gmux. Since the integrated GPU is missing the main link, external displays appear to it as phantoms which fail to link-train. π
gmux receives the HPD signal of all display connectors and sends an interrupt on hotplug. On generations which cannot switch external ports, the discrete GPU can then be woken to drive the newly connected display. The ability to switch AUX on these generations could be used to improve reliability of hotplug detection by having the integrated GPU poll the ports while the discrete GPU is asleep, but currently we do not make use of this feature. π¦
Our switching policy for the external port is that on those generations which are able to switch it fully, the port is switched together with the panel when IGD / DIS commands are issued to vga_switcheroo. It is thus possible to drive e.g. a beamer on battery power with the integrated GPU. The user may manually switch to the discrete GPU if more performance is needed. π
On all newer generations, the external port can only be driven by the discrete GPU. If a display is plugged in while the panel is switched to the integrated GPU, both GPUs will be in use for maximum performance. To decrease power consumption, the user may manually switch to the discrete GPU, thereby suspending the integrated GPU. π
gmux' initial switch state on bootup is user configurable via the EFI variable gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9 (5th byte, 1 = IGD, 0 = DIS). Based on this setting, the EFI firmware tells gmux to switch the panel and the external DP connector and allocates a framebuffer for the selected GPU. π§
πΈ the linked data sheets / refs πΈ
US 8,687,007 B2:https://pimg-fpiw.uspto.gov/fdd/07/870/086/0.pdfNXP CBTL06141:https://www.nxp.com/documents/data_sheet/CBTL06141.pdfNXP CBTL06142:https://www.nxp.com/documents/data_sheet/CBTL06141.pdfTI HD3SS212:https://www.ti.com/lit/ds/symlink/hd3ss212.pdfPericom PI3VDP12412:https://www.pericom.com/assets/Datasheets/PI3VDP12412.pdfTI SN74LV4066A:https://www.ti.com/lit/ds/symlink/sn74lv4066a.pdfNXP CBTL03062:http://pdf.datasheetarchive.com/indexerfiles/Datasheets-SW16/DSASW00308511.pdfTI TS3DS10224:https://www.ti.com/lit/ds/symlink/ts3ds10224.pdf
π SEE ALSO π
Kernel file ./drivers/platform/x86/apple-gmux.c β plus Overview(9), Backlight control(9), Power control(9), Interrupt(9), and Debugfs Interface(9). Bestie, go read those next. π
okay that's the whole page, bestie! this one lives in ./drivers/platform/x86, is dated October 2026, and it's literally Graphics mux(9). slay and goodbye πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms