Torsmo & dsl-3.4.6


Forum: User Feedback
Topic: Torsmo & dsl-3.4.6
started by: Juanito

Posted by Juanito on Nov. 10 2007,10:21
I just loaded dsl-3.4.6 on my laptop - the good news is that the swapfile bug seems to have been cured in torsmo-0.18.

Strangely, on battery power the time remaining readout seems fine, but on ac power, the readout says "unknown 196%" whereas it should read "AC".

Note that on the unmodified torsmo-0.18, the readout is correct if I use John's ram swapfile thingy.

Posted by ^thehatsrule^ on Nov. 10 2007,23:27
So you are saying that it says "AC" with the unmodified torsmo-0.18 only if you use the swapfile trick ?

The Battery entry is usually empty for me... so I didn't notice anything different (I use desktops only - just checked 0.17 as well but only on DSL 4.0).

How was the unmodified torsmo-0.18 compiled?  All I did was configure at the defaults.

Perhaps the files in /proc/acpi/battery or apm etc. are different than when you used the unmodified one?

Posted by Juanito on Nov. 11 2007,03:40
Quote
So you are saying that it says "AC" with the unmodified torsmo-0.18 only if you use the swapfile trick ?

- if I don't use the swapfile trick, the display doesn't appear at all...
Quote
How was the unmodified torsmo-0.18 compiled?

- I don't know, I was using the version that came with earlier versions of dsl-3.4.x
Quote
Perhaps the files in /proc/acpi/battery or apm etc. are different than when you used the unmodified one?

- no, still the same files.

Posted by ^thehatsrule^ on Nov. 11 2007,03:54
Quote
- if I don't use the swapfile trick, the display doesn't appear at all...
Of course...

Quote
- I don't know, I was using the version that came with earlier versions of dsl-3.4.x
Would it be possible to test that one again (maybe copy the binary over)?  I guess we can only ask andrewb (I think he compiled that one).

I just checked the battery state on DSL 3.2 and it appears to be blank as well... just tried 3.4.6 and it shows AC.
It probably needs the battery files to have an entry.

Was your unknown % readout on a fresh system boot with the AC adapter plugged in?

In the acpi part of the 0.18 source, it looks like its last test case checks for either unknown and outputs a number, or AC.  I could add something to check if that number is less than or equal to 100, or get rid of it the unknown part entirely (looks like an addition in 0.18).

From these initial conclusions, perhaps the battery line should be removed if there would be a blank entry - but it isn't anything bad.

Posted by Juanito on Nov. 11 2007,14:35
Quote
Would it be possible to test that one again (maybe copy the binary over)?

- I copied the torsmo executable over from 3.4.3 to replace the one in 3.4.6:

On a desktop it shows "Battery: AC"
On a laptop it shows "Battery: Unknown 196%" [after activating a ram swapfile]

Note that is booting with a fully charged laptop plugged into the mains.

When I unplugged the laptop and let it run down a little, the display on battery looked to make sense. When I plugged it back into the mains I got:

"Battery: charging 87%"
"Battery: "7m 14s" [a few seconds after the display above]
"Battery: Unknown 196%" [when fully charged again]

I loaded torsmo-0.17 and "Battery: Unknown 196%" changes to "AC" or "charging" after letting the battery run down and plugging it in again.

Note also, when charging:
Code Sample
$ cat /proc/acpi/battery/BAT0/state
present:                 yes
capacity state:          ok
charging state:          charging
present rate:            6340 mW
remaining capacity:      20280 mWh
present voltage:         12680 mV
Note also, when charging:

and when charged
Code Sample
present:                 yes
capacity state:          ok
charging state:          unknown
present rate:            unknown
remaining capacity:      42000 mWh
present voltage:         12427 mV


But:
Code Sample
$ cat /proc/acpi/battery/BAT0/info
present:                 yes
design capacity:         42000 mWh
last full capacity:      21410 mWh
battery technology:      rechargeable
design voltage:          11100 mV
design capacity warning: 4200 mWh
design capacity low:     1272 mWh
capacity granularity 1:  420 mWh
capacity granularity 2:  420 mWh
model number:            DELL 0006T0
serial number:           404
battery type:            LION
OEM info:                Sanyo


I believe the design/brand new capacity of the battery is 42000 mWh but now, after 3 years wear, it only ever manages 21410 mWh and 21420 * 196% = 42000...

This would seem to indicate that torsmo-0.18 it trying to show the time left to charge but gets lost when the battery becomes fully charged?

Note that earlier versions of cpufreqd (which takes a variety of actions based on the % battery charge) used to show a similar problem which was fixed in later versions.

Posted by ^thehatsrule^ on Nov. 11 2007,18:23
Expected results... as that "unknown" test case was only added in v0.18.

Now I'm just wondering if its worth it to modify more source with the following options:
- check if the % is less than or equal to 100 [from previous post]
- get rid of it the unknown part entirely (looks like an addition in 0.18) [from previous post] which I would think would act like 0.17
- compare if remaining_capacity == design_capacity
- compare if remaining_capacity > last_full_capacity (which is more or less like #1)

Posted by andrewb on Nov. 11 2007,23:33
Quote (^thehatsrule^ @ Nov. 10 2007,12:54)
Quote
- I don't know, I was using the version that came with earlier versions of dsl-3.4.x
Would it be possible to test that one again (maybe copy the binary over)?  I guess we can only ask andrewb (I think he compiled that one).

I used the gcc with libs compiler from the repository & followed the instructions in the files downloaded from sourceforge (i.e. run './configure' followed by 'make', followed by './torsmo'). I got the floating point exception when I used it running DSL on VirtualBox under Windoze XP, but it worked flawlessley on my laptop (Libretto 100CT). I reported both of these when I submitted the 0.18 version. Nothing was changed so it should be easy enough to recompile is you want to check.

You should try running torsmo from a terminal window to see what errors appear. This will tell you whether it is able to read the battery data (i.e the battery directory is set correctly).

I have just tried adding a swapfile to DSL running on the virtual machine & torsmo 0.18 works OK there - no floating point exceptions. (still waiting for 3.4.6 to download so i can't comment on the swapfile fix Robert has implemented there).

From memory the battery/AC state on the libretto does change automatically, but there can be a lag when plugging/unplugging the mains

Posted by ^thehatsrule^ on Nov. 12 2007,05:41
andrewb: yes, I have just compiled with the defaults configs as well... thanks for confirming.  It was just that Juanito originally hinted that it did not appear in your build, although later it showed the same problem.
Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.