Game streaming (Moonlight / Greenlight) + Network stutter due to network scans

Hoping to start a converstation on ways that could help reduce game stutter at X min intervals which I have a strong feeling its due to network scans that happen. I can replicate the stutter by switching to desktop mode, start a moonlight stream and while your streaming open network settings so when its scanning for networks it will result with the same network frame drops that in turn will cause the stutter for 10 - 15 secs. I wonder if its possible to disable scans while streaming etc? At first I thought it was my network issue but after switching off location services on apple products and also testing it with the abxylute streaming device I seem to only have this issue with the ally (bazzite). I cant confirm if this is a issue when running windows... Device: Rog Ally
10 Replies
Techz
TechzOP7mo ago
GitHub
Heavy periodic stutters when using Linux but not on windows · Issu...
Describe the bug I am using a surface pro 7+ with dualboot Windows/linux to stream games from a gaming rig running GFE on windows 11. I have Wifi 6 APs and tested my connection with iperf3 (I achie...
Techz
TechzOP7mo ago
Looks like setting BSSID to a particular AP fixes the issue, argh not sure if its a firmware issue or not since not needing to do this with other devices
TecN01R
TecN01R6mo ago
I have this issue on my Legion Go and have been searching for a fix. Switching from my 5GHz network to 2.4GHz alleviates the issue but there are the usual downsides to using 2.4GHz. Setting the BSSID didn’t work for me
jajabro1
jajabro13mo ago
Confirmed this works, though I had to make sure I copied the script right and I did an extra step of changing the kdewallet password to nothing so that it didn't lock up asking for it via kdewalletmanager
jajabro1
jajabro13mo ago
GitHub
Heavy periodic stutters when using Linux but not on windows · Issu...
Describe the bug I am using a surface pro 7+ with dualboot Windows/linux to stream games from a gaming rig running GFE on windows 11. I have Wifi 6 APs and tested my connection with iperf3 (I achie...
jajabro1
jajabro13mo ago
see below though for a copy paste
#!/bin/bash
# Get the connected wifi Card Details and connected SSID/ BSSID
WIFI_CARD=$(nmcli dev status | grep wifi | grep -v disconnected | head -n1 | cut -d " " -f1)
LINK_INFO=$(iw dev $WIFI_CARD link)
BSSID=$(echo $LINK_INFO | grep -o -P '(?<=Connected to ).*(?= \(on)' | tr '[:lower:]' '[:upper:]')
SSID=$(echo $LINK_INFO | grep -o -P '(?<=SSID: ).*(?= freq)')

# Lock Wifi to the BSSID to stop background scanning.
nmcli con mod $SSID 802-11-wireless.bssid $BSSID
nmcli dev dis $WIFI_CARD
nmcli dev con $WIFI_CARD
nmcli con mod $SSID 802-11-wireless.bssid ''
#!/bin/bash
# Get the connected wifi Card Details and connected SSID/ BSSID
WIFI_CARD=$(nmcli dev status | grep wifi | grep -v disconnected | head -n1 | cut -d " " -f1)
LINK_INFO=$(iw dev $WIFI_CARD link)
BSSID=$(echo $LINK_INFO | grep -o -P '(?<=Connected to ).*(?= \(on)' | tr '[:lower:]' '[:upper:]')
SSID=$(echo $LINK_INFO | grep -o -P '(?<=SSID: ).*(?= freq)')

# Lock Wifi to the BSSID to stop background scanning.
nmcli con mod $SSID 802-11-wireless.bssid $BSSID
nmcli dev dis $WIFI_CARD
nmcli dev con $WIFI_CARD
nmcli con mod $SSID 802-11-wireless.bssid ''
I also had to use Kdewalletmanger to change the password to the default kdewallet to nothing, this would cause it to not work from inside Steam Big Picture mode I also created a different script that is slightly different that I run after I'm done streaming and maybe moving from where I am (since I have multiple Meshed APs), that will disable the BSSID lock. Remember, that when locking BSSID you aren't just disabling the Wi-Fi scanning that is causing the problem (we don't know why yet) but you are locking to a specific Wifi Access Point and frequency so moving from where you are too far from the AP you locked to can cause issues. I tend to stream from the same spot so its not a big issue for me. This is the script that I slightly edited from the above to clear the BSSID lock to turn default wifi behavior back on
#!/bin/bash
# Get the connected wifi Card Details and connected SSID/ BSSID
WIFI_CARD=$(nmcli dev status | grep wifi | grep -v disconnected | head -n1 | cut -d " " -f1)
LINK_INFO=$(iw dev $WIFI_CARD link)
BSSID=$(echo $LINK_INFO | grep -o -P '(?<=Connected to ).*(?= \(on)' | tr '[:lower:]' '[:upper:]')
SSID=$(echo $LINK_INFO | grep -o -P '(?<=SSID: ).*(?= freq)')

# Lock Wifi to the BSSID to stop background scanning.
nmcli con mod $SSID 802-11-wireless.bssid ''
nmcli dev dis $WIFI_CARD
nmcli dev con $WIFI_CARD
#!/bin/bash
# Get the connected wifi Card Details and connected SSID/ BSSID
WIFI_CARD=$(nmcli dev status | grep wifi | grep -v disconnected | head -n1 | cut -d " " -f1)
LINK_INFO=$(iw dev $WIFI_CARD link)
BSSID=$(echo $LINK_INFO | grep -o -P '(?<=Connected to ).*(?= \(on)' | tr '[:lower:]' '[:upper:]')
SSID=$(echo $LINK_INFO | grep -o -P '(?<=SSID: ).*(?= freq)')

# Lock Wifi to the BSSID to stop background scanning.
nmcli con mod $SSID 802-11-wireless.bssid ''
nmcli dev dis $WIFI_CARD
nmcli dev con $WIFI_CARD
With the locking script, I was I was able to stream from GeForce NOW for like 4 hours yesterday without ANY stuttering, where as before it was every 5-10 minutes for about 5-15 seconds I put both those scripts and a read me with info on what I did to get this to work as well as tips to get it to work in Steam Big Picture mode.
jajabro1
jajabro13mo ago
GitHub
GitHub - jajabro1/Ally-Bazzite-Helper-Scripts: Repo of scripts I us...
Repo of scripts I use in Bazzite for Asus ROG Ally that help make my life easier. Primarily to fix streaming stuttering - jajabro1/Ally-Bazzite-Helper-Scripts
Techz
TechzOP3mo ago
Thanks for this I think it works. Ill do some more testing 🙂
MrThePlague
MrThePlague2w ago
Appreciate this thread for the script, and this is a good workaround -- but is there a fix? Would a change have to be made in upstream NetworkManager?
nivve
nivve2w ago
Jep, actually tried this (edit: to be specific, https://github.com/moonlight-stream/moonlight-qt/issues/752#issuecomment-2484026724) on my deck and works like a charm. Simply added it to a shell script and add it as a non-steam game. The locking seems to not be saved on shutdown, so I just reboot/shutdown the deck once done streaming. I also have this issue on my surface, so it does not seem to be in any way related to hardware or even deck-iso variants. Device: Steam Deck LCD, bazzite-deck-gnome image.
GitHub
Heavy periodic stutters when using Linux but not on windows · Issu...
Describe the bug I am using a surface pro 7+ with dualboot Windows/linux to stream games from a gaming rig running GFE on windows 11. I have Wifi 6 APs and tested my connection with iperf3 (I achie...
Want results from more Discord servers?
Add your server