eudev-project/eudev

eudev not setting attr under expected circumstances

Opened this issue · 0 comments

haarp commented

Hello,

I am using eudev-3.2.9 on Gentoo. I have custom rules under /etc/udev/rules.d/10-local-powersave-nvidia.rules:
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{power/control}="auto"

I can verify that this rule matches and should be working. I can also verify that /sys/bus/pci/devices/0000:01:00.1/power/control exists, is writable, and that its device matches this rule.

However, oddly enough, eudev will not set control to auto under all circumstances.

It remains on on for this:

  • bootup
  • udevadm trigger -c add
  • udevadm trigger /sys/bus/pci/devices/0000\:01\:00.1

It is only set to the expected auto during this:

  • udevadm test /sys/bus/pci/devices/0000\:01\:00.1/
  • udevadm trigger -c add -s pci

I just can't figure out what's happening here. Especially the fact that trigger with -c add does nothing, but with -c add -s pci works is very confusing. I conclude that it's a bug. I can provider additional logs and testing as requested.

Thanks a lot!