Skip to content

Instantly share code, notes, and snippets.

@cdleveille
Last active September 22, 2024 01:30
Show Gist options
  • Save cdleveille/e84c235c6e8c17042d35a7c0d92cdc96 to your computer and use it in GitHub Desktop.
Save cdleveille/e84c235c6e8c17042d35a7c0d92cdc96 to your computer and use it in GitHub Desktop.
Install or update xone driver for Steam Deck (desktop shortcut and bash script)
[Desktop Entry]
Comment[en_US]=
Comment=
Exec=bash $HOME/xone_install_or_update.sh
GenericName[en_US]=
GenericName=
Icon=preferences-desktop-gaming
MimeType=
Name[en_US]=Install⁄Update Xone
Name=Install⁄Update Xone
Path=
StartupNotify=false
Terminal=true
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=
#! /bin/bash
# set xone local repo folder location
XONE_LOCAL_REPO="/home/deck/repos/xone"
# rename/back up fakeroot.conf to avoid error
sudo mv /etc/ld.so.conf.d/fakeroot.conf /etc/ld.so.conf.d/fakeroot.conf.bck
# install required linux headers/packages
sudo steamos-readonly disable && sudo pacman-key --init && sudo pacman-key --populate archlinux && sudo pacman-key --populate holo && sudo pacman -Syu curl wget git base-devel gcc cabextract linux-neptune-headers dkms libisl libmpc
# does the xone local repo folder already exist?
if [ ! -d $XONE_LOCAL_REPO ]
then
# ...if no, clone the repo and cd into it
git clone https://github.com/medusalix/xone $XONE_LOCAL_REPO
cd $XONE_LOCAL_REPO
else
# ...if yes, cd into it, run the uninstall script, and pull down any new updates from the remote repo
cd $XONE_LOCAL_REPO
sudo ./uninstall.sh
git pull
fi
# run the xone install and get-firmware scripts
sudo ./install.sh --release
sudo xone-get-firmware.sh --skip-disclaimer
read -p "Done. You may now safely close the window and plug in your Xbox Wireless Adapter." -n1 -s
@cdleveille
Copy link
Author

Re @cosaga:

I have occasionally run into issues with adapter not working after running the script, and usually simply restarting the Deck or unplugging it and plugging it back in has worked for me. So maybe give that a shot, and if you're still having issues I would recommend trying the version of the script that @SavageCore linked above - basically just an improved version of this one.

You can also download the latest version and run it via this one-liner command in the Konsole:
wget -O /tmp/bootstrap.sh https://t.ly/kEf0 && sh /tmp/bootstrap.sh

@CyberneticSoul
Copy link

Hello, how do I uninstall it? It broke support for my arcade stick. I installed it by using the "bash xone_install_or_update.sh" command in the konsole. I poked around for a bit trying to uninstall it, but I'm a layman and can't figure it out.

Any guidance would be appreciated. Thanks!

@cdleveille
Copy link
Author

@CyberneticSoul - running the uninstall script in the xone repo folder should do the trick:

cd /home/deck/repos/xone
sudo ./uninstall.sh

@CyberneticSoul
Copy link

@cdleveille Wow, thank you for the swift response. Worked like a charm. :) The arcade stick is up and running again.

I appreciate you!

@kdliu86
Copy link

kdliu86 commented Jul 21, 2023

Heya I'm getting FATAL: MODULE XONE_DONGLE NOT FOUND IN DIRECTORY /LIB/MODULES/5.13.0-VALVE36-1-NEPTUNE after runningwget -O /tmp/bootstrap.sh https://t.ly/kEf0 && sh /tmp/bootstrap.sh

@kdliu86
Copy link

kdliu86 commented Jul 24, 2023

https://www.reddit.com/r/SteamDeck/comments/z0bkdd/cannot_install_anything_with_pacman_even_with/iyi2v4t/ this solved it, I have tailscale installed and needed to unmerge systemd

@SavageCore
Copy link

Updated my fork!

Added xpad-noone installation to restore Xbox and Xbox 360 controller support. Now working with GP2040-CE devices!

https://gist.github.com/SavageCore/263a3413532bc181c9bb215c8fe6c30d

Install: wget -O /tmp/bootstrap.sh https://t.ly/kEf0 && sh /tmp/bootstrap.sh

@SavageCore
Copy link

SteamOS 3.5 Support, prompt to set sudo password if missing and more! Check the changelog.

https://gist.github.com/SavageCore/263a3413532bc181c9bb215c8fe6c30d

@rawnewdlz
Copy link

rawnewdlz commented Oct 12, 2023

@cosaga

Secondly this was able to get my 2.4GHz adapter to be powered and linked to my steamdeck, however the moment I left desktop mode(Which I was in, in order to run the script) I was no longer able to get the adapter to turn on like I could moments before. I went back to desktop mode ran the script and it worked again. Left desktop, and again no longer worked.

Hi, can you please share a link to the 2.4GHz adapter you used? I'm not having success with mine (Microsoft Xbox Wireless Adapter for Windows 10). Did you get it to work? (I'm on 3.4.11)

@kmassop
Copy link

kmassop commented Nov 12, 2023

Hi there,

Recently this script has stopped working with a multitude of issues. is there something I am doing wrong?

This script will install the xone and xpad-noone drivers for the Xbox wireless dongle and controller

Initialising pacman...

/etc/pacman.d/gnupg/gpg.conf:1: keyword too long
gpg: checking the trustdb
gpg: [don't know]: invalid packet (ctb=00)
gpg: keyring_search failed: Invalid packet
gpg: failed to rebuild keyring cache: Invalid packet
gpg: [don't know]: invalid packet (ctb=00)
gpg: keydb_search failed: Invalid packet
gpg: public key of ultimately trusted key F6400CCBC5D3C50F not found
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: [don't know]: invalid packet (ctb=00)
gpg: keydb_search(first) failed: Invalid packet
gpg: validate_key_list failed
gpg: [don't know]: invalid packet (ctb=00)
gpg: keydb_search_first failed: Invalid packet
==> Generating pacman master key. This may take some time.
/etc/pacman.d/gnupg/gpg.conf:1: keyword too long
gpg: Generating pacman keyring master key...
gpg: [don't know]: invalid packet (ctb=00)
gpg: keydb_search failed: Invalid packet
gpg: [don't know]: invalid packet (ctb=00)
gpg: /etc/pacman.d/gnupg/pubring.gpg: copy to '/etc/pacman.d/gnupg/pubring.gpg.tmp' failed: Invalid packet
gpg: error writing public keyring '/etc/pacman.d/gnupg/pubring.gpg': Invalid packet
gpg: key generation failed: Invalid packet
gpg: Done
==> Updating trust database...
/etc/pacman.d/gnupg/gpg.conf:1: keyword too long
gpg: [don't know]: invalid packet (ctb=00)
gpg: keyring_search failed: Invalid packet
gpg: failed to rebuild keyring cache: Invalid packet
gpg: [don't know]: invalid packet (ctb=00)
gpg: keydb_search failed: Invalid packet
gpg: public key of ultimately trusted key F6400CCBC5D3C50F not found
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: [don't know]: invalid packet (ctb=00)
gpg: keydb_search(first) failed: Invalid packet
gpg: validate_key_list failed
==> ERROR: Trust database could not be updated.
Refreshing pacman keys...
Checking for linux headers...

Installing required kernel headers, this may take a while...

error: key "Jan Alexander Steffens (heftig) <[email protected]>" could not be imported
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
error: package 'gcc' was not found
error: package 'flex' was not found
error: package 'gcc' was not found
error: package 'make' was not found
error: package 'patch' was not found
Installing required packages, this may take a while...

error: key "Felix Yan <[email protected]>" could not be imported
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
error: key "Frederik Schwan <[email protected]>" could not be imported
error: key "Evangelos Foutras <[email protected]>" could not be imported
error: key "Allan McRae <[email protected]>" could not be imported
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
error: key "Frederik Schwan <[email protected]>" could not be imported
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
error: key "Frederik Schwan <[email protected]>" could not be imported
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
error: key "Antonio Rojas <[email protected]>" could not be imported
error: key "Allan McRae <[email protected]>" could not be imported
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
error: key "Antonio Rojas <[email protected]>" could not be imported
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
error: key "Antonio Rojas <[email protected]>" could not be imported
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
error: key "Morten Linderud <[email protected]>" could not be imported
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
error: key "Christian Hesse <[email protected]>" could not be imported
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
error: key "Antonio Rojas <[email protected]>" could not be imported
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
Checking for xone updates...

No updates available
Checking for xpad-noone updates...

No updates available
/home/deck/xone_install_or_update.sh: line 75: dkms: command not found
Installing xone...

Getting xone firmware...

/home/deck/xone_install_or_update.sh: line 112: dkms: command not found
Installing xpad-noone...

Failed to load xone_dongle module. Aborting...
Press any key to exit

@cdleveille
Copy link
Author

@kmassop If you are having issues I would recommend trying SavageCore's fork of the script as this one is a bit out-dated. Based on the comments in there I think there have been issues reportedly recently for it as well, but I believe it has been updated since then and should hopefully work now. Best of luck!

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