Cheap usb encoders, ghost inputs, and ES screensaver
-
Re: Ghost Inputs Turning TV Back On
A while ago I was annoyed that the two cheap usb encoder boards that I bought were kicking ES out of its screen saver. Both were reporting random ghost inputs on a Z axis that was not connected to any input. I used the following command to quiet those noisy inputs:
evdev-joystick --e /dev/input/event0 --fuzz 255 --axis 2
evdev-joystick --e /dev/input/event1 --fuzz 255 --axis 2
I wasn't able to find out what the fuzz directive does, but it quiets all the ghost inputs on that non-existent axis.
After running those commands, I'm happy to report that the ES screensaver runs.
So, I created a udev rule to apply these rules any time one of these usb encoder boards is plugged in or when the system boots up.
I created the following file
/etc/udev/rules.d/85-dragonrise-generic-usb-joystick.rules
as root user, after determining the vendor, product id, and product from thedmesg
command.KERNEL=="event*", NAME="input/%k", ATTRS{idVendor}=="0079", ATTRS{idProduct}=="0006", ATTRS{product}=="Generic USB Joystick " ,ACTION=="add", RUN+="/usr/bin/evdev-joystick --e /dev/input/%k --fuzz 255 --axis 2"
Now ES stays in screensaver mode. I hope this helps anyone looking for a solution to this problem.
Some reference material: https://technicallycompetent.com/joysticks-linux-joydev-evdev/
The
/lib/udev/rules.d/80-stelladaptor-joystick.rules
file was incredibly helpful as well. -
@jbsapp
Great information.I was curious and managed to locate a little detail on the fuzz and other arguments.
You can find that
fuzz: specifies fuzz value that is used to filter noise from the event stream.
Which means that the input system in linux will drop events generated by the device driver if the difference from the last value is lower than the fuzz. This is done in the input layer.
Another user posted:
So it would seem that any changes less than fuzz are should be filtered out / ignored.
Also,
https://python-evdev.readthedocs.io/en/latest/apidoc.html
TheDevice
section talks about the fuzz argument.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.