Skip to content

Instantly share code, notes, and snippets.

@ammuench
Last active November 13, 2024 13:33
Show Gist options
  • Save ammuench/0dcf14faf4e3b000020992612a2711e2 to your computer and use it in GitHub Desktop.
Save ammuench/0dcf14faf4e3b000020992612a2711e2 to your computer and use it in GitHub Desktop.
8BitDo Ultimate 2.4GHz wifi working in linux

FROM https://www.reddit.com/r/Fedora/comments/zmvkdj/8bitdo_ultimate_bluetooth_controller_working_in/


I've bought this new controller from 8BitDo and wished to use on linux, to my sadness the controller didn't work out of the box, neither by cable, the 2.4G dongle or bluetooth.

So I've tried a number of solutions and this one from u/GodOfEmus over in the 8bitdo community was the one to work for me:

  1. Create a new file /etc/udev/rules.d/99-8bitdo-xinput.rules
  2. Paste this udev rule in there, then save and exit the file:
  ACTION=="add", ATTRS{idVendor}=="2dc8", ATTRS{idProduct}=="3106", RUN+="/sbin/modprobe xpad", RUN+="/bin/sh -c 'echo 2dc8 3106 > /sys/bus/usb/drivers/xpad/new_id'"
  1. Run the following command in a terminal: sudo udevadm control --reload
  2. Unplug and replug the controller if it was already plugged in, it might take a second if you have the bluetooth version

It will basically "cheat" the OS to see the controller as an generic xbox device, so sadly no bluetooth nor gyro control if you care about that, but the rumbling is working for me.

Link to the original post: https://www.reddit.com/r/8bitdo/comments/ykdsmv/ultimate_24_ghz_model_right_analog_not_working_in/

And link to the comment of u/GodOfEmus with the solution: https://www.reddit.com/r/8bitdo/comments/ykdsmv/comment/iv48s4k/?utm_source=share&utm_medium=web2x&context=3

Sharing this solution here to spread the word in our community

@gemantzu
Copy link

gemantzu commented Jun 16, 2024

FYI always check your model. the new ultimate 2.4ghz w/ the hall effect joysticks have id of 3109.

@Hatsune-Cthulhu
Copy link

Hatsune-Cthulhu commented Jun 25, 2024

FYI always check your model. the new ultimate 2.4ghz w/ the hall effect joysticks have id of 3109.

Yeah, I haven't actually been using any of the udev rules here, been writing my own. I updated to kernel 6.9.5 and haven't had any issues with the controller not working since, but still not seeing power/wakeup support. Wondering if they shipped the new hall effect ultimate controllers with a worse dongle.

cat "${${$(grep 3109 /sys/bus/usb/devices/*/idProduct):0:-5}/idProduct/power/wake}"
cat: /sys/bus/usb/devices/1-3/power/wake: No such file or directory

Certainly seems like they shipped the new ones with a crappier dongle, if this does turn out to be the case, they've definitely lost a customer in me, given they marketed this controller around the steam deck, knowing full well that the steam deck community wants a controller that can wake the system remotely.

@chron-isch
Copy link

I bought the Bluetooth/dongle version earlier this year, while the dongle is still causing problems with constant disconnects when using Bluetooth it works out of the box and can be tested with evtest.

@zeus134Dev
Copy link

I worked for me on Lubuntu 22.04 for the "8Bitdo Ultimate C 2.4g".
Thank you!

Just as described:

1️⃣ I ran: sudo nano /etc/udev/rules.d/99-8bitdo-xinput.rules and typed my computer password

2️⃣ I pasted the following line:
ACTION=="add", ATTRS{idVendor}=="2dc8", ATTRS{idProduct}=="3106", RUN+="/sbin/modprobe xpad", RUN+="/bin/sh -c 'echo 2dc8 3106 > /sys/bus/usb/drivers/xpad/new_id'"

3️⃣ I pressed: CTRL + X

4️⃣ I typed "y" and then "ENTER" to save the buffer

5️⃣ I pressed "ENTER" one again

6️⃣ I ran: sudo udevadm control --reload

7️⃣ Disconnected the 2.4g receiver

8️⃣ Connected the 2.4g receiver

9️⃣ I pressed and held the "X button + 8bitdo button" in the controller until it did a small vibration

🔟 DONE!

@zelf
Copy link

zelf commented Sep 2, 2024

Anyone managed to get the gyro working?

@mercster
Copy link

mercster commented Sep 2, 2024

Anyone managed to get the gyro working?

There is no gyro on the 8bitdo Ultimate 2.4Ghz.

@zelf
Copy link

zelf commented Sep 2, 2024

@mercster i see. I bought the wrong one. There's another one with gyro. Thanks!

@mercster
Copy link

mercster commented Sep 2, 2024

@mercster i see. I bought the wrong one. There's another one with gyro. Thanks!

I wouldn't expect the gyro to work under Linux at any rate. Good luck?

@zelf
Copy link

zelf commented Sep 2, 2024

Yeah, I realize now. I wanted the 8bitdo because of the 2.4 dongle.

The ps5 controller has gyro, but I get weird delays (which is a problem on eldenring and wukong)
It went away with the 8bitdo.

i guess I'll use both controllers and change depending on the game.

@YusefOuda
Copy link

this also works for the new Ultimate 2C, except the product id is 310a instead of 3106

ACTION=="add", ATTRS{idVendor}=="2dc8", ATTRS{idProduct}=="310a", RUN+="/sbin/modprobe xpad", RUN+="/bin/sh -c 'echo 2dc8 310a > /sys/bus/usb/drivers/xpad/new_id'"

@kody-oneill
Copy link

@YusefOuda This is awesome I was looking for this exactly! My question is how do you find this ID of the product to know that it was 310a vs 3106?

@YusefOuda
Copy link

@kody-oneill you can use lsusb

@d-t-o
Copy link

d-t-o commented Oct 26, 2024

@kody-oneill you also see it in your syslog as soon as you power the controller on:

input: 8BitDo 8BitDo Ultimate 2C Wireless Controller Keyboard as /devices/pci0000:00/0000:00:01.2/0000:02:00.0/usb1/1-4/1-4:1.1/0003:2DC8:310A.000B/input/input38

Does anyone know how extra buttons work with xpad though? I expected to see R4/L4 as additional joystick buttons, same with the mapping and star button, but they are not, there's only 11 buttons listed, those 4 seem to be missing.

Edit: L4/R4 can be remapped via the controller itself to other buttons, then they work, but of course acting as these other buttons. I was hoping to see two additional buttons for custom stuff like next/previous song.

@855579762735
Copy link

855579762735 commented Nov 13, 2024

For anyone who is looking to just make the controller work but not make it "cheat" the OS. You can use udev to give its input files read/write permissions.

1. create a `/etc/udev/rules.d/99-8bitdo-xinput.rules` with your favorite editor

2. inside the file, add the following:
   
   1. `ACTION=="add", ATTRS{idVendor}=="2dc8", ATTRS{idProduct}=="3016", MODE="0666"`
   2. This gives the input file of any 8bitdo controller R/W permissions automatically when connected.

3. reload udev with `sudo udevadm control --reload-rules` or just reboot your computer.

This is helpful when you want to just read the controller's input according to SDL, not remapping to an xbox controller. Example use case is when you want it to work with ROS (https://answers.ros.org/question/384456/ros2-joy_node-debugging/)

Debian 12 Bookworm
I am using the 8BitDo Ultimate C 2.4G Wireless Controller
working file: /etc/udev/rules.d/99-8bitdo-xinput.rules

So I tried to blindly use the original post code shown below to see if I could get this working ..

ACTION=="add", ATTRS{idVendor}=="2dc8", ATTRS{idProduct}=="3106", RUN+="/sbin/modprobe xpad", RUN+="/bin/sh -c 'echo 2dc8 3106 > /sys/bus/usb/drivers/xpad/new_id'"

and then trying to either reboot or running udevadm control --reload with disconnecting and reconnecting the device, and that worked ..
however what I really want is this to work without hacky stuff .. so I tried what @Edwardius suggested, like so;

ACTION=="add", ATTRS{idVendor}=="2dc8", ATTRS{idProduct}=="3016", MODE="0666"

then I did a reboot and the whole udevadm control --reload with disconnecting and reconnecting the device .. didn't work .. so I did more research and after trying lsusb I found that my device is actually called out as 2dc8:3016. So how is it that the original setup works with the hacky stuff and the wrong idProduct but the controller is not recognized in MODE="0666" with the correct idProduct ? Any assistant is greatly appreciated :)

side note: is it possible that by doing the hacky version first I've screwed up the native support ? how would I reverse that ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment