Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

My laptop is Lenovo T400, and OS is Ubuntu 12.04.

I have not been able to adjust the thresholds for battery starting charging and stopping charging. I observed that its current starting charging threshold is about 40%, and stopping charging threshold is about 60%. I forgot if it was me and which program I used to control the battery to stop charging at 60% and start charging at 40%.

I followed my previous post http://askubuntu.com/questions/58789/how-to-check-charged-percentage-of-battery-and-to-adjust-its-thresholds, but I don't find /sys/devices/platform/smapi. Also I have /proc/acpi/battery/BAT0/, but I have only three files alarm, info and state.

I want to adjust the thresholds. So I wonder how to do that? Thanks!

share|improve this question
    
Try modprobe tp_smapi as root, and then see if the files under /sys/devices/platform/smapi are there. –  Renan Sep 18 '12 at 17:18
    
@Renan: the module is not found FATAL: Module tp_smapi not found.. –  Tim Sep 18 '12 at 17:44
1  
Install tp_smapi according to the instructions there: thinkwiki.org/wiki/… then try again. –  Renan Sep 18 '12 at 17:46
    
@Renan: Is tp_smapi only for Lenovo laptops? Are battery charging management modules different for different brands of laptops? –  Tim Sep 19 '12 at 1:54
    
Some Lenovo laptops have specific features which tp_smapi gives you access to. I don't know about other brands, but they probably have similar tools (I have a Dell laptop and I see that I have a dell_laptop and dell_wmi module, for example; I never explored it to see what it does) –  Renan Sep 19 '12 at 2:17

1 Answer 1

up vote 2 down vote accepted

You need to install tp_smapi-dkms, just do

apt-get install tp_smapi-dkms

When finished, use lsmod | grep tp_smapi to check if module is loaded, to adjust the charge thresholds, do something like this

echo 40 > /sys/devices/platform/smapi/BAT0/start_charge_thresh
echo 60 > /sys/devices/platform/smapi/BAT0/stop_charge_thresh

Add these lines to /etc/rc.local to run them at boot.

This module works at least on X220.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.