Difference between revisions of "SMAPI support for Linux"
(Added R52 to supported models) |
(→Models-specific status: reorg, v0.07) |
||
Line 24: | Line 24: | ||
To compile and load the module: | To compile and load the module: | ||
− | # tar xzvf tp_smapi-0. | + | # tar xzvf tp_smapi-0.07.tgz |
− | # cd tp_smapi-0. | + | # cd tp_smapi-0.07 |
# make load | # make load | ||
Line 49: | Line 49: | ||
# echo 0 > /sys/devices/platform/smapi/inhibit_charge_minutes | # echo 0 > /sys/devices/platform/smapi/inhibit_charge_minutes | ||
− | + | To control the speed of the optical drive: | |
+ | {{WARN|Changing the CD speed when the CD is being accessed will '''hang your computer'''.<br />''Kernel hackers: if you know how to check whether an ATAPI device is being accessed, please [[Talk:SMAPI support for Linux|tell the author]].''}} | ||
+ | # echo 0 > /sys/devices/platform/smapi/cdrom_speed # slow | ||
+ | # echo 1 > /sys/devices/platform/smapi/cdrom_speed # medium | ||
+ | # echo 2 > /sys/devices/platform/smapi/cdrom_speed # fast | ||
+ | 2 | ||
− | |||
− | + | Other things that can be controlled through SMAPI, but are not supported in this version of the driver, include forcing battery discharge, PCI bus power saving, CPU power saving control, extended smart battery information and fan control. See the included README file for more information. | |
− | |||
− | |||
− | |||
− | + | ====Models-specific status==== | |
− | + | * ThinkPad {{T43}}, {{T43p}}, {{R52}} | |
+ | ** all works | ||
+ | * ThinkPad {{X41}} | ||
+ | ** works: all battery-related | ||
+ | ** unknown: cdrom_speed | ||
+ | * ThinkPad {{T42p}}, {{T41}}, {{R51}}, {{X40}}, {{G41}} | ||
+ | ** work: start_charge_thresh, inhbit_charge | ||
+ | ** don't work: stop_charge_thresh (not supported by hardware) | ||
+ | ** unknown: cdrom_speed | ||
+ | * ThinkPad {{T40p}}, {{R40}} | ||
+ | ** work: cdrom_speed | ||
+ | ** don't work: all battery-related (not supported by hardware) | ||
+ | * ThinkPad {{T40}}, {{R50p}}, {{X31}} | ||
+ | ** don't work: all battery-related (not supported by hardware) | ||
+ | ** unknown: cdrom_speed | ||
− | + | Please update the above and report your experience on the [[Talk:SMAPI support for Linux|discussion]] page. If the module loads but gives "<tt>not supported</tt>" errors when you try to use it, report whether the corresponding functionality is available under Windows - maybe your ThinkPad just can't do that. | |
− | |||
− | |||
− | Please update the above and report your experience on the [[Talk:SMAPI support for Linux|discussion]] page. If the module loads but gives "not supported" errors when you try to use it, report whether the corresponding functionality is available under Windows - maybe your ThinkPad just can't do that. | ||
[[Category:Tools]] [[Category:Patches]] | [[Category:Tools]] [[Category:Patches]] |
Revision as of 11:55, 7 December 2005
ThinkPad laptops include a proprietary interface called SMAPI BIOS (System Management Application Program Interface) which provides some hardware control functionality that is not exposed by any other interface (e.g., ACPI).
The SMAPI interfaces changes a lot between models, and is poorly documented, so Linux support is not exhaustive for most models. There are currently two SMAPI access mechanisms available: thinkpad and tpctl for older ThinkPads, and tp_smapi for newer ones.
Using the thinkpad module
This solution consists of a module, called thinkpad, and a user-space tool caled tpctl. It provides very rich functionality for older ThinkPads, but on newer ThinkPads much of this functionality is exposed and supported through an ACPI interface and the SMAPI access does not work anymore. For details, see the README and list of supported models.
- Project page: http://tpctl.sourceforge.net/
- You need to download the thinkpad module and tpctl userspace tool.
- There is also an optional GUI: configure-thinkpad.
Using the tp_smapi module
The tp_smapi kernel module exposes some features of the SMAPI BIOS found on recent ThinkPads via a sysfs interface. Currently, the only implemented functionality is control over battery charging (this is useful for increasing battery lifetime, or for using a leftover under-spec power supply that can't handle the combined power draw of running and charging).
- Project page: http://tpctl.sourceforge.net/
- You need to donwnload only the tp_smapi kernel module.
To compile and load the module:
# tar xzvf tp_smapi-0.07.tgz # cd tp_smapi-0.07 # make load
To install permanently (optional):
# make install # modprobe tp_smapi
Example of usage:
# echo 40 > /sys/devices/platform/smapi/start_charge_thresh # echo 70 > /sys/devices/platform/smapi/stop_charge_thresh # cat /sys/devices/platform/smapi/*_charge_thresh 40 70
To unconditionally inhibit charging for 17 minutes:
# echo 17 > /sys/devices/platform/smapi/inhibit_charge_minutes
To cancel charge inhibiting:
# echo 0 > /sys/devices/platform/smapi/inhibit_charge_minutes
To control the speed of the optical drive:
Kernel hackers: if you know how to check whether an ATAPI device is being accessed, please tell the author.
# echo 0 > /sys/devices/platform/smapi/cdrom_speed # slow # echo 1 > /sys/devices/platform/smapi/cdrom_speed # medium # echo 2 > /sys/devices/platform/smapi/cdrom_speed # fast 2
Other things that can be controlled through SMAPI, but are not supported in this version of the driver, include forcing battery discharge, PCI bus power saving, CPU power saving control, extended smart battery information and fan control. See the included README file for more information.
Models-specific status
- ThinkPad T43, T43p, R52
- all works
- ThinkPad X41
- works: all battery-related
- unknown: cdrom_speed
- ThinkPad T42p, T41, R51, X40, G41
- work: start_charge_thresh, inhbit_charge
- don't work: stop_charge_thresh (not supported by hardware)
- unknown: cdrom_speed
- ThinkPad T40p, R40
- work: cdrom_speed
- don't work: all battery-related (not supported by hardware)
- ThinkPad T40, R50p, X31
- don't work: all battery-related (not supported by hardware)
- unknown: cdrom_speed
Please update the above and report your experience on the discussion page. If the module loads but gives "not supported" errors when you try to use it, report whether the corresponding functionality is available under Windows - maybe your ThinkPad just can't do that.