Difference between revisions of "Thinkpad-acpi"
(→Further documentation: update to sync with reality) |
m (→External links related to thinkpad-acpi: +URL to wiki.gentoo.org) |
||
(31 intermediate revisions by 9 users not shown) | |||
Line 1: | Line 1: | ||
− | = | + | {| width="100%" |
− | This is a Linux ACPI driver for the | + | |style="vertical-align:top;padding-right:20px;width:10px;white-space:nowrap;" | __TOC__ |
+ | |style="vertical-align:top" | | ||
+ | == thinkpad-acpi - ThinkPad ACPI Extras Driver == | ||
+ | This is a Linux ACPI driver for the ThinkPad laptops written by Borislav Deianov, and currently maintained by [[User:hmh|Henrique de Moraes Holschuh]] and is included with the Linux kernel. It aims to support various features of these laptops which are accessible through the ACPI framework but not otherwise supported by the generic Linux ACPI drivers. As a kernel module, thinkpad-acpi works as a bridge to deliver information about certain hardware events like key presses or control the state of certain hardware features by software. | ||
− | =Hotkeys= | + | {{WARN|As of kernel 2.6.27 the thinkpad-acpi bay and dock drivers should no longer be used. Instead use the standard ACPI bay and dock drivers. As of kernel 2.6.31 the thinkpad-acpi bay and dock drivers have been removed completely.}} |
+ | |||
+ | {{NOTE|As of kernel 2.6.33 the thinkpad_acpi driver now has a ALSA sub-driver which creates an additional ALSA volume control which represents the volume and mute buttons on the ThinkPad keyboard. Unfortunately no further integration exists at this point with userspace, such as PulseAudio and as such there is no effective change for the end-user}} | ||
+ | |} | ||
+ | |||
+ | ==Thinkpad-specific ACPI driver== | ||
+ | This is a Linux ACPI driver for the ThinkPad laptops written by Borislav Deianov and Henrique de Moraes Holschuh. The driver replaces ibm-acpi in Linux mainline as of 2.6.22 (March 2007). To confuse matters further, it appears that there was also an older (now abandoned) driver of the same name written by Erik Rigtorp which never made it into the mainline kernel. The current thinkpad-acpi contains essentially the same functionality as ibm-acpi with some added features. Among which are registering of acpi events to the "thinkvantage" and volume/mute buttons which could previously only be accessed through the use of the [[tpb]] utility. | ||
+ | |||
+ | In Linux Kernel v2.6.31 "make menuconfig" the driver can be enabled in: | ||
+ | <pre> | ||
+ | Device Drivers ---> | ||
+ | [*] X86 Platform Specific Device Drivers ---> | ||
+ | <M> ThinkPad ACPI Laptop Extras | ||
+ | [ ] Maintainer debug facilities | ||
+ | [ ] Verbose debug mode | ||
+ | [ ] Allow control of important LEDs (unsafe) | ||
+ | [ ] Video output control support | ||
+ | [ ] Support NVRAM polling for hot keys | ||
+ | </pre> | ||
+ | |||
+ | ==Hibernate== | ||
+ | |||
+ | When hibernating, thinkpad_acpi should be added to the modules which are unloaded before and reloaded after hibernation. Otherwise, thinkpad_acpi may not be loadable after hibernate again. | ||
+ | |||
+ | For pm-utils, just create the following file: | ||
+ | |||
+ | {{path|/etc/pm/config.d/thinkpad_acpi}} | ||
+ | |||
+ | SUSPEND_MODULES="thinkpad_acpi" | ||
+ | |||
+ | ==Hotkeys== | ||
To view which hotkeys are active you can use "acpi_listen", but that is deprecated. A better way is to use "lsinput" and "input-events" commands to look at the output of the thinkpad-acpi input device(s). | To view which hotkeys are active you can use "acpi_listen", but that is deprecated. A better way is to use "lsinput" and "input-events" commands to look at the output of the thinkpad-acpi input device(s). | ||
Line 11: | Line 44: | ||
The thinkpad-acpi driver has detailed documentation, which is shipped inside the Linux kernel sources, as "Documentation/thinkpad-acpi.txt" or as "Documentation/laptops/thinkpad-acpi.txt". If you feel a need to change the hot key mask manually, it is probably best to look at that documentation first to understand the full side effects of any changes. | The thinkpad-acpi driver has detailed documentation, which is shipped inside the Linux kernel sources, as "Documentation/thinkpad-acpi.txt" or as "Documentation/laptops/thinkpad-acpi.txt". If you feel a need to change the hot key mask manually, it is probably best to look at that documentation first to understand the full side effects of any changes. | ||
− | =Further documentation= | + | ==sysfs interface== |
+ | some of the ThinkPad specific settings can be viewed or altered in sysfs under {{path|/sys/devices/platform/thinkpad_acpi}} and {{path|/sys/devices/platform/thinkpad_hwmon}} | ||
+ | |||
+ | ====thinkpad_acpi==== | ||
+ | {{path|/sys/devices/platform/thinkpad_acpi}} directory structure is as follows on a T60 with kernel 2.6.31 | ||
+ | <pre> | ||
+ | |-- bluetooth_enable | ||
+ | |-- cmos_command | ||
+ | |-- driver -> ../../../bus/platform/drivers/thinkpad_acpi | ||
+ | |-- hotkey_all_mask | ||
+ | |-- hotkey_bios_enabled | ||
+ | |-- hotkey_bios_mask | ||
+ | |-- hotkey_enable | ||
+ | |-- hotkey_mask | ||
+ | |-- hotkey_poll_freq | ||
+ | |-- hotkey_radio_sw | ||
+ | |-- hotkey_recommended_mask | ||
+ | |-- hotkey_report_mode | ||
+ | |-- hotkey_source_mask | ||
+ | |-- leds | ||
+ | | |-- tpacpi::power | ||
+ | | | |-- brightness | ||
+ | | | |-- device -> ../../../thinkpad_acpi | ||
+ | | | |-- max_brightness | ||
+ | | | |-- power | ||
+ | | | | `-- wakeup | ||
+ | | | |-- subsystem -> ../../../../../class/leds | ||
+ | | | |-- trigger | ||
+ | | | `-- uevent | ||
+ | | |-- tpacpi::standby | ||
+ | | | |-- brightness | ||
+ | | | |-- device -> ../../../thinkpad_acpi | ||
+ | | | |-- max_brightness | ||
+ | | | |-- power | ||
+ | | | | `-- wakeup | ||
+ | | | |-- subsystem -> ../../../../../class/leds | ||
+ | | | |-- trigger | ||
+ | | | `-- uevent | ||
+ | | |-- tpacpi::thinklight | ||
+ | | | |-- brightness | ||
+ | | | |-- device -> ../../../thinkpad_acpi | ||
+ | | | |-- max_brightness | ||
+ | | | |-- power | ||
+ | | | | `-- wakeup | ||
+ | | | |-- subsystem -> ../../../../../class/leds | ||
+ | | | |-- trigger | ||
+ | | | `-- uevent | ||
+ | | `-- tpacpi::thinkvantage | ||
+ | | |-- brightness | ||
+ | | |-- device -> ../../../thinkpad_acpi | ||
+ | | |-- max_brightness | ||
+ | | |-- power | ||
+ | | | `-- wakeup | ||
+ | | |-- subsystem -> ../../../../../class/leds | ||
+ | | |-- trigger | ||
+ | | `-- uevent | ||
+ | |-- modalias | ||
+ | |-- power | ||
+ | | `-- wakeup | ||
+ | |-- rfkill | ||
+ | | `-- rfkill0 | ||
+ | | |-- claim | ||
+ | | |-- device -> ../../../thinkpad_acpi | ||
+ | | |-- index | ||
+ | | |-- name | ||
+ | | |-- persistent | ||
+ | | |-- power | ||
+ | | | `-- wakeup | ||
+ | | |-- state | ||
+ | | |-- subsystem -> ../../../../../class/rfkill | ||
+ | | |-- type | ||
+ | | `-- uevent | ||
+ | |-- subsystem -> ../../../bus/platform | ||
+ | |-- uevent | ||
+ | |-- wakeup_hotunplug_complete | ||
+ | `-- wakeup_reason | ||
+ | </pre> | ||
+ | |||
+ | ====thinkpad_hwmon==== | ||
+ | {{path|/sys/devices/platform/thinkpad_hwmon}} directory structure is as follows on a T60 with kernel 2.6.31 | ||
+ | <pre> | ||
+ | |-- driver -> ../../../bus/platform/drivers/thinkpad_hwmon | ||
+ | |-- fan1_input | ||
+ | |-- hwmon | ||
+ | | `-- hwmon0 | ||
+ | | |-- device -> ../../../thinkpad_hwmon | ||
+ | | |-- power | ||
+ | | | `-- wakeup | ||
+ | | |-- subsystem -> ../../../../../class/hwmon | ||
+ | | `-- uevent | ||
+ | |-- modalias | ||
+ | |-- name | ||
+ | |-- power | ||
+ | | `-- wakeup | ||
+ | |-- pwm1 | ||
+ | |-- pwm1_enable | ||
+ | |-- subsystem -> ../../../bus/platform | ||
+ | |-- temp10_input | ||
+ | |-- temp11_input | ||
+ | |-- temp12_input | ||
+ | |-- temp13_input | ||
+ | |-- temp14_input | ||
+ | |-- temp15_input | ||
+ | |-- temp16_input | ||
+ | |-- temp1_input | ||
+ | |-- temp2_input | ||
+ | |-- temp3_input | ||
+ | |-- temp4_input | ||
+ | |-- temp5_input | ||
+ | |-- temp6_input | ||
+ | |-- temp7_input | ||
+ | |-- temp8_input | ||
+ | |-- temp9_input | ||
+ | `-- uevent | ||
+ | </pre> | ||
+ | |||
+ | ==proc interface== | ||
+ | some legacy interfaces can also be found under {{path|/proc/acpi/ibm}} these interfaces should be considered deprecated. Please use sysfs instead. | ||
+ | |||
+ | <pre> | ||
+ | |-- beep | ||
+ | |-- bluetooth | ||
+ | |-- cmos | ||
+ | |-- driver | ||
+ | |-- fan | ||
+ | |-- hotkey | ||
+ | |-- led | ||
+ | |-- light | ||
+ | |-- thermal | ||
+ | |-- video | ||
+ | `-- volume | ||
+ | </pre> | ||
+ | |||
+ | ==Development== | ||
+ | To help with development and maintenance of the thinkpad-acpi driver, please add your model to the [[List of DMI IDs]]. | ||
+ | |||
+ | ==Further documentation== | ||
More comprehensive documentation can be found in the kernel source tree under <tt>Documentation/thinkpad-acpi.txt</tt> or <tt>Documentation/laptops/thinkpad-acpi.txt</tt>. | More comprehensive documentation can be found in the kernel source tree under <tt>Documentation/thinkpad-acpi.txt</tt> or <tt>Documentation/laptops/thinkpad-acpi.txt</tt>. | ||
− | |||
− | |||
=== External links related to thinkpad-acpi === | === External links related to thinkpad-acpi === | ||
Line 21: | Line 188: | ||
* [http://www.kernel.org kernel.org main archives] | * [http://www.kernel.org kernel.org main archives] | ||
* [http://repo.or.cz/w/linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git thinkpad-acpi development git tree] | * [http://repo.or.cz/w/linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git thinkpad-acpi development git tree] | ||
+ | * [https://wiki.gentoo.org/wiki/ACPI/ThinkPad-special-buttons ACPI/ThinkPad-special-buttons on wiki.gentoo.org for T410] | ||
[[Category:Drivers]] | [[Category:Drivers]] | ||
+ | |||
+ | === Supported ThinkPads === | ||
+ | * {{770X}} , {{770Z}} | ||
+ | * {{A Series}} | ||
+ | * {{G Series}} | ||
+ | * {{R Series}} | ||
+ | * {{T Series}} | ||
+ | * {{W Series}} | ||
+ | * {{X Series}} | ||
+ | * {{Z Series}} | ||
+ | * {{TransNote}} |
Latest revision as of 10:49, 5 July 2014
thinkpad-acpi - ThinkPad ACPI Extras DriverThis is a Linux ACPI driver for the ThinkPad laptops written by Borislav Deianov, and currently maintained by Henrique de Moraes Holschuh and is included with the Linux kernel. It aims to support various features of these laptops which are accessible through the ACPI framework but not otherwise supported by the generic Linux ACPI drivers. As a kernel module, thinkpad-acpi works as a bridge to deliver information about certain hardware events like key presses or control the state of certain hardware features by software. ATTENTION!
As of kernel 2.6.27 the thinkpad-acpi bay and dock drivers should no longer be used. Instead use the standard ACPI bay and dock drivers. As of kernel 2.6.31 the thinkpad-acpi bay and dock drivers have been removed completely.
NOTE!
As of kernel 2.6.33 the thinkpad_acpi driver now has a ALSA sub-driver which creates an additional ALSA volume control which represents the volume and mute buttons on the ThinkPad keyboard. Unfortunately no further integration exists at this point with userspace, such as PulseAudio and as such there is no effective change for the end-user
|
Thinkpad-specific ACPI driver
This is a Linux ACPI driver for the ThinkPad laptops written by Borislav Deianov and Henrique de Moraes Holschuh. The driver replaces ibm-acpi in Linux mainline as of 2.6.22 (March 2007). To confuse matters further, it appears that there was also an older (now abandoned) driver of the same name written by Erik Rigtorp which never made it into the mainline kernel. The current thinkpad-acpi contains essentially the same functionality as ibm-acpi with some added features. Among which are registering of acpi events to the "thinkvantage" and volume/mute buttons which could previously only be accessed through the use of the tpb utility.
In Linux Kernel v2.6.31 "make menuconfig" the driver can be enabled in:
Device Drivers ---> [*] X86 Platform Specific Device Drivers ---> <M> ThinkPad ACPI Laptop Extras [ ] Maintainer debug facilities [ ] Verbose debug mode [ ] Allow control of important LEDs (unsafe) [ ] Video output control support [ ] Support NVRAM polling for hot keys
Hibernate
When hibernating, thinkpad_acpi should be added to the modules which are unloaded before and reloaded after hibernation. Otherwise, thinkpad_acpi may not be loadable after hibernate again.
For pm-utils, just create the following file:
/etc/pm/config.d/thinkpad_acpi
SUSPEND_MODULES="thinkpad_acpi"
Hotkeys
To view which hotkeys are active you can use "acpi_listen", but that is deprecated. A better way is to use "lsinput" and "input-events" commands to look at the output of the thinkpad-acpi input device(s).
One important difference from ibm-acpi for those who wish to enable all possible hot keys, is that thinkpad-acpi automatically enables them. One should not need to do anything to get the best possible thinkpad-acpi configuration for his ThinkPad (as long as he is using the latest thinkpad-acpi).
In particular, old documentation that tells you to "echo enable,0xffffffff >/proc/acpi/ibm/hotkey", or to give thinkpad-acpi any hotkey= module parameters to enable hot keys by default, is likely incorrect.
The thinkpad-acpi driver has detailed documentation, which is shipped inside the Linux kernel sources, as "Documentation/thinkpad-acpi.txt" or as "Documentation/laptops/thinkpad-acpi.txt". If you feel a need to change the hot key mask manually, it is probably best to look at that documentation first to understand the full side effects of any changes.
sysfs interface
some of the ThinkPad specific settings can be viewed or altered in sysfs under /sys/devices/platform/thinkpad_acpi and /sys/devices/platform/thinkpad_hwmon
thinkpad_acpi
/sys/devices/platform/thinkpad_acpi directory structure is as follows on a T60 with kernel 2.6.31
|-- bluetooth_enable |-- cmos_command |-- driver -> ../../../bus/platform/drivers/thinkpad_acpi |-- hotkey_all_mask |-- hotkey_bios_enabled |-- hotkey_bios_mask |-- hotkey_enable |-- hotkey_mask |-- hotkey_poll_freq |-- hotkey_radio_sw |-- hotkey_recommended_mask |-- hotkey_report_mode |-- hotkey_source_mask |-- leds | |-- tpacpi::power | | |-- brightness | | |-- device -> ../../../thinkpad_acpi | | |-- max_brightness | | |-- power | | | `-- wakeup | | |-- subsystem -> ../../../../../class/leds | | |-- trigger | | `-- uevent | |-- tpacpi::standby | | |-- brightness | | |-- device -> ../../../thinkpad_acpi | | |-- max_brightness | | |-- power | | | `-- wakeup | | |-- subsystem -> ../../../../../class/leds | | |-- trigger | | `-- uevent | |-- tpacpi::thinklight | | |-- brightness | | |-- device -> ../../../thinkpad_acpi | | |-- max_brightness | | |-- power | | | `-- wakeup | | |-- subsystem -> ../../../../../class/leds | | |-- trigger | | `-- uevent | `-- tpacpi::thinkvantage | |-- brightness | |-- device -> ../../../thinkpad_acpi | |-- max_brightness | |-- power | | `-- wakeup | |-- subsystem -> ../../../../../class/leds | |-- trigger | `-- uevent |-- modalias |-- power | `-- wakeup |-- rfkill | `-- rfkill0 | |-- claim | |-- device -> ../../../thinkpad_acpi | |-- index | |-- name | |-- persistent | |-- power | | `-- wakeup | |-- state | |-- subsystem -> ../../../../../class/rfkill | |-- type | `-- uevent |-- subsystem -> ../../../bus/platform |-- uevent |-- wakeup_hotunplug_complete `-- wakeup_reason
thinkpad_hwmon
/sys/devices/platform/thinkpad_hwmon directory structure is as follows on a T60 with kernel 2.6.31
|-- driver -> ../../../bus/platform/drivers/thinkpad_hwmon |-- fan1_input |-- hwmon | `-- hwmon0 | |-- device -> ../../../thinkpad_hwmon | |-- power | | `-- wakeup | |-- subsystem -> ../../../../../class/hwmon | `-- uevent |-- modalias |-- name |-- power | `-- wakeup |-- pwm1 |-- pwm1_enable |-- subsystem -> ../../../bus/platform |-- temp10_input |-- temp11_input |-- temp12_input |-- temp13_input |-- temp14_input |-- temp15_input |-- temp16_input |-- temp1_input |-- temp2_input |-- temp3_input |-- temp4_input |-- temp5_input |-- temp6_input |-- temp7_input |-- temp8_input |-- temp9_input `-- uevent
proc interface
some legacy interfaces can also be found under /proc/acpi/ibm these interfaces should be considered deprecated. Please use sysfs instead.
|-- beep |-- bluetooth |-- cmos |-- driver |-- fan |-- hotkey |-- led |-- light |-- thermal |-- video `-- volume
Development
To help with development and maintenance of the thinkpad-acpi driver, please add your model to the List of DMI IDs.
Further documentation
More comprehensive documentation can be found in the kernel source tree under Documentation/thinkpad-acpi.txt or Documentation/laptops/thinkpad-acpi.txt.
- ibm-acpi/thinkpad-acpi main page in Sourceforge
- Linux ACPI main page in Sourceforge, includes DSDT repository
- kernel.org main archives
- thinkpad-acpi development git tree
- ACPI/ThinkPad-special-buttons on wiki.gentoo.org for T410
Supported ThinkPads
- 770X , 770Z
- A20m, A20p, A21e, A21m, A21p, A22e, A22m, A22p, A30, A30p, A31, A31p, A275, A285, A475, A485
- G40, G41, G50
- Template:R14, Template:R15, R30, R31, R32, R40, R40e, R50, R50e, R50p, R51, R51e, R52, R60, R60e, R60i, R61, R61e, R61i, R400, R480, R490, R500, R580, R590
- T14, T14s, T15, T20, T21, T22, T23, T30, T40, T40p, T41, T41p, T42, T42p, T43, T43p, T60, T60p, T61, T61p, T400, T400s, T410, T410i, T410s, T410si, T420, T420i, T420s, T420si, T430, T430i, T430s, T430si, T430u, T431s, T440, T440s, T440p, T450, T450s, T460, T460s, T460p, T470, T470s, T470p, T480, T480s, T490, T490s, T495, T495s, T500, T510, T510i, T520, T520i, T530, T530i, T540p, T550, T560, T570, T580, T590
- W500, W510, W520, W530, W540, W541, W550s, W700, W700ds, W701, W701ds
- X1, X1 Carbon, X1 Carbon G2, X1 Carbon G3, X1 Carbon G4, X1 Carbon G5, X1 Carbon G6, X1 Carbon G7, X1 Carbon G8, X1 Extreme, X1 Extreme G2, X1 Hybrid, X13, X20, X21, X22, X23, X24, X30, X31, X32, X40, X41, X41 Tablet, X60, X60s, X60 Tablet, X61, X61s, X61Ls, X61 Tablet, X100e, X120e, X121e, X130e, X131e, X140e, X200, X200s, X200 Tablet, X201, X201i, X201s, X201si, X201 Tablet, X201i Tablet, X220, X220i, X220 Tablet, X220i Tablet, X230, X230i, X230s, X230 Tablet, X230i Tablet, X240, X240s, X250, X260, X270, X280, X300, X301, X390, X395
- Z60m, Z60t, Z61e, Z61m, Z61p, Z61t
- TransNote
- Drivers
- 770X
- 770Z
- A20m
- A20p
- A21e
- A21m
- A21p
- A22e
- A22m
- A22p
- A30
- A30p
- A31
- A31p
- A275
- A285
- A475
- A485
- G40
- G41
- G50
- R30
- R31
- R32
- R40
- R40e
- R50
- R50e
- R50p
- R51
- R51e
- R52
- R60
- R60e
- R60i
- R61
- R61e
- R61i
- R400
- R480
- R490
- R500
- R580
- R590
- T14
- T14s
- T15
- T20
- T21
- T22
- T23
- T30
- T40
- T40p
- T41
- T41p
- T42
- T42p
- T43
- T43p
- T60
- T60p
- T61
- T61p
- T400
- T400s
- T410
- T410i
- T410s
- T410si
- T420
- T420i
- T420s
- T420si
- T430
- T430i
- T430s
- T430si
- T430u
- T431s
- T440
- T440s
- T440p
- T450
- T450s
- T460
- T460s
- T460p
- T470
- T470s
- T470p
- T480
- T480s
- T490
- T490s
- T495
- T495s
- T500
- T510
- T510i
- T520
- T520i
- T530
- T530i
- T540p
- T550
- T560
- T570
- T580
- T590
- W500
- W510
- W520
- W530
- W540
- W541
- W550s
- W700
- W700ds
- W701
- W701ds
- X1
- X1 Carbon
- X1 Carbon G2
- X1 Carbon G3
- X1 Carbon G4
- X1 Carbon G5
- X1 Carbon G6
- X1 Carbon G7
- X1 Carbon G8
- X1 Extreme
- X1 Extreme G2
- X1 Hybrid
- X13
- X20
- X21
- X22
- X23
- X24
- X30
- X31
- X32
- X40
- X41
- X41 Tablet
- X60
- X60s
- X60 Tablet
- X61
- X61s
- X61Ls
- X61 Tablet
- X100e
- X120e
- X121e
- X130e
- X131e
- X140e
- X200
- X200s
- X200 Tablet
- X201
- X201i
- X201s
- X201si
- X201 Tablet
- X201i Tablet
- X220
- X220i
- X220 Tablet
- X220i Tablet
- X230
- X230i
- X230s
- X230 Tablet
- X230i Tablet
- X240
- X240s
- X250
- X260
- X270
- X280
- X300
- X301
- X390
- X395
- Z60m
- Z60t
- Z61e
- Z61m
- Z61p
- Z61t
- TransNote