legion go moonlight stutter caused by audio buffer overflow

I’m no sure this is the correct place to ask this question but I am currently stumped and not able to determine the source of the issue. Hey all, a while back I had been using moonlight to play 2077 with no issues. However as of late I have noticed that I get crazy stuttering every so often when streaming using moonlight. I’m not sure what has changed. I ended up doing a journalctl -f to see what was happening. I noticed that when the stream stutters I am getting 17:51:34 fedora dolphin[16821]: 00:27:53 - SDL Info (0): Audio packet queue overflow 4) 17:51:34 fedora dolphin[16821]: 00:27:53 - SDL Info (0): Network dropped audio data (expected 41117, but received 4114 17:51:35 fedora dolphin [16821]: 00:27:54 - SDL Info (0): Audio packet queue overflow 17:51:35 fedora dolphin[16821]: 00:27:54 - 7) SDL Info (0): Network dropped audio data (expected 41169, but received 4119 Thinking it was bazzite or some update to moonlight I have rebased to an older version of bazzite and also switched to 4.3.1 release of moonlight to no avail. Any ideas what I could troubleshoot next?
13 Replies
Cube
Cube6mo ago
I have also reached out to moonlight to see if it was something on their end. I will say in windows on the same device, I dont get the same results. So of course, that atleast rules out hardware? Is there any driver I can install for audio? I ended up installing gnome over kde with a fresh install. And I am not using syncthing at the moment. I still need syncthing, though maybe it was causing this? Intrestingly I have re-installed all my software and the only diff between now and before seems to be using gnome over kde? Do you have any idea? Ugh nvm its back. It started happening after using nreal air's which changed the audio adapter.
Zurce
Zurce6mo ago
I am suffering the same issue on the rog ally , it seems to happen in both GeForce now and moonlight It's always spaced by 5 minutes , and using nethogs seem that there's a Network Manager task running at the same time the stutter happens
IshimaruKenta
IshimaruKenta6mo ago
Yep, having this issue as well. Happens about once every 3-4 minutes for about 20 seconds. Very annoying.
Cube
Cube6mo ago
I think it ended up being an incompatability between my legion go's wifi card and the router's I was using. Notablely my routers are 6e 180hz and so is the lego. Switching over to my old router specificly for my legion go I dont encounter this anymore.
jajabro1
jajabro13w ago
In another thread here it seems this is happening by NetworkManager scanning tasks. I will test on my Ally today using a script that locks the BSSID. If it works and I only have to run that script before using GeForce now or Moonlight I can live with it. But seeing as how it seems to primarily happen on ROG Ally devices id hazard it's a firmware problem with the Wi-Fi card.
JakeZomad#5114020
Did locking the BSSID work? Having the same issue on my Ally.
jajabro1
jajabro12w ago
Yep! I have a script setup that I run before I launch a game. (I also added it as a non-steam game so I can run it from within steam without going to the desktop first I did have to change the kdewallet password to nothing, otherwise it would ask for the wallet to be unlocked and then it wouldn't work
JakeZomad#5114020
Cool. Do you mind sharing your script?
jajabro1
jajabro12w ago
Yeah! here you go I got it from here: https://github.com/moonlight-stream/moonlight-qt/issues/752
#!/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. But I had to make sure to change that password on the KDE wallet because before in Steam Big Picture it would run and then not make the change. NOTE: If you add this as a Non-Steam Game, there won't be any obvious output. You'll get a black screen like its launching a game and then it will take you back to the launch screen. So you likely won't see the wifi disconnect and reconnect. If you test this in Desktop Mode, you will see the Wifi disconnect and reconnect and even get notifications about it. I also tested on Moonlight streaming from my in home Linux PC and it worked about as well, just didn't go quiet as long with it. I streamed for about 45 minutes without stutter. The difficulty here is that there is not easy way to type this all in to the Ally without a dock or keyboard. I use an Android app that lets me use my phone as a bluetooth mouse and keyboard. I will put these up on Github as some point for my personal memory, but I'll be happy to share it as well later if it's easier to just git clone them in and give chmod +x permissions to the script.
JakeZomad#5114020
Thank you for taking the time to give me such thorough write up! I’ll give it a try let you know how it goes.
jajabro1
jajabro12w ago
I've put them up in GitHub, hopefully anyone coming to find a solition will get them. I've included a Read Me inside o the Streaming_Stutter_Fix folder. Give a star if it's useful to you, or don't, I'm not your dad.
jajabro1
jajabro12w 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
JakeZomad#5114020
@jajabro1 , that worked like magic. Thank you. Gave it a star.
Want results from more Discord servers?
Add your server