The udev rule seems to work correctly when I use udevadm trigger or soft-remove the network card and then trigger a rescan on the PCI bus. However, on boot, the rule is not applied (causing the system to suck about 1W of useless electricity).
Is there any reason why custom udev rules are not applied at boot? Did I do anything wrong, and how can I fix it?
I have used SUBSYSTEM=="net|pci" since the udev rule seems to be applied by the PCI subsystem when it works. Approximately at 18:09, I ran udevadm trigger.
Try to play with the priority of that rule.
If that doesn’t help, then it might be a timing issue.
You can add some delay before applying the parameters: https://bbs.archlinux.org/viewtopic.php?pid=1207708
Thank you, it was a timing issue indeed. The driver would not be loaded yet by the time udev considered the rule, and loading the driver resets the attribute to 0. I solved the issue by changing the rule as follows: