You are not logged in.

#1 2019-09-11 10:40:07

snack
Member
From: Italy
Registered: 2009-01-13
Posts: 861

Hardware ID error in udev rules by systemd 243?

Since the upgrade to systemd 243 some of the udev rules based on hardware ID of the different devices in my system stopped working. For example, I have this rule:

SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:e0:4c:a2:02:4e", NAME="eth0"

to set the interface name of the ethernet adapter, and this one:

ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="046a", ATTR{idProduct}=="b090", GOTO="power_usb_rules_end"
ACTION=="add", SUBSYSTEM=="usb", TEST=="power/control", ATTR{power/control}="auto"
LABEL="power_usb_rules_end"

to enable the USB powersave feature on all the devices but my external keyboard. With systemd 243 after boot the ethernet interface name is not set and all the USB devices have the powersave enabled (the latter is what makes me think that the rule file is actually parsed and that the line with the special behavior for the keyboard is not executed correctly, probably because the keyboard ID is not matched even if it is correct). With systemd 242.84 everything works as expected. I tested this behavior with the official LTS kernel and the unofficial CK kernel.
Does anybody else experience the same behavior?

Offline

#2 2019-09-11 10:57:26

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,422

Re: Hardware ID error in udev rules by systemd 243?

Online

#3 2019-09-11 12:11:13

snack
Member
From: Italy
Registered: 2009-01-13
Posts: 861

Re: Hardware ID error in udev rules by systemd 243?

@V1del thanks for the link, I'll stick with 242.84 until a fixed version lands in the repos.

Offline

#4 2019-12-20 16:40:44

snack
Member
From: Italy
Registered: 2009-01-13
Posts: 861

Re: Hardware ID error in udev rules by systemd 243?

I updated to systemd 244.1-1 after skipping the whole 243 series, and I still experience the same problem. The issue linked by @V1del seems to have been closed and merged in September so I guess it's present in version 244, and if I'm correct this means that my problems arise because of a different reason. Any ideas? Thanks.

Offline

#5 2020-03-14 19:02:15

snack
Member
From: Italy
Registered: 2009-01-13
Posts: 861

Re: Hardware ID error in udev rules by systemd 243?

After upgrading to systemd 245 I still got problems, so I investigated the issue seriously. It turned out that the problem was due to comments in custom rule files I wrote, and which I didn't report in my original post because I didn't think it was meaningful; up to systemd 242 this:

SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:e0:4c:a2:02:4e", NAME="eth0"  #Startech adapter

used to work. With systemd 245 (and I suppose also with 244 and 243) I got this error when executing "udevadm test /sys/bus/pci/devices/0000\:3b\:00.0" :

Reading rules file: /etc/udev/rules.d/10-network.rules
/etc/udev/rules.d/10-network.rules:5 Invalid key/value pair, ignoring.

Searching on the web I then found a post about a missing newline trmination character at the end of a rule, so I modified my file as:

#Startech adapter
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:e0:4c:a2:02:4e", NAME="eth0"

and all my other custom rules similarly, and the problem disappeared.

So I guess the syntax for comments changed in systemd 243. I hope this post might be useful to other facing the same issue.

Offline

Board footer

Powered by FluxBB