Skip to content

Instantly share code, notes, and snippets.

@RodolpheGohard
Created May 19, 2023 11:24
Show Gist options
  • Save RodolpheGohard/73401167ef33a7cab67193f864b8ebdd to your computer and use it in GitHub Desktop.
Save RodolpheGohard/73401167ef33a7cab67193f864b8ebdd to your computer and use it in GitHub Desktop.
Controllers on linux
# GUI to see controllers https://askubuntu.com/a/270111
# see also https://doc.ubuntu-fr.org/joystick
jstest-gui
# Switch Gamepad
# see https://www.reddit.com/r/linux_gaming/comments/fxwh54/using_nintendo_switch_controllers_on_linux/
# How to use Nintendo Switch controllers on Linux
# First, install dkms-hid-nintendo:
# Update: hid-nintendo is present on Linux's Kernel starting from 5.10! If your kernel is 5.10 or above, skip this step.
git clone https://github.com/nicman23/dkms-hid-nintendo
cd dkms-hid-nintendo
sudo dkms add .
sudo dkms build nintendo -v 3.0
sudo dkms install nintendo -v 3.0
# Then, install joycond:
git clone https://github.com/DanielOgorchock/joycond
cd joycond
cmake .
sudo make install
sudo systemctl enable --now joycond
# (me note)
sudo joycond
sudo service joycond start
# That's it!
#
# Now when you connect a Switch controller to your pc just press L+R (SL+SR) to assign them as you like.
#
# Optionally, you can use joycond-cemuhook for motion input on cemuhook supported applications:
#
git clone https://github.com/joaorb64/joycond-cemuhook
cd joycond-cemuhook
python3 joycond-cemuhook.py
sudo xboxdrv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment