blob: 71aa403452722348f2a1668db3b6b35699e833df [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001 IBM ThinkPad ACPI Extras Driver
2
Borislav Deianov78f81cc2005-08-17 00:00:00 -04003 Version 0.12
4 17 August 2005
Linus Torvalds1da177e2005-04-16 15:20:36 -07005
6 Borislav Deianov <borislav@users.sf.net>
7 http://ibm-acpi.sf.net/
8
9
Borislav Deianov78f81cc2005-08-17 00:00:00 -040010This is a Linux ACPI driver for the IBM ThinkPad laptops. It supports
11various features of these laptops which are accessible through the
12ACPI framework but not otherwise supported by the generic Linux ACPI
13drivers.
Linus Torvalds1da177e2005-04-16 15:20:36 -070014
15
16Status
17------
18
19The features currently supported are the following (see below for
20detailed description):
21
22 - Fn key combinations
23 - Bluetooth enable and disable
24 - video output switching, expansion control
25 - ThinkLight on and off
26 - limited docking and undocking
27 - UltraBay eject
Borislav Deianov78f81cc2005-08-17 00:00:00 -040028 - CMOS control
29 - LED control
30 - ACPI sounds
31 - temperature sensors
32 - Experimental: embedded controller register dump
33 - Experimental: LCD brightness control
34 - Experimental: volume control
35 - Experimental: fan speed, fan enable/disable
Linus Torvalds1da177e2005-04-16 15:20:36 -070036
37A compatibility table by model and feature is maintained on the web
38site, http://ibm-acpi.sf.net/. I appreciate any success or failure
39reports, especially if they add to or correct the compatibility table.
40Please include the following information in your report:
41
42 - ThinkPad model name
43 - a copy of your DSDT, from /proc/acpi/dsdt
44 - which driver features work and which don't
45 - the observed behavior of non-working features
46
47Any other comments or patches are also more than welcome.
48
49
50Installation
51------------
52
53If you are compiling this driver as included in the Linux kernel
54sources, simply enable the CONFIG_ACPI_IBM option (Power Management /
55ACPI / IBM ThinkPad Laptop Extras). The rest of this section describes
56how to install this driver when downloaded from the web site.
57
58First, you need to get a kernel with ACPI support up and running.
59Please refer to http://acpi.sourceforge.net/ for help with this
60step. How successful you will be depends a lot on you ThinkPad model,
61the kernel you are using and any additional patches applied. The
62kernel provided with your distribution may not be good enough. I
63needed to compile a 2.6.7 kernel with the 20040715 ACPI patch to get
64ACPI working reliably on my ThinkPad X40. Old ThinkPad models may not
65be supported at all.
66
67Assuming you have the basic ACPI support working (e.g. you can see the
68/proc/acpi directory), follow the following steps to install this
69driver:
70
71 - unpack the archive:
72
73 tar xzvf ibm-acpi-x.y.tar.gz; cd ibm-acpi-x.y
74
75 - compile the driver:
76
77 make
78
79 - install the module in your kernel modules directory:
80
81 make install
82
83 - load the module:
84
85 modprobe ibm_acpi
86
87After loading the module, check the "dmesg" output for any error messages.
88
89
90Features
91--------
92
93The driver creates the /proc/acpi/ibm directory. There is a file under
94that directory for each feature described below. Note that while the
95driver is still in the alpha stage, the exact proc file format and
96commands supported by the various features is guaranteed to change
97frequently.
98
Borislav Deianov78f81cc2005-08-17 00:00:00 -040099Driver version -- /proc/acpi/ibm/driver
100---------------------------------------
Linus Torvalds1da177e2005-04-16 15:20:36 -0700101
102The driver name and version. No commands can be written to this file.
103
Borislav Deianov78f81cc2005-08-17 00:00:00 -0400104Hot keys -- /proc/acpi/ibm/hotkey
Linus Torvalds1da177e2005-04-16 15:20:36 -0700105---------------------------------
106
107Without this driver, only the Fn-F4 key (sleep button) generates an
108ACPI event. With the driver loaded, the hotkey feature enabled and the
109mask set (see below), the various hot keys generate ACPI events in the
110following format:
111
112 ibm/hotkey HKEY 00000080 0000xxxx
113
114The last four digits vary depending on the key combination pressed.
115All labeled Fn-Fx key combinations generate distinct events. In
116addition, the lid microswitch and some docking station buttons may
117also generate such events.
118
119The following commands can be written to this file:
120
121 echo enable > /proc/acpi/ibm/hotkey -- enable the hot keys feature
122 echo disable > /proc/acpi/ibm/hotkey -- disable the hot keys feature
123 echo 0xffff > /proc/acpi/ibm/hotkey -- enable all possible hot keys
124 echo 0x0000 > /proc/acpi/ibm/hotkey -- disable all possible hot keys
125 ... any other 4-hex-digit mask ...
126 echo reset > /proc/acpi/ibm/hotkey -- restore the original mask
127
128The bit mask allows some control over which hot keys generate ACPI
129events. Not all bits in the mask can be modified. Not all bits that
130can be modified do anything. Not all hot keys can be individually
131controlled by the mask. Most recent ThinkPad models honor the
132following bits (assuming the hot keys feature has been enabled):
133
134 key bit behavior when set behavior when unset
135
136 Fn-F3 always generates ACPI event
137 Fn-F4 always generates ACPI event
138 Fn-F5 0010 generate ACPI event enable/disable Bluetooth
139 Fn-F7 0040 generate ACPI event switch LCD and external display
140 Fn-F8 0080 generate ACPI event expand screen or none
141 Fn-F9 0100 generate ACPI event none
142 Fn-F12 always generates ACPI event
143
144Some models do not support all of the above. For example, the T30 does
145not support Fn-F5 and Fn-F9. Other models do not support the mask at
146all. On those models, hot keys cannot be controlled individually.
147
148Note that enabling ACPI events for some keys prevents their default
149behavior. For example, if events for Fn-F5 are enabled, that key will
150no longer enable/disable Bluetooth by itself. This can still be done
151from an acpid handler for the ibm/hotkey event.
152
153Note also that not all Fn key combinations are supported through
154ACPI. For example, on the X40, the brightness, volume and "Access IBM"
155buttons do not generate ACPI events even with this driver. They *can*
156be used through the "ThinkPad Buttons" utility, see
157http://www.nongnu.org/tpb/
158
159Bluetooth -- /proc/acpi/ibm/bluetooth
160-------------------------------------
161
162This feature shows the presence and current state of a Bluetooth
163device. If Bluetooth is installed, the following commands can be used:
164
165 echo enable > /proc/acpi/ibm/bluetooth
166 echo disable > /proc/acpi/ibm/bluetooth
167
168Video output control -- /proc/acpi/ibm/video
169--------------------------------------------
170
171This feature allows control over the devices used for video output -
172LCD, CRT or DVI (if available). The following commands are available:
173
174 echo lcd_enable > /proc/acpi/ibm/video
175 echo lcd_disable > /proc/acpi/ibm/video
176 echo crt_enable > /proc/acpi/ibm/video
177 echo crt_disable > /proc/acpi/ibm/video
178 echo dvi_enable > /proc/acpi/ibm/video
179 echo dvi_disable > /proc/acpi/ibm/video
180 echo auto_enable > /proc/acpi/ibm/video
181 echo auto_disable > /proc/acpi/ibm/video
182 echo expand_toggle > /proc/acpi/ibm/video
183 echo video_switch > /proc/acpi/ibm/video
184
185Each video output device can be enabled or disabled individually.
186Reading /proc/acpi/ibm/video shows the status of each device.
187
188Automatic video switching can be enabled or disabled. When automatic
189video switching is enabled, certain events (e.g. opening the lid,
190docking or undocking) cause the video output device to change
191automatically. While this can be useful, it also causes flickering
192and, on the X40, video corruption. By disabling automatic switching,
193the flickering or video corruption can be avoided.
194
195The video_switch command cycles through the available video outputs
Borislav Deianov78f81cc2005-08-17 00:00:00 -0400196(it simulates the behavior of Fn-F7).
Linus Torvalds1da177e2005-04-16 15:20:36 -0700197
198Video expansion can be toggled through this feature. This controls
199whether the display is expanded to fill the entire LCD screen when a
200mode with less than full resolution is used. Note that the current
201video expansion status cannot be determined through this feature.
202
203Note that on many models (particularly those using Radeon graphics
204chips) the X driver configures the video card in a way which prevents
205Fn-F7 from working. This also disables the video output switching
206features of this driver, as it uses the same ACPI methods as
207Fn-F7. Video switching on the console should still work.
208
Borislav Deianov78f81cc2005-08-17 00:00:00 -0400209UPDATE: There's now a patch for the X.org Radeon driver which
210addresses this issue. Some people are reporting success with the patch
211while others are still having problems. For more information:
212
213https://bugs.freedesktop.org/show_bug.cgi?id=2000
214
Linus Torvalds1da177e2005-04-16 15:20:36 -0700215ThinkLight control -- /proc/acpi/ibm/light
216------------------------------------------
217
218The current status of the ThinkLight can be found in this file. A few
219models which do not make the status available will show it as
220"unknown". The available commands are:
221
222 echo on > /proc/acpi/ibm/light
223 echo off > /proc/acpi/ibm/light
224
Borislav Deianov78f81cc2005-08-17 00:00:00 -0400225Docking / undocking -- /proc/acpi/ibm/dock
Linus Torvalds1da177e2005-04-16 15:20:36 -0700226------------------------------------------
227
228Docking and undocking (e.g. with the X4 UltraBase) requires some
229actions to be taken by the operating system to safely make or break
230the electrical connections with the dock.
231
232The docking feature of this driver generates the following ACPI events:
233
234 ibm/dock GDCK 00000003 00000001 -- eject request
235 ibm/dock GDCK 00000003 00000002 -- undocked
236 ibm/dock GDCK 00000000 00000003 -- docked
237
238NOTE: These events will only be generated if the laptop was docked
239when originally booted. This is due to the current lack of support for
240hot plugging of devices in the Linux ACPI framework. If the laptop was
241booted while not in the dock, the following message is shown in the
Borislav Deianov78f81cc2005-08-17 00:00:00 -0400242logs:
243
244 Mar 17 01:42:34 aero kernel: ibm_acpi: dock device not present
245
246In this case, no dock-related events are generated but the dock and
247undock commands described below still work. They can be executed
248manually or triggered by Fn key combinations (see the example acpid
249configuration files included in the driver tarball package available
250on the web site).
Linus Torvalds1da177e2005-04-16 15:20:36 -0700251
252When the eject request button on the dock is pressed, the first event
253above is generated. The handler for this event should issue the
254following command:
255
256 echo undock > /proc/acpi/ibm/dock
257
258After the LED on the dock goes off, it is safe to eject the laptop.
259Note: if you pressed this key by mistake, go ahead and eject the
260laptop, then dock it back in. Otherwise, the dock may not function as
261expected.
262
263When the laptop is docked, the third event above is generated. The
264handler for this event should issue the following command to fully
265enable the dock:
266
267 echo dock > /proc/acpi/ibm/dock
268
269The contents of the /proc/acpi/ibm/dock file shows the current status
270of the dock, as provided by the ACPI framework.
271
272The docking support in this driver does not take care of enabling or
273disabling any other devices you may have attached to the dock. For
274example, a CD drive plugged into the UltraBase needs to be disabled or
275enabled separately. See the provided example acpid configuration files
276for how this can be accomplished.
277
278There is no support yet for PCI devices that may be attached to a
279docking station, e.g. in the ThinkPad Dock II. The driver currently
280does not recognize, enable or disable such devices. This means that
281the only docking stations currently supported are the X-series
282UltraBase docks and "dumb" port replicators like the Mini Dock (the
283latter don't need any ACPI support, actually).
284
Borislav Deianov78f81cc2005-08-17 00:00:00 -0400285UltraBay eject -- /proc/acpi/ibm/bay
Linus Torvalds1da177e2005-04-16 15:20:36 -0700286------------------------------------
287
288Inserting or ejecting an UltraBay device requires some actions to be
289taken by the operating system to safely make or break the electrical
290connections with the device.
291
292This feature generates the following ACPI events:
293
294 ibm/bay MSTR 00000003 00000000 -- eject request
295 ibm/bay MSTR 00000001 00000000 -- eject lever inserted
296
297NOTE: These events will only be generated if the UltraBay was present
298when the laptop was originally booted (on the X series, the UltraBay
299is in the dock, so it may not be present if the laptop was undocked).
300This is due to the current lack of support for hot plugging of devices
301in the Linux ACPI framework. If the laptop was booted without the
Borislav Deianov78f81cc2005-08-17 00:00:00 -0400302UltraBay, the following message is shown in the logs:
303
304 Mar 17 01:42:34 aero kernel: ibm_acpi: bay device not present
305
306In this case, no bay-related events are generated but the eject
Linus Torvalds1da177e2005-04-16 15:20:36 -0700307command described below still works. It can be executed manually or
308triggered by a hot key combination.
309
310Sliding the eject lever generates the first event shown above. The
311handler for this event should take whatever actions are necessary to
312shut down the device in the UltraBay (e.g. call idectl), then issue
313the following command:
314
315 echo eject > /proc/acpi/ibm/bay
316
317After the LED on the UltraBay goes off, it is safe to pull out the
318device.
319
320When the eject lever is inserted, the second event above is
321generated. The handler for this event should take whatever actions are
322necessary to enable the UltraBay device (e.g. call idectl).
323
324The contents of the /proc/acpi/ibm/bay file shows the current status
325of the UltraBay, as provided by the ACPI framework.
326
Borislav Deianov78f81cc2005-08-17 00:00:00 -0400327EXPERIMENTAL warm eject support on the 600e/x, A22p and A3x (To use
328this feature, you need to supply the experimental=1 parameter when
329loading the module):
Linus Torvalds1da177e2005-04-16 15:20:36 -0700330
Borislav Deianov78f81cc2005-08-17 00:00:00 -0400331These models do not have a button near the UltraBay device to request
332a hot eject but rather require the laptop to be put to sleep
333(suspend-to-ram) before the bay device is ejected or inserted).
334The sequence of steps to eject the device is as follows:
Linus Torvalds1da177e2005-04-16 15:20:36 -0700335
Borislav Deianov78f81cc2005-08-17 00:00:00 -0400336 echo eject > /proc/acpi/ibm/bay
337 put the ThinkPad to sleep
338 remove the drive
339 resume from sleep
340 cat /proc/acpi/ibm/bay should show that the drive was removed
341
342On the A3x, both the UltraBay 2000 and UltraBay Plus devices are
343supported. Use "eject2" instead of "eject" for the second bay.
344
345Note: the UltraBay eject support on the 600e/x, A22p and A3x is
346EXPERIMENTAL and may not work as expected. USE WITH CAUTION!
347
348CMOS control -- /proc/acpi/ibm/cmos
349-----------------------------------
Linus Torvalds1da177e2005-04-16 15:20:36 -0700350
351This feature is used internally by the ACPI firmware to control the
Borislav Deianov78f81cc2005-08-17 00:00:00 -0400352ThinkLight on most newer ThinkPad models. It may also control LCD
353brightness, sounds volume and more, but only on some models.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700354
355The commands are non-negative integer numbers:
356
357 echo 0 >/proc/acpi/ibm/cmos
358 echo 1 >/proc/acpi/ibm/cmos
359 echo 2 >/proc/acpi/ibm/cmos
360 ...
361
Borislav Deianov78f81cc2005-08-17 00:00:00 -0400362The range of valid numbers is 0 to 21, but not all have an effect and
363the behavior varies from model to model. Here is the behavior on the
364X40 (tpb is the ThinkPad Buttons utility):
Linus Torvalds1da177e2005-04-16 15:20:36 -0700365
366 0 - no effect but tpb reports "Volume down"
367 1 - no effect but tpb reports "Volume up"
368 2 - no effect but tpb reports "Mute on"
369 3 - simulate pressing the "Access IBM" button
370 4 - LCD brightness up
371 5 - LCD brightness down
372 11 - toggle screen expansion
373 12 - ThinkLight on
374 13 - ThinkLight off
375 14 - no effect but tpb reports ThinkLight status change
376
Borislav Deianov78f81cc2005-08-17 00:00:00 -0400377LED control -- /proc/acpi/ibm/led
378---------------------------------
Linus Torvalds1da177e2005-04-16 15:20:36 -0700379
380Some of the LED indicators can be controlled through this feature. The
381available commands are:
382
Borislav Deianov78f81cc2005-08-17 00:00:00 -0400383 echo '<led number> on' >/proc/acpi/ibm/led
384 echo '<led number> off' >/proc/acpi/ibm/led
385 echo '<led number> blink' >/proc/acpi/ibm/led
Linus Torvalds1da177e2005-04-16 15:20:36 -0700386
Borislav Deianov78f81cc2005-08-17 00:00:00 -0400387The <led number> range is 0 to 7. The set of LEDs that can be
388controlled varies from model to model. Here is the mapping on the X40:
Linus Torvalds1da177e2005-04-16 15:20:36 -0700389
390 0 - power
391 1 - battery (orange)
392 2 - battery (green)
393 3 - UltraBase
394 4 - UltraBay
395 7 - standby
396
397All of the above can be turned on and off and can be made to blink.
398
Borislav Deianov78f81cc2005-08-17 00:00:00 -0400399ACPI sounds -- /proc/acpi/ibm/beep
400----------------------------------
Linus Torvalds1da177e2005-04-16 15:20:36 -0700401
402The BEEP method is used internally by the ACPI firmware to provide
Borislav Deianov78f81cc2005-08-17 00:00:00 -0400403audible alerts in various situations. This feature allows the same
Linus Torvalds1da177e2005-04-16 15:20:36 -0700404sounds to be triggered manually.
405
406The commands are non-negative integer numbers:
407
Borislav Deianov78f81cc2005-08-17 00:00:00 -0400408 echo <number> >/proc/acpi/ibm/beep
Linus Torvalds1da177e2005-04-16 15:20:36 -0700409
Borislav Deianov78f81cc2005-08-17 00:00:00 -0400410The valid <number> range is 0 to 17. Not all numbers trigger sounds
411and the sounds vary from model to model. Here is the behavior on the
412X40:
Linus Torvalds1da177e2005-04-16 15:20:36 -0700413
Borislav Deianov78f81cc2005-08-17 00:00:00 -0400414 0 - stop a sound in progress (but use 17 to stop 16)
415 2 - two beeps, pause, third beep ("low battery")
Linus Torvalds1da177e2005-04-16 15:20:36 -0700416 3 - single beep
Borislav Deianov78f81cc2005-08-17 00:00:00 -0400417 4 - high, followed by low-pitched beep ("unable")
Linus Torvalds1da177e2005-04-16 15:20:36 -0700418 5 - single beep
Borislav Deianov78f81cc2005-08-17 00:00:00 -0400419 6 - very high, followed by high-pitched beep ("AC/DC")
Linus Torvalds1da177e2005-04-16 15:20:36 -0700420 7 - high-pitched beep
421 9 - three short beeps
422 10 - very long beep
423 12 - low-pitched beep
Borislav Deianov78f81cc2005-08-17 00:00:00 -0400424 15 - three high-pitched beeps repeating constantly, stop with 0
425 16 - one medium-pitched beep repeating constantly, stop with 17
426 17 - stop 16
Linus Torvalds1da177e2005-04-16 15:20:36 -0700427
Borislav Deianov78f81cc2005-08-17 00:00:00 -0400428Temperature sensors -- /proc/acpi/ibm/thermal
429---------------------------------------------
Linus Torvalds1da177e2005-04-16 15:20:36 -0700430
Borislav Deianov78f81cc2005-08-17 00:00:00 -0400431Most ThinkPads include six or more separate temperature sensors but
432only expose the CPU temperature through the standard ACPI methods.
433This feature shows readings from up to eight different sensors. Some
434readings may not be valid, e.g. may show large negative values. For
435example, on the X40, a typical output may be:
436
437temperatures: 42 42 45 41 36 -128 33 -128
438
439Thomas Gruber took his R51 apart and traced all six active sensors in
440his laptop (the location of sensors may vary on other models):
441
4421: CPU
4432: Mini PCI Module
4443: HDD
4454: GPU
4465: Battery
4476: N/A
4487: Battery
4498: N/A
450
451No commands can be written to this file.
452
Matt LaPlanted6bc8ac2006-10-03 22:54:15 +0200453EXPERIMENTAL: Embedded controller register dump -- /proc/acpi/ibm/ecdump
Borislav Deianov78f81cc2005-08-17 00:00:00 -0400454------------------------------------------------------------------------
455
456This feature is marked EXPERIMENTAL because the implementation
457directly accesses hardware registers and may not work as expected. USE
458WITH CAUTION! To use this feature, you need to supply the
459experimental=1 parameter when loading the module.
460
461This feature dumps the values of 256 embedded controller
462registers. Values which have changed since the last time the registers
463were dumped are marked with a star:
464
465[root@x40 ibm-acpi]# cat /proc/acpi/ibm/ecdump
466EC +00 +01 +02 +03 +04 +05 +06 +07 +08 +09 +0a +0b +0c +0d +0e +0f
467EC 0x00: a7 47 87 01 fe 96 00 08 01 00 cb 00 00 00 40 00
468EC 0x10: 00 00 ff ff f4 3c 87 09 01 ff 42 01 ff ff 0d 00
469EC 0x20: 00 00 00 00 00 00 00 00 00 00 00 03 43 00 00 80
470EC 0x30: 01 07 1a 00 30 04 00 00 *85 00 00 10 00 50 00 00
471EC 0x40: 00 00 00 00 00 00 14 01 00 04 00 00 00 00 00 00
472EC 0x50: 00 c0 02 0d 00 01 01 02 02 03 03 03 03 *bc *02 *bc
473EC 0x60: *02 *bc *02 00 00 00 00 00 00 00 00 00 00 00 00 00
474EC 0x70: 00 00 00 00 00 12 30 40 *24 *26 *2c *27 *20 80 *1f 80
475EC 0x80: 00 00 00 06 *37 *0e 03 00 00 00 0e 07 00 00 00 00
476EC 0x90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
477EC 0xa0: *ff 09 ff 09 ff ff *64 00 *00 *00 *a2 41 *ff *ff *e0 00
478EC 0xb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
479EC 0xc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
480EC 0xd0: 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
481EC 0xe0: 00 00 00 00 00 00 00 00 11 20 49 04 24 06 55 03
482EC 0xf0: 31 55 48 54 35 38 57 57 08 2f 45 73 07 65 6c 1a
483
484This feature can be used to determine the register holding the fan
485speed on some models. To do that, do the following:
486
487 - make sure the battery is fully charged
488 - make sure the fan is running
489 - run 'cat /proc/acpi/ibm/ecdump' several times, once per second or so
490
491The first step makes sure various charging-related values don't
492vary. The second ensures that the fan-related values do vary, since
493the fan speed fluctuates a bit. The third will (hopefully) mark the
494fan register with a star:
495
496[root@x40 ibm-acpi]# cat /proc/acpi/ibm/ecdump
497EC +00 +01 +02 +03 +04 +05 +06 +07 +08 +09 +0a +0b +0c +0d +0e +0f
498EC 0x00: a7 47 87 01 fe 96 00 08 01 00 cb 00 00 00 40 00
499EC 0x10: 00 00 ff ff f4 3c 87 09 01 ff 42 01 ff ff 0d 00
500EC 0x20: 00 00 00 00 00 00 00 00 00 00 00 03 43 00 00 80
501EC 0x30: 01 07 1a 00 30 04 00 00 85 00 00 10 00 50 00 00
502EC 0x40: 00 00 00 00 00 00 14 01 00 04 00 00 00 00 00 00
503EC 0x50: 00 c0 02 0d 00 01 01 02 02 03 03 03 03 bc 02 bc
504EC 0x60: 02 bc 02 00 00 00 00 00 00 00 00 00 00 00 00 00
505EC 0x70: 00 00 00 00 00 12 30 40 24 27 2c 27 21 80 1f 80
506EC 0x80: 00 00 00 06 *be 0d 03 00 00 00 0e 07 00 00 00 00
507EC 0x90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
508EC 0xa0: ff 09 ff 09 ff ff 64 00 00 00 a2 41 ff ff e0 00
509EC 0xb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
510EC 0xc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
511EC 0xd0: 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
512EC 0xe0: 00 00 00 00 00 00 00 00 11 20 49 04 24 06 55 03
513EC 0xf0: 31 55 48 54 35 38 57 57 08 2f 45 73 07 65 6c 1a
514
515Another set of values that varies often is the temperature
516readings. Since temperatures don't change vary fast, you can take
517several quick dumps to eliminate them.
518
519You can use a similar method to figure out the meaning of other
520embedded controller registers - e.g. make sure nothing else changes
521except the charging or discharging battery to determine which
522registers contain the current battery capacity, etc. If you experiment
523with this, do send me your results (including some complete dumps with
524a description of the conditions when they were taken.)
525
526EXPERIMENTAL: LCD brightness control -- /proc/acpi/ibm/brightness
527-----------------------------------------------------------------
528
529This feature is marked EXPERIMENTAL because the implementation
530directly accesses hardware registers and may not work as expected. USE
531WITH CAUTION! To use this feature, you need to supply the
532experimental=1 parameter when loading the module.
533
534This feature allows software control of the LCD brightness on ThinkPad
535models which don't have a hardware brightness slider. The available
536commands are:
537
538 echo up >/proc/acpi/ibm/brightness
539 echo down >/proc/acpi/ibm/brightness
540 echo 'level <level>' >/proc/acpi/ibm/brightness
541
542The <level> number range is 0 to 7, although not all of them may be
543distinct. The current brightness level is shown in the file.
544
545EXPERIMENTAL: Volume control -- /proc/acpi/ibm/volume
546-----------------------------------------------------
547
548This feature is marked EXPERIMENTAL because the implementation
549directly accesses hardware registers and may not work as expected. USE
550WITH CAUTION! To use this feature, you need to supply the
551experimental=1 parameter when loading the module.
552
553This feature allows volume control on ThinkPad models which don't have
554a hardware volume knob. The available commands are:
555
556 echo up >/proc/acpi/ibm/volume
557 echo down >/proc/acpi/ibm/volume
558 echo mute >/proc/acpi/ibm/volume
559 echo 'level <level>' >/proc/acpi/ibm/volume
560
561The <level> number range is 0 to 15 although not all of them may be
562distinct. The unmute the volume after the mute command, use either the
563up or down command (the level command will not unmute the volume).
564The current volume level and mute state is shown in the file.
565
566EXPERIMENTAL: fan speed, fan enable/disable -- /proc/acpi/ibm/fan
567-----------------------------------------------------------------
568
569This feature is marked EXPERIMENTAL because the implementation
570directly accesses hardware registers and may not work as expected. USE
571WITH CAUTION! To use this feature, you need to supply the
572experimental=1 parameter when loading the module.
573
574This feature attempts to show the current fan speed. The speed is read
575directly from the hardware registers of the embedded controller. This
576is known to work on later R, T and X series ThinkPads but may show a
577bogus value on other models.
578
579The fan may be enabled or disabled with the following commands:
580
581 echo enable >/proc/acpi/ibm/fan
582 echo disable >/proc/acpi/ibm/fan
583
584WARNING WARNING WARNING: do not leave the fan disabled unless you are
585monitoring the temperature sensor readings and you are ready to enable
586it if necessary to avoid overheating.
587
588The fan only runs if it's enabled *and* the various temperature
589sensors which control it read high enough. On the X40, this seems to
590depend on the CPU and HDD temperatures. Specifically, the fan is
591turned on when either the CPU temperature climbs to 56 degrees or the
592HDD temperature climbs to 46 degrees. The fan is turned off when the
593CPU temperature drops to 49 degrees and the HDD temperature drops to
59441 degrees. These thresholds cannot currently be controlled.
595
596On the X31 and X40 (and ONLY on those models), the fan speed can be
597controlled to a certain degree. Once the fan is running, it can be
598forced to run faster or slower with the following command:
599
600 echo 'speed <speed>' > /proc/acpi/ibm/thermal
601
602The sustainable range of fan speeds on the X40 appears to be from
603about 3700 to about 7350. Values outside this range either do not have
604any effect or the fan speed eventually settles somewhere in that
605range. The fan cannot be stopped or started with this command.
606
607On the 570, temperature readings are not available through this
608feature and the fan control works a little differently. The fan speed
609is reported in levels from 0 (off) to 7 (max) and can be controlled
610with the following command:
611
612 echo 'level <level>' > /proc/acpi/ibm/thermal
Linus Torvalds1da177e2005-04-16 15:20:36 -0700613
614
Borislav Deianov78f81cc2005-08-17 00:00:00 -0400615Multiple Commands, Module Parameters
616------------------------------------
Linus Torvalds1da177e2005-04-16 15:20:36 -0700617
618Multiple commands can be written to the proc files in one shot by
619separating them with commas, for example:
620
621 echo enable,0xffff > /proc/acpi/ibm/hotkey
622 echo lcd_disable,crt_enable > /proc/acpi/ibm/video
623
624Commands can also be specified when loading the ibm_acpi module, for
625example:
626
627 modprobe ibm_acpi hotkey=enable,0xffff video=auto_disable
628
629
630Example Configuration
631---------------------
632
633The ACPI support in the kernel is intended to be used in conjunction
634with a user-space daemon, acpid. The configuration files for this
635daemon control what actions are taken in response to various ACPI
636events. An example set of configuration files are included in the
637config/ directory of the tarball package available on the web
638site. Note that these are provided for illustration purposes only and
639may need to be adapted to your particular setup.
640
641The following utility scripts are used by the example action
642scripts (included with ibm-acpi for completeness):
643
644 /usr/local/sbin/idectl -- from the hdparm source distribution,
645 see http://www.ibiblio.org/pub/Linux/system/hardware
646 /usr/local/sbin/laptop_mode -- from the Linux kernel source
647 distribution, see Documentation/laptop-mode.txt
648 /sbin/service -- comes with Redhat/Fedora distributions
Borislav Deianov78f81cc2005-08-17 00:00:00 -0400649 /usr/sbin/hibernate -- from the Software Suspend 2 distribution,
650 see http://softwaresuspend.berlios.de/
Linus Torvalds1da177e2005-04-16 15:20:36 -0700651
Borislav Deianov78f81cc2005-08-17 00:00:00 -0400652Toan T Nguyen <ntt@physics.ucla.edu> notes that Suse uses the
653powersave program to suspend ('powersave --suspend-to-ram') or
654hibernate ('powersave --suspend-to-disk'). This means that the
655hibernate script is not needed on that distribution.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700656
657Henrik Brix Andersen <brix@gentoo.org> has written a Gentoo ACPI event
658handler script for the X31. You can get the latest version from
659http://dev.gentoo.org/~brix/files/x31.sh
660
661David Schweikert <dws@ee.eth.ch> has written an alternative blank.sh
Borislav Deianov78f81cc2005-08-17 00:00:00 -0400662script which works on Debian systems. This scripts has now been
663extended to also work on Fedora systems and included as the default
664blank.sh in the distribution.