thinkpad-acpi.txt 46 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235
  1. ThinkPad ACPI Extras Driver
  2. Version 0.16
  3. August 2nd, 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. - Fan control and monitoring: 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 exports two different interfaces to userspace, which can be
  54. used to access the features it provides. One is a legacy procfs-based
  55. interface, which will be removed at some time in the distant future.
  56. The other is a new sysfs-based interface which is not complete yet.
  57. The procfs interface creates the /proc/acpi/ibm directory. There is a
  58. file under that directory for each feature it supports. The procfs
  59. interface is mostly frozen, and will change very little if at all: it
  60. will not be extended to add any new functionality in the driver, instead
  61. all new functionality will be implemented on the sysfs interface.
  62. The sysfs interface tries to blend in the generic Linux sysfs subsystems
  63. and classes as much as possible. Since some of these subsystems are not
  64. yet ready or stabilized, it is expected that this interface will change,
  65. and any and all userspace programs must deal with it.
  66. Notes about the sysfs interface:
  67. Unlike what was done with the procfs interface, correctness when talking
  68. to the sysfs interfaces will be enforced, as will correctness in the
  69. thinkpad-acpi's implementation of sysfs interfaces.
  70. Also, any bugs in the thinkpad-acpi sysfs driver code or in the
  71. thinkpad-acpi's implementation of the sysfs interfaces will be fixed for
  72. maximum correctness, even if that means changing an interface in
  73. non-compatible ways. As these interfaces mature both in the kernel and
  74. in thinkpad-acpi, such changes should become quite rare.
  75. Applications interfacing to the thinkpad-acpi sysfs interfaces must
  76. follow all sysfs guidelines and correctly process all errors (the sysfs
  77. interface makes extensive use of errors). File descriptors and open /
  78. close operations to the sysfs inodes must also be properly implemented.
  79. The version of thinkpad-acpi's sysfs interface is exported by the driver
  80. as a driver attribute (see below).
  81. Sysfs driver attributes are on the driver's sysfs attribute space,
  82. for 2.6.20 this is /sys/bus/platform/drivers/thinkpad_acpi/.
  83. Sysfs device attributes are on the driver's sysfs attribute space,
  84. for 2.6.20 this is /sys/devices/platform/thinkpad_acpi/.
  85. Driver version
  86. --------------
  87. procfs: /proc/acpi/ibm/driver
  88. sysfs driver attribute: version
  89. The driver name and version. No commands can be written to this file.
  90. Sysfs interface version
  91. -----------------------
  92. sysfs driver attribute: interface_version
  93. Version of the thinkpad-acpi sysfs interface, as an unsigned long
  94. (output in hex format: 0xAAAABBCC), where:
  95. AAAA - major revision
  96. BB - minor revision
  97. CC - bugfix revision
  98. The sysfs interface version changelog for the driver can be found at the
  99. end of this document. Changes to the sysfs interface done by the kernel
  100. subsystems are not documented here, nor are they tracked by this
  101. attribute.
  102. Changes to the thinkpad-acpi sysfs interface are only considered
  103. non-experimental when they are submitted to Linux mainline, at which
  104. point the changes in this interface are documented and interface_version
  105. may be updated. If you are using any thinkpad-acpi features not yet
  106. sent to mainline for merging, you do so on your own risk: these features
  107. may disappear, or be implemented in a different and incompatible way by
  108. the time they are merged in Linux mainline.
  109. Changes that are backwards-compatible by nature (e.g. the addition of
  110. attributes that do not change the way the other attributes work) do not
  111. always warrant an update of interface_version. Therefore, one must
  112. expect that an attribute might not be there, and deal with it properly
  113. (an attribute not being there *is* a valid way to make it clear that a
  114. feature is not available in sysfs).
  115. Hot keys
  116. --------
  117. procfs: /proc/acpi/ibm/hotkey
  118. sysfs device attribute: hotkey_*
  119. In a ThinkPad, the ACPI HKEY handler is responsible for comunicating
  120. some important events and also keyboard hot key presses to the operating
  121. system. Enabling the hotkey functionality of thinkpad-acpi signals the
  122. firmware that such a driver is present, and modifies how the ThinkPad
  123. firmware will behave in many situations.
  124. The driver enables the hot key feature automatically when loaded. The
  125. feature can later be disabled and enabled back at runtime. The driver
  126. will also restore the hot key feature to its previous state and mask
  127. when it is unloaded.
  128. When the hotkey feature is enabled and the hot key mask is set (see
  129. below), the driver will report HKEY events in the following format:
  130. ibm/hotkey HKEY 00000080 0000xxxx
  131. Some of these events refer to hot key presses, but not all.
  132. The driver will generate events over the input layer for hot keys and
  133. radio switches, and over the ACPI netlink layer for other events. The
  134. input layer support accepts the standard IOCTLs to remap the keycodes
  135. assigned to each hot key.
  136. The hot key bit mask allows some control over which hot keys generate
  137. events. If a key is "masked" (bit set to 0 in the mask), the firmware
  138. will handle it. If it is "unmasked", it signals the firmware that
  139. thinkpad-acpi would prefer to handle it, if the firmware would be so
  140. kind to allow it (and it often doesn't!).
  141. Not all bits in the mask can be modified. Not all bits that can be
  142. modified do anything. Not all hot keys can be individually controlled
  143. by the mask. Some models do not support the mask at all, and in those
  144. models, hot keys cannot be controlled individually. The behaviour of
  145. the mask is, therefore, higly dependent on the ThinkPad model.
  146. Note that unmasking some keys prevents their default behavior. For
  147. example, if Fn+F5 is unmasked, that key will no longer enable/disable
  148. Bluetooth by itself.
  149. Note also that not all Fn key combinations are supported through ACPI.
  150. For example, on the X40, the brightness, volume and "Access IBM" buttons
  151. do not generate ACPI events even with this driver. They *can* be used
  152. through the "ThinkPad Buttons" utility, see http://www.nongnu.org/tpb/
  153. procfs notes:
  154. The following commands can be written to the /proc/acpi/ibm/hotkey file:
  155. echo enable > /proc/acpi/ibm/hotkey -- enable the hot keys feature
  156. echo disable > /proc/acpi/ibm/hotkey -- disable the hot keys feature
  157. echo 0xffffffff > /proc/acpi/ibm/hotkey -- enable all hot keys
  158. echo 0 > /proc/acpi/ibm/hotkey -- disable all possible hot keys
  159. ... any other 8-hex-digit mask ...
  160. echo reset > /proc/acpi/ibm/hotkey -- restore the original mask
  161. sysfs notes:
  162. hotkey_bios_enabled:
  163. Returns the status of the hot keys feature when
  164. thinkpad-acpi was loaded. Upon module unload, the hot
  165. key feature status will be restored to this value.
  166. 0: hot keys were disabled
  167. 1: hot keys were enabled (unusual)
  168. hotkey_bios_mask:
  169. Returns the hot keys mask when thinkpad-acpi was loaded.
  170. Upon module unload, the hot keys mask will be restored
  171. to this value.
  172. hotkey_enable:
  173. Enables/disables the hot keys feature, and reports
  174. current status of the hot keys feature.
  175. 0: disables the hot keys feature / feature disabled
  176. 1: enables the hot keys feature / feature enabled
  177. hotkey_mask:
  178. bit mask to enable driver-handling and ACPI event
  179. generation for each hot key (see above). Returns the
  180. current status of the hot keys mask, and allows one to
  181. modify it.
  182. hotkey_all_mask:
  183. bit mask that should enable event reporting for all
  184. supported hot keys, when echoed to hotkey_mask above.
  185. Unless you know which events need to be handled
  186. passively (because the firmware *will* handle them
  187. anyway), do *not* use hotkey_all_mask. Use
  188. hotkey_recommended_mask, instead. You have been warned.
  189. hotkey_recommended_mask:
  190. bit mask that should enable event reporting for all
  191. supported hot keys, except those which are always
  192. handled by the firmware anyway. Echo it to
  193. hotkey_mask above, to use.
  194. hotkey_radio_sw:
  195. if the ThinkPad has a hardware radio switch, this
  196. attribute will read 0 if the switch is in the "radios
  197. disabled" postition, and 1 if the switch is in the
  198. "radios enabled" position.
  199. hotkey_report_mode:
  200. Returns the state of the procfs ACPI event report mode
  201. filter for hot keys. If it is set to 1 (the default),
  202. all hot key presses are reported both through the input
  203. layer and also as ACPI events through procfs (but not
  204. through netlink). If it is set to 2, hot key presses
  205. are reported only through the input layer.
  206. This attribute is read-only in kernels 2.6.23 or later,
  207. and read-write on earlier kernels.
  208. May return -EPERM (write access locked out by module
  209. parameter) or -EACCES (read-only).
  210. input layer notes:
  211. A Hot key is mapped to a single input layer EV_KEY event, possibly
  212. followed by an EV_MSC MSC_SCAN event that shall contain that key's scan
  213. code. An EV_SYN event will always be generated to mark the end of the
  214. event block.
  215. Do not use the EV_MSC MSC_SCAN events to process keys. They are to be
  216. used as a helper to remap keys, only. They are particularly useful when
  217. remapping KEY_UNKNOWN keys.
  218. The events are available in an input device, with the following id:
  219. Bus: BUS_HOST
  220. vendor: 0x1014 (PCI_VENDOR_ID_IBM) or
  221. 0x17aa (PCI_VENDOR_ID_LENOVO)
  222. product: 0x5054 ("TP")
  223. version: 0x4101
  224. The version will have its LSB incremented if the keymap changes in a
  225. backwards-compatible way. The MSB shall always be 0x41 for this input
  226. device. If the MSB is not 0x41, do not use the device as described in
  227. this section, as it is either something else (e.g. another input device
  228. exported by a thinkpad driver, such as HDAPS) or its functionality has
  229. been changed in a non-backwards compatible way.
  230. Adding other event types for other functionalities shall be considered a
  231. backwards-compatible change for this input device.
  232. Thinkpad-acpi Hot Key event map (version 0x4101):
  233. ACPI Scan
  234. event code Key Notes
  235. 0x1001 0x00 FN+F1 -
  236. 0x1002 0x01 FN+F2 IBM: battery (rare)
  237. Lenovo: Screen lock
  238. 0x1003 0x02 FN+F3 Many IBM models always report
  239. this hot key, even with hot keys
  240. disabled or with Fn+F3 masked
  241. off
  242. IBM: screen lock
  243. Lenovo: battery
  244. 0x1004 0x03 FN+F4 Sleep button (ACPI sleep button
  245. semanthics, i.e. sleep-to-RAM).
  246. It is always generate some kind
  247. of event, either the hot key
  248. event or a ACPI sleep button
  249. event. The firmware may
  250. refuse to generate further FN+F4
  251. key presses until a S3 or S4 ACPI
  252. sleep cycle is performed or some
  253. time passes.
  254. 0x1005 0x04 FN+F5 Radio. Enables/disables
  255. the internal BlueTooth hardware
  256. and W-WAN card if left in control
  257. of the firmware. Does not affect
  258. the WLAN card.
  259. Should be used to turn on/off all
  260. radios (bluetooth+W-WAN+WLAN),
  261. really.
  262. 0x1006 0x05 FN+F6 -
  263. 0x1007 0x06 FN+F7 Video output cycle.
  264. Do you feel lucky today?
  265. 0x1008 0x07 FN+F8 IBM: toggle screen expand
  266. Lenovo: configure ultranav
  267. 0x1009 0x08 FN+F9 -
  268. .. .. ..
  269. 0x100B 0x0A FN+F11 -
  270. 0x100C 0x0B FN+F12 Sleep to disk. You are always
  271. supposed to handle it yourself,
  272. either through the ACPI event,
  273. or through a hotkey event.
  274. The firmware may refuse to
  275. generate further FN+F4 key
  276. press events until a S3 or S4
  277. ACPI sleep cycle is performed,
  278. or some time passes.
  279. 0x100D 0x0C FN+BACKSPACE -
  280. 0x100E 0x0D FN+INSERT -
  281. 0x100F 0x0E FN+DELETE -
  282. 0x1010 0x0F FN+HOME Brightness up. This key is
  283. always handled by the firmware
  284. in IBM ThinkPads, even when
  285. unmasked. Just leave it alone.
  286. For Lenovo ThinkPads with a new
  287. BIOS, it has to be handled either
  288. by the ACPI OSI, or by userspace.
  289. 0x1011 0x10 FN+END Brightness down. See brightness
  290. up for details.
  291. 0x1012 0x11 FN+PGUP Thinklight toggle. This key is
  292. always handled by the firmware,
  293. even when unmasked.
  294. 0x1013 0x12 FN+PGDOWN -
  295. 0x1014 0x13 FN+SPACE Zoom key
  296. 0x1015 0x14 VOLUME UP Internal mixer volume up. This
  297. key is always handled by the
  298. firmware, even when unmasked.
  299. NOTE: Lenovo seems to be changing
  300. this.
  301. 0x1016 0x15 VOLUME DOWN Internal mixer volume up. This
  302. key is always handled by the
  303. firmware, even when unmasked.
  304. NOTE: Lenovo seems to be changing
  305. this.
  306. 0x1017 0x16 MUTE Mute internal mixer. This
  307. key is always handled by the
  308. firmware, even when unmasked.
  309. 0x1018 0x17 THINKPAD Thinkpad/Access IBM/Lenovo key
  310. 0x1019 0x18 unknown
  311. .. .. ..
  312. 0x1020 0x1F unknown
  313. The ThinkPad firmware does not allow one to differentiate when most hot
  314. keys are pressed or released (either that, or we don't know how to, yet).
  315. For these keys, the driver generates a set of events for a key press and
  316. immediately issues the same set of events for a key release. It is
  317. unknown by the driver if the ThinkPad firmware triggered these events on
  318. hot key press or release, but the firmware will do it for either one, not
  319. both.
  320. If a key is mapped to KEY_RESERVED, it generates no input events at all.
  321. If a key is mapped to KEY_UNKNOWN, it generates an input event that
  322. includes an scan code. If a key is mapped to anything else, it will
  323. generate input device EV_KEY events.
  324. Non hot-key ACPI HKEY event map:
  325. 0x5001 Lid closed
  326. 0x5002 Lid opened
  327. 0x7000 Radio Switch may have changed state
  328. The above events are not propagated by the driver, except for legacy
  329. compatibility purposes when hotkey_report_mode is set to 1.
  330. Compatibility notes:
  331. ibm-acpi and thinkpad-acpi 0.15 (mainline kernels before 2.6.23) never
  332. supported the input layer, and sent events over the procfs ACPI event
  333. interface.
  334. To avoid sending duplicate events over the input layer and the ACPI
  335. event interface, thinkpad-acpi 0.16 implements a module parameter
  336. (hotkey_report_mode), and also a sysfs device attribute with the same
  337. name.
  338. Make no mistake here: userspace is expected to switch to using the input
  339. layer interface of thinkpad-acpi, together with the ACPI netlink event
  340. interface in kernels 2.6.23 and later, or with the ACPI procfs event
  341. interface in kernels 2.6.22 and earlier.
  342. If no hotkey_report_mode module parameter is specified (or it is set to
  343. zero), the driver defaults to mode 1 (see below), and on kernels 2.6.22
  344. and earlier, also allows one to change the hotkey_report_mode through
  345. sysfs. In kernels 2.6.23 and later, where the netlink ACPI event
  346. interface is available, hotkey_report_mode cannot be changed through
  347. sysfs (it is read-only).
  348. If the hotkey_report_mode module parameter is set to 1 or 2, it cannot
  349. be changed later through sysfs (any writes will return -EPERM to signal
  350. that hotkey_report_mode was locked. On 2.6.23 and later, where
  351. hotkey_report_mode cannot be changed at all, writes will return -EACES).
  352. hotkey_report_mode set to 1 makes the driver export through the procfs
  353. ACPI event interface all hot key presses (which are *also* sent to the
  354. input layer). This is a legacy compatibility behaviour, and it is also
  355. the default mode of operation for the driver.
  356. hotkey_report_mode set to 2 makes the driver filter out the hot key
  357. presses from the procfs ACPI event interface, so these events will only
  358. be sent through the input layer. Userspace that has been updated to use
  359. the thinkpad-acpi input layer interface should set hotkey_report_mode to
  360. 2.
  361. Hot key press events are never sent to the ACPI netlink event interface.
  362. Really up-to-date userspace under kernel 2.6.23 and later is to use the
  363. netlink interface and the input layer interface, and don't bother at all
  364. with hotkey_report_mode.
  365. Bluetooth
  366. ---------
  367. procfs: /proc/acpi/ibm/bluetooth
  368. sysfs device attribute: bluetooth_enable
  369. This feature shows the presence and current state of a ThinkPad
  370. Bluetooth device in the internal ThinkPad CDC slot.
  371. Procfs notes:
  372. If Bluetooth is installed, the following commands can be used:
  373. echo enable > /proc/acpi/ibm/bluetooth
  374. echo disable > /proc/acpi/ibm/bluetooth
  375. Sysfs notes:
  376. If the Bluetooth CDC card is installed, it can be enabled /
  377. disabled through the "bluetooth_enable" thinkpad-acpi device
  378. attribute, and its current status can also be queried.
  379. enable:
  380. 0: disables Bluetooth / Bluetooth is disabled
  381. 1: enables Bluetooth / Bluetooth is enabled.
  382. Note: this interface will be probably be superseeded by the
  383. generic rfkill class, so it is NOT to be considered stable yet.
  384. Video output control -- /proc/acpi/ibm/video
  385. --------------------------------------------
  386. This feature allows control over the devices used for video output -
  387. LCD, CRT or DVI (if available). The following commands are available:
  388. echo lcd_enable > /proc/acpi/ibm/video
  389. echo lcd_disable > /proc/acpi/ibm/video
  390. echo crt_enable > /proc/acpi/ibm/video
  391. echo crt_disable > /proc/acpi/ibm/video
  392. echo dvi_enable > /proc/acpi/ibm/video
  393. echo dvi_disable > /proc/acpi/ibm/video
  394. echo auto_enable > /proc/acpi/ibm/video
  395. echo auto_disable > /proc/acpi/ibm/video
  396. echo expand_toggle > /proc/acpi/ibm/video
  397. echo video_switch > /proc/acpi/ibm/video
  398. Each video output device can be enabled or disabled individually.
  399. Reading /proc/acpi/ibm/video shows the status of each device.
  400. Automatic video switching can be enabled or disabled. When automatic
  401. video switching is enabled, certain events (e.g. opening the lid,
  402. docking or undocking) cause the video output device to change
  403. automatically. While this can be useful, it also causes flickering
  404. and, on the X40, video corruption. By disabling automatic switching,
  405. the flickering or video corruption can be avoided.
  406. The video_switch command cycles through the available video outputs
  407. (it simulates the behavior of Fn-F7).
  408. Video expansion can be toggled through this feature. This controls
  409. whether the display is expanded to fill the entire LCD screen when a
  410. mode with less than full resolution is used. Note that the current
  411. video expansion status cannot be determined through this feature.
  412. Note that on many models (particularly those using Radeon graphics
  413. chips) the X driver configures the video card in a way which prevents
  414. Fn-F7 from working. This also disables the video output switching
  415. features of this driver, as it uses the same ACPI methods as
  416. Fn-F7. Video switching on the console should still work.
  417. UPDATE: There's now a patch for the X.org Radeon driver which
  418. addresses this issue. Some people are reporting success with the patch
  419. while others are still having problems. For more information:
  420. https://bugs.freedesktop.org/show_bug.cgi?id=2000
  421. ThinkLight control -- /proc/acpi/ibm/light
  422. ------------------------------------------
  423. The current status of the ThinkLight can be found in this file. A few
  424. models which do not make the status available will show it as
  425. "unknown". The available commands are:
  426. echo on > /proc/acpi/ibm/light
  427. echo off > /proc/acpi/ibm/light
  428. Docking / undocking -- /proc/acpi/ibm/dock
  429. ------------------------------------------
  430. Docking and undocking (e.g. with the X4 UltraBase) requires some
  431. actions to be taken by the operating system to safely make or break
  432. the electrical connections with the dock.
  433. The docking feature of this driver generates the following ACPI events:
  434. ibm/dock GDCK 00000003 00000001 -- eject request
  435. ibm/dock GDCK 00000003 00000002 -- undocked
  436. ibm/dock GDCK 00000000 00000003 -- docked
  437. NOTE: These events will only be generated if the laptop was docked
  438. when originally booted. This is due to the current lack of support for
  439. hot plugging of devices in the Linux ACPI framework. If the laptop was
  440. booted while not in the dock, the following message is shown in the
  441. logs:
  442. Mar 17 01:42:34 aero kernel: thinkpad_acpi: dock device not present
  443. In this case, no dock-related events are generated but the dock and
  444. undock commands described below still work. They can be executed
  445. manually or triggered by Fn key combinations (see the example acpid
  446. configuration files included in the driver tarball package available
  447. on the web site).
  448. When the eject request button on the dock is pressed, the first event
  449. above is generated. The handler for this event should issue the
  450. following command:
  451. echo undock > /proc/acpi/ibm/dock
  452. After the LED on the dock goes off, it is safe to eject the laptop.
  453. Note: if you pressed this key by mistake, go ahead and eject the
  454. laptop, then dock it back in. Otherwise, the dock may not function as
  455. expected.
  456. When the laptop is docked, the third event above is generated. The
  457. handler for this event should issue the following command to fully
  458. enable the dock:
  459. echo dock > /proc/acpi/ibm/dock
  460. The contents of the /proc/acpi/ibm/dock file shows the current status
  461. of the dock, as provided by the ACPI framework.
  462. The docking support in this driver does not take care of enabling or
  463. disabling any other devices you may have attached to the dock. For
  464. example, a CD drive plugged into the UltraBase needs to be disabled or
  465. enabled separately. See the provided example acpid configuration files
  466. for how this can be accomplished.
  467. There is no support yet for PCI devices that may be attached to a
  468. docking station, e.g. in the ThinkPad Dock II. The driver currently
  469. does not recognize, enable or disable such devices. This means that
  470. the only docking stations currently supported are the X-series
  471. UltraBase docks and "dumb" port replicators like the Mini Dock (the
  472. latter don't need any ACPI support, actually).
  473. UltraBay eject -- /proc/acpi/ibm/bay
  474. ------------------------------------
  475. Inserting or ejecting an UltraBay device requires some actions to be
  476. taken by the operating system to safely make or break the electrical
  477. connections with the device.
  478. This feature generates the following ACPI events:
  479. ibm/bay MSTR 00000003 00000000 -- eject request
  480. ibm/bay MSTR 00000001 00000000 -- eject lever inserted
  481. NOTE: These events will only be generated if the UltraBay was present
  482. when the laptop was originally booted (on the X series, the UltraBay
  483. is in the dock, so it may not be present if the laptop was undocked).
  484. This is due to the current lack of support for hot plugging of devices
  485. in the Linux ACPI framework. If the laptop was booted without the
  486. UltraBay, the following message is shown in the logs:
  487. Mar 17 01:42:34 aero kernel: thinkpad_acpi: bay device not present
  488. In this case, no bay-related events are generated but the eject
  489. command described below still works. It can be executed manually or
  490. triggered by a hot key combination.
  491. Sliding the eject lever generates the first event shown above. The
  492. handler for this event should take whatever actions are necessary to
  493. shut down the device in the UltraBay (e.g. call idectl), then issue
  494. the following command:
  495. echo eject > /proc/acpi/ibm/bay
  496. After the LED on the UltraBay goes off, it is safe to pull out the
  497. device.
  498. When the eject lever is inserted, the second event above is
  499. generated. The handler for this event should take whatever actions are
  500. necessary to enable the UltraBay device (e.g. call idectl).
  501. The contents of the /proc/acpi/ibm/bay file shows the current status
  502. of the UltraBay, as provided by the ACPI framework.
  503. EXPERIMENTAL warm eject support on the 600e/x, A22p and A3x (To use
  504. this feature, you need to supply the experimental=1 parameter when
  505. loading the module):
  506. These models do not have a button near the UltraBay device to request
  507. a hot eject but rather require the laptop to be put to sleep
  508. (suspend-to-ram) before the bay device is ejected or inserted).
  509. The sequence of steps to eject the device is as follows:
  510. echo eject > /proc/acpi/ibm/bay
  511. put the ThinkPad to sleep
  512. remove the drive
  513. resume from sleep
  514. cat /proc/acpi/ibm/bay should show that the drive was removed
  515. On the A3x, both the UltraBay 2000 and UltraBay Plus devices are
  516. supported. Use "eject2" instead of "eject" for the second bay.
  517. Note: the UltraBay eject support on the 600e/x, A22p and A3x is
  518. EXPERIMENTAL and may not work as expected. USE WITH CAUTION!
  519. CMOS control
  520. ------------
  521. procfs: /proc/acpi/ibm/cmos
  522. sysfs device attribute: cmos_command
  523. This feature is mostly used internally by the ACPI firmware to keep the legacy
  524. CMOS NVRAM bits in sync with the current machine state, and to record this
  525. state so that the ThinkPad will retain such settings across reboots.
  526. Some of these commands actually perform actions in some ThinkPad models, but
  527. this is expected to disappear more and more in newer models. As an example, in
  528. a T43 and in a X40, commands 12 and 13 still control the ThinkLight state for
  529. real, but commands 0 to 2 don't control the mixer anymore (they have been
  530. phased out) and just update the NVRAM.
  531. The range of valid cmos command numbers is 0 to 21, but not all have an
  532. effect and the behavior varies from model to model. Here is the behavior
  533. on the X40 (tpb is the ThinkPad Buttons utility):
  534. 0 - Related to "Volume down" key press
  535. 1 - Related to "Volume up" key press
  536. 2 - Related to "Mute on" key press
  537. 3 - Related to "Access IBM" key press
  538. 4 - Related to "LCD brightness up" key pess
  539. 5 - Related to "LCD brightness down" key press
  540. 11 - Related to "toggle screen expansion" key press/function
  541. 12 - Related to "ThinkLight on"
  542. 13 - Related to "ThinkLight off"
  543. 14 - Related to "ThinkLight" key press (toggle thinklight)
  544. The cmos command interface is prone to firmware split-brain problems, as
  545. in newer ThinkPads it is just a compatibility layer. Do not use it, it is
  546. exported just as a debug tool.
  547. LED control -- /proc/acpi/ibm/led
  548. ---------------------------------
  549. Some of the LED indicators can be controlled through this feature. The
  550. available commands are:
  551. echo '<led number> on' >/proc/acpi/ibm/led
  552. echo '<led number> off' >/proc/acpi/ibm/led
  553. echo '<led number> blink' >/proc/acpi/ibm/led
  554. The <led number> range is 0 to 7. The set of LEDs that can be
  555. controlled varies from model to model. Here is the mapping on the X40:
  556. 0 - power
  557. 1 - battery (orange)
  558. 2 - battery (green)
  559. 3 - UltraBase
  560. 4 - UltraBay
  561. 7 - standby
  562. All of the above can be turned on and off and can be made to blink.
  563. ACPI sounds -- /proc/acpi/ibm/beep
  564. ----------------------------------
  565. The BEEP method is used internally by the ACPI firmware to provide
  566. audible alerts in various situations. This feature allows the same
  567. sounds to be triggered manually.
  568. The commands are non-negative integer numbers:
  569. echo <number> >/proc/acpi/ibm/beep
  570. The valid <number> range is 0 to 17. Not all numbers trigger sounds
  571. and the sounds vary from model to model. Here is the behavior on the
  572. X40:
  573. 0 - stop a sound in progress (but use 17 to stop 16)
  574. 2 - two beeps, pause, third beep ("low battery")
  575. 3 - single beep
  576. 4 - high, followed by low-pitched beep ("unable")
  577. 5 - single beep
  578. 6 - very high, followed by high-pitched beep ("AC/DC")
  579. 7 - high-pitched beep
  580. 9 - three short beeps
  581. 10 - very long beep
  582. 12 - low-pitched beep
  583. 15 - three high-pitched beeps repeating constantly, stop with 0
  584. 16 - one medium-pitched beep repeating constantly, stop with 17
  585. 17 - stop 16
  586. Temperature sensors
  587. -------------------
  588. procfs: /proc/acpi/ibm/thermal
  589. sysfs device attributes: (hwmon) temp*_input
  590. Most ThinkPads include six or more separate temperature sensors but only
  591. expose the CPU temperature through the standard ACPI methods. This
  592. feature shows readings from up to eight different sensors on older
  593. ThinkPads, and up to sixteen different sensors on newer ThinkPads.
  594. For example, on the X40, a typical output may be:
  595. temperatures: 42 42 45 41 36 -128 33 -128
  596. On the T43/p, a typical output may be:
  597. temperatures: 48 48 36 52 38 -128 31 -128 48 52 48 -128 -128 -128 -128 -128
  598. The mapping of thermal sensors to physical locations varies depending on
  599. system-board model (and thus, on ThinkPad model).
  600. http://thinkwiki.org/wiki/Thermal_Sensors is a public wiki page that
  601. tries to track down these locations for various models.
  602. Most (newer?) models seem to follow this pattern:
  603. 1: CPU
  604. 2: (depends on model)
  605. 3: (depends on model)
  606. 4: GPU
  607. 5: Main battery: main sensor
  608. 6: Bay battery: main sensor
  609. 7: Main battery: secondary sensor
  610. 8: Bay battery: secondary sensor
  611. 9-15: (depends on model)
  612. For the R51 (source: Thomas Gruber):
  613. 2: Mini-PCI
  614. 3: Internal HDD
  615. For the T43, T43/p (source: Shmidoax/Thinkwiki.org)
  616. http://thinkwiki.org/wiki/Thermal_Sensors#ThinkPad_T43.2C_T43p
  617. 2: System board, left side (near PCMCIA slot), reported as HDAPS temp
  618. 3: PCMCIA slot
  619. 9: MCH (northbridge) to DRAM Bus
  620. 10: Clock-generator, mini-pci card and ICH (southbridge), under Mini-PCI
  621. card, under touchpad
  622. 11: Power regulator, underside of system board, below F2 key
  623. The A31 has a very atypical layout for the thermal sensors
  624. (source: Milos Popovic, http://thinkwiki.org/wiki/Thermal_Sensors#ThinkPad_A31)
  625. 1: CPU
  626. 2: Main Battery: main sensor
  627. 3: Power Converter
  628. 4: Bay Battery: main sensor
  629. 5: MCH (northbridge)
  630. 6: PCMCIA/ambient
  631. 7: Main Battery: secondary sensor
  632. 8: Bay Battery: secondary sensor
  633. Procfs notes:
  634. Readings from sensors that are not available return -128.
  635. No commands can be written to this file.
  636. Sysfs notes:
  637. Sensors that are not available return the ENXIO error. This
  638. status may change at runtime, as there are hotplug thermal
  639. sensors, like those inside the batteries and docks.
  640. thinkpad-acpi thermal sensors are reported through the hwmon
  641. subsystem, and follow all of the hwmon guidelines at
  642. Documentation/hwmon.
  643. EXPERIMENTAL: Embedded controller register dump -- /proc/acpi/ibm/ecdump
  644. ------------------------------------------------------------------------
  645. This feature is marked EXPERIMENTAL because the implementation
  646. directly accesses hardware registers and may not work as expected. USE
  647. WITH CAUTION! To use this feature, you need to supply the
  648. experimental=1 parameter when loading the module.
  649. This feature dumps the values of 256 embedded controller
  650. registers. Values which have changed since the last time the registers
  651. were dumped are marked with a star:
  652. [root@x40 ibm-acpi]# cat /proc/acpi/ibm/ecdump
  653. EC +00 +01 +02 +03 +04 +05 +06 +07 +08 +09 +0a +0b +0c +0d +0e +0f
  654. EC 0x00: a7 47 87 01 fe 96 00 08 01 00 cb 00 00 00 40 00
  655. EC 0x10: 00 00 ff ff f4 3c 87 09 01 ff 42 01 ff ff 0d 00
  656. EC 0x20: 00 00 00 00 00 00 00 00 00 00 00 03 43 00 00 80
  657. EC 0x30: 01 07 1a 00 30 04 00 00 *85 00 00 10 00 50 00 00
  658. EC 0x40: 00 00 00 00 00 00 14 01 00 04 00 00 00 00 00 00
  659. EC 0x50: 00 c0 02 0d 00 01 01 02 02 03 03 03 03 *bc *02 *bc
  660. EC 0x60: *02 *bc *02 00 00 00 00 00 00 00 00 00 00 00 00 00
  661. EC 0x70: 00 00 00 00 00 12 30 40 *24 *26 *2c *27 *20 80 *1f 80
  662. EC 0x80: 00 00 00 06 *37 *0e 03 00 00 00 0e 07 00 00 00 00
  663. EC 0x90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  664. EC 0xa0: *ff 09 ff 09 ff ff *64 00 *00 *00 *a2 41 *ff *ff *e0 00
  665. EC 0xb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  666. EC 0xc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  667. EC 0xd0: 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  668. EC 0xe0: 00 00 00 00 00 00 00 00 11 20 49 04 24 06 55 03
  669. EC 0xf0: 31 55 48 54 35 38 57 57 08 2f 45 73 07 65 6c 1a
  670. This feature can be used to determine the register holding the fan
  671. speed on some models. To do that, do the following:
  672. - make sure the battery is fully charged
  673. - make sure the fan is running
  674. - run 'cat /proc/acpi/ibm/ecdump' several times, once per second or so
  675. The first step makes sure various charging-related values don't
  676. vary. The second ensures that the fan-related values do vary, since
  677. the fan speed fluctuates a bit. The third will (hopefully) mark the
  678. fan register with a star:
  679. [root@x40 ibm-acpi]# cat /proc/acpi/ibm/ecdump
  680. EC +00 +01 +02 +03 +04 +05 +06 +07 +08 +09 +0a +0b +0c +0d +0e +0f
  681. EC 0x00: a7 47 87 01 fe 96 00 08 01 00 cb 00 00 00 40 00
  682. EC 0x10: 00 00 ff ff f4 3c 87 09 01 ff 42 01 ff ff 0d 00
  683. EC 0x20: 00 00 00 00 00 00 00 00 00 00 00 03 43 00 00 80
  684. EC 0x30: 01 07 1a 00 30 04 00 00 85 00 00 10 00 50 00 00
  685. EC 0x40: 00 00 00 00 00 00 14 01 00 04 00 00 00 00 00 00
  686. EC 0x50: 00 c0 02 0d 00 01 01 02 02 03 03 03 03 bc 02 bc
  687. EC 0x60: 02 bc 02 00 00 00 00 00 00 00 00 00 00 00 00 00
  688. EC 0x70: 00 00 00 00 00 12 30 40 24 27 2c 27 21 80 1f 80
  689. EC 0x80: 00 00 00 06 *be 0d 03 00 00 00 0e 07 00 00 00 00
  690. EC 0x90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  691. EC 0xa0: ff 09 ff 09 ff ff 64 00 00 00 a2 41 ff ff e0 00
  692. EC 0xb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  693. EC 0xc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  694. EC 0xd0: 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  695. EC 0xe0: 00 00 00 00 00 00 00 00 11 20 49 04 24 06 55 03
  696. EC 0xf0: 31 55 48 54 35 38 57 57 08 2f 45 73 07 65 6c 1a
  697. Another set of values that varies often is the temperature
  698. readings. Since temperatures don't change vary fast, you can take
  699. several quick dumps to eliminate them.
  700. You can use a similar method to figure out the meaning of other
  701. embedded controller registers - e.g. make sure nothing else changes
  702. except the charging or discharging battery to determine which
  703. registers contain the current battery capacity, etc. If you experiment
  704. with this, do send me your results (including some complete dumps with
  705. a description of the conditions when they were taken.)
  706. LCD brightness control
  707. ----------------------
  708. procfs: /proc/acpi/ibm/brightness
  709. sysfs backlight device "thinkpad_screen"
  710. This feature allows software control of the LCD brightness on ThinkPad
  711. models which don't have a hardware brightness slider.
  712. It has some limitations: the LCD backlight cannot be actually turned on or off
  713. by this interface, and in many ThinkPad models, the "dim while on battery"
  714. functionality will be enabled by the BIOS when this interface is used, and
  715. cannot be controlled.
  716. The backlight control has eight levels, ranging from 0 to 7. Some of the
  717. levels may not be distinct.
  718. There are two interfaces to the firmware for brightness control, EC and CMOS.
  719. To select which one should be used, use the brightness_mode module parameter:
  720. brightness_mode=1 selects EC mode, brightness_mode=2 selects CMOS mode,
  721. brightness_mode=3 selects both EC and CMOS. The driver tries to autodetect
  722. which interface to use.
  723. Procfs notes:
  724. The available commands are:
  725. echo up >/proc/acpi/ibm/brightness
  726. echo down >/proc/acpi/ibm/brightness
  727. echo 'level <level>' >/proc/acpi/ibm/brightness
  728. Sysfs notes:
  729. The interface is implemented through the backlight sysfs class, which is poorly
  730. documented at this time.
  731. Locate the thinkpad_screen device under /sys/class/backlight, and inside it
  732. there will be the following attributes:
  733. max_brightness:
  734. Reads the maximum brightness the hardware can be set to.
  735. The minimum is always zero.
  736. actual_brightness:
  737. Reads what brightness the screen is set to at this instant.
  738. brightness:
  739. Writes request the driver to change brightness to the given
  740. value. Reads will tell you what brightness the driver is trying
  741. to set the display to when "power" is set to zero and the display
  742. has not been dimmed by a kernel power management event.
  743. power:
  744. power management mode, where 0 is "display on", and 1 to 3 will
  745. dim the display backlight to brightness level 0 because
  746. thinkpad-acpi cannot really turn the backlight off. Kernel
  747. power management events can temporarily increase the current
  748. power management level, i.e. they can dim the display.
  749. Volume control -- /proc/acpi/ibm/volume
  750. ---------------------------------------
  751. This feature allows volume control on ThinkPad models which don't have
  752. a hardware volume knob. The available commands are:
  753. echo up >/proc/acpi/ibm/volume
  754. echo down >/proc/acpi/ibm/volume
  755. echo mute >/proc/acpi/ibm/volume
  756. echo 'level <level>' >/proc/acpi/ibm/volume
  757. The <level> number range is 0 to 15 although not all of them may be
  758. distinct. The unmute the volume after the mute command, use either the
  759. up or down command (the level command will not unmute the volume).
  760. The current volume level and mute state is shown in the file.
  761. Fan control and monitoring: fan speed, fan enable/disable
  762. ---------------------------------------------------------
  763. procfs: /proc/acpi/ibm/fan
  764. sysfs device attributes: (hwmon) fan_input, pwm1, pwm1_enable
  765. NOTE NOTE NOTE: fan control operations are disabled by default for
  766. safety reasons. To enable them, the module parameter "fan_control=1"
  767. must be given to thinkpad-acpi.
  768. This feature attempts to show the current fan speed, control mode and
  769. other fan data that might be available. The speed is read directly
  770. from the hardware registers of the embedded controller. This is known
  771. to work on later R, T, X and Z series ThinkPads but may show a bogus
  772. value on other models.
  773. Fan levels:
  774. Most ThinkPad fans work in "levels" at the firmware interface. Level 0
  775. stops the fan. The higher the level, the higher the fan speed, although
  776. adjacent levels often map to the same fan speed. 7 is the highest
  777. level, where the fan reaches the maximum recommended speed.
  778. Level "auto" means the EC changes the fan level according to some
  779. internal algorithm, usually based on readings from the thermal sensors.
  780. There is also a "full-speed" level, also known as "disengaged" level.
  781. In this level, the EC disables the speed-locked closed-loop fan control,
  782. and drives the fan as fast as it can go, which might exceed hardware
  783. limits, so use this level with caution.
  784. The fan usually ramps up or down slowly from one speed to another, and
  785. it is normal for the EC to take several seconds to react to fan
  786. commands. The full-speed level may take up to two minutes to ramp up to
  787. maximum speed, and in some ThinkPads, the tachometer readings go stale
  788. while the EC is transitioning to the full-speed level.
  789. WARNING WARNING WARNING: do not leave the fan disabled unless you are
  790. monitoring all of the temperature sensor readings and you are ready to
  791. enable it if necessary to avoid overheating.
  792. An enabled fan in level "auto" may stop spinning if the EC decides the
  793. ThinkPad is cool enough and doesn't need the extra airflow. This is
  794. normal, and the EC will spin the fan up if the varios thermal readings
  795. rise too much.
  796. On the X40, this seems to depend on the CPU and HDD temperatures.
  797. Specifically, the fan is turned on when either the CPU temperature
  798. climbs to 56 degrees or the HDD temperature climbs to 46 degrees. The
  799. fan is turned off when the CPU temperature drops to 49 degrees and the
  800. HDD temperature drops to 41 degrees. These thresholds cannot
  801. currently be controlled.
  802. The ThinkPad's ACPI DSDT code will reprogram the fan on its own when
  803. certain conditions are met. It will override any fan programming done
  804. through thinkpad-acpi.
  805. The thinkpad-acpi kernel driver can be programmed to revert the fan
  806. level to a safe setting if userspace does not issue one of the procfs
  807. fan commands: "enable", "disable", "level" or "watchdog", or if there
  808. are no writes to pwm1_enable (or to pwm1 *if and only if* pwm1_enable is
  809. set to 1, manual mode) within a configurable amount of time of up to
  810. 120 seconds. This functionality is called fan safety watchdog.
  811. Note that the watchdog timer stops after it enables the fan. It will be
  812. rearmed again automatically (using the same interval) when one of the
  813. above mentioned fan commands is received. The fan watchdog is,
  814. therefore, not suitable to protect against fan mode changes made through
  815. means other than the "enable", "disable", and "level" procfs fan
  816. commands, or the hwmon fan control sysfs interface.
  817. Procfs notes:
  818. The fan may be enabled or disabled with the following commands:
  819. echo enable >/proc/acpi/ibm/fan
  820. echo disable >/proc/acpi/ibm/fan
  821. Placing a fan on level 0 is the same as disabling it. Enabling a fan
  822. will try to place it in a safe level if it is too slow or disabled.
  823. The fan level can be controlled with the command:
  824. echo 'level <level>' > /proc/acpi/ibm/fan
  825. Where <level> is an integer from 0 to 7, or one of the words "auto" or
  826. "full-speed" (without the quotes). Not all ThinkPads support the "auto"
  827. and "full-speed" levels. The driver accepts "disengaged" as an alias for
  828. "full-speed", and reports it as "disengaged" for backwards
  829. compatibility.
  830. On the X31 and X40 (and ONLY on those models), the fan speed can be
  831. controlled to a certain degree. Once the fan is running, it can be
  832. forced to run faster or slower with the following command:
  833. echo 'speed <speed>' > /proc/acpi/ibm/fan
  834. The sustainable range of fan speeds on the X40 appears to be from about
  835. 3700 to about 7350. Values outside this range either do not have any
  836. effect or the fan speed eventually settles somewhere in that range. The
  837. fan cannot be stopped or started with this command. This functionality
  838. is incomplete, and not available through the sysfs interface.
  839. To program the safety watchdog, use the "watchdog" command.
  840. echo 'watchdog <interval in seconds>' > /proc/acpi/ibm/fan
  841. If you want to disable the watchdog, use 0 as the interval.
  842. Sysfs notes:
  843. The sysfs interface follows the hwmon subsystem guidelines for the most
  844. part, and the exception is the fan safety watchdog.
  845. Writes to any of the sysfs attributes may return the EINVAL error if
  846. that operation is not supported in a given ThinkPad or if the parameter
  847. is out-of-bounds, and EPERM if it is forbidden. They may also return
  848. EINTR (interrupted system call), and EIO (I/O error while trying to talk
  849. to the firmware).
  850. Features not yet implemented by the driver return ENOSYS.
  851. hwmon device attribute pwm1_enable:
  852. 0: PWM offline (fan is set to full-speed mode)
  853. 1: Manual PWM control (use pwm1 to set fan level)
  854. 2: Hardware PWM control (EC "auto" mode)
  855. 3: reserved (Software PWM control, not implemented yet)
  856. Modes 0 and 2 are not supported by all ThinkPads, and the
  857. driver is not always able to detect this. If it does know a
  858. mode is unsupported, it will return -EINVAL.
  859. hwmon device attribute pwm1:
  860. Fan level, scaled from the firmware values of 0-7 to the hwmon
  861. scale of 0-255. 0 means fan stopped, 255 means highest normal
  862. speed (level 7).
  863. This attribute only commands the fan if pmw1_enable is set to 1
  864. (manual PWM control).
  865. hwmon device attribute fan1_input:
  866. Fan tachometer reading, in RPM. May go stale on certain
  867. ThinkPads while the EC transitions the PWM to offline mode,
  868. which can take up to two minutes. May return rubbish on older
  869. ThinkPads.
  870. driver attribute fan_watchdog:
  871. Fan safety watchdog timer interval, in seconds. Minimum is
  872. 1 second, maximum is 120 seconds. 0 disables the watchdog.
  873. To stop the fan: set pwm1 to zero, and pwm1_enable to 1.
  874. To start the fan in a safe mode: set pwm1_enable to 2. If that fails
  875. with EINVAL, try to set pwm1_enable to 1 and pwm1 to at least 128 (255
  876. would be the safest choice, though).
  877. EXPERIMENTAL: WAN
  878. -----------------
  879. procfs: /proc/acpi/ibm/wan
  880. sysfs device attribute: wwan_enable
  881. This feature is marked EXPERIMENTAL because the implementation
  882. directly accesses hardware registers and may not work as expected. USE
  883. WITH CAUTION! To use this feature, you need to supply the
  884. experimental=1 parameter when loading the module.
  885. This feature shows the presence and current state of a W-WAN (Sierra
  886. Wireless EV-DO) device.
  887. It was tested on a Lenovo Thinkpad X60. It should probably work on other
  888. Thinkpad models which come with this module installed.
  889. Procfs notes:
  890. If the W-WAN card is installed, the following commands can be used:
  891. echo enable > /proc/acpi/ibm/wan
  892. echo disable > /proc/acpi/ibm/wan
  893. Sysfs notes:
  894. If the W-WAN card is installed, it can be enabled /
  895. disabled through the "wwan_enable" thinkpad-acpi device
  896. attribute, and its current status can also be queried.
  897. enable:
  898. 0: disables WWAN card / WWAN card is disabled
  899. 1: enables WWAN card / WWAN card is enabled.
  900. Note: this interface will be probably be superseeded by the
  901. generic rfkill class, so it is NOT to be considered stable yet.
  902. Multiple Commands, Module Parameters
  903. ------------------------------------
  904. Multiple commands can be written to the proc files in one shot by
  905. separating them with commas, for example:
  906. echo enable,0xffff > /proc/acpi/ibm/hotkey
  907. echo lcd_disable,crt_enable > /proc/acpi/ibm/video
  908. Commands can also be specified when loading the thinkpad-acpi module,
  909. for example:
  910. modprobe thinkpad_acpi hotkey=enable,0xffff video=auto_disable
  911. Enabling debugging output
  912. -------------------------
  913. The module takes a debug paramater which can be used to selectively
  914. enable various classes of debugging output, for example:
  915. modprobe ibm_acpi debug=0xffff
  916. will enable all debugging output classes. It takes a bitmask, so
  917. to enable more than one output class, just add their values.
  918. Debug bitmask Description
  919. 0x0001 Initialization and probing
  920. 0x0002 Removal
  921. There is also a kernel build option to enable more debugging
  922. information, which may be necessary to debug driver problems.
  923. The level of debugging information output by the driver can be changed
  924. at runtime through sysfs, using the driver attribute debug_level. The
  925. attribute takes the same bitmask as the debug module parameter above.
  926. Force loading of module
  927. -----------------------
  928. If thinkpad-acpi refuses to detect your ThinkPad, you can try to specify
  929. the module parameter force_load=1. Regardless of whether this works or
  930. not, please contact ibm-acpi-devel@lists.sourceforge.net with a report.
  931. Sysfs interface changelog:
  932. 0x000100: Initial sysfs support, as a single platform driver and
  933. device.
  934. 0x000200: Hot key support for 32 hot keys, and radio slider switch
  935. support.
  936. 0x010000: Hot keys are now handled by default over the input
  937. layer, the radio switch generates input event EV_RADIO,
  938. and the driver enables hot key handling by default in
  939. the firmware.