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?
Update 1:
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
Update 2:
All credit goes to JacKeTUs for his work on helping me out. He is making/made the driver for this. It may go into AUR for Arch users, so if anyone ends up looking for support for this handbrake you can find the source at the below link.
https://github.com/JacKeTUs/hid-oddor-handbrake
This will install the driver (currently it needs to be loaded after running sudo make) and the udev rule. It eliminates the need for protopedal but does require launch options to be set.
SDL_JOYSTICK_WHEEL_DEVICES=0x1021/0x1888 %command%
Update 3:
Latest push eliminates the need for steam launch option and removes the button from the device.
I used Ubuntu as my first distro out of curiosity sometime around 2006. I've tried others (Mint, Pop OS, Debian, Fedora) but mostly settled with Ubuntu because it was just kind of ok for me and as another user said, there was a lot of articles that helped with getting things working because it became popular.
I had heard of Arch and to your point the it's complicated thing very much kept me away from it even though I have been using computers for around 30 years and was comfortable using a terminal.
The other thing is gaming, I consistently had problems with the nvidia cards that I've had over the years and never really cared to dig into trying to get things to work so Linux was kind of my testing ground for other things and just general learning about how things work.
Then I finally just had enough of Windows a couple of years ago, and with gaming support getting better I went back to Ubuntu and it just didn't feel good, I wanted something different that was setup how I wanted it so I looked into Arch.
I tried a couple of times to manually install it but my attention span (ADHD) kept me from focusing on the documentation enough to actually learn what I was doing. In comes the archinstall script, it was basic enough for me to follow and understand to get my system up and running.
I went through roughly 3-4 installs using it and testing stuff after I had it running and breaking stuff and just doing a fresh install since the script made it very easy. Since then I have learned a good bit more, and honestly don't think I will ever use another distro for my desktop. Just the ability to make it exactly what you want and things just work. Not to mention the documentation is massive and the AUR is awesome.
I do use Pop OS on my wife's laptop since it decided to automatically upgrade to W11 which crippled it and I just wanted something that I could just drop on there that would work with no real configuration since the only thing it needs is Citrix which works ootb and she can use all her office tools through that and has libre office if she wants to do something locally.
I do have a separate drive with W11 on my desktop, its used for one thing, SolidWorks. Which I use enough to merit having windows.
Arch was and still kind of is seen as the "I use Arch BTW" crowd, but it really shouldn't be that way. The install script isn't fancy, but it works. I think that would be one of the biggest barriers to break that mindset and open it to more people that are still fresh to Linux. I think that having even the most basic "GUI" for installing Arch would do wonders.