MacBook Pro 16,1 (A2141) Sintonización Térmica & Rendimiento en Ubuntu 24.04 LTS

MacBook Pro 16,1 (A2141) High-Performance Thermal & Kernel Tuning on Ubuntu 24.04 LTS

Desbloqueo de Turbo Asimétrico (4.5 GHz) y Reparación de Estrangulamiento Térmico
Asymmetric Per-Core HWP Turbo (4.5 GHz) & Elimination of Chronic Thermal Throttling
Ubuntu 24.04 LTS (Noble) Linux Kernel T2 (v7.x) Apple T2 (A2141) Intel Core i7-9750H AMD Radeon Pro 5300M Per-Core HWP Asymmetric Tuning

Juan Monzón (@mylnzon58)

AI Product | Full Stack Developer | Hardware & Digital Products (Argentina)

AI Product | Full Stack Developer | Hardware & Systems Hacker (Argentina)

📖 La Historia: De la Vieja Escuela de Linux a Revivir el Último Intel Flagship

"Vengo de la vieja escuela de Linux: empecé hace años con Ubuntu 12.04, pasando por Debian y Linux Mint, y alternando con Windows. Con un esfuerzo gigantesco compré mi sueño en 2019: el MacBook Pro de 16 pulgadas (A2141) con el Core i7-9750H y AMD Radeon Pro. Sentía que macOS era un 'Linux refinado'.

Pero con el paso de los años vi con impotencia cómo la máquina se autodestruía por calor. Tras 5 años de uso real en producción (586 ciclos de batería, 77.3% de salud), volví a Linux en Ubuntu 24.04. Cambié la pasta térmica y me topé con la realidad del chip desnudo (bare-die): el Core 0 se disparaba a 100°C en 180 ms.

En macOS, Apple soluciona esto matando todo el procesador a 800 MHz (kernel_task). Pero en Linux, combinando auditoría de kernel y el uso estratégico de Inteligencia Artificial para acelerar el análisis y desarrollo, logramos programar un Turbo Asimétrico por Núcleo que aísla el núcleo caliente y deja los núcleos sanos volando a 4.50 GHz sin abrir la máquina.

Esto vuela, amigos. Siento que mi MacBook Pro volvió a nacer."
— Juan Monzón (@mylnzon58)

🔍 Diagnóstico de los 8 Problemas de Fábrica Detectados

  • 1. Asimetría Térmica Física en Core 0: El Core 0 tocaba 100°C con apenas 22W mientras el Core 4 quedaba en 78°C (21°C de diferencia en el mismo cristal de silicio), generando 35,292 eventos de PROCHOT en 77 minutos.
  • 2. Retraso del Chip Apple T2 (~900 ms): El chip T2 aplica un filtro acústico suave (TC0E). Cuando el SMC nota el pico a los 900 ms, el CPU ya se frenó 100 veces.
  • 3. Firmware RAPL Descalibrado: Apple reporta límites de 100W PL1 / 125W PL2 a un chasis físicamente preparado para disipar 82W combinados.
  • 4. VRAM de AMD Radeon Pro trabada en 95 MHz: La regla power_dpm_force_performance_level="low" congelaba la memoria GDDR6 al conectar monitores externos.
  • 5. Micro-bloqueos en el Kernel por Intel i915: Sondeo fantasma en puertos desconectados retenía hilos del CPU por más de 10 ms (output_poll_execute hogged CPU).
  • 6. Cuello de Botella en Disco y zswap apagado: La única cola del SSD del T2 saturaba el sistema al paginar en disco (17.3 millones de esperas I/O).
  • 7. Demonios Huérfanos: Procesos Java/Gradle consumiendo 1.43 GB de RAM y 15% de CPU continuo en reposo.
  • 8. Descarga de Batería Enchufado: En picos de 100W, cargadores genéricos de 90W colapsan y el SMC chupa corriente de la batería ciclando el litio.

⚡ La Solución: Turbo Asimétrico por Núcleo (Per-Core HWP)

En lugar de castigar a todos los núcleos limitándolos parejos a 3.6 GHz, configuramos quirúrgicamente el driver intel_pstate en el kernel:

  • Core 4 y Core 5 (Sanos): 100% libres a su tope máximo de fábrica de 4.50 GHz (balance_performance).
  • Core 1 y Core 2 (Intermedios): Potencia sostenida a 4.20 GHz (balance_performance).
  • Core 3 (Transición): Equilibrado a 3.70 GHz (balance_power).
  • Core 0 (Comprometido): Protegido a 3.40 GHz (balance_power), evitando el salto a 1.35V y eliminando el PROCHOT en todo el chip.
  • Potencia RAPL: 52W sostenidos (superior a los 45W TDP de fábrica) / 65W pico.
  • TCC Offset a 97°C: Modulación suave de frecuencia en microsegundos sin choque térmico.
  • GPU AMD en Auto + Perfil 3D Full Screen: Escalado instantáneo a 750 MHz de VRAM y 1250 MHz de GPU en múltiples pantallas.
  • Persistencia Post-Suspensión (system-sleep Hook): Al reanudar tras cerrar la tapa, re-aplica el tuning en microsegundos manteniendo 0 latencia de video y frecuencias estables.
  • ZSWAP con LZ4 activo en RAM: Cero saturación de disco SSD.

📊 Telemetría Comparativa: Antes vs. Después

Métrica Evaluada Estado Inicial (Stock) Con Sintonización Asimétrica
Consumo CPU en Reposo (PCPT) 18.88W – 26.05W 4.10W
Temperatura Núcleos en Reposo 74°C – 91°C 65°C – 67°C
Comportamiento en Ráfaga Pesada Core 0 clava 100°C en 180 ms Core 4/5 a 4.5 GHz; Core 0 clavado en 74°C
Eventos de Estrangulamiento (PROCHOT) 35,292 en 77 minutos 0 eventos (Estabilidad Absoluta)
Reloj de Memoria VRAM AMD Clavado en 95 MHz (low) Dinámico 95–750 MHz (Perfil 3D)
Memoria RAM Libre / Disponible 3.4 GiB disponible 6.7 GiB disponible (ZSWAP LZ4)
Bloqueos de Kernel i915 (>10 ms) 131+ cuelgues registrados 0 cuelgues (Paseo de cuadros fluido)

🚀 Instalación Rápida en 1 Paso

$ git clone https://github.com/mylnzon58/t2-macbook-pro-16-1-thermal-performance-fix-ubuntu.git
$ cd t2-macbook-pro-16-1-thermal-performance-fix-ubuntu
$ chmod +x install.sh
$ sudo ./install.sh

📖 The Story: From Early Linux to Reviving the Last Intel Flagship

"I come from the early days of Linux: starting years ago with Ubuntu 12.04, exploring Debian and Linux Mint, while alternating with Windows. After years of hard work and savings, I bought my dream machine: the 16-inch MacBook Pro (Late 2019, Model A2141) with the Core i7-9750H and AMD Radeon Pro. At first, macOS felt like 'refined Linux'.

But as the years went by, I watched the machine thermally self-destruct. Today, after more than 5 years of real production use (586 battery cycles, 77.3% health remaining), I returned to my roots on Ubuntu 24.04 LTS. When repasting the heatsink, I faced the bare-die reality: a microscopic lack of spring mounting pressure on the corner of Core 0 sent that single core straight into 100°C within 180 milliseconds.

In macOS, Apple's only answer is triggering kernel_task and throttling all 6 cores down to 800 MHz. But on Linux, by combining kernel tracing and utilizing Artificial Intelligence as an engineering power tool, we designed an unprecedented fix: Per-Core Asymmetric Turbo (HWP) that protects Core 0 without opening the laptop and unleashes the healthy cores up to 4.50 GHz.

This machine literally flies now, my friends. I feel my MacBook Pro has been reborn."
— Juan Monzón (@mylnzon58)

🔍 Breakdown of the 8 Hardware & Kernel Bottlenecks Detected

  • 1. Bare-Die Thermal Asymmetry on Core 0: Under 90°C+ thermal cycles, bare-die silicon suffers from the thermal paste pump-out effect. Core 0 hit 100°C with just 22W while Core 4 stayed at 78°C (21°C delta across a single die), accumulating 35,292 PROCHOT throttle events in 77 minutes.
  • 2. Apple T2 SMC Low-Pass Filter Latency (~900 ms): The T2 coprocessor applies an analog filter (TC0E) to cushion fan noise. By the time T2 detects elevated heat ~900 ms later, Core 0 has already throttled 100 times.
  • 3. Mismatched RAPL Limits (100W/125W vs 82W Heatsink): Firmware exposes PL1=100W and PL2=125W to a copper heatsink physically limited to 82W combined cooling.
  • 4. AMD Radeon Pro VRAM Clamped at 95 MHz: The default rule power_dpm_force_performance_level="low" locked GDDR6 memory to 95 MHz, crippling display pipeline throughput on external displays while still pulling 18W idle.
  • 5. Intel i915 Disconnected Connector Polling Stalls: The i915 driver polled unassigned display ports every few seconds, stalling kernel workqueues for >10 ms (output_poll_execute hogged CPU >10000us 131 times).
  • 6. NVMe Single-Queue Bottleneck & Dormant zswap: Paging to a disk /swapfile over the T2's single hardware NVMe queue produced 17.3 million I/O pressure stalls.
  • 7. Orphaned Background Processes: A lingering Gradle daemon (PID 8473, JDK 17) continuously consumed 1.43 GB RAM and 15% CPU at idle.
  • 8. Battery Sag on 90W Power Supplies: During combined load spikes, 90W third-party adapters could not supply 100W+, causing the SMC to draw up to -1.93 A from the battery while plugged in.

⚡ The Architecture: Per-Core Asymmetric HWP Turbo

Rather than applying a crude global frequency cap, we configure Linux intel_pstate Speed Shift per core:

  • Healthy Cores (Core 4 & Core 5): 100% unlocked to factory maximum of 4.50 GHz (balance_performance).
  • Mid-Die Cores (Core 1 & Core 2): High-efficiency multi-threading at 4.20 GHz (balance_performance).
  • Transition Core 3: Tuned at 3.70 GHz (balance_power).
  • Protected Core 0: Clamped at 3.40 GHz (balance_power), keeping it below 1.25V and completely preventing PROCHOT triggers.
  • Calibrated RAPL Limits: 52W sustained (exceeds Intel factory 45W TDP) / 65W burst.
  • Hardware TCC Offset at 97°C: Microsecond-level clock modulation before emergency hard cuts.
  • AMD GPU Dynamic Auto + 3D Full Screen Mode: Immediate clock scaling up to 750 MHz VRAM and 1250 MHz Core across dual displays.
  • Post-Resume Sleep Persistence Hook: Automatically re-applies tuning parameters on wake to eliminate workqueue stalls and keep frequencies stable across lid open/close cycles.
  • In-RAM Compressed Swap (ZSWAP + LZ4): Zero NVMe disk stalls.

📊 Telemetry Comparison Matrix: Before vs. After

Evaluated Metric Stock Factory State With Asymmetric Tuning
Idle CPU Power (PCPT) 18.88W – 26.05W 4.10W
Idle Core Temperatures 74°C – 91°C 65°C – 67°C
Heavy Burst Load Behavior Core 0 spikes to 100°C in 180 ms Core 4/5 boost to 4.5 GHz; Core 0 stays at 74°C
PROCHOT Throttle Events 35,292 per 77 minutes 0 events (Rock Solid Stability)
AMD GPU VRAM Clock Clamped at 95 MHz (low) Dynamic 95–750 MHz (Full 3D profile)
Available System RAM 3.4 GiB available 6.7 GiB available (ZSWAP LZ4)
Kernel Workqueue Stalls (>10 ms) 131+ stalls logged 0 stalls (Smooth Frame Pacing)

🚀 Quick 1-Step Installation

$ git clone https://github.com/mylnzon58/t2-macbook-pro-16-1-thermal-performance-fix-ubuntu.git
$ cd t2-macbook-pro-16-1-thermal-performance-fix-ubuntu
$ chmod +x install.sh
$ sudo ./install.sh