Bug 811949
Summary: | On AC powertop shows charging rate as power usage | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Need Real Name <lsof> | ||||
Component: | powertop | Assignee: | Jaroslav Škarvada <jskarvad> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 16 | CC: | jskarvad, lsof, metherid | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | powertop-1.98-9.fc16 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2012-04-26 20:06:39 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Need Real Name
2012-04-12 11:32:35 UTC
Do you mean ACPI power rate (in top of screen) or per process estimate (in the first column)? If the former is you case please provide output (when running on battery) of: # for d in /sys/class/power_supply/*; do echo $d; cat $d/uevent; done And: # ls /proc/acpi/battery (In reply to comment #1) > Do you mean ACPI power rate (in top of screen) or per process estimate (in the > first column)? I don't know where it is in this version, but I see no signs of it anywhere. I have PowerTOP 1.98 Overview then Summary: 50.8 wakeups/second, 0.0 GPU ops/second and 0.0 VFS ops/sec > If the former is you case please provide output (when running on battery) of: > # for d in /sys/class/power_supply/*; do echo $d; cat $d/uevent; done MACHINE 1: # for d in /sys/class/power_supply/*; do echo $d; cat $d/uevent; done /sys/class/power_supply/* cat: /sys/class/power_supply/*/uevent: No such file or directory > And: > # ls /proc/acpi/battery MACHINE 1: # ls /proc/acpi/battery ls: cannot access /proc/acpi/battery: No such file or directory Machine 2 tomorrow. Same for machine 2. I have one last machine to try. Thanks for info. This seems that the power consumption information is not exported by your kernel. We cannot fix this in powertop. Please provide your kernel version by: # uname -r I tested on 3.3.1-3.fc16.x86_64 and it worked OK on all my machines. If it worked for you with previous kernel(s) it is regression and the bug needs to be reassigned to kernel component. MACHINE 3 on power: # for d in /sys/class/power_supply/*; do echo $d; cat $d/uevent; done /sys/class/power_supply/AC POWER_SUPPLY_NAME=AC POWER_SUPPLY_ONLINE=1 /sys/class/power_supply/BAT0 POWER_SUPPLY_NAME=BAT0 POWER_SUPPLY_STATUS=Full POWER_SUPPLY_PRESENT=1 POWER_SUPPLY_TECHNOLOGY=Li-ion POWER_SUPPLY_CYCLE_COUNT=0 POWER_SUPPLY_VOLTAGE_MIN_DESIGN=14800000 POWER_SUPPLY_VOLTAGE_NOW=16663000 POWER_SUPPLY_CURRENT_NOW=0 POWER_SUPPLY_CHARGE_FULL_DESIGN=2800000 POWER_SUPPLY_CHARGE_FULL=683000 POWER_SUPPLY_CHARGE_NOW=683000 POWER_SUPPLY_MODEL_NAME=Primary POWER_SUPPLY_MANUFACTURER=Hewlett-Packard POWER_SUPPLY_SERIAL_NUMBER=xxx # ls /proc/acpi/battery ls: cannot access /proc/acpi/battery: No such file or directory On battery: # for d in /sys/class/power_supply/*; do echo $d; cat $d/uevent; done /sys/class/power_supply/AC POWER_SUPPLY_NAME=AC POWER_SUPPLY_ONLINE=0 /sys/class/power_supply/BAT0 POWER_SUPPLY_NAME=BAT0 POWER_SUPPLY_STATUS=Discharging POWER_SUPPLY_PRESENT=1 POWER_SUPPLY_TECHNOLOGY=Li-ion POWER_SUPPLY_CYCLE_COUNT=0 POWER_SUPPLY_VOLTAGE_MIN_DESIGN=14800000 POWER_SUPPLY_VOLTAGE_NOW=16366000 POWER_SUPPLY_CURRENT_NOW=824000 POWER_SUPPLY_CHARGE_FULL_DESIGN=2800000 POWER_SUPPLY_CHARGE_FULL=683000 POWER_SUPPLY_CHARGE_NOW=732000 POWER_SUPPLY_MODEL_NAME=Primary POWER_SUPPLY_MANUFACTURER=Hewlett-Packard POWER_SUPPLY_SERIAL_NUMBER=xxx # ls /proc/acpi/battery ls: cannot access /proc/acpi/battery: No such file or directory Just saw your comment. Using 3.3.1-3.fc16.x86_64 on machine 3 (and probably the others too). From the log, machine 3 should work in powertop, could you confirm? Not that I can see - maybe I'm looking in the wrong place. Starting from the console, I start powertop. Where should I look to see the power usage? (In reply to comment #8) > Not that I can see - maybe I'm looking in the wrong place. > > Starting from the console, I start powertop. Where should I look to see the > power usage? I injected your data (provided in comment 5) into my sysfs and it worked for me as expected (powertop-1.98-5.fc16). I got: > The battery reports a discharge rate of 13.5 W near the top of screen. Automatic reproducer: # powertop --html && grep discharge powertop.html Loaded 331 prior measurements Measuring for 20 seconds Writing PowerTOP output to file powertop.html <p>The battery reports a discharge rate of 13.5 W</p> You have to run on battery (without AC) to see the power consumption. Also for machines 1 and 2: If it worked there with older kernels, i.e. you are able to get there output similar to comment 5 (or ls /proc/acpi/battery doesn't return 'No such file or directory') this would signal regression in kernel. I can see the information on my laptop when the power is not connected. Can you tell me if I am remembering wrong? I seem to remember that it was possible to view power usage in watts even for machines which don't run on battery. It should show the current power consumption only when discharging, otherwise the data means something different (in this case battery charging rate, i.e. the power that goes only to battery, not the overall power consumption). So there is a bug - if you discharge your battery a bit and then connect to the AC, the charging rate is not zero and it is shown in powertop as discharging rate, which is not correct. Thanks for spotting, I will fix it. Created attachment 578041 [details]
Proposed fix
Show power consumption only if discharging.
Changed subj accordingly. It seems there was a typo in original sources that causes this problem. Behaviour introduced by the proposed patch is the same as in older powertop version 1. powertop-1.98-9.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/powertop-1.98-9.fc17 powertop-1.98-9.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/powertop-1.98-9.fc16 Package powertop-1.98-9.fc16: * should fix your issue, * was pushed to the Fedora 16 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-9.fc16' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-6035/powertop-1.98-9.fc16 then log in and leave karma (feedback). powertop-1.98-9.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-9.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report. |