Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uinputdriver can't handle pro controller #10

Open
Bionov opened this issue Feb 12, 2018 · 1 comment
Open

uinputdriver can't handle pro controller #10

Bionov opened this issue Feb 12, 2018 · 1 comment

Comments

@Bionov
Copy link

Bionov commented Feb 12, 2018

Hello, once compiled and launched, I get this error with uinputdriver :

USB device info:
vid: 0x057E pid: 0x2009
path: /dev/hidraw0
MAC: 000000000001
interface_number: 0
Manufacturer: Nintendo Co., Ltd.
Product: Pro Controller
Failed to open controller at Failed to get handle for right Joy-Con or Pro Controller, exiting...

I'm on an Antergos 64bit.

@jakebesworth
Copy link

You need to do this on linux:

This is because Linux doesn't have a driver for Switch Pro controllers and Linux makes the device read-only by default. Chrome can use it without a driver but it needs to send commands to the device to initialize it first.

The fix is to configure udev rules that tell Linux to make the device writeable. As root, create a file /etc/udev/rules.d/50-nintendo-switch.rules and paste these rules into it:

# Switch Joy-con (L) (Bluetooth only)
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", KERNELS=="0005:057E:2006.*", MODE="0666"

# Switch Joy-con (R) (Bluetooth only)
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", KERNELS=="0005:057E:2007.*", MODE="0666"

# Switch Pro controller (USB and Bluetooth)
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="2009", MODE="0666"
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", KERNELS=="0005:057E:2009.*", MODE="0666"

# Switch Joy-con charging grip (USB only)
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="200e", MODE="0666"

After creating the .rules file, disconnect and reconnect the controller.

Steam creates similar rules for Switch Pro, you could also try installing Steam if you don't want to mess with udev rules. Running through steam + bluetooth also works.

https://www.reddit.com/r/Stadia/comments/egcvpq/using_nintendo_switch_pro_controller_on_linux/fc5s7qm/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants