1 .\" Copyright (c) 2005 Christian Brueffer
2 .\" Copyright (c) 2005 Markus Brueffer
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 AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 .\" $DragonFly: src/share/man/man4/acpi_thinkpad.4,v 1.3 2008/08/28 17:00:27 swildner Exp $
34 .Nd "ACPI extras driver for IBM/Lenovo Thinkpad laptops"
36 To compile this driver into the kernel,
37 place the following line in your
38 kernel configuration file:
39 .Bd -ragged -offset indent
40 .Cd "device acpi_thinkpad"
43 Alternatively, to load the driver as a
44 module at boot time, place the following line in
46 .Bd -literal -offset indent
47 acpi_thinkpad_load="YES"
52 driver provides support for hotkeys and other components of IBM/Lenovo
54 The main purpose of this driver is to provide an interface,
59 through which applications can determine the status of
60 various laptop components.
64 .\" interface is enabled automatically after loading the driver, the
66 .\" interface has to be enabled explicitly, as it may alter the default action of
68 .\" This is done by setting the
70 .\" sysctl as described below.
71 .\" Specifying which keys should generate events is done by setting a bitmask,
72 .\" whereas each bit represents one key or key combination.
73 .\" This bitmask, accessible via the
77 .\" by default, a value representing all possible keypress events on the specific
79 .\" .Ss Xr devd 8 Ss Events
80 .\" Hotkey events received by
82 .\" provide the following information:
84 .\" .Bl -tag -width "subsystem" -offset indent -compact
90 .\" The source of the event in the ACPI namespace.
91 .\" The value depends on the model.
93 .\" Event code (see below).
96 .\" Depending on the ThinkPad model, event codes may vary.
97 .\" On a ThinkPad T41p these are as follows:
99 .\" .Bl -tag -width "subsystem" -offset indent -compact
105 .\" Fn + F3 (LCD backlight)
107 .\" Fn + F4 (Suspend to RAM)
109 .\" Fn + F5 (Bluetooth)
113 .\" Fn + F7 (Screen expand)
123 .\" Fn + F12 (Suspend to disk)
131 .\" Fn + Home (Brightness up)
133 .\" Fn + End (Brightness down)
135 .\" Fn + PageUp (ThinkLight)
139 .\" Fn + Space (Zoom)
147 .\" Access IBM Button
149 .\" .Ss Xr led 4 Ss Interface
152 .\" driver provides a
154 .\" interface for the ThinkLight.
155 .\" The ThinkLight can be made to blink by writing
158 .\" .Pa /dev/led/thinklight
161 The following sysctls are currently implemented:
162 .Bl -tag -width indent
163 .It Va dev.acpi_thinkpad.0.initialmask
165 Bitmask of ACPI events before the
168 .It Va dev.acpi_thinkpad.0.availmask
170 Bitmask of all supported ACPI events.
171 .It Va dev.acpi_thinkpad.0.events
172 Enable ACPI events and set the
178 driver being loaded, only the Fn+F4 button generates an ACPI event.
179 .It Va dev.acpi_thinkpad.0.eventmask
180 Sets the ACPI events which are reported to
182 (not yet available in
185 Fn+F3, Fn+F4 and Fn+F12 always generate ACPI events, regardless which value
188 Depending on the ThinkPad model, the meaning of different bits in the
191 On a ThinkPad T41p this is a bitwise OR of the following:
193 .Bl -tag -width indent-two -compact
199 Fn + F3 (LCD backlight)
201 Fn + F4 (Suspend to RAM)
207 Fn + F7 (Screen expand)
217 Fn + F12 (Suspend to disk)
225 Fn + Home (Brightness up)
227 Fn + End (Brightness down)
229 Fn + PageUp (ThinkLight)
243 .It Va dev.acpi_thinkpad.0.hotkey
245 Status of several buttons.
246 Every time a button is pressed, the respecting bit is toggled.
247 It is a bitwise OR of the following:
249 .Bl -tag -width indent-two -compact
271 Brightness Up/Down Button
273 Volume Up/Down/Mute Button
275 .It Va dev.acpi_thinkpad.0.lcd_brightness
276 Current brightness level of the display.
277 .It Va dev.acpi_thinkpad.0.volume
279 .It Va dev.acpi_thinkpad.0.mute
280 Indicates, whether the speakers are muted or not.
281 .It Va dev.acpi_thinkpad.0.thinklight
282 Indicates, whether the ThinkLight keyboard light is activated or not.
283 .It Va dev.acpi_thinkpad.0.bluetooth
284 Toggle Bluetooth chip activity.
285 .It Va dev.acpi_thinkpad.0.wlan
287 Indicates whether the WLAN chip is active or not.
288 .It Va dev.acpi_thinkpad.0.fan
289 Indicates whether the fan is in automatic (1) or manual (0) mode.
290 Default is automatic mode.
291 This sysctl should be used with extreme precaution, since disabling automatic
292 fan control might overheat the ThinkPad and lead to permanent damage if the
294 is not set accordingly.
295 .It Va dev.acpi_thinkpad.0.fan_level
296 Indicates at what speed the fan should run when being in manual mode.
297 Values are ranging from 0 (off) to 7 (max).
298 The resulting speed differs from model to model.
299 On a T41p this is as follows:
301 .Bl -tag -width indent-two -compact
311 .It Va hw.sensors.acpi_thinkpad0.tempX
312 Show the readings of up to eight different temperature sensors.
313 Most ThinkPads include six or more temperature sensors but
314 only expose the CPU temperature through
316 Some ThinkPads have the below sensor layout which might vary depending on the
337 .It Va hw.sensors.acpi_thinkpad0.fan0
338 Fan speed in rounds per minute.
339 .\" A few older ThinkPads report the fan speed in levels ranging from 0 (off)
343 Defaults for these sysctls can be set in
345 Sensors can be monitored by
348 .\" .Bl -tag -width ".Pa /dev/led/thinklight"
349 .\" .It Pa /dev/led/thinklight
355 .\" The following can be added to
357 .\" in order to pass button events to a
358 .\" .Pa /usr/local/sbin/acpi_oem_exec.sh
360 .\" .Bd -literal -offset indent
362 .\" match "system" "ACPI";
363 .\" match "subsystem" "IBM";
364 .\" action "/usr/local/sbin/acpi_oem_exec.sh $notify ibm";
369 .\" .Pa /usr/local/sbin/acpi_oem_exec.sh
370 .\" script might look like:
371 .\" .Bd -literal -offset indent
374 .\" if [ "$1" = "" -o "$2" = "" ]
376 .\" echo "usage: $0 notify oem_name"
382 .\" BC_PRECOMMANDS="scale=2"
385 .\" MAX_LCD_BRIGHTNESS=7
388 .\" DISPLAY_PIPE=/tmp/acpi_${OEM}_display
390 .\" case ${NOTIFY} in
392 .\" LEVEL=`sysctl -n dev.acpi_${OEM}.0.bluetooth`
393 .\" if [ "$LEVEL" = "1" ]
395 .\" sysctl dev.acpi_${OEM}.0.bluetooth=0
396 .\" MESSAGE="bluetooth disabled"
398 .\" sysctl dev.acpi_${OEM}.0.bluetooth=1
399 .\" MESSAGE="bluetooth enabled"
403 .\" LEVEL=`sysctl -n dev.acpi_${OEM}.0.lcd_brightness`
404 .\" PERCENT=`${ECHO} "${BC_PRECOMMANDS} ; \\
405 .\" ${LEVEL} / ${MAX_LCD_BRIGHTNESS} * 100" |\\
406 .\" ${CALC} | ${CUT} -d . -f 1`
407 .\" MESSAGE="brightness level ${PERCENT}%"
410 .\" LEVEL=`sysctl -n dev.acpi_${OEM}.0.thinklight`
411 .\" if [ "$LEVEL" = "1" ]
413 .\" MESSAGE="thinklight enabled"
415 .\" MESSAGE="thinklight disabled"
419 .\" LEVEL=`sysctl -n dev.acpi_${OEM}.0.volume`
420 .\" PERCENT=`${ECHO} "${BC_PRECOMMANDS} ; \\
421 .\" ${LEVEL} / ${MAX_VOLUME} * 100" | \\
422 .\" ${CALC} | ${CUT} -d . -f 1`
423 .\" MESSAGE="volume level ${PERCENT}%"
426 .\" LEVEL=`sysctl -n dev.acpi_${OEM}.0.mute`
427 .\" if [ "$LEVEL" = "1" ]
429 .\" MESSAGE="volume muted"
431 .\" MESSAGE="volume unmuted"
437 .\" ${LOGGER} ${MESSAGE}
438 .\" if [ -p ${DISPLAY_PIPE} ]
440 .\" ${ECHO} ${MESSAGE} >> ${DISPLAY_PIPE} &
454 device driver first appeared in
456 and was imported into
462 driver was written by
463 .An Takanori Watanabe Aq takawata@FreeBSD.org
464 and later mostly rewritten by
465 .An Markus Brueffer Aq markus@FreeBSD.org .
466 This manual page was written by
467 .An Christian Brueffer Aq brueffer@FreeBSD.org
469 .An Markus Brueffer Aq markus@FreeBSD.org .