Repository navigation
Thinkpad edge 13 - battery threshold issue #1
Description
Activity
Could you please test whether the limits you set (and not see) are used? I have reports that it's just the display that get's borked and the actual thresholds works okay.
The battery was at 93% when i tested the following
I set the start limit to 95:
echo 95 > /sys/devices/platform/smapi/BAT0/start_charge_thresh
and it starts charging:
cat /sys/devices/platform/smapi/BAT0/state
charging
dmesg returns:
[18372.551238] smapi smapi: set_real_thresh: set start to 94 for bat=0
but:
cat /sys/devices/platform/smapi/BAT0/*_charge_thresh
95
94Afterwards i set the stop limit to 97
echo 97 > /sys/devices/platform/smapi/BAT0/stop_charge_thresh
dmesg returns:
[18510.731938] smapi smapi: set_real_thresh: set stop to 97 for bat=0
but:
cat /sys/devices/platform/smapi/BAT0/*_charge_thresh
98
97And... when it got to 97% it stopped charging as expected :)
So it seems to be working, although the returned values from start/stop_charge_thresh are incorrect.I will try again later with lower start charging limits:
echo 40 > /sys/devices/platform/smapi/BAT0/start_charge_thresh
echo 80 > /sys/devices/platform/smapi/BAT0/stop_charge_thresh
dmesg reports:
[19661.249497] smapi smapi: set_real_thresh: set start to 39 for bat=0
[19703.754354] smapi smapi: set_real_thresh: set stop to 80 for bat=0
although
cat /sys/devices/platform/smapi/BAT0/*_charge_thresh
81
80thanks for your help,
CarlosHi again,
did some additional testing involving booting either to windows or linux and setting other values and everything seems to be working properly.I do wonder why the reported values are different from the input... it is the same "function" no?
Can you give me any pointer on how i can look into this?regards,
CarlosWell, I did not write the code, just maintaining it, so my knowledge is limited.
The setting of the values you do via echo happens in
static int set_real_thresh(int bat, enum thresh_type which, int thresh)
which just prints what you wanted to set (after some minimal correction)The reading via cat happens in
static ssize_t show_battery_start_charge_thresh(struct device *dev, struct device_attribute *attr, char *buf)
which really reads the values, and obviously misreads them.Maybe you find something in there?
ups, wrong close
hi,
i own a thinkpad e325 and cant load thinkpad_ec or tp_smapi, too.
but i compiled tp_charge and loaded the module and now i am able to set bat0-stop level, but thats the only thing a can read or write. i'm useing archlinux with linux 3.1.3.i don't know if this is a help for anyone and i'm sorry for my bad english writing skills, but i would appreciate to be able to use more features of tp_smapi.
On Tue, Nov 29, 2011 at 12:30:33PM -0800, ajs124 wrote:
i own a thinkpad e325 and cant load thinkpad_ec or tp_smapi, too. but
i compiled tp_charge and loaded the module and now i am able to set
bat0-stop level, but thats the only thing a can read or write. i'm
useing archlinux with linux 3.1.3.Funny, if tp-charge works, tp-smapi 0.41 should work too.
Could you provide a dmesg output when tp-smapi could not load?Regards
EvgeniBruce Schneier can read and understand Perl programs.
"modprobe -v tp_smapi"
insmod /lib/modules/3.1.3-1-ARCH/extramodules/thinkpad_ec.ko.gz
WARNING: Error inserting thinkpad_ec (/lib/modules/3.1.3-1-ARCH/extramodules/thinkpad_ec.ko.gz): No such device or address FATAL: Error inserting tp_smapi (/lib/modules/3.1.3-1-ARCH/extramodules/tp_smapi.ko.gz): No such device or address
"dmesg"
[ 398.202292] thinkpad_ec: thinkpad_ec_read_row: failed requesting row: (0x01:0x00)->0xfffffff0
[ 398.202302] thinkpad_ec: initial ec test failedinsmod /lib/modules/3.1.3-1-ARCH/extramodules/tp_charge.ko.gz
[ 443.094964] tp_charge: Found SMAPI at address 0x00B0Name : tp_smapi
Version : 0.41-2I have this module loading problem too (archlinux / tp_smapi built from the git / Edge E320 Intel)
having the same problem as described by ajs,
is there any progress?
no, none yet, sorry.
is there a way to help? I'm like alexisrobert on archlinux too
Hello,
I am also able to load tp_charge:
dmesgreports:
[32585.419395] tp_charge: Found SMAPI at address 0x00B2But when I try to load tp_smapi (using the Ubuntu dkms version) I get:
FATAL: Error inserting tp_smapi (/lib/modules/3.0.0-16-generic/updates/dkms/tp_smapi.ko): No such device or addressAnd
dmesgshows:
[32499.931681] thinkpad_ec: thinkpad_ec_read_row: failed requesting row: (0x01:0x00)->0xfffffff0
[32499.931685] thinkpad_ec: initial ec test failedAny ideas as to why this might happen?
I can load tp_smapi fine on my intel Edge 13" (latest bios).
Just downloaded the evgeni-tp_smapi-477c48d file from github and did "make"
followed by "make load":
dmesg:
[20860.437935] thinkpad_ec: thinkpad_ec 0.41 loaded.
[20860.441063] tp_smapi 0.41 loading...
[20860.441289] tp_smapi successfully loaded (smapi_port=0xb2).Using openSUSE 12.1 with 3.3.4 kernel.
CarlosOn Fri, May 4, 2012 at 3:55 PM, jat255 <
reply@reply.github.comwrote:
Hello,
I am also able to load tp_charge:
dmesgreports:
[32585.419395] tp_charge: Found SMAPI at address 0x00B2But when I try to load tp_smapi (using the Ubuntu dkms version) I get:
FATAL: Error inserting tp_smapi
(/lib/modules/3.0.0-16-generic/updates/dkms/tp_smapi.ko): No such device or
addressAnd
dmesgshows:
[32499.931681] thinkpad_ec: thinkpad_ec_read_row: failed requesting row:
(0x01:0x00)->0xfffffff0
[32499.931685] thinkpad_ec: initial ec test failedAny ideas as to why this might happen?
Reply to this email directly or view it on GitHub:
#1 (comment)Thanks for the reply. I tried purging the dkms module through apt-get and building from source like you suggested.
The
makeseemed to go fine, but when I attempted to load withmake load, I got the following resultjosh@josh-ThinkPad:~/development/tp_smapi$ sudo make load if lsmod | grep -q '^hdaps '; then rmmod hdaps; fi if lsmod | grep -q '^tp_smapi '; then rmmod tp_smapi; fi if lsmod | grep -q '^thinkpad_ec '; then rmmod thinkpad_ec; fi if lsmod | grep -q '^tp_base '; then rmmod tp_base; fi # old thinkpad_ec make -C /lib/modules/3.0.0-16-generic/build M=/home/josh/development/tp_smapi O=/lib/modules/3.0.0-16-generic/build modules make[1]: Entering directory `/usr/src/linux-headers-3.0.0-16-generic' Building modules, stage 2. MODPOST 2 modules make[1]: Leaving directory `/usr/src/linux-headers-3.0.0-16-generic' { insmod ./thinkpad_ec.ko && insmod ./tp_smapi.ko debug=0 && :; }; : insmod: error inserting './thinkpad_ec.ko': -1 No such device or addressRelevent
dmesgerrors include the same result as before:[40747.170089] thinkpad_ec: thinkpad_ec_read_row: failed requesting row: (0x01:0x00)->0xfffffff0 [40747.170093] thinkpad_ec: initial ec test failedThis is on my ThinkPad Edge E420s with Ubuntu 11.10. Any other ideas?
Hi,
first of all let me apologize in advance if this is not the proper "channel" for a bug report/help request.
I had been reading the sourceforge page for tp_smapi but it looks "dead" in terms of development and i failed every time at installing the smapi driver. Luckily i found your project and got it installed and running now on my thinkpad edge (13", intel model) on opensuse 11.4 with the 3.0 rc1 kernel.
Loading the module goes well, as seen with dmesg:
[13534.023286] tp_smapi unloaded.
[13572.872541] tp_smapi 0.40 loading...
[13572.873353] tp_smapi successfully loaded (smapi_port=0xb2)
But trying to set the battery threshold limits is not working properly. So, what happens is that if i set the start threshold limit to 40, the stop limit gets automatically set to 39. In a similar way if i set the stop threshold to 40, the start limit will be set to 41 automatically. I can use any value and the other will always be set automatically with a +/- 1 difference - it makes no sense:
echo 40 > /sys/devices/platform/smapi/BAT0/start_charge_thresh
cat /sys/devices/platform/smapi/BAT0/*_charge_thresh
40
39
but with dmesg i see:
[13923.606105] smapi smapi: set_real_thresh: set stop to 44 for bat=0
[13923.712956] smapi smapi: set_real_thresh: set start to 39 for bat=0
likewise, if i do:
echo 40 > /sys/devices/platform/smapi/BAT0/stop_charge_thresh
cat /sys/devices/platform/smapi/BAT0/*_charge_thresh
41
40
and with dmesg i see:
[14108.540534] smapi smapi: set_real_thresh: set start to 35 for bat=0
[14108.647415] smapi smapi: set_real_thresh: set stop to 40 for bat=0
any hint as to how i can start to try and solve this?
regards,
Carlos