2 .\" Copyright (c) 2007, 2008 Rui Paulo <rpaulo@FreeBSD.org>
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16 .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 .\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
18 .\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19 .\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
20 .\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
22 .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
23 .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24 .\" POSSIBILITY OF SUCH DAMAGE.
33 .Nd device driver for the Apple System Management Console (SMC)
35 To compile this driver into the kernel, place the following line in your
36 kernel configuration file:
37 .Bd -ragged -offset indent
41 Alternatively, to load the driver as a
42 module at boot time, place the following line in
44 .Bd -literal -offset indent
50 driver controls the Apple System Management Console (SMC for short)
51 found on Intel Apple systems.
53 The SMC is known to be found on the following systems:
55 .Bl -bullet -offset indent -compact
57 MacBook (any generation)
59 MacBook Pro (any generation)
64 With this driver, you can configure your keyboard backlight
65 brightness, check temperatures of several sensors, check the speed of
66 the internal fans and check the status of the Sudden Motion Sensor.
68 Variables related to the SMC control and inspection are exported via
72 .Sh KEYBOARD BACKLIGHT
75 systems, you can control the keyboard brightness by writing values to
77 .Va dev.asmc.%d.light.left
79 .Va dev.asmc.%d.light.right
82 Each of these sysctl MIBs contains the raw value returned by the left
83 and right light sensors.
85 The number of temperature sensors and their description varies among
87 You can inspect the temperature sensors on your system by traversing
92 All values are in degrees celsius.
96 sysctl tree contains the leaf nodes
103 Each of these leaf nodes represent the current fan speed, the safest
104 minimum fan speed, the mininum speed and the maximum speed
107 All values are in RPM.
108 .Sh SUDDEN MOTION SENSOR
109 The Sudden Motion Sensor (SMS for short) is a device that detects
110 laptop movement and notifies the operating system via an interrupt.
111 The sysctl MIBs present under
113 all relate to the SMS.
115 The most interesting usage of this device is to park the disk heads
116 when the laptop is moved harshly.
117 First, you need to install
118 .Xr ataidle 8 Pq Pa ports/sysutils/ataidle
122 .Bd -literal -offset indent
124 match "system" "ACPI";
125 match "subsystem" "asmc";
126 action "/usr/local/sbin/ataidle -s X Y";
130 Do not forget to change the
134 values in the command above.
136 Also, please note that parking the disk heads too many times can
137 dramatically reduce your hard drive's life span.
138 Do not rely solely on
139 the SMS to protect your hard drive: good care and common sense can
140 increase your hard drive's life.
142 .Xr ataidle 8 Pq Pa ports/sysutils/ataidle ,
148 driver first appeared in
152 .An Rui Paulo Aq rpaulo@FreeBSD.org
153 (Google Summer of Code project).
155 Support for the latest models was never tested and is most likely not