^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) ===========================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) ThinkPad ACPI Extras Driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) ===========================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) Version 0.25
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) October 16th, 2013
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) - Borislav Deianov <borislav@users.sf.net>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) - Henrique de Moraes Holschuh <hmh@hmh.eng.br>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) http://ibm-acpi.sf.net/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) This is a Linux driver for the IBM and Lenovo ThinkPad laptops. It
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) supports various features of these laptops which are accessible
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) through the ACPI and ACPI EC framework, but not otherwise fully
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) supported by the generic Linux ACPI drivers.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) This driver used to be named ibm-acpi until kernel 2.6.21 and release
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) 0.13-20070314. It used to be in the drivers/acpi tree, but it was
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) moved to the drivers/misc tree and renamed to thinkpad-acpi for kernel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) 2.6.22, and release 0.14. It was moved to drivers/platform/x86 for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) kernel 2.6.29 and release 0.22.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) The driver is named "thinkpad-acpi". In some places, like module
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) names and log messages, "thinkpad_acpi" is used because of userspace
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) issues.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) "tpacpi" is used as a shorthand where "thinkpad-acpi" would be too
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) long due to length limitations on some Linux kernel versions.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) Status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) ------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) The features currently supported are the following (see below for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) detailed description):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) - Fn key combinations
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) - Bluetooth enable and disable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) - video output switching, expansion control
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) - ThinkLight on and off
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) - CMOS/UCMS control
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) - LED control
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) - ACPI sounds
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) - temperature sensors
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) - Experimental: embedded controller register dump
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) - LCD brightness control
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) - Volume control
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) - Fan control and monitoring: fan speed, fan enable/disable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) - WAN enable and disable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) - UWB enable and disable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) - LCD Shadow (PrivacyGuard) enable and disable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) - Lap mode sensor
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) A compatibility table by model and feature is maintained on the web
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) site, http://ibm-acpi.sf.net/. I appreciate any success or failure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) reports, especially if they add to or correct the compatibility table.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) Please include the following information in your report:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) - ThinkPad model name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) - a copy of your ACPI tables, using the "acpidump" utility
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) - a copy of the output of dmidecode, with serial numbers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) and UUIDs masked off
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) - which driver features work and which don't
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) - the observed behavior of non-working features
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) Any other comments or patches are also more than welcome.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) Installation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) ------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) If you are compiling this driver as included in the Linux kernel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) sources, look for the CONFIG_THINKPAD_ACPI Kconfig option.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) It is located on the menu path: "Device Drivers" -> "X86 Platform
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) Specific Device Drivers" -> "ThinkPad ACPI Laptop Extras".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) Features
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) --------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) The driver exports two different interfaces to userspace, which can be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) used to access the features it provides. One is a legacy procfs-based
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) interface, which will be removed at some time in the future. The other
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) is a new sysfs-based interface which is not complete yet.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) The procfs interface creates the /proc/acpi/ibm directory. There is a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) file under that directory for each feature it supports. The procfs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) interface is mostly frozen, and will change very little if at all: it
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) will not be extended to add any new functionality in the driver, instead
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) all new functionality will be implemented on the sysfs interface.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) The sysfs interface tries to blend in the generic Linux sysfs subsystems
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) and classes as much as possible. Since some of these subsystems are not
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) yet ready or stabilized, it is expected that this interface will change,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) and any and all userspace programs must deal with it.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) Notes about the sysfs interface
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) Unlike what was done with the procfs interface, correctness when talking
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) to the sysfs interfaces will be enforced, as will correctness in the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) thinkpad-acpi's implementation of sysfs interfaces.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) Also, any bugs in the thinkpad-acpi sysfs driver code or in the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) thinkpad-acpi's implementation of the sysfs interfaces will be fixed for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) maximum correctness, even if that means changing an interface in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) non-compatible ways. As these interfaces mature both in the kernel and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) in thinkpad-acpi, such changes should become quite rare.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) Applications interfacing to the thinkpad-acpi sysfs interfaces must
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) follow all sysfs guidelines and correctly process all errors (the sysfs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) interface makes extensive use of errors). File descriptors and open /
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) close operations to the sysfs inodes must also be properly implemented.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) The version of thinkpad-acpi's sysfs interface is exported by the driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) as a driver attribute (see below).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) Sysfs driver attributes are on the driver's sysfs attribute space,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) for 2.6.23+ this is /sys/bus/platform/drivers/thinkpad_acpi/ and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) /sys/bus/platform/drivers/thinkpad_hwmon/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) Sysfs device attributes are on the thinkpad_acpi device sysfs attribute
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) space, for 2.6.23+ this is /sys/devices/platform/thinkpad_acpi/.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) Sysfs device attributes for the sensors and fan are on the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) thinkpad_hwmon device's sysfs attribute space, but you should locate it
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) looking for a hwmon device with the name attribute of "thinkpad", or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) better yet, through libsensors. For 4.14+ sysfs attributes were moved to the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) hwmon device (/sys/bus/platform/devices/thinkpad_hwmon/hwmon/hwmon? or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) /sys/class/hwmon/hwmon?).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) Driver version
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) --------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) procfs: /proc/acpi/ibm/driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) sysfs driver attribute: version
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) The driver name and version. No commands can be written to this file.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) Sysfs interface version
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) -----------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) sysfs driver attribute: interface_version
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) Version of the thinkpad-acpi sysfs interface, as an unsigned long
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) (output in hex format: 0xAAAABBCC), where:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) AAAA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) - major revision
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) BB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) - minor revision
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) CC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) - bugfix revision
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) The sysfs interface version changelog for the driver can be found at the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) end of this document. Changes to the sysfs interface done by the kernel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) subsystems are not documented here, nor are they tracked by this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) attribute.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) Changes to the thinkpad-acpi sysfs interface are only considered
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) non-experimental when they are submitted to Linux mainline, at which
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) point the changes in this interface are documented and interface_version
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) may be updated. If you are using any thinkpad-acpi features not yet
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) sent to mainline for merging, you do so on your own risk: these features
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) may disappear, or be implemented in a different and incompatible way by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) the time they are merged in Linux mainline.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) Changes that are backwards-compatible by nature (e.g. the addition of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) attributes that do not change the way the other attributes work) do not
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) always warrant an update of interface_version. Therefore, one must
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) expect that an attribute might not be there, and deal with it properly
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) (an attribute not being there *is* a valid way to make it clear that a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) feature is not available in sysfs).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) Hot keys
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) --------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) procfs: /proc/acpi/ibm/hotkey
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) sysfs device attribute: hotkey_*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) In a ThinkPad, the ACPI HKEY handler is responsible for communicating
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) some important events and also keyboard hot key presses to the operating
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) system. Enabling the hotkey functionality of thinkpad-acpi signals the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) firmware that such a driver is present, and modifies how the ThinkPad
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) firmware will behave in many situations.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) The driver enables the HKEY ("hot key") event reporting automatically
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) when loaded, and disables it when it is removed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) The driver will report HKEY events in the following format::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) ibm/hotkey HKEY 00000080 0000xxxx
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) Some of these events refer to hot key presses, but not all of them.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) The driver will generate events over the input layer for hot keys and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) radio switches, and over the ACPI netlink layer for other events. The
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) input layer support accepts the standard IOCTLs to remap the keycodes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) assigned to each hot key.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) The hot key bit mask allows some control over which hot keys generate
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) events. If a key is "masked" (bit set to 0 in the mask), the firmware
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) will handle it. If it is "unmasked", it signals the firmware that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) thinkpad-acpi would prefer to handle it, if the firmware would be so
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) kind to allow it (and it often doesn't!).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) Not all bits in the mask can be modified. Not all bits that can be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) modified do anything. Not all hot keys can be individually controlled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) by the mask. Some models do not support the mask at all. The behaviour
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) of the mask is, therefore, highly dependent on the ThinkPad model.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) The driver will filter out any unmasked hotkeys, so even if the firmware
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) doesn't allow disabling an specific hotkey, the driver will not report
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) events for unmasked hotkeys.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) Note that unmasking some keys prevents their default behavior. For
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) example, if Fn+F5 is unmasked, that key will no longer enable/disable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) Bluetooth by itself in firmware.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) Note also that not all Fn key combinations are supported through ACPI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) depending on the ThinkPad model and firmware version. On those
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) ThinkPads, it is still possible to support some extra hotkeys by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) polling the "CMOS NVRAM" at least 10 times per second. The driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) attempts to enables this functionality automatically when required.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) procfs notes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) ^^^^^^^^^^^^
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) The following commands can be written to the /proc/acpi/ibm/hotkey file::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) echo 0xffffffff > /proc/acpi/ibm/hotkey -- enable all hot keys
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) echo 0 > /proc/acpi/ibm/hotkey -- disable all possible hot keys
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) ... any other 8-hex-digit mask ...
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) echo reset > /proc/acpi/ibm/hotkey -- restore the recommended mask
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) The following commands have been deprecated and will cause the kernel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) to log a warning::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) echo enable > /proc/acpi/ibm/hotkey -- does nothing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) echo disable > /proc/acpi/ibm/hotkey -- returns an error
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) The procfs interface does not support NVRAM polling control. So as to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) maintain maximum bug-to-bug compatibility, it does not report any masks,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) nor does it allow one to manipulate the hot key mask when the firmware
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) does not support masks at all, even if NVRAM polling is in use.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) sysfs notes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) ^^^^^^^^^^^
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) hotkey_bios_enabled:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) DEPRECATED, WILL BE REMOVED SOON.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) Returns 0.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) hotkey_bios_mask:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) DEPRECATED, DON'T USE, WILL BE REMOVED IN THE FUTURE.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) Returns the hot keys mask when thinkpad-acpi was loaded.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) Upon module unload, the hot keys mask will be restored
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) to this value. This is always 0x80c, because those are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) the hotkeys that were supported by ancient firmware
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) without mask support.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) hotkey_enable:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) DEPRECATED, WILL BE REMOVED SOON.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) 0: returns -EPERM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) 1: does nothing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) hotkey_mask:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) bit mask to enable reporting (and depending on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) the firmware, ACPI event generation) for each hot key
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) (see above). Returns the current status of the hot keys
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) mask, and allows one to modify it.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) hotkey_all_mask:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283) bit mask that should enable event reporting for all
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284) supported hot keys, when echoed to hotkey_mask above.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) Unless you know which events need to be handled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) passively (because the firmware *will* handle them
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) anyway), do *not* use hotkey_all_mask. Use
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) hotkey_recommended_mask, instead. You have been warned.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) hotkey_recommended_mask:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) bit mask that should enable event reporting for all
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) supported hot keys, except those which are always
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) handled by the firmware anyway. Echo it to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) hotkey_mask above, to use. This is the default mask
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295) used by the driver.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297) hotkey_source_mask:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) bit mask that selects which hot keys will the driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299) poll the NVRAM for. This is auto-detected by the driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300) based on the capabilities reported by the ACPI firmware,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) but it can be overridden at runtime.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) Hot keys whose bits are set in hotkey_source_mask are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) polled for in NVRAM, and reported as hotkey events if
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) enabled in hotkey_mask. Only a few hot keys are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306) available through CMOS NVRAM polling.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) Warning: when in NVRAM mode, the volume up/down/mute
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309) keys are synthesized according to changes in the mixer,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) which uses a single volume up or volume down hotkey
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311) press to unmute, as per the ThinkPad volume mixer user
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312) interface. When in ACPI event mode, volume up/down/mute
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313) events are reported by the firmware and can behave
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) differently (and that behaviour changes with firmware
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) version -- not just with firmware models -- as well as
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316) OSI(Linux) state).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) hotkey_poll_freq:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319) frequency in Hz for hot key polling. It must be between
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320) 0 and 25 Hz. Polling is only carried out when strictly
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) needed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323) Setting hotkey_poll_freq to zero disables polling, and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324) will cause hot key presses that require NVRAM polling
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325) to never be reported.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) Setting hotkey_poll_freq too low may cause repeated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328) pressings of the same hot key to be misreported as a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) single key press, or to not even be detected at all.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) The recommended polling frequency is 10Hz.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) hotkey_radio_sw:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) If the ThinkPad has a hardware radio switch, this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) attribute will read 0 if the switch is in the "radios
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335) disabled" position, and 1 if the switch is in the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336) "radios enabled" position.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338) This attribute has poll()/select() support.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340) hotkey_tablet_mode:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341) If the ThinkPad has tablet capabilities, this attribute
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342) will read 0 if the ThinkPad is in normal mode, and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343) 1 if the ThinkPad is in tablet mode.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345) This attribute has poll()/select() support.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347) wakeup_reason:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348) Set to 1 if the system is waking up because the user
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349) requested a bay ejection. Set to 2 if the system is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350) waking up because the user requested the system to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351) undock. Set to zero for normal wake-ups or wake-ups
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352) due to unknown reasons.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354) This attribute has poll()/select() support.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356) wakeup_hotunplug_complete:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357) Set to 1 if the system was waken up because of an
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358) undock or bay ejection request, and that request
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359) was successfully completed. At this point, it might
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360) be useful to send the system back to sleep, at the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361) user's choice. Refer to HKEY events 0x4003 and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362) 0x3003, below.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364) This attribute has poll()/select() support.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366) input layer notes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367) ^^^^^^^^^^^^^^^^^
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 368)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 369) A Hot key is mapped to a single input layer EV_KEY event, possibly
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 370) followed by an EV_MSC MSC_SCAN event that shall contain that key's scan
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 371) code. An EV_SYN event will always be generated to mark the end of the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 372) event block.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 373)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 374) Do not use the EV_MSC MSC_SCAN events to process keys. They are to be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 375) used as a helper to remap keys, only. They are particularly useful when
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 376) remapping KEY_UNKNOWN keys.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 377)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 378) The events are available in an input device, with the following id:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 379)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 380) ============== ==============================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 381) Bus BUS_HOST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 382) vendor 0x1014 (PCI_VENDOR_ID_IBM) or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 383) 0x17aa (PCI_VENDOR_ID_LENOVO)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 384) product 0x5054 ("TP")
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 385) version 0x4101
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 386) ============== ==============================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 387)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 388) The version will have its LSB incremented if the keymap changes in a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 389) backwards-compatible way. The MSB shall always be 0x41 for this input
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 390) device. If the MSB is not 0x41, do not use the device as described in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 391) this section, as it is either something else (e.g. another input device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 392) exported by a thinkpad driver, such as HDAPS) or its functionality has
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 393) been changed in a non-backwards compatible way.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 394)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 395) Adding other event types for other functionalities shall be considered a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 396) backwards-compatible change for this input device.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 397)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 398) Thinkpad-acpi Hot Key event map (version 0x4101):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 399)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 400) ======= ======= ============== ==============================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 401) ACPI Scan
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 402) event code Key Notes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 403) ======= ======= ============== ==============================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 404) 0x1001 0x00 FN+F1 -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 405)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 406) 0x1002 0x01 FN+F2 IBM: battery (rare)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 407) Lenovo: Screen lock
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 408)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 409) 0x1003 0x02 FN+F3 Many IBM models always report
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 410) this hot key, even with hot keys
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 411) disabled or with Fn+F3 masked
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 412) off
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 413) IBM: screen lock, often turns
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 414) off the ThinkLight as side-effect
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 415) Lenovo: battery
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 416)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 417) 0x1004 0x03 FN+F4 Sleep button (ACPI sleep button
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 418) semantics, i.e. sleep-to-RAM).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 419) It always generates some kind
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 420) of event, either the hot key
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 421) event or an ACPI sleep button
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 422) event. The firmware may
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 423) refuse to generate further FN+F4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 424) key presses until a S3 or S4 ACPI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 425) sleep cycle is performed or some
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 426) time passes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 427)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 428) 0x1005 0x04 FN+F5 Radio. Enables/disables
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 429) the internal Bluetooth hardware
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 430) and W-WAN card if left in control
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 431) of the firmware. Does not affect
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 432) the WLAN card.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 433) Should be used to turn on/off all
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 434) radios (Bluetooth+W-WAN+WLAN),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 435) really.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 436)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 437) 0x1006 0x05 FN+F6 -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 438)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 439) 0x1007 0x06 FN+F7 Video output cycle.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 440) Do you feel lucky today?
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 441)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 442) 0x1008 0x07 FN+F8 IBM: toggle screen expand
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 443) Lenovo: configure UltraNav,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 444) or toggle screen expand
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 445)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 446) 0x1009 0x08 FN+F9 -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 447)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 448) ... ... ... ...
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 449)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 450) 0x100B 0x0A FN+F11 -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 451)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 452) 0x100C 0x0B FN+F12 Sleep to disk. You are always
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 453) supposed to handle it yourself,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 454) either through the ACPI event,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 455) or through a hotkey event.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 456) The firmware may refuse to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 457) generate further FN+F12 key
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 458) press events until a S3 or S4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 459) ACPI sleep cycle is performed,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 460) or some time passes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 461)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 462) 0x100D 0x0C FN+BACKSPACE -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 463) 0x100E 0x0D FN+INSERT -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 464) 0x100F 0x0E FN+DELETE -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 465)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 466) 0x1010 0x0F FN+HOME Brightness up. This key is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 467) always handled by the firmware
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 468) in IBM ThinkPads, even when
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 469) unmasked. Just leave it alone.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 470) For Lenovo ThinkPads with a new
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 471) BIOS, it has to be handled either
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 472) by the ACPI OSI, or by userspace.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 473) The driver does the right thing,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 474) never mess with this.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 475) 0x1011 0x10 FN+END Brightness down. See brightness
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 476) up for details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 477)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 478) 0x1012 0x11 FN+PGUP ThinkLight toggle. This key is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 479) always handled by the firmware,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 480) even when unmasked.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 481)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 482) 0x1013 0x12 FN+PGDOWN -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 483)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 484) 0x1014 0x13 FN+SPACE Zoom key
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 485)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 486) 0x1015 0x14 VOLUME UP Internal mixer volume up. This
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 487) key is always handled by the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 488) firmware, even when unmasked.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 489) NOTE: Lenovo seems to be changing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 490) this.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 491) 0x1016 0x15 VOLUME DOWN Internal mixer volume up. This
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 492) key is always handled by the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 493) firmware, even when unmasked.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 494) NOTE: Lenovo seems to be changing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 495) this.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 496) 0x1017 0x16 MUTE Mute internal mixer. This
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 497) key is always handled by the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 498) firmware, even when unmasked.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 499)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 500) 0x1018 0x17 THINKPAD ThinkPad/Access IBM/Lenovo key
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 501)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 502) 0x1019 0x18 unknown
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 503)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 504) ... ... ...
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 505)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 506) 0x1020 0x1F unknown
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 507) ======= ======= ============== ==============================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 508)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 509) The ThinkPad firmware does not allow one to differentiate when most hot
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 510) keys are pressed or released (either that, or we don't know how to, yet).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 511) For these keys, the driver generates a set of events for a key press and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 512) immediately issues the same set of events for a key release. It is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 513) unknown by the driver if the ThinkPad firmware triggered these events on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 514) hot key press or release, but the firmware will do it for either one, not
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 515) both.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 516)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 517) If a key is mapped to KEY_RESERVED, it generates no input events at all.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 518) If a key is mapped to KEY_UNKNOWN, it generates an input event that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 519) includes an scan code. If a key is mapped to anything else, it will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 520) generate input device EV_KEY events.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 521)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 522) In addition to the EV_KEY events, thinkpad-acpi may also issue EV_SW
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 523) events for switches:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 524)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 525) ============== ==============================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 526) SW_RFKILL_ALL T60 and later hardware rfkill rocker switch
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 527) SW_TABLET_MODE Tablet ThinkPads HKEY events 0x5009 and 0x500A
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 528) ============== ==============================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 529)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 530) Non hotkey ACPI HKEY event map
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 531) ------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 532)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 533) Events that are never propagated by the driver:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 534)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 535) ====== ==================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 536) 0x2304 System is waking up from suspend to undock
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 537) 0x2305 System is waking up from suspend to eject bay
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 538) 0x2404 System is waking up from hibernation to undock
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 539) 0x2405 System is waking up from hibernation to eject bay
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 540) 0x5001 Lid closed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 541) 0x5002 Lid opened
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 542) 0x5009 Tablet swivel: switched to tablet mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 543) 0x500A Tablet swivel: switched to normal mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 544) 0x5010 Brightness level changed/control event
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 545) 0x6000 KEYBOARD: Numlock key pressed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 546) 0x6005 KEYBOARD: Fn key pressed (TO BE VERIFIED)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 547) 0x7000 Radio Switch may have changed state
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 548) ====== ==================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 549)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 550)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 551) Events that are propagated by the driver to userspace:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 552)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 553) ====== =====================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 554) 0x2313 ALARM: System is waking up from suspend because
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 555) the battery is nearly empty
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 556) 0x2413 ALARM: System is waking up from hibernation because
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 557) the battery is nearly empty
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 558) 0x3003 Bay ejection (see 0x2x05) complete, can sleep again
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 559) 0x3006 Bay hotplug request (hint to power up SATA link when
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 560) the optical drive tray is ejected)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 561) 0x4003 Undocked (see 0x2x04), can sleep again
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 562) 0x4010 Docked into hotplug port replicator (non-ACPI dock)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 563) 0x4011 Undocked from hotplug port replicator (non-ACPI dock)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 564) 0x500B Tablet pen inserted into its storage bay
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 565) 0x500C Tablet pen removed from its storage bay
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 566) 0x6011 ALARM: battery is too hot
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 567) 0x6012 ALARM: battery is extremely hot
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 568) 0x6021 ALARM: a sensor is too hot
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 569) 0x6022 ALARM: a sensor is extremely hot
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 570) 0x6030 System thermal table changed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 571) 0x6032 Thermal Control command set completion (DYTC, Windows)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 572) 0x6040 Nvidia Optimus/AC adapter related (TO BE VERIFIED)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 573) 0x60C0 X1 Yoga 2016, Tablet mode status changed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 574) 0x60F0 Thermal Transformation changed (GMTS, Windows)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 575) ====== =====================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 576)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 577) Battery nearly empty alarms are a last resort attempt to get the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 578) operating system to hibernate or shutdown cleanly (0x2313), or shutdown
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 579) cleanly (0x2413) before power is lost. They must be acted upon, as the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 580) wake up caused by the firmware will have negated most safety nets...
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 581)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 582) When any of the "too hot" alarms happen, according to Lenovo the user
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 583) should suspend or hibernate the laptop (and in the case of battery
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 584) alarms, unplug the AC adapter) to let it cool down. These alarms do
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 585) signal that something is wrong, they should never happen on normal
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 586) operating conditions.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 587)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 588) The "extremely hot" alarms are emergencies. According to Lenovo, the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 589) operating system is to force either an immediate suspend or hibernate
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 590) cycle, or a system shutdown. Obviously, something is very wrong if this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 591) happens.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 592)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 593)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 594) Brightness hotkey notes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 595) ^^^^^^^^^^^^^^^^^^^^^^^
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 596)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 597) Don't mess with the brightness hotkeys in a Thinkpad. If you want
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 598) notifications for OSD, use the sysfs backlight class event support.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 599)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 600) The driver will issue KEY_BRIGHTNESS_UP and KEY_BRIGHTNESS_DOWN events
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 601) automatically for the cases were userspace has to do something to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 602) implement brightness changes. When you override these events, you will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 603) either fail to handle properly the ThinkPads that require explicit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 604) action to change backlight brightness, or the ThinkPads that require
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 605) that no action be taken to work properly.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 606)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 607)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 608) Bluetooth
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 609) ---------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 610)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 611) procfs: /proc/acpi/ibm/bluetooth
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 612)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 613) sysfs device attribute: bluetooth_enable (deprecated)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 614)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 615) sysfs rfkill class: switch "tpacpi_bluetooth_sw"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 616)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 617) This feature shows the presence and current state of a ThinkPad
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 618) Bluetooth device in the internal ThinkPad CDC slot.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 619)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 620) If the ThinkPad supports it, the Bluetooth state is stored in NVRAM,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 621) so it is kept across reboots and power-off.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 622)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 623) Procfs notes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 624) ^^^^^^^^^^^^
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 625)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 626) If Bluetooth is installed, the following commands can be used::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 627)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 628) echo enable > /proc/acpi/ibm/bluetooth
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 629) echo disable > /proc/acpi/ibm/bluetooth
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 630)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 631) Sysfs notes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 632) ^^^^^^^^^^^
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 633)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 634) If the Bluetooth CDC card is installed, it can be enabled /
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 635) disabled through the "bluetooth_enable" thinkpad-acpi device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 636) attribute, and its current status can also be queried.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 637)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 638) enable:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 639)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 640) - 0: disables Bluetooth / Bluetooth is disabled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 641) - 1: enables Bluetooth / Bluetooth is enabled.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 642)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 643) Note: this interface has been superseded by the generic rfkill
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 644) class. It has been deprecated, and it will be removed in year
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 645) 2010.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 646)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 647) rfkill controller switch "tpacpi_bluetooth_sw": refer to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 648) Documentation/driver-api/rfkill.rst for details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 649)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 650)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 651) Video output control -- /proc/acpi/ibm/video
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 652) --------------------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 653)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 654) This feature allows control over the devices used for video output -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 655) LCD, CRT or DVI (if available). The following commands are available::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 656)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 657) echo lcd_enable > /proc/acpi/ibm/video
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 658) echo lcd_disable > /proc/acpi/ibm/video
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 659) echo crt_enable > /proc/acpi/ibm/video
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 660) echo crt_disable > /proc/acpi/ibm/video
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 661) echo dvi_enable > /proc/acpi/ibm/video
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 662) echo dvi_disable > /proc/acpi/ibm/video
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 663) echo auto_enable > /proc/acpi/ibm/video
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 664) echo auto_disable > /proc/acpi/ibm/video
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 665) echo expand_toggle > /proc/acpi/ibm/video
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 666) echo video_switch > /proc/acpi/ibm/video
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 667)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 668) NOTE:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 669) Access to this feature is restricted to processes owning the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 670) CAP_SYS_ADMIN capability for safety reasons, as it can interact badly
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 671) enough with some versions of X.org to crash it.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 672)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 673) Each video output device can be enabled or disabled individually.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 674) Reading /proc/acpi/ibm/video shows the status of each device.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 675)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 676) Automatic video switching can be enabled or disabled. When automatic
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 677) video switching is enabled, certain events (e.g. opening the lid,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 678) docking or undocking) cause the video output device to change
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 679) automatically. While this can be useful, it also causes flickering
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 680) and, on the X40, video corruption. By disabling automatic switching,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 681) the flickering or video corruption can be avoided.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 682)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 683) The video_switch command cycles through the available video outputs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 684) (it simulates the behavior of Fn-F7).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 685)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 686) Video expansion can be toggled through this feature. This controls
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 687) whether the display is expanded to fill the entire LCD screen when a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 688) mode with less than full resolution is used. Note that the current
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 689) video expansion status cannot be determined through this feature.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 690)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 691) Note that on many models (particularly those using Radeon graphics
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 692) chips) the X driver configures the video card in a way which prevents
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 693) Fn-F7 from working. This also disables the video output switching
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 694) features of this driver, as it uses the same ACPI methods as
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 695) Fn-F7. Video switching on the console should still work.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 696)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 697) UPDATE: refer to https://bugs.freedesktop.org/show_bug.cgi?id=2000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 698)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 699)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 700) ThinkLight control
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 701) ------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 702)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 703) procfs: /proc/acpi/ibm/light
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 704)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 705) sysfs attributes: as per LED class, for the "tpacpi::thinklight" LED
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 706)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 707) procfs notes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 708) ^^^^^^^^^^^^
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 709)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 710) The ThinkLight status can be read and set through the procfs interface. A
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 711) few models which do not make the status available will show the ThinkLight
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 712) status as "unknown". The available commands are::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 713)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 714) echo on > /proc/acpi/ibm/light
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 715) echo off > /proc/acpi/ibm/light
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 716)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 717) sysfs notes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 718) ^^^^^^^^^^^
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 719)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 720) The ThinkLight sysfs interface is documented by the LED class
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 721) documentation, in Documentation/leds/leds-class.rst. The ThinkLight LED name
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 722) is "tpacpi::thinklight".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 723)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 724) Due to limitations in the sysfs LED class, if the status of the ThinkLight
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 725) cannot be read or if it is unknown, thinkpad-acpi will report it as "off".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 726) It is impossible to know if the status returned through sysfs is valid.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 727)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 728)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 729) CMOS/UCMS control
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 730) -----------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 731)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 732) procfs: /proc/acpi/ibm/cmos
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 733)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 734) sysfs device attribute: cmos_command
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 735)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 736) This feature is mostly used internally by the ACPI firmware to keep the legacy
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 737) CMOS NVRAM bits in sync with the current machine state, and to record this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 738) state so that the ThinkPad will retain such settings across reboots.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 739)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 740) Some of these commands actually perform actions in some ThinkPad models, but
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 741) this is expected to disappear more and more in newer models. As an example, in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 742) a T43 and in a X40, commands 12 and 13 still control the ThinkLight state for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 743) real, but commands 0 to 2 don't control the mixer anymore (they have been
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 744) phased out) and just update the NVRAM.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 745)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 746) The range of valid cmos command numbers is 0 to 21, but not all have an
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 747) effect and the behavior varies from model to model. Here is the behavior
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 748) on the X40 (tpb is the ThinkPad Buttons utility):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 749)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 750) - 0 - Related to "Volume down" key press
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 751) - 1 - Related to "Volume up" key press
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 752) - 2 - Related to "Mute on" key press
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 753) - 3 - Related to "Access IBM" key press
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 754) - 4 - Related to "LCD brightness up" key press
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 755) - 5 - Related to "LCD brightness down" key press
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 756) - 11 - Related to "toggle screen expansion" key press/function
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 757) - 12 - Related to "ThinkLight on"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 758) - 13 - Related to "ThinkLight off"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 759) - 14 - Related to "ThinkLight" key press (toggle ThinkLight)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 760)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 761) The cmos command interface is prone to firmware split-brain problems, as
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 762) in newer ThinkPads it is just a compatibility layer. Do not use it, it is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 763) exported just as a debug tool.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 764)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 765)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 766) LED control
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 767) -----------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 768)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 769) procfs: /proc/acpi/ibm/led
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 770) sysfs attributes: as per LED class, see below for names
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 771)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 772) Some of the LED indicators can be controlled through this feature. On
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 773) some older ThinkPad models, it is possible to query the status of the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 774) LED indicators as well. Newer ThinkPads cannot query the real status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 775) of the LED indicators.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 776)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 777) Because misuse of the LEDs could induce an unaware user to perform
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 778) dangerous actions (like undocking or ejecting a bay device while the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 779) buses are still active), or mask an important alarm (such as a nearly
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 780) empty battery, or a broken battery), access to most LEDs is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 781) restricted.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 782)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 783) Unrestricted access to all LEDs requires that thinkpad-acpi be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 784) compiled with the CONFIG_THINKPAD_ACPI_UNSAFE_LEDS option enabled.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 785) Distributions must never enable this option. Individual users that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 786) are aware of the consequences are welcome to enabling it.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 787)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 788) Audio mute and microphone mute LEDs are supported, but currently not
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 789) visible to userspace. They are used by the snd-hda-intel audio driver.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 790)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 791) procfs notes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 792) ^^^^^^^^^^^^
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 793)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 794) The available commands are::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 795)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 796) echo '<LED number> on' >/proc/acpi/ibm/led
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 797) echo '<LED number> off' >/proc/acpi/ibm/led
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 798) echo '<LED number> blink' >/proc/acpi/ibm/led
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 799)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 800) The <LED number> range is 0 to 15. The set of LEDs that can be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 801) controlled varies from model to model. Here is the common ThinkPad
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 802) mapping:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 803)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 804) - 0 - power
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 805) - 1 - battery (orange)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 806) - 2 - battery (green)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 807) - 3 - UltraBase/dock
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 808) - 4 - UltraBay
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 809) - 5 - UltraBase battery slot
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 810) - 6 - (unknown)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 811) - 7 - standby
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 812) - 8 - dock status 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 813) - 9 - dock status 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 814) - 10, 11 - (unknown)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 815) - 12 - thinkvantage
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 816) - 13, 14, 15 - (unknown)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 817)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 818) All of the above can be turned on and off and can be made to blink.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 819)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 820) sysfs notes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 821) ^^^^^^^^^^^
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 822)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 823) The ThinkPad LED sysfs interface is described in detail by the LED class
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 824) documentation, in Documentation/leds/leds-class.rst.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 825)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 826) The LEDs are named (in LED ID order, from 0 to 12):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 827) "tpacpi::power", "tpacpi:orange:batt", "tpacpi:green:batt",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 828) "tpacpi::dock_active", "tpacpi::bay_active", "tpacpi::dock_batt",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 829) "tpacpi::unknown_led", "tpacpi::standby", "tpacpi::dock_status1",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 830) "tpacpi::dock_status2", "tpacpi::unknown_led2", "tpacpi::unknown_led3",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 831) "tpacpi::thinkvantage".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 832)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 833) Due to limitations in the sysfs LED class, if the status of the LED
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 834) indicators cannot be read due to an error, thinkpad-acpi will report it as
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 835) a brightness of zero (same as LED off).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 836)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 837) If the thinkpad firmware doesn't support reading the current status,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 838) trying to read the current LED brightness will just return whatever
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 839) brightness was last written to that attribute.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 840)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 841) These LEDs can blink using hardware acceleration. To request that a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 842) ThinkPad indicator LED should blink in hardware accelerated mode, use the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 843) "timer" trigger, and leave the delay_on and delay_off parameters set to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 844) zero (to request hardware acceleration autodetection).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 845)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 846) LEDs that are known not to exist in a given ThinkPad model are not
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 847) made available through the sysfs interface. If you have a dock and you
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 848) notice there are LEDs listed for your ThinkPad that do not exist (and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 849) are not in the dock), or if you notice that there are missing LEDs,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 850) a report to ibm-acpi-devel@lists.sourceforge.net is appreciated.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 851)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 852)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 853) ACPI sounds -- /proc/acpi/ibm/beep
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 854) ----------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 855)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 856) The BEEP method is used internally by the ACPI firmware to provide
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 857) audible alerts in various situations. This feature allows the same
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 858) sounds to be triggered manually.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 859)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 860) The commands are non-negative integer numbers::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 861)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 862) echo <number> >/proc/acpi/ibm/beep
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 863)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 864) The valid <number> range is 0 to 17. Not all numbers trigger sounds
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 865) and the sounds vary from model to model. Here is the behavior on the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 866) X40:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 867)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 868) - 0 - stop a sound in progress (but use 17 to stop 16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 869) - 2 - two beeps, pause, third beep ("low battery")
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 870) - 3 - single beep
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 871) - 4 - high, followed by low-pitched beep ("unable")
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 872) - 5 - single beep
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 873) - 6 - very high, followed by high-pitched beep ("AC/DC")
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 874) - 7 - high-pitched beep
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 875) - 9 - three short beeps
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 876) - 10 - very long beep
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 877) - 12 - low-pitched beep
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 878) - 15 - three high-pitched beeps repeating constantly, stop with 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 879) - 16 - one medium-pitched beep repeating constantly, stop with 17
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 880) - 17 - stop 16
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 881)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 882)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 883) Temperature sensors
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 884) -------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 885)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 886) procfs: /proc/acpi/ibm/thermal
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 887)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 888) sysfs device attributes: (hwmon "thinkpad") temp*_input
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 889)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 890) Most ThinkPads include six or more separate temperature sensors but only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 891) expose the CPU temperature through the standard ACPI methods. This
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 892) feature shows readings from up to eight different sensors on older
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 893) ThinkPads, and up to sixteen different sensors on newer ThinkPads.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 894)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 895) For example, on the X40, a typical output may be:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 896)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 897) temperatures:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 898) 42 42 45 41 36 -128 33 -128
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 899)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 900) On the T43/p, a typical output may be:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 901)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 902) temperatures:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 903) 48 48 36 52 38 -128 31 -128 48 52 48 -128 -128 -128 -128 -128
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 904)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 905) The mapping of thermal sensors to physical locations varies depending on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 906) system-board model (and thus, on ThinkPad model).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 907)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 908) https://thinkwiki.org/wiki/Thermal_Sensors is a public wiki page that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 909) tries to track down these locations for various models.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 910)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 911) Most (newer?) models seem to follow this pattern:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 912)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 913) - 1: CPU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 914) - 2: (depends on model)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 915) - 3: (depends on model)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 916) - 4: GPU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 917) - 5: Main battery: main sensor
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 918) - 6: Bay battery: main sensor
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 919) - 7: Main battery: secondary sensor
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 920) - 8: Bay battery: secondary sensor
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 921) - 9-15: (depends on model)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 922)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 923) For the R51 (source: Thomas Gruber):
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 924)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 925) - 2: Mini-PCI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 926) - 3: Internal HDD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 927)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 928) For the T43, T43/p (source: Shmidoax/Thinkwiki.org)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 929) https://thinkwiki.org/wiki/Thermal_Sensors#ThinkPad_T43.2C_T43p
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 930)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 931) - 2: System board, left side (near PCMCIA slot), reported as HDAPS temp
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 932) - 3: PCMCIA slot
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 933) - 9: MCH (northbridge) to DRAM Bus
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 934) - 10: Clock-generator, mini-pci card and ICH (southbridge), under Mini-PCI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 935) card, under touchpad
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 936) - 11: Power regulator, underside of system board, below F2 key
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 937)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 938) The A31 has a very atypical layout for the thermal sensors
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 939) (source: Milos Popovic, https://thinkwiki.org/wiki/Thermal_Sensors#ThinkPad_A31)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 940)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 941) - 1: CPU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 942) - 2: Main Battery: main sensor
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 943) - 3: Power Converter
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 944) - 4: Bay Battery: main sensor
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 945) - 5: MCH (northbridge)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 946) - 6: PCMCIA/ambient
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 947) - 7: Main Battery: secondary sensor
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 948) - 8: Bay Battery: secondary sensor
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 949)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 950)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 951) Procfs notes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 952) ^^^^^^^^^^^^
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 953)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 954) Readings from sensors that are not available return -128.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 955) No commands can be written to this file.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 956)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 957) Sysfs notes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 958) ^^^^^^^^^^^
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 959)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 960) Sensors that are not available return the ENXIO error. This
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 961) status may change at runtime, as there are hotplug thermal
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 962) sensors, like those inside the batteries and docks.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 963)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 964) thinkpad-acpi thermal sensors are reported through the hwmon
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 965) subsystem, and follow all of the hwmon guidelines at
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 966) Documentation/hwmon.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 967)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 968) EXPERIMENTAL: Embedded controller register dump
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 969) -----------------------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 970)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 971) This feature is not included in the thinkpad driver anymore.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 972) Instead the EC can be accessed through /sys/kernel/debug/ec with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 973) a userspace tool which can be found here:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 974) ftp://ftp.suse.com/pub/people/trenn/sources/ec
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 975)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 976) Use it to determine the register holding the fan
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 977) speed on some models. To do that, do the following:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 978)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 979) - make sure the battery is fully charged
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 980) - make sure the fan is running
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 981) - use above mentioned tool to read out the EC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 982)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 983) Often fan and temperature values vary between
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 984) readings. Since temperatures don't change vary fast, you can take
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 985) several quick dumps to eliminate them.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 986)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 987) You can use a similar method to figure out the meaning of other
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 988) embedded controller registers - e.g. make sure nothing else changes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 989) except the charging or discharging battery to determine which
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 990) registers contain the current battery capacity, etc. If you experiment
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 991) with this, do send me your results (including some complete dumps with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 992) a description of the conditions when they were taken.)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 993)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 994)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 995) LCD brightness control
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 996) ----------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 997)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 998) procfs: /proc/acpi/ibm/brightness
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 999)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1000) sysfs backlight device "thinkpad_screen"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1001)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1002) This feature allows software control of the LCD brightness on ThinkPad
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1003) models which don't have a hardware brightness slider.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1004)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1005) It has some limitations: the LCD backlight cannot be actually turned
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1006) on or off by this interface, it just controls the backlight brightness
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1007) level.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1008)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1009) On IBM (and some of the earlier Lenovo) ThinkPads, the backlight control
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1010) has eight brightness levels, ranging from 0 to 7. Some of the levels
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1011) may not be distinct. Later Lenovo models that implement the ACPI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1012) display backlight brightness control methods have 16 levels, ranging
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1013) from 0 to 15.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1014)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1015) For IBM ThinkPads, there are two interfaces to the firmware for direct
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1016) brightness control, EC and UCMS (or CMOS). To select which one should be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1017) used, use the brightness_mode module parameter: brightness_mode=1 selects
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1018) EC mode, brightness_mode=2 selects UCMS mode, brightness_mode=3 selects EC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1019) mode with NVRAM backing (so that brightness changes are remembered across
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1020) shutdown/reboot).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1021)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1022) The driver tries to select which interface to use from a table of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1023) defaults for each ThinkPad model. If it makes a wrong choice, please
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1024) report this as a bug, so that we can fix it.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1025)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1026) Lenovo ThinkPads only support brightness_mode=2 (UCMS).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1027)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1028) When display backlight brightness controls are available through the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1029) standard ACPI interface, it is best to use it instead of this direct
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1030) ThinkPad-specific interface. The driver will disable its native
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1031) backlight brightness control interface if it detects that the standard
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1032) ACPI interface is available in the ThinkPad.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1033)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1034) If you want to use the thinkpad-acpi backlight brightness control
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1035) instead of the generic ACPI video backlight brightness control for some
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1036) reason, you should use the acpi_backlight=vendor kernel parameter.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1037)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1038) The brightness_enable module parameter can be used to control whether
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1039) the LCD brightness control feature will be enabled when available.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1040) brightness_enable=0 forces it to be disabled. brightness_enable=1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1041) forces it to be enabled when available, even if the standard ACPI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1042) interface is also available.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1043)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1044) Procfs notes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1045) ^^^^^^^^^^^^
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1046)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1047) The available commands are::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1048)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1049) echo up >/proc/acpi/ibm/brightness
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1050) echo down >/proc/acpi/ibm/brightness
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1051) echo 'level <level>' >/proc/acpi/ibm/brightness
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1052)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1053) Sysfs notes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1054) ^^^^^^^^^^^
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1055)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1056) The interface is implemented through the backlight sysfs class, which is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1057) poorly documented at this time.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1058)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1059) Locate the thinkpad_screen device under /sys/class/backlight, and inside
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1060) it there will be the following attributes:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1061)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1062) max_brightness:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1063) Reads the maximum brightness the hardware can be set to.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1064) The minimum is always zero.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1065)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1066) actual_brightness:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1067) Reads what brightness the screen is set to at this instant.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1068)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1069) brightness:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1070) Writes request the driver to change brightness to the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1071) given value. Reads will tell you what brightness the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1072) driver is trying to set the display to when "power" is set
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1073) to zero and the display has not been dimmed by a kernel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1074) power management event.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1075)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1076) power:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1077) power management mode, where 0 is "display on", and 1 to 3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1078) will dim the display backlight to brightness level 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1079) because thinkpad-acpi cannot really turn the backlight
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1080) off. Kernel power management events can temporarily
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1081) increase the current power management level, i.e. they can
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1082) dim the display.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1083)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1084)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1085) WARNING:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1086)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1087) Whatever you do, do NOT ever call thinkpad-acpi backlight-level change
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1088) interface and the ACPI-based backlight level change interface
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1089) (available on newer BIOSes, and driven by the Linux ACPI video driver)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1090) at the same time. The two will interact in bad ways, do funny things,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1091) and maybe reduce the life of the backlight lamps by needlessly kicking
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1092) its level up and down at every change.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1093)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1094)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1095) Volume control (Console Audio control)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1096) --------------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1097)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1098) procfs: /proc/acpi/ibm/volume
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1099)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1100) ALSA: "ThinkPad Console Audio Control", default ID: "ThinkPadEC"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1101)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1102) NOTE: by default, the volume control interface operates in read-only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1103) mode, as it is supposed to be used for on-screen-display purposes.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1104) The read/write mode can be enabled through the use of the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1105) "volume_control=1" module parameter.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1106)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1107) NOTE: distros are urged to not enable volume_control by default, this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1108) should be done by the local admin only. The ThinkPad UI is for the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1109) console audio control to be done through the volume keys only, and for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1110) the desktop environment to just provide on-screen-display feedback.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1111) Software volume control should be done only in the main AC97/HDA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1112) mixer.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1113)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1114)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1115) About the ThinkPad Console Audio control
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1116) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1117)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1118) ThinkPads have a built-in amplifier and muting circuit that drives the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1119) console headphone and speakers. This circuit is after the main AC97
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1120) or HDA mixer in the audio path, and under exclusive control of the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1121) firmware.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1122)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1123) ThinkPads have three special hotkeys to interact with the console
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1124) audio control: volume up, volume down and mute.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1125)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1126) It is worth noting that the normal way the mute function works (on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1127) ThinkPads that do not have a "mute LED") is:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1128)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1129) 1. Press mute to mute. It will *always* mute, you can press it as
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1130) many times as you want, and the sound will remain mute.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1131)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1132) 2. Press either volume key to unmute the ThinkPad (it will _not_
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1133) change the volume, it will just unmute).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1134)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1135) This is a very superior design when compared to the cheap software-only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1136) mute-toggle solution found on normal consumer laptops: you can be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1137) absolutely sure the ThinkPad will not make noise if you press the mute
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1138) button, no matter the previous state.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1139)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1140) The IBM ThinkPads, and the earlier Lenovo ThinkPads have variable-gain
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1141) amplifiers driving the speakers and headphone output, and the firmware
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1142) also handles volume control for the headphone and speakers on these
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1143) ThinkPads without any help from the operating system (this volume
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1144) control stage exists after the main AC97 or HDA mixer in the audio
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1145) path).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1146)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1147) The newer Lenovo models only have firmware mute control, and depend on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1148) the main HDA mixer to do volume control (which is done by the operating
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1149) system). In this case, the volume keys are filtered out for unmute
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1150) key press (there are some firmware bugs in this area) and delivered as
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1151) normal key presses to the operating system (thinkpad-acpi is not
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1152) involved).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1153)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1154)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1155) The ThinkPad-ACPI volume control
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1156) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1157)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1158) The preferred way to interact with the Console Audio control is the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1159) ALSA interface.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1160)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1161) The legacy procfs interface allows one to read the current state,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1162) and if volume control is enabled, accepts the following commands::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1163)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1164) echo up >/proc/acpi/ibm/volume
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1165) echo down >/proc/acpi/ibm/volume
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1166) echo mute >/proc/acpi/ibm/volume
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1167) echo unmute >/proc/acpi/ibm/volume
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1168) echo 'level <level>' >/proc/acpi/ibm/volume
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1169)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1170) The <level> number range is 0 to 14 although not all of them may be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1171) distinct. To unmute the volume after the mute command, use either the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1172) up or down command (the level command will not unmute the volume), or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1173) the unmute command.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1174)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1175) You can use the volume_capabilities parameter to tell the driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1176) whether your thinkpad has volume control or mute-only control:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1177) volume_capabilities=1 for mixers with mute and volume control,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1178) volume_capabilities=2 for mixers with only mute control.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1179)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1180) If the driver misdetects the capabilities for your ThinkPad model,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1181) please report this to ibm-acpi-devel@lists.sourceforge.net, so that we
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1182) can update the driver.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1183)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1184) There are two strategies for volume control. To select which one
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1185) should be used, use the volume_mode module parameter: volume_mode=1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1186) selects EC mode, and volume_mode=3 selects EC mode with NVRAM backing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1187) (so that volume/mute changes are remembered across shutdown/reboot).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1188)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1189) The driver will operate in volume_mode=3 by default. If that does not
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1190) work well on your ThinkPad model, please report this to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1191) ibm-acpi-devel@lists.sourceforge.net.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1192)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1193) The driver supports the standard ALSA module parameters. If the ALSA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1194) mixer is disabled, the driver will disable all volume functionality.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1195)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1196)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1197) Fan control and monitoring: fan speed, fan enable/disable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1198) ---------------------------------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1199)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1200) procfs: /proc/acpi/ibm/fan
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1201)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1202) sysfs device attributes: (hwmon "thinkpad") fan1_input, pwm1, pwm1_enable, fan2_input
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1203)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1204) sysfs hwmon driver attributes: fan_watchdog
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1205)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1206) NOTE NOTE NOTE:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1207) fan control operations are disabled by default for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1208) safety reasons. To enable them, the module parameter "fan_control=1"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1209) must be given to thinkpad-acpi.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1210)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1211) This feature attempts to show the current fan speed, control mode and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1212) other fan data that might be available. The speed is read directly
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1213) from the hardware registers of the embedded controller. This is known
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1214) to work on later R, T, X and Z series ThinkPads but may show a bogus
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1215) value on other models.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1216)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1217) Some Lenovo ThinkPads support a secondary fan. This fan cannot be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1218) controlled separately, it shares the main fan control.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1219)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1220) Fan levels
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1221) ^^^^^^^^^^
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1222)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1223) Most ThinkPad fans work in "levels" at the firmware interface. Level 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1224) stops the fan. The higher the level, the higher the fan speed, although
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1225) adjacent levels often map to the same fan speed. 7 is the highest
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1226) level, where the fan reaches the maximum recommended speed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1227)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1228) Level "auto" means the EC changes the fan level according to some
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1229) internal algorithm, usually based on readings from the thermal sensors.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1230)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1231) There is also a "full-speed" level, also known as "disengaged" level.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1232) In this level, the EC disables the speed-locked closed-loop fan control,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1233) and drives the fan as fast as it can go, which might exceed hardware
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1234) limits, so use this level with caution.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1235)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1236) The fan usually ramps up or down slowly from one speed to another, and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1237) it is normal for the EC to take several seconds to react to fan
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1238) commands. The full-speed level may take up to two minutes to ramp up to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1239) maximum speed, and in some ThinkPads, the tachometer readings go stale
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1240) while the EC is transitioning to the full-speed level.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1241)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1242) WARNING WARNING WARNING: do not leave the fan disabled unless you are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1243) monitoring all of the temperature sensor readings and you are ready to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1244) enable it if necessary to avoid overheating.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1245)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1246) An enabled fan in level "auto" may stop spinning if the EC decides the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1247) ThinkPad is cool enough and doesn't need the extra airflow. This is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1248) normal, and the EC will spin the fan up if the various thermal readings
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1249) rise too much.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1250)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1251) On the X40, this seems to depend on the CPU and HDD temperatures.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1252) Specifically, the fan is turned on when either the CPU temperature
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1253) climbs to 56 degrees or the HDD temperature climbs to 46 degrees. The
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1254) fan is turned off when the CPU temperature drops to 49 degrees and the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1255) HDD temperature drops to 41 degrees. These thresholds cannot
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1256) currently be controlled.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1257)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1258) The ThinkPad's ACPI DSDT code will reprogram the fan on its own when
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1259) certain conditions are met. It will override any fan programming done
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1260) through thinkpad-acpi.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1261)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1262) The thinkpad-acpi kernel driver can be programmed to revert the fan
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1263) level to a safe setting if userspace does not issue one of the procfs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1264) fan commands: "enable", "disable", "level" or "watchdog", or if there
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1265) are no writes to pwm1_enable (or to pwm1 *if and only if* pwm1_enable is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1266) set to 1, manual mode) within a configurable amount of time of up to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1267) 120 seconds. This functionality is called fan safety watchdog.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1268)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1269) Note that the watchdog timer stops after it enables the fan. It will be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1270) rearmed again automatically (using the same interval) when one of the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1271) above mentioned fan commands is received. The fan watchdog is,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1272) therefore, not suitable to protect against fan mode changes made through
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1273) means other than the "enable", "disable", and "level" procfs fan
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1274) commands, or the hwmon fan control sysfs interface.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1275)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1276) Procfs notes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1277) ^^^^^^^^^^^^
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1278)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1279) The fan may be enabled or disabled with the following commands::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1280)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1281) echo enable >/proc/acpi/ibm/fan
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1282) echo disable >/proc/acpi/ibm/fan
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1283)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1284) Placing a fan on level 0 is the same as disabling it. Enabling a fan
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1285) will try to place it in a safe level if it is too slow or disabled.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1286)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1287) The fan level can be controlled with the command::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1288)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1289) echo 'level <level>' > /proc/acpi/ibm/fan
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1290)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1291) Where <level> is an integer from 0 to 7, or one of the words "auto" or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1292) "full-speed" (without the quotes). Not all ThinkPads support the "auto"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1293) and "full-speed" levels. The driver accepts "disengaged" as an alias for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1294) "full-speed", and reports it as "disengaged" for backwards
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1295) compatibility.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1296)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1297) On the X31 and X40 (and ONLY on those models), the fan speed can be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1298) controlled to a certain degree. Once the fan is running, it can be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1299) forced to run faster or slower with the following command::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1300)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1301) echo 'speed <speed>' > /proc/acpi/ibm/fan
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1302)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1303) The sustainable range of fan speeds on the X40 appears to be from about
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1304) 3700 to about 7350. Values outside this range either do not have any
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1305) effect or the fan speed eventually settles somewhere in that range. The
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1306) fan cannot be stopped or started with this command. This functionality
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1307) is incomplete, and not available through the sysfs interface.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1308)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1309) To program the safety watchdog, use the "watchdog" command::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1310)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1311) echo 'watchdog <interval in seconds>' > /proc/acpi/ibm/fan
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1312)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1313) If you want to disable the watchdog, use 0 as the interval.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1314)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1315) Sysfs notes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1316) ^^^^^^^^^^^
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1317)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1318) The sysfs interface follows the hwmon subsystem guidelines for the most
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1319) part, and the exception is the fan safety watchdog.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1320)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1321) Writes to any of the sysfs attributes may return the EINVAL error if
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1322) that operation is not supported in a given ThinkPad or if the parameter
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1323) is out-of-bounds, and EPERM if it is forbidden. They may also return
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1324) EINTR (interrupted system call), and EIO (I/O error while trying to talk
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1325) to the firmware).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1326)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1327) Features not yet implemented by the driver return ENOSYS.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1328)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1329) hwmon device attribute pwm1_enable:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1330) - 0: PWM offline (fan is set to full-speed mode)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1331) - 1: Manual PWM control (use pwm1 to set fan level)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1332) - 2: Hardware PWM control (EC "auto" mode)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1333) - 3: reserved (Software PWM control, not implemented yet)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1334)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1335) Modes 0 and 2 are not supported by all ThinkPads, and the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1336) driver is not always able to detect this. If it does know a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1337) mode is unsupported, it will return -EINVAL.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1338)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1339) hwmon device attribute pwm1:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1340) Fan level, scaled from the firmware values of 0-7 to the hwmon
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1341) scale of 0-255. 0 means fan stopped, 255 means highest normal
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1342) speed (level 7).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1343)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1344) This attribute only commands the fan if pmw1_enable is set to 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1345) (manual PWM control).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1346)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1347) hwmon device attribute fan1_input:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1348) Fan tachometer reading, in RPM. May go stale on certain
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1349) ThinkPads while the EC transitions the PWM to offline mode,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1350) which can take up to two minutes. May return rubbish on older
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1351) ThinkPads.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1352)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1353) hwmon device attribute fan2_input:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1354) Fan tachometer reading, in RPM, for the secondary fan.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1355) Available only on some ThinkPads. If the secondary fan is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1356) not installed, will always read 0.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1357)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1358) hwmon driver attribute fan_watchdog:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1359) Fan safety watchdog timer interval, in seconds. Minimum is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1360) 1 second, maximum is 120 seconds. 0 disables the watchdog.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1361)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1362) To stop the fan: set pwm1 to zero, and pwm1_enable to 1.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1363)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1364) To start the fan in a safe mode: set pwm1_enable to 2. If that fails
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1365) with EINVAL, try to set pwm1_enable to 1 and pwm1 to at least 128 (255
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1366) would be the safest choice, though).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1367)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1368)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1369) WAN
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1370) ---
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1371)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1372) procfs: /proc/acpi/ibm/wan
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1373)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1374) sysfs device attribute: wwan_enable (deprecated)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1375)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1376) sysfs rfkill class: switch "tpacpi_wwan_sw"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1377)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1378) This feature shows the presence and current state of the built-in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1379) Wireless WAN device.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1380)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1381) If the ThinkPad supports it, the WWAN state is stored in NVRAM,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1382) so it is kept across reboots and power-off.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1383)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1384) It was tested on a Lenovo ThinkPad X60. It should probably work on other
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1385) ThinkPad models which come with this module installed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1386)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1387) Procfs notes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1388) ^^^^^^^^^^^^
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1389)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1390) If the W-WAN card is installed, the following commands can be used::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1391)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1392) echo enable > /proc/acpi/ibm/wan
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1393) echo disable > /proc/acpi/ibm/wan
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1394)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1395) Sysfs notes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1396) ^^^^^^^^^^^
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1397)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1398) If the W-WAN card is installed, it can be enabled /
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1399) disabled through the "wwan_enable" thinkpad-acpi device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1400) attribute, and its current status can also be queried.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1401)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1402) enable:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1403) - 0: disables WWAN card / WWAN card is disabled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1404) - 1: enables WWAN card / WWAN card is enabled.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1405)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1406) Note: this interface has been superseded by the generic rfkill
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1407) class. It has been deprecated, and it will be removed in year
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1408) 2010.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1409)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1410) rfkill controller switch "tpacpi_wwan_sw": refer to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1411) Documentation/driver-api/rfkill.rst for details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1412)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1413)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1414) LCD Shadow control
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1415) ------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1416)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1417) procfs: /proc/acpi/ibm/lcdshadow
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1418)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1419) Some newer T480s and T490s ThinkPads provide a feature called
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1420) PrivacyGuard. By turning this feature on, the usable vertical and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1421) horizontal viewing angles of the LCD can be limited (as if some privacy
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1422) screen was applied manually in front of the display).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1423)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1424) procfs notes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1425) ^^^^^^^^^^^^
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1426)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1427) The available commands are::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1428)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1429) echo '0' >/proc/acpi/ibm/lcdshadow
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1430) echo '1' >/proc/acpi/ibm/lcdshadow
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1431)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1432) The first command ensures the best viewing angle and the latter one turns
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1433) on the feature, restricting the viewing angles.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1434)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1435)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1436) DYTC Lapmode sensor
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1437) -------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1438)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1439) sysfs: dytc_lapmode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1440)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1441) Newer thinkpads and mobile workstations have the ability to determine if
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1442) the device is in deskmode or lapmode. This feature is used by user space
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1443) to decide if WWAN transmission can be increased to maximum power and is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1444) also useful for understanding the different thermal modes available as
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1445) they differ between desk and lap mode.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1446)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1447) The property is read-only. If the platform doesn't have support the sysfs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1448) class is not created.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1449)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1450) EXPERIMENTAL: UWB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1451) -----------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1452)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1453) This feature is considered EXPERIMENTAL because it has not been extensively
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1454) tested and validated in various ThinkPad models yet. The feature may not
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1455) work as expected. USE WITH CAUTION! To use this feature, you need to supply
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1456) the experimental=1 parameter when loading the module.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1457)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1458) sysfs rfkill class: switch "tpacpi_uwb_sw"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1459)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1460) This feature exports an rfkill controller for the UWB device, if one is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1461) present and enabled in the BIOS.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1462)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1463) Sysfs notes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1464) ^^^^^^^^^^^
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1465)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1466) rfkill controller switch "tpacpi_uwb_sw": refer to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1467) Documentation/driver-api/rfkill.rst for details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1468)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1469) Adaptive keyboard
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1470) -----------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1471)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1472) sysfs device attribute: adaptive_kbd_mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1473)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1474) This sysfs attribute controls the keyboard "face" that will be shown on the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1475) Lenovo X1 Carbon 2nd gen (2014)'s adaptive keyboard. The value can be read
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1476) and set.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1477)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1478) - 1 = Home mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1479) - 2 = Web-browser mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1480) - 3 = Web-conference mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1481) - 4 = Function mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1482) - 5 = Layflat mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1483)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1484) For more details about which buttons will appear depending on the mode, please
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1485) review the laptop's user guide:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1486) http://www.lenovo.com/shop/americas/content/user_guides/x1carbon_2_ug_en.pdf
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1487)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1488) Battery charge control
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1489) ----------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1490)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1491) sysfs attributes:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1492) /sys/class/power_supply/BAT*/charge_control_{start,end}_threshold
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1493)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1494) These two attributes are created for those batteries that are supported by the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1495) driver. They enable the user to control the battery charge thresholds of the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1496) given battery. Both values may be read and set. `charge_control_start_threshold`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1497) accepts an integer between 0 and 99 (inclusive); this value represents a battery
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1498) percentage level, below which charging will begin. `charge_control_end_threshold`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1499) accepts an integer between 1 and 100 (inclusive); this value represents a battery
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1500) percentage level, above which charging will stop.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1501)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1502) The exact semantics of the attributes may be found in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1503) Documentation/ABI/testing/sysfs-class-power.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1504)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1505) Multiple Commands, Module Parameters
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1506) ------------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1507)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1508) Multiple commands can be written to the proc files in one shot by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1509) separating them with commas, for example::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1510)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1511) echo enable,0xffff > /proc/acpi/ibm/hotkey
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1512) echo lcd_disable,crt_enable > /proc/acpi/ibm/video
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1513)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1514) Commands can also be specified when loading the thinkpad-acpi module,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1515) for example::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1516)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1517) modprobe thinkpad_acpi hotkey=enable,0xffff video=auto_disable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1518)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1519)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1520) Enabling debugging output
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1521) -------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1522)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1523) The module takes a debug parameter which can be used to selectively
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1524) enable various classes of debugging output, for example::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1525)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1526) modprobe thinkpad_acpi debug=0xffff
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1527)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1528) will enable all debugging output classes. It takes a bitmask, so
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1529) to enable more than one output class, just add their values.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1530)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1531) ============= ======================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1532) Debug bitmask Description
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1533) ============= ======================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1534) 0x8000 Disclose PID of userspace programs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1535) accessing some functions of the driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1536) 0x0001 Initialization and probing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1537) 0x0002 Removal
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1538) 0x0004 RF Transmitter control (RFKILL)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1539) (bluetooth, WWAN, UWB...)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1540) 0x0008 HKEY event interface, hotkeys
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1541) 0x0010 Fan control
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1542) 0x0020 Backlight brightness
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1543) 0x0040 Audio mixer/volume control
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1544) ============= ======================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1545)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1546) There is also a kernel build option to enable more debugging
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1547) information, which may be necessary to debug driver problems.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1548)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1549) The level of debugging information output by the driver can be changed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1550) at runtime through sysfs, using the driver attribute debug_level. The
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1551) attribute takes the same bitmask as the debug module parameter above.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1552)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1553)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1554) Force loading of module
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1555) -----------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1556)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1557) If thinkpad-acpi refuses to detect your ThinkPad, you can try to specify
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1558) the module parameter force_load=1. Regardless of whether this works or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1559) not, please contact ibm-acpi-devel@lists.sourceforge.net with a report.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1560)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1561)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1562) Sysfs interface changelog
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1563) ^^^^^^^^^^^^^^^^^^^^^^^^^
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1564)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1565) ========= ===============================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1566) 0x000100: Initial sysfs support, as a single platform driver and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1567) device.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1568) 0x000200: Hot key support for 32 hot keys, and radio slider switch
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1569) support.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1570) 0x010000: Hot keys are now handled by default over the input
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1571) layer, the radio switch generates input event EV_RADIO,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1572) and the driver enables hot key handling by default in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1573) the firmware.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1574)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1575) 0x020000: ABI fix: added a separate hwmon platform device and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1576) driver, which must be located by name (thinkpad)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1577) and the hwmon class for libsensors4 (lm-sensors 3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1578) compatibility. Moved all hwmon attributes to this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1579) new platform device.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1580)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1581) 0x020100: Marker for thinkpad-acpi with hot key NVRAM polling
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1582) support. If you must, use it to know you should not
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1583) start a userspace NVRAM poller (allows to detect when
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1584) NVRAM is compiled out by the user because it is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1585) unneeded/undesired in the first place).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1586) 0x020101: Marker for thinkpad-acpi with hot key NVRAM polling
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1587) and proper hotkey_mask semantics (version 8 of the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1588) NVRAM polling patch). Some development snapshots of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1589) 0.18 had an earlier version that did strange things
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1590) to hotkey_mask.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1591)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1592) 0x020200: Add poll()/select() support to the following attributes:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1593) hotkey_radio_sw, wakeup_hotunplug_complete, wakeup_reason
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1594)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1595) 0x020300: hotkey enable/disable support removed, attributes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1596) hotkey_bios_enabled and hotkey_enable deprecated and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1597) marked for removal.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1598)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1599) 0x020400: Marker for 16 LEDs support. Also, LEDs that are known
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1600) to not exist in a given model are not registered with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1601) the LED sysfs class anymore.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1602)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1603) 0x020500: Updated hotkey driver, hotkey_mask is always available
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1604) and it is always able to disable hot keys. Very old
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1605) thinkpads are properly supported. hotkey_bios_mask
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1606) is deprecated and marked for removal.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1607)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1608) 0x020600: Marker for backlight change event support.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1609)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1610) 0x020700: Support for mute-only mixers.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1611) Volume control in read-only mode by default.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1612) Marker for ALSA mixer support.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1613)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1614) 0x030000: Thermal and fan sysfs attributes were moved to the hwmon
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1615) device instead of being attached to the backing platform
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1616) device.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1617) ========= ===============================================================