Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 808675 - sys-power/nut: /lib/udev/rules.d/62-nut-usbups.rules overridden by /lib/udev/rules.d/40-gentoo.rules
Summary: sys-power/nut: /lib/udev/rules.d/62-nut-usbups.rules overridden by /lib/udev/...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Robin Johnson
Depends on:
Reported: 2021-08-17 03:22 UTC by Daniel Pouzzner
Modified: 2021-09-20 17:30 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Pouzzner 2021-08-17 03:22:38 UTC
This line in 40-gentoo.rules:

  SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb"

is overriding this line in 62-nut-usbups.rules:

  ATTR{idVendor}=="09ae", ATTR{idProduct}=="0001", MODE="664", GROUP="nut"

There's nothing special about that line, so any USB UPS should demonstrate the problem.

Reproducible: Always

Steps to Reproduce:
1. hotplug a USB UPS (mine are Tripplite 1200XLHG's)
2. use lsusb to find the UPS's device
3. ls -l /dev/bus/usb/003/109 (replacing 003/119 with the bus/node numbers)

Actual Results:  
crw-rw---- 1 root usb 189, 364 Aug 16 21:29 /dev/bus/usb/003/109

Expected Results:  
crw-rw-r-- 1 root nut 189, 364 Aug 16 21:29 /dev/bus/usb/003/109

[IP-] [  ] sys-fs/eudev-3.2.10-r1:0
[IP-] [  ] sys-power/nut-2.7.4-r7:0

Interesting additional tidbits:

After hotplugging, which sets the wrong group and mode, a manual udevadm trigger on the device or the subsystem sets the correct group and mode.

I've fixed the problem locally by commenting out the problematic line in 40-gentoo.rules, though I expect that will have undesirable knock-on effects.