This is a step-by-step guide on how to ....
Install tp_smapi in openSuse 11.1 using either YAST Software Manager or 1-click Install
(this will enable updates to be performed)
Note1: This installation was performed on a Lenovo W500
running openSuse 11.1 64bit kernel 2.6.27.23-0.1-default
(HDAPS was not active so additional work will be necessary if you have HDAPS active)
you can use the following command in gnome terminal to check if HDAPS is active:
# lsmod|egrep 'hdaps'
(should result in no results if HDAPS is NOT active)
Note2: This installation was performed by a relatively newbie to Linux
(hence the detailed step-by-step instructions)
LOG IN AS ROOT
Perform either step1 or step2 then continue to step 3.
1. YAST Software Manager install option
1a. check if the following respository URL is already listed in the Software Repositories by performing the following:
i. click Computer
ii. click YaST
iii. click Software (in left menu)
iv. click Software Repositories
v. search for the following repository:
pty99(Default) enabled=y autorefresh=y
Name: openSUSE:Factory:Contrib
URL:
Index of /repositories/openSUSE:/Factory:/Contrib/openSUSE_11.1
Category: YUM
if it is not listed...
vi. click the ADD button to include it
vii. tick the option 'specify url'
viii. give it the name 'openSUSE:Factory:Contrib' and enter the url of
Index of /repositories/openSUSE:/Factory:/Contrib/openSUSE_11.1
1b. open Software Management and search for tp_smapi in the 'available' section
1c. select the relevent tp_smapi for your installed kernel and click the install button.
(default kernel = tp_smapi-kmp-default)
2. 1-click Install option
2a. use the search function in
Software.openSUSE.org
to search for tp_smapi and download the 1-click install .ymp file relevent for your installed kernel
(default kernel = tp_smapi-kmp-default.ymp)
2b. install tp_smapi by double clicking the downloaded .ymp file (default kernel = tp_smapi-kmp-default.ymp)
3. The installation of the necessary module packages is now complete.
4. add the following line to file /etc/modprobe.conf.local (is required on T400/T500/W500):
options thinkpad_ec force_io=1
Note: if using HDAPS, you may need to precede the 'options thinkpad_ec force_io=1' line
with the line 'options hdaps hdaps=1' (without the quotes) but I cannot confirm if this is the correct command.
5. check which modules are loaded by using the following command in gnome terminal:
# lsmod|egrep 'hdaps|thinkpad_ec|tp_smapi'
(should result in no results if none of the modules are loaded)
6. manually perform a test load of the tp_smapi module using the following command in gnome terminal:
# modprobe tp_smapi
(should produce no errors if it loaded successfully)
Note: if using HDAPS, the above command would be:
# modprobe tp_smapi hdaps
7. recheck which modules are loaded by using the following command in gnome terminal:
# lsmod|egrep 'hdaps|thinkpad_ec|tp_smapi'
(should result in something similar to if HDAPS is not loaded:
tp_smapi 26832 0
thinkpad_ec 7664 1 tp_smapi
)
8. use the following command in gnome terminal to display the current start & stop battery charge threshold %ages:
# cat /sys/devices/platform/smapi/BAT0/*_charge_thresh
9. use the following command in gnome terminal to set the current start battery charge threshold to 30%:
# echo 30 > /sys/devices/platform/smapi/BAT0/start_charge_thresh
10. use the following command in gnome terminal to set the current stop battery charge threshold to 90%:
# echo 90 > /sys/devices/platform/smapi/BAT0/stop_charge_thresh
11. use the following command in gnome terminal to redisplay the current start & stop battery charge threshold %ages:
# cat /sys/devices/platform/smapi/BAT0/*_charge_thresh
12. enable the tp_smapi module to autoload on boot by...
changing the following line in file /etc/sysconfig/kernel
from
MODULES_LOADED_ON_BOOT=""
to
MODULES_LOADED_ON_BOOT="tp_smapi"
(or if using HDAPS - MODULES_LOADED_ON_BOOT="tp_smapi hdaps")
13. Installation is now complete.
__________________________________________________ __
Credits: Many thanks to member escaner (Oscar) for introducing me to some very useful commands and his explanations regarding kernel versions and rpm files. I would not have been able to install tp_smapi without his help.