SteamOS icon indicating copy to clipboard operation
SteamOS copied to clipboard

Deck OLED on wifi6 routers goes into low power mode when streaming (remote play, moonlight, etc), causing stutters and crashes.

Open sarantula opened this issue 11 months ago • 46 comments

I'm on latest stable of SteamOS, this issue has been present since day 1 with OLED.

Please describe your issue in as much detail as possible:

Remote play or streaming causes the deck to enter low power mode. This causes framerates to drop dramatically until the stream crashes. Only disconnecting from wifi and reconnecting or restarting the deck fixes the issue. Afterwards it's stable.

Steps for reproducing this issue:

  1. Stream game or remote play game
  2. Wait a minute or two, until stuttering occurs
  3. Client crashes
  4. Restart deck or disco/reco wifi to fix issue
  5. Problem starts again upon next session (waking from sleep or powering on)

This is a known issue that's been discussed on the moonlight discord, it's specifically a low power mode problem with the deck on wifi 6 routers.

I'm unfortunately unable to disable wifi6 on my ISP provided router so my only option is to experience stutters, restart, then resume my play session, every single time.

Maybe an option to disable low power modes entirely would be useful for us.

sarantula avatar Mar 25 '24 19:03 sarantula

I'm facing the exact same issue, but also appear with wifi 5.
2.4ghz and 5ghz same issue.

I bought a wifi 6 router thinking this could solve the issue but no luck.
I can confirm this has been present since OLED day 1.

Odizinne avatar Apr 10 '24 16:04 Odizinne

I don't have much confidence that this would solve the issue, but if you haven't yet, maybe you can try to edit /etc/NetworkManager/conf.d/wifi_backend.conf and use wpa_supplicant as back-end:

#wifi.backend=iwd
wifi.backend=wpa_supplicant

Side-effects of this:

  • reconnecting to WiFi when e.g. returning from sleep, will take 5+ seconds instead of 1-2
  • this will change the back-end, and the change survives across system upgrades. you'll have to edit back to use iwd again.

manuelafm avatar May 02 '24 11:05 manuelafm

I'm facing the exact same issue, but also appear with wifi 5. 2.4ghz and 5ghz same issue.

I bought a wifi 6 router thinking this could solve the issue but no luck. I can confirm this has been present since OLED day 1.

Yup, finding the same thing. I have created Wifi 5 only and Wifi 2.4 only networks on my Wifi 6 router, and it doesn't help?? And now even when idling, look at my ping:

image

Then I'll turn airplane mode on and off 3-4 times, and then tada ping is 100% perfectly normal.

philhzss avatar May 06 '24 16:05 philhzss

I noticed something interesting, although it has probably been noticed before. When I click on the Wifi menu in the taskbar (desktop mode), the stream becomes even laggier, but then when I close the menu everything is super smooth again?? Similar thing in game mode, during a stream if I open the left side menu (Steam buton), then simply scroll all the way down and up (passing on the Internet options page), after doing that the stream is better??!?

Here is the ping graph from remote play to show what happens scrolling past "Internet settings" in game mode:

image

philhzss avatar May 09 '24 15:05 philhzss

i might have found a fix.

I would need some testing from you please.

create /etc/NetworkManager/conf.d/wifi-powersave-off.conf

inside this file:

[connection]
wifi.powersave = 2

So far i have been able to do 2 remote play session without the usual issue, with sleep in between.

I had a 2 / 3 second stutter after 2 minute of stream each time, then flawless.

It would be nice to have some testing from other people.

Edit: Since this change i'm trying to "stress" my deck by using remote play a lot / putting it to sleep.

Could not reproduce the issue again. Hope it will work for you guys :)

Odizinne avatar May 13 '24 17:05 Odizinne

i might have found a fix.

I would need some testing from you please.

Thank you but sadly for me that doesn't seem to do anything? I'll keep testing just in case

Edit: Since this change i'm trying to "stress" my deck by using remote play a lot / putting it to sleep.

Could not reproduce the issue again. Hope it will work for you guys :)

Hadn't seen your edit. Are you streaming from PC to deck or deck to PC??

philhzss avatar May 13 '24 22:05 philhzss

PC Host Deck Client.

Be sure to restart NetworkManager / Restart your deck after changes.

Be sure to disable hardware decoding as this can introduce stutters (not network ones).

Odizinne avatar May 14 '24 05:05 Odizinne

PC Host Deck Client.

Be sure to restart NetworkManager / Restart your deck after changes.

Be sure to disable hardware decoding as this can introduce stutters (not network ones).

I did restart the Deck several times but I've not tried turning off hardware encoding for a long time. I thought hardware was better. I'll definitely try software encoding tomorrow and report back thank you!

philhzss avatar May 14 '24 06:05 philhzss

HW decoding is still not a good experience on my side (at least with remote play).

I also had to disable hw encoding, since with software decoding, remote play is artifacting when decoding from my AMD card.

Odizinne avatar May 14 '24 06:05 Odizinne

I checked, I mostly use Moonlight (Sunshine) and had it set to hardware decoding. I set it to force software decoding. I had remote play already set to software decoding and I occasionally used that to test just to confirm it wasn't something wrong with Moonlight.

Sadly that didn't change anything. However I'm starting to think my issue might be different than the one we're talking about here, si maybe I should stop commenting. I think it HAS improved in the sense that it doesn't disconnect me, however I'm still getting a lot of network jitter, skipped frames and audio popping etc.

Just wondering, for you did the jitter and stutters start immediately after beginning the stream or it took a while?? For me it's instant, I'll start the stream and it's already bad.

And yesterday for the first time I noticed stuttering from an LCD Deck too. I'm starting to think something is wrong with my network here, even though all my other devices aren't showing issues...

It's strange that I can use iperf3 between my Deck and PC and get 800mbps stable no problem. But a 15mbps stream will cutoff

philhzss avatar May 14 '24 16:05 philhzss

Definitely looks like a different issue.

Please check if you're not using a wifi network with 160mhz width.
I had to go down to 80mhz because of the deck.
Tried on 2 routers, same issue.
With 80mhz it is smooth as butter.

Odizinne avatar May 14 '24 16:05 Odizinne

Definitely looks like a different issue.

Please check if you're not using a wifi network with 160mhz width. I had to go down to 80mhz because of the deck. Tried on 2 routers, same issue. With 80mhz it is smooth as butter.

Thank you. I have 2 APs, for some reason the 2nd one (mesh connected) is in 160Mhz mode even though the main one is set to 80. My Deck is never connected to the 2nd one though, but I still turned off the 5GHz radio in it just to be sure.

Something is terribly wrong with my network though; I'm doing some wired tests and still getting frame drops. Deck and PC wired. Moolight getting jitter, and Steam remote play graph showing network latency peaks every time something moves on screen.

I'll keep investigating thanks for all your help but I think this has nothing to do with the Wifi 6 bug

philhzss avatar May 14 '24 17:05 philhzss

Edit: Since this change i'm trying to "stress" my deck by using remote play a lot / putting it to sleep.

Could not reproduce the issue again. Hope it will work for you guys :)

Minus the other unrelated issues I mentioned. I think you're on to something, I streamed several games for 1.5-2h total yesterday, and I didn't get a single instance of the low-power bug at any time.

philhzss avatar May 15 '24 15:05 philhzss

I also tried sunshine/moonlight today, it was perfect. Really happy we finally have a workaround for this, hopefully valve will address this.

Odizinne avatar May 15 '24 15:05 Odizinne

Replying to https://github.com/ValveSoftware/SteamOS/issues/1445#issuecomment-2108254949

I've been testing this for the past 2 days, using mostly GeforceNOW (and some chiaki4deck) streaming.

The sessions were all >30min and started after waking the Steam Deck from sleep, and so far I only experienced one connection drop (that might have been unrelated though).

So looks like this workaround might actually be working! I'll continue to keep an eye on it and update this post if something changes, but so far so good 😍

Kudos to @Odizinne for coming up with this!

Logarythms avatar May 17 '24 09:05 Logarythms

I also tried sunshine/moonlight today, it was perfect. Really happy we finally have a workaround for this, hopefully valve will address this.

I fixed my network issue previously mentioned, now it's working without jitter for most of the time, but every ~7-10 mins, I get 2-5 seconds of really bad stutter, then it goes back to normal. Do you think this is related?? It's way different than my old issue, I used to have constant jitters and stutters and now it's 100% smooth except for those random bursts of lag every 10 mins?

Edit: I

  • Restarted the streaming PC
  • Restarted the router
  • Restarted the Steam Deck and switched from Beta Steam, Stable OS to Beta Steam, Beta Steam OS
  • Switched the wifi back to iwd just in case, but kept the power-save fix by @Odizinne

And now I just played 1h without a single stutter. So I have no idea if it was just bad luck and the restarts fixed it, or if it was the "wifi supplicant" that was causing this for me, or perhaps this works best on beta SteamOS?? What channel are you on @Odizinne ??

Thanks!

philhzss avatar May 18 '24 02:05 philhzss

Currently i am on preview (Pre-release / beta steam).

Odizinne avatar May 19 '24 05:05 Odizinne

Reporting that the NetworkManager wifi-powersave-off.conf change has allowed me to stream with Moonlight without any stuttering issues.

absamue avatar Jun 21 '24 17:06 absamue

Replying to https://github.com/ValveSoftware/SteamOS/issues/1445#issuecomment-2108254949

I get an "access denied" error when trying to add this file to conf.d. Am I doing something wrong?

EDIT: Fixed by moving file via terminal. sudo cp /path/to/source/file /path/to/destination/folder

ScraggyMcRaggy avatar Jun 21 '24 20:06 ScraggyMcRaggy

Reporting that the NetworkManager wifi-powersave-off.conf change has allowed me to stream with Moonlight without any stuttering issues.

Worked here too!

jonginator avatar Jun 21 '24 23:06 jonginator

For those that are reporting that the conf file change made a difference. Did you have Wifi Power Saving disabled under Settings->Developer in game mode?

It is unexpected that the configuration file and the UI setting would produce a different result.

lostgoat avatar Jun 22 '24 00:06 lostgoat

Wifi power saving in settings has never done anything for me

Odizinne avatar Jun 22 '24 06:06 Odizinne

None of the config workaround suggestions helped for me, including the latest Steam OS preview/beta updates and wifi dev settings. Streaming on Moonlight always goes into low power mode after 5-20 mins of use.

Also I think the preview OS updates made it worse? It was basically requiring me to open the wifi menu every 5-10mins, instead of just once near the start of the session, so I reverted back to stable and removed all workarounds for now.

I really hope Valve is looking into fixing this, its the only real flaw the OLED Steamdeck has for me. Was never an issue on the LCD Steamdeck.

appledoc1 avatar Jun 23 '24 17:06 appledoc1

For those that are reporting that the conf file change made a difference. Did you have Wifi Power Saving disabled under Settings->Developer in game mode?

It is unexpected that the configuration file and the UI setting would produce a different result.

Hmm interesting, i’ve always disabled both (which did nothing for me, wifi always degraded until I toggled or triggered a wifi scan). I’ll see if it makes any difference when I leave wifi power management on in the UI while keeping the conf file.

update 1: UI power management was turned on, while I kept the conf file. iwconfig wlan0 showed power management off. Got the exact same behavior, wifi degraded after about 20min or so of remote playing via moonlight. So yeahh, conf files does nothing for me UI power management on or off.

HauieT avatar Jun 23 '24 17:06 HauieT

Doesn't fix the issue for me. I'm on 3.6.6 (preview) with both 'Wi-Fi power saving' and 'Force WPA Supplicant WiFi backend' enabled in Dev settings. Rebooted after adding the conf file. iwconfig wlan0 shows power management is off.

Sure hoped this would be a valid workaround, so thx. Seems for me it's getting back to local gaming on the Deck, though.

mehtmehtsen avatar Jun 25 '24 20:06 mehtmehtsen

Doesn't fix the issue for me. I'm on 3.6.6 (preview) with both 'Wi-Fi power saving' and 'Force WPA Supplicant WiFi backend' enabled in Dev settings. Rebooted after adding the conf file. iwconfig wlan0 shows power management is off.

Sure hoped this would be a valid workaround, so thx. Seems for me it's getting back to local gaming on the Deck, though.

I also played around with wpa supplicant and noticed that when I use iwd as backend, neither conf file or power management toggle will turn power management off in iwconfig wlan0. Is this the case for you too?

I managed to turn it off through a udev rule instead, but idk if it makes any difference. Will try it some more tomorrow.

Btw anyone knows of the power management affects 6ghz as well or is it only 5ghz?

HauieT avatar Jun 25 '24 21:06 HauieT

I also played around with wpa supplicant and noticed that when I use iwd as backend, neither conf file or power management toggle will turn power management off in iwconfig wlan0. Is this the case for you too?

Yes. As long as 'Force WPA Supplicant WiFi backend' is not activated, iwconfig wlan0 shows power management is on, regardless of the conf file and the power management option in dev settings.

That being said, the conf file doesn't seem to do anything different than disabling 'Enable Wifi Power Management' in the dev settings. Either way, iwconfig wlan0 reports power management is off.

mehtmehtsen avatar Jun 26 '24 07:06 mehtmehtsen

Reporting that the NetworkManager wifi-powersave-off.conf change has allowed me to stream with Moonlight without any stuttering issues.

Well I am back to report mixed results.

  • Yesterday I started a moonlight session, and about 15 minutes in I experienced the stuttering issue. Even dropping the bitrate down to 5bmps the stream was unstable to the point of completely unplayable.
  • I restarted the deck and bumped the streaming bitrate back up to 50mbps, and was able to play for over an hour without any hint of stuttering.
  • This morning I start another session, and again experience the stuttering about 15 minutes in.

So perhaps this is something related to sleeping the deck? The only change from stock I have made is creating /etc/NetworkManager/conf.d/wifi-powersave-off.conf

absamue avatar Jun 26 '24 14:06 absamue

I also played around with wpa supplicant and noticed that when I use iwd as backend, neither conf file or power management toggle will turn power management off in iwconfig wlan0. Is this the case for you too?

Yes. As long as 'Force WPA Supplicant WiFi backend' is not activated, iwconfig wlan0 shows power management is on, regardless of the conf file and the power management option in dev settings.

That being said, the conf file doesn't seem to do anything different than disabling 'Enable Wifi Power Management' in the dev settings. Either way, iwconfig wlan0 reports power management is off.

I also played around with wpa supplicant and noticed that when I use iwd as backend, neither conf file or power management toggle will turn power management off in iwconfig wlan0. Is this the case for you too?

Yes. As long as 'Force WPA Supplicant WiFi backend' is not activated, iwconfig wlan0 shows power management is on, regardless of the conf file and the power management option in dev settings.

That being said, the conf file doesn't seem to do anything different than disabling 'Enable Wifi Power Management' in the dev settings. Either way, iwconfig wlan0 reports power management is off.

Yeah, that’s why I don’t understand how some ppl gets a different result with the conf file. The file doesn’t even do anything unless wpa supplicant is on, and even when it’s on and power management is off, that’s exactly what the toggle does in dev mode, which did nothing for me and you.

Today I even set up a new router as an AP. I set it to 80mhz and set it to wifi 5 only (since some ppl reported problem with wifi 6). The only clients connected to the AP is my pc wired and steam deck on wifi. Still got the same result. I’ve reached out to valve support and hopefully @lostgoat can help inform us wth is going on 😅

HauieT avatar Jun 26 '24 21:06 HauieT

I would like to take back my comment that it works for me.

It doesn't.

I was just mindlessly/autopilot mode going into Steam menu and scrolling past WiFi and Bluetooth every time I booted Moonlight.

Caught myself doing it this morning, didn't do it, went to stream and lo and behold, the stuttering started again.

jonginator avatar Jun 26 '24 21:06 jonginator