Bug 3730 - Update request: powertop cannot report power
Summary: Update request: powertop cannot report power
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 1
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA1-64-OK MGA1-32-OK
Keywords: Junior_job, validated_update
Depends on:
Blocks:
 
Reported: 2011-12-13 21:04 CET by Martin Whitaker
Modified: 2012-07-10 15:52 CEST (History)
5 users (show)

See Also:
Source RPM: powertop-2.0-1.mga1.src.rpm
CVE:
Status comment:


Attachments

Description Martin Whitaker 2011-12-13 21:04:44 CET
Not exactly a bug, but a system integration issue.

The 'powertop' utility (which is one of the core packages) has the ability to report the current power usage when a laptop is running on its battery. However, to do this it uses the /proc/acpi/battery interface. Unfortunately this interface is disabled in the standard kernel configuration:

# CONFIG_ACPI_PROCFS_POWER is not set

(for reference, I'm running 2.6.38.8-desktop-6.mga x86_64)

It would be useful if this option was enabled by default.

(of course the proper solution is to update powertop to use the sysfs interface - but that would be a lot more work!)
Comment 1 Manuel Hiebel 2011-12-13 21:25:22 CET
Hi, thanks for reporting this bug.

Added the maintainer of the kernels and of powertop.

(Please set the status to 'assigned' if you are working on it)

CC: (none) => tmb
Assignee: bugsquad => mageia
Source RPM: (none) => powertop

Comment 2 Thomas Backlund 2011-12-23 21:51:09 CET
Unfortunately it's not a simple config option change as it is depreceated and can confuse other tools...

I have to see if I'll fix powertop instead...

Status: NEW => ASSIGNED

Comment 3 Anssi Hannula 2012-04-05 01:15:15 CEST
I already fixed it back in November (for a school project), forgot to apply them to Mageia.

I also made some other fixes (make i915 usage reporting work again, fix X server detection in mga, show all frequency states on some cpus) which would probably be beneficial as well.

See upstream repo:
https://github.com/fenrus75/powertop/commits/master

For these commits:

https://github.com/fenrus75/powertop/commit/bae15566cb42a5b12ab4b1d0adac5ffa176eec85.patch
https://github.com/fenrus75/powertop/commit/846b7e0a65a6958af44cb64c13de3c09cb4cd3f9.patch
https://github.com/fenrus75/powertop/commit/5c11e7c5148908befe57ab0c879240b9dad8b792.patch
https://github.com/fenrus75/powertop/commit/cd5a1c6fdaeace75f640c4eb089d27af941da778.patch
https://github.com/fenrus75/powertop/commit/7c107301117f7ddaa38e41fe8350f9eeb902308f.patch

CC: (none) => anssi.hannula

Comment 4 Anssi Hannula 2012-04-05 03:34:12 CEST
Actually, the above commits are not enough, some hunks were missing from the git commits and only fixed later...

Here's a working patchset:
http://stuff.onse.fi/powertop-patches/
Comment 5 Damien Lallement 2012-05-14 17:49:26 CEST
Please test if powertop-2.0-1.mga1 from core/updates_testing solve your problem.
Thanks. If so, I will ask QA for an update request.
Comment 6 Martin Whitaker 2012-05-14 21:42:56 CEST
I'm afraid I've no longer got a working installation of Mageia 1 (I've updated all my machines to Mageia 2 RC). But I can say that powertop-2.0-1.mga2 works fine, so I'm happy!
Comment 7 Damien Lallement 2012-06-18 17:39:35 CEST
Advisory:
-------------------
powertop was not working in Mageia 1. This update fix this issue by updating powertop to final release 2.0.

Packages:
-------------------
powertop-2.0-1.mga1.src.rpm

How to test:
-------------------
Install powertop on Mageia 1.
Launch the it and see that it's not working.
Install powertop-2.0 from updates_testing.
Launch the tool and check it's working!

Keywords: (none) => Junior_job
Hardware: x86_64 => All
Assignee: mageia => qa-bugs
Source RPM: powertop => powertop-2.0-1.mga1.src.rpm

Damien Lallement 2012-06-18 17:39:53 CEST

CC: (none) => mageia
Summary: powertop cannot report power => Update request: powertop cannot report power

Comment 8 Samuel Verschelde 2012-06-22 16:17:16 CEST
I installed both versions and didn't see a difference. Better testing procedure would be appreciated :)

Also, I don't have a battery (I removed it from the laptop long time ago because it was out of order), can I still test?

CC: (none) => stormi

Comment 9 Anssi Hannula 2012-06-22 22:02:51 CEST
No, powertop can show power usage only when running on battery.
Comment 10 Samuel Verschelde 2012-07-08 15:21:34 CEST
Testing without a battery. powertop seems to work nicely, so at least there's probably no regression. Mageia 1 64 bits. I used it to tweak some power settings and it actually seems to have made my USB mouse less responsive if I don't touch it for a while (looks like it's going out from sleep mode or something like that), so looks like it works :)

Whiteboard: (none) => MGA1-64-OK

Comment 11 Samuel Verschelde 2012-07-08 17:08:52 CEST
Powertop seems to work well on MGA1 32 too, but I still can't test battery-related stuff.
Samuel Verschelde 2012-07-08 20:57:00 CEST

Whiteboard: MGA1-64-OK => MGA1-64-OK? MGA1-32-OK?

Comment 12 claire robinson 2012-07-09 17:47:30 CEST
My mga1's are in virtualbox now on a desktop so no good to test batteries with.

Should this be validated?
Comment 13 Samuel Verschelde 2012-07-09 20:16:10 CEST
leuhmanu reported it works when on battery.

Update validated.

No package require linking.

Advisory:
-------------------
powertop in Mageia 1 couldn't report power usage when on battery. This update fixes this issue by updating powertop to its final release 2.0.

Packages:
-------------------
powertop-2.0-1.mga1.src.rpm

Keywords: (none) => validated_update
CC: (none) => sysadmin-bugs
Whiteboard: MGA1-64-OK? MGA1-32-OK? => MGA1-64-OK MGA1-32-OK

Comment 14 Thomas Backlund 2012-07-10 15:52:03 CEST
Update pushed:
https://wiki.mageia.org/en/Support/Advisories/MGAA-2012-0100

Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.