Udev assign final := isn't final?

Following the wiki here

I wrote the file /etc/udev/rules.d/pci_pm.rules:

SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{device}=="0x1be1", ATTR{power/control}:="on"
SUBSYSTEM=="pci", ATTR{power/control}="auto" 

To enable pci power management on everything except the dGPU. However this enabled pm for everything including the dGPU.

Writing this on the other hand worked:

SUBSYSTEM=="pci", ATTR{power/control}="auto" 
SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{device}=="0x1be1", ATTR{power/control}:="on"

My question is why?

With what I know of udev both should work since ":=" supposedly means:

"Assign the final value to the key. Disallow any later changes by any later rules."

​

Posted Feb 8, 2019, 12:04 PM UTC

163
Loading comments…