Need help installing tp_smapi [Solved]

Solaris, RedHat, FreeBSD and the like
Post Reply
Message
Author
Neil
Senior ThinkPadder
Senior ThinkPadder
Posts: 2914
Joined: Sun Aug 07, 2005 5:41 pm
Location: Paragould AR USA

Need help installing tp_smapi [Solved]

#1 Post by Neil » Mon Mar 18, 2013 3:01 pm

Trying to install tp_smapi on my X40 so I can control battery charge thresholds. I'm running Debian sid with XFCE 4.10 from experimental repos, kernel version is 2.6.32-5-686

Been trying to install tp-smapi following these directions from Thinkwiki, and have met with failure every time. Either packages are not found by apt, or the module-assistant method seemed most promising, but failed complaining of kernel headers not being installed, so I tried aptitude's suggestion of installing kernel-headers, but that package could not be found either.

So now I just need someone to walk me through this step-by-step to see what I'm doing wrong and help me get this done.
Last edited by Neil on Sat Mar 23, 2013 3:49 pm, edited 1 time in total.
Collection = T500 - R400 - X300 - X200 - T61 (14" WXGA+) - T61 (14.1" SXGA+) - T60 (15" SXGA+) - X40 - T43p - T43 - T42p - A30P - 600E

twistero
Senior Member
Senior Member
Posts: 851
Joined: Sun Feb 26, 2012 2:25 am
Location: Princeton, New Jersey
Contact:

Re: Need help installing tp_smapi

#2 Post by twistero » Mon Mar 18, 2013 4:11 pm

The "kernel headers" should be in a package named linux-headers-[architecture]. [architecture] may be "486", "686-pae", "amd64", etc. To determine the [architecture] part, search for a package named "linux-image-[architecture]" that's already installed on your system (that package contains your current kernel).

Once you have linux-headers-[architecture] installed, try installing "tp-smapi-dkms" first. (If you already tried that before, purge tp-smapi-dpms then reinstall.) DKMS should be a better way to handle kernel modules since it will automatically compile your modules for any new kernel versions you may install in the future.
Try the module-assistant method only if DKMS fails.
X60 tablet 6363-P3U, 3GB ram, 128GB SanDisk Extreme SSD, SXGA+ screen, Intel 6300
T61 Frankenpad in 15 inch T60 body, UXGA LED-lit AFFS LCD, T9300, 6GB RAM, NVidia NVS140m, Intel 6205, 128GB Crucial M4 SSD, 1TB HGST HDD + eBay caddy in Ultrabay
701c butterfly, 75MHz 486DX4, 40MB ram, 1GB CF card

Neil
Senior ThinkPadder
Senior ThinkPadder
Posts: 2914
Joined: Sun Aug 07, 2005 5:41 pm
Location: Paragould AR USA

Re: Need help installing tp_smapi

#3 Post by Neil » Mon Mar 18, 2013 4:57 pm

OK, thanks for the info twistero, I'll give it a go after a while. Seems running

Code: Select all

aptitude install tp-smapi-source
completely removed my kernel image. Once I figure out how to restore that, I'll try again with tp_smapi.
Collection = T500 - R400 - X300 - X200 - T61 (14" WXGA+) - T61 (14.1" SXGA+) - T60 (15" SXGA+) - X40 - T43p - T43 - T42p - A30P - 600E

Neil
Senior ThinkPadder
Senior ThinkPadder
Posts: 2914
Joined: Sun Aug 07, 2005 5:41 pm
Location: Paragould AR USA

Re: Need help installing tp_smapi

#4 Post by Neil » Fri Mar 22, 2013 8:33 pm

OK, I've re-installed the system, and have tp-smapi-dkms installed. Now what do I do to set charging thresholds? Thinkwiki offers this:
To set the thresholds for starting and stopping battery charging (in percent of current full charge capacity):
# echo 40 > /sys/devices/platform/smapi/BAT0/start_charge_thresh
# echo 70 > /sys/devices/platform/smapi/BAT0/stop_charge_thresh
# cat /sys/devices/platform/smapi/BAT0/*_charge_thresh
But I don't have a clue what to do with that info, or where to make changes. Is there a GUI front end like BMM, or do I have to edit a config file somewhere?

Edit: I found which files to edit...the default setting were start @ 96%, end @ 100%, so I changed those to what I wanted. But, I still don't understand the ThinkWiki directions. If I run those commands in a terminal, it doesn't seem to do anything.
Collection = T500 - R400 - X300 - X200 - T61 (14" WXGA+) - T61 (14.1" SXGA+) - T60 (15" SXGA+) - X40 - T43p - T43 - T42p - A30P - 600E

GomJabbar
Moderator
Moderator
Posts: 9765
Joined: Tue Jun 07, 2005 6:57 am

Re: Need help installing tp_smapi

#5 Post by GomJabbar » Sat Mar 23, 2013 2:26 am

Neil wrote:...If I run those commands in a terminal, it doesn't seem to do anything.
If you notice the hash mark # in front of the command, that means you have to be running terminal as root. You do not type the hash mark though, it is a prompt. To log in terminal as root, type su - {Enter} then your root password {Enter}. That's su <space> <hyphen>. Alternatively you can type sudo then the command and enter your user password {if sudo is set up on your system}

The echo command performs the changes, the cat command verifies the changes (displays the current state).
DKB

Neil
Senior ThinkPadder
Senior ThinkPadder
Posts: 2914
Joined: Sun Aug 07, 2005 5:41 pm
Location: Paragould AR USA

Re: Need help installing tp_smapi

#6 Post by Neil » Sat Mar 23, 2013 3:42 pm

GomJabbar wrote:The echo command performs the changes, the cat command verifies the changes (displays the current state).
This I find to be very useful information. Even though I had already changed the settings, just knowing what the echo and cat commands mean will be useful for many other tasks, I'm sure. And likely not just for me, but the many others who come here looking for help with this.
Collection = T500 - R400 - X300 - X200 - T61 (14" WXGA+) - T61 (14.1" SXGA+) - T60 (15" SXGA+) - X40 - T43p - T43 - T42p - A30P - 600E

ilpalazzo
Posts: 2
Joined: Thu Jun 20, 2013 7:30 am
Location: Poznan, Poland

Re: Need help installing tp_smapi [Solved]

#7 Post by ilpalazzo » Thu Jun 20, 2013 8:40 am

This is my first post so good day to everyone.

I am a total linux noob, in fact I write this on my first Linux install ever. I seem to have problems with installing tp_smapi as well.

What I did:

- I opened a terminal window and typed su and provided root pasword,
- prompt changed to root@debian:~#
- I typed in 'aptitude install tp-smapi-dkms'
- it started to make its thing, asking me to provide with 1st of Debian install Discs,
- It finished to prompt without errors
- i typed in 'echo 40 > /sys/devices/platform/smapi/BAT0/start_charge_thresh' and got an error message that there's not such a device.

as a matter of fact there were not a folder called 'smapi' in the platform folder so I assume the install went bad. Is there a way to make sure the thing is properly installed?

I would be grateful for an advice.
Thinkpad T61 7661VV7 Debian 7

rumbero
Junior Member
Junior Member
Posts: 451
Joined: Fri Mar 04, 2011 7:02 pm
Location: Barcelona, Spain

Re: Need help installing tp_smapi [Solved]

#8 Post by rumbero » Thu Jun 20, 2013 3:13 pm

ilpalazzo wrote:as a matter of fact there were not a folder called 'smapi' in the platform folder so I assume the install went bad. Is there a way to make sure the thing is properly installed?
Installation probably went just fine. This just creates a matching kernel module, but doesn't automatically load it afterwards.

You have to run a "sudo modprobe tp-smapi" first, and then verify with "lsmod | grep smapi" if it was actually loaded.

After that, add the module name to /etc/modules to make sure it is autoloaded during boot: "sudo echo tp-smapi >> /etc/modules".
Broken T23 2647-9RG | A few 14.1" T61 Frankenpads | Two 15" Frankenpad T61+ with UXGA IPS Display

ilpalazzo
Posts: 2
Joined: Thu Jun 20, 2013 7:30 am
Location: Poznan, Poland

Re: Need help installing tp_smapi [Solved]

#9 Post by ilpalazzo » Fri Jun 21, 2013 5:37 am

Thanks, this helped. Perhaps you can advise me on one more thing. tp-smapi packade supposedly contains a modified HDAPS driver that needs to be installed separately. I've only been able to find instructions for doing this when the tp-smapi driver is compiled locally. Can you advise on how to do it in my case?

Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “Linux Questions”

Who is online

Users browsing this forum: No registered users and 1 guest