Skip to content

Instantly share code, notes, and snippets.

@ammuench
Last active July 16, 2024 20:46
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

@Shaun-Schwartz
Copy link

Thanks a lot! This worked for me. If the udev rule isn't working for you try changing the idProduct. 3106 did not work for me but 3016 did. Not sure why. dmesg showed several different idProduct numbers and 3106 was one of them.

@lefuz
Copy link

lefuz commented Dec 22, 2023

Hello, can you explain step by step how to "Create a new file /etc/udev/rules.d/99-8bitdo-xinput.rules"? Thx.

@ammuench
Copy link
Author

Hello, can you explain step by step how to "Create a new file /etc/udev/rules.d/99-8bitdo-xinput.rules"? Thx.

# To create it
sudo touch /etc/udev/rules.d/99-8bitdo-xinput.rules
# To edit it (you can also use vim, gedit, whatever) 
sudo nano /etc/udev/rules.d/99-8bitdo-xinput.rules 

@CtodGit
Copy link

CtodGit commented Jan 2, 2024

you just got me up and running, thanks!

Now I'm trying to see if there is a way to wake my pc with the 2.4Ghz USB on controller boot...

update to that wake venture, I got it working with these two articles (I had an issue with rc.local on debian 12 so the second article is for that):

USB Wake:
https://www.makeuseof.com/wake-your-linux-pc-from-suspend-using-usb-devices/

Enable rc.local:
https://www.linuxbabe.com/linux-server/how-to-enable-etcrc-local-with-systemd

@Cereal-Killa
Copy link

Thank you, worked on my Powkiddy x55 running JELOS!

@BigBoyBarney
Copy link

BigBoyBarney commented Jan 4, 2024

The original instructions work for me on Fedora 39, thank youi!! I was wondering if there was a way to get the paddles on the back working?

@ammuench
Copy link
Author

ammuench commented Jan 4, 2024

The original instructions work for me on Fedora 39, thank youi!! I was wondering if there was a way to get the paddles on the back working?

To the best of my understanding the paddles are programmed at the firmware level have to be assigned to another button or macro in the 8BitDo software. I loaded up the tool in a Windows VM, did USB passthrough with the controller, and wrote the firmware with the new assignments there. Once I saved it they worked back in my linux machine when connected as set.

@BigBoyBarney
Copy link

BigBoyBarney commented Jan 4, 2024

Wow, that's very interesting!
Which mode are you using it in? The controller reports itself as 8BitDo Pro 2 Wired Controller in jstest with only 10 buttons
How does yours report itself?

EDIT: I just tried what @ammuench mentioned, set what I wanted to the paddles in a Windows VM, and now the paddles work as expected, as do the profiles / profile switching. Amazing stuff, thank you so much!

@davcri
Copy link

davcri commented Jan 27, 2024

JFYI: it works out of the box on latest Linux Mint 21.3 with 6.5 kernel. Also it works out of the box on Steam Deck.

@holotone
Copy link

This was a big help, thanks!

@aragubas
Copy link

aragubas commented May 3, 2024

Works out of the box in Fedora 40 now! I just bought the controller, plugged the 2.4GHz dongle in and it just works! also works via cable. Tho I only tested X input mode

@Hatsune-Cthulhu
Copy link

Hatsune-Cthulhu commented May 9, 2024

Annoyingly the wireless dongle doesn't seem to have power/wakeup support, also, controller just doesn't work in general for me on Kernel 6.8

@justinnichols
Copy link

Annoyingly the wireless dongle doesn't seem to have power/wakeup support, also, controller just doesn't work in general for me on Kernel 6.8

I concur. I'm having issues where sometimes Garuda Linux will see it connected, and sometimes it won't. The udev rule in this gist also didn't help fix it.

@Edwardius
Copy link

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/)

@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!

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