19e1cbedeSMauro Carvalho Chehab=========================== 29e1cbedeSMauro Carvalho ChehabThinkPad ACPI Extras Driver 39e1cbedeSMauro Carvalho Chehab=========================== 49e1cbedeSMauro Carvalho Chehab 59e1cbedeSMauro Carvalho ChehabVersion 0.25 69e1cbedeSMauro Carvalho Chehab 79e1cbedeSMauro Carvalho ChehabOctober 16th, 2013 89e1cbedeSMauro Carvalho Chehab 99e1cbedeSMauro Carvalho Chehab- Borislav Deianov <borislav@users.sf.net> 109e1cbedeSMauro Carvalho Chehab- Henrique de Moraes Holschuh <hmh@hmh.eng.br> 119e1cbedeSMauro Carvalho Chehab 129e1cbedeSMauro Carvalho Chehabhttp://ibm-acpi.sf.net/ 139e1cbedeSMauro Carvalho Chehab 149e1cbedeSMauro Carvalho ChehabThis is a Linux driver for the IBM and Lenovo ThinkPad laptops. It 159e1cbedeSMauro Carvalho Chehabsupports various features of these laptops which are accessible 169e1cbedeSMauro Carvalho Chehabthrough the ACPI and ACPI EC framework, but not otherwise fully 179e1cbedeSMauro Carvalho Chehabsupported by the generic Linux ACPI drivers. 189e1cbedeSMauro Carvalho Chehab 199e1cbedeSMauro Carvalho ChehabThis driver used to be named ibm-acpi until kernel 2.6.21 and release 209e1cbedeSMauro Carvalho Chehab0.13-20070314. It used to be in the drivers/acpi tree, but it was 219e1cbedeSMauro Carvalho Chehabmoved to the drivers/misc tree and renamed to thinkpad-acpi for kernel 229e1cbedeSMauro Carvalho Chehab2.6.22, and release 0.14. It was moved to drivers/platform/x86 for 239e1cbedeSMauro Carvalho Chehabkernel 2.6.29 and release 0.22. 249e1cbedeSMauro Carvalho Chehab 259e1cbedeSMauro Carvalho ChehabThe driver is named "thinkpad-acpi". In some places, like module 269e1cbedeSMauro Carvalho Chehabnames and log messages, "thinkpad_acpi" is used because of userspace 279e1cbedeSMauro Carvalho Chehabissues. 289e1cbedeSMauro Carvalho Chehab 299e1cbedeSMauro Carvalho Chehab"tpacpi" is used as a shorthand where "thinkpad-acpi" would be too 309e1cbedeSMauro Carvalho Chehablong due to length limitations on some Linux kernel versions. 319e1cbedeSMauro Carvalho Chehab 329e1cbedeSMauro Carvalho ChehabStatus 339e1cbedeSMauro Carvalho Chehab------ 349e1cbedeSMauro Carvalho Chehab 359e1cbedeSMauro Carvalho ChehabThe features currently supported are the following (see below for 369e1cbedeSMauro Carvalho Chehabdetailed description): 379e1cbedeSMauro Carvalho Chehab 389e1cbedeSMauro Carvalho Chehab - Fn key combinations 399e1cbedeSMauro Carvalho Chehab - Bluetooth enable and disable 409e1cbedeSMauro Carvalho Chehab - video output switching, expansion control 419e1cbedeSMauro Carvalho Chehab - ThinkLight on and off 429e1cbedeSMauro Carvalho Chehab - CMOS/UCMS control 439e1cbedeSMauro Carvalho Chehab - LED control 449e1cbedeSMauro Carvalho Chehab - ACPI sounds 459e1cbedeSMauro Carvalho Chehab - temperature sensors 469e1cbedeSMauro Carvalho Chehab - Experimental: embedded controller register dump 479e1cbedeSMauro Carvalho Chehab - LCD brightness control 489e1cbedeSMauro Carvalho Chehab - Volume control 499e1cbedeSMauro Carvalho Chehab - Fan control and monitoring: fan speed, fan enable/disable 509e1cbedeSMauro Carvalho Chehab - WAN enable and disable 519e1cbedeSMauro Carvalho Chehab - UWB enable and disable 529e1cbedeSMauro Carvalho Chehab 539e1cbedeSMauro Carvalho ChehabA compatibility table by model and feature is maintained on the web 549e1cbedeSMauro Carvalho Chehabsite, http://ibm-acpi.sf.net/. I appreciate any success or failure 559e1cbedeSMauro Carvalho Chehabreports, especially if they add to or correct the compatibility table. 569e1cbedeSMauro Carvalho ChehabPlease include the following information in your report: 579e1cbedeSMauro Carvalho Chehab 589e1cbedeSMauro Carvalho Chehab - ThinkPad model name 599e1cbedeSMauro Carvalho Chehab - a copy of your ACPI tables, using the "acpidump" utility 609e1cbedeSMauro Carvalho Chehab - a copy of the output of dmidecode, with serial numbers 619e1cbedeSMauro Carvalho Chehab and UUIDs masked off 629e1cbedeSMauro Carvalho Chehab - which driver features work and which don't 639e1cbedeSMauro Carvalho Chehab - the observed behavior of non-working features 649e1cbedeSMauro Carvalho Chehab 659e1cbedeSMauro Carvalho ChehabAny other comments or patches are also more than welcome. 669e1cbedeSMauro Carvalho Chehab 679e1cbedeSMauro Carvalho Chehab 689e1cbedeSMauro Carvalho ChehabInstallation 699e1cbedeSMauro Carvalho Chehab------------ 709e1cbedeSMauro Carvalho Chehab 719e1cbedeSMauro Carvalho ChehabIf you are compiling this driver as included in the Linux kernel 729e1cbedeSMauro Carvalho Chehabsources, look for the CONFIG_THINKPAD_ACPI Kconfig option. 739e1cbedeSMauro Carvalho ChehabIt is located on the menu path: "Device Drivers" -> "X86 Platform 749e1cbedeSMauro Carvalho ChehabSpecific Device Drivers" -> "ThinkPad ACPI Laptop Extras". 759e1cbedeSMauro Carvalho Chehab 769e1cbedeSMauro Carvalho Chehab 779e1cbedeSMauro Carvalho ChehabFeatures 789e1cbedeSMauro Carvalho Chehab-------- 799e1cbedeSMauro Carvalho Chehab 809e1cbedeSMauro Carvalho ChehabThe driver exports two different interfaces to userspace, which can be 819e1cbedeSMauro Carvalho Chehabused to access the features it provides. One is a legacy procfs-based 829e1cbedeSMauro Carvalho Chehabinterface, which will be removed at some time in the future. The other 839e1cbedeSMauro Carvalho Chehabis a new sysfs-based interface which is not complete yet. 849e1cbedeSMauro Carvalho Chehab 859e1cbedeSMauro Carvalho ChehabThe procfs interface creates the /proc/acpi/ibm directory. There is a 869e1cbedeSMauro Carvalho Chehabfile under that directory for each feature it supports. The procfs 879e1cbedeSMauro Carvalho Chehabinterface is mostly frozen, and will change very little if at all: it 889e1cbedeSMauro Carvalho Chehabwill not be extended to add any new functionality in the driver, instead 899e1cbedeSMauro Carvalho Chehaball new functionality will be implemented on the sysfs interface. 909e1cbedeSMauro Carvalho Chehab 919e1cbedeSMauro Carvalho ChehabThe sysfs interface tries to blend in the generic Linux sysfs subsystems 929e1cbedeSMauro Carvalho Chehaband classes as much as possible. Since some of these subsystems are not 939e1cbedeSMauro Carvalho Chehabyet ready or stabilized, it is expected that this interface will change, 949e1cbedeSMauro Carvalho Chehaband any and all userspace programs must deal with it. 959e1cbedeSMauro Carvalho Chehab 969e1cbedeSMauro Carvalho Chehab 979e1cbedeSMauro Carvalho ChehabNotes about the sysfs interface 989e1cbedeSMauro Carvalho Chehab^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 999e1cbedeSMauro Carvalho Chehab 1009e1cbedeSMauro Carvalho ChehabUnlike what was done with the procfs interface, correctness when talking 1019e1cbedeSMauro Carvalho Chehabto the sysfs interfaces will be enforced, as will correctness in the 1029e1cbedeSMauro Carvalho Chehabthinkpad-acpi's implementation of sysfs interfaces. 1039e1cbedeSMauro Carvalho Chehab 1049e1cbedeSMauro Carvalho ChehabAlso, any bugs in the thinkpad-acpi sysfs driver code or in the 1059e1cbedeSMauro Carvalho Chehabthinkpad-acpi's implementation of the sysfs interfaces will be fixed for 1069e1cbedeSMauro Carvalho Chehabmaximum correctness, even if that means changing an interface in 1079e1cbedeSMauro Carvalho Chehabnon-compatible ways. As these interfaces mature both in the kernel and 1089e1cbedeSMauro Carvalho Chehabin thinkpad-acpi, such changes should become quite rare. 1099e1cbedeSMauro Carvalho Chehab 1109e1cbedeSMauro Carvalho ChehabApplications interfacing to the thinkpad-acpi sysfs interfaces must 1119e1cbedeSMauro Carvalho Chehabfollow all sysfs guidelines and correctly process all errors (the sysfs 1129e1cbedeSMauro Carvalho Chehabinterface makes extensive use of errors). File descriptors and open / 1139e1cbedeSMauro Carvalho Chehabclose operations to the sysfs inodes must also be properly implemented. 1149e1cbedeSMauro Carvalho Chehab 1159e1cbedeSMauro Carvalho ChehabThe version of thinkpad-acpi's sysfs interface is exported by the driver 1169e1cbedeSMauro Carvalho Chehabas a driver attribute (see below). 1179e1cbedeSMauro Carvalho Chehab 1189e1cbedeSMauro Carvalho ChehabSysfs driver attributes are on the driver's sysfs attribute space, 1199e1cbedeSMauro Carvalho Chehabfor 2.6.23+ this is /sys/bus/platform/drivers/thinkpad_acpi/ and 1209e1cbedeSMauro Carvalho Chehab/sys/bus/platform/drivers/thinkpad_hwmon/ 1219e1cbedeSMauro Carvalho Chehab 1229e1cbedeSMauro Carvalho ChehabSysfs device attributes are on the thinkpad_acpi device sysfs attribute 1239e1cbedeSMauro Carvalho Chehabspace, for 2.6.23+ this is /sys/devices/platform/thinkpad_acpi/. 1249e1cbedeSMauro Carvalho Chehab 1259e1cbedeSMauro Carvalho ChehabSysfs device attributes for the sensors and fan are on the 1269e1cbedeSMauro Carvalho Chehabthinkpad_hwmon device's sysfs attribute space, but you should locate it 1279e1cbedeSMauro Carvalho Chehablooking for a hwmon device with the name attribute of "thinkpad", or 1289e1cbedeSMauro Carvalho Chehabbetter yet, through libsensors. For 4.14+ sysfs attributes were moved to the 1299e1cbedeSMauro Carvalho Chehabhwmon device (/sys/bus/platform/devices/thinkpad_hwmon/hwmon/hwmon? or 1309e1cbedeSMauro Carvalho Chehab/sys/class/hwmon/hwmon?). 1319e1cbedeSMauro Carvalho Chehab 1329e1cbedeSMauro Carvalho ChehabDriver version 1339e1cbedeSMauro Carvalho Chehab-------------- 1349e1cbedeSMauro Carvalho Chehab 1359e1cbedeSMauro Carvalho Chehabprocfs: /proc/acpi/ibm/driver 1369e1cbedeSMauro Carvalho Chehab 1379e1cbedeSMauro Carvalho Chehabsysfs driver attribute: version 1389e1cbedeSMauro Carvalho Chehab 1399e1cbedeSMauro Carvalho ChehabThe driver name and version. No commands can be written to this file. 1409e1cbedeSMauro Carvalho Chehab 1419e1cbedeSMauro Carvalho Chehab 1429e1cbedeSMauro Carvalho ChehabSysfs interface version 1439e1cbedeSMauro Carvalho Chehab----------------------- 1449e1cbedeSMauro Carvalho Chehab 1459e1cbedeSMauro Carvalho Chehabsysfs driver attribute: interface_version 1469e1cbedeSMauro Carvalho Chehab 1479e1cbedeSMauro Carvalho ChehabVersion of the thinkpad-acpi sysfs interface, as an unsigned long 1489e1cbedeSMauro Carvalho Chehab(output in hex format: 0xAAAABBCC), where: 1499e1cbedeSMauro Carvalho Chehab 1509e1cbedeSMauro Carvalho Chehab AAAA 1519e1cbedeSMauro Carvalho Chehab - major revision 1529e1cbedeSMauro Carvalho Chehab BB 1539e1cbedeSMauro Carvalho Chehab - minor revision 1549e1cbedeSMauro Carvalho Chehab CC 1559e1cbedeSMauro Carvalho Chehab - bugfix revision 1569e1cbedeSMauro Carvalho Chehab 1579e1cbedeSMauro Carvalho ChehabThe sysfs interface version changelog for the driver can be found at the 1589e1cbedeSMauro Carvalho Chehabend of this document. Changes to the sysfs interface done by the kernel 1599e1cbedeSMauro Carvalho Chehabsubsystems are not documented here, nor are they tracked by this 1609e1cbedeSMauro Carvalho Chehabattribute. 1619e1cbedeSMauro Carvalho Chehab 1629e1cbedeSMauro Carvalho ChehabChanges to the thinkpad-acpi sysfs interface are only considered 1639e1cbedeSMauro Carvalho Chehabnon-experimental when they are submitted to Linux mainline, at which 1649e1cbedeSMauro Carvalho Chehabpoint the changes in this interface are documented and interface_version 1659e1cbedeSMauro Carvalho Chehabmay be updated. If you are using any thinkpad-acpi features not yet 1669e1cbedeSMauro Carvalho Chehabsent to mainline for merging, you do so on your own risk: these features 1679e1cbedeSMauro Carvalho Chehabmay disappear, or be implemented in a different and incompatible way by 1689e1cbedeSMauro Carvalho Chehabthe time they are merged in Linux mainline. 1699e1cbedeSMauro Carvalho Chehab 1709e1cbedeSMauro Carvalho ChehabChanges that are backwards-compatible by nature (e.g. the addition of 1719e1cbedeSMauro Carvalho Chehabattributes that do not change the way the other attributes work) do not 1729e1cbedeSMauro Carvalho Chehabalways warrant an update of interface_version. Therefore, one must 1739e1cbedeSMauro Carvalho Chehabexpect that an attribute might not be there, and deal with it properly 1749e1cbedeSMauro Carvalho Chehab(an attribute not being there *is* a valid way to make it clear that a 1759e1cbedeSMauro Carvalho Chehabfeature is not available in sysfs). 1769e1cbedeSMauro Carvalho Chehab 1779e1cbedeSMauro Carvalho Chehab 1789e1cbedeSMauro Carvalho ChehabHot keys 1799e1cbedeSMauro Carvalho Chehab-------- 1809e1cbedeSMauro Carvalho Chehab 1819e1cbedeSMauro Carvalho Chehabprocfs: /proc/acpi/ibm/hotkey 1829e1cbedeSMauro Carvalho Chehab 1839e1cbedeSMauro Carvalho Chehabsysfs device attribute: hotkey_* 1849e1cbedeSMauro Carvalho Chehab 1859e1cbedeSMauro Carvalho ChehabIn a ThinkPad, the ACPI HKEY handler is responsible for communicating 1869e1cbedeSMauro Carvalho Chehabsome important events and also keyboard hot key presses to the operating 1879e1cbedeSMauro Carvalho Chehabsystem. Enabling the hotkey functionality of thinkpad-acpi signals the 1889e1cbedeSMauro Carvalho Chehabfirmware that such a driver is present, and modifies how the ThinkPad 1899e1cbedeSMauro Carvalho Chehabfirmware will behave in many situations. 1909e1cbedeSMauro Carvalho Chehab 1919e1cbedeSMauro Carvalho ChehabThe driver enables the HKEY ("hot key") event reporting automatically 1929e1cbedeSMauro Carvalho Chehabwhen loaded, and disables it when it is removed. 1939e1cbedeSMauro Carvalho Chehab 1949e1cbedeSMauro Carvalho ChehabThe driver will report HKEY events in the following format:: 1959e1cbedeSMauro Carvalho Chehab 1969e1cbedeSMauro Carvalho Chehab ibm/hotkey HKEY 00000080 0000xxxx 1979e1cbedeSMauro Carvalho Chehab 1989e1cbedeSMauro Carvalho ChehabSome of these events refer to hot key presses, but not all of them. 1999e1cbedeSMauro Carvalho Chehab 2009e1cbedeSMauro Carvalho ChehabThe driver will generate events over the input layer for hot keys and 2019e1cbedeSMauro Carvalho Chehabradio switches, and over the ACPI netlink layer for other events. The 2029e1cbedeSMauro Carvalho Chehabinput layer support accepts the standard IOCTLs to remap the keycodes 2039e1cbedeSMauro Carvalho Chehabassigned to each hot key. 2049e1cbedeSMauro Carvalho Chehab 2059e1cbedeSMauro Carvalho ChehabThe hot key bit mask allows some control over which hot keys generate 2069e1cbedeSMauro Carvalho Chehabevents. If a key is "masked" (bit set to 0 in the mask), the firmware 2079e1cbedeSMauro Carvalho Chehabwill handle it. If it is "unmasked", it signals the firmware that 2089e1cbedeSMauro Carvalho Chehabthinkpad-acpi would prefer to handle it, if the firmware would be so 2099e1cbedeSMauro Carvalho Chehabkind to allow it (and it often doesn't!). 2109e1cbedeSMauro Carvalho Chehab 2119e1cbedeSMauro Carvalho ChehabNot all bits in the mask can be modified. Not all bits that can be 2129e1cbedeSMauro Carvalho Chehabmodified do anything. Not all hot keys can be individually controlled 2139e1cbedeSMauro Carvalho Chehabby the mask. Some models do not support the mask at all. The behaviour 2149e1cbedeSMauro Carvalho Chehabof the mask is, therefore, highly dependent on the ThinkPad model. 2159e1cbedeSMauro Carvalho Chehab 2169e1cbedeSMauro Carvalho ChehabThe driver will filter out any unmasked hotkeys, so even if the firmware 2179e1cbedeSMauro Carvalho Chehabdoesn't allow disabling an specific hotkey, the driver will not report 2189e1cbedeSMauro Carvalho Chehabevents for unmasked hotkeys. 2199e1cbedeSMauro Carvalho Chehab 2209e1cbedeSMauro Carvalho ChehabNote that unmasking some keys prevents their default behavior. For 2219e1cbedeSMauro Carvalho Chehabexample, if Fn+F5 is unmasked, that key will no longer enable/disable 2229e1cbedeSMauro Carvalho ChehabBluetooth by itself in firmware. 2239e1cbedeSMauro Carvalho Chehab 2249e1cbedeSMauro Carvalho ChehabNote also that not all Fn key combinations are supported through ACPI 2259e1cbedeSMauro Carvalho Chehabdepending on the ThinkPad model and firmware version. On those 2269e1cbedeSMauro Carvalho ChehabThinkPads, it is still possible to support some extra hotkeys by 2279e1cbedeSMauro Carvalho Chehabpolling the "CMOS NVRAM" at least 10 times per second. The driver 2289e1cbedeSMauro Carvalho Chehabattempts to enables this functionality automatically when required. 2299e1cbedeSMauro Carvalho Chehab 2309e1cbedeSMauro Carvalho Chehabprocfs notes 2319e1cbedeSMauro Carvalho Chehab^^^^^^^^^^^^ 2329e1cbedeSMauro Carvalho Chehab 2339e1cbedeSMauro Carvalho ChehabThe following commands can be written to the /proc/acpi/ibm/hotkey file:: 2349e1cbedeSMauro Carvalho Chehab 2359e1cbedeSMauro Carvalho Chehab echo 0xffffffff > /proc/acpi/ibm/hotkey -- enable all hot keys 2369e1cbedeSMauro Carvalho Chehab echo 0 > /proc/acpi/ibm/hotkey -- disable all possible hot keys 2379e1cbedeSMauro Carvalho Chehab ... any other 8-hex-digit mask ... 2389e1cbedeSMauro Carvalho Chehab echo reset > /proc/acpi/ibm/hotkey -- restore the recommended mask 2399e1cbedeSMauro Carvalho Chehab 2409e1cbedeSMauro Carvalho ChehabThe following commands have been deprecated and will cause the kernel 2419e1cbedeSMauro Carvalho Chehabto log a warning:: 2429e1cbedeSMauro Carvalho Chehab 2439e1cbedeSMauro Carvalho Chehab echo enable > /proc/acpi/ibm/hotkey -- does nothing 2449e1cbedeSMauro Carvalho Chehab echo disable > /proc/acpi/ibm/hotkey -- returns an error 2459e1cbedeSMauro Carvalho Chehab 2469e1cbedeSMauro Carvalho ChehabThe procfs interface does not support NVRAM polling control. So as to 2479e1cbedeSMauro Carvalho Chehabmaintain maximum bug-to-bug compatibility, it does not report any masks, 2489e1cbedeSMauro Carvalho Chehabnor does it allow one to manipulate the hot key mask when the firmware 2499e1cbedeSMauro Carvalho Chehabdoes not support masks at all, even if NVRAM polling is in use. 2509e1cbedeSMauro Carvalho Chehab 2519e1cbedeSMauro Carvalho Chehabsysfs notes 2529e1cbedeSMauro Carvalho Chehab^^^^^^^^^^^ 2539e1cbedeSMauro Carvalho Chehab 2549e1cbedeSMauro Carvalho Chehab hotkey_bios_enabled: 2559e1cbedeSMauro Carvalho Chehab DEPRECATED, WILL BE REMOVED SOON. 2569e1cbedeSMauro Carvalho Chehab 2579e1cbedeSMauro Carvalho Chehab Returns 0. 2589e1cbedeSMauro Carvalho Chehab 2599e1cbedeSMauro Carvalho Chehab hotkey_bios_mask: 2609e1cbedeSMauro Carvalho Chehab DEPRECATED, DON'T USE, WILL BE REMOVED IN THE FUTURE. 2619e1cbedeSMauro Carvalho Chehab 2629e1cbedeSMauro Carvalho Chehab Returns the hot keys mask when thinkpad-acpi was loaded. 2639e1cbedeSMauro Carvalho Chehab Upon module unload, the hot keys mask will be restored 2649e1cbedeSMauro Carvalho Chehab to this value. This is always 0x80c, because those are 2659e1cbedeSMauro Carvalho Chehab the hotkeys that were supported by ancient firmware 2669e1cbedeSMauro Carvalho Chehab without mask support. 2679e1cbedeSMauro Carvalho Chehab 2689e1cbedeSMauro Carvalho Chehab hotkey_enable: 2699e1cbedeSMauro Carvalho Chehab DEPRECATED, WILL BE REMOVED SOON. 2709e1cbedeSMauro Carvalho Chehab 2719e1cbedeSMauro Carvalho Chehab 0: returns -EPERM 2729e1cbedeSMauro Carvalho Chehab 1: does nothing 2739e1cbedeSMauro Carvalho Chehab 2749e1cbedeSMauro Carvalho Chehab hotkey_mask: 2759e1cbedeSMauro Carvalho Chehab bit mask to enable reporting (and depending on 2769e1cbedeSMauro Carvalho Chehab the firmware, ACPI event generation) for each hot key 2779e1cbedeSMauro Carvalho Chehab (see above). Returns the current status of the hot keys 2789e1cbedeSMauro Carvalho Chehab mask, and allows one to modify it. 2799e1cbedeSMauro Carvalho Chehab 2809e1cbedeSMauro Carvalho Chehab hotkey_all_mask: 2819e1cbedeSMauro Carvalho Chehab bit mask that should enable event reporting for all 2829e1cbedeSMauro Carvalho Chehab supported hot keys, when echoed to hotkey_mask above. 2839e1cbedeSMauro Carvalho Chehab Unless you know which events need to be handled 2849e1cbedeSMauro Carvalho Chehab passively (because the firmware *will* handle them 2859e1cbedeSMauro Carvalho Chehab anyway), do *not* use hotkey_all_mask. Use 2869e1cbedeSMauro Carvalho Chehab hotkey_recommended_mask, instead. You have been warned. 2879e1cbedeSMauro Carvalho Chehab 2889e1cbedeSMauro Carvalho Chehab hotkey_recommended_mask: 2899e1cbedeSMauro Carvalho Chehab bit mask that should enable event reporting for all 2909e1cbedeSMauro Carvalho Chehab supported hot keys, except those which are always 2919e1cbedeSMauro Carvalho Chehab handled by the firmware anyway. Echo it to 2929e1cbedeSMauro Carvalho Chehab hotkey_mask above, to use. This is the default mask 2939e1cbedeSMauro Carvalho Chehab used by the driver. 2949e1cbedeSMauro Carvalho Chehab 2959e1cbedeSMauro Carvalho Chehab hotkey_source_mask: 2969e1cbedeSMauro Carvalho Chehab bit mask that selects which hot keys will the driver 2979e1cbedeSMauro Carvalho Chehab poll the NVRAM for. This is auto-detected by the driver 2989e1cbedeSMauro Carvalho Chehab based on the capabilities reported by the ACPI firmware, 2999e1cbedeSMauro Carvalho Chehab but it can be overridden at runtime. 3009e1cbedeSMauro Carvalho Chehab 3019e1cbedeSMauro Carvalho Chehab Hot keys whose bits are set in hotkey_source_mask are 3029e1cbedeSMauro Carvalho Chehab polled for in NVRAM, and reported as hotkey events if 3039e1cbedeSMauro Carvalho Chehab enabled in hotkey_mask. Only a few hot keys are 3049e1cbedeSMauro Carvalho Chehab available through CMOS NVRAM polling. 3059e1cbedeSMauro Carvalho Chehab 3069e1cbedeSMauro Carvalho Chehab Warning: when in NVRAM mode, the volume up/down/mute 3079e1cbedeSMauro Carvalho Chehab keys are synthesized according to changes in the mixer, 3089e1cbedeSMauro Carvalho Chehab which uses a single volume up or volume down hotkey 3099e1cbedeSMauro Carvalho Chehab press to unmute, as per the ThinkPad volume mixer user 3109e1cbedeSMauro Carvalho Chehab interface. When in ACPI event mode, volume up/down/mute 3119e1cbedeSMauro Carvalho Chehab events are reported by the firmware and can behave 3129e1cbedeSMauro Carvalho Chehab differently (and that behaviour changes with firmware 3139e1cbedeSMauro Carvalho Chehab version -- not just with firmware models -- as well as 3149e1cbedeSMauro Carvalho Chehab OSI(Linux) state). 3159e1cbedeSMauro Carvalho Chehab 3169e1cbedeSMauro Carvalho Chehab hotkey_poll_freq: 3179e1cbedeSMauro Carvalho Chehab frequency in Hz for hot key polling. It must be between 3189e1cbedeSMauro Carvalho Chehab 0 and 25 Hz. Polling is only carried out when strictly 3199e1cbedeSMauro Carvalho Chehab needed. 3209e1cbedeSMauro Carvalho Chehab 3219e1cbedeSMauro Carvalho Chehab Setting hotkey_poll_freq to zero disables polling, and 3229e1cbedeSMauro Carvalho Chehab will cause hot key presses that require NVRAM polling 3239e1cbedeSMauro Carvalho Chehab to never be reported. 3249e1cbedeSMauro Carvalho Chehab 3259e1cbedeSMauro Carvalho Chehab Setting hotkey_poll_freq too low may cause repeated 3269e1cbedeSMauro Carvalho Chehab pressings of the same hot key to be misreported as a 3279e1cbedeSMauro Carvalho Chehab single key press, or to not even be detected at all. 3289e1cbedeSMauro Carvalho Chehab The recommended polling frequency is 10Hz. 3299e1cbedeSMauro Carvalho Chehab 3309e1cbedeSMauro Carvalho Chehab hotkey_radio_sw: 3319e1cbedeSMauro Carvalho Chehab If the ThinkPad has a hardware radio switch, this 3329e1cbedeSMauro Carvalho Chehab attribute will read 0 if the switch is in the "radios 3339e1cbedeSMauro Carvalho Chehab disabled" position, and 1 if the switch is in the 3349e1cbedeSMauro Carvalho Chehab "radios enabled" position. 3359e1cbedeSMauro Carvalho Chehab 3369e1cbedeSMauro Carvalho Chehab This attribute has poll()/select() support. 3379e1cbedeSMauro Carvalho Chehab 3389e1cbedeSMauro Carvalho Chehab hotkey_tablet_mode: 3399e1cbedeSMauro Carvalho Chehab If the ThinkPad has tablet capabilities, this attribute 3409e1cbedeSMauro Carvalho Chehab will read 0 if the ThinkPad is in normal mode, and 3419e1cbedeSMauro Carvalho Chehab 1 if the ThinkPad is in tablet mode. 3429e1cbedeSMauro Carvalho Chehab 3439e1cbedeSMauro Carvalho Chehab This attribute has poll()/select() support. 3449e1cbedeSMauro Carvalho Chehab 3459e1cbedeSMauro Carvalho Chehab wakeup_reason: 3469e1cbedeSMauro Carvalho Chehab Set to 1 if the system is waking up because the user 3479e1cbedeSMauro Carvalho Chehab requested a bay ejection. Set to 2 if the system is 3489e1cbedeSMauro Carvalho Chehab waking up because the user requested the system to 3499e1cbedeSMauro Carvalho Chehab undock. Set to zero for normal wake-ups or wake-ups 3509e1cbedeSMauro Carvalho Chehab due to unknown reasons. 3519e1cbedeSMauro Carvalho Chehab 3529e1cbedeSMauro Carvalho Chehab This attribute has poll()/select() support. 3539e1cbedeSMauro Carvalho Chehab 3549e1cbedeSMauro Carvalho Chehab wakeup_hotunplug_complete: 3559e1cbedeSMauro Carvalho Chehab Set to 1 if the system was waken up because of an 3569e1cbedeSMauro Carvalho Chehab undock or bay ejection request, and that request 3579e1cbedeSMauro Carvalho Chehab was successfully completed. At this point, it might 3589e1cbedeSMauro Carvalho Chehab be useful to send the system back to sleep, at the 3599e1cbedeSMauro Carvalho Chehab user's choice. Refer to HKEY events 0x4003 and 3609e1cbedeSMauro Carvalho Chehab 0x3003, below. 3619e1cbedeSMauro Carvalho Chehab 3629e1cbedeSMauro Carvalho Chehab This attribute has poll()/select() support. 3639e1cbedeSMauro Carvalho Chehab 3649e1cbedeSMauro Carvalho Chehabinput layer notes 3659e1cbedeSMauro Carvalho Chehab^^^^^^^^^^^^^^^^^ 3669e1cbedeSMauro Carvalho Chehab 3679e1cbedeSMauro Carvalho ChehabA Hot key is mapped to a single input layer EV_KEY event, possibly 3689e1cbedeSMauro Carvalho Chehabfollowed by an EV_MSC MSC_SCAN event that shall contain that key's scan 3699e1cbedeSMauro Carvalho Chehabcode. An EV_SYN event will always be generated to mark the end of the 3709e1cbedeSMauro Carvalho Chehabevent block. 3719e1cbedeSMauro Carvalho Chehab 3729e1cbedeSMauro Carvalho ChehabDo not use the EV_MSC MSC_SCAN events to process keys. They are to be 3739e1cbedeSMauro Carvalho Chehabused as a helper to remap keys, only. They are particularly useful when 3749e1cbedeSMauro Carvalho Chehabremapping KEY_UNKNOWN keys. 3759e1cbedeSMauro Carvalho Chehab 3769e1cbedeSMauro Carvalho ChehabThe events are available in an input device, with the following id: 3779e1cbedeSMauro Carvalho Chehab 3789e1cbedeSMauro Carvalho Chehab ============== ============================== 3799e1cbedeSMauro Carvalho Chehab Bus BUS_HOST 3809e1cbedeSMauro Carvalho Chehab vendor 0x1014 (PCI_VENDOR_ID_IBM) or 3819e1cbedeSMauro Carvalho Chehab 0x17aa (PCI_VENDOR_ID_LENOVO) 3829e1cbedeSMauro Carvalho Chehab product 0x5054 ("TP") 3839e1cbedeSMauro Carvalho Chehab version 0x4101 3849e1cbedeSMauro Carvalho Chehab ============== ============================== 3859e1cbedeSMauro Carvalho Chehab 3869e1cbedeSMauro Carvalho ChehabThe version will have its LSB incremented if the keymap changes in a 3879e1cbedeSMauro Carvalho Chehabbackwards-compatible way. The MSB shall always be 0x41 for this input 3889e1cbedeSMauro Carvalho Chehabdevice. If the MSB is not 0x41, do not use the device as described in 3899e1cbedeSMauro Carvalho Chehabthis section, as it is either something else (e.g. another input device 3909e1cbedeSMauro Carvalho Chehabexported by a thinkpad driver, such as HDAPS) or its functionality has 3919e1cbedeSMauro Carvalho Chehabbeen changed in a non-backwards compatible way. 3929e1cbedeSMauro Carvalho Chehab 3939e1cbedeSMauro Carvalho ChehabAdding other event types for other functionalities shall be considered a 3949e1cbedeSMauro Carvalho Chehabbackwards-compatible change for this input device. 3959e1cbedeSMauro Carvalho Chehab 3969e1cbedeSMauro Carvalho ChehabThinkpad-acpi Hot Key event map (version 0x4101): 3979e1cbedeSMauro Carvalho Chehab 3989e1cbedeSMauro Carvalho Chehab======= ======= ============== ============================================== 3999e1cbedeSMauro Carvalho ChehabACPI Scan 4009e1cbedeSMauro Carvalho Chehabevent code Key Notes 4019e1cbedeSMauro Carvalho Chehab======= ======= ============== ============================================== 4029e1cbedeSMauro Carvalho Chehab0x1001 0x00 FN+F1 - 4039e1cbedeSMauro Carvalho Chehab 4049e1cbedeSMauro Carvalho Chehab0x1002 0x01 FN+F2 IBM: battery (rare) 4059e1cbedeSMauro Carvalho Chehab Lenovo: Screen lock 4069e1cbedeSMauro Carvalho Chehab 4079e1cbedeSMauro Carvalho Chehab0x1003 0x02 FN+F3 Many IBM models always report 4089e1cbedeSMauro Carvalho Chehab this hot key, even with hot keys 4099e1cbedeSMauro Carvalho Chehab disabled or with Fn+F3 masked 4109e1cbedeSMauro Carvalho Chehab off 4119e1cbedeSMauro Carvalho Chehab IBM: screen lock, often turns 4129e1cbedeSMauro Carvalho Chehab off the ThinkLight as side-effect 4139e1cbedeSMauro Carvalho Chehab Lenovo: battery 4149e1cbedeSMauro Carvalho Chehab 4159e1cbedeSMauro Carvalho Chehab0x1004 0x03 FN+F4 Sleep button (ACPI sleep button 4169e1cbedeSMauro Carvalho Chehab semantics, i.e. sleep-to-RAM). 4179e1cbedeSMauro Carvalho Chehab It always generates some kind 4189e1cbedeSMauro Carvalho Chehab of event, either the hot key 4199e1cbedeSMauro Carvalho Chehab event or an ACPI sleep button 4209e1cbedeSMauro Carvalho Chehab event. The firmware may 4219e1cbedeSMauro Carvalho Chehab refuse to generate further FN+F4 4229e1cbedeSMauro Carvalho Chehab key presses until a S3 or S4 ACPI 4239e1cbedeSMauro Carvalho Chehab sleep cycle is performed or some 4249e1cbedeSMauro Carvalho Chehab time passes. 4259e1cbedeSMauro Carvalho Chehab 4269e1cbedeSMauro Carvalho Chehab0x1005 0x04 FN+F5 Radio. Enables/disables 4279e1cbedeSMauro Carvalho Chehab the internal Bluetooth hardware 4289e1cbedeSMauro Carvalho Chehab and W-WAN card if left in control 4299e1cbedeSMauro Carvalho Chehab of the firmware. Does not affect 4309e1cbedeSMauro Carvalho Chehab the WLAN card. 4319e1cbedeSMauro Carvalho Chehab Should be used to turn on/off all 4329e1cbedeSMauro Carvalho Chehab radios (Bluetooth+W-WAN+WLAN), 4339e1cbedeSMauro Carvalho Chehab really. 4349e1cbedeSMauro Carvalho Chehab 4359e1cbedeSMauro Carvalho Chehab0x1006 0x05 FN+F6 - 4369e1cbedeSMauro Carvalho Chehab 4379e1cbedeSMauro Carvalho Chehab0x1007 0x06 FN+F7 Video output cycle. 4389e1cbedeSMauro Carvalho Chehab Do you feel lucky today? 4399e1cbedeSMauro Carvalho Chehab 4409e1cbedeSMauro Carvalho Chehab0x1008 0x07 FN+F8 IBM: toggle screen expand 4419e1cbedeSMauro Carvalho Chehab Lenovo: configure UltraNav, 4429e1cbedeSMauro Carvalho Chehab or toggle screen expand 4439e1cbedeSMauro Carvalho Chehab 4449e1cbedeSMauro Carvalho Chehab0x1009 0x08 FN+F9 - 4459e1cbedeSMauro Carvalho Chehab 4469e1cbedeSMauro Carvalho Chehab... ... ... ... 4479e1cbedeSMauro Carvalho Chehab 4489e1cbedeSMauro Carvalho Chehab0x100B 0x0A FN+F11 - 4499e1cbedeSMauro Carvalho Chehab 4509e1cbedeSMauro Carvalho Chehab0x100C 0x0B FN+F12 Sleep to disk. You are always 4519e1cbedeSMauro Carvalho Chehab supposed to handle it yourself, 4529e1cbedeSMauro Carvalho Chehab either through the ACPI event, 4539e1cbedeSMauro Carvalho Chehab or through a hotkey event. 4549e1cbedeSMauro Carvalho Chehab The firmware may refuse to 4559e1cbedeSMauro Carvalho Chehab generate further FN+F12 key 4569e1cbedeSMauro Carvalho Chehab press events until a S3 or S4 4579e1cbedeSMauro Carvalho Chehab ACPI sleep cycle is performed, 4589e1cbedeSMauro Carvalho Chehab or some time passes. 4599e1cbedeSMauro Carvalho Chehab 4609e1cbedeSMauro Carvalho Chehab0x100D 0x0C FN+BACKSPACE - 4619e1cbedeSMauro Carvalho Chehab0x100E 0x0D FN+INSERT - 4629e1cbedeSMauro Carvalho Chehab0x100F 0x0E FN+DELETE - 4639e1cbedeSMauro Carvalho Chehab 4649e1cbedeSMauro Carvalho Chehab0x1010 0x0F FN+HOME Brightness up. This key is 4659e1cbedeSMauro Carvalho Chehab always handled by the firmware 4669e1cbedeSMauro Carvalho Chehab in IBM ThinkPads, even when 4679e1cbedeSMauro Carvalho Chehab unmasked. Just leave it alone. 4689e1cbedeSMauro Carvalho Chehab For Lenovo ThinkPads with a new 4699e1cbedeSMauro Carvalho Chehab BIOS, it has to be handled either 4709e1cbedeSMauro Carvalho Chehab by the ACPI OSI, or by userspace. 4719e1cbedeSMauro Carvalho Chehab The driver does the right thing, 4729e1cbedeSMauro Carvalho Chehab never mess with this. 4739e1cbedeSMauro Carvalho Chehab0x1011 0x10 FN+END Brightness down. See brightness 4749e1cbedeSMauro Carvalho Chehab up for details. 4759e1cbedeSMauro Carvalho Chehab 4769e1cbedeSMauro Carvalho Chehab0x1012 0x11 FN+PGUP ThinkLight toggle. This key is 4779e1cbedeSMauro Carvalho Chehab always handled by the firmware, 4789e1cbedeSMauro Carvalho Chehab even when unmasked. 4799e1cbedeSMauro Carvalho Chehab 4809e1cbedeSMauro Carvalho Chehab0x1013 0x12 FN+PGDOWN - 4819e1cbedeSMauro Carvalho Chehab 4829e1cbedeSMauro Carvalho Chehab0x1014 0x13 FN+SPACE Zoom key 4839e1cbedeSMauro Carvalho Chehab 4849e1cbedeSMauro Carvalho Chehab0x1015 0x14 VOLUME UP Internal mixer volume up. This 4859e1cbedeSMauro Carvalho Chehab key is always handled by the 4869e1cbedeSMauro Carvalho Chehab firmware, even when unmasked. 4879e1cbedeSMauro Carvalho Chehab NOTE: Lenovo seems to be changing 4889e1cbedeSMauro Carvalho Chehab this. 4899e1cbedeSMauro Carvalho Chehab0x1016 0x15 VOLUME DOWN Internal mixer volume up. This 4909e1cbedeSMauro Carvalho Chehab key is always handled by the 4919e1cbedeSMauro Carvalho Chehab firmware, even when unmasked. 4929e1cbedeSMauro Carvalho Chehab NOTE: Lenovo seems to be changing 4939e1cbedeSMauro Carvalho Chehab this. 4949e1cbedeSMauro Carvalho Chehab0x1017 0x16 MUTE Mute internal mixer. This 4959e1cbedeSMauro Carvalho Chehab key is always handled by the 4969e1cbedeSMauro Carvalho Chehab firmware, even when unmasked. 4979e1cbedeSMauro Carvalho Chehab 4989e1cbedeSMauro Carvalho Chehab0x1018 0x17 THINKPAD ThinkPad/Access IBM/Lenovo key 4999e1cbedeSMauro Carvalho Chehab 5009e1cbedeSMauro Carvalho Chehab0x1019 0x18 unknown 5019e1cbedeSMauro Carvalho Chehab 5029e1cbedeSMauro Carvalho Chehab... ... ... 5039e1cbedeSMauro Carvalho Chehab 5049e1cbedeSMauro Carvalho Chehab0x1020 0x1F unknown 5059e1cbedeSMauro Carvalho Chehab======= ======= ============== ============================================== 5069e1cbedeSMauro Carvalho Chehab 5079e1cbedeSMauro Carvalho ChehabThe ThinkPad firmware does not allow one to differentiate when most hot 5089e1cbedeSMauro Carvalho Chehabkeys are pressed or released (either that, or we don't know how to, yet). 5099e1cbedeSMauro Carvalho ChehabFor these keys, the driver generates a set of events for a key press and 5109e1cbedeSMauro Carvalho Chehabimmediately issues the same set of events for a key release. It is 5119e1cbedeSMauro Carvalho Chehabunknown by the driver if the ThinkPad firmware triggered these events on 5129e1cbedeSMauro Carvalho Chehabhot key press or release, but the firmware will do it for either one, not 5139e1cbedeSMauro Carvalho Chehabboth. 5149e1cbedeSMauro Carvalho Chehab 5159e1cbedeSMauro Carvalho ChehabIf a key is mapped to KEY_RESERVED, it generates no input events at all. 5169e1cbedeSMauro Carvalho ChehabIf a key is mapped to KEY_UNKNOWN, it generates an input event that 5179e1cbedeSMauro Carvalho Chehabincludes an scan code. If a key is mapped to anything else, it will 5189e1cbedeSMauro Carvalho Chehabgenerate input device EV_KEY events. 5199e1cbedeSMauro Carvalho Chehab 5209e1cbedeSMauro Carvalho ChehabIn addition to the EV_KEY events, thinkpad-acpi may also issue EV_SW 5219e1cbedeSMauro Carvalho Chehabevents for switches: 5229e1cbedeSMauro Carvalho Chehab 5239e1cbedeSMauro Carvalho Chehab============== ============================================== 5249e1cbedeSMauro Carvalho ChehabSW_RFKILL_ALL T60 and later hardware rfkill rocker switch 5259e1cbedeSMauro Carvalho ChehabSW_TABLET_MODE Tablet ThinkPads HKEY events 0x5009 and 0x500A 5269e1cbedeSMauro Carvalho Chehab============== ============================================== 5279e1cbedeSMauro Carvalho Chehab 5289e1cbedeSMauro Carvalho ChehabNon hotkey ACPI HKEY event map 5299e1cbedeSMauro Carvalho Chehab------------------------------ 5309e1cbedeSMauro Carvalho Chehab 5319e1cbedeSMauro Carvalho ChehabEvents that are never propagated by the driver: 5329e1cbedeSMauro Carvalho Chehab 5339e1cbedeSMauro Carvalho Chehab====== ================================================== 5349e1cbedeSMauro Carvalho Chehab0x2304 System is waking up from suspend to undock 5359e1cbedeSMauro Carvalho Chehab0x2305 System is waking up from suspend to eject bay 5369e1cbedeSMauro Carvalho Chehab0x2404 System is waking up from hibernation to undock 5379e1cbedeSMauro Carvalho Chehab0x2405 System is waking up from hibernation to eject bay 5389e1cbedeSMauro Carvalho Chehab0x5001 Lid closed 5399e1cbedeSMauro Carvalho Chehab0x5002 Lid opened 5409e1cbedeSMauro Carvalho Chehab0x5009 Tablet swivel: switched to tablet mode 5419e1cbedeSMauro Carvalho Chehab0x500A Tablet swivel: switched to normal mode 5429e1cbedeSMauro Carvalho Chehab0x5010 Brightness level changed/control event 5439e1cbedeSMauro Carvalho Chehab0x6000 KEYBOARD: Numlock key pressed 5449e1cbedeSMauro Carvalho Chehab0x6005 KEYBOARD: Fn key pressed (TO BE VERIFIED) 5459e1cbedeSMauro Carvalho Chehab0x7000 Radio Switch may have changed state 5469e1cbedeSMauro Carvalho Chehab====== ================================================== 5479e1cbedeSMauro Carvalho Chehab 5489e1cbedeSMauro Carvalho Chehab 5499e1cbedeSMauro Carvalho ChehabEvents that are propagated by the driver to userspace: 5509e1cbedeSMauro Carvalho Chehab 5519e1cbedeSMauro Carvalho Chehab====== ===================================================== 5529e1cbedeSMauro Carvalho Chehab0x2313 ALARM: System is waking up from suspend because 5539e1cbedeSMauro Carvalho Chehab the battery is nearly empty 5549e1cbedeSMauro Carvalho Chehab0x2413 ALARM: System is waking up from hibernation because 5559e1cbedeSMauro Carvalho Chehab the battery is nearly empty 5569e1cbedeSMauro Carvalho Chehab0x3003 Bay ejection (see 0x2x05) complete, can sleep again 5579e1cbedeSMauro Carvalho Chehab0x3006 Bay hotplug request (hint to power up SATA link when 5589e1cbedeSMauro Carvalho Chehab the optical drive tray is ejected) 5599e1cbedeSMauro Carvalho Chehab0x4003 Undocked (see 0x2x04), can sleep again 5609e1cbedeSMauro Carvalho Chehab0x4010 Docked into hotplug port replicator (non-ACPI dock) 5619e1cbedeSMauro Carvalho Chehab0x4011 Undocked from hotplug port replicator (non-ACPI dock) 5629e1cbedeSMauro Carvalho Chehab0x500B Tablet pen inserted into its storage bay 5639e1cbedeSMauro Carvalho Chehab0x500C Tablet pen removed from its storage bay 5649e1cbedeSMauro Carvalho Chehab0x6011 ALARM: battery is too hot 5659e1cbedeSMauro Carvalho Chehab0x6012 ALARM: battery is extremely hot 5669e1cbedeSMauro Carvalho Chehab0x6021 ALARM: a sensor is too hot 5679e1cbedeSMauro Carvalho Chehab0x6022 ALARM: a sensor is extremely hot 5689e1cbedeSMauro Carvalho Chehab0x6030 System thermal table changed 5699e1cbedeSMauro Carvalho Chehab0x6032 Thermal Control command set completion (DYTC, Windows) 5709e1cbedeSMauro Carvalho Chehab0x6040 Nvidia Optimus/AC adapter related (TO BE VERIFIED) 5719e1cbedeSMauro Carvalho Chehab0x60C0 X1 Yoga 2016, Tablet mode status changed 5729e1cbedeSMauro Carvalho Chehab0x60F0 Thermal Transformation changed (GMTS, Windows) 5739e1cbedeSMauro Carvalho Chehab====== ===================================================== 5749e1cbedeSMauro Carvalho Chehab 5759e1cbedeSMauro Carvalho ChehabBattery nearly empty alarms are a last resort attempt to get the 5769e1cbedeSMauro Carvalho Chehaboperating system to hibernate or shutdown cleanly (0x2313), or shutdown 5779e1cbedeSMauro Carvalho Chehabcleanly (0x2413) before power is lost. They must be acted upon, as the 5789e1cbedeSMauro Carvalho Chehabwake up caused by the firmware will have negated most safety nets... 5799e1cbedeSMauro Carvalho Chehab 5809e1cbedeSMauro Carvalho ChehabWhen any of the "too hot" alarms happen, according to Lenovo the user 5819e1cbedeSMauro Carvalho Chehabshould suspend or hibernate the laptop (and in the case of battery 5829e1cbedeSMauro Carvalho Chehabalarms, unplug the AC adapter) to let it cool down. These alarms do 5839e1cbedeSMauro Carvalho Chehabsignal that something is wrong, they should never happen on normal 5849e1cbedeSMauro Carvalho Chehaboperating conditions. 5859e1cbedeSMauro Carvalho Chehab 5869e1cbedeSMauro Carvalho ChehabThe "extremely hot" alarms are emergencies. According to Lenovo, the 5879e1cbedeSMauro Carvalho Chehaboperating system is to force either an immediate suspend or hibernate 5889e1cbedeSMauro Carvalho Chehabcycle, or a system shutdown. Obviously, something is very wrong if this 5899e1cbedeSMauro Carvalho Chehabhappens. 5909e1cbedeSMauro Carvalho Chehab 5919e1cbedeSMauro Carvalho Chehab 5929e1cbedeSMauro Carvalho ChehabBrightness hotkey notes 5939e1cbedeSMauro Carvalho Chehab^^^^^^^^^^^^^^^^^^^^^^^ 5949e1cbedeSMauro Carvalho Chehab 5959e1cbedeSMauro Carvalho ChehabDon't mess with the brightness hotkeys in a Thinkpad. If you want 5969e1cbedeSMauro Carvalho Chehabnotifications for OSD, use the sysfs backlight class event support. 5979e1cbedeSMauro Carvalho Chehab 5989e1cbedeSMauro Carvalho ChehabThe driver will issue KEY_BRIGHTNESS_UP and KEY_BRIGHTNESS_DOWN events 5999e1cbedeSMauro Carvalho Chehabautomatically for the cases were userspace has to do something to 6009e1cbedeSMauro Carvalho Chehabimplement brightness changes. When you override these events, you will 6019e1cbedeSMauro Carvalho Chehabeither fail to handle properly the ThinkPads that require explicit 6029e1cbedeSMauro Carvalho Chehabaction to change backlight brightness, or the ThinkPads that require 6039e1cbedeSMauro Carvalho Chehabthat no action be taken to work properly. 6049e1cbedeSMauro Carvalho Chehab 6059e1cbedeSMauro Carvalho Chehab 6069e1cbedeSMauro Carvalho ChehabBluetooth 6079e1cbedeSMauro Carvalho Chehab--------- 6089e1cbedeSMauro Carvalho Chehab 6099e1cbedeSMauro Carvalho Chehabprocfs: /proc/acpi/ibm/bluetooth 6109e1cbedeSMauro Carvalho Chehab 6119e1cbedeSMauro Carvalho Chehabsysfs device attribute: bluetooth_enable (deprecated) 6129e1cbedeSMauro Carvalho Chehab 6139e1cbedeSMauro Carvalho Chehabsysfs rfkill class: switch "tpacpi_bluetooth_sw" 6149e1cbedeSMauro Carvalho Chehab 6159e1cbedeSMauro Carvalho ChehabThis feature shows the presence and current state of a ThinkPad 6169e1cbedeSMauro Carvalho ChehabBluetooth device in the internal ThinkPad CDC slot. 6179e1cbedeSMauro Carvalho Chehab 6189e1cbedeSMauro Carvalho ChehabIf the ThinkPad supports it, the Bluetooth state is stored in NVRAM, 6199e1cbedeSMauro Carvalho Chehabso it is kept across reboots and power-off. 6209e1cbedeSMauro Carvalho Chehab 6219e1cbedeSMauro Carvalho ChehabProcfs notes 6229e1cbedeSMauro Carvalho Chehab^^^^^^^^^^^^ 6239e1cbedeSMauro Carvalho Chehab 6249e1cbedeSMauro Carvalho ChehabIf Bluetooth is installed, the following commands can be used:: 6259e1cbedeSMauro Carvalho Chehab 6269e1cbedeSMauro Carvalho Chehab echo enable > /proc/acpi/ibm/bluetooth 6279e1cbedeSMauro Carvalho Chehab echo disable > /proc/acpi/ibm/bluetooth 6289e1cbedeSMauro Carvalho Chehab 6299e1cbedeSMauro Carvalho ChehabSysfs notes 6309e1cbedeSMauro Carvalho Chehab^^^^^^^^^^^ 6319e1cbedeSMauro Carvalho Chehab 6329e1cbedeSMauro Carvalho Chehab If the Bluetooth CDC card is installed, it can be enabled / 6339e1cbedeSMauro Carvalho Chehab disabled through the "bluetooth_enable" thinkpad-acpi device 6349e1cbedeSMauro Carvalho Chehab attribute, and its current status can also be queried. 6359e1cbedeSMauro Carvalho Chehab 6369e1cbedeSMauro Carvalho Chehab enable: 6379e1cbedeSMauro Carvalho Chehab 6389e1cbedeSMauro Carvalho Chehab - 0: disables Bluetooth / Bluetooth is disabled 6399e1cbedeSMauro Carvalho Chehab - 1: enables Bluetooth / Bluetooth is enabled. 6409e1cbedeSMauro Carvalho Chehab 6419e1cbedeSMauro Carvalho Chehab Note: this interface has been superseded by the generic rfkill 6429e1cbedeSMauro Carvalho Chehab class. It has been deprecated, and it will be removed in year 6439e1cbedeSMauro Carvalho Chehab 2010. 6449e1cbedeSMauro Carvalho Chehab 6459e1cbedeSMauro Carvalho Chehab rfkill controller switch "tpacpi_bluetooth_sw": refer to 6469e1cbedeSMauro Carvalho Chehab Documentation/rfkill.txt for details. 6479e1cbedeSMauro Carvalho Chehab 6489e1cbedeSMauro Carvalho Chehab 6499e1cbedeSMauro Carvalho ChehabVideo output control -- /proc/acpi/ibm/video 6509e1cbedeSMauro Carvalho Chehab-------------------------------------------- 6519e1cbedeSMauro Carvalho Chehab 6529e1cbedeSMauro Carvalho ChehabThis feature allows control over the devices used for video output - 6539e1cbedeSMauro Carvalho ChehabLCD, CRT or DVI (if available). The following commands are available:: 6549e1cbedeSMauro Carvalho Chehab 6559e1cbedeSMauro Carvalho Chehab echo lcd_enable > /proc/acpi/ibm/video 6569e1cbedeSMauro Carvalho Chehab echo lcd_disable > /proc/acpi/ibm/video 6579e1cbedeSMauro Carvalho Chehab echo crt_enable > /proc/acpi/ibm/video 6589e1cbedeSMauro Carvalho Chehab echo crt_disable > /proc/acpi/ibm/video 6599e1cbedeSMauro Carvalho Chehab echo dvi_enable > /proc/acpi/ibm/video 6609e1cbedeSMauro Carvalho Chehab echo dvi_disable > /proc/acpi/ibm/video 6619e1cbedeSMauro Carvalho Chehab echo auto_enable > /proc/acpi/ibm/video 6629e1cbedeSMauro Carvalho Chehab echo auto_disable > /proc/acpi/ibm/video 6639e1cbedeSMauro Carvalho Chehab echo expand_toggle > /proc/acpi/ibm/video 6649e1cbedeSMauro Carvalho Chehab echo video_switch > /proc/acpi/ibm/video 6659e1cbedeSMauro Carvalho Chehab 6669e1cbedeSMauro Carvalho ChehabNOTE: 6679e1cbedeSMauro Carvalho Chehab Access to this feature is restricted to processes owning the 6689e1cbedeSMauro Carvalho Chehab CAP_SYS_ADMIN capability for safety reasons, as it can interact badly 6699e1cbedeSMauro Carvalho Chehab enough with some versions of X.org to crash it. 6709e1cbedeSMauro Carvalho Chehab 6719e1cbedeSMauro Carvalho ChehabEach video output device can be enabled or disabled individually. 6729e1cbedeSMauro Carvalho ChehabReading /proc/acpi/ibm/video shows the status of each device. 6739e1cbedeSMauro Carvalho Chehab 6749e1cbedeSMauro Carvalho ChehabAutomatic video switching can be enabled or disabled. When automatic 6759e1cbedeSMauro Carvalho Chehabvideo switching is enabled, certain events (e.g. opening the lid, 6769e1cbedeSMauro Carvalho Chehabdocking or undocking) cause the video output device to change 6779e1cbedeSMauro Carvalho Chehabautomatically. While this can be useful, it also causes flickering 6789e1cbedeSMauro Carvalho Chehaband, on the X40, video corruption. By disabling automatic switching, 6799e1cbedeSMauro Carvalho Chehabthe flickering or video corruption can be avoided. 6809e1cbedeSMauro Carvalho Chehab 6819e1cbedeSMauro Carvalho ChehabThe video_switch command cycles through the available video outputs 6829e1cbedeSMauro Carvalho Chehab(it simulates the behavior of Fn-F7). 6839e1cbedeSMauro Carvalho Chehab 6849e1cbedeSMauro Carvalho ChehabVideo expansion can be toggled through this feature. This controls 6859e1cbedeSMauro Carvalho Chehabwhether the display is expanded to fill the entire LCD screen when a 6869e1cbedeSMauro Carvalho Chehabmode with less than full resolution is used. Note that the current 6879e1cbedeSMauro Carvalho Chehabvideo expansion status cannot be determined through this feature. 6889e1cbedeSMauro Carvalho Chehab 6899e1cbedeSMauro Carvalho ChehabNote that on many models (particularly those using Radeon graphics 6909e1cbedeSMauro Carvalho Chehabchips) the X driver configures the video card in a way which prevents 6919e1cbedeSMauro Carvalho ChehabFn-F7 from working. This also disables the video output switching 6929e1cbedeSMauro Carvalho Chehabfeatures of this driver, as it uses the same ACPI methods as 6939e1cbedeSMauro Carvalho ChehabFn-F7. Video switching on the console should still work. 6949e1cbedeSMauro Carvalho Chehab 6959e1cbedeSMauro Carvalho ChehabUPDATE: refer to https://bugs.freedesktop.org/show_bug.cgi?id=2000 6969e1cbedeSMauro Carvalho Chehab 6979e1cbedeSMauro Carvalho Chehab 6989e1cbedeSMauro Carvalho ChehabThinkLight control 6999e1cbedeSMauro Carvalho Chehab------------------ 7009e1cbedeSMauro Carvalho Chehab 7019e1cbedeSMauro Carvalho Chehabprocfs: /proc/acpi/ibm/light 7029e1cbedeSMauro Carvalho Chehab 7039e1cbedeSMauro Carvalho Chehabsysfs attributes: as per LED class, for the "tpacpi::thinklight" LED 7049e1cbedeSMauro Carvalho Chehab 7059e1cbedeSMauro Carvalho Chehabprocfs notes 7069e1cbedeSMauro Carvalho Chehab^^^^^^^^^^^^ 7079e1cbedeSMauro Carvalho Chehab 7089e1cbedeSMauro Carvalho ChehabThe ThinkLight status can be read and set through the procfs interface. A 7099e1cbedeSMauro Carvalho Chehabfew models which do not make the status available will show the ThinkLight 7109e1cbedeSMauro Carvalho Chehabstatus as "unknown". The available commands are:: 7119e1cbedeSMauro Carvalho Chehab 7129e1cbedeSMauro Carvalho Chehab echo on > /proc/acpi/ibm/light 7139e1cbedeSMauro Carvalho Chehab echo off > /proc/acpi/ibm/light 7149e1cbedeSMauro Carvalho Chehab 7159e1cbedeSMauro Carvalho Chehabsysfs notes 7169e1cbedeSMauro Carvalho Chehab^^^^^^^^^^^ 7179e1cbedeSMauro Carvalho Chehab 7189e1cbedeSMauro Carvalho ChehabThe ThinkLight sysfs interface is documented by the LED class 7199e1cbedeSMauro Carvalho Chehabdocumentation, in Documentation/leds/leds-class.rst. The ThinkLight LED name 7209e1cbedeSMauro Carvalho Chehabis "tpacpi::thinklight". 7219e1cbedeSMauro Carvalho Chehab 7229e1cbedeSMauro Carvalho ChehabDue to limitations in the sysfs LED class, if the status of the ThinkLight 7239e1cbedeSMauro Carvalho Chehabcannot be read or if it is unknown, thinkpad-acpi will report it as "off". 7249e1cbedeSMauro Carvalho ChehabIt is impossible to know if the status returned through sysfs is valid. 7259e1cbedeSMauro Carvalho Chehab 7269e1cbedeSMauro Carvalho Chehab 7279e1cbedeSMauro Carvalho ChehabCMOS/UCMS control 7289e1cbedeSMauro Carvalho Chehab----------------- 7299e1cbedeSMauro Carvalho Chehab 7309e1cbedeSMauro Carvalho Chehabprocfs: /proc/acpi/ibm/cmos 7319e1cbedeSMauro Carvalho Chehab 7329e1cbedeSMauro Carvalho Chehabsysfs device attribute: cmos_command 7339e1cbedeSMauro Carvalho Chehab 7349e1cbedeSMauro Carvalho ChehabThis feature is mostly used internally by the ACPI firmware to keep the legacy 7359e1cbedeSMauro Carvalho ChehabCMOS NVRAM bits in sync with the current machine state, and to record this 7369e1cbedeSMauro Carvalho Chehabstate so that the ThinkPad will retain such settings across reboots. 7379e1cbedeSMauro Carvalho Chehab 7389e1cbedeSMauro Carvalho ChehabSome of these commands actually perform actions in some ThinkPad models, but 7399e1cbedeSMauro Carvalho Chehabthis is expected to disappear more and more in newer models. As an example, in 7409e1cbedeSMauro Carvalho Chehaba T43 and in a X40, commands 12 and 13 still control the ThinkLight state for 7419e1cbedeSMauro Carvalho Chehabreal, but commands 0 to 2 don't control the mixer anymore (they have been 7429e1cbedeSMauro Carvalho Chehabphased out) and just update the NVRAM. 7439e1cbedeSMauro Carvalho Chehab 7449e1cbedeSMauro Carvalho ChehabThe range of valid cmos command numbers is 0 to 21, but not all have an 7459e1cbedeSMauro Carvalho Chehabeffect and the behavior varies from model to model. Here is the behavior 7469e1cbedeSMauro Carvalho Chehabon the X40 (tpb is the ThinkPad Buttons utility): 7479e1cbedeSMauro Carvalho Chehab 7489e1cbedeSMauro Carvalho Chehab - 0 - Related to "Volume down" key press 7499e1cbedeSMauro Carvalho Chehab - 1 - Related to "Volume up" key press 7509e1cbedeSMauro Carvalho Chehab - 2 - Related to "Mute on" key press 7519e1cbedeSMauro Carvalho Chehab - 3 - Related to "Access IBM" key press 7529e1cbedeSMauro Carvalho Chehab - 4 - Related to "LCD brightness up" key press 7539e1cbedeSMauro Carvalho Chehab - 5 - Related to "LCD brightness down" key press 7549e1cbedeSMauro Carvalho Chehab - 11 - Related to "toggle screen expansion" key press/function 7559e1cbedeSMauro Carvalho Chehab - 12 - Related to "ThinkLight on" 7569e1cbedeSMauro Carvalho Chehab - 13 - Related to "ThinkLight off" 7579e1cbedeSMauro Carvalho Chehab - 14 - Related to "ThinkLight" key press (toggle ThinkLight) 7589e1cbedeSMauro Carvalho Chehab 7599e1cbedeSMauro Carvalho ChehabThe cmos command interface is prone to firmware split-brain problems, as 7609e1cbedeSMauro Carvalho Chehabin newer ThinkPads it is just a compatibility layer. Do not use it, it is 7619e1cbedeSMauro Carvalho Chehabexported just as a debug tool. 7629e1cbedeSMauro Carvalho Chehab 7639e1cbedeSMauro Carvalho Chehab 7649e1cbedeSMauro Carvalho ChehabLED control 7659e1cbedeSMauro Carvalho Chehab----------- 7669e1cbedeSMauro Carvalho Chehab 7679e1cbedeSMauro Carvalho Chehabprocfs: /proc/acpi/ibm/led 7689e1cbedeSMauro Carvalho Chehabsysfs attributes: as per LED class, see below for names 7699e1cbedeSMauro Carvalho Chehab 7709e1cbedeSMauro Carvalho ChehabSome of the LED indicators can be controlled through this feature. On 7719e1cbedeSMauro Carvalho Chehabsome older ThinkPad models, it is possible to query the status of the 7729e1cbedeSMauro Carvalho ChehabLED indicators as well. Newer ThinkPads cannot query the real status 7739e1cbedeSMauro Carvalho Chehabof the LED indicators. 7749e1cbedeSMauro Carvalho Chehab 7759e1cbedeSMauro Carvalho ChehabBecause misuse of the LEDs could induce an unaware user to perform 7769e1cbedeSMauro Carvalho Chehabdangerous actions (like undocking or ejecting a bay device while the 7779e1cbedeSMauro Carvalho Chehabbuses are still active), or mask an important alarm (such as a nearly 7789e1cbedeSMauro Carvalho Chehabempty battery, or a broken battery), access to most LEDs is 7799e1cbedeSMauro Carvalho Chehabrestricted. 7809e1cbedeSMauro Carvalho Chehab 7819e1cbedeSMauro Carvalho ChehabUnrestricted access to all LEDs requires that thinkpad-acpi be 7829e1cbedeSMauro Carvalho Chehabcompiled with the CONFIG_THINKPAD_ACPI_UNSAFE_LEDS option enabled. 7839e1cbedeSMauro Carvalho ChehabDistributions must never enable this option. Individual users that 7849e1cbedeSMauro Carvalho Chehabare aware of the consequences are welcome to enabling it. 7859e1cbedeSMauro Carvalho Chehab 7869e1cbedeSMauro Carvalho ChehabAudio mute and microphone mute LEDs are supported, but currently not 7879e1cbedeSMauro Carvalho Chehabvisible to userspace. They are used by the snd-hda-intel audio driver. 7889e1cbedeSMauro Carvalho Chehab 7899e1cbedeSMauro Carvalho Chehabprocfs notes 7909e1cbedeSMauro Carvalho Chehab^^^^^^^^^^^^ 7919e1cbedeSMauro Carvalho Chehab 7929e1cbedeSMauro Carvalho ChehabThe available commands are:: 7939e1cbedeSMauro Carvalho Chehab 7949e1cbedeSMauro Carvalho Chehab echo '<LED number> on' >/proc/acpi/ibm/led 7959e1cbedeSMauro Carvalho Chehab echo '<LED number> off' >/proc/acpi/ibm/led 7969e1cbedeSMauro Carvalho Chehab echo '<LED number> blink' >/proc/acpi/ibm/led 7979e1cbedeSMauro Carvalho Chehab 7989e1cbedeSMauro Carvalho ChehabThe <LED number> range is 0 to 15. The set of LEDs that can be 7999e1cbedeSMauro Carvalho Chehabcontrolled varies from model to model. Here is the common ThinkPad 8009e1cbedeSMauro Carvalho Chehabmapping: 8019e1cbedeSMauro Carvalho Chehab 8029e1cbedeSMauro Carvalho Chehab - 0 - power 8039e1cbedeSMauro Carvalho Chehab - 1 - battery (orange) 8049e1cbedeSMauro Carvalho Chehab - 2 - battery (green) 8059e1cbedeSMauro Carvalho Chehab - 3 - UltraBase/dock 8069e1cbedeSMauro Carvalho Chehab - 4 - UltraBay 8079e1cbedeSMauro Carvalho Chehab - 5 - UltraBase battery slot 8089e1cbedeSMauro Carvalho Chehab - 6 - (unknown) 8099e1cbedeSMauro Carvalho Chehab - 7 - standby 8109e1cbedeSMauro Carvalho Chehab - 8 - dock status 1 8119e1cbedeSMauro Carvalho Chehab - 9 - dock status 2 8129e1cbedeSMauro Carvalho Chehab - 10, 11 - (unknown) 8139e1cbedeSMauro Carvalho Chehab - 12 - thinkvantage 8149e1cbedeSMauro Carvalho Chehab - 13, 14, 15 - (unknown) 8159e1cbedeSMauro Carvalho Chehab 8169e1cbedeSMauro Carvalho ChehabAll of the above can be turned on and off and can be made to blink. 8179e1cbedeSMauro Carvalho Chehab 8189e1cbedeSMauro Carvalho Chehabsysfs notes 8199e1cbedeSMauro Carvalho Chehab^^^^^^^^^^^ 8209e1cbedeSMauro Carvalho Chehab 8219e1cbedeSMauro Carvalho ChehabThe ThinkPad LED sysfs interface is described in detail by the LED class 8229e1cbedeSMauro Carvalho Chehabdocumentation, in Documentation/leds/leds-class.rst. 8239e1cbedeSMauro Carvalho Chehab 8249e1cbedeSMauro Carvalho ChehabThe LEDs are named (in LED ID order, from 0 to 12): 8259e1cbedeSMauro Carvalho Chehab"tpacpi::power", "tpacpi:orange:batt", "tpacpi:green:batt", 8269e1cbedeSMauro Carvalho Chehab"tpacpi::dock_active", "tpacpi::bay_active", "tpacpi::dock_batt", 8279e1cbedeSMauro Carvalho Chehab"tpacpi::unknown_led", "tpacpi::standby", "tpacpi::dock_status1", 8289e1cbedeSMauro Carvalho Chehab"tpacpi::dock_status2", "tpacpi::unknown_led2", "tpacpi::unknown_led3", 8299e1cbedeSMauro Carvalho Chehab"tpacpi::thinkvantage". 8309e1cbedeSMauro Carvalho Chehab 8319e1cbedeSMauro Carvalho ChehabDue to limitations in the sysfs LED class, if the status of the LED 8329e1cbedeSMauro Carvalho Chehabindicators cannot be read due to an error, thinkpad-acpi will report it as 8339e1cbedeSMauro Carvalho Chehaba brightness of zero (same as LED off). 8349e1cbedeSMauro Carvalho Chehab 8359e1cbedeSMauro Carvalho ChehabIf the thinkpad firmware doesn't support reading the current status, 8369e1cbedeSMauro Carvalho Chehabtrying to read the current LED brightness will just return whatever 8379e1cbedeSMauro Carvalho Chehabbrightness was last written to that attribute. 8389e1cbedeSMauro Carvalho Chehab 8399e1cbedeSMauro Carvalho ChehabThese LEDs can blink using hardware acceleration. To request that a 8409e1cbedeSMauro Carvalho ChehabThinkPad indicator LED should blink in hardware accelerated mode, use the 8419e1cbedeSMauro Carvalho Chehab"timer" trigger, and leave the delay_on and delay_off parameters set to 8429e1cbedeSMauro Carvalho Chehabzero (to request hardware acceleration autodetection). 8439e1cbedeSMauro Carvalho Chehab 8449e1cbedeSMauro Carvalho ChehabLEDs that are known not to exist in a given ThinkPad model are not 8459e1cbedeSMauro Carvalho Chehabmade available through the sysfs interface. If you have a dock and you 8469e1cbedeSMauro Carvalho Chehabnotice there are LEDs listed for your ThinkPad that do not exist (and 8479e1cbedeSMauro Carvalho Chehabare not in the dock), or if you notice that there are missing LEDs, 8489e1cbedeSMauro Carvalho Chehaba report to ibm-acpi-devel@lists.sourceforge.net is appreciated. 8499e1cbedeSMauro Carvalho Chehab 8509e1cbedeSMauro Carvalho Chehab 8519e1cbedeSMauro Carvalho ChehabACPI sounds -- /proc/acpi/ibm/beep 8529e1cbedeSMauro Carvalho Chehab---------------------------------- 8539e1cbedeSMauro Carvalho Chehab 8549e1cbedeSMauro Carvalho ChehabThe BEEP method is used internally by the ACPI firmware to provide 8559e1cbedeSMauro Carvalho Chehabaudible alerts in various situations. This feature allows the same 8569e1cbedeSMauro Carvalho Chehabsounds to be triggered manually. 8579e1cbedeSMauro Carvalho Chehab 8589e1cbedeSMauro Carvalho ChehabThe commands are non-negative integer numbers:: 8599e1cbedeSMauro Carvalho Chehab 8609e1cbedeSMauro Carvalho Chehab echo <number> >/proc/acpi/ibm/beep 8619e1cbedeSMauro Carvalho Chehab 8629e1cbedeSMauro Carvalho ChehabThe valid <number> range is 0 to 17. Not all numbers trigger sounds 8639e1cbedeSMauro Carvalho Chehaband the sounds vary from model to model. Here is the behavior on the 8649e1cbedeSMauro Carvalho ChehabX40: 8659e1cbedeSMauro Carvalho Chehab 8669e1cbedeSMauro Carvalho Chehab - 0 - stop a sound in progress (but use 17 to stop 16) 8679e1cbedeSMauro Carvalho Chehab - 2 - two beeps, pause, third beep ("low battery") 8689e1cbedeSMauro Carvalho Chehab - 3 - single beep 8699e1cbedeSMauro Carvalho Chehab - 4 - high, followed by low-pitched beep ("unable") 8709e1cbedeSMauro Carvalho Chehab - 5 - single beep 8719e1cbedeSMauro Carvalho Chehab - 6 - very high, followed by high-pitched beep ("AC/DC") 8729e1cbedeSMauro Carvalho Chehab - 7 - high-pitched beep 8739e1cbedeSMauro Carvalho Chehab - 9 - three short beeps 8749e1cbedeSMauro Carvalho Chehab - 10 - very long beep 8759e1cbedeSMauro Carvalho Chehab - 12 - low-pitched beep 8769e1cbedeSMauro Carvalho Chehab - 15 - three high-pitched beeps repeating constantly, stop with 0 8779e1cbedeSMauro Carvalho Chehab - 16 - one medium-pitched beep repeating constantly, stop with 17 8789e1cbedeSMauro Carvalho Chehab - 17 - stop 16 8799e1cbedeSMauro Carvalho Chehab 8809e1cbedeSMauro Carvalho Chehab 8819e1cbedeSMauro Carvalho ChehabTemperature sensors 8829e1cbedeSMauro Carvalho Chehab------------------- 8839e1cbedeSMauro Carvalho Chehab 8849e1cbedeSMauro Carvalho Chehabprocfs: /proc/acpi/ibm/thermal 8859e1cbedeSMauro Carvalho Chehab 8869e1cbedeSMauro Carvalho Chehabsysfs device attributes: (hwmon "thinkpad") temp*_input 8879e1cbedeSMauro Carvalho Chehab 8889e1cbedeSMauro Carvalho ChehabMost ThinkPads include six or more separate temperature sensors but only 8899e1cbedeSMauro Carvalho Chehabexpose the CPU temperature through the standard ACPI methods. This 8909e1cbedeSMauro Carvalho Chehabfeature shows readings from up to eight different sensors on older 8919e1cbedeSMauro Carvalho ChehabThinkPads, and up to sixteen different sensors on newer ThinkPads. 8929e1cbedeSMauro Carvalho Chehab 8939e1cbedeSMauro Carvalho ChehabFor example, on the X40, a typical output may be: 8949e1cbedeSMauro Carvalho Chehab 8959e1cbedeSMauro Carvalho Chehabtemperatures: 8969e1cbedeSMauro Carvalho Chehab 42 42 45 41 36 -128 33 -128 8979e1cbedeSMauro Carvalho Chehab 8989e1cbedeSMauro Carvalho ChehabOn the T43/p, a typical output may be: 8999e1cbedeSMauro Carvalho Chehab 9009e1cbedeSMauro Carvalho Chehabtemperatures: 9019e1cbedeSMauro Carvalho Chehab 48 48 36 52 38 -128 31 -128 48 52 48 -128 -128 -128 -128 -128 9029e1cbedeSMauro Carvalho Chehab 9039e1cbedeSMauro Carvalho ChehabThe mapping of thermal sensors to physical locations varies depending on 9049e1cbedeSMauro Carvalho Chehabsystem-board model (and thus, on ThinkPad model). 9059e1cbedeSMauro Carvalho Chehab 9069e1cbedeSMauro Carvalho Chehabhttp://thinkwiki.org/wiki/Thermal_Sensors is a public wiki page that 9079e1cbedeSMauro Carvalho Chehabtries to track down these locations for various models. 9089e1cbedeSMauro Carvalho Chehab 9099e1cbedeSMauro Carvalho ChehabMost (newer?) models seem to follow this pattern: 9109e1cbedeSMauro Carvalho Chehab 9119e1cbedeSMauro Carvalho Chehab- 1: CPU 9129e1cbedeSMauro Carvalho Chehab- 2: (depends on model) 9139e1cbedeSMauro Carvalho Chehab- 3: (depends on model) 9149e1cbedeSMauro Carvalho Chehab- 4: GPU 9159e1cbedeSMauro Carvalho Chehab- 5: Main battery: main sensor 9169e1cbedeSMauro Carvalho Chehab- 6: Bay battery: main sensor 9179e1cbedeSMauro Carvalho Chehab- 7: Main battery: secondary sensor 9189e1cbedeSMauro Carvalho Chehab- 8: Bay battery: secondary sensor 9199e1cbedeSMauro Carvalho Chehab- 9-15: (depends on model) 9209e1cbedeSMauro Carvalho Chehab 9219e1cbedeSMauro Carvalho ChehabFor the R51 (source: Thomas Gruber): 9229e1cbedeSMauro Carvalho Chehab 9239e1cbedeSMauro Carvalho Chehab- 2: Mini-PCI 9249e1cbedeSMauro Carvalho Chehab- 3: Internal HDD 9259e1cbedeSMauro Carvalho Chehab 9269e1cbedeSMauro Carvalho ChehabFor the T43, T43/p (source: Shmidoax/Thinkwiki.org) 9279e1cbedeSMauro Carvalho Chehabhttp://thinkwiki.org/wiki/Thermal_Sensors#ThinkPad_T43.2C_T43p 9289e1cbedeSMauro Carvalho Chehab 9299e1cbedeSMauro Carvalho Chehab- 2: System board, left side (near PCMCIA slot), reported as HDAPS temp 9309e1cbedeSMauro Carvalho Chehab- 3: PCMCIA slot 9319e1cbedeSMauro Carvalho Chehab- 9: MCH (northbridge) to DRAM Bus 9329e1cbedeSMauro Carvalho Chehab- 10: Clock-generator, mini-pci card and ICH (southbridge), under Mini-PCI 9339e1cbedeSMauro Carvalho Chehab card, under touchpad 9349e1cbedeSMauro Carvalho Chehab- 11: Power regulator, underside of system board, below F2 key 9359e1cbedeSMauro Carvalho Chehab 9369e1cbedeSMauro Carvalho ChehabThe A31 has a very atypical layout for the thermal sensors 9379e1cbedeSMauro Carvalho Chehab(source: Milos Popovic, http://thinkwiki.org/wiki/Thermal_Sensors#ThinkPad_A31) 9389e1cbedeSMauro Carvalho Chehab 9399e1cbedeSMauro Carvalho Chehab- 1: CPU 9409e1cbedeSMauro Carvalho Chehab- 2: Main Battery: main sensor 9419e1cbedeSMauro Carvalho Chehab- 3: Power Converter 9429e1cbedeSMauro Carvalho Chehab- 4: Bay Battery: main sensor 9439e1cbedeSMauro Carvalho Chehab- 5: MCH (northbridge) 9449e1cbedeSMauro Carvalho Chehab- 6: PCMCIA/ambient 9459e1cbedeSMauro Carvalho Chehab- 7: Main Battery: secondary sensor 9469e1cbedeSMauro Carvalho Chehab- 8: Bay Battery: secondary sensor 9479e1cbedeSMauro Carvalho Chehab 9489e1cbedeSMauro Carvalho Chehab 9499e1cbedeSMauro Carvalho ChehabProcfs notes 9509e1cbedeSMauro Carvalho Chehab^^^^^^^^^^^^ 9519e1cbedeSMauro Carvalho Chehab 9529e1cbedeSMauro Carvalho Chehab Readings from sensors that are not available return -128. 9539e1cbedeSMauro Carvalho Chehab No commands can be written to this file. 9549e1cbedeSMauro Carvalho Chehab 9559e1cbedeSMauro Carvalho ChehabSysfs notes 9569e1cbedeSMauro Carvalho Chehab^^^^^^^^^^^ 9579e1cbedeSMauro Carvalho Chehab 9589e1cbedeSMauro Carvalho Chehab Sensors that are not available return the ENXIO error. This 9599e1cbedeSMauro Carvalho Chehab status may change at runtime, as there are hotplug thermal 9609e1cbedeSMauro Carvalho Chehab sensors, like those inside the batteries and docks. 9619e1cbedeSMauro Carvalho Chehab 9629e1cbedeSMauro Carvalho Chehab thinkpad-acpi thermal sensors are reported through the hwmon 9639e1cbedeSMauro Carvalho Chehab subsystem, and follow all of the hwmon guidelines at 9649e1cbedeSMauro Carvalho Chehab Documentation/hwmon. 9659e1cbedeSMauro Carvalho Chehab 9669e1cbedeSMauro Carvalho ChehabEXPERIMENTAL: Embedded controller register dump 9679e1cbedeSMauro Carvalho Chehab----------------------------------------------- 9689e1cbedeSMauro Carvalho Chehab 9699e1cbedeSMauro Carvalho ChehabThis feature is not included in the thinkpad driver anymore. 9709e1cbedeSMauro Carvalho ChehabInstead the EC can be accessed through /sys/kernel/debug/ec with 9719e1cbedeSMauro Carvalho Chehaba userspace tool which can be found here: 9729e1cbedeSMauro Carvalho Chehabftp://ftp.suse.com/pub/people/trenn/sources/ec 9739e1cbedeSMauro Carvalho Chehab 9749e1cbedeSMauro Carvalho ChehabUse it to determine the register holding the fan 9759e1cbedeSMauro Carvalho Chehabspeed on some models. To do that, do the following: 9769e1cbedeSMauro Carvalho Chehab 9779e1cbedeSMauro Carvalho Chehab - make sure the battery is fully charged 9789e1cbedeSMauro Carvalho Chehab - make sure the fan is running 9799e1cbedeSMauro Carvalho Chehab - use above mentioned tool to read out the EC 9809e1cbedeSMauro Carvalho Chehab 9819e1cbedeSMauro Carvalho ChehabOften fan and temperature values vary between 9829e1cbedeSMauro Carvalho Chehabreadings. Since temperatures don't change vary fast, you can take 9839e1cbedeSMauro Carvalho Chehabseveral quick dumps to eliminate them. 9849e1cbedeSMauro Carvalho Chehab 9859e1cbedeSMauro Carvalho ChehabYou can use a similar method to figure out the meaning of other 9869e1cbedeSMauro Carvalho Chehabembedded controller registers - e.g. make sure nothing else changes 9879e1cbedeSMauro Carvalho Chehabexcept the charging or discharging battery to determine which 9889e1cbedeSMauro Carvalho Chehabregisters contain the current battery capacity, etc. If you experiment 9899e1cbedeSMauro Carvalho Chehabwith this, do send me your results (including some complete dumps with 9909e1cbedeSMauro Carvalho Chehaba description of the conditions when they were taken.) 9919e1cbedeSMauro Carvalho Chehab 9929e1cbedeSMauro Carvalho Chehab 9939e1cbedeSMauro Carvalho ChehabLCD brightness control 9949e1cbedeSMauro Carvalho Chehab---------------------- 9959e1cbedeSMauro Carvalho Chehab 9969e1cbedeSMauro Carvalho Chehabprocfs: /proc/acpi/ibm/brightness 9979e1cbedeSMauro Carvalho Chehab 9989e1cbedeSMauro Carvalho Chehabsysfs backlight device "thinkpad_screen" 9999e1cbedeSMauro Carvalho Chehab 10009e1cbedeSMauro Carvalho ChehabThis feature allows software control of the LCD brightness on ThinkPad 10019e1cbedeSMauro Carvalho Chehabmodels which don't have a hardware brightness slider. 10029e1cbedeSMauro Carvalho Chehab 10039e1cbedeSMauro Carvalho ChehabIt has some limitations: the LCD backlight cannot be actually turned 10049e1cbedeSMauro Carvalho Chehabon or off by this interface, it just controls the backlight brightness 10059e1cbedeSMauro Carvalho Chehablevel. 10069e1cbedeSMauro Carvalho Chehab 10079e1cbedeSMauro Carvalho ChehabOn IBM (and some of the earlier Lenovo) ThinkPads, the backlight control 10089e1cbedeSMauro Carvalho Chehabhas eight brightness levels, ranging from 0 to 7. Some of the levels 10099e1cbedeSMauro Carvalho Chehabmay not be distinct. Later Lenovo models that implement the ACPI 10109e1cbedeSMauro Carvalho Chehabdisplay backlight brightness control methods have 16 levels, ranging 10119e1cbedeSMauro Carvalho Chehabfrom 0 to 15. 10129e1cbedeSMauro Carvalho Chehab 10139e1cbedeSMauro Carvalho ChehabFor IBM ThinkPads, there are two interfaces to the firmware for direct 10149e1cbedeSMauro Carvalho Chehabbrightness control, EC and UCMS (or CMOS). To select which one should be 10159e1cbedeSMauro Carvalho Chehabused, use the brightness_mode module parameter: brightness_mode=1 selects 10169e1cbedeSMauro Carvalho ChehabEC mode, brightness_mode=2 selects UCMS mode, brightness_mode=3 selects EC 10179e1cbedeSMauro Carvalho Chehabmode with NVRAM backing (so that brightness changes are remembered across 10189e1cbedeSMauro Carvalho Chehabshutdown/reboot). 10199e1cbedeSMauro Carvalho Chehab 10209e1cbedeSMauro Carvalho ChehabThe driver tries to select which interface to use from a table of 10219e1cbedeSMauro Carvalho Chehabdefaults for each ThinkPad model. If it makes a wrong choice, please 10229e1cbedeSMauro Carvalho Chehabreport this as a bug, so that we can fix it. 10239e1cbedeSMauro Carvalho Chehab 10249e1cbedeSMauro Carvalho ChehabLenovo ThinkPads only support brightness_mode=2 (UCMS). 10259e1cbedeSMauro Carvalho Chehab 10269e1cbedeSMauro Carvalho ChehabWhen display backlight brightness controls are available through the 10279e1cbedeSMauro Carvalho Chehabstandard ACPI interface, it is best to use it instead of this direct 10289e1cbedeSMauro Carvalho ChehabThinkPad-specific interface. The driver will disable its native 10299e1cbedeSMauro Carvalho Chehabbacklight brightness control interface if it detects that the standard 10309e1cbedeSMauro Carvalho ChehabACPI interface is available in the ThinkPad. 10319e1cbedeSMauro Carvalho Chehab 10329e1cbedeSMauro Carvalho ChehabIf you want to use the thinkpad-acpi backlight brightness control 10339e1cbedeSMauro Carvalho Chehabinstead of the generic ACPI video backlight brightness control for some 10349e1cbedeSMauro Carvalho Chehabreason, you should use the acpi_backlight=vendor kernel parameter. 10359e1cbedeSMauro Carvalho Chehab 10369e1cbedeSMauro Carvalho ChehabThe brightness_enable module parameter can be used to control whether 10379e1cbedeSMauro Carvalho Chehabthe LCD brightness control feature will be enabled when available. 10389e1cbedeSMauro Carvalho Chehabbrightness_enable=0 forces it to be disabled. brightness_enable=1 10399e1cbedeSMauro Carvalho Chehabforces it to be enabled when available, even if the standard ACPI 10409e1cbedeSMauro Carvalho Chehabinterface is also available. 10419e1cbedeSMauro Carvalho Chehab 10429e1cbedeSMauro Carvalho ChehabProcfs notes 10439e1cbedeSMauro Carvalho Chehab^^^^^^^^^^^^ 10449e1cbedeSMauro Carvalho Chehab 10459e1cbedeSMauro Carvalho ChehabThe available commands are:: 10469e1cbedeSMauro Carvalho Chehab 10479e1cbedeSMauro Carvalho Chehab echo up >/proc/acpi/ibm/brightness 10489e1cbedeSMauro Carvalho Chehab echo down >/proc/acpi/ibm/brightness 10499e1cbedeSMauro Carvalho Chehab echo 'level <level>' >/proc/acpi/ibm/brightness 10509e1cbedeSMauro Carvalho Chehab 10519e1cbedeSMauro Carvalho ChehabSysfs notes 10529e1cbedeSMauro Carvalho Chehab^^^^^^^^^^^ 10539e1cbedeSMauro Carvalho Chehab 10549e1cbedeSMauro Carvalho ChehabThe interface is implemented through the backlight sysfs class, which is 10559e1cbedeSMauro Carvalho Chehabpoorly documented at this time. 10569e1cbedeSMauro Carvalho Chehab 10579e1cbedeSMauro Carvalho ChehabLocate the thinkpad_screen device under /sys/class/backlight, and inside 10589e1cbedeSMauro Carvalho Chehabit there will be the following attributes: 10599e1cbedeSMauro Carvalho Chehab 10609e1cbedeSMauro Carvalho Chehab max_brightness: 10619e1cbedeSMauro Carvalho Chehab Reads the maximum brightness the hardware can be set to. 10629e1cbedeSMauro Carvalho Chehab The minimum is always zero. 10639e1cbedeSMauro Carvalho Chehab 10649e1cbedeSMauro Carvalho Chehab actual_brightness: 10659e1cbedeSMauro Carvalho Chehab Reads what brightness the screen is set to at this instant. 10669e1cbedeSMauro Carvalho Chehab 10679e1cbedeSMauro Carvalho Chehab brightness: 10689e1cbedeSMauro Carvalho Chehab Writes request the driver to change brightness to the 10699e1cbedeSMauro Carvalho Chehab given value. Reads will tell you what brightness the 10709e1cbedeSMauro Carvalho Chehab driver is trying to set the display to when "power" is set 10719e1cbedeSMauro Carvalho Chehab to zero and the display has not been dimmed by a kernel 10729e1cbedeSMauro Carvalho Chehab power management event. 10739e1cbedeSMauro Carvalho Chehab 10749e1cbedeSMauro Carvalho Chehab power: 10759e1cbedeSMauro Carvalho Chehab power management mode, where 0 is "display on", and 1 to 3 10769e1cbedeSMauro Carvalho Chehab will dim the display backlight to brightness level 0 10779e1cbedeSMauro Carvalho Chehab because thinkpad-acpi cannot really turn the backlight 10789e1cbedeSMauro Carvalho Chehab off. Kernel power management events can temporarily 10799e1cbedeSMauro Carvalho Chehab increase the current power management level, i.e. they can 10809e1cbedeSMauro Carvalho Chehab dim the display. 10819e1cbedeSMauro Carvalho Chehab 10829e1cbedeSMauro Carvalho Chehab 10839e1cbedeSMauro Carvalho ChehabWARNING: 10849e1cbedeSMauro Carvalho Chehab 10859e1cbedeSMauro Carvalho Chehab Whatever you do, do NOT ever call thinkpad-acpi backlight-level change 10869e1cbedeSMauro Carvalho Chehab interface and the ACPI-based backlight level change interface 10879e1cbedeSMauro Carvalho Chehab (available on newer BIOSes, and driven by the Linux ACPI video driver) 10889e1cbedeSMauro Carvalho Chehab at the same time. The two will interact in bad ways, do funny things, 10899e1cbedeSMauro Carvalho Chehab and maybe reduce the life of the backlight lamps by needlessly kicking 10909e1cbedeSMauro Carvalho Chehab its level up and down at every change. 10919e1cbedeSMauro Carvalho Chehab 10929e1cbedeSMauro Carvalho Chehab 10939e1cbedeSMauro Carvalho ChehabVolume control (Console Audio control) 10949e1cbedeSMauro Carvalho Chehab-------------------------------------- 10959e1cbedeSMauro Carvalho Chehab 10969e1cbedeSMauro Carvalho Chehabprocfs: /proc/acpi/ibm/volume 10979e1cbedeSMauro Carvalho Chehab 10989e1cbedeSMauro Carvalho ChehabALSA: "ThinkPad Console Audio Control", default ID: "ThinkPadEC" 10999e1cbedeSMauro Carvalho Chehab 11009e1cbedeSMauro Carvalho ChehabNOTE: by default, the volume control interface operates in read-only 11019e1cbedeSMauro Carvalho Chehabmode, as it is supposed to be used for on-screen-display purposes. 11029e1cbedeSMauro Carvalho ChehabThe read/write mode can be enabled through the use of the 11039e1cbedeSMauro Carvalho Chehab"volume_control=1" module parameter. 11049e1cbedeSMauro Carvalho Chehab 11059e1cbedeSMauro Carvalho ChehabNOTE: distros are urged to not enable volume_control by default, this 11069e1cbedeSMauro Carvalho Chehabshould be done by the local admin only. The ThinkPad UI is for the 11079e1cbedeSMauro Carvalho Chehabconsole audio control to be done through the volume keys only, and for 11089e1cbedeSMauro Carvalho Chehabthe desktop environment to just provide on-screen-display feedback. 11099e1cbedeSMauro Carvalho ChehabSoftware volume control should be done only in the main AC97/HDA 11109e1cbedeSMauro Carvalho Chehabmixer. 11119e1cbedeSMauro Carvalho Chehab 11129e1cbedeSMauro Carvalho Chehab 11139e1cbedeSMauro Carvalho ChehabAbout the ThinkPad Console Audio control 11149e1cbedeSMauro Carvalho Chehab^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 11159e1cbedeSMauro Carvalho Chehab 11169e1cbedeSMauro Carvalho ChehabThinkPads have a built-in amplifier and muting circuit that drives the 11179e1cbedeSMauro Carvalho Chehabconsole headphone and speakers. This circuit is after the main AC97 11189e1cbedeSMauro Carvalho Chehabor HDA mixer in the audio path, and under exclusive control of the 11199e1cbedeSMauro Carvalho Chehabfirmware. 11209e1cbedeSMauro Carvalho Chehab 11219e1cbedeSMauro Carvalho ChehabThinkPads have three special hotkeys to interact with the console 11229e1cbedeSMauro Carvalho Chehabaudio control: volume up, volume down and mute. 11239e1cbedeSMauro Carvalho Chehab 11249e1cbedeSMauro Carvalho ChehabIt is worth noting that the normal way the mute function works (on 11259e1cbedeSMauro Carvalho ChehabThinkPads that do not have a "mute LED") is: 11269e1cbedeSMauro Carvalho Chehab 11279e1cbedeSMauro Carvalho Chehab1. Press mute to mute. It will *always* mute, you can press it as 11289e1cbedeSMauro Carvalho Chehab many times as you want, and the sound will remain mute. 11299e1cbedeSMauro Carvalho Chehab 11309e1cbedeSMauro Carvalho Chehab2. Press either volume key to unmute the ThinkPad (it will _not_ 11319e1cbedeSMauro Carvalho Chehab change the volume, it will just unmute). 11329e1cbedeSMauro Carvalho Chehab 11339e1cbedeSMauro Carvalho ChehabThis is a very superior design when compared to the cheap software-only 11349e1cbedeSMauro Carvalho Chehabmute-toggle solution found on normal consumer laptops: you can be 11359e1cbedeSMauro Carvalho Chehababsolutely sure the ThinkPad will not make noise if you press the mute 11369e1cbedeSMauro Carvalho Chehabbutton, no matter the previous state. 11379e1cbedeSMauro Carvalho Chehab 11389e1cbedeSMauro Carvalho ChehabThe IBM ThinkPads, and the earlier Lenovo ThinkPads have variable-gain 11399e1cbedeSMauro Carvalho Chehabamplifiers driving the speakers and headphone output, and the firmware 11409e1cbedeSMauro Carvalho Chehabalso handles volume control for the headphone and speakers on these 11419e1cbedeSMauro Carvalho ChehabThinkPads without any help from the operating system (this volume 11429e1cbedeSMauro Carvalho Chehabcontrol stage exists after the main AC97 or HDA mixer in the audio 11439e1cbedeSMauro Carvalho Chehabpath). 11449e1cbedeSMauro Carvalho Chehab 11459e1cbedeSMauro Carvalho ChehabThe newer Lenovo models only have firmware mute control, and depend on 11469e1cbedeSMauro Carvalho Chehabthe main HDA mixer to do volume control (which is done by the operating 11479e1cbedeSMauro Carvalho Chehabsystem). In this case, the volume keys are filtered out for unmute 11489e1cbedeSMauro Carvalho Chehabkey press (there are some firmware bugs in this area) and delivered as 11499e1cbedeSMauro Carvalho Chehabnormal key presses to the operating system (thinkpad-acpi is not 11509e1cbedeSMauro Carvalho Chehabinvolved). 11519e1cbedeSMauro Carvalho Chehab 11529e1cbedeSMauro Carvalho Chehab 11539e1cbedeSMauro Carvalho ChehabThe ThinkPad-ACPI volume control 11549e1cbedeSMauro Carvalho Chehab^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 11559e1cbedeSMauro Carvalho Chehab 11569e1cbedeSMauro Carvalho ChehabThe preferred way to interact with the Console Audio control is the 11579e1cbedeSMauro Carvalho ChehabALSA interface. 11589e1cbedeSMauro Carvalho Chehab 11599e1cbedeSMauro Carvalho ChehabThe legacy procfs interface allows one to read the current state, 11609e1cbedeSMauro Carvalho Chehaband if volume control is enabled, accepts the following commands:: 11619e1cbedeSMauro Carvalho Chehab 11629e1cbedeSMauro Carvalho Chehab echo up >/proc/acpi/ibm/volume 11639e1cbedeSMauro Carvalho Chehab echo down >/proc/acpi/ibm/volume 11649e1cbedeSMauro Carvalho Chehab echo mute >/proc/acpi/ibm/volume 11659e1cbedeSMauro Carvalho Chehab echo unmute >/proc/acpi/ibm/volume 11669e1cbedeSMauro Carvalho Chehab echo 'level <level>' >/proc/acpi/ibm/volume 11679e1cbedeSMauro Carvalho Chehab 11689e1cbedeSMauro Carvalho ChehabThe <level> number range is 0 to 14 although not all of them may be 11699e1cbedeSMauro Carvalho Chehabdistinct. To unmute the volume after the mute command, use either the 11709e1cbedeSMauro Carvalho Chehabup or down command (the level command will not unmute the volume), or 11719e1cbedeSMauro Carvalho Chehabthe unmute command. 11729e1cbedeSMauro Carvalho Chehab 11739e1cbedeSMauro Carvalho ChehabYou can use the volume_capabilities parameter to tell the driver 11749e1cbedeSMauro Carvalho Chehabwhether your thinkpad has volume control or mute-only control: 11759e1cbedeSMauro Carvalho Chehabvolume_capabilities=1 for mixers with mute and volume control, 11769e1cbedeSMauro Carvalho Chehabvolume_capabilities=2 for mixers with only mute control. 11779e1cbedeSMauro Carvalho Chehab 11789e1cbedeSMauro Carvalho ChehabIf the driver misdetects the capabilities for your ThinkPad model, 11799e1cbedeSMauro Carvalho Chehabplease report this to ibm-acpi-devel@lists.sourceforge.net, so that we 11809e1cbedeSMauro Carvalho Chehabcan update the driver. 11819e1cbedeSMauro Carvalho Chehab 11829e1cbedeSMauro Carvalho ChehabThere are two strategies for volume control. To select which one 11839e1cbedeSMauro Carvalho Chehabshould be used, use the volume_mode module parameter: volume_mode=1 11849e1cbedeSMauro Carvalho Chehabselects EC mode, and volume_mode=3 selects EC mode with NVRAM backing 11859e1cbedeSMauro Carvalho Chehab(so that volume/mute changes are remembered across shutdown/reboot). 11869e1cbedeSMauro Carvalho Chehab 11879e1cbedeSMauro Carvalho ChehabThe driver will operate in volume_mode=3 by default. If that does not 11889e1cbedeSMauro Carvalho Chehabwork well on your ThinkPad model, please report this to 11899e1cbedeSMauro Carvalho Chehabibm-acpi-devel@lists.sourceforge.net. 11909e1cbedeSMauro Carvalho Chehab 11919e1cbedeSMauro Carvalho ChehabThe driver supports the standard ALSA module parameters. If the ALSA 11929e1cbedeSMauro Carvalho Chehabmixer is disabled, the driver will disable all volume functionality. 11939e1cbedeSMauro Carvalho Chehab 11949e1cbedeSMauro Carvalho Chehab 11959e1cbedeSMauro Carvalho ChehabFan control and monitoring: fan speed, fan enable/disable 11969e1cbedeSMauro Carvalho Chehab--------------------------------------------------------- 11979e1cbedeSMauro Carvalho Chehab 11989e1cbedeSMauro Carvalho Chehabprocfs: /proc/acpi/ibm/fan 11999e1cbedeSMauro Carvalho Chehab 12009e1cbedeSMauro Carvalho Chehabsysfs device attributes: (hwmon "thinkpad") fan1_input, pwm1, pwm1_enable, fan2_input 12019e1cbedeSMauro Carvalho Chehab 12029e1cbedeSMauro Carvalho Chehabsysfs hwmon driver attributes: fan_watchdog 12039e1cbedeSMauro Carvalho Chehab 12049e1cbedeSMauro Carvalho ChehabNOTE NOTE NOTE: 12059e1cbedeSMauro Carvalho Chehab fan control operations are disabled by default for 12069e1cbedeSMauro Carvalho Chehab safety reasons. To enable them, the module parameter "fan_control=1" 12079e1cbedeSMauro Carvalho Chehab must be given to thinkpad-acpi. 12089e1cbedeSMauro Carvalho Chehab 12099e1cbedeSMauro Carvalho ChehabThis feature attempts to show the current fan speed, control mode and 12109e1cbedeSMauro Carvalho Chehabother fan data that might be available. The speed is read directly 12119e1cbedeSMauro Carvalho Chehabfrom the hardware registers of the embedded controller. This is known 12129e1cbedeSMauro Carvalho Chehabto work on later R, T, X and Z series ThinkPads but may show a bogus 12139e1cbedeSMauro Carvalho Chehabvalue on other models. 12149e1cbedeSMauro Carvalho Chehab 12159e1cbedeSMauro Carvalho ChehabSome Lenovo ThinkPads support a secondary fan. This fan cannot be 12169e1cbedeSMauro Carvalho Chehabcontrolled separately, it shares the main fan control. 12179e1cbedeSMauro Carvalho Chehab 12189e1cbedeSMauro Carvalho ChehabFan levels 12199e1cbedeSMauro Carvalho Chehab^^^^^^^^^^ 12209e1cbedeSMauro Carvalho Chehab 12219e1cbedeSMauro Carvalho ChehabMost ThinkPad fans work in "levels" at the firmware interface. Level 0 12229e1cbedeSMauro Carvalho Chehabstops the fan. The higher the level, the higher the fan speed, although 12239e1cbedeSMauro Carvalho Chehabadjacent levels often map to the same fan speed. 7 is the highest 12249e1cbedeSMauro Carvalho Chehablevel, where the fan reaches the maximum recommended speed. 12259e1cbedeSMauro Carvalho Chehab 12269e1cbedeSMauro Carvalho ChehabLevel "auto" means the EC changes the fan level according to some 12279e1cbedeSMauro Carvalho Chehabinternal algorithm, usually based on readings from the thermal sensors. 12289e1cbedeSMauro Carvalho Chehab 12299e1cbedeSMauro Carvalho ChehabThere is also a "full-speed" level, also known as "disengaged" level. 12309e1cbedeSMauro Carvalho ChehabIn this level, the EC disables the speed-locked closed-loop fan control, 12319e1cbedeSMauro Carvalho Chehaband drives the fan as fast as it can go, which might exceed hardware 12329e1cbedeSMauro Carvalho Chehablimits, so use this level with caution. 12339e1cbedeSMauro Carvalho Chehab 12349e1cbedeSMauro Carvalho ChehabThe fan usually ramps up or down slowly from one speed to another, and 12359e1cbedeSMauro Carvalho Chehabit is normal for the EC to take several seconds to react to fan 12369e1cbedeSMauro Carvalho Chehabcommands. The full-speed level may take up to two minutes to ramp up to 12379e1cbedeSMauro Carvalho Chehabmaximum speed, and in some ThinkPads, the tachometer readings go stale 12389e1cbedeSMauro Carvalho Chehabwhile the EC is transitioning to the full-speed level. 12399e1cbedeSMauro Carvalho Chehab 12409e1cbedeSMauro Carvalho ChehabWARNING WARNING WARNING: do not leave the fan disabled unless you are 12419e1cbedeSMauro Carvalho Chehabmonitoring all of the temperature sensor readings and you are ready to 12429e1cbedeSMauro Carvalho Chehabenable it if necessary to avoid overheating. 12439e1cbedeSMauro Carvalho Chehab 12449e1cbedeSMauro Carvalho ChehabAn enabled fan in level "auto" may stop spinning if the EC decides the 12459e1cbedeSMauro Carvalho ChehabThinkPad is cool enough and doesn't need the extra airflow. This is 12469e1cbedeSMauro Carvalho Chehabnormal, and the EC will spin the fan up if the various thermal readings 12479e1cbedeSMauro Carvalho Chehabrise too much. 12489e1cbedeSMauro Carvalho Chehab 12499e1cbedeSMauro Carvalho ChehabOn the X40, this seems to depend on the CPU and HDD temperatures. 12509e1cbedeSMauro Carvalho ChehabSpecifically, the fan is turned on when either the CPU temperature 12519e1cbedeSMauro Carvalho Chehabclimbs to 56 degrees or the HDD temperature climbs to 46 degrees. The 12529e1cbedeSMauro Carvalho Chehabfan is turned off when the CPU temperature drops to 49 degrees and the 12539e1cbedeSMauro Carvalho ChehabHDD temperature drops to 41 degrees. These thresholds cannot 12549e1cbedeSMauro Carvalho Chehabcurrently be controlled. 12559e1cbedeSMauro Carvalho Chehab 12569e1cbedeSMauro Carvalho ChehabThe ThinkPad's ACPI DSDT code will reprogram the fan on its own when 12579e1cbedeSMauro Carvalho Chehabcertain conditions are met. It will override any fan programming done 12589e1cbedeSMauro Carvalho Chehabthrough thinkpad-acpi. 12599e1cbedeSMauro Carvalho Chehab 12609e1cbedeSMauro Carvalho ChehabThe thinkpad-acpi kernel driver can be programmed to revert the fan 12619e1cbedeSMauro Carvalho Chehablevel to a safe setting if userspace does not issue one of the procfs 12629e1cbedeSMauro Carvalho Chehabfan commands: "enable", "disable", "level" or "watchdog", or if there 12639e1cbedeSMauro Carvalho Chehabare no writes to pwm1_enable (or to pwm1 *if and only if* pwm1_enable is 12649e1cbedeSMauro Carvalho Chehabset to 1, manual mode) within a configurable amount of time of up to 12659e1cbedeSMauro Carvalho Chehab120 seconds. This functionality is called fan safety watchdog. 12669e1cbedeSMauro Carvalho Chehab 12679e1cbedeSMauro Carvalho ChehabNote that the watchdog timer stops after it enables the fan. It will be 12689e1cbedeSMauro Carvalho Chehabrearmed again automatically (using the same interval) when one of the 12699e1cbedeSMauro Carvalho Chehababove mentioned fan commands is received. The fan watchdog is, 12709e1cbedeSMauro Carvalho Chehabtherefore, not suitable to protect against fan mode changes made through 12719e1cbedeSMauro Carvalho Chehabmeans other than the "enable", "disable", and "level" procfs fan 12729e1cbedeSMauro Carvalho Chehabcommands, or the hwmon fan control sysfs interface. 12739e1cbedeSMauro Carvalho Chehab 12749e1cbedeSMauro Carvalho ChehabProcfs notes 12759e1cbedeSMauro Carvalho Chehab^^^^^^^^^^^^ 12769e1cbedeSMauro Carvalho Chehab 12779e1cbedeSMauro Carvalho ChehabThe fan may be enabled or disabled with the following commands:: 12789e1cbedeSMauro Carvalho Chehab 12799e1cbedeSMauro Carvalho Chehab echo enable >/proc/acpi/ibm/fan 12809e1cbedeSMauro Carvalho Chehab echo disable >/proc/acpi/ibm/fan 12819e1cbedeSMauro Carvalho Chehab 12829e1cbedeSMauro Carvalho ChehabPlacing a fan on level 0 is the same as disabling it. Enabling a fan 12839e1cbedeSMauro Carvalho Chehabwill try to place it in a safe level if it is too slow or disabled. 12849e1cbedeSMauro Carvalho Chehab 12859e1cbedeSMauro Carvalho ChehabThe fan level can be controlled with the command:: 12869e1cbedeSMauro Carvalho Chehab 12879e1cbedeSMauro Carvalho Chehab echo 'level <level>' > /proc/acpi/ibm/fan 12889e1cbedeSMauro Carvalho Chehab 12899e1cbedeSMauro Carvalho ChehabWhere <level> is an integer from 0 to 7, or one of the words "auto" or 12909e1cbedeSMauro Carvalho Chehab"full-speed" (without the quotes). Not all ThinkPads support the "auto" 12919e1cbedeSMauro Carvalho Chehaband "full-speed" levels. The driver accepts "disengaged" as an alias for 12929e1cbedeSMauro Carvalho Chehab"full-speed", and reports it as "disengaged" for backwards 12939e1cbedeSMauro Carvalho Chehabcompatibility. 12949e1cbedeSMauro Carvalho Chehab 12959e1cbedeSMauro Carvalho ChehabOn the X31 and X40 (and ONLY on those models), the fan speed can be 12969e1cbedeSMauro Carvalho Chehabcontrolled to a certain degree. Once the fan is running, it can be 12979e1cbedeSMauro Carvalho Chehabforced to run faster or slower with the following command:: 12989e1cbedeSMauro Carvalho Chehab 12999e1cbedeSMauro Carvalho Chehab echo 'speed <speed>' > /proc/acpi/ibm/fan 13009e1cbedeSMauro Carvalho Chehab 13019e1cbedeSMauro Carvalho ChehabThe sustainable range of fan speeds on the X40 appears to be from about 13029e1cbedeSMauro Carvalho Chehab3700 to about 7350. Values outside this range either do not have any 13039e1cbedeSMauro Carvalho Chehabeffect or the fan speed eventually settles somewhere in that range. The 13049e1cbedeSMauro Carvalho Chehabfan cannot be stopped or started with this command. This functionality 13059e1cbedeSMauro Carvalho Chehabis incomplete, and not available through the sysfs interface. 13069e1cbedeSMauro Carvalho Chehab 13079e1cbedeSMauro Carvalho ChehabTo program the safety watchdog, use the "watchdog" command:: 13089e1cbedeSMauro Carvalho Chehab 13099e1cbedeSMauro Carvalho Chehab echo 'watchdog <interval in seconds>' > /proc/acpi/ibm/fan 13109e1cbedeSMauro Carvalho Chehab 13119e1cbedeSMauro Carvalho ChehabIf you want to disable the watchdog, use 0 as the interval. 13129e1cbedeSMauro Carvalho Chehab 13139e1cbedeSMauro Carvalho ChehabSysfs notes 13149e1cbedeSMauro Carvalho Chehab^^^^^^^^^^^ 13159e1cbedeSMauro Carvalho Chehab 13169e1cbedeSMauro Carvalho ChehabThe sysfs interface follows the hwmon subsystem guidelines for the most 13179e1cbedeSMauro Carvalho Chehabpart, and the exception is the fan safety watchdog. 13189e1cbedeSMauro Carvalho Chehab 13199e1cbedeSMauro Carvalho ChehabWrites to any of the sysfs attributes may return the EINVAL error if 13209e1cbedeSMauro Carvalho Chehabthat operation is not supported in a given ThinkPad or if the parameter 13219e1cbedeSMauro Carvalho Chehabis out-of-bounds, and EPERM if it is forbidden. They may also return 13229e1cbedeSMauro Carvalho ChehabEINTR (interrupted system call), and EIO (I/O error while trying to talk 13239e1cbedeSMauro Carvalho Chehabto the firmware). 13249e1cbedeSMauro Carvalho Chehab 13259e1cbedeSMauro Carvalho ChehabFeatures not yet implemented by the driver return ENOSYS. 13269e1cbedeSMauro Carvalho Chehab 13279e1cbedeSMauro Carvalho Chehabhwmon device attribute pwm1_enable: 13289e1cbedeSMauro Carvalho Chehab - 0: PWM offline (fan is set to full-speed mode) 13299e1cbedeSMauro Carvalho Chehab - 1: Manual PWM control (use pwm1 to set fan level) 13309e1cbedeSMauro Carvalho Chehab - 2: Hardware PWM control (EC "auto" mode) 13319e1cbedeSMauro Carvalho Chehab - 3: reserved (Software PWM control, not implemented yet) 13329e1cbedeSMauro Carvalho Chehab 13339e1cbedeSMauro Carvalho Chehab Modes 0 and 2 are not supported by all ThinkPads, and the 13349e1cbedeSMauro Carvalho Chehab driver is not always able to detect this. If it does know a 13359e1cbedeSMauro Carvalho Chehab mode is unsupported, it will return -EINVAL. 13369e1cbedeSMauro Carvalho Chehab 13379e1cbedeSMauro Carvalho Chehabhwmon device attribute pwm1: 13389e1cbedeSMauro Carvalho Chehab Fan level, scaled from the firmware values of 0-7 to the hwmon 13399e1cbedeSMauro Carvalho Chehab scale of 0-255. 0 means fan stopped, 255 means highest normal 13409e1cbedeSMauro Carvalho Chehab speed (level 7). 13419e1cbedeSMauro Carvalho Chehab 13429e1cbedeSMauro Carvalho Chehab This attribute only commands the fan if pmw1_enable is set to 1 13439e1cbedeSMauro Carvalho Chehab (manual PWM control). 13449e1cbedeSMauro Carvalho Chehab 13459e1cbedeSMauro Carvalho Chehabhwmon device attribute fan1_input: 13469e1cbedeSMauro Carvalho Chehab Fan tachometer reading, in RPM. May go stale on certain 13479e1cbedeSMauro Carvalho Chehab ThinkPads while the EC transitions the PWM to offline mode, 13489e1cbedeSMauro Carvalho Chehab which can take up to two minutes. May return rubbish on older 13499e1cbedeSMauro Carvalho Chehab ThinkPads. 13509e1cbedeSMauro Carvalho Chehab 13519e1cbedeSMauro Carvalho Chehabhwmon device attribute fan2_input: 13529e1cbedeSMauro Carvalho Chehab Fan tachometer reading, in RPM, for the secondary fan. 13539e1cbedeSMauro Carvalho Chehab Available only on some ThinkPads. If the secondary fan is 13549e1cbedeSMauro Carvalho Chehab not installed, will always read 0. 13559e1cbedeSMauro Carvalho Chehab 13569e1cbedeSMauro Carvalho Chehabhwmon driver attribute fan_watchdog: 13579e1cbedeSMauro Carvalho Chehab Fan safety watchdog timer interval, in seconds. Minimum is 13589e1cbedeSMauro Carvalho Chehab 1 second, maximum is 120 seconds. 0 disables the watchdog. 13599e1cbedeSMauro Carvalho Chehab 13609e1cbedeSMauro Carvalho ChehabTo stop the fan: set pwm1 to zero, and pwm1_enable to 1. 13619e1cbedeSMauro Carvalho Chehab 13629e1cbedeSMauro Carvalho ChehabTo start the fan in a safe mode: set pwm1_enable to 2. If that fails 13639e1cbedeSMauro Carvalho Chehabwith EINVAL, try to set pwm1_enable to 1 and pwm1 to at least 128 (255 13649e1cbedeSMauro Carvalho Chehabwould be the safest choice, though). 13659e1cbedeSMauro Carvalho Chehab 13669e1cbedeSMauro Carvalho Chehab 13679e1cbedeSMauro Carvalho ChehabWAN 13689e1cbedeSMauro Carvalho Chehab--- 13699e1cbedeSMauro Carvalho Chehab 13709e1cbedeSMauro Carvalho Chehabprocfs: /proc/acpi/ibm/wan 13719e1cbedeSMauro Carvalho Chehab 13729e1cbedeSMauro Carvalho Chehabsysfs device attribute: wwan_enable (deprecated) 13739e1cbedeSMauro Carvalho Chehab 13749e1cbedeSMauro Carvalho Chehabsysfs rfkill class: switch "tpacpi_wwan_sw" 13759e1cbedeSMauro Carvalho Chehab 13769e1cbedeSMauro Carvalho ChehabThis feature shows the presence and current state of the built-in 13779e1cbedeSMauro Carvalho ChehabWireless WAN device. 13789e1cbedeSMauro Carvalho Chehab 13799e1cbedeSMauro Carvalho ChehabIf the ThinkPad supports it, the WWAN state is stored in NVRAM, 13809e1cbedeSMauro Carvalho Chehabso it is kept across reboots and power-off. 13819e1cbedeSMauro Carvalho Chehab 13829e1cbedeSMauro Carvalho ChehabIt was tested on a Lenovo ThinkPad X60. It should probably work on other 13839e1cbedeSMauro Carvalho ChehabThinkPad models which come with this module installed. 13849e1cbedeSMauro Carvalho Chehab 13859e1cbedeSMauro Carvalho ChehabProcfs notes 13869e1cbedeSMauro Carvalho Chehab^^^^^^^^^^^^ 13879e1cbedeSMauro Carvalho Chehab 13889e1cbedeSMauro Carvalho ChehabIf the W-WAN card is installed, the following commands can be used:: 13899e1cbedeSMauro Carvalho Chehab 13909e1cbedeSMauro Carvalho Chehab echo enable > /proc/acpi/ibm/wan 13919e1cbedeSMauro Carvalho Chehab echo disable > /proc/acpi/ibm/wan 13929e1cbedeSMauro Carvalho Chehab 13939e1cbedeSMauro Carvalho ChehabSysfs notes 13949e1cbedeSMauro Carvalho Chehab^^^^^^^^^^^ 13959e1cbedeSMauro Carvalho Chehab 13969e1cbedeSMauro Carvalho Chehab If the W-WAN card is installed, it can be enabled / 13979e1cbedeSMauro Carvalho Chehab disabled through the "wwan_enable" thinkpad-acpi device 13989e1cbedeSMauro Carvalho Chehab attribute, and its current status can also be queried. 13999e1cbedeSMauro Carvalho Chehab 14009e1cbedeSMauro Carvalho Chehab enable: 14019e1cbedeSMauro Carvalho Chehab - 0: disables WWAN card / WWAN card is disabled 14029e1cbedeSMauro Carvalho Chehab - 1: enables WWAN card / WWAN card is enabled. 14039e1cbedeSMauro Carvalho Chehab 14049e1cbedeSMauro Carvalho Chehab Note: this interface has been superseded by the generic rfkill 14059e1cbedeSMauro Carvalho Chehab class. It has been deprecated, and it will be removed in year 14069e1cbedeSMauro Carvalho Chehab 2010. 14079e1cbedeSMauro Carvalho Chehab 14089e1cbedeSMauro Carvalho Chehab rfkill controller switch "tpacpi_wwan_sw": refer to 14099e1cbedeSMauro Carvalho Chehab Documentation/rfkill.txt for details. 14109e1cbedeSMauro Carvalho Chehab 14119e1cbedeSMauro Carvalho Chehab 14129e1cbedeSMauro Carvalho ChehabEXPERIMENTAL: UWB 14139e1cbedeSMauro Carvalho Chehab----------------- 14149e1cbedeSMauro Carvalho Chehab 14159e1cbedeSMauro Carvalho ChehabThis feature is considered EXPERIMENTAL because it has not been extensively 14169e1cbedeSMauro Carvalho Chehabtested and validated in various ThinkPad models yet. The feature may not 14179e1cbedeSMauro Carvalho Chehabwork as expected. USE WITH CAUTION! To use this feature, you need to supply 14189e1cbedeSMauro Carvalho Chehabthe experimental=1 parameter when loading the module. 14199e1cbedeSMauro Carvalho Chehab 14209e1cbedeSMauro Carvalho Chehabsysfs rfkill class: switch "tpacpi_uwb_sw" 14219e1cbedeSMauro Carvalho Chehab 14229e1cbedeSMauro Carvalho ChehabThis feature exports an rfkill controller for the UWB device, if one is 14239e1cbedeSMauro Carvalho Chehabpresent and enabled in the BIOS. 14249e1cbedeSMauro Carvalho Chehab 14259e1cbedeSMauro Carvalho ChehabSysfs notes 14269e1cbedeSMauro Carvalho Chehab^^^^^^^^^^^ 14279e1cbedeSMauro Carvalho Chehab 14289e1cbedeSMauro Carvalho Chehab rfkill controller switch "tpacpi_uwb_sw": refer to 14299e1cbedeSMauro Carvalho Chehab Documentation/rfkill.txt for details. 14309e1cbedeSMauro Carvalho Chehab 14319e1cbedeSMauro Carvalho ChehabAdaptive keyboard 14329e1cbedeSMauro Carvalho Chehab----------------- 14339e1cbedeSMauro Carvalho Chehab 14349e1cbedeSMauro Carvalho Chehabsysfs device attribute: adaptive_kbd_mode 14359e1cbedeSMauro Carvalho Chehab 14369e1cbedeSMauro Carvalho ChehabThis sysfs attribute controls the keyboard "face" that will be shown on the 14379e1cbedeSMauro Carvalho ChehabLenovo X1 Carbon 2nd gen (2014)'s adaptive keyboard. The value can be read 14389e1cbedeSMauro Carvalho Chehaband set. 14399e1cbedeSMauro Carvalho Chehab 14409e1cbedeSMauro Carvalho Chehab- 1 = Home mode 14419e1cbedeSMauro Carvalho Chehab- 2 = Web-browser mode 14429e1cbedeSMauro Carvalho Chehab- 3 = Web-conference mode 14439e1cbedeSMauro Carvalho Chehab- 4 = Function mode 14449e1cbedeSMauro Carvalho Chehab- 5 = Layflat mode 14459e1cbedeSMauro Carvalho Chehab 14469e1cbedeSMauro Carvalho ChehabFor more details about which buttons will appear depending on the mode, please 14479e1cbedeSMauro Carvalho Chehabreview the laptop's user guide: 14489e1cbedeSMauro Carvalho Chehabhttp://www.lenovo.com/shop/americas/content/user_guides/x1carbon_2_ug_en.pdf 14499e1cbedeSMauro Carvalho Chehab 14509e1cbedeSMauro Carvalho ChehabMultiple Commands, Module Parameters 14519e1cbedeSMauro Carvalho Chehab------------------------------------ 14529e1cbedeSMauro Carvalho Chehab 14539e1cbedeSMauro Carvalho ChehabMultiple commands can be written to the proc files in one shot by 14549e1cbedeSMauro Carvalho Chehabseparating them with commas, for example:: 14559e1cbedeSMauro Carvalho Chehab 14569e1cbedeSMauro Carvalho Chehab echo enable,0xffff > /proc/acpi/ibm/hotkey 14579e1cbedeSMauro Carvalho Chehab echo lcd_disable,crt_enable > /proc/acpi/ibm/video 14589e1cbedeSMauro Carvalho Chehab 14599e1cbedeSMauro Carvalho ChehabCommands can also be specified when loading the thinkpad-acpi module, 14609e1cbedeSMauro Carvalho Chehabfor example:: 14619e1cbedeSMauro Carvalho Chehab 14629e1cbedeSMauro Carvalho Chehab modprobe thinkpad_acpi hotkey=enable,0xffff video=auto_disable 14639e1cbedeSMauro Carvalho Chehab 14649e1cbedeSMauro Carvalho Chehab 14659e1cbedeSMauro Carvalho ChehabEnabling debugging output 14669e1cbedeSMauro Carvalho Chehab------------------------- 14679e1cbedeSMauro Carvalho Chehab 14689e1cbedeSMauro Carvalho ChehabThe module takes a debug parameter which can be used to selectively 14699e1cbedeSMauro Carvalho Chehabenable various classes of debugging output, for example:: 14709e1cbedeSMauro Carvalho Chehab 14719e1cbedeSMauro Carvalho Chehab modprobe thinkpad_acpi debug=0xffff 14729e1cbedeSMauro Carvalho Chehab 14739e1cbedeSMauro Carvalho Chehabwill enable all debugging output classes. It takes a bitmask, so 14749e1cbedeSMauro Carvalho Chehabto enable more than one output class, just add their values. 14759e1cbedeSMauro Carvalho Chehab 14769e1cbedeSMauro Carvalho Chehab ============= ====================================== 14779e1cbedeSMauro Carvalho Chehab Debug bitmask Description 14789e1cbedeSMauro Carvalho Chehab ============= ====================================== 14799e1cbedeSMauro Carvalho Chehab 0x8000 Disclose PID of userspace programs 14809e1cbedeSMauro Carvalho Chehab accessing some functions of the driver 14819e1cbedeSMauro Carvalho Chehab 0x0001 Initialization and probing 14829e1cbedeSMauro Carvalho Chehab 0x0002 Removal 14839e1cbedeSMauro Carvalho Chehab 0x0004 RF Transmitter control (RFKILL) 14849e1cbedeSMauro Carvalho Chehab (bluetooth, WWAN, UWB...) 14859e1cbedeSMauro Carvalho Chehab 0x0008 HKEY event interface, hotkeys 14869e1cbedeSMauro Carvalho Chehab 0x0010 Fan control 14879e1cbedeSMauro Carvalho Chehab 0x0020 Backlight brightness 14889e1cbedeSMauro Carvalho Chehab 0x0040 Audio mixer/volume control 14899e1cbedeSMauro Carvalho Chehab ============= ====================================== 14909e1cbedeSMauro Carvalho Chehab 14919e1cbedeSMauro Carvalho ChehabThere is also a kernel build option to enable more debugging 14929e1cbedeSMauro Carvalho Chehabinformation, which may be necessary to debug driver problems. 14939e1cbedeSMauro Carvalho Chehab 14949e1cbedeSMauro Carvalho ChehabThe level of debugging information output by the driver can be changed 14959e1cbedeSMauro Carvalho Chehabat runtime through sysfs, using the driver attribute debug_level. The 14969e1cbedeSMauro Carvalho Chehabattribute takes the same bitmask as the debug module parameter above. 14979e1cbedeSMauro Carvalho Chehab 14989e1cbedeSMauro Carvalho Chehab 14999e1cbedeSMauro Carvalho ChehabForce loading of module 15009e1cbedeSMauro Carvalho Chehab----------------------- 15019e1cbedeSMauro Carvalho Chehab 15029e1cbedeSMauro Carvalho ChehabIf thinkpad-acpi refuses to detect your ThinkPad, you can try to specify 15039e1cbedeSMauro Carvalho Chehabthe module parameter force_load=1. Regardless of whether this works or 15049e1cbedeSMauro Carvalho Chehabnot, please contact ibm-acpi-devel@lists.sourceforge.net with a report. 15059e1cbedeSMauro Carvalho Chehab 15069e1cbedeSMauro Carvalho Chehab 15079e1cbedeSMauro Carvalho ChehabSysfs interface changelog 15089e1cbedeSMauro Carvalho Chehab^^^^^^^^^^^^^^^^^^^^^^^^^ 15099e1cbedeSMauro Carvalho Chehab 15109e1cbedeSMauro Carvalho Chehab========= =============================================================== 15119e1cbedeSMauro Carvalho Chehab0x000100: Initial sysfs support, as a single platform driver and 15129e1cbedeSMauro Carvalho Chehab device. 15139e1cbedeSMauro Carvalho Chehab0x000200: Hot key support for 32 hot keys, and radio slider switch 15149e1cbedeSMauro Carvalho Chehab support. 15159e1cbedeSMauro Carvalho Chehab0x010000: Hot keys are now handled by default over the input 15169e1cbedeSMauro Carvalho Chehab layer, the radio switch generates input event EV_RADIO, 15179e1cbedeSMauro Carvalho Chehab and the driver enables hot key handling by default in 15189e1cbedeSMauro Carvalho Chehab the firmware. 15199e1cbedeSMauro Carvalho Chehab 15209e1cbedeSMauro Carvalho Chehab0x020000: ABI fix: added a separate hwmon platform device and 15219e1cbedeSMauro Carvalho Chehab driver, which must be located by name (thinkpad) 15229e1cbedeSMauro Carvalho Chehab and the hwmon class for libsensors4 (lm-sensors 3) 15239e1cbedeSMauro Carvalho Chehab compatibility. Moved all hwmon attributes to this 15249e1cbedeSMauro Carvalho Chehab new platform device. 15259e1cbedeSMauro Carvalho Chehab 15269e1cbedeSMauro Carvalho Chehab0x020100: Marker for thinkpad-acpi with hot key NVRAM polling 15279e1cbedeSMauro Carvalho Chehab support. If you must, use it to know you should not 15289e1cbedeSMauro Carvalho Chehab start a userspace NVRAM poller (allows to detect when 15299e1cbedeSMauro Carvalho Chehab NVRAM is compiled out by the user because it is 15309e1cbedeSMauro Carvalho Chehab unneeded/undesired in the first place). 15319e1cbedeSMauro Carvalho Chehab0x020101: Marker for thinkpad-acpi with hot key NVRAM polling 15329e1cbedeSMauro Carvalho Chehab and proper hotkey_mask semantics (version 8 of the 15339e1cbedeSMauro Carvalho Chehab NVRAM polling patch). Some development snapshots of 15349e1cbedeSMauro Carvalho Chehab 0.18 had an earlier version that did strange things 15359e1cbedeSMauro Carvalho Chehab to hotkey_mask. 15369e1cbedeSMauro Carvalho Chehab 15379e1cbedeSMauro Carvalho Chehab0x020200: Add poll()/select() support to the following attributes: 15389e1cbedeSMauro Carvalho Chehab hotkey_radio_sw, wakeup_hotunplug_complete, wakeup_reason 15399e1cbedeSMauro Carvalho Chehab 15409e1cbedeSMauro Carvalho Chehab0x020300: hotkey enable/disable support removed, attributes 15419e1cbedeSMauro Carvalho Chehab hotkey_bios_enabled and hotkey_enable deprecated and 15429e1cbedeSMauro Carvalho Chehab marked for removal. 15439e1cbedeSMauro Carvalho Chehab 15449e1cbedeSMauro Carvalho Chehab0x020400: Marker for 16 LEDs support. Also, LEDs that are known 15459e1cbedeSMauro Carvalho Chehab to not exist in a given model are not registered with 15469e1cbedeSMauro Carvalho Chehab the LED sysfs class anymore. 15479e1cbedeSMauro Carvalho Chehab 15489e1cbedeSMauro Carvalho Chehab0x020500: Updated hotkey driver, hotkey_mask is always available 15499e1cbedeSMauro Carvalho Chehab and it is always able to disable hot keys. Very old 15509e1cbedeSMauro Carvalho Chehab thinkpads are properly supported. hotkey_bios_mask 15519e1cbedeSMauro Carvalho Chehab is deprecated and marked for removal. 15529e1cbedeSMauro Carvalho Chehab 15539e1cbedeSMauro Carvalho Chehab0x020600: Marker for backlight change event support. 15549e1cbedeSMauro Carvalho Chehab 15559e1cbedeSMauro Carvalho Chehab0x020700: Support for mute-only mixers. 15569e1cbedeSMauro Carvalho Chehab Volume control in read-only mode by default. 15579e1cbedeSMauro Carvalho Chehab Marker for ALSA mixer support. 15589e1cbedeSMauro Carvalho Chehab 15599e1cbedeSMauro Carvalho Chehab0x030000: Thermal and fan sysfs attributes were moved to the hwmon 15609e1cbedeSMauro Carvalho Chehab device instead of being attached to the backing platform 15619e1cbedeSMauro Carvalho Chehab device. 15629e1cbedeSMauro Carvalho Chehab========= =============================================================== 1563