As the title says I am trying to get my handbrake to recognize as a joystick so I can use it.
Running Arch.
This is the device in question. https://www.amazon.com/dp/B07SPVY2WL
It shows up with lsusb as the following. Bus 001 Device 006: ID 1021:1888 ZSC ODDOR-HANDBRAKE
Device info from cat /sys/kernel/debug/usb/devices T: Bus=01 Lev=01 Prnt=01 Port=04 Cnt=04 Dev#= 6 Spd=12 MxCh= 0 D: Ver= 2.00 Cls=ff(vend.) Sub=ff Prot=ff MxPS=64 #Cfgs= 1 P: Vendor=1021 ProdID=1888 Rev= 1.14 S: Manufacturer=ZSC S: Product=ODDOR-HANDBRAKE C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=03(HID ) Sub=01 Prot=05 Driver=(none) E: Ad=81(I) Atr=03(Int.) MxPS= 64 Ivl=10ms E: Ad=01(O) Atr=03(Int.) MxPS= 64 Ivl=10ms
I found this bit of information but it’s related to openSUSE and is quite old but I’m hoping it might help. https://www.spinics.net/lists//linux-input/msg88778.html
It doesn’t show up in /dev/input/…
Any ideas on how I could get this thing recognized so I can use it?
Edit:
I got connected with someone at the Simracing space on matrix per the advice from @lemonuri@lemmy.ml and they helped me to get it working. Here is what we did.
Create the file 99-handbrake.rules in /etc/udev/rules.d and add the two following lines to it.
SUBSYSTEM=="usb", ENV{ID_VENDOR_ID}=="1021", ENV{ID_MODEL_ID}=="1888", RUN+="/bin/sh -c 'echo 1021 1888 > /sys/bus/usb/drivers/usbhid/new_id'"
SUBSYSTEM=="input", ATTRS{idVendor}=="1021", ATTRS{idProduct}=="1888", ENV{ID_INPUT_JOYSTICK}="1"
This forces the device to usbhid as a joystick whenever it is plugged in and recognized.
Run the following command to reload the device rules if you don’t want to reboot. Otherwise you can omit the command and reboot.
sudo udevadm control --reload
It now shows up and is working.
So the device was registering a button at the end of the pull and showing up as an Xbox controller while not recognizing the axis being moved so it was all or nothing.
I installed protopedal and following advice created a dummy device which remapped the inputs so that it registers the analog input only which worked.
protopedal --name "handbrake" -b JOYSTICK -a THROTTLE -s 0:THROTTLE -a Y --no-auto-buttons --no-auto-axes /dev/input/by-id/usb-ZSC_ODDOR-HANDBRAKE-event-joystick
sounds like this was fixing the opposite problem but I saw it was merged to wine very recently https://gitlab.winehq.org/wine/wine/-/merge_requests/8088
I am pretty sure you need to configure more (fake) buttons for the handbrake, I had the same problem. Otherwise it does not get recognized as a gaming device.
I can look up later how I solved this or you can ask the simracing linux community, which helped me with a couple of similar pronlems before:
A place for all the niche of niche gamers to discuss and join other simracers!
Join the Simracing space here https://matrix.to/#/#simracing:matrix.orgSounds good.
I’ll check that out and if you remember how you did it please let me know.
Thank you!
I was able to get some help in the Simracing space. I have it working now.
Going to update the post with what we did.
I am glad to hear you got it to work! I think I took notes on how I got it to work. But I remember having also added a similar rule as you did at some point. I may be able to find my notes tomorrow.
Yeah, now the only issue is that it’s showing up as an xbox controller in the games and registers as a button rather than an analog movement so it’s all or nothing when I hit it lmao.
I saw your conversation on the simracing-channel and there seems to be some progress. I just realized from my notes that my handbrake does not cause any issues under linux even if it looks the same as yours. (They must have implemented the software differently on mine). I had to make some adjustments for the pedals and H-shifter but not the handbrake and just misremembered, sorry. Protopedal is what I used to get around the bug in proton, though. I think proton does not recognize a usb device as controller, if it does not have a certain number of buttons and/or axes.