ACTION!="add|change", GOTO="fanatec_end" SUBSYSTEM=="hid", DRIVER=="fanatec", GOTO="ftec_module_settings" SUBSYSTEM=="input", DRIVERS=="fanatec", GOTO="ftec_input_settings" SUBSYSTEM=="ftec_tuning", ACTION=="add", GOTO="ftec_tuning_settings" SUBSYSTEMS=="usb", ATTRS{idVendor}=="0eb7", MODE="0666" GOTO="fanatec_end" LABEL="ftec_module_settings" # let everyone in games group read/write device attributes, such as range, display, LEDs # FIXME: this should be narrowed down in the future! RUN+="/bin/sh -c 'cd %S%p && (chown -f :games range display load rumble leds/*/brightness; chmod -f 660 leds/*/brightness)'" GOTO="fanatec_end" LABEL="ftec_input_settings" # remove deadzone/fuzz, fix ranges of analog stick RUN+="/bin/sh -c '/usr/bin/evdev-joystick --evdev $devnode --deadzone 0 --fuzz 0 --flatness 0; \ /usr/bin/evdev-joystick --evdev $devnode --axis 3 --min -128 --max 128; \ /usr/bin/evdev-joystick --evdev $devnode --axis 4 --min -128 --max 128'" GOTO="fanatec_end" LABEL="ftec_tuning_settings" # let everyone in games group read/write tuning-menu entries # FIXME: this should be narrowed down in the future! Also, this fires every time a value is changed! RUN+="/bin/sh -c 'cd %S%p && chown -f :games advanced_mode RESET SLOT SEN FF SHO BLI DRI FOR SPR DPR NDP NFR FEI INT NIN FUL FFS ACP || true'" GOTO="fanatec_end" LABEL="fanatec_end"