]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man4/asmc.4
add -n option to suppress clearing the build tree and add -DNO_CLEAN
[FreeBSD/FreeBSD.git] / share / man / man4 / asmc.4
1 .\"-
2 .\" Copyright (c) 2007, 2008 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 April 7, 2008
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 (any generation)
58 .It
59 MacBook Pro (any generation)
60 .It
61 Intel MacMini
62 .El
63 .Pp
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.
67 .Pp
68 Variables related to the SMC control and inspection are exported via
69 .Xr sysctl 3
70 under the device tree
71 .Va dev.asmc .
72 .Sh KEYBOARD BACKLIGHT
73 On
74 .Tn MacBook Pro
75 systems, you can control the keyboard brightness by writing values to
76 the
77 .Va dev.asmc.%d.light.left
78 or
79 .Va dev.asmc.%d.light.right
80 sysctl MIBs.
81 .Pp
82 Each of these sysctl MIBs contains the raw value returned by the left
83 and right light sensors.
84 .Sh TEMPERATURES
85 The number of temperature sensors and their description varies among
86 systems.
87 You can inspect the temperature sensors on your system by traversing
88 the
89 .Va dev.asmc.temp
90 sysctl MIB.
91 .Pp
92 All values are in degrees celsius.
93 .Sh SYSTEM FANS
94 The
95 .Va dev.asmc.fan.%d
96 sysctl tree contains the leaf nodes
97 .Va speed ,
98 .Va safespeed ,
99 .Va minspeed ,
100 .Va maxspeed
101 and
102 .Va targetspeed .
103 Each of these leaf nodes represent the current fan speed, the safest
104 minimum fan speed, the mininum speed and the maximum speed
105 respectively.
106 .Pp
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
112 .Va dev.asmc.sms
113 all relate to the SMS.
114 .Pp
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
119 and then configure
120 .Xr devd 8
121 the following way:
122 .Bd -literal -offset indent
123 notify 0 {
124         match "system"          "ACPI";
125         match "subsystem"       "asmc";
126         action                  "/usr/local/sbin/ataidle -s X Y";
127 };
128 .Ed
129 .Pp
130 Do not forget to change the
131 .Ar X
132 and
133 .Ar Y
134 values in the command above.
135 .Pp
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.
141 .Sh SEE ALSO
142 .Xr ataidle 8 Pq Pa ports/sysutils/ataidle ,
143 .Xr devd 8 ,
144 .Xr sysctl 8
145 .Sh HISTORY
146 The
147 .Nm
148 driver first appeared in
149 .Fx 8.0 .
150 .Sh AUTHORS
151 .An -nosplit
152 .An Rui Paulo Aq rpaulo@FreeBSD.org
153 (Google Summer of Code project).
154 .Sh BUGS
155 Support for the latest models was never tested and is most likely not
156 fully working.