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: 2023-06-17 03:17 UTC (History)
5 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.
Comment 1 Larry the Git Cow gentoo-dev 2023-06-17 03:15:30 UTC
The bug has been closed via the following commit(s):

commit aea0f99f970c391e3daf4f98d0b6a2dc58fc039b
Author:     Francisco Javier Félix <>
AuthorDate: 2023-06-16 16:14:55 +0000
Commit:     Sam James <>
CommitDate: 2023-06-17 03:13:49 +0000

    sys-power/nut: add 2.8.0, various enhancements
    I've recently made a comprehensive update to the ebuild of sys-power/nut:
    The way drivers are activated has been altered - instead of using a driver list, which
    can be hard to maintain when new ones are added, we now activate them based on the
    connection type (serial, USB, XML, IPMI, Modbus, etc).
    This simplification not only streamlines the installation process but also resolves
    dependency issues associated with activating a driver and its corresponding unactivated connection.
    The updates align with the latest Gentoo specifications and are summarized below:
    *    Removed unused libnsl
    *    Removed outdated hotplug
    *    Utilized EAPI=8
    *    Default use of libusb-1
    *    Added connections for GPIO, i2c, and Modbus
    *    Configuration parameters required per connection type
    *    Fixed the creation of PID in /run/nut
    *    Removed configurations no longer necessary for nut-2.8.0 or newer
    *    Creation of man pages
    *    Added a flag for documentation
    *    Utilized tmpfile for creating temporary directories
    *    Added Q5t5 monitor (nut-9999)
    *    Disabled Python2
    *    Added Python3 library
    *    Message for the optional function of sys-apps/util-linux[logger, tty-helpers]
    *    Added configuration for Avahi
    *    Added a flag for systemd (nut-9999)
    TODO: (in next version)
    *    nut-scanner is not working
    *    /etc/init.d/upslog requires parameters of SAI and log file
    Please note that I have tested different SAI drivers, but only with USB and SNMP connections.
    Any feedback or further testing on these updates would be highly appreciated.
    Package-Manager: Portage-, pkgcheck-0.10.24
    Signed-off-by: Fco Javier Felix <>
    Signed-off-by: Sam James <>

 sys-power/nut/Manifest                             |   1 +
 sys-power/nut/files/nut-2.6.5-init.d-upsmon        |   2 +-
 .../files/nut-2.8.0-fix-man-page-generation.patch  |  64 +++++
 sys-power/nut/files/nut-2.8.0-init.d-upsd          |  37 +++
 sys-power/nut/files/nut.powerfail.initd            |   1 -
 sys-power/nut/files/systemd_notify.path            |  50 ++++
 sys-power/nut/metadata.xml                         |  14 +-
 sys-power/nut/nut-2.8.0.ebuild                     | 222 +++++++++++++++++
 sys-power/nut/nut-9999.ebuild                      | 266 +++++++++++++++++++++
 9 files changed, 654 insertions(+), 3 deletions(-)