Skip to content

Apple Driver SMC

Abdelkader Boudih edited this page Aug 24, 2026 · 3 revisions

SMC: Fans, Sensors, Keyboard Backlight

Upstream status: yes. asmc(4) is a long-time FreeBSD driver, and it was substantially modernized in main during 2026-04 to 2026-08: the hardcoded model table was replaced with universal key probing (e7f4269dbfad, 2026-04), sensor detection and sysctl registration were refactored (104b311a03e4), system state and board identity sysctls were added (6a1bd5212f29), and MMIO backend selection was fixed for T2 machines (bb1e071be47f, 37826269b41b).

The SMC (System Management Controller) is Apple's housekeeping controller: fan control, temperature sensors, ambient light, keyboard backlight, sudden motion sensor, power state.

Two hardware backends

flowchart LR
    A["asmc(4)"] --> B{Backend probe}
    B -->|"Pre-T2 Macs"| PIO["Port I/O at 0x300<br/>classic SMC"]
    B -->|"T2 Macs"| MMIO["MMIO window<br/>SMC proxied by T2"]
    PIO --> K["SMC key namespace<br/>TC0P, F0Ac, LKSB, ..."]
    MMIO --> K

    style PIO fill:#1a7a3a,color:#fff
    style MMIO fill:#1a7a3a,color:#fff
Loading

Both backends speak the same four-character key namespace. The 2026 rework means new models mostly work without adding a static table entry: the driver enumerates the keys the firmware actually exposes.

What you get

Function sysctl area Notes
Fan speeds, min/max, targets dev.asmc.0.fan.* writable targets on most models
Temperatures dev.asmc.0.temp.* dozens of sensors on desktops
Keyboard backlight dev.asmc.0.light.* laptops with backlit keyboards
Ambient light sensor dev.asmc.0.light.* laptop and iMac models
Board identity / system state dev.asmc.0.system.* added 2026: board_id (RPlt), chip_gen (RGEN), shutdown/sleep cause, power state

Known quirks

  • flint (Mac mini 7,1): RGEN key read fails with error 5, harmless but logged. Track whether the key-probing rework silenced it.
  • Sudden motion sensor keys exist only on machines that shipped spinning disks, absent on SSD-only models.

Good FreeBSD wiki material: this is one subsystem where FreeBSD support for Apple hardware is genuinely first class.

Back to Apple Hardware.

Clone this wiki locally