Skip to content

liamharper2453/steam-deck-wifi-issue-mitigation-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 

Repository files navigation

Steam Deck WiFi issue mitigation script

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.

Prerequisites

  1. Switch to Desktop Mode on your Steam Deck

  2. Open up Konsole and set a password to allow the use of the sudo command:

   passwd
  1. 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.

  2. Ensure in the Developer settings that Force WPA Supplicant WiFi Backend is disabled (it is disabled by default so only need to do this if you have manually changed it previously).

  3. I don't know if this actually matters yet but in the Developer settings I have Enable WiFi Power Management off and Reload WiFi driver on sleep on.

Instructions

  1. Download the file and make it executable:
   chmod +x wifi-issue-mitigation.sh
  1. Create the systemd service file:
   sudo nano /etc/systemd/system/wifi-issue-mitigation.service
  1. 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
  1. Enable and start the service:
   sudo systemctl enable --now wifi-issue-mitigation.service
  1. To stop the service and remove it if you don't want it to run any more:
   sudo systemctl disable --now wifi-issue-mitigation.service

Configuration

By 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)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages