ibm-acpi.txt 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664
  1. IBM ThinkPad ACPI Extras Driver
  2. Version 0.12
  3. 17 August 2005
  4. Borislav Deianov <borislav@users.sf.net>
  5. http://ibm-acpi.sf.net/
  6. This is a Linux ACPI driver for the IBM ThinkPad laptops. It supports
  7. various features of these laptops which are accessible through the
  8. ACPI framework but not otherwise supported by the generic Linux ACPI
  9. drivers.
  10. Status
  11. ------
  12. The features currently supported are the following (see below for
  13. detailed description):
  14. - Fn key combinations
  15. - Bluetooth enable and disable
  16. - video output switching, expansion control
  17. - ThinkLight on and off
  18. - limited docking and undocking
  19. - UltraBay eject
  20. - CMOS control
  21. - LED control
  22. - ACPI sounds
  23. - temperature sensors
  24. - Experimental: embedded controller register dump
  25. - Experimental: LCD brightness control
  26. - Experimental: volume control
  27. - Experimental: fan speed, fan enable/disable
  28. A compatibility table by model and feature is maintained on the web
  29. site, http://ibm-acpi.sf.net/. I appreciate any success or failure
  30. reports, especially if they add to or correct the compatibility table.
  31. Please include the following information in your report:
  32. - ThinkPad model name
  33. - a copy of your DSDT, from /proc/acpi/dsdt
  34. - which driver features work and which don't
  35. - the observed behavior of non-working features
  36. Any other comments or patches are also more than welcome.
  37. Installation
  38. ------------
  39. If you are compiling this driver as included in the Linux kernel
  40. sources, simply enable the CONFIG_ACPI_IBM option (Power Management /
  41. ACPI / IBM ThinkPad Laptop Extras). The rest of this section describes
  42. how to install this driver when downloaded from the web site.
  43. First, you need to get a kernel with ACPI support up and running.
  44. Please refer to http://acpi.sourceforge.net/ for help with this
  45. step. How successful you will be depends a lot on you ThinkPad model,
  46. the kernel you are using and any additional patches applied. The
  47. kernel provided with your distribution may not be good enough. I
  48. needed to compile a 2.6.7 kernel with the 20040715 ACPI patch to get
  49. ACPI working reliably on my ThinkPad X40. Old ThinkPad models may not
  50. be supported at all.
  51. Assuming you have the basic ACPI support working (e.g. you can see the
  52. /proc/acpi directory), follow the following steps to install this
  53. driver:
  54. - unpack the archive:
  55. tar xzvf ibm-acpi-x.y.tar.gz; cd ibm-acpi-x.y
  56. - compile the driver:
  57. make
  58. - install the module in your kernel modules directory:
  59. make install
  60. - load the module:
  61. modprobe ibm_acpi
  62. After loading the module, check the "dmesg" output for any error messages.
  63. Features
  64. --------
  65. The driver creates the /proc/acpi/ibm directory. There is a file under
  66. that directory for each feature described below. Note that while the
  67. driver is still in the alpha stage, the exact proc file format and
  68. commands supported by the various features is guaranteed to change
  69. frequently.
  70. Driver version -- /proc/acpi/ibm/driver
  71. ---------------------------------------
  72. The driver name and version. No commands can be written to this file.
  73. Hot keys -- /proc/acpi/ibm/hotkey
  74. ---------------------------------
  75. Without this driver, only the Fn-F4 key (sleep button) generates an
  76. ACPI event. With the driver loaded, the hotkey feature enabled and the
  77. mask set (see below), the various hot keys generate ACPI events in the
  78. following format:
  79. ibm/hotkey HKEY 00000080 0000xxxx
  80. The last four digits vary depending on the key combination pressed.
  81. All labeled Fn-Fx key combinations generate distinct events. In
  82. addition, the lid microswitch and some docking station buttons may
  83. also generate such events.
  84. The following commands can be written to this file:
  85. echo enable > /proc/acpi/ibm/hotkey -- enable the hot keys feature
  86. echo disable > /proc/acpi/ibm/hotkey -- disable the hot keys feature
  87. echo 0xffff > /proc/acpi/ibm/hotkey -- enable all possible hot keys
  88. echo 0x0000 > /proc/acpi/ibm/hotkey -- disable all possible hot keys
  89. ... any other 4-hex-digit mask ...
  90. echo reset > /proc/acpi/ibm/hotkey -- restore the original mask
  91. The bit mask allows some control over which hot keys generate ACPI
  92. events. Not all bits in the mask can be modified. Not all bits that
  93. can be modified do anything. Not all hot keys can be individually
  94. controlled by the mask. Most recent ThinkPad models honor the
  95. following bits (assuming the hot keys feature has been enabled):
  96. key bit behavior when set behavior when unset
  97. Fn-F3 always generates ACPI event
  98. Fn-F4 always generates ACPI event
  99. Fn-F5 0010 generate ACPI event enable/disable Bluetooth
  100. Fn-F7 0040 generate ACPI event switch LCD and external display
  101. Fn-F8 0080 generate ACPI event expand screen or none
  102. Fn-F9 0100 generate ACPI event none
  103. Fn-F12 always generates ACPI event
  104. Some models do not support all of the above. For example, the T30 does
  105. not support Fn-F5 and Fn-F9. Other models do not support the mask at
  106. all. On those models, hot keys cannot be controlled individually.
  107. Note that enabling ACPI events for some keys prevents their default
  108. behavior. For example, if events for Fn-F5 are enabled, that key will
  109. no longer enable/disable Bluetooth by itself. This can still be done
  110. from an acpid handler for the ibm/hotkey event.
  111. Note also that not all Fn key combinations are supported through
  112. ACPI. For example, on the X40, the brightness, volume and "Access IBM"
  113. buttons do not generate ACPI events even with this driver. They *can*
  114. be used through the "ThinkPad Buttons" utility, see
  115. http://www.nongnu.org/tpb/
  116. Bluetooth -- /proc/acpi/ibm/bluetooth
  117. -------------------------------------
  118. This feature shows the presence and current state of a Bluetooth
  119. device. If Bluetooth is installed, the following commands can be used:
  120. echo enable > /proc/acpi/ibm/bluetooth
  121. echo disable > /proc/acpi/ibm/bluetooth
  122. Video output control -- /proc/acpi/ibm/video
  123. --------------------------------------------
  124. This feature allows control over the devices used for video output -
  125. LCD, CRT or DVI (if available). The following commands are available:
  126. echo lcd_enable > /proc/acpi/ibm/video
  127. echo lcd_disable > /proc/acpi/ibm/video
  128. echo crt_enable > /proc/acpi/ibm/video
  129. echo crt_disable > /proc/acpi/ibm/video
  130. echo dvi_enable > /proc/acpi/ibm/video
  131. echo dvi_disable > /proc/acpi/ibm/video
  132. echo auto_enable > /proc/acpi/ibm/video
  133. echo auto_disable > /proc/acpi/ibm/video
  134. echo expand_toggle > /proc/acpi/ibm/video
  135. echo video_switch > /proc/acpi/ibm/video
  136. Each video output device can be enabled or disabled individually.
  137. Reading /proc/acpi/ibm/video shows the status of each device.
  138. Automatic video switching can be enabled or disabled. When automatic
  139. video switching is enabled, certain events (e.g. opening the lid,
  140. docking or undocking) cause the video output device to change
  141. automatically. While this can be useful, it also causes flickering
  142. and, on the X40, video corruption. By disabling automatic switching,
  143. the flickering or video corruption can be avoided.
  144. The video_switch command cycles through the available video outputs
  145. (it simulates the behavior of Fn-F7).
  146. Video expansion can be toggled through this feature. This controls
  147. whether the display is expanded to fill the entire LCD screen when a
  148. mode with less than full resolution is used. Note that the current
  149. video expansion status cannot be determined through this feature.
  150. Note that on many models (particularly those using Radeon graphics
  151. chips) the X driver configures the video card in a way which prevents
  152. Fn-F7 from working. This also disables the video output switching
  153. features of this driver, as it uses the same ACPI methods as
  154. Fn-F7. Video switching on the console should still work.
  155. UPDATE: There's now a patch for the X.org Radeon driver which
  156. addresses this issue. Some people are reporting success with the patch
  157. while others are still having problems. For more information:
  158. https://bugs.freedesktop.org/show_bug.cgi?id=2000
  159. ThinkLight control -- /proc/acpi/ibm/light
  160. ------------------------------------------
  161. The current status of the ThinkLight can be found in this file. A few
  162. models which do not make the status available will show it as
  163. "unknown". The available commands are:
  164. echo on > /proc/acpi/ibm/light
  165. echo off > /proc/acpi/ibm/light
  166. Docking / undocking -- /proc/acpi/ibm/dock
  167. ------------------------------------------
  168. Docking and undocking (e.g. with the X4 UltraBase) requires some
  169. actions to be taken by the operating system to safely make or break
  170. the electrical connections with the dock.
  171. The docking feature of this driver generates the following ACPI events:
  172. ibm/dock GDCK 00000003 00000001 -- eject request
  173. ibm/dock GDCK 00000003 00000002 -- undocked
  174. ibm/dock GDCK 00000000 00000003 -- docked
  175. NOTE: These events will only be generated if the laptop was docked
  176. when originally booted. This is due to the current lack of support for
  177. hot plugging of devices in the Linux ACPI framework. If the laptop was
  178. booted while not in the dock, the following message is shown in the
  179. logs:
  180. Mar 17 01:42:34 aero kernel: ibm_acpi: dock device not present
  181. In this case, no dock-related events are generated but the dock and
  182. undock commands described below still work. They can be executed
  183. manually or triggered by Fn key combinations (see the example acpid
  184. configuration files included in the driver tarball package available
  185. on the web site).
  186. When the eject request button on the dock is pressed, the first event
  187. above is generated. The handler for this event should issue the
  188. following command:
  189. echo undock > /proc/acpi/ibm/dock
  190. After the LED on the dock goes off, it is safe to eject the laptop.
  191. Note: if you pressed this key by mistake, go ahead and eject the
  192. laptop, then dock it back in. Otherwise, the dock may not function as
  193. expected.
  194. When the laptop is docked, the third event above is generated. The
  195. handler for this event should issue the following command to fully
  196. enable the dock:
  197. echo dock > /proc/acpi/ibm/dock
  198. The contents of the /proc/acpi/ibm/dock file shows the current status
  199. of the dock, as provided by the ACPI framework.
  200. The docking support in this driver does not take care of enabling or
  201. disabling any other devices you may have attached to the dock. For
  202. example, a CD drive plugged into the UltraBase needs to be disabled or
  203. enabled separately. See the provided example acpid configuration files
  204. for how this can be accomplished.
  205. There is no support yet for PCI devices that may be attached to a
  206. docking station, e.g. in the ThinkPad Dock II. The driver currently
  207. does not recognize, enable or disable such devices. This means that
  208. the only docking stations currently supported are the X-series
  209. UltraBase docks and "dumb" port replicators like the Mini Dock (the
  210. latter don't need any ACPI support, actually).
  211. UltraBay eject -- /proc/acpi/ibm/bay
  212. ------------------------------------
  213. Inserting or ejecting an UltraBay device requires some actions to be
  214. taken by the operating system to safely make or break the electrical
  215. connections with the device.
  216. This feature generates the following ACPI events:
  217. ibm/bay MSTR 00000003 00000000 -- eject request
  218. ibm/bay MSTR 00000001 00000000 -- eject lever inserted
  219. NOTE: These events will only be generated if the UltraBay was present
  220. when the laptop was originally booted (on the X series, the UltraBay
  221. is in the dock, so it may not be present if the laptop was undocked).
  222. This is due to the current lack of support for hot plugging of devices
  223. in the Linux ACPI framework. If the laptop was booted without the
  224. UltraBay, the following message is shown in the logs:
  225. Mar 17 01:42:34 aero kernel: ibm_acpi: bay device not present
  226. In this case, no bay-related events are generated but the eject
  227. command described below still works. It can be executed manually or
  228. triggered by a hot key combination.
  229. Sliding the eject lever generates the first event shown above. The
  230. handler for this event should take whatever actions are necessary to
  231. shut down the device in the UltraBay (e.g. call idectl), then issue
  232. the following command:
  233. echo eject > /proc/acpi/ibm/bay
  234. After the LED on the UltraBay goes off, it is safe to pull out the
  235. device.
  236. When the eject lever is inserted, the second event above is
  237. generated. The handler for this event should take whatever actions are
  238. necessary to enable the UltraBay device (e.g. call idectl).
  239. The contents of the /proc/acpi/ibm/bay file shows the current status
  240. of the UltraBay, as provided by the ACPI framework.
  241. EXPERIMENTAL warm eject support on the 600e/x, A22p and A3x (To use
  242. this feature, you need to supply the experimental=1 parameter when
  243. loading the module):
  244. These models do not have a button near the UltraBay device to request
  245. a hot eject but rather require the laptop to be put to sleep
  246. (suspend-to-ram) before the bay device is ejected or inserted).
  247. The sequence of steps to eject the device is as follows:
  248. echo eject > /proc/acpi/ibm/bay
  249. put the ThinkPad to sleep
  250. remove the drive
  251. resume from sleep
  252. cat /proc/acpi/ibm/bay should show that the drive was removed
  253. On the A3x, both the UltraBay 2000 and UltraBay Plus devices are
  254. supported. Use "eject2" instead of "eject" for the second bay.
  255. Note: the UltraBay eject support on the 600e/x, A22p and A3x is
  256. EXPERIMENTAL and may not work as expected. USE WITH CAUTION!
  257. CMOS control -- /proc/acpi/ibm/cmos
  258. -----------------------------------
  259. This feature is used internally by the ACPI firmware to control the
  260. ThinkLight on most newer ThinkPad models. It may also control LCD
  261. brightness, sounds volume and more, but only on some models.
  262. The commands are non-negative integer numbers:
  263. echo 0 >/proc/acpi/ibm/cmos
  264. echo 1 >/proc/acpi/ibm/cmos
  265. echo 2 >/proc/acpi/ibm/cmos
  266. ...
  267. The range of valid numbers is 0 to 21, but not all have an effect and
  268. the behavior varies from model to model. Here is the behavior on the
  269. X40 (tpb is the ThinkPad Buttons utility):
  270. 0 - no effect but tpb reports "Volume down"
  271. 1 - no effect but tpb reports "Volume up"
  272. 2 - no effect but tpb reports "Mute on"
  273. 3 - simulate pressing the "Access IBM" button
  274. 4 - LCD brightness up
  275. 5 - LCD brightness down
  276. 11 - toggle screen expansion
  277. 12 - ThinkLight on
  278. 13 - ThinkLight off
  279. 14 - no effect but tpb reports ThinkLight status change
  280. LED control -- /proc/acpi/ibm/led
  281. ---------------------------------
  282. Some of the LED indicators can be controlled through this feature. The
  283. available commands are:
  284. echo '<led number> on' >/proc/acpi/ibm/led
  285. echo '<led number> off' >/proc/acpi/ibm/led
  286. echo '<led number> blink' >/proc/acpi/ibm/led
  287. The <led number> range is 0 to 7. The set of LEDs that can be
  288. controlled varies from model to model. Here is the mapping on the X40:
  289. 0 - power
  290. 1 - battery (orange)
  291. 2 - battery (green)
  292. 3 - UltraBase
  293. 4 - UltraBay
  294. 7 - standby
  295. All of the above can be turned on and off and can be made to blink.
  296. ACPI sounds -- /proc/acpi/ibm/beep
  297. ----------------------------------
  298. The BEEP method is used internally by the ACPI firmware to provide
  299. audible alerts in various situations. This feature allows the same
  300. sounds to be triggered manually.
  301. The commands are non-negative integer numbers:
  302. echo <number> >/proc/acpi/ibm/beep
  303. The valid <number> range is 0 to 17. Not all numbers trigger sounds
  304. and the sounds vary from model to model. Here is the behavior on the
  305. X40:
  306. 0 - stop a sound in progress (but use 17 to stop 16)
  307. 2 - two beeps, pause, third beep ("low battery")
  308. 3 - single beep
  309. 4 - high, followed by low-pitched beep ("unable")
  310. 5 - single beep
  311. 6 - very high, followed by high-pitched beep ("AC/DC")
  312. 7 - high-pitched beep
  313. 9 - three short beeps
  314. 10 - very long beep
  315. 12 - low-pitched beep
  316. 15 - three high-pitched beeps repeating constantly, stop with 0
  317. 16 - one medium-pitched beep repeating constantly, stop with 17
  318. 17 - stop 16
  319. Temperature sensors -- /proc/acpi/ibm/thermal
  320. ---------------------------------------------
  321. Most ThinkPads include six or more separate temperature sensors but
  322. only expose the CPU temperature through the standard ACPI methods.
  323. This feature shows readings from up to eight different sensors. Some
  324. readings may not be valid, e.g. may show large negative values. For
  325. example, on the X40, a typical output may be:
  326. temperatures: 42 42 45 41 36 -128 33 -128
  327. Thomas Gruber took his R51 apart and traced all six active sensors in
  328. his laptop (the location of sensors may vary on other models):
  329. 1: CPU
  330. 2: Mini PCI Module
  331. 3: HDD
  332. 4: GPU
  333. 5: Battery
  334. 6: N/A
  335. 7: Battery
  336. 8: N/A
  337. No commands can be written to this file.
  338. EXPERIMENTAL: Embedded controller reigster dump -- /proc/acpi/ibm/ecdump
  339. ------------------------------------------------------------------------
  340. This feature is marked EXPERIMENTAL because the implementation
  341. directly accesses hardware registers and may not work as expected. USE
  342. WITH CAUTION! To use this feature, you need to supply the
  343. experimental=1 parameter when loading the module.
  344. This feature dumps the values of 256 embedded controller
  345. registers. Values which have changed since the last time the registers
  346. were dumped are marked with a star:
  347. [root@x40 ibm-acpi]# cat /proc/acpi/ibm/ecdump
  348. EC +00 +01 +02 +03 +04 +05 +06 +07 +08 +09 +0a +0b +0c +0d +0e +0f
  349. EC 0x00: a7 47 87 01 fe 96 00 08 01 00 cb 00 00 00 40 00
  350. EC 0x10: 00 00 ff ff f4 3c 87 09 01 ff 42 01 ff ff 0d 00
  351. EC 0x20: 00 00 00 00 00 00 00 00 00 00 00 03 43 00 00 80
  352. EC 0x30: 01 07 1a 00 30 04 00 00 *85 00 00 10 00 50 00 00
  353. EC 0x40: 00 00 00 00 00 00 14 01 00 04 00 00 00 00 00 00
  354. EC 0x50: 00 c0 02 0d 00 01 01 02 02 03 03 03 03 *bc *02 *bc
  355. EC 0x60: *02 *bc *02 00 00 00 00 00 00 00 00 00 00 00 00 00
  356. EC 0x70: 00 00 00 00 00 12 30 40 *24 *26 *2c *27 *20 80 *1f 80
  357. EC 0x80: 00 00 00 06 *37 *0e 03 00 00 00 0e 07 00 00 00 00
  358. EC 0x90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  359. EC 0xa0: *ff 09 ff 09 ff ff *64 00 *00 *00 *a2 41 *ff *ff *e0 00
  360. EC 0xb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  361. EC 0xc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  362. EC 0xd0: 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  363. EC 0xe0: 00 00 00 00 00 00 00 00 11 20 49 04 24 06 55 03
  364. EC 0xf0: 31 55 48 54 35 38 57 57 08 2f 45 73 07 65 6c 1a
  365. This feature can be used to determine the register holding the fan
  366. speed on some models. To do that, do the following:
  367. - make sure the battery is fully charged
  368. - make sure the fan is running
  369. - run 'cat /proc/acpi/ibm/ecdump' several times, once per second or so
  370. The first step makes sure various charging-related values don't
  371. vary. The second ensures that the fan-related values do vary, since
  372. the fan speed fluctuates a bit. The third will (hopefully) mark the
  373. fan register with a star:
  374. [root@x40 ibm-acpi]# cat /proc/acpi/ibm/ecdump
  375. EC +00 +01 +02 +03 +04 +05 +06 +07 +08 +09 +0a +0b +0c +0d +0e +0f
  376. EC 0x00: a7 47 87 01 fe 96 00 08 01 00 cb 00 00 00 40 00
  377. EC 0x10: 00 00 ff ff f4 3c 87 09 01 ff 42 01 ff ff 0d 00
  378. EC 0x20: 00 00 00 00 00 00 00 00 00 00 00 03 43 00 00 80
  379. EC 0x30: 01 07 1a 00 30 04 00 00 85 00 00 10 00 50 00 00
  380. EC 0x40: 00 00 00 00 00 00 14 01 00 04 00 00 00 00 00 00
  381. EC 0x50: 00 c0 02 0d 00 01 01 02 02 03 03 03 03 bc 02 bc
  382. EC 0x60: 02 bc 02 00 00 00 00 00 00 00 00 00 00 00 00 00
  383. EC 0x70: 00 00 00 00 00 12 30 40 24 27 2c 27 21 80 1f 80
  384. EC 0x80: 00 00 00 06 *be 0d 03 00 00 00 0e 07 00 00 00 00
  385. EC 0x90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  386. EC 0xa0: ff 09 ff 09 ff ff 64 00 00 00 a2 41 ff ff e0 00
  387. EC 0xb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  388. EC 0xc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  389. EC 0xd0: 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  390. EC 0xe0: 00 00 00 00 00 00 00 00 11 20 49 04 24 06 55 03
  391. EC 0xf0: 31 55 48 54 35 38 57 57 08 2f 45 73 07 65 6c 1a
  392. Another set of values that varies often is the temperature
  393. readings. Since temperatures don't change vary fast, you can take
  394. several quick dumps to eliminate them.
  395. You can use a similar method to figure out the meaning of other
  396. embedded controller registers - e.g. make sure nothing else changes
  397. except the charging or discharging battery to determine which
  398. registers contain the current battery capacity, etc. If you experiment
  399. with this, do send me your results (including some complete dumps with
  400. a description of the conditions when they were taken.)
  401. EXPERIMENTAL: LCD brightness control -- /proc/acpi/ibm/brightness
  402. -----------------------------------------------------------------
  403. This feature is marked EXPERIMENTAL because the implementation
  404. directly accesses hardware registers and may not work as expected. USE
  405. WITH CAUTION! To use this feature, you need to supply the
  406. experimental=1 parameter when loading the module.
  407. This feature allows software control of the LCD brightness on ThinkPad
  408. models which don't have a hardware brightness slider. The available
  409. commands are:
  410. echo up >/proc/acpi/ibm/brightness
  411. echo down >/proc/acpi/ibm/brightness
  412. echo 'level <level>' >/proc/acpi/ibm/brightness
  413. The <level> number range is 0 to 7, although not all of them may be
  414. distinct. The current brightness level is shown in the file.
  415. EXPERIMENTAL: Volume control -- /proc/acpi/ibm/volume
  416. -----------------------------------------------------
  417. This feature is marked EXPERIMENTAL because the implementation
  418. directly accesses hardware registers and may not work as expected. USE
  419. WITH CAUTION! To use this feature, you need to supply the
  420. experimental=1 parameter when loading the module.
  421. This feature allows volume control on ThinkPad models which don't have
  422. a hardware volume knob. The available commands are:
  423. echo up >/proc/acpi/ibm/volume
  424. echo down >/proc/acpi/ibm/volume
  425. echo mute >/proc/acpi/ibm/volume
  426. echo 'level <level>' >/proc/acpi/ibm/volume
  427. The <level> number range is 0 to 15 although not all of them may be
  428. distinct. The unmute the volume after the mute command, use either the
  429. up or down command (the level command will not unmute the volume).
  430. The current volume level and mute state is shown in the file.
  431. EXPERIMENTAL: fan speed, fan enable/disable -- /proc/acpi/ibm/fan
  432. -----------------------------------------------------------------
  433. This feature is marked EXPERIMENTAL because the implementation
  434. directly accesses hardware registers and may not work as expected. USE
  435. WITH CAUTION! To use this feature, you need to supply the
  436. experimental=1 parameter when loading the module.
  437. This feature attempts to show the current fan speed. The speed is read
  438. directly from the hardware registers of the embedded controller. This
  439. is known to work on later R, T and X series ThinkPads but may show a
  440. bogus value on other models.
  441. The fan may be enabled or disabled with the following commands:
  442. echo enable >/proc/acpi/ibm/fan
  443. echo disable >/proc/acpi/ibm/fan
  444. WARNING WARNING WARNING: do not leave the fan disabled unless you are
  445. monitoring the temperature sensor readings and you are ready to enable
  446. it if necessary to avoid overheating.
  447. The fan only runs if it's enabled *and* the various temperature
  448. sensors which control it read high enough. On the X40, this seems to
  449. depend on the CPU and HDD temperatures. Specifically, the fan is
  450. turned on when either the CPU temperature climbs to 56 degrees or the
  451. HDD temperature climbs to 46 degrees. The fan is turned off when the
  452. CPU temperature drops to 49 degrees and the HDD temperature drops to
  453. 41 degrees. These thresholds cannot currently be controlled.
  454. On the X31 and X40 (and ONLY on those models), the fan speed can be
  455. controlled to a certain degree. Once the fan is running, it can be
  456. forced to run faster or slower with the following command:
  457. echo 'speed <speed>' > /proc/acpi/ibm/thermal
  458. The sustainable range of fan speeds on the X40 appears to be from
  459. about 3700 to about 7350. Values outside this range either do not have
  460. any effect or the fan speed eventually settles somewhere in that
  461. range. The fan cannot be stopped or started with this command.
  462. On the 570, temperature readings are not available through this
  463. feature and the fan control works a little differently. The fan speed
  464. is reported in levels from 0 (off) to 7 (max) and can be controlled
  465. with the following command:
  466. echo 'level <level>' > /proc/acpi/ibm/thermal
  467. Multiple Commands, Module Parameters
  468. ------------------------------------
  469. Multiple commands can be written to the proc files in one shot by
  470. separating them with commas, for example:
  471. echo enable,0xffff > /proc/acpi/ibm/hotkey
  472. echo lcd_disable,crt_enable > /proc/acpi/ibm/video
  473. Commands can also be specified when loading the ibm_acpi module, for
  474. example:
  475. modprobe ibm_acpi hotkey=enable,0xffff video=auto_disable
  476. Example Configuration
  477. ---------------------
  478. The ACPI support in the kernel is intended to be used in conjunction
  479. with a user-space daemon, acpid. The configuration files for this
  480. daemon control what actions are taken in response to various ACPI
  481. events. An example set of configuration files are included in the
  482. config/ directory of the tarball package available on the web
  483. site. Note that these are provided for illustration purposes only and
  484. may need to be adapted to your particular setup.
  485. The following utility scripts are used by the example action
  486. scripts (included with ibm-acpi for completeness):
  487. /usr/local/sbin/idectl -- from the hdparm source distribution,
  488. see http://www.ibiblio.org/pub/Linux/system/hardware
  489. /usr/local/sbin/laptop_mode -- from the Linux kernel source
  490. distribution, see Documentation/laptop-mode.txt
  491. /sbin/service -- comes with Redhat/Fedora distributions
  492. /usr/sbin/hibernate -- from the Software Suspend 2 distribution,
  493. see http://softwaresuspend.berlios.de/
  494. Toan T Nguyen <ntt@physics.ucla.edu> notes that Suse uses the
  495. powersave program to suspend ('powersave --suspend-to-ram') or
  496. hibernate ('powersave --suspend-to-disk'). This means that the
  497. hibernate script is not needed on that distribution.
  498. Henrik Brix Andersen <brix@gentoo.org> has written a Gentoo ACPI event
  499. handler script for the X31. You can get the latest version from
  500. http://dev.gentoo.org/~brix/files/x31.sh
  501. David Schweikert <dws@ee.eth.ch> has written an alternative blank.sh
  502. script which works on Debian systems. This scripts has now been
  503. extended to also work on Fedora systems and included as the default
  504. blank.sh in the distribution.