Full context:
ValveSoftware/SteamOS#1445 (comment)
For me there is an issue where when you wake or boot your Steam Deck and start something like a Moonlight stream, more often than not within around 15 minutes the stream will start to lag to the point where the stream is unrecoverable and the stream is stopped.
While this issue is happening, a single off-channel scan can stop it and continue the stream as normal. So I have created a script that has a check that detects if a ping times out without any TX failures over the last second or so.
If this check picks up something, an off-channel scan will be ran and the issue will stop after around 1 or 2 seconds.
This is advantageous as it is quicker than manually going the Internet settings i.e. it is a set and forget solution and it is also a mitigation that doesn't require you to have to stop the stream such as toggling your Wi-Fi.
To be clear, this script will not help in any way with stutter or general latency. This is targeting a very specific issue that results in the stream stopping completely.
-
Switch to Desktop Mode on your Steam Deck
-
Open up Konsole and set a password to allow the use of the
sudocommand:
passwd-
Ideally get the WiFi Locker plugin from https://decky.xyz/ as without it you can get stutter every 5 minutes or so from the Steam Deck scanning for access points in the background.
-
Ensure in the Developer settings that
Force WPA Supplicant WiFi Backendis disabled (it is disabled by default so only need to do this if you have manually changed it previously). -
I don't know if this actually matters yet but in the Developer settings I have
Enable WiFi Power Managementoff andReload WiFi driver on sleepon.
- Download the file and make it executable:
chmod +x wifi-issue-mitigation.sh- Create the systemd service file:
sudo nano /etc/systemd/system/wifi-issue-mitigation.service- Add the following content to the service file:
[Unit]
Description=Wi-Fi issue mitigation service
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
ExecStart=/home/deck/wifi-issue-mitigation.sh
Restart=always
RestartSec=5
User=root
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target- Enable and start the service:
sudo systemctl enable --now wifi-issue-mitigation.service- To stop the service and remove it if you don't want it to run any more:
sudo systemctl disable --now wifi-issue-mitigation.serviceBy default a ping is ran every 0.5 seconds. While I don't think there is a measurable performance impact with this if you feel this is too aggressive then you can easily change it to your liking by editing the script variable:
PING_CHECK_INTERVAL- How often ping checks run (default: 500000000 nanoseconds = 0.5 seconds)