Description of problem:
Since one update of system (I think that it was when /proc/acpi/BAT0 moved to /sys/class/power_supply) powertop stopped showing watt power consumption.
Version-Release number of selected component (if applicable):
Powertop 1.98 beta 1
Steps to Reproduce:
1. update system
2. run powertop with root privilegies (and without power adapter plugged in)
Powertop doesn't show watts.
Powertop should show watt consumption.
I cannot reproduce. It doesn't seem to be related to /proc/acpi/battery removal, because powertop uses the /sys interface at first and then fallbacks to the /proc interface.
Please recheck that the stats aren't there (because it could be kernel bug related to firmware/kernel confusion about AC/battery switch) and then provide output of:
# ls -1 /sys/class/power_supply/*
# for d in /sys/class/power_supply/*; do echo $d; cat $d/uevent; done
No, stats aren't there. And output is:
[garret@blanka ~]$ ls -l /sys/class/power_supply/*
lrwxrwxrwx. 1 root root 0 21. bře 2012 /sys/class/power_supply/ADP1 -> ../../devices/LNXSYSTM:00/device:00/ACPI0003:00/power_supply/ADP1
lrwxrwxrwx. 1 root root 0 21. bře 2012 /sys/class/power_supply/BAT0 -> ../../devices/LNXSYSTM:00/device:00/PNP0A08:00/device:02/PNP0C09:00/PNP0C0A:00/power_supply/BAT0
[garret@blanka ~]$ for d in /sys/class/power_supply/*; do echo $d; cat $d/uevent; done
[garret@blanka acpi]$ ls /proc/acpi/
button ibm wakeup
My laptop is Lenovo Edge E520 (Sandy Bridge architecture), I'm using up to date kernel 3.2.5-3.
Output of powertop is here http://www.stud.fit.vutbr.cz/~xsedla85/powertop.png
Thanks for the report & additional info, I probably got it. I will prepare the test build tmrw.
Created attachment 565604 [details]
Proposed fix sent upstream.
powertop-1.98-4.fc17 has been submitted as an update for Fedora 17.
powertop-1.98-4.fc16 has been submitted as an update for Fedora 16.
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing powertop-1.98-4.fc17'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
I'm trying to install powertop from testing as shown before, but yum says that "No package powertop-1.98-4.fc17 available.".I've had some problems with yum before (outdated cache) but I thought I have solved it. Is it problem on my side or aren't repositories actual yet?
I have installed powertop from fedora 16 testing repository and it works now, I left feedback. I don't have F17, but I think that you can close the bug.
(In reply to comment #8)
> I'm trying to install powertop from testing as shown before, but yum says that
> "No package powertop-1.98-4.fc17 available.".I've had some problems with yum
> before (outdated cache) but I thought I have solved it. Is it problem on my
> side or aren't repositories actual yet?
Mirrors sync takes a while (typically a day), but it is possible to get the package by the hand from Koji build system.
(In reply to comment #9)
> I have installed powertop from fedora 16 testing repository and it works now, I
> left feedback. I don't have F17, but I think that you can close the bug.
Thanks for info, please give it karma in Bodhi (the link in comment 7). This bug will be autoclosed by Bodhi once the package gets into stable.
powertop-1.98-4.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.
powertop-1.98-4.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.
seems the same problem persists on my laptop.. for me its not "rate" or "power_now" but "charge_now".
$ ls -l /sys/class/power_supply/*
lrwxrwxrwx 1 root root 0 Mai 8 10:40 /sys/class/power_supply/AC -> ../../devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0003:00/power_supply/AC
lrwxrwxrwx 1 root root 0 Mai 8 10:40 /sys/class/power_supply/BAT -> ../../devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT
$ for d in /sys/class/power_supply/*; do echo $d; cat $d/uevent; done
Using "PowerTOP versionv2.1, compiled on Aug 23 2012" (from the ububtu-repo.. thought it might not harm to post it here as well)
(In reply to comment #14)
The charge_now is present charge of your battery - a different thing than rate or power_now. Maybe the current (mA) measurement is a) not supported by your battery / laptop / firmware or b) kernel doesn't read it right on your machine. You can try updating your BIOS. Or you can forward the issue to kernel (it may help in b) case).
We could workaround this in PowerTOP by calculating the rate from the delta of charge_now taken in several time frames. But this doesn't seem to be trivial RFE as the data are updated asynchronously and synchronization is critical for such indirect method to work correctly (to give usable results). As this seem to be very rare / uncommon HW / firmware implementation I think it is not worth to workaround it. But anyway you could try to forward it to the PowerTOP upstream.