Skip to content

[BUG] Luxafor devices generate too many udev rules #225

@JnyJny

Description

@JnyJny

Software Versions:

  • Operating System: Any
  • Python version: Any
  • BusyLight version: Latest

General Type of Problem

  • Command-line

Describe the Problem
The udev-rulessubcommand generates four different entries for Luxafor products when one would suffice. Luxafor devices share the same vendor and product identifiers and are disambiguated by their USB accessed product_string attribute. The udev subsystem can be configured to perform different actions based on the product_string value, however there isn't any special-case handling required and a single set of rules would cover all four supported Luxafor devices (BT, Flag, Mute, and Orb).

$ busylight udev-rules
...
# Rules for Luxafor Family of Devices: 1
# 1 Luxafor Flag
KERNEL=="hidraw*", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="f372", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="f372", MODE="0666"
# Rules for Luxafor Family of Devices: 1
# 1 Luxafor BT
KERNEL=="hidraw*", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="f372", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="f372", MODE="0666"
# Rules for Luxafor Family of Devices: 1
# 1 Luxafor Mute
KERNEL=="hidraw*", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="f372", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="f372", MODE="0666"
# Rules for Luxafor Family of Devices: 1
# 1 Luxafor Orb
KERNEL=="hidraw*", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="f372", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="f372", MODE="0666"
...

Expected Behavior
Only one udev rule generated for supported Luxafor devices:

$ busylight udev-rules
...
# Rules for Luxafor Family of Devices: 1
# 1 Luxafor BT, Flag, Mute, Orb
KERNEL=="hidraw*", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="f372", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="f372", MODE="0666"
...

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions