Discussion:
Why is »Runtime PM for PCI Device« not enabled by default?
Paul Menzel
2012-02-10 21:19:49 UTC
Permalink
Dear PowerTOP folks,


looking at the output of PowerTOP (version 1.97) on every system I
looked at »Runtime PM for PCI Device  « is marked as bad.

I know that I can enable it by hitting return in PowerTOP or by
executing the following command [1].

echo auto > /sys/bus/pci/devices/*/power/control

But I wonder why this is not enabled by default? What userspace program
would be responsible to enable this? I cannot imagine that users should
write scripts or edit start up files to enable this. A Linux kernel
option to turn this on globally would be nice to have. Does that exist?



Thanks,

Paul


[1] http://serverfault.com/questions/279527/powertop-reports-bad-runtime-pm-for-pci-device
Arjan van de Ven
2012-02-10 21:39:05 UTC
Permalink
Post by Paul Menzel
Dear PowerTOP folks,
looking at the output of PowerTOP (version 1.97) on every system I
looked at »Runtime PM for PCI Device …« is marked as bad.
I know that I can enable it by hitting return in PowerTOP or by
executing the following command [1].
echo auto > /sys/bus/pci/devices/*/power/control
But I wonder why this is not enabled by default? What userspace program
would be responsible to enable this? I cannot imagine that users should
write scripts or edit start up files to enable this. A Linux kernel
option to turn this on globally would be nice to have. Does that exist?
I suspect the answer will end up being that UDEV will be the one that
needs to do this....
Paul Menzel
2012-02-10 22:18:18 UTC
Permalink
Dear Arjan,


thank you again for your quick response.
Post by Arjan van de Ven
Post by Paul Menzel
looking at the output of PowerTOP (version 1.97) on every system I
looked at »Runtime PM for PCI Device  « is marked as bad.
I know that I can enable it by hitting return in PowerTOP or by
executing the following command [1].
echo auto > /sys/bus/pci/devices/*/power/control
But I wonder why this is not enabled by default? What userspace program
would be responsible to enable this? I cannot imagine that users should
write scripts or edit start up files to enable this. A Linux kernel
option to turn this on globally would be nice to have. Does that exist?
I suspect the answer will end up being that UDEV will be the one that
needs to do this....
thank you for the pointer. As a side note though, the sound subsystem
ALSA provides such a (module(?)) parameter.

Searching for »udev enable runtime power management« I found several
pointers. First the documentation for USB power management [2] suggests
the abandoned project HAl to do this job or otherwise like you did
writing UDEV rules. I hope some of the successors of HAL will be able to
do that.

There is an example UDEV rules file in the Gentoo Wiki [1].

SUBSYSTEM!="pci", GOTO="power_runtime_rules_end"
ACTION!="add", GOTO="power_runtime_rules_end"

KERNEL=="????:??:??.?" #, WAIT_FOR_SYSFS="bInterfaceProtocol"
PROGRAM="/bin/sleep 0.1"

ATTR{power/control}=="*", ATTR{power/control}="auto"

LABEL="power_runtime_rules_end"

I also found a commit to MeeGo [3] adding such a rule to a certain EHCI
device.

ACTION=="add|change", SUBSYSTEM=="pci", ATTRS{vendor}=="0x8086", ATTRS{device}=="0x0806", ATTR{power/control}="auto"

Basically they are doing the same – of course the second only for one
device – and I should dive into UDEV if the `sleep` in the Gentoo file
is needed or not. It also needs to be considered if it has any impact on
the start up time.


Thanks,

Paul


PS: By the way, does anyone have some statistics if that increased the
“on battery operation time” with certain laptops?


[1] http://wiki.gentoo.org/wiki/Runtime_Powermanagement
[2] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/usb/power-management.txt;h=12511c98cc4faecaf17f31db16f1db347936dad2;hb=HEAD
[3] http://lists.meego.com/pipermail/meego-commits/2011-April/021975.html
Kok, Auke-jan H
2012-02-11 09:23:43 UTC
Permalink
On Fri, Feb 10, 2012 at 2:18 PM, Paul Menzel
Post by Paul Menzel
PS: By the way, does anyone have some statistics if that increased the
“on battery operation time” with certain laptops?
check phoronix, they have used powertop and referenced it in several tests.

Auke

Loading...