From d00bac851d0c88c80a6fb1dab9edc0244d51e643 Mon Sep 17 00:00:00 2001 From: Ben Blumer Date: Sat, 20 Jan 2024 12:28:09 -0800 Subject: [PATCH] Udev rules cover most (all?) of the mounted devices now and README reflects this. --- README.md | 10 +++++++--- udev/nreal_air.rules | 16 +++++++++++++++- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 09eb5b0..4e329b2 100644 --- a/README.md +++ b/README.md @@ -59,10 +59,14 @@ make ## Run -It's easiest to run the software with root privileges. But theoretically it should be possible to -adjust rules of your device to not need them for read/write access vis USB. It's definitely not -planned to require that in the future (but for now): +It's easiest to run the software with root privileges. ``` sudo nrealAirLinuxDriver ``` + +Alternatively, you can copy the nreal_air.rules to /etc/udev/rules.d: + +``` +sudo cp udev/nreal_air.rules /etc/udev/rules.d/xreal_air.rules +``` diff --git a/udev/nreal_air.rules b/udev/nreal_air.rules index 297d9a4..1951356 100644 --- a/udev/nreal_air.rules +++ b/udev/nreal_air.rules @@ -1 +1,15 @@ -SUBSYSTEMS=="usb", ATTRS{idVendor}=="3318", ATTRS{idProduct}=="0424", GROUP="input", MODE="0666" +# Rule for USB devices +SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="3318", ATTR{idProduct}=="0424|0428|0432", GROUP="plugdev" + +# Rule for Input devices (such as eventX) +SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{idVendor}=="3318", ATTRS{idProduct}=="0424|0428|0432", GROUP="plugdev" + +# Rule for Sound devices (pcmCxDx and controlCx) +SUBSYSTEM=="sound", KERNEL=="pcmC[0-9]D[0-9]p", ATTRS{idVendor}=="3318", ATTRS{idProduct}=="0424|0428|0432", GROUP="plugdev" +SUBSYSTEM=="sound", KERNEL=="controlC[0-9]", ATTRS{idVendor}=="3318", ATTRS{idProduct}=="0424|0428|0432", GROUP="plugdev" + +# Rule for HID Devices (hidraw) +SUBSYSTEM=="hidraw", KERNEL=="hidraw[0-9]*", ATTRS{idVendor}=="3318", ATTRS{idProduct}=="0424|0428|0432", GROUP="plugdev" + +# Rule for HID Devices (hiddev) +KERNEL=="hiddev[0-9]*", SUBSYSTEM=="usb", ATTRS{idVendor}=="3318", ATTRS{idProduct}=="0424|0428|0432", GROUP="plugdev"