USB device, udev-rule is not triggered

Hello,

for accessing an USB-HID device, I have to change permissions for unprivileged users.

I created a udev rule “70-ceta-hid.rules” and put it under /etc/udev/rules.d :
SUBSYSTEMS==“usb”, ATTRS{idVendor}==“2934”, ATTRS{idProduct}==“4142”, TAG+=“uaccess”

From documention:
NOTE: these rules must have priority before 73-seat-late.rules.

Debugging udev shows me, that the rule is not triggered. What I am doing wrong?

debug.txt (30.5 KB)

Hi, I’m the Toradex AI Assistant.

I might make mistakes or occasionally get you wrong. Our support team will step in if needed.


I’d be glad to help you troubleshoot your udev rule! To provide the most accurate guidance, could you let me know which OS and version you are using? You can use the tdx-info command to get this information - more details are available at https://developer.toradex.com/software/development-resources/tdx-info/.

Common Troubleshooting Steps

While waiting for your platform details, here are some general troubleshooting approaches based on the available documentation:

1. Verify Device Detection

First, confirm your USB HID device is being detected. Use these commands to check:

udevadm info -a -p $(udevadm info -q path -n /dev/input/eventX)

(1)

Replace eventX with your actual device node.

2. Test Rule Syntax

Your current rule looks correct for basic USB device matching. However, you might want to try different matching approaches:

KERNEL=="event*", SUBSYSTEM=="input", ATTRS{name}=="Your_Device_Name", ATTRS{idVendor}=="2934", ATTRS{idProduct}=="4142", TAG+="uaccess"

(1)

3. Reload and Test Rules

After creating or modifying your rule, reload the udev rules:

udevadm control --reload-rules
udevadm trigger

(2)

4. Check Rule Priority

Since you mentioned the rule must have priority before 73-seat-late.rules, ensure your filename 70-ceta-hid.rules has the correct numeric prefix. Rules are processed in alphanumeric order, so 70 should indeed run before 73.

5. Alternative Approaches

If the TAG+=“uaccess” approach isn’t working, you could try setting specific permissions:

SUBSYSTEMS=="usb", ATTRS{idVendor}=="2934", ATTRS{idProduct}=="4142", MODE="0666"

Once you provide your OS and version information, I can give you more specific guidance tailored to your platform.

Best regards, Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

Software summary

Bootloader: U-Boot

Kernel version: 6.6.119-7.5.0-ge5c5595adb06 #1-Torizon SMP PREEMPT Mon Jan 5 09:23:13 UTC 2026
Kernel command line: root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3 ostree=/ostree/boot.1/torizon/1ec763ba906edcd9b26ddd55dda6a5efbd73bb6ee9aa548aeae02eae98ae457c/0 clk-imx8mp.mcore_booted=1 cpuidle.off=1
Distro name: NAME=“Torizon OS”
Distro version: VERSION_ID=7.5.0-build.30
Distro variant: VARIANT=“Docker”
Hostname: 820-26-0000

Hardware info

HW model: Toradex Verdin iMX8M Plus on Verdin Development Board

Toradex version: 0063 V1.1B
Serial number: 08652464
Processor arch: aarch64

Thank you for providing your system information! You’re running Torizon OS 7.5.0 on a Verdin iMX8M Plus. Let me help you troubleshoot your udev rule for USB HID device permissions.

Troubleshooting Your udev Rule

Based on your setup and the available documentation, here are specific steps to resolve the issue:

1. Verify Rule Syntax and Placement

Your rule syntax looks correct, but let’s ensure proper formatting (1):

SUBSYSTEMS=="usb", ATTRS{idVendor}=="2934", ATTRS{idProduct}=="4142", TAG+="uaccess"

(1)

The file placement at /etc/udev/rules.d/70-ceta-hid.rules is correct for priority before 73-seat-late.rules (1).

2. Reload udev Rules

After creating or modifying your rule, reload the udev rules (1):

sudo udevadm control --reload-rules
sudo udevadm trigger

(1)

3. Debug Device Detection

Use these commands to verify your USB HID device attributes:

# List USB devices to confirm vendor/product IDs
lsusb

# Monitor udev events when plugging/unplugging the device
udevadm monitor

# Get detailed device information
udevadm info -a -p $(udevadm info -q path -n /dev/hidraw0)

4. Alternative Rule Approaches

If the TAG+=“uaccess” approach isn’t working, try these alternatives (1):

Option 1: Direct permissions

SUBSYSTEMS=="usb", ATTRS{idVendor}=="2934", ATTRS{idProduct}=="4142", MODE="0666"

(1)

Option 2: More specific matching

KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="2934", ATTRS{idProduct}=="4142", TAG+="uaccess"

5. Create a Script-Based Solution

If the simple rule doesn’t work, you can create a script that handles the permission change (1). Create a script and reference it in your udev rule using the RUN parameter (1).

6. Verify Rule Processing

Check if your rule is being processed by examining the udev database:

udevadm info --query=all --name=/dev/hidraw0 | grep -i uaccess

This will show if the uaccess tag is being applied to your device.

7. Check systemd-logind Integration

Since you’re using TAG+=“uaccess”, ensure that systemd-logind is running and properly configured:

systemctl status systemd-logind

The uaccess tag works in conjunction with systemd-logind to grant access to logged-in users.

Try these steps in order, and let me know if you continue to experience issues. The debug output you mentioned would be helpful to review if the problem persists.

Best regards, Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

Note: Changing from uaccess to Mode= did help