Under construction, but this needs to be here as it's mentioned literally no where else.

udev Rules in Batocera

Batocera supports the use of udev rules just like any other ordinary Linux-based operating system, however the path to use it is different from most. You can transfer your udev rules over to /userdata/system/udev/rules.d/ and they will be enabled once Batocera has finished booting.

If you need something activated earlier in the boot process or something more intimate to the system, you can instead opt to use boot scripts.

For example, if you wanted to enable the Bluetooth passthrough udev rule of Dolphin for your own Bluetooth dongle (list of compatible adapters for Dolphin, not necessarily Batocera is further down that page), you would use this file:

SUBSYSTEM=="usb", ATTRS{idVendor}=="YOURVID", ATTRS{idProduct}=="YOURPID", TAG+="uaccess"

copy it to /userdata/system/udev/rules.d/52-dolphin.rules and reboot Batocera.

Once Batocera has booted you can view the existing udev rules for your system in /etc/udev/rules.d/. You can do this from the file manager ([F1] on the system list) and going up one level, or via SSH. You cannot access this location from the network share, as it is outside of the userdata partition.

If you find that your udev rule isn't working after reboot for any reason, you can alternatively try putting your *.rules file directly into /etc/udev/rules.d/ and running batocera-save-overlay afterward. This will call it slightly earlier in the boot process.

  • udev_rules.txt
  • Last modified: 2 weeks ago
  • by atari