aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/laptops/thinkpad-acpi.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/laptops/thinkpad-acpi.txt')
-rw-r--r--Documentation/laptops/thinkpad-acpi.txt183
1 files changed, 33 insertions, 150 deletions
diff --git a/Documentation/laptops/thinkpad-acpi.txt b/Documentation/laptops/thinkpad-acpi.txt
index f2296ecedb89..aafcaa634191 100644
--- a/Documentation/laptops/thinkpad-acpi.txt
+++ b/Documentation/laptops/thinkpad-acpi.txt
@@ -36,8 +36,6 @@ detailed description):
36 - Bluetooth enable and disable 36 - Bluetooth enable and disable
37 - video output switching, expansion control 37 - video output switching, expansion control
38 - ThinkLight on and off 38 - ThinkLight on and off
39 - limited docking and undocking
40 - UltraBay eject
41 - CMOS/UCMS control 39 - CMOS/UCMS control
42 - LED control 40 - LED control
43 - ACPI sounds 41 - ACPI sounds
@@ -201,18 +199,22 @@ kind to allow it (and it often doesn't!).
201 199
202Not all bits in the mask can be modified. Not all bits that can be 200Not all bits in the mask can be modified. Not all bits that can be
203modified do anything. Not all hot keys can be individually controlled 201modified do anything. Not all hot keys can be individually controlled
204by the mask. Some models do not support the mask at all, and in those 202by the mask. Some models do not support the mask at all. The behaviour
205models, hot keys cannot be controlled individually. The behaviour of 203of the mask is, therefore, highly dependent on the ThinkPad model.
206the mask is, therefore, highly dependent on the ThinkPad model. 204
205The driver will filter out any unmasked hotkeys, so even if the firmware
206doesn't allow disabling an specific hotkey, the driver will not report
207events for unmasked hotkeys.
207 208
208Note that unmasking some keys prevents their default behavior. For 209Note that unmasking some keys prevents their default behavior. For
209example, if Fn+F5 is unmasked, that key will no longer enable/disable 210example, if Fn+F5 is unmasked, that key will no longer enable/disable
210Bluetooth by itself. 211Bluetooth by itself in firmware.
211 212
212Note also that not all Fn key combinations are supported through ACPI. 213Note also that not all Fn key combinations are supported through ACPI
213For example, on the X40, the brightness, volume and "Access IBM" buttons 214depending on the ThinkPad model and firmware version. On those
214do not generate ACPI events even with this driver. They *can* be used 215ThinkPads, it is still possible to support some extra hotkeys by
215through the "ThinkPad Buttons" utility, see http://www.nongnu.org/tpb/ 216polling the "CMOS NVRAM" at least 10 times per second. The driver
217attempts to enables this functionality automatically when required.
216 218
217procfs notes: 219procfs notes:
218 220
@@ -221,7 +223,7 @@ The following commands can be written to the /proc/acpi/ibm/hotkey file:
221 echo 0xffffffff > /proc/acpi/ibm/hotkey -- enable all hot keys 223 echo 0xffffffff > /proc/acpi/ibm/hotkey -- enable all hot keys
222 echo 0 > /proc/acpi/ibm/hotkey -- disable all possible hot keys 224 echo 0 > /proc/acpi/ibm/hotkey -- disable all possible hot keys
223 ... any other 8-hex-digit mask ... 225 ... any other 8-hex-digit mask ...
224 echo reset > /proc/acpi/ibm/hotkey -- restore the original mask 226 echo reset > /proc/acpi/ibm/hotkey -- restore the recommended mask
225 227
226The following commands have been deprecated and will cause the kernel 228The following commands have been deprecated and will cause the kernel
227to log a warning: 229to log a warning:
@@ -242,9 +244,13 @@ sysfs notes:
242 Returns 0. 244 Returns 0.
243 245
244 hotkey_bios_mask: 246 hotkey_bios_mask:
247 DEPRECATED, DON'T USE, WILL BE REMOVED IN THE FUTURE.
248
245 Returns the hot keys mask when thinkpad-acpi was loaded. 249 Returns the hot keys mask when thinkpad-acpi was loaded.
246 Upon module unload, the hot keys mask will be restored 250 Upon module unload, the hot keys mask will be restored
247 to this value. 251 to this value. This is always 0x80c, because those are
252 the hotkeys that were supported by ancient firmware
253 without mask support.
248 254
249 hotkey_enable: 255 hotkey_enable:
250 DEPRECATED, WILL BE REMOVED SOON. 256 DEPRECATED, WILL BE REMOVED SOON.
@@ -253,18 +259,11 @@ sysfs notes:
253 1: does nothing 259 1: does nothing
254 260
255 hotkey_mask: 261 hotkey_mask:
256 bit mask to enable driver-handling (and depending on 262 bit mask to enable reporting (and depending on
257 the firmware, ACPI event generation) for each hot key 263 the firmware, ACPI event generation) for each hot key
258 (see above). Returns the current status of the hot keys 264 (see above). Returns the current status of the hot keys
259 mask, and allows one to modify it. 265 mask, and allows one to modify it.
260 266
261 Note: when NVRAM polling is active, the firmware mask
262 will be different from the value returned by
263 hotkey_mask. The driver will retain enabled bits for
264 hotkeys that are under NVRAM polling even if the
265 firmware refuses them, and will not set these bits on
266 the firmware hot key mask.
267
268 hotkey_all_mask: 267 hotkey_all_mask:
269 bit mask that should enable event reporting for all 268 bit mask that should enable event reporting for all
270 supported hot keys, when echoed to hotkey_mask above. 269 supported hot keys, when echoed to hotkey_mask above.
@@ -277,7 +276,8 @@ sysfs notes:
277 bit mask that should enable event reporting for all 276 bit mask that should enable event reporting for all
278 supported hot keys, except those which are always 277 supported hot keys, except those which are always
279 handled by the firmware anyway. Echo it to 278 handled by the firmware anyway. Echo it to
280 hotkey_mask above, to use. 279 hotkey_mask above, to use. This is the default mask
280 used by the driver.
281 281
282 hotkey_source_mask: 282 hotkey_source_mask:
283 bit mask that selects which hot keys will the driver 283 bit mask that selects which hot keys will the driver
@@ -285,9 +285,10 @@ sysfs notes:
285 based on the capabilities reported by the ACPI firmware, 285 based on the capabilities reported by the ACPI firmware,
286 but it can be overridden at runtime. 286 but it can be overridden at runtime.
287 287
288 Hot keys whose bits are set in both hotkey_source_mask 288 Hot keys whose bits are set in hotkey_source_mask are
289 and also on hotkey_mask are polled for in NVRAM. Only a 289 polled for in NVRAM, and reported as hotkey events if
290 few hot keys are available through CMOS NVRAM polling. 290 enabled in hotkey_mask. Only a few hot keys are
291 available through CMOS NVRAM polling.
291 292
292 Warning: when in NVRAM mode, the volume up/down/mute 293 Warning: when in NVRAM mode, the volume up/down/mute
293 keys are synthesized according to changes in the mixer, 294 keys are synthesized according to changes in the mixer,
@@ -523,6 +524,7 @@ compatibility purposes when hotkey_report_mode is set to 1.
5230x2305 System is waking up from suspend to eject bay 5240x2305 System is waking up from suspend to eject bay
5240x2404 System is waking up from hibernation to undock 5250x2404 System is waking up from hibernation to undock
5250x2405 System is waking up from hibernation to eject bay 5260x2405 System is waking up from hibernation to eject bay
5270x5010 Brightness level changed/control event
526 528
527The above events are never propagated by the driver. 529The above events are never propagated by the driver.
528 530
@@ -530,7 +532,6 @@ The above events are never propagated by the driver.
5300x4003 Undocked (see 0x2x04), can sleep again 5320x4003 Undocked (see 0x2x04), can sleep again
5310x500B Tablet pen inserted into its storage bay 5330x500B Tablet pen inserted into its storage bay
5320x500C Tablet pen removed from its storage bay 5340x500C Tablet pen removed from its storage bay
5330x5010 Brightness level changed (newer Lenovo BIOSes)
534 535
535The above events are propagated by the driver. 536The above events are propagated by the driver.
536 537
@@ -619,6 +620,8 @@ For Lenovo models *with* ACPI backlight control:
6192. Do *NOT* load up ACPI video, enable the hotkeys in thinkpad-acpi, 6202. Do *NOT* load up ACPI video, enable the hotkeys in thinkpad-acpi,
620 and map them to KEY_BRIGHTNESS_UP and KEY_BRIGHTNESS_DOWN. Process 621 and map them to KEY_BRIGHTNESS_UP and KEY_BRIGHTNESS_DOWN. Process
621 these keys on userspace somehow (e.g. by calling xbacklight). 622 these keys on userspace somehow (e.g. by calling xbacklight).
623 The driver will do this automatically if it detects that ACPI video
624 has been disabled.
622 625
623 626
624Bluetooth 627Bluetooth
@@ -729,131 +732,6 @@ cannot be read or if it is unknown, thinkpad-acpi will report it as "off".
729It is impossible to know if the status returned through sysfs is valid. 732It is impossible to know if the status returned through sysfs is valid.
730 733
731 734
732Docking / undocking -- /proc/acpi/ibm/dock
733------------------------------------------
734
735Docking and undocking (e.g. with the X4 UltraBase) requires some
736actions to be taken by the operating system to safely make or break
737the electrical connections with the dock.
738
739The docking feature of this driver generates the following ACPI events:
740
741 ibm/dock GDCK 00000003 00000001 -- eject request
742 ibm/dock GDCK 00000003 00000002 -- undocked
743 ibm/dock GDCK 00000000 00000003 -- docked
744
745NOTE: These events will only be generated if the laptop was docked
746when originally booted. This is due to the current lack of support for
747hot plugging of devices in the Linux ACPI framework. If the laptop was
748booted while not in the dock, the following message is shown in the
749logs:
750
751 Mar 17 01:42:34 aero kernel: thinkpad_acpi: dock device not present
752
753In this case, no dock-related events are generated but the dock and
754undock commands described below still work. They can be executed
755manually or triggered by Fn key combinations (see the example acpid
756configuration files included in the driver tarball package available
757on the web site).
758
759When the eject request button on the dock is pressed, the first event
760above is generated. The handler for this event should issue the
761following command:
762
763 echo undock > /proc/acpi/ibm/dock
764
765After the LED on the dock goes off, it is safe to eject the laptop.
766Note: if you pressed this key by mistake, go ahead and eject the
767laptop, then dock it back in. Otherwise, the dock may not function as
768expected.
769
770When the laptop is docked, the third event above is generated. The
771handler for this event should issue the following command to fully
772enable the dock:
773
774 echo dock > /proc/acpi/ibm/dock
775
776The contents of the /proc/acpi/ibm/dock file shows the current status
777of the dock, as provided by the ACPI framework.
778
779The docking support in this driver does not take care of enabling or
780disabling any other devices you may have attached to the dock. For
781example, a CD drive plugged into the UltraBase needs to be disabled or
782enabled separately. See the provided example acpid configuration files
783for how this can be accomplished.
784
785There is no support yet for PCI devices that may be attached to a
786docking station, e.g. in the ThinkPad Dock II. The driver currently
787does not recognize, enable or disable such devices. This means that
788the only docking stations currently supported are the X-series
789UltraBase docks and "dumb" port replicators like the Mini Dock (the
790latter don't need any ACPI support, actually).
791
792
793UltraBay eject -- /proc/acpi/ibm/bay
794------------------------------------
795
796Inserting or ejecting an UltraBay device requires some actions to be
797taken by the operating system to safely make or break the electrical
798connections with the device.
799
800This feature generates the following ACPI events:
801
802 ibm/bay MSTR 00000003 00000000 -- eject request
803 ibm/bay MSTR 00000001 00000000 -- eject lever inserted
804
805NOTE: These events will only be generated if the UltraBay was present
806when the laptop was originally booted (on the X series, the UltraBay
807is in the dock, so it may not be present if the laptop was undocked).
808This is due to the current lack of support for hot plugging of devices
809in the Linux ACPI framework. If the laptop was booted without the
810UltraBay, the following message is shown in the logs:
811
812 Mar 17 01:42:34 aero kernel: thinkpad_acpi: bay device not present
813
814In this case, no bay-related events are generated but the eject
815command described below still works. It can be executed manually or
816triggered by a hot key combination.
817
818Sliding the eject lever generates the first event shown above. The
819handler for this event should take whatever actions are necessary to
820shut down the device in the UltraBay (e.g. call idectl), then issue
821the following command:
822
823 echo eject > /proc/acpi/ibm/bay
824
825After the LED on the UltraBay goes off, it is safe to pull out the
826device.
827
828When the eject lever is inserted, the second event above is
829generated. The handler for this event should take whatever actions are
830necessary to enable the UltraBay device (e.g. call idectl).
831
832The contents of the /proc/acpi/ibm/bay file shows the current status
833of the UltraBay, as provided by the ACPI framework.
834
835EXPERIMENTAL warm eject support on the 600e/x, A22p and A3x (To use
836this feature, you need to supply the experimental=1 parameter when
837loading the module):
838
839These models do not have a button near the UltraBay device to request
840a hot eject but rather require the laptop to be put to sleep
841(suspend-to-ram) before the bay device is ejected or inserted).
842The sequence of steps to eject the device is as follows:
843
844 echo eject > /proc/acpi/ibm/bay
845 put the ThinkPad to sleep
846 remove the drive
847 resume from sleep
848 cat /proc/acpi/ibm/bay should show that the drive was removed
849
850On the A3x, both the UltraBay 2000 and UltraBay Plus devices are
851supported. Use "eject2" instead of "eject" for the second bay.
852
853Note: the UltraBay eject support on the 600e/x, A22p and A3x is
854EXPERIMENTAL and may not work as expected. USE WITH CAUTION!
855
856
857CMOS/UCMS control 735CMOS/UCMS control
858----------------- 736-----------------
859 737
@@ -1582,3 +1460,8 @@ Sysfs interface changelog:
15820x020400: Marker for 16 LEDs support. Also, LEDs that are known 14600x020400: Marker for 16 LEDs support. Also, LEDs that are known
1583 to not exist in a given model are not registered with 1461 to not exist in a given model are not registered with
1584 the LED sysfs class anymore. 1462 the LED sysfs class anymore.
1463
14640x020500: Updated hotkey driver, hotkey_mask is always available
1465 and it is always able to disable hot keys. Very old
1466 thinkpads are properly supported. hotkey_bios_mask
1467 is deprecated and marked for removal.