Newer Lenovo ThinkPads (such as my E540) are not compatible with tp_smapi-dkms. Fortunately I found that the TLP utility can use either of two different modules -- the tp_smapi OR the thinkpad_acpi DKMS modules -- to communicate the thresholds to the battery.
Nowadays TLP is available via standard Ubuntu or Debian repositories. (Though you may benefit from the latest version available using TLP website to install the packages.)
After installing TLP, set the battery charge thresholds using two lines in the configuration file /etc/default/tlp
START_CHARGE_THRESH_BAT0=65
STOP_CHARGE_THRESH_BAT0=80
This example tells TLP to set the battery thresholds to start charging at 65% and stop charging at 80%. I find that the thresholds persist correctly even when booting into a different OS that doesn't have TLP installed. (Though I presume if you booted into Windows or another OS that DOES have power management tools installed, that OS might overwrite the previously set charge thresholds.)
To TEMPORARILY bring the battery to a full charge, issue the following terminal command:
$ sudo tlp fullcharge
The battery will then charge to its maximum capacity, and revert to the previous thresholds afterwards.
Note: If your laptop is not a "ThinkPad," TLP probably cannot set your battery charge levels. If your vendor supplies a power management utility for Windows, you can probably boot using some form of Windows to set the battery charge levels and then reboot into linux. In my experience, the battery charge threshold settings persist after system reboots.
modprobe tp_smapi
as root, and then see if the files under/sys/devices/platform/smapi
are there. – Renan Sep 18 '12 at 17:18FATAL: Module tp_smapi not found.
. – Tim Sep 18 '12 at 17:44dell_laptop
anddell_wmi
module, for example; I never explored it to see what it does) – Renan Sep 19 '12 at 2:17