public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* /sys/class/power_supply/BAT0/ charge_ vs energy_
       [not found]       ` <CA+z-pWEtiW9Rc9yjXNZSc7daFRwDieYb3Bnxt6=m+G+k_ELL8g@mail.gmail.com>
@ 2012-01-09 11:31         ` Jamie Kitson
  2012-01-09 12:10           ` Jamie Kitson
  0 siblings, 1 reply; 7+ messages in thread
From: Jamie Kitson @ 2012-01-09 11:31 UTC (permalink / raw)
  To: linux-acpi

Hi,

I have an issue with my Arch installation on an X220 laptop.

Linux jamie-laptop 3.1.5-1-ARCH #1 SMP PREEMPT Sat Dec 10 14:43:09 CET
2011 x86_64 Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz GenuineIntel
GNU/Linux

If I boot with AC plugged in the /sys/class/power_supply/BAT0/
directory is populated with charge_*, but if I boot on battery the
directory is populated with energy_*.

Disconnecting/connecting the power after boot does not effect the file names.

Is this a bug or a feature? It makes scripts harder to write than necessary.

Thanks, Jamie

^ permalink raw reply	[flat|nested] 7+ messages in thread

* /sys/class/power_supply/BAT0/ charge_ vs energy_
  2012-01-09 11:31         ` /sys/class/power_supply/BAT0/ charge_ vs energy_ Jamie Kitson
@ 2012-01-09 12:10           ` Jamie Kitson
  2012-01-09 13:37             ` Matthew Garrett
  0 siblings, 1 reply; 7+ messages in thread
From: Jamie Kitson @ 2012-01-09 12:10 UTC (permalink / raw)
  To: linux-acpi

Hi,

I have an issue with my Arch installation on an X220 laptop.

Linux jamie-laptop 3.1.5-1-ARCH #1 SMP PREEMPT Sat Dec 10 14:43:09 CET
2011 x86_64 Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz GenuineIntel
GNU/Linux

If I boot with AC plugged in the /sys/class/power_supply/BAT0/
directory is populated with charge_*, but if I boot on battery the
directory is populated with energy_*.

Disconnecting/connecting the power after boot does not effect the file names.

Is this a bug or a feature? It makes scripts harder to write than necessary.

Thanks, Jamie

ps, I really think
http://www.lesswatts.org/projects/acpi/mailing-lists.php needs
updating.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: /sys/class/power_supply/BAT0/ charge_ vs energy_
  2012-01-09 12:10           ` Jamie Kitson
@ 2012-01-09 13:37             ` Matthew Garrett
  2012-01-09 21:36               ` Jamie Kitson
  0 siblings, 1 reply; 7+ messages in thread
From: Matthew Garrett @ 2012-01-09 13:37 UTC (permalink / raw)
  To: Jamie Kitson; +Cc: linux-acpi

On Mon, Jan 09, 2012 at 12:10:00PM +0000, Jamie Kitson wrote:

> If I boot with AC plugged in the /sys/class/power_supply/BAT0/
> directory is populated with charge_*, but if I boot on battery the
> directory is populated with energy_*.
> 
> Disconnecting/connecting the power after boot does not effect the file names.
> 
> Is this a bug or a feature? It makes scripts harder to write than necessary.

It's the way Lenovo's firmware works. It's not clear why.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: /sys/class/power_supply/BAT0/ charge_ vs energy_
  2012-01-09 13:37             ` Matthew Garrett
@ 2012-01-09 21:36               ` Jamie Kitson
  2012-01-09 21:39                 ` Matthew Garrett
  0 siblings, 1 reply; 7+ messages in thread
From: Jamie Kitson @ 2012-01-09 21:36 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: linux-acpi

Thanks for your reply. Is this something that is likely to be fixed?

On 9 January 2012 13:37, Matthew Garrett <mjg59@srcf.ucam.org> wrote:
> On Mon, Jan 09, 2012 at 12:10:00PM +0000, Jamie Kitson wrote:
>
>> If I boot with AC plugged in the /sys/class/power_supply/BAT0/
>> directory is populated with charge_*, but if I boot on battery the
>> directory is populated with energy_*.
>>
>> Disconnecting/connecting the power after boot does not effect the file names.
>>
>> Is this a bug or a feature? It makes scripts harder to write than necessary.
>
> It's the way Lenovo's firmware works. It's not clear why.
>
> --
> Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: /sys/class/power_supply/BAT0/ charge_ vs energy_
  2012-01-09 21:36               ` Jamie Kitson
@ 2012-01-09 21:39                 ` Matthew Garrett
  2012-01-10 14:30                   ` Jamie Kitson
  0 siblings, 1 reply; 7+ messages in thread
From: Matthew Garrett @ 2012-01-09 21:39 UTC (permalink / raw)
  To: Jamie Kitson; +Cc: linux-acpi

On Mon, Jan 09, 2012 at 09:36:34PM +0000, Jamie Kitson wrote:
> Thanks for your reply. Is this something that is likely to be fixed?

You'd have to ask Lenovo. We report the statistics that the firmware 
gives us.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: /sys/class/power_supply/BAT0/ charge_ vs energy_
  2012-01-09 21:39                 ` Matthew Garrett
@ 2012-01-10 14:30                   ` Jamie Kitson
  2012-04-18 11:44                     ` /sys/class/power_supply/BAT0/charge_ " Yoshi Rokuko
  0 siblings, 1 reply; 7+ messages in thread
From: Jamie Kitson @ 2012-01-10 14:30 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: linux-acpi

Could we not have a new generic file (or two) in the directory to
state battery level as a percentage, and perhaps another for warning
level as a percentage?

On 9 January 2012 21:39, Matthew Garrett <mjg59@srcf.ucam.org> wrote:
> On Mon, Jan 09, 2012 at 09:36:34PM +0000, Jamie Kitson wrote:
>> Thanks for your reply. Is this something that is likely to be fixed?
>
> You'd have to ask Lenovo. We report the statistics that the firmware
> gives us.
>
> --
> Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: /sys/class/power_supply/BAT0/charge_ vs energy_
  2012-01-10 14:30                   ` Jamie Kitson
@ 2012-04-18 11:44                     ` Yoshi Rokuko
  0 siblings, 0 replies; 7+ messages in thread
From: Yoshi Rokuko @ 2012-04-18 11:44 UTC (permalink / raw)
  To: linux-acpi

Jamie Kitson <jamie <at> kitten-x.com> writes:

> 
> Could we not have a new generic file (or two) in the directory to
> state battery level as a percentage, and perhaps another for warning
> level as a percentage?

that would be great indead! actually the first would suffice I think.
but this change of charge to energy and back is really a pain ...


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-04-18 11:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CA+z-pWGrhtT3m=tOXcCDph3TC6AcbTVQJTF35V-o5MHeAB=HCg@mail.gmail.com>
     [not found] ` <CA+z-pWHyhVO16AGz-fxmDhTyO0xXGfOB-_pPQZjMqf4vBUZw_g@mail.gmail.com>
     [not found]   ` <CA+z-pWHPj-_ZA0v+siLaVtwFtyd-tDFM5+71s3j6ng3=pWGu0Q@mail.gmail.com>
     [not found]     ` <CA+z-pWGJ_sFh138kgZh-oX=rwv3t_LRDvgCvdGxuxnMDegxgaA@mail.gmail.com>
     [not found]       ` <CA+z-pWEtiW9Rc9yjXNZSc7daFRwDieYb3Bnxt6=m+G+k_ELL8g@mail.gmail.com>
2012-01-09 11:31         ` /sys/class/power_supply/BAT0/ charge_ vs energy_ Jamie Kitson
2012-01-09 12:10           ` Jamie Kitson
2012-01-09 13:37             ` Matthew Garrett
2012-01-09 21:36               ` Jamie Kitson
2012-01-09 21:39                 ` Matthew Garrett
2012-01-10 14:30                   ` Jamie Kitson
2012-04-18 11:44                     ` /sys/class/power_supply/BAT0/charge_ " Yoshi Rokuko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox