Sysfs, PCI-devices and power management

From: WareKala
Date: Sat Feb 19 2005 - 08:33:48 EST


Hi,

I don't know if this is the "right place(TM)" to ask about this, and if
it isn't, I apologize. But the fact is that I haven't found any help
from anywhere else and I can't learn enough without asking. So, the
situation is like this: I am using a laptop and want to minimize the
power consumption by shutting down unneeded components. Under windozer a
program called Battery Doubler does the same by for example shutting
down not-needed PCI devices. I too, tried to shut down certain devices
by doing "echo 3 > /sys/devices/pci*/*0a*/power/state", but that didn't
work. state was still a zero. So, I then echoed a "3" to detach_state
and removed the module, after which */power/state was 3. Now, I then
tried again changing it with no luck. Echoing a 1 to detach_state,
modprobing and rmmoding the module did the trick, but I still can't get
it back to state 0. Also, I read from the kernel documentations that
echoing something to power/state should work, without toying around with
the modules, but apparently that is b0rked.

So, is there any way to fix this? Or, could someone do a simple
C-program for changing the state of the devices? I don't know enough
about PCI or programming under Linux, so my experiments with
pci_set_power_state didn't work out quite the way they were supposed to
=/

Also, the kernel in question is 2.6.10, though this hasn't worked with
any other version either.

I am not a regular reader in here, so please be kind and answer directly
to me.
-WareKala
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/