-
Star
(108)
You must be signed in to star a gist -
Fork
(4)
You must be signed in to fork a gist
-
-
Save SavageCore/263a3413532bc181c9bb215c8fe6c30d to your computer and use it in GitHub Desktop.
#!/bin/bash | |
# Download the latest version of the script from the repository and run it | |
echo -e "\e[1mDownloading the latest version of the script...\e[0m" | |
echo "" | |
curl -sSfL "https://github.com/SavageCore/xone-steam-deck-installer/releases/latest/download/xone_install_or_update.sh" >~/xone_install_or_update.sh || { | |
echo "Failed to download xone_install_or_update.sh. Aborting..." | |
read -n 1 -s -r -p "Press any key to exit" | |
exit 1 | |
} | |
curl -sSfL "https://github.com/SavageCore/xone-steam-deck-installer/releases/latest/download/xone.desktop" >~/Desktop/xone.desktop || { | |
echo "Failed to download xone.desktop. Aborting..." | |
read -n 1 -s -r -p "Press any key to exit" | |
exit 1 | |
} | |
curl -sSfL "https://github.com/SavageCore/xone-steam-deck-installer/releases/latest/download/xone_debug.desktop" >~/Desktop/xone_debug.desktop || { | |
echo "Failed to download xone_debug.desktop. Aborting..." | |
read -n 1 -s -r -p "Press any key to exit" | |
exit 1 | |
} | |
curl -sSfL "https://github.com/SavageCore/xone-steam-deck-installer/releases/latest/download/enable-pairing.desktop" >~/Desktop/enable-pairing.desktop || { | |
echo "Failed to download enable-pairing.desktop. Aborting..." | |
read -n 1 -s -r -p "Press any key to exit" | |
exit 1 | |
} | |
curl -sSfL "https://github.com/SavageCore/xone-steam-deck-installer/releases/latest/download/disable-pairing.desktop" >~/Desktop/disable-pairing.desktop || { | |
echo "Failed to download disable-pairing.desktop. Aborting..." | |
read -n 1 -s -r -p "Press any key to exit" | |
exit 1 | |
} | |
# Run the script | |
echo -e "\e[1mRunning the script...\e[0m" | |
echo "" | |
clear | |
chmod +x ~/xone_install_or_update.sh | |
exec bash ~/xone_install_or_update.sh |
#!/bin/bash | |
# xone install or update script for SteamOS | |
# by cdleveille | |
# updated by SavageCore | |
# | |
# https://gist.github.com/SavageCore/263a3413532bc181c9bb215c8fe6c30d | |
# Script version 0.10.1 | |
echo -e "\e[1mYou have the old script from Gist. Updating...\e[0m" | |
echo "" | |
curl -sSfL "https://github.com/SavageCore/xone-steam-deck-installer/releases/latest/download/xone_install_or_update.sh" >/tmp/xone_install_or_update.sh || { | |
echo "Failed to download the latest version of the script. Aborting..." | |
read -n 1 -s -r -p "Press any key to exit" | |
exit 1 | |
} | |
# Preserve the current working directory and arguments | |
PWD=$(pwd) | |
ARGS="$@" | |
# Replace the current script with the new version | |
mv /tmp/xone_install_or_update.sh "$0" | |
read -n 1 -s -r -p "Press any key to relaunch the script..." | |
clear | |
# Re-run the script with the same environment variables and arguments | |
cd "$PWD" || { | |
echo "Failed to change directory. Aborting..." | |
read -n 1 -s -r -p "Press any key to exit" | |
exit 1 | |
} | |
exec bash "$0" "$ARGS" |
Thanks for letting me know!
The script should handle populating the pacman-key
so not sure what happened here... I'll add a check for plymouth
soonTM!
Today I ran into an issue where the script would fail both in normal and in debug mode at the time to try to load the xone_gip
. This is the error that I was able to capture from dmesg
:
[ 541.292130] BPF: 50_wdt type_id=116362 bits_offset=0
[ 541.292137] BPF:
[ 541.292139] BPF: Invalid name
[ 541.292141] BPF:
[ 541.292145] failed to validate module [xone_gip] BTF: -22
I tried reinstalling the linux headers, rebooting the system, uninstalling xone, reinstalling the linux headers, rebooting, shutting down and waiting a few minutes, to no avail.
Finally I came around this bug report in the ArchLinux forum where, if I may parrot over what they said:
[...] it seems to me that now GCC is adding that .BTF section into the compiled modules, and the kernel doesn't like it
They then go to apply a hotfix directly in the modules and that definitely worked for me.
Happy news in the sad news.
If there is no one else currently facing this issue with the latest stable release of SteamOS, then great. But if this becomes a recurring issue for other users, we might need to consider patching the modules like the OP from the forums did.
P.S.: a copy paste (with improved formatting) from the original post in the forums:
cd /usr/lib/modules/$(uname -r)/updates/dkms
for file in *.zst
do
cp "$file" "$file.bak"
unzstd -f "$file"
base=$(basename "$file" .zst)
objcopy --remove-section .BTF "$base"
zstd -f "$base"
rm -f "$base"
done
So I think my script does work, it installed completely normal, including in debug mode and does allow me to pair my controllers. However, getting the controllers to pair is a little finicky and requires replugging the dongle, but that’s not too bad. What’s really annoying is that once paired, my controllers power cycle every 5-10 seconds and if I don’t spam inputs during that time, when they come back they’ll have no input but stop cycling. Really weird problem so if anyone has any ideas that would be amazing :)
So I think my script does work, it installed completely normal, including in debug mode and does allow me to pair my controllers. However, getting the controllers to pair is a little finicky and requires replugging the dongle, but that’s not too bad. What’s really annoying is that once paired, my controllers power cycle every 5-10 seconds and if I don’t spam inputs during that time, when they come back they’ll have no input but stop cycling. Really weird problem so if anyone has any ideas that would be amazing :)
A couple of things that you can try:
- Keep an eye on dmesg:
dmesg -w
and see if there is any activity in there that can lead to the root cause of the issue - How are you connecting the dongle to the Steam Deck? directly through a USB C to USB A converter? through a docking station? do you have any other machine where you could try to connect the dongle to to see if you'd have the same issue?
- Which dongle do you have? is it a Chinese copy or is it an original?
Microsofts dongle, connected through the official dock, I’ll check dmesg when I get back home, what is that so I can know what to look for?
Microsofts dongle, connected through the official dock, I’ll check dmesg when I get back home, what is that so I can know what to look for?
dmesg
is a tool that shows kernel messages. Use it like this in a terminal:
sudo dmesg -w
You'll see a bunch of nonsense to begin with being printed, but then it stabilizes.
Once dmesg has printed the last message, then start the pairing process and keep an eye on the controllers and hopefully you'll be able to see a message in the terminal when your controllers are power cycling.
If you are able to catch a message related to the power cycle, then at least you'll have more information to google around.
If nothing shows up, then I'm afraid you are out of options on that end.
I would then try to use the dongle on a different machine to discard the possibility of a faulty dongle.
[ 178.048364] usb 3-1.3: new high-speed USB device number 5 using xhci-hcd [ 178.198232] usb 3-1.3: New USB device found, idVendor=045e, idProduct=02e6, bcdDevice= 1.00 [ 178.198241] usb 3-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 178.198244] usb 3-1.3: Product: 802.11ac WLAN [ 178.198246] usb 3-1.3: Manufacturer: MediaTek Inc. [ 178.198248] usb 3-1.3: SerialNumber: 000000000 [ 178.328581] usb 3-1.3: reset high-speed USB device number 5 using xhci-hcd [ 187.664375] input: Microsoft Xbox Controller as /devices/pci0000:00/0000:00:08.1/0000:04:00.3/dwc3.1.auto/xhci-hcd.2.auto/usb3/3-1/3-1.3/3-1.3:1.0/gip0/gip0.0/input/input31 [ 187.965440] input: Microsoft X-Box 360 pad 1 as /devices/virtual/input/input32 [ 193.818648] xone-gip gip0: gip_init_chunk_buffer: already initialized [ 193.866879] xone-gip gip0: gip_process_pkt_chunked: buffer not allocated [ 193.866890] xone-dongle 3-1.3:1.0: xone_dongle_process_buffer: process failed: -71 [ 193.866896] xone-dongle 3-1.3:1.0: xone_dongle_complete_in: process failed: -71 [ 224.924128] xone-gip gip0: gip_init_chunk_buffer: already initialized [ 224.985221] input: Microsoft Xbox Controller as /devices/pci0000:00/0000:00:08.1/0000:04:00.3/dwc3.1.auto/xhci-hcd.2.auto/usb3/3-1/3-1.3/3-1.3:1.0/gip0/gip0.0/input/input33 [ 226.177122] input: Microsoft X-Box 360 pad 1 as /devices/virtual/input/input34 [ 239.115522] input: Microsoft Xbox Controller as /devices/pci0000:00/0000:00:08.1/0000:04:00.3/dwc3.1.auto/xhci-hcd.2.auto/usb3/3-1/3-1.3/3-1.3:1.0/gip0/gip0.0/input/input35 [ 239.408051] input: Microsoft X-Box 360 pad 1 as /devices/virtual/input/input36
this is what I get after plugging in the dongle, it recognizes it. At 187.965440 you can see some failure that leads to the controller looking connected but not doing anything. I power cycled the controller manually and then at 224.985221 it starts a loop where it cycles between identifying it as Xbox one or Xbox 360 controller, it would power cycle after every pair of those identifications. I tried it twice before getting this log and it went a lot longer, this time it stopped power cycling where/when you see the log stop, but it still didn’t really work in game. My inputs were frequently ignored or treated as held.
Hello everybody,
I wanted to say that I am a noob and I had just a small knowledge on what I was doing.
I failed miserably at the beginning, then I tried to install everything directly from the xone GitHub page on my own, and I failed even over there.
Then I uninstalled everything, reinstalled it, and it worked.
I wasn't sure if I had the dongle connected to the dock the first time I tried, and if it was a problem having it connected. The second time, I made sure it wasn't connected to the dock, I did everything smoothly, and now it works.
My Steam Deck is literally new, and it has the latest firmware at this point. (SteamOS 3.6.19)
I bought a dongle on aliexpress and I had many doubts about it, I hope this comment finds a noob like me and motivates them to keep trying
Needs update for SteamOS 3.7 (neptune 6.11)
Needs update for SteamOS 3.7 (neptune 6.11)
I don't currently have time to help add the new kerenel to the script but I wanted to play a quick game. I manually loaded the missing kernel headers with the following command
sudo pacman -Sy "linux-neptune-611-headers"
if you want a quick workaround until the script gets updated.
updating the script for neptune 6.11 works, but another thing I had to note is that I had been using these scripts for so long that the cloned xone repo on my system was still the medusalix version, which doesn't have the 6.11 kernel fix. I guess I just never noticed because it worked anyway (until now) and the script never noticed since it only checks if a xone folder exists or not.
I needed to go to /home/deck/repos and manually delete the xone folder so the script would know to clone from the dlundqvist branch instead.
For anyone wondering, just open the $HOME/.xone_install_or_update.sh script, replace all occurence of 3.6 with 3.7 and neptune-61 with neptune-611
not the cleanest way but works for now :)
For anyone wondering, just open the $HOME/.xone_install_or_update.sh script, replace all occurence of 3.6 with 3.7 and neptune-61 with neptune-611
not the cleanest way but works for now :)
Hmmm... this still isn't working for me. Four occurrences of the former, one occurrence of that latter. Perhaps there is ... something else?
Seems like you need a search and replace on neptune-65 and replace it with neptune-611 too
I shall get an update out in the next couple of days but @govatent workaround will work fine.
@tower12346 good catch, I'll make sure the script checks for the correct repo
0.10.0
Released 🚀
Changelog
- Support SteamOS 3.7
- Ensure the correct repo is used for the xone driver
Let me know if there's any issues but worked fine on my Deck after updating to 3.7
@SavageCore would it be an idea to upgrade this gist into an actual repository? We would get proper tagging out of the box, issues that can be tagged, also pull requests, discussions, etc.
@SavageCore would it be an idea to upgrade this gist into an actual repository? We would get proper tagging out of the box, issues that can be tagged, also pull requests, discussions, etc.
It would! I've been meaning to for a while now, will get to it soon
0.10.0
Released 🚀Changelog
* Support SteamOS 3.7 * Ensure the correct repo is used for the xone driver
Let me know if there's any issues but worked fine on my Deck after updating to 3.7
Thanks for updating this! After scratching my head for a while about why this wasn't working for me (I was getting "Failed to load xone_dongle module"), I tried running it with the debug flag (--debug in the commandline or the debug desktop shortcut) and that worked perfectly - not sure why there was a difference... thanks anyway 👍
Thanks for updating this! After scratching my head for a while about why this wasn't working for me (I was getting "Failed to load xone_dongle module"), I tried running it with the debug flag (--debug in the commandline or the debug desktop shortcut) and that worked perfectly - not sure why there was a difference... thanks anyway 👍
No problem! Debug will force a reinstall, not sure what happened there but at least that fixed it.
@mongrelion, moved to a repo. PR's welcome. Will close comments here in the next couple of days probably.
@SavageCore awesome. Good job!
That's how I solved
And then ran the installer script as usual
Thanks for the support!