RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Cheap usb encoders, ghost inputs, and ES screensaver

    Scheduled Pinned Locked Moved Help and Support
    usb encoderdragonriseghost inputs
    2 Posts 2 Posters 335 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jbsapp
      last edited by

      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 the dmesg 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.

      YFZdudeY 1 Reply Last reply Reply Quote 3
      • YFZdudeY
        YFZdude @jbsapp
        last edited by YFZdude

        @jbsapp
        Great information.

        I was curious and managed to locate a little detail on the fuzz and other arguments.

        https://stackoverflow.com/questions/16110515/explanation-of-fuzz-and-flat-in-input-absinfo-struct-in-input-h

        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
        The Device section talks about the fuzz argument.

        1 Reply Last reply Reply Quote 1
        • First post
          Last post

        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.