--- title: 09 Special Hardware description: published: true date: 2023-05-03T05:35:30.253Z tags: editor: markdown dateCreated: 2023-05-03T03:44:22.001Z --- # Programmable Mouse If you have a mouse with profiles or adjustable DPI, there is a chance it is supported by Piper, If you are in doubt you can simply try it and remove Piper if it doesn't work install it with the following command sudo pacman -S piper Now open the program and check if it detects your mouse # BlackMagic Capture Cards WIP! # Xbox One Controller ## Xpad xpad works great, is the default on modern Linux distros and supports a wide range of controllers For Bluetooth to work with xpad and the Xbox One controllers you need to disable ertm (This is not needed for xpadneo) create the config file sudo vim /etc/modprobe.d/xbox_bt.conf Add the following line to the document and save and exit with CTRL + X. ``` options bluetooth disable_ertm=1 ``` ## Xpadneo xpadneo is a better driver for xbox one controllers if you use bluetooth, It enables vibration and even the vibration inside the triggers, It supports battery level indication, It also fixes the mapping in many many games that where previously unplayable with a Xbox One controller on Linux. Install the dependencies sudo pacman -S dkms bluez bluez-utils Install xpadneo from the AUR git clone https://aur.archlinux.org/xpadneo-dkms-git.git && cd xpadneo-dkms-git && makepkg -si Now you should be able to reboot and it should be all good, Having the controllers vibrate for a second when connected is a good indicator that it works. ## Xow Xow is a better driver for xbox one controllers if you use the official wireless controller dongle from Microsoft, I don't own one so I can't test anything I would write here, So I just don't, I do mention it in case you have one. # Racing Wheels Racing wheels should work out of the box on Linux, Including Force Feedback, Shifters, pedals and most things you can throw at it. But if you like to fine tune some things you may need some software. This is mostly not even the case, I played a long time just using the default kernel drivers, But some of these tools might come in very handy if you play different games, with different settings or with unsupported wheels. ## Oversteer Oversteer will enable a few cool things like Turning Degree and Lock if the game you want to play doesn't support it. It also enables you to set profiles for games and gives you compatibility modes so that you can play older games that expect a G27 for example. Install it with the following command git clone https://aur.archlinux.org/oversteer.git && cd oversteer && makepkg -si You can open the program now and check some things out. ## lg4ff lg4ff is a kernel module for steering wheels which enables you to adjust the lights on a G29 for example, It also allows you to fine tune and even amplify the Force Feedback, Aplify it on your own risk tho, I already wrecked a G29, The inner housing broke, don't worry about it overheating or anything. Install it with the following command git clone https://aur.archlinux.org/new-lg4ff-dkms-git.git && cd new-lg4ff-dkms-git && makepkg -si # Handbrake Handbrakes are not that common sadly, You can purchase an expensive one from Fanatec, buy one from Aliexpress or create your own. If you use a Fanatec Handbrake You just need to add a few lines with the correct ProductID and VendorID to the inputdevices.json file of the game. For Feral games it will be located in the installation folder under the /Share directory. Just add the folllowing lines with the correct ProductID and VendorID before the last ] of the file. These Product and Vendor IDs are for a Arduino Leonardo. You can find the right Product and Vendor IDs by typing lsusb -v in a terminal when the device is connected. ``` { "Name": "Handbrake", "VendorID": "0x2341", "ProductIDs": [ "0x8036" ], "Category": "Wheel", "Type": "UnknownWheel" } ``` If you made your own or bought a complete handbrake sim set from Aliexpress or Ebay and it is not working properly follow the following instructions. Download this little zip file, It includes inputdevice.json files for Dirt Rally and Dirt 4, It also includes the Arduino Sketch, The Joystick Library and a little readme file. https://houtworm.cloud/s/ksrijLyYseQPFKx We will need arduino installed on our system sudo pacman -S arduino Copy the Joystick folder in the Joystick master zip file to the Arduino libraries folder which is located in ~/Arduino/libraries Open Arduino and replace all text with this content ``` #include const int potPin = A0; Joystick_ Joystick; void setup() { Joystick.begin(); } void loop() { int rawValue = analogRead(potPin); int value = 255 - map(rawValue, 750, 1023, 0, 255); Joystick.setXAxis(value); } ``` Make sure you put the right Arduino model and the right USB port in tools, Then click on Verify and if it succeeds press Upload to flash it to the Arduino. If needed you can adjust the values (rawValue, 750, 1023, 0, 255). These may be different depending on how you built it Now the Arduino is a functional Handbrake in Racing games :)