thinkpad-acpi.txt 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725
  1. ThinkPad ACPI Extras Driver
  2. Version 0.14
  3. March 26th, 2007
  4. Borislav Deianov <borislav@users.sf.net>
  5. Henrique de Moraes Holschuh <hmh@hmh.eng.br>
  6. http://ibm-acpi.sf.net/
  7. This is a Linux driver for the IBM and Lenovo ThinkPad laptops. It
  8. supports various features of these laptops which are accessible
  9. through the ACPI and ACPI EC framework, but not otherwise fully
  10. supported by the generic Linux ACPI drivers.
  11. This driver used to be named ibm-acpi until kernel 2.6.21 and release
  12. 0.13-20070314. It used to be in the drivers/acpi tree, but it was
  13. moved to the drivers/misc tree and renamed to thinkpad-acpi for kernel
  14. 2.6.22, and release 0.14.
  15. Status
  16. ------
  17. The features currently supported are the following (see below for
  18. detailed description):
  19. - Fn key combinations
  20. - Bluetooth enable and disable
  21. - video output switching, expansion control
  22. - ThinkLight on and off
  23. - limited docking and undocking
  24. - UltraBay eject
  25. - CMOS control
  26. - LED control
  27. - ACPI sounds
  28. - temperature sensors
  29. - Experimental: embedded controller register dump
  30. - LCD brightness control
  31. - Volume control
  32. - Experimental: fan speed, fan enable/disable
  33. - Experimental: WAN enable and disable
  34. A compatibility table by model and feature is maintained on the web
  35. site, http://ibm-acpi.sf.net/. I appreciate any success or failure
  36. reports, especially if they add to or correct the compatibility table.
  37. Please include the following information in your report:
  38. - ThinkPad model name
  39. - a copy of your DSDT, from /proc/acpi/dsdt
  40. - a copy of the output of dmidecode, with serial numbers
  41. and UUIDs masked off
  42. - which driver features work and which don't
  43. - the observed behavior of non-working features
  44. Any other comments or patches are also more than welcome.
  45. Installation
  46. ------------
  47. If you are compiling this driver as included in the Linux kernel
  48. sources, simply enable the CONFIG_THINKPAD_ACPI option, and optionally
  49. enable the CONFIG_THINKPAD_ACPI_BAY option if you want the
  50. thinkpad-specific bay functionality.
  51. Features
  52. --------
  53. The driver creates the /proc/acpi/ibm directory. There is a file under
  54. that directory for each feature described below. Note that while the
  55. driver is still in the alpha stage, the exact proc file format and
  56. commands supported by the various features is guaranteed to change
  57. frequently.
  58. Driver version -- /proc/acpi/ibm/driver
  59. ---------------------------------------
  60. The driver name and version. No commands can be written to this file.
  61. Hot keys -- /proc/acpi/ibm/hotkey
  62. ---------------------------------
  63. Without this driver, only the Fn-F4 key (sleep button) generates an
  64. ACPI event. With the driver loaded, the hotkey feature enabled and the
  65. mask set (see below), the various hot keys generate ACPI events in the
  66. following format:
  67. ibm/hotkey HKEY 00000080 0000xxxx
  68. The last four digits vary depending on the key combination pressed.
  69. All labeled Fn-Fx key combinations generate distinct events. In
  70. addition, the lid microswitch and some docking station buttons may
  71. also generate such events.
  72. The following commands can be written to this file:
  73. echo enable > /proc/acpi/ibm/hotkey -- enable the hot keys feature
  74. echo disable > /proc/acpi/ibm/hotkey -- disable the hot keys feature
  75. echo 0xffff > /proc/acpi/ibm/hotkey -- enable all possible hot keys
  76. echo 0x0000 > /proc/acpi/ibm/hotkey -- disable all possible hot keys
  77. ... any other 4-hex-digit mask ...
  78. echo reset > /proc/acpi/ibm/hotkey -- restore the original mask
  79. The bit mask allows some control over which hot keys generate ACPI
  80. events. Not all bits in the mask can be modified. Not all bits that
  81. can be modified do anything. Not all hot keys can be individually
  82. controlled by the mask. Most recent ThinkPad models honor the
  83. following bits (assuming the hot keys feature has been enabled):
  84. key bit behavior when set behavior when unset
  85. Fn-F3 always generates ACPI event
  86. Fn-F4 always generates ACPI event
  87. Fn-F5 0010 generate ACPI event enable/disable Bluetooth
  88. Fn-F7 0040 generate ACPI event switch LCD and external display
  89. Fn-F8 0080 generate ACPI event expand screen or none
  90. Fn-F9 0100 generate ACPI event none
  91. Fn-F12 always generates ACPI event
  92. Some models do not support all of the above. For example, the T30 does
  93. not support Fn-F5 and Fn-F9. Other models do not support the mask at
  94. all. On those models, hot keys cannot be controlled individually.
  95. Note that enabling ACPI events for some keys prevents their default
  96. behavior. For example, if events for Fn-F5 are enabled, that key will
  97. no longer enable/disable Bluetooth by itself. This can still be done
  98. from an acpid handler for the ibm/hotkey event.
  99. Note also that not all Fn key combinations are supported through
  100. ACPI. For example, on the X40, the brightness, volume and "Access IBM"
  101. buttons do not generate ACPI events even with this driver. They *can*
  102. be used through the "ThinkPad Buttons" utility, see
  103. http://www.nongnu.org/tpb/
  104. Bluetooth -- /proc/acpi/ibm/bluetooth
  105. -------------------------------------
  106. This feature shows the presence and current state of a Bluetooth
  107. device. If Bluetooth is installed, the following commands can be used:
  108. echo enable > /proc/acpi/ibm/bluetooth
  109. echo disable > /proc/acpi/ibm/bluetooth
  110. Video output control -- /proc/acpi/ibm/video
  111. --------------------------------------------
  112. This feature allows control over the devices used for video output -
  113. LCD, CRT or DVI (if available). The following commands are available:
  114. echo lcd_enable > /proc/acpi/ibm/video
  115. echo lcd_disable > /proc/acpi/ibm/video
  116. echo crt_enable > /proc/acpi/ibm/video
  117. echo crt_disable > /proc/acpi/ibm/video
  118. echo dvi_enable > /proc/acpi/ibm/video
  119. echo dvi_disable > /proc/acpi/ibm/video
  120. echo auto_enable > /proc/acpi/ibm/video
  121. echo auto_disable > /proc/acpi/ibm/video
  122. echo expand_toggle > /proc/acpi/ibm/video
  123. echo video_switch > /proc/acpi/ibm/video
  124. Each video output device can be enabled or disabled individually.
  125. Reading /proc/acpi/ibm/video shows the status of each device.
  126. Automatic video switching can be enabled or disabled. When automatic
  127. video switching is enabled, certain events (e.g. opening the lid,
  128. docking or undocking) cause the video output device to change
  129. automatically. While this can be useful, it also causes flickering
  130. and, on the X40, video corruption. By disabling automatic switching,
  131. the flickering or video corruption can be avoided.
  132. The video_switch command cycles through the available video outputs
  133. (it simulates the behavior of Fn-F7).
  134. Video expansion can be toggled through this feature. This controls
  135. whether the display is expanded to fill the entire LCD screen when a
  136. mode with less than full resolution is used. Note that the current
  137. video expansion status cannot be determined through this feature.
  138. Note that on many models (particularly those using Radeon graphics
  139. chips) the X driver configures the video card in a way which prevents
  140. Fn-F7 from working. This also disables the video output switching
  141. features of this driver, as it uses the same ACPI methods as
  142. Fn-F7. Video switching on the console should still work.
  143. UPDATE: There's now a patch for the X.org Radeon driver which
  144. addresses this issue. Some people are reporting success with the patch
  145. while others are still having problems. For more information:
  146. https://bugs.freedesktop.org/show_bug.cgi?id=2000
  147. ThinkLight control -- /proc/acpi/ibm/light
  148. ------------------------------------------
  149. The current status of the ThinkLight can be found in this file. A few
  150. models which do not make the status available will show it as
  151. "unknown". The available commands are:
  152. echo on > /proc/acpi/ibm/light
  153. echo off > /proc/acpi/ibm/light
  154. Docking / undocking -- /proc/acpi/ibm/dock
  155. ------------------------------------------
  156. Docking and undocking (e.g. with the X4 UltraBase) requires some
  157. actions to be taken by the operating system to safely make or break
  158. the electrical connections with the dock.
  159. The docking feature of this driver generates the following ACPI events:
  160. ibm/dock GDCK 00000003 00000001 -- eject request
  161. ibm/dock GDCK 00000003 00000002 -- undocked
  162. ibm/dock GDCK 00000000 00000003 -- docked
  163. NOTE: These events will only be generated if the laptop was docked
  164. when originally booted. This is due to the current lack of support for
  165. hot plugging of devices in the Linux ACPI framework. If the laptop was
  166. booted while not in the dock, the following message is shown in the
  167. logs:
  168. Mar 17 01:42:34 aero kernel: thinkpad_acpi: dock device not present
  169. In this case, no dock-related events are generated but the dock and
  170. undock commands described below still work. They can be executed
  171. manually or triggered by Fn key combinations (see the example acpid
  172. configuration files included in the driver tarball package available
  173. on the web site).
  174. When the eject request button on the dock is pressed, the first event
  175. above is generated. The handler for this event should issue the
  176. following command:
  177. echo undock > /proc/acpi/ibm/dock
  178. After the LED on the dock goes off, it is safe to eject the laptop.
  179. Note: if you pressed this key by mistake, go ahead and eject the
  180. laptop, then dock it back in. Otherwise, the dock may not function as
  181. expected.
  182. When the laptop is docked, the third event above is generated. The
  183. handler for this event should issue the following command to fully
  184. enable the dock:
  185. echo dock > /proc/acpi/ibm/dock
  186. The contents of the /proc/acpi/ibm/dock file shows the current status
  187. of the dock, as provided by the ACPI framework.
  188. The docking support in this driver does not take care of enabling or
  189. disabling any other devices you may have attached to the dock. For
  190. example, a CD drive plugged into the UltraBase needs to be disabled or
  191. enabled separately. See the provided example acpid configuration files
  192. for how this can be accomplished.
  193. There is no support yet for PCI devices that may be attached to a
  194. docking station, e.g. in the ThinkPad Dock II. The driver currently
  195. does not recognize, enable or disable such devices. This means that
  196. the only docking stations currently supported are the X-series
  197. UltraBase docks and "dumb" port replicators like the Mini Dock (the
  198. latter don't need any ACPI support, actually).
  199. UltraBay eject -- /proc/acpi/ibm/bay
  200. ------------------------------------
  201. Inserting or ejecting an UltraBay device requires some actions to be
  202. taken by the operating system to safely make or break the electrical
  203. connections with the device.
  204. This feature generates the following ACPI events:
  205. ibm/bay MSTR 00000003 00000000 -- eject request
  206. ibm/bay MSTR 00000001 00000000 -- eject lever inserted
  207. NOTE: These events will only be generated if the UltraBay was present
  208. when the laptop was originally booted (on the X series, the UltraBay
  209. is in the dock, so it may not be present if the laptop was undocked).
  210. This is due to the current lack of support for hot plugging of devices
  211. in the Linux ACPI framework. If the laptop was booted without the
  212. UltraBay, the following message is shown in the logs:
  213. Mar 17 01:42:34 aero kernel: thinkpad_acpi: bay device not present
  214. In this case, no bay-related events are generated but the eject
  215. command described below still works. It can be executed manually or
  216. triggered by a hot key combination.
  217. Sliding the eject lever generates the first event shown above. The
  218. handler for this event should take whatever actions are necessary to
  219. shut down the device in the UltraBay (e.g. call idectl), then issue
  220. the following command:
  221. echo eject > /proc/acpi/ibm/bay
  222. After the LED on the UltraBay goes off, it is safe to pull out the
  223. device.
  224. When the eject lever is inserted, the second event above is
  225. generated. The handler for this event should take whatever actions are
  226. necessary to enable the UltraBay device (e.g. call idectl).
  227. The contents of the /proc/acpi/ibm/bay file shows the current status
  228. of the UltraBay, as provided by the ACPI framework.
  229. EXPERIMENTAL warm eject support on the 600e/x, A22p and A3x (To use
  230. this feature, you need to supply the experimental=1 parameter when
  231. loading the module):
  232. These models do not have a button near the UltraBay device to request
  233. a hot eject but rather require the laptop to be put to sleep
  234. (suspend-to-ram) before the bay device is ejected or inserted).
  235. The sequence of steps to eject the device is as follows:
  236. echo eject > /proc/acpi/ibm/bay
  237. put the ThinkPad to sleep
  238. remove the drive
  239. resume from sleep
  240. cat /proc/acpi/ibm/bay should show that the drive was removed
  241. On the A3x, both the UltraBay 2000 and UltraBay Plus devices are
  242. supported. Use "eject2" instead of "eject" for the second bay.
  243. Note: the UltraBay eject support on the 600e/x, A22p and A3x is
  244. EXPERIMENTAL and may not work as expected. USE WITH CAUTION!
  245. CMOS control -- /proc/acpi/ibm/cmos
  246. -----------------------------------
  247. This feature is used internally by the ACPI firmware to control the
  248. ThinkLight on most newer ThinkPad models. It may also control LCD
  249. brightness, sounds volume and more, but only on some models.
  250. The commands are non-negative integer numbers:
  251. echo 0 >/proc/acpi/ibm/cmos
  252. echo 1 >/proc/acpi/ibm/cmos
  253. echo 2 >/proc/acpi/ibm/cmos
  254. ...
  255. The range of valid numbers is 0 to 21, but not all have an effect and
  256. the behavior varies from model to model. Here is the behavior on the
  257. X40 (tpb is the ThinkPad Buttons utility):
  258. 0 - no effect but tpb reports "Volume down"
  259. 1 - no effect but tpb reports "Volume up"
  260. 2 - no effect but tpb reports "Mute on"
  261. 3 - simulate pressing the "Access IBM" button
  262. 4 - LCD brightness up
  263. 5 - LCD brightness down
  264. 11 - toggle screen expansion
  265. 12 - ThinkLight on
  266. 13 - ThinkLight off
  267. 14 - no effect but tpb reports ThinkLight status change
  268. LED control -- /proc/acpi/ibm/led
  269. ---------------------------------
  270. Some of the LED indicators can be controlled through this feature. The
  271. available commands are:
  272. echo '<led number> on' >/proc/acpi/ibm/led
  273. echo '<led number> off' >/proc/acpi/ibm/led
  274. echo '<led number> blink' >/proc/acpi/ibm/led
  275. The <led number> range is 0 to 7. The set of LEDs that can be
  276. controlled varies from model to model. Here is the mapping on the X40:
  277. 0 - power
  278. 1 - battery (orange)
  279. 2 - battery (green)
  280. 3 - UltraBase
  281. 4 - UltraBay
  282. 7 - standby
  283. All of the above can be turned on and off and can be made to blink.
  284. ACPI sounds -- /proc/acpi/ibm/beep
  285. ----------------------------------
  286. The BEEP method is used internally by the ACPI firmware to provide
  287. audible alerts in various situations. This feature allows the same
  288. sounds to be triggered manually.
  289. The commands are non-negative integer numbers:
  290. echo <number> >/proc/acpi/ibm/beep
  291. The valid <number> range is 0 to 17. Not all numbers trigger sounds
  292. and the sounds vary from model to model. Here is the behavior on the
  293. X40:
  294. 0 - stop a sound in progress (but use 17 to stop 16)
  295. 2 - two beeps, pause, third beep ("low battery")
  296. 3 - single beep
  297. 4 - high, followed by low-pitched beep ("unable")
  298. 5 - single beep
  299. 6 - very high, followed by high-pitched beep ("AC/DC")
  300. 7 - high-pitched beep
  301. 9 - three short beeps
  302. 10 - very long beep
  303. 12 - low-pitched beep
  304. 15 - three high-pitched beeps repeating constantly, stop with 0
  305. 16 - one medium-pitched beep repeating constantly, stop with 17
  306. 17 - stop 16
  307. Temperature sensors -- /proc/acpi/ibm/thermal
  308. ---------------------------------------------
  309. Most ThinkPads include six or more separate temperature sensors but
  310. only expose the CPU temperature through the standard ACPI methods.
  311. This feature shows readings from up to eight different sensors on older
  312. ThinkPads, and it has experimental support for up to sixteen different
  313. sensors on newer ThinkPads. Readings from sensors that are not available
  314. return -128.
  315. No commands can be written to this file.
  316. EXPERIMENTAL: The 16-sensors feature is marked EXPERIMENTAL because the
  317. implementation directly accesses hardware registers and may not work as
  318. expected. USE WITH CAUTION! To use this feature, you need to supply the
  319. experimental=1 parameter when loading the module. When EXPERIMENTAL
  320. mode is enabled, reading the first 8 sensors on newer ThinkPads will
  321. also use an new experimental thermal sensor access mode.
  322. For example, on the X40, a typical output may be:
  323. temperatures: 42 42 45 41 36 -128 33 -128
  324. EXPERIMENTAL: On the T43/p, a typical output may be:
  325. temperatures: 48 48 36 52 38 -128 31 -128 48 52 48 -128 -128 -128 -128 -128
  326. The mapping of thermal sensors to physical locations varies depending on
  327. system-board model (and thus, on ThinkPad model).
  328. http://thinkwiki.org/wiki/Thermal_Sensors is a public wiki page that
  329. tries to track down these locations for various models.
  330. Most (newer?) models seem to follow this pattern:
  331. 1: CPU
  332. 2: (depends on model)
  333. 3: (depends on model)
  334. 4: GPU
  335. 5: Main battery: main sensor
  336. 6: Bay battery: main sensor
  337. 7: Main battery: secondary sensor
  338. 8: Bay battery: secondary sensor
  339. 9-15: (depends on model)
  340. For the R51 (source: Thomas Gruber):
  341. 2: Mini-PCI
  342. 3: Internal HDD
  343. For the T43, T43/p (source: Shmidoax/Thinkwiki.org)
  344. http://thinkwiki.org/wiki/Thermal_Sensors#ThinkPad_T43.2C_T43p
  345. 2: System board, left side (near PCMCIA slot), reported as HDAPS temp
  346. 3: PCMCIA slot
  347. 9: MCH (northbridge) to DRAM Bus
  348. 10: ICH (southbridge), under Mini-PCI card, under touchpad
  349. 11: Power regulator, underside of system board, below F2 key
  350. The A31 has a very atypical layout for the thermal sensors
  351. (source: Milos Popovic, http://thinkwiki.org/wiki/Thermal_Sensors#ThinkPad_A31)
  352. 1: CPU
  353. 2: Main Battery: main sensor
  354. 3: Power Converter
  355. 4: Bay Battery: main sensor
  356. 5: MCH (northbridge)
  357. 6: PCMCIA/ambient
  358. 7: Main Battery: secondary sensor
  359. 8: Bay Battery: secondary sensor
  360. EXPERIMENTAL: Embedded controller register dump -- /proc/acpi/ibm/ecdump
  361. ------------------------------------------------------------------------
  362. This feature is marked EXPERIMENTAL because the implementation
  363. directly accesses hardware registers and may not work as expected. USE
  364. WITH CAUTION! To use this feature, you need to supply the
  365. experimental=1 parameter when loading the module.
  366. This feature dumps the values of 256 embedded controller
  367. registers. Values which have changed since the last time the registers
  368. were dumped are marked with a star:
  369. [root@x40 ibm-acpi]# cat /proc/acpi/ibm/ecdump
  370. EC +00 +01 +02 +03 +04 +05 +06 +07 +08 +09 +0a +0b +0c +0d +0e +0f
  371. EC 0x00: a7 47 87 01 fe 96 00 08 01 00 cb 00 00 00 40 00
  372. EC 0x10: 00 00 ff ff f4 3c 87 09 01 ff 42 01 ff ff 0d 00
  373. EC 0x20: 00 00 00 00 00 00 00 00 00 00 00 03 43 00 00 80
  374. EC 0x30: 01 07 1a 00 30 04 00 00 *85 00 00 10 00 50 00 00
  375. EC 0x40: 00 00 00 00 00 00 14 01 00 04 00 00 00 00 00 00
  376. EC 0x50: 00 c0 02 0d 00 01 01 02 02 03 03 03 03 *bc *02 *bc
  377. EC 0x60: *02 *bc *02 00 00 00 00 00 00 00 00 00 00 00 00 00
  378. EC 0x70: 00 00 00 00 00 12 30 40 *24 *26 *2c *27 *20 80 *1f 80
  379. EC 0x80: 00 00 00 06 *37 *0e 03 00 00 00 0e 07 00 00 00 00
  380. EC 0x90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  381. EC 0xa0: *ff 09 ff 09 ff ff *64 00 *00 *00 *a2 41 *ff *ff *e0 00
  382. EC 0xb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  383. EC 0xc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  384. EC 0xd0: 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  385. EC 0xe0: 00 00 00 00 00 00 00 00 11 20 49 04 24 06 55 03
  386. EC 0xf0: 31 55 48 54 35 38 57 57 08 2f 45 73 07 65 6c 1a
  387. This feature can be used to determine the register holding the fan
  388. speed on some models. To do that, do the following:
  389. - make sure the battery is fully charged
  390. - make sure the fan is running
  391. - run 'cat /proc/acpi/ibm/ecdump' several times, once per second or so
  392. The first step makes sure various charging-related values don't
  393. vary. The second ensures that the fan-related values do vary, since
  394. the fan speed fluctuates a bit. The third will (hopefully) mark the
  395. fan register with a star:
  396. [root@x40 ibm-acpi]# cat /proc/acpi/ibm/ecdump
  397. EC +00 +01 +02 +03 +04 +05 +06 +07 +08 +09 +0a +0b +0c +0d +0e +0f
  398. EC 0x00: a7 47 87 01 fe 96 00 08 01 00 cb 00 00 00 40 00
  399. EC 0x10: 00 00 ff ff f4 3c 87 09 01 ff 42 01 ff ff 0d 00
  400. EC 0x20: 00 00 00 00 00 00 00 00 00 00 00 03 43 00 00 80
  401. EC 0x30: 01 07 1a 00 30 04 00 00 85 00 00 10 00 50 00 00
  402. EC 0x40: 00 00 00 00 00 00 14 01 00 04 00 00 00 00 00 00
  403. EC 0x50: 00 c0 02 0d 00 01 01 02 02 03 03 03 03 bc 02 bc
  404. EC 0x60: 02 bc 02 00 00 00 00 00 00 00 00 00 00 00 00 00
  405. EC 0x70: 00 00 00 00 00 12 30 40 24 27 2c 27 21 80 1f 80
  406. EC 0x80: 00 00 00 06 *be 0d 03 00 00 00 0e 07 00 00 00 00
  407. EC 0x90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  408. EC 0xa0: ff 09 ff 09 ff ff 64 00 00 00 a2 41 ff ff e0 00
  409. EC 0xb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  410. EC 0xc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  411. EC 0xd0: 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  412. EC 0xe0: 00 00 00 00 00 00 00 00 11 20 49 04 24 06 55 03
  413. EC 0xf0: 31 55 48 54 35 38 57 57 08 2f 45 73 07 65 6c 1a
  414. Another set of values that varies often is the temperature
  415. readings. Since temperatures don't change vary fast, you can take
  416. several quick dumps to eliminate them.
  417. You can use a similar method to figure out the meaning of other
  418. embedded controller registers - e.g. make sure nothing else changes
  419. except the charging or discharging battery to determine which
  420. registers contain the current battery capacity, etc. If you experiment
  421. with this, do send me your results (including some complete dumps with
  422. a description of the conditions when they were taken.)
  423. LCD brightness control -- /proc/acpi/ibm/brightness
  424. ---------------------------------------------------
  425. This feature allows software control of the LCD brightness on ThinkPad
  426. models which don't have a hardware brightness slider. The available
  427. commands are:
  428. echo up >/proc/acpi/ibm/brightness
  429. echo down >/proc/acpi/ibm/brightness
  430. echo 'level <level>' >/proc/acpi/ibm/brightness
  431. The <level> number range is 0 to 7, although not all of them may be
  432. distinct. The current brightness level is shown in the file.
  433. Volume control -- /proc/acpi/ibm/volume
  434. ---------------------------------------
  435. This feature allows volume control on ThinkPad models which don't have
  436. a hardware volume knob. The available commands are:
  437. echo up >/proc/acpi/ibm/volume
  438. echo down >/proc/acpi/ibm/volume
  439. echo mute >/proc/acpi/ibm/volume
  440. echo 'level <level>' >/proc/acpi/ibm/volume
  441. The <level> number range is 0 to 15 although not all of them may be
  442. distinct. The unmute the volume after the mute command, use either the
  443. up or down command (the level command will not unmute the volume).
  444. The current volume level and mute state is shown in the file.
  445. EXPERIMENTAL: fan speed, fan enable/disable -- /proc/acpi/ibm/fan
  446. -----------------------------------------------------------------
  447. This feature is marked EXPERIMENTAL because the implementation
  448. directly accesses hardware registers and may not work as expected. USE
  449. WITH CAUTION! To use this feature, you need to supply the
  450. experimental=1 parameter when loading the module.
  451. This feature attempts to show the current fan speed, control mode and
  452. other fan data that might be available. The speed is read directly
  453. from the hardware registers of the embedded controller. This is known
  454. to work on later R, T and X series ThinkPads but may show a bogus
  455. value on other models.
  456. Most ThinkPad fans work in "levels". Level 0 stops the fan. The higher
  457. the level, the higher the fan speed, although adjacent levels often map
  458. to the same fan speed. 7 is the highest level, where the fan reaches
  459. the maximum recommended speed. Level "auto" means the EC changes the
  460. fan level according to some internal algorithm, usually based on
  461. readings from the thermal sensors. Level "disengaged" means the EC
  462. disables the speed-locked closed-loop fan control, and drives the fan as
  463. fast as it can go, which might exceed hardware limits, so use this level
  464. with caution.
  465. The fan usually ramps up or down slowly from one speed to another,
  466. and it is normal for the EC to take several seconds to react to fan
  467. commands.
  468. The fan may be enabled or disabled with the following commands:
  469. echo enable >/proc/acpi/ibm/fan
  470. echo disable >/proc/acpi/ibm/fan
  471. Placing a fan on level 0 is the same as disabling it. Enabling a fan
  472. will try to place it in a safe level if it is too slow or disabled.
  473. WARNING WARNING WARNING: do not leave the fan disabled unless you are
  474. monitoring all of the temperature sensor readings and you are ready to
  475. enable it if necessary to avoid overheating.
  476. An enabled fan in level "auto" may stop spinning if the EC decides the
  477. ThinkPad is cool enough and doesn't need the extra airflow. This is
  478. normal, and the EC will spin the fan up if the varios thermal readings
  479. rise too much.
  480. On the X40, this seems to depend on the CPU and HDD temperatures.
  481. Specifically, the fan is turned on when either the CPU temperature
  482. climbs to 56 degrees or the HDD temperature climbs to 46 degrees. The
  483. fan is turned off when the CPU temperature drops to 49 degrees and the
  484. HDD temperature drops to 41 degrees. These thresholds cannot
  485. currently be controlled.
  486. The fan level can be controlled with the command:
  487. echo 'level <level>' > /proc/acpi/ibm/thermal
  488. Where <level> is an integer from 0 to 7, or one of the words "auto"
  489. or "disengaged" (without the quotes). Not all ThinkPads support the
  490. "auto" and "disengaged" levels.
  491. On the X31 and X40 (and ONLY on those models), the fan speed can be
  492. controlled to a certain degree. Once the fan is running, it can be
  493. forced to run faster or slower with the following command:
  494. echo 'speed <speed>' > /proc/acpi/ibm/thermal
  495. The sustainable range of fan speeds on the X40 appears to be from
  496. about 3700 to about 7350. Values outside this range either do not have
  497. any effect or the fan speed eventually settles somewhere in that
  498. range. The fan cannot be stopped or started with this command.
  499. The ThinkPad's ACPI DSDT code will reprogram the fan on its own when
  500. certain conditions are met. It will override any fan programming done
  501. through thinkpad-acpi.
  502. The thinkpad-acpi kernel driver can be programmed to revert the fan
  503. level to a safe setting if userspace does not issue one of the fan
  504. commands: "enable", "disable", "level" or "watchdog" within a
  505. configurable ammount of time. To do this, use the "watchdog" command.
  506. echo 'watchdog <interval>' > /proc/acpi/ibm/fan
  507. Interval is the ammount of time in seconds to wait for one of the
  508. above mentioned fan commands before reseting the fan level to a safe
  509. one. If set to zero, the watchdog is disabled (default). When the
  510. watchdog timer runs out, it does the exact equivalent of the "enable"
  511. fan command.
  512. Note that the watchdog timer stops after it enables the fan. It will
  513. be rearmed again automatically (using the same interval) when one of
  514. the above mentioned fan commands is received. The fan watchdog is,
  515. therefore, not suitable to protect against fan mode changes made
  516. through means other than the "enable", "disable", and "level" fan
  517. commands.
  518. EXPERIMENTAL: WAN -- /proc/acpi/ibm/wan
  519. ---------------------------------------
  520. This feature is marked EXPERIMENTAL because the implementation
  521. directly accesses hardware registers and may not work as expected. USE
  522. WITH CAUTION! To use this feature, you need to supply the
  523. experimental=1 parameter when loading the module.
  524. This feature shows the presence and current state of a WAN (Sierra
  525. Wireless EV-DO) device. If WAN is installed, the following commands can
  526. be used:
  527. echo enable > /proc/acpi/ibm/wan
  528. echo disable > /proc/acpi/ibm/wan
  529. It was tested on a Lenovo Thinkpad X60. It should probably work on other
  530. Thinkpad models which come with this module installed.
  531. Multiple Commands, Module Parameters
  532. ------------------------------------
  533. Multiple commands can be written to the proc files in one shot by
  534. separating them with commas, for example:
  535. echo enable,0xffff > /proc/acpi/ibm/hotkey
  536. echo lcd_disable,crt_enable > /proc/acpi/ibm/video
  537. Commands can also be specified when loading the thinkpad-acpi module,
  538. for example:
  539. modprobe thinkpad_acpi hotkey=enable,0xffff video=auto_disable
  540. Enabling debugging output
  541. -------------------------
  542. The module takes a debug paramater which can be used to selectively
  543. enable various classes of debugging output, for example:
  544. modprobe ibm_acpi debug=0xffff
  545. will enable all debugging output classes. It takes a bitmask, so
  546. to enable more than one output class, just add their values.
  547. Debug bitmask Description
  548. 0x0001 Initialization and probing
  549. 0x0002 Removal
  550. There is also a kernel build option to enable more debugging
  551. information, which may be necessary to debug driver problems.
  552. Force loading of module
  553. -----------------------
  554. If thinkpad-acpi refuses to detect your ThinkPad, you can try to specify
  555. the module parameter force_load=1. Regardless of whether this works or
  556. not, please contact ibm-acpi-devel@lists.sourceforge.net with a report.