Mediatek Driver | 2023
It was a zombie driver. Alive, breathing, and eating battery. At 8:13 AM, Lena joined a video call with MediaTek’s driver team in Hsinchu. On the screen: a balding senior architect named Dr. Chen, who had authored the original sleep controller in 2019.
A long silence. Then Chen sighed. “The fix was in our internal branch. It did not make the 2023 release. Management cut the schedule.”
Every time the phone went to sleep, the driver voted for maximum DDR frequency . And because the vote was never cleared, the memory controller ran at full speed all night.
/* * MediaTek Unified Sleep Controller v3.2 (2023-01-15) * Legacy support for MT6879, MT6895, and MT6983. * Author: mtk_driver_team * WARNING: Do not modify without internal approval. */ Lena almost closed it. Legacy support was usually harmless. But a comment near line 1,204 made her stop scrolling: mediatek driver 2023
0001-mtk-sleepctl-fix-pm_qos-stale-vote.patch
The Midnight Kernel: A MediaTek Driver Story, 2023
“Your driver is melting batteries,” Lena replied. It was a zombie driver
“Then disable it in your device tree.”
For two weeks, the team blamed the battery vendor. For another week, they blamed the Android 14 beta. But Lena knew the truth: the kernel was lying to them.
/* original suspend logic continues... */ } On the screen: a balding senior architect named Dr
“If I disable it, the display won’t suspend at all. The phone will die in four hours.”
/* FIXME: PM_QoS voting mismatch if DVFS table > 4 cores. -SJL, 2022-12-01 */ The fix note was from December 2022—just weeks before the driver was finalized. And it was never resolved.
She compiled the kernel. Flashed it to a test device. Let it sit overnight.