Newbie, Mint on T42, battery drains - won't charge?
-
DaveG11th
- Freshman Member
- Posts: 58
- Joined: Sun Sep 07, 2008 6:38 pm
- Location: Framingham (Boston) MA
Newbie, Mint on T42, battery drains - won't charge?
The lost newbie is back...
Installed Mint, but running it with the ac adapter just drains the battery. I can't find any settings in Mint to set upper and lower charging threshholds. I have to reboot to Windows XP to get the battery to charge again.
I Googled for answers - but came up only with tp smapi. Every discussion mentions installing, but none say how, and I can't find the exe? package? in the Mint Package Handler.
There is a 'sh' file in Thinkwikie dealing with tp smapi, but no word on how to install it.
One discussion mention the need to recompile, but I cannot find a development language in my Mint whatever-it-is (similar in functionality to Windows Start Menu). In any case, I wouldn't know what to recompile, even if I could find a language or compiler.
Is there something I (emphasis on newb-I) can download and install so that my T42 battery will charge under Mint?
Installed Mint, but running it with the ac adapter just drains the battery. I can't find any settings in Mint to set upper and lower charging threshholds. I have to reboot to Windows XP to get the battery to charge again.
I Googled for answers - but came up only with tp smapi. Every discussion mentions installing, but none say how, and I can't find the exe? package? in the Mint Package Handler.
There is a 'sh' file in Thinkwikie dealing with tp smapi, but no word on how to install it.
One discussion mention the need to recompile, but I cannot find a development language in my Mint whatever-it-is (similar in functionality to Windows Start Menu). In any case, I wouldn't know what to recompile, even if I could find a language or compiler.
Is there something I (emphasis on newb-I) can download and install so that my T42 battery will charge under Mint?
Dave
T42 2373-K1U / 1GB RAM / 60GBHDD / WiFi / Bluetooth / XP Pro
Desktop: IBM Intellistation 6850-22U / dual Xeon 2GHz / 2 GB RAM / 4 SCSI 10K rpm HDD / XP Pro
T42 2373-K1U / 1GB RAM / 60GBHDD / WiFi / Bluetooth / XP Pro
Desktop: IBM Intellistation 6850-22U / dual Xeon 2GHz / 2 GB RAM / 4 SCSI 10K rpm HDD / XP Pro
-
DaveG11th
- Freshman Member
- Posts: 58
- Joined: Sun Sep 07, 2008 6:38 pm
- Location: Framingham (Boston) MA
OK - now it's NOT doing this - instead shows an icon with a plug superimposed on a battery, and hovering gives me info on battery charge and (when on AC) notification that it's running on AC.
I have no idea what's changed.
Meanwhile, I still don't know how to stop charging the battery when it reaches 80%, start at 50%... any pointers are welcome.
I have no idea what's changed.
Meanwhile, I still don't know how to stop charging the battery when it reaches 80%, start at 50%... any pointers are welcome.
Dave
T42 2373-K1U / 1GB RAM / 60GBHDD / WiFi / Bluetooth / XP Pro
Desktop: IBM Intellistation 6850-22U / dual Xeon 2GHz / 2 GB RAM / 4 SCSI 10K rpm HDD / XP Pro
T42 2373-K1U / 1GB RAM / 60GBHDD / WiFi / Bluetooth / XP Pro
Desktop: IBM Intellistation 6850-22U / dual Xeon 2GHz / 2 GB RAM / 4 SCSI 10K rpm HDD / XP Pro
Sorry about the erratic charging....I have no idea what could be causing that. Regarding the battery thresholds you'll need the tp_smapi kernel module. You can check out http://www.thinkwiki.org for more details. Once you have that set up you can add the following lines to your local startup script:
This sets my battery to start charging when below 30% and stops at 85%.
Hope this helps.
Code: Select all
#Set battery thresholds
echo 30 > /sys/devices/platform/smapi/BAT0/start_charge_thresh
echo 85 > /sys/devices/platform/smapi/BAT0/stop_charge_thresh
Hope this helps.
W510: i7-820QM / 8GB 1066 RAM/ 1 GB NVIDIA Quadro FX 880M / 500GB 7200rpm / 15.6" HD 1080 / Arch Linux
-
DaveG11th
- Freshman Member
- Posts: 58
- Joined: Sun Sep 07, 2008 6:38 pm
- Location: Framingham (Boston) MA
Thanks for the pointers -- I'm going to assume that the charging thing has somehow healed itself.Superego wrote:Sorry about the erratic charging....I have no idea what could be causing that. Regarding the battery thresholds you'll need the tp_smapi kernel module. You can check out http://www.thinkwiki.org for more details.
Unfortunatelly, total newbie here. I've been to both the thinkwiki and mintwiki entries, and I fear that they're opaque to me. For example, I don't know how to download a kernel module other than through the mint package handler, and tp_smapi doesn't come up in a search there. Also, since Mint is based on Ubuntu, shouldn't it already be in my possession?
In any case, where do I find out how to set it up in the kernel? Do I have to recompile something? Deer in headlights look..
I'm trying to find resources. Linux for Dummies doesn't cover Ubuntu or Mint, and 8th Edition gets terrible reviews. Books in general -- it won't take many to add up to the cost of a Windows license...
The code looks easy enough, but how do I find my startup script -- do I use the Mint text editor and open an (?) equivalent of a DOS BAT file, or do I use the 'terminal' with some sort of command? If the former, what's the name of the file, and where is it? If the latter, what's the command?Once you have that set up you can add the following lines to your local startup script:
This sets my battery to start charging when below 30% and stops at 85%.Code: Select all
#Set battery thresholds echo 30 > /sys/devices/platform/smapi/BAT0/start_charge_thresh echo 85 > /sys/devices/platform/smapi/BAT0/stop_charge_thresh
Hope this helps.
Sorry about this, but I'm so much a beginner that I need my hand held the whole way... or a pointer or links.
All my Googling so far has plunged me into terminology that's still foreign to me... and I hear only my own voice when I taught English long ago: 'If you don't know the meaning of the words, how can you know the meaning of a sentence, paragraph, passage? C'mon guys, just look them up.' Problem is, I can't find where to look them up...
Dave
T42 2373-K1U / 1GB RAM / 60GBHDD / WiFi / Bluetooth / XP Pro
Desktop: IBM Intellistation 6850-22U / dual Xeon 2GHz / 2 GB RAM / 4 SCSI 10K rpm HDD / XP Pro
T42 2373-K1U / 1GB RAM / 60GBHDD / WiFi / Bluetooth / XP Pro
Desktop: IBM Intellistation 6850-22U / dual Xeon 2GHz / 2 GB RAM / 4 SCSI 10K rpm HDD / XP Pro
Assuming you have a recent version of Mint, it should already be there. Look for the /sys/devices/platform/smapi directory, if it does not exist then you need to load the driver like so: "sudo modprobe tp_smapi". Once the directory's there, you just run the echo commands Superego mentioned to change the thresholds.
To load a kernel module in Linux you enter the following in a terminal:
Of course if you wanted to load a different module you would replace tp_smapi with the appropriate module.
You can use the 'lsmod' command to view the status of loaded kernel modules. For example:
will execute the lsmod command and search for and print all lines with the phrase 'tp_smapi' in it. The | command simply pipes/redirects the output of grep (which searches for the printed line tp_smapi)
Once the module is loaded check that you have the smapi directory:
You should see the BAT0 directory.
In a terminal execute the following commands (either as root or using sudo):
To check enter the following commands:
You should see the values you set.
To get this to all happen automatically you'll need to do 2 things:
1) Get the tp_smapi module to load at boot
2) Set battery thresholds in local startup script.
Note that you will need to edit some files as root. Any text editor will be fine (I prefer vi, but nano is a little more forgiving, and gedit is good for beginners). If you don't edit via the command line (e.g. using vi or nano) but rather with a GUI text editor (e.g. gedit) you'll want to use the following command to edit
gksudo is simply a graphical sudo. You should use gksudo for applications and sudo for command-line actions. The reasons are outside the scope of this thread but pm me if you have questions.
To be safe I would backup the original files before editing (it's a good practice when editing system config files). You can do
to make a copy of the file before editing.
1) Load module on boot
Assuming the tp_smapi module loads with modprobe, you can add tp_smapi to the end of the /etc/modules file. You may want to double check this with someone (or better yet, check the ubuntu/mint forums) because my Arch Linux loads modules in a different way and I'm a little fuzzy on modules in other distros.
2) Add commands to /etc/rc.local
To set the thresholds automatically you have some options. I'm going to describe one method but know that there are several ways to accomplish the same thing.
This is where I put all of my homemade commands/scripts that I run at startup. I put them all here so that I can easily keep track of them and also so they don't get mixed in with other scripts (aka those that I didn't write and Arch Linux installed).
Backup the original rc.local file:
Now you just need to add the two lines from above to /etc/rc.local:
It doesn't matter where, just as long as it is before the "exit 0" line. I would also add a comment so you know what you've done for future reference (the '#' symbol denotes a comment.
To sum up, here's what your rc.local file should look like:
In case Mint doesn't have this script you can create a file called rc.local in /etc, copy and paste the above code into it, save it.
Now that you have your rc.local script you need to make it executable:
Reboot and check that the script worked:
You should see the values you set.
Let me know if this worked. If not we have some other options, but we'll worry about that when we need to.
Code: Select all
sudo modprobe tp_smapi
You can use the 'lsmod' command to view the status of loaded kernel modules. For example:
Code: Select all
lsmod | grep tp_smapi
Once the module is loaded check that you have the smapi directory:
Code: Select all
ls /sys/devices/platform/smapi
In a terminal execute the following commands (either as root or using sudo):
Code: Select all
echo 30 > /sys/devices/platform/smapi/BAT0/start_charge_thresh
echo 85 > /sys/devices/platform/smapi/BAT0/stop_charge_thresh
Code: Select all
cat /sys/devices/platform/smapi/BAT0/start_charge_thresh
cat /sys/devices/platform/smapi/BAT0/stop_charge_thresh
To get this to all happen automatically you'll need to do 2 things:
1) Get the tp_smapi module to load at boot
2) Set battery thresholds in local startup script.
Note that you will need to edit some files as root. Any text editor will be fine (I prefer vi, but nano is a little more forgiving, and gedit is good for beginners). If you don't edit via the command line (e.g. using vi or nano) but rather with a GUI text editor (e.g. gedit) you'll want to use the following command to edit
Code: Select all
gksudo gedit /path/to/file
To be safe I would backup the original files before editing (it's a good practice when editing system config files). You can do
Code: Select all
sudo cp /path/to/file /path/to/file.bak
1) Load module on boot
Assuming the tp_smapi module loads with modprobe, you can add tp_smapi to the end of the /etc/modules file. You may want to double check this with someone (or better yet, check the ubuntu/mint forums) because my Arch Linux loads modules in a different way and I'm a little fuzzy on modules in other distros.
2) Add commands to /etc/rc.local
To set the thresholds automatically you have some options. I'm going to describe one method but know that there are several ways to accomplish the same thing.
This is where I put all of my homemade commands/scripts that I run at startup. I put them all here so that I can easily keep track of them and also so they don't get mixed in with other scripts (aka those that I didn't write and Arch Linux installed).
Backup the original rc.local file:
Code: Select all
sudo cp /etc/rc.local /etc/rc.local.bak
Code: Select all
echo 30 > /sys/devices/platform/smapi/BAT0/start_charge_thresh
echo 85 > /sys/devices/platform/smapi/BAT0/stop_charge_thresh
To sum up, here's what your rc.local file should look like:
Code: Select all
#!/bin/sh
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the
# execution bits.
#
# By default this script does nothing.
# Set battery thresholds
echo 30 > /sys/devices/platform/smapi/BAT0/start_charge_thresh
echo 85 > /sys/devices/platform/smapi/BAT0/stop_charge_thresh
exit 0
Now that you have your rc.local script you need to make it executable:
Code: Select all
sudo chmod +x /etc/rc.local
Code: Select all
cat /sys/devices/platform/smapi/BAT0/start_charge_thresh
cat /sys/devices/platform/smapi/BAT0/stop_charge_thresh
Let me know if this worked. If not we have some other options, but we'll worry about that when we need to.
W510: i7-820QM / 8GB 1066 RAM/ 1 GB NVIDIA Quadro FX 880M / 500GB 7200rpm / 15.6" HD 1080 / Arch Linux
-
DaveG11th
- Freshman Member
- Posts: 58
- Joined: Sun Sep 07, 2008 6:38 pm
- Location: Framingham (Boston) MA
Superego - thanks for taking the time to spell all this out. Believe, me, it's much appreciated, and I'll be working my way through the steps later today.
Dave
T42 2373-K1U / 1GB RAM / 60GBHDD / WiFi / Bluetooth / XP Pro
Desktop: IBM Intellistation 6850-22U / dual Xeon 2GHz / 2 GB RAM / 4 SCSI 10K rpm HDD / XP Pro
T42 2373-K1U / 1GB RAM / 60GBHDD / WiFi / Bluetooth / XP Pro
Desktop: IBM Intellistation 6850-22U / dual Xeon 2GHz / 2 GB RAM / 4 SCSI 10K rpm HDD / XP Pro
-
DaveG11th
- Freshman Member
- Posts: 58
- Joined: Sun Sep 07, 2008 6:38 pm
- Location: Framingham (Boston) MA
Something seems to have gone awry -- everything works up to the 'cat' entries, exactly as you spelled out.
,,,, whoops, for some reason, I can't back up in the terminal and copy text...
Cat for start_charge_thresh returns 96 (where echo had the right one I'm trying, 50)
Cat for stop_charge-thresh returns Operation not supported.(echo was for 85)
Dave[/code]
,,,, whoops, for some reason, I can't back up in the terminal and copy text...
Cat for start_charge_thresh returns 96 (where echo had the right one I'm trying, 50)
Cat for stop_charge-thresh returns Operation not supported.(echo was for 85)
Dave[/code]
Dave
T42 2373-K1U / 1GB RAM / 60GBHDD / WiFi / Bluetooth / XP Pro
Desktop: IBM Intellistation 6850-22U / dual Xeon 2GHz / 2 GB RAM / 4 SCSI 10K rpm HDD / XP Pro
T42 2373-K1U / 1GB RAM / 60GBHDD / WiFi / Bluetooth / XP Pro
Desktop: IBM Intellistation 6850-22U / dual Xeon 2GHz / 2 GB RAM / 4 SCSI 10K rpm HDD / XP Pro
So when you manually change the thresholds, that is you enter the commands:
and then check that the thresholds have been set, using the commands:
everything checks out ok?
Code: Select all
echo 50 > /sys/devices/platform/smapi/BAT0/start_charge_thresh
echo 85 > /sys/devices/platform/smapi/BAT0/stop_charge_thresh
Code: Select all
cat /sys/devices/platform/smapi/BAT0/start_charge_thresh
cat /sys/devices/platform/smapi/BAT0/stop_charge_thresh
W510: i7-820QM / 8GB 1066 RAM/ 1 GB NVIDIA Quadro FX 880M / 500GB 7200rpm / 15.6" HD 1080 / Arch Linux
-
DaveG11th
- Freshman Member
- Posts: 58
- Joined: Sun Sep 07, 2008 6:38 pm
- Location: Framingham (Boston) MA
My echo lines (your first code formatting) are exactly as you have them -
The cat lines (your second code section) returns 96 and Operation not supported, so the threshholds are not being set by my typing in the terminal.
The cat lines (your second code section) returns 96 and Operation not supported, so the threshholds are not being set by my typing in the terminal.
Dave
T42 2373-K1U / 1GB RAM / 60GBHDD / WiFi / Bluetooth / XP Pro
Desktop: IBM Intellistation 6850-22U / dual Xeon 2GHz / 2 GB RAM / 4 SCSI 10K rpm HDD / XP Pro
T42 2373-K1U / 1GB RAM / 60GBHDD / WiFi / Bluetooth / XP Pro
Desktop: IBM Intellistation 6850-22U / dual Xeon 2GHz / 2 GB RAM / 4 SCSI 10K rpm HDD / XP Pro
Probably should've looked at this before-hand, but your T42 doesn't suuport the stop_charge_thresh option; it does support the start_charge_thresh option.
Check out the support matrix at
http://www.thinkwiki.org/wiki/Tp_smapi# ... fic_status
Check out the support matrix at
http://www.thinkwiki.org/wiki/Tp_smapi# ... fic_status
W510: i7-820QM / 8GB 1066 RAM/ 1 GB NVIDIA Quadro FX 880M / 500GB 7200rpm / 15.6" HD 1080 / Arch Linux
-
DaveG11th
- Freshman Member
- Posts: 58
- Joined: Sun Sep 07, 2008 6:38 pm
- Location: Framingham (Boston) MA
Ah well, looks as though I'll drop the effort. I'd rather not go to 100%, so I'll have to watch this manually.
Meanwhile, I've learned at least a little.
Thanks for your help.
Meanwhile, I've learned at least a little.
Thanks for your help.
Dave
T42 2373-K1U / 1GB RAM / 60GBHDD / WiFi / Bluetooth / XP Pro
Desktop: IBM Intellistation 6850-22U / dual Xeon 2GHz / 2 GB RAM / 4 SCSI 10K rpm HDD / XP Pro
T42 2373-K1U / 1GB RAM / 60GBHDD / WiFi / Bluetooth / XP Pro
Desktop: IBM Intellistation 6850-22U / dual Xeon 2GHz / 2 GB RAM / 4 SCSI 10K rpm HDD / XP Pro
Re: Newbie, Mint on T42, battery drains - won't charge?
I've just come across tp_smapi (am on ArchLinux) and found this thread googling.
I've got a trusty T41 and the support matrix states that stop_charge_thresh is not supported. This IS a bummer, it was just what the doctor ordered...
Are there perhaps any workarounds, BIOS upgrades or some such to convince this old man not to overcharge?
I've got a trusty T41 and the support matrix states that stop_charge_thresh is not supported. This IS a bummer, it was just what the doctor ordered...
Are there perhaps any workarounds, BIOS upgrades or some such to convince this old man not to overcharge?
bog standard T41 (2373), 54MBit Wlan, DVD-burner, purring along at 35°C or thereabouts on ArchLinux
Re: Newbie, Mint on T42, battery drains - won't charge?
Okay, I found the solution. For all those who like me own a partially supported tp_smapi thinkpad, go here. I wrote it up on the Arch Wiki.
bog standard T41 (2373), 54MBit Wlan, DVD-burner, purring along at 35°C or thereabouts on ArchLinux
-
- Similar Topics
- Replies
- Views
- Last post
-
-
Brand New Oem X230 Battery Losing Full Charge Capacity Fast!
by TheMagicT410 » Sat Feb 11, 2017 12:58 pm » in ThinkPad X230 and later Series - 5 Replies
- 826 Views
-
Last post by TheMagicT410
Sat Feb 25, 2017 3:04 pm
-
-
- 3 Replies
- 267 Views
-
Last post by Temetka
Wed Apr 12, 2017 1:28 am
-
-
newbie x220 screen upgrade
by VanZan » Thu Apr 13, 2017 6:17 am » in ThinkPad X200/201/220 and X300/301 Series - 6 Replies
- 900 Views
-
Last post by jaspen-meyer
Fri Apr 14, 2017 9:06 am
-
-
-
Newbie with a question
by da-lurker » Tue May 16, 2017 3:07 pm » in ThinkPad T400/410/420 and T500/510/520 Series - 8 Replies
- 686 Views
-
Last post by RealBlackStuff
Sun Jun 25, 2017 4:10 pm
-
Who is online
Users browsing this forum: No registered users and 3 guests




