]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - share/man/man4/asmc.4
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / share / man / man4 / asmc.4
1 .\"-
2 .\" Copyright (c) 2007, 2008, 2009 Rui Paulo <rpaulo@FreeBSD.org>
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
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.
13 .\"
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.
25 .\"
26 .\" $FreeBSD$
27 .\"
28 .Dd July 27, 2009
29 .Dt ASMC 4
30 .Os
31 .Sh NAME
32 .Nm asmc
33 .Nd device driver for the Apple System Management Console (SMC)
34 .Sh SYNOPSIS
35 To compile this driver into the kernel, place the following line in your
36 kernel configuration file:
37 .Bd -ragged -offset indent
38 .Cd "device asmc"
39 .Ed
40 .Pp
41 Alternatively, to load the driver as a
42 module at boot time, place the following line in
43 .Xr loader.conf 5 :
44 .Bd -literal -offset indent
45 asmc_load="YES"
46 .Ed
47 .Sh DESCRIPTION
48 The
49 .Nm
50 driver controls the Apple System Management Console (SMC for short)
51 found on Intel Apple systems.
52 .Pp
53 The SMC is known to be found on the following systems:
54 .Pp
55 .Bl -bullet -offset indent -compact
56 .It
57 MacBook
58 .It
59 MacBook Pro
60 .It
61 Intel MacMini
62 .It
63 Mac Pro
64 .It
65 MacBook Air
66 .It
67 Intel iMac
68 .El
69 .Pp
70 With this driver, you can configure your keyboard backlight
71 brightness, check temperatures of several sensors, check the speed of
72 the internal fans and check the status of the Sudden Motion Sensor.
73 .Pp
74 Variables related to the SMC control and inspection are exported via
75 .Xr sysctl 3
76 under the device tree
77 .Va dev.asmc .
78 .Sh KEYBOARD BACKLIGHT
79 On
80 .Tn MacBook Pro
81 systems, you can control the keyboard brightness by writing a value to
82 the
83 .Va dev.asmc.%d.light.control
84 sysctl MIB.
85 .Pp
86 The following sysctl MIBs contains the raw value returned by the left
87 and right light sensors:
88 .Va dev.asmc.%d.light.left
89 or
90 .Va dev.asmc.%d.light.right .
91 .Sh TEMPERATURES
92 The number of temperature sensors and their description varies among
93 systems.
94 You can inspect the temperature sensors on your system by traversing
95 the
96 .Va dev.asmc.temp
97 sysctl MIB.
98 .Pp
99 All values are in degrees celsius.
100 .Sh SYSTEM FANS
101 The
102 .Va dev.asmc.fan.%d
103 sysctl tree contains the leaf nodes
104 .Va speed ,
105 .Va safespeed ,
106 .Va minspeed ,
107 .Va maxspeed
108 and
109 .Va targetspeed .
110 Each of these leaf nodes represent the current fan speed, the safest
111 minimum fan speed, the minimum speed and the maximum speed
112 respectively.
113 .Pp
114 All values are in RPM.
115 .Sh SUDDEN MOTION SENSOR
116 The Sudden Motion Sensor (SMS for short) is a device that detects
117 laptop movement and notifies the operating system via an interrupt.
118 The sysctl MIBs present under
119 .Va dev.asmc.sms
120 all relate to the SMS.
121 .Pp
122 The most interesting usage of this device is to park the disk heads
123 when the laptop is moved harshly.
124 First, you need to install
125 .Xr ataidle 8 Pq Pa ports/sysutils/ataidle
126 and then configure
127 .Xr devd 8
128 the following way:
129 .Bd -literal -offset indent
130 notify 0 {
131         match "system"          "ACPI";
132         match "subsystem"       "asmc";
133         action                  "/usr/local/sbin/ataidle -s X Y";
134 };
135 .Ed
136 .Pp
137 Do not forget to change the
138 .Ar X
139 and
140 .Ar Y
141 values in the command above.
142 .Pp
143 Also, please note that parking the disk heads too many times can
144 dramatically reduce your hard drive's life span.
145 Do not rely solely on
146 the SMS to protect your hard drive: good care and common sense can
147 increase your hard drive's life.
148 .Sh SEE ALSO
149 .Xr ataidle 8 Pq Pa ports/sysutils/ataidle ,
150 .Xr devd 8 ,
151 .Xr sysctl 8
152 .Sh HISTORY
153 The
154 .Nm
155 driver first appeared in
156 .Fx 8.0 .
157 .Sh AUTHORS
158 .An -nosplit
159 .An Rui Paulo Aq rpaulo@FreeBSD.org
160 (Google Summer of Code project).
161 .Sh BUGS
162 Support for the latest models was never tested and is most likely not
163 fully working.