diff options
Diffstat (limited to 'Documentation/laptops/thinkpad-acpi.txt')
-rw-r--r-- | Documentation/laptops/thinkpad-acpi.txt | 183 |
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 | ||
202 | Not all bits in the mask can be modified. Not all bits that can be | 200 | Not all bits in the mask can be modified. Not all bits that can be |
203 | modified do anything. Not all hot keys can be individually controlled | 201 | modified do anything. Not all hot keys can be individually controlled |
204 | by the mask. Some models do not support the mask at all, and in those | 202 | by the mask. Some models do not support the mask at all. The behaviour |
205 | models, hot keys cannot be controlled individually. The behaviour of | 203 | of the mask is, therefore, highly dependent on the ThinkPad model. |
206 | the mask is, therefore, highly dependent on the ThinkPad model. | 204 | |
205 | The driver will filter out any unmasked hotkeys, so even if the firmware | ||
206 | doesn't allow disabling an specific hotkey, the driver will not report | ||
207 | events for unmasked hotkeys. | ||
207 | 208 | ||
208 | Note that unmasking some keys prevents their default behavior. For | 209 | Note that unmasking some keys prevents their default behavior. For |
209 | example, if Fn+F5 is unmasked, that key will no longer enable/disable | 210 | example, if Fn+F5 is unmasked, that key will no longer enable/disable |
210 | Bluetooth by itself. | 211 | Bluetooth by itself in firmware. |
211 | 212 | ||
212 | Note also that not all Fn key combinations are supported through ACPI. | 213 | Note also that not all Fn key combinations are supported through ACPI |
213 | For example, on the X40, the brightness, volume and "Access IBM" buttons | 214 | depending on the ThinkPad model and firmware version. On those |
214 | do not generate ACPI events even with this driver. They *can* be used | 215 | ThinkPads, it is still possible to support some extra hotkeys by |
215 | through the "ThinkPad Buttons" utility, see http://www.nongnu.org/tpb/ | 216 | polling the "CMOS NVRAM" at least 10 times per second. The driver |
217 | attempts to enables this functionality automatically when required. | ||
216 | 218 | ||
217 | procfs notes: | 219 | procfs 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 | ||
226 | The following commands have been deprecated and will cause the kernel | 228 | The following commands have been deprecated and will cause the kernel |
227 | to log a warning: | 229 | to 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. | |||
523 | 0x2305 System is waking up from suspend to eject bay | 524 | 0x2305 System is waking up from suspend to eject bay |
524 | 0x2404 System is waking up from hibernation to undock | 525 | 0x2404 System is waking up from hibernation to undock |
525 | 0x2405 System is waking up from hibernation to eject bay | 526 | 0x2405 System is waking up from hibernation to eject bay |
527 | 0x5010 Brightness level changed/control event | ||
526 | 528 | ||
527 | The above events are never propagated by the driver. | 529 | The above events are never propagated by the driver. |
528 | 530 | ||
@@ -530,7 +532,6 @@ The above events are never propagated by the driver. | |||
530 | 0x4003 Undocked (see 0x2x04), can sleep again | 532 | 0x4003 Undocked (see 0x2x04), can sleep again |
531 | 0x500B Tablet pen inserted into its storage bay | 533 | 0x500B Tablet pen inserted into its storage bay |
532 | 0x500C Tablet pen removed from its storage bay | 534 | 0x500C Tablet pen removed from its storage bay |
533 | 0x5010 Brightness level changed (newer Lenovo BIOSes) | ||
534 | 535 | ||
535 | The above events are propagated by the driver. | 536 | The above events are propagated by the driver. |
536 | 537 | ||
@@ -619,6 +620,8 @@ For Lenovo models *with* ACPI backlight control: | |||
619 | 2. Do *NOT* load up ACPI video, enable the hotkeys in thinkpad-acpi, | 620 | 2. 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 | ||
624 | Bluetooth | 627 | Bluetooth |
@@ -729,131 +732,6 @@ cannot be read or if it is unknown, thinkpad-acpi will report it as "off". | |||
729 | It is impossible to know if the status returned through sysfs is valid. | 732 | It is impossible to know if the status returned through sysfs is valid. |
730 | 733 | ||
731 | 734 | ||
732 | Docking / undocking -- /proc/acpi/ibm/dock | ||
733 | ------------------------------------------ | ||
734 | |||
735 | Docking and undocking (e.g. with the X4 UltraBase) requires some | ||
736 | actions to be taken by the operating system to safely make or break | ||
737 | the electrical connections with the dock. | ||
738 | |||
739 | The 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 | |||
745 | NOTE: These events will only be generated if the laptop was docked | ||
746 | when originally booted. This is due to the current lack of support for | ||
747 | hot plugging of devices in the Linux ACPI framework. If the laptop was | ||
748 | booted while not in the dock, the following message is shown in the | ||
749 | logs: | ||
750 | |||
751 | Mar 17 01:42:34 aero kernel: thinkpad_acpi: dock device not present | ||
752 | |||
753 | In this case, no dock-related events are generated but the dock and | ||
754 | undock commands described below still work. They can be executed | ||
755 | manually or triggered by Fn key combinations (see the example acpid | ||
756 | configuration files included in the driver tarball package available | ||
757 | on the web site). | ||
758 | |||
759 | When the eject request button on the dock is pressed, the first event | ||
760 | above is generated. The handler for this event should issue the | ||
761 | following command: | ||
762 | |||
763 | echo undock > /proc/acpi/ibm/dock | ||
764 | |||
765 | After the LED on the dock goes off, it is safe to eject the laptop. | ||
766 | Note: if you pressed this key by mistake, go ahead and eject the | ||
767 | laptop, then dock it back in. Otherwise, the dock may not function as | ||
768 | expected. | ||
769 | |||
770 | When the laptop is docked, the third event above is generated. The | ||
771 | handler for this event should issue the following command to fully | ||
772 | enable the dock: | ||
773 | |||
774 | echo dock > /proc/acpi/ibm/dock | ||
775 | |||
776 | The contents of the /proc/acpi/ibm/dock file shows the current status | ||
777 | of the dock, as provided by the ACPI framework. | ||
778 | |||
779 | The docking support in this driver does not take care of enabling or | ||
780 | disabling any other devices you may have attached to the dock. For | ||
781 | example, a CD drive plugged into the UltraBase needs to be disabled or | ||
782 | enabled separately. See the provided example acpid configuration files | ||
783 | for how this can be accomplished. | ||
784 | |||
785 | There is no support yet for PCI devices that may be attached to a | ||
786 | docking station, e.g. in the ThinkPad Dock II. The driver currently | ||
787 | does not recognize, enable or disable such devices. This means that | ||
788 | the only docking stations currently supported are the X-series | ||
789 | UltraBase docks and "dumb" port replicators like the Mini Dock (the | ||
790 | latter don't need any ACPI support, actually). | ||
791 | |||
792 | |||
793 | UltraBay eject -- /proc/acpi/ibm/bay | ||
794 | ------------------------------------ | ||
795 | |||
796 | Inserting or ejecting an UltraBay device requires some actions to be | ||
797 | taken by the operating system to safely make or break the electrical | ||
798 | connections with the device. | ||
799 | |||
800 | This 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 | |||
805 | NOTE: These events will only be generated if the UltraBay was present | ||
806 | when the laptop was originally booted (on the X series, the UltraBay | ||
807 | is in the dock, so it may not be present if the laptop was undocked). | ||
808 | This is due to the current lack of support for hot plugging of devices | ||
809 | in the Linux ACPI framework. If the laptop was booted without the | ||
810 | UltraBay, the following message is shown in the logs: | ||
811 | |||
812 | Mar 17 01:42:34 aero kernel: thinkpad_acpi: bay device not present | ||
813 | |||
814 | In this case, no bay-related events are generated but the eject | ||
815 | command described below still works. It can be executed manually or | ||
816 | triggered by a hot key combination. | ||
817 | |||
818 | Sliding the eject lever generates the first event shown above. The | ||
819 | handler for this event should take whatever actions are necessary to | ||
820 | shut down the device in the UltraBay (e.g. call idectl), then issue | ||
821 | the following command: | ||
822 | |||
823 | echo eject > /proc/acpi/ibm/bay | ||
824 | |||
825 | After the LED on the UltraBay goes off, it is safe to pull out the | ||
826 | device. | ||
827 | |||
828 | When the eject lever is inserted, the second event above is | ||
829 | generated. The handler for this event should take whatever actions are | ||
830 | necessary to enable the UltraBay device (e.g. call idectl). | ||
831 | |||
832 | The contents of the /proc/acpi/ibm/bay file shows the current status | ||
833 | of the UltraBay, as provided by the ACPI framework. | ||
834 | |||
835 | EXPERIMENTAL warm eject support on the 600e/x, A22p and A3x (To use | ||
836 | this feature, you need to supply the experimental=1 parameter when | ||
837 | loading the module): | ||
838 | |||
839 | These models do not have a button near the UltraBay device to request | ||
840 | a hot eject but rather require the laptop to be put to sleep | ||
841 | (suspend-to-ram) before the bay device is ejected or inserted). | ||
842 | The 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 | |||
850 | On the A3x, both the UltraBay 2000 and UltraBay Plus devices are | ||
851 | supported. Use "eject2" instead of "eject" for the second bay. | ||
852 | |||
853 | Note: the UltraBay eject support on the 600e/x, A22p and A3x is | ||
854 | EXPERIMENTAL and may not work as expected. USE WITH CAUTION! | ||
855 | |||
856 | |||
857 | CMOS/UCMS control | 735 | CMOS/UCMS control |
858 | ----------------- | 736 | ----------------- |
859 | 737 | ||
@@ -1582,3 +1460,8 @@ Sysfs interface changelog: | |||
1582 | 0x020400: Marker for 16 LEDs support. Also, LEDs that are known | 1460 | 0x020400: 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 | |||
1464 | 0x020500: 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. | ||