0

I have downloaded tp_smapi module for my Thinkpad T500 using the steps in ThinkWiki and ran make. it encountered no errors

root@Forge:/storage/Repository/git/tp_smapi# make install HDAPS=1 FORCE_IO=1
make -C /lib/modules/3.19.0-18-generic/build M=/storage/Repository/git/tp_smapi O=/lib/modules/3.19.0-18-generic/build modules
make[1]: Entering directory '/usr/src/linux-headers-3.19.0-18-generic'
make[2]: Entering directory '/usr/src/linux-headers-3.19.0-18-generic'
  Building modules, stage 2.
  MODPOST 3 modules
make[2]: Leaving directory '/usr/src/linux-headers-3.19.0-18-generic'
make[1]: Leaving directory '/usr/src/linux-headers-3.19.0-18-generic'
rm -f /lib/modules/3.19.0-18-generic/kernel/drivers/platform/x86/{thinkpad_ec,tp_smapi,tp_base}.ko
rm -f /lib/modules/3.19.0-18-generic/kernel/drivers/firmware/{thinkpad_ec,tp_smapi,tp_base}.ko
rm -f /lib/modules/3.19.0-18-generic/kernel/extra/{thinkpad_ec,tp_smapi,tp_base}.ko
rm -f /lib/modules/3.19.0-18-generic/kernel/drivers/platform/x86/hdaps.ko
rm -f /lib/modules/3.19.0-18-generic/kernel/extra/hdaps.ko
make -C /lib/modules/3.19.0-18-generic/build M=/storage/Repository/git/tp_smapi O=/lib/modules/3.19.0-18-generic/build modules_install
make[1]: Entering directory '/usr/src/linux-headers-3.19.0-18-generic'
make[2]: Entering directory '/usr/src/linux-headers-3.19.0-18-generic'
  INSTALL /storage/Repository/git/tp_smapi/hdaps.ko
Can't read private key
  INSTALL /storage/Repository/git/tp_smapi/thinkpad_ec.ko
Can't read private key
  INSTALL /storage/Repository/git/tp_smapi/tp_smapi.ko
Can't read private key
  DEPMOD  3.19.0-18-generic
make[2]: Leaving directory '/usr/src/linux-headers-3.19.0-18-generic'
make[1]: Leaving directory '/usr/src/linux-headers-3.19.0-18-generic'
depmod 3.19.0-18-generic

But when i tried to view the status of the battery using tlp, it shows as not loaded/installed:

root@Forge:/storage/Repository/git/tp_smapi# tlp-stat -b
--- TLP 0.7 --------------------------------------------

+++ ThinkPad Extended Battery Functions
tp-smapi   = inactive (kernel module 'tp_smapi' load error)
tpacpi-bat = inactive (unsupported hardware)

+++ Battery Status
/sys/class/power_supply/BAT0/manufacturer                   = SONY
/sys/class/power_supply/BAT0/model_name                     = 92P1141
/sys/class/power_supply/BAT0/cycle_count                    = (not supported)
/sys/class/power_supply/BAT0/energy_full_design             =  56160 [mWh]
/sys/class/power_supply/BAT0/energy_full                    =  39310 [mWh]
/sys/class/power_supply/BAT0/energy_now                     =  39310 [mWh]
/sys/class/power_supply/BAT0/power_now                      =      0 [mW]
/sys/class/power_supply/BAT0/status                         = Full

I have followed the steps provided on the sites to the best of my knowledge, but am unsure as to why the module is not installed.

  • OS: Xubuntu 15.04 LTS
  • Module code: tp_smapi-GitHub
  • Kernel: 3.19.0-18-generic (x86-64)
Sol Illadan
  • 15
  • 1
  • 5

1 Answers1

2

Many instructions at thinkwiki.org are very outdated.

Just install the package from the Ubuntu repos:

sudo apt-get install tp-smapi-dkms

(as described in TLP's docs too)

linrunner
  • 1,347
  • 6
  • 10
  • i have tried to do so & restarted, system says "tp-smapi-dkms is already the newest version."and tlp-stat shows the same error message about tp_smapi load error. – Sol Illadan Jun 01 '15 at 00:29
  • Lets see what happens if you load by hand: `sudo modprobe -v tp_smapi force_io=1` and don't reboot afterwards, just check with `sudo tlp-stat -b` – linrunner Jun 01 '15 at 06:58
  • I am getting a the following error message: `sol@Forge:~$ sudo modprobe -v tp_smapi force_io=1` `insmod /lib/modules/3.19.0-18-generic/extra/thinkpad_ec.ko` `modprobe: ERROR: could not insert 'tp_smapi': No such device or address` – Sol Illadan Jun 02 '15 at 10:55
  • I have found the issue - there is no current conf file `/etc/modprobe.conf`, I have found that we need to create a new conf file in `/etc/modprobe.d` folder which i did & added the load with options for both modules. `options thinkpad_ec force_io=1 \n options tp_smapi hdaps=1 force_io=1 ` – Sol Illadan Jun 06 '15 at 20:17