Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ErkHal/731ac263d0643c90776dd97923fbed42 to your computer and use it in GitHub Desktop.
Save ErkHal/731ac263d0643c90776dd97923fbed42 to your computer and use it in GitHub Desktop.
(Hopefully) helpful instructions about using a Switch Pro controller with Steam client on Arch Linux

Steam for Arch Linux - Switch Pro Controller Configuration (Wired)

The following instructions are based on a reddit comment of u/zolixes and cleaned up/modified by me.

The following has been tested to work with:

  • Arch Linux with kernel version 5.0.9
  • Steam build jenkins-steam-runtime-beta-release_0.20190320.2 (As seen from Help -> System Information -> Steam Runtime Version)

There is a file: /lib/udev/rules/99-steam-controller-perms.rules (if no rules related to steam are found install the steam-devices package and this file will appear).

NOTE: The file might be named differently and the number in front of it can differ from the example. In my case this was:

/lib/udev/rules.d/70-steam-input.rules

How to add switch controller into the rules:

1. Open the file

You should see something like this:

# Valve USB devices
SUBSYSTEM=="usb", ATTRS{idVendor}=="28de", MODE="0660", TAG+="uaccess"
# Steam Controller udev write access
KERNEL=="uinput", SUBSYSTEM=="misc", OPTIONS+="static_node=uinput", TAG+="uaccess"

# Valve HID devices over USB hidraw
KERNEL=="hidraw*", ATTRS{idVendor}=="28de", MODE="0660", TAG+="uaccess"

# Valve HID devices over bluetooth hidraw
KERNEL=="hidraw*", KERNELS=="*28DE:*", MODE="0660", TAG+="uaccess"

# DualShock 4 over USB hidraw
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="05c4", MODE="0660", TAG+="uaccess"

# DualShock 4 wireless adapter over USB hidraw
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0ba0", MODE="0660", TAG+="uaccess"

...

Try to search for a Nintendo Switch Pro if you can find a rule entry for the controller. Note that there might be two entries, one for wired and one for bluetooth connection.

If you cannot find any entries, use this template and copy this template entry into the file:

# Nintendo Switch Pro Controller over USB hidraw
KERNEL=="hidraw*", ATTRS{idVendor}=="IDVENDOR_HERE", ATTRS{idProduct}=="IDPRODUCT_HERE", MODE="0660", TAG+="uaccess"

2. Find your controller by listing the usb devices

lsusb

One good tip is to run the command, and then plug your controller in and run it again and note which device shows up on the list

TAKE NOTE OF THE BUS AND DEVICE NUMBERS, example listing:

Bus 002 Device 024: ID xxxx:xxxx

3. Modify entry

Change the idVendor and idProduct values in the entry, you can find the values using the command

udevadm info -a -p $(udevadm info -q path -n /dev/bus/usb/002/012)

Remember to use the bus and device numbers obtained earlier !


ALTERNATIVE WAY to 2. and 3.

This returned correct results in my case, and requires less effort, which is always nice.

Unplug your controller and run:

sudo udevadm monitor -e | grep -m 1 PRODUCT | head -1

And then plug in your controller again. This should output this information:

PRODUCT=xxxx/xxxx/xxxx

The first "xxxx" is the idVendor and the second is idProduct. Copy these two values and use them in your udev rules entry.


4. Reload the rules

sudo udevadm control --reload-rules

5. Open Steam Big Picture Mode

  • Settings -> Controller settings
  • Enable Switch Pro controller support
  • Disconnect and connect the controller again

Steam should recognize the controller at this point

@ErkHal
Copy link
Author

ErkHal commented Sep 28, 2019 via email

@agaskins
Copy link

agaskins commented Sep 28, 2019

I did have the rules file, I was just being dense. Sorry! I tried to delete my post before it wasted anyone's time but I guess I didn't succeed there, ha. That said, I still never found the steam-devices package, but it apparently isn't needed anymore. The walk-thru worked great after resolving my user-error! :P

On another note: Wouldn't it be better to override this file via /etc/udev/rules.d/? I suppose one would copy the file there and then edit it with the changes (maybe even only leaving the lines for the Switch controller). This way a package upgrade won't over-write the changes in the /lib path, right?

@ErkHal
Copy link
Author

ErkHal commented Oct 1, 2019 via email

@LOGICserum
Copy link

Followed the instructions here (BTW ty a ton for them) as best as this human frame would allow. I get full function with the controller and the controller works in rocket league menus but in game (training is all I have tested so far) no can haz function. I would guess it is something simple I am overlooking. I would appreciate telling me about the ...(insert obvious problem here).
Again thanks for doing this

@dodopod
Copy link

dodopod commented Dec 27, 2019

On my system, Steam doesn't recognize when I start a game, and so the controller is always stuck in Desktop Configuration (left stick controls cursor keys, right stick controls mouse, start is esc, etc.). I don't know if this is @LOGICserum 's problem, but the result is the same.

My solution was to change the Desktop Configuration so the controller maps to the proper buttons/sticks instead of mouse and keyboard. If anyone else has this problem, go into Big Picture mode. Then go to Settings > Base Configurations > Desktop configuration > Browse configs > Templates. There should be a template called Gamepad, so select that, and apply the configuration.

@ErkHal
Copy link
Author

ErkHal commented Dec 28, 2019

Followed the instructions here (BTW ty a ton for them) as best as this human frame would allow. I get full function with the controller and the controller works in rocket league menus but in game (training is all I have tested so far) no can haz function. I would guess it is something simple I am overlooking. I would appreciate telling me about the ...(insert obvious problem here).
Again thanks for doing this

I would suggest trying to fiddle with the settings like @dodopod suggested, sounds definitely like an issue with the Steam configs. I am pleased to read that people have been finding this guide helpful.

@NyxSyn
Copy link

NyxSyn commented Mar 23, 2020

I was able to get this working but this was only after having changing the Mode value from "0660" (as shown above) to the new value of "0666"

I am unsure if my case is special or if the "0660" shown in the document is in error.

Otherwise great document, guys.

Thanks for all your help

@ErkHal
Copy link
Author

ErkHal commented Mar 24, 2020

I was able to get this working but this was only after having changing the Mode value from "0660" (as shown above) to the new value of "0666"

I am unsure if my case is special or if the "0660" shown in the document is in error.

Otherwise great document, guys.

Thanks for all your help

Hi, I tried to look into this and MODE="0666" seems to make this device readable/writable by all. I assume this might help to fix some issues, but I don't currently have my Arch setup anymore to verify if this is causing problems in the newer versions.
Glad to know that these instructions still reach people who are searching for help, consider giving it a star if you think this is helpful !

@DiamondDust132
Copy link

Sorry for necroposting. Please delete if not allowed. Just wanted to tell you that this worked perfectly for me for my PowerA Wired Switch controller. Spent all day ripping my hair off trying to get it to work in Steam, and your advice did the trick. Thanks again.

@ErkHal
Copy link
Author

ErkHal commented May 5, 2021

Sorry for necroposting. Please delete if not allowed. Just wanted to tell you that this worked perfectly for me for my PowerA Wired Switch controller. Spent all day ripping my hair off trying to get it to work in Steam, and your advice did the trick. Thanks again.

That's awesome that this trick is still working ! I found this stuff like a few years ago, and TBH I was pretty sure that this info is outdated already. Great news that my Gist is still helping people :)

@earldbjr
Copy link

earldbjr commented Jun 9, 2021

On my system, Steam doesn't recognize when I start a game, and so the controller is always stuck in Desktop Configuration (left stick controls cursor keys, right stick controls mouse, start is esc, etc.). I don't know if this is @LOGICserum 's problem, but the result is the same.

My solution was to change the Desktop Configuration so the controller maps to the proper buttons/sticks instead of mouse and keyboard. If anyone else has this problem, go into Big Picture mode. Then go to Settings > Base Configurations > Desktop configuration > Browse configs > Templates. There should be a template called Gamepad, so select that, and apply the configuration.

+1, this saved the day. Thank you.

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