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