Skip to content

Instantly share code, notes, and snippets.

@cdleveille
Last active May 2, 2024 23:50
Show Gist options
  • Star 29 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • 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
@JulioQc
Copy link

JulioQc commented Feb 15, 2023

Could you make it include libisl and libmpc so the install script can work for steam deck v24+?

@cdleveille
Copy link
Author

cdleveille commented Feb 15, 2023

Could you make it include libisl.so.23 so the install script can work for steam deck v24+?

Thanks for your message! I can't say I am at all familiar with libisl or libmpc, but I'd be happy to include them if necessary. That said, I personally have not had any issues running the latest version of the script as is on the latest few versions of SteamOS (I am currently on v3.4.5 in the Preview channel). I'm curious - did you get an error of some kind when running the above script that indicates those two should be included? And if so, have you already verified that including them resolves the issue?

Also, pardon me if I'm missing something obvious here, but I'm not sure what you mean by "steam deck v24+" - what are you referring to here?

@JulioQc
Copy link

JulioQc commented Feb 15, 2023

Oh its the install.sh compiler that requires it. I simply ran:

pacman -S libisl libmpc

Ran your script and all is working now. I think you could just add it to your line 7 with all the other dependencies :) This is the first tweak I attempt on SteamDeck so possibly these dependencies are installed by other user installed packages or came by default on older versions of the deck. Anyhow, they were missing on my system that's for sure!

And I got the version wrong, im in 3.4.4

@cdleveille
Copy link
Author

Oh its the install.sh compiler that requires it. I simply ran:

pacman -S libisl libmpc

Ran your script and all is working now. I think you could just add it to your line 7 with all the other dependencies :) This is the first tweak I attempt on SteamDeck so possibly these dependencies are installed by other user installed packages or came by default on older versions of the deck. Anyhow, they were missing on my system that's for sure!

And I got the version wrong, im in 3.4.4

Ah gotcha! I think you're probably right that they are installed by default for most people, since this is the first I've heard about it being an issue for someone running the script. But I will go ahead and add them to the list of package dependencies in the script anyway, since they definitely seem to be required.

Thank you for the heads up!

@JulioQc
Copy link

JulioQc commented Feb 16, 2023

Thank you for making this script!

@arekkusudesu
Copy link

Can confirm that with the new changes, the script works on SteamOS 3.4.4. Thanks for updating it. I was also missing those two last packages.

@JulioQc
Copy link

JulioQc commented Mar 19, 2023

Worked flawlessly after steam update to 3.4.6

@SavageCore
Copy link

I've updated the script here, feel free to pull in any changes!

I and others were finding that the driver was installed correctly but the modules remained unloaded, even after a reboot so I added a lsmod check after installation to then modprobe and add to /etc/modules-load.d/

@cdleveille
Copy link
Author

I've updated the script here, feel free to pull in any changes!

I and others were finding that the driver was installed correctly but the modules remained unloaded, even after a reboot so I added a lsmod check after installation to then modprobe and add to /etc/modules-load.d/

This is amazing, thanks so much for doing this! I especially like the one-liner to download/execute the script that you posted in a comment on your gist, which I'll post here as well. Nice and simple!

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

I admit that I'm unsure if running this is even necessary anymore, as I saw that Valve added support for the Xbox Wireless Adapter in the Steam Deck Client Update released on March 15th. Any idea?

Either way, I appreciate the effort you put into this!

@SavageCore
Copy link

My pleasure!

I believe that was found to be an error in the changelog and actually applies to the Steam controller configurator on Windows. I failed to get it to work on any update channel without xone.

@cosaga
Copy link

cosaga commented Jun 20, 2023

First of, amazing script!

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.

Did I miss something?

@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) <jan.steffens@gmail.com>" 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 <felixonmars@archlinux.org>" could not be imported
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
error: key "Frederik Schwan <frederik.schwan@linux.com>" could not be imported
error: key "Evangelos Foutras <evangelos@foutras.com>" could not be imported
error: key "Allan McRae <me@allanmcrae.com>" could not be imported
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
error: key "Frederik Schwan <frederik.schwan@linux.com>" could not be imported
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
error: key "Frederik Schwan <frederik.schwan@linux.com>" could not be imported
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
error: key "Antonio Rojas <arojas@archlinux.org>" could not be imported
error: key "Allan McRae <me@allanmcrae.com>" could not be imported
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
error: key "Antonio Rojas <arojas@archlinux.org>" could not be imported
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
error: key "Antonio Rojas <arojas@archlinux.org>" could not be imported
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
error: key "Morten Linderud <morten@linderud.pw>" could not be imported
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
error: key "Christian Hesse <eworm@archlinux.org>" could not be imported
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
error: key "Antonio Rojas <arojas@archlinux.org>" 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