BSD Kernel Interfaces Manual
asmc — device driver for the Apple System Management Console (SMC)
To compile this driver into the kernel, place the following line in your kernel configuration file:
Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5):
The asmc driver controls the Apple System Management Console (SMC for short) found on Intel Apple sys-
The SMC is known to be found on the following systems:
• MacBook Pro
• Mac Pro
• MacBook Air
With this driver, you can configure your keyboard backlight brightness, check temperatures of several sen-
sors, check the speed of the internal fans and check the status of the Sudden Motion Sensor.
Variables related to the SMC control and inspection are exported via sysctl(3) under the device tree
On MacBook Pro systems, you can control the keyboard brightness by writing a value to the
dev.asmc.%d.light.control sysctl MIB.
The following sysctl MIBs contains the raw value returned by the left and right light sensors:
dev.asmc.%d.light.left or dev.asmc.%d.light.right.
The number of temperature sensors and their description varies among systems. You can inspect the temper-
ature sensors on your system by traversing the dev.asmc.temp sysctl MIB.
All values are in degrees celsius.
The dev.asmc.fan.%d sysctl tree contains the leaf nodes speed, safespeed, minspeed, maxspeed and
targetspeed. Each of these leaf nodes represent the current fan speed, the safest minimum fan speed, the
mininum speed and the maximum speed respectively.
All values are in RPM.
SUDDEN MOTION SENSOR
The Sudden Motion Sensor (SMS for short) is a device that detects laptop movement and notifies the operat-
ing system via an interrupt. The sysctl MIBs present under dev.asmc.sms all relate to the SMS.
The most interesting usage of this device is to park the disk heads when the laptop is moved h