All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Starikovskiy <astarikovskiy@suse.de>
To: Len Brown <lenb@kernel.org>
Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br>,
	linux-acpi@vger.kernel.org, power@bughost.org
Subject: Re: wrong ACPI estimate (fwd)
Date: Thu, 15 Jan 2009 23:17:50 +0300	[thread overview]
Message-ID: <496F99EE.1040807@suse.de> (raw)
In-Reply-To: <alpine.LFD.2.00.0901151411290.4737@localhost.localdomain>

Len Brown wrote:
> Alexey, Henrique,
> Is this related to the power supply sysfs wrong-units bug?
Yes.

Regards,
Alex.
> 
> thanks,
> Len Brown, Intel Open Source Technology Center
> 
> ---------- Forwarded message ----------
> Date: Thu, 15 Jan 2009 10:14:41 -0800
> From: "Kok, Auke" <auke-jan.h.kok@intel.com>
> To: Winfried Tilanus <winfried@tilanus.com>
> Cc: "power@bughost.org" <power@bughost.org>
> Subject: Re: wrong ACPI estimate
> 
> Winfried Tilanus wrote:
>> Hi,
>>
>> I am running Debian Lenny on a thinkpad x61s, with tp_smapi modules. I
>> incorrectly thought the following problem was fixed:
>>
>> $ sudo powertop -d | grep "Power usage"
>> Power usage (ACPI estimate): 200.4W (0.3 hours)
>>
>> This problem is discussed in Debian bug 497929
>> (http://bugs.debian.org/497929)
>> The problem is fixed by reverting the a code change mentioned there:
>>
>> @@ -644,7 +651,7 @@ void print_battery_sysfs(void)
>>                         continue;
>>                 memset(line, 0, 1024);
>>                 if (fgets(line, 1024, file) != NULL) {
>> -                       watts_drawn = strtoull(line, NULL, 10) / 1000000.0;
>> +                       amperes_drawn = strtoull(line, NULL, 10) /
>> 1000000.0;
>>                 }
>>                 fclose(file);
>>
>> Is there a way to fix this?
> 
> I doubt that we can fix this for everyone :/
> 
> unfortunately it seems that the numbers reported back to the kernel are of
> different types on various systems.
> 
> I will revert this change in the next release, just because the initial change
> that did this did not take this into account, and I'd rather be back at the
> initial (broken) stage than another (broken) stage.
> 
> We'll have to figure out we somehow can distinguish between the two units when we
> read the data, which will likely be more complex, or involve fixing various ACPI
> drivers to unify their number reporting.
> 
> Auke
> 
> _______________________________________________
> Power mailing list
> Power@bughost.org
> http://www.bughost.org/mailman/listinfo/power


      reply	other threads:[~2009-01-15 20:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-15 19:13 wrong ACPI estimate (fwd) Len Brown
2009-01-15 20:17 ` Alexey Starikovskiy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=496F99EE.1040807@suse.de \
    --to=astarikovskiy@suse.de \
    --cc=hmh@hmh.eng.br \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=power@bughost.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.