ValveSoftware / SteamOS

SteamOS community tracker
1.48k stars 69 forks source link

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

Open sarantula opened 1 month ago

sarantula commented 1 month ago

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.

Odizinne commented 1 month ago

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.

manuelafm commented 2 weeks ago

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:

philhzss commented 2 weeks ago

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 commented 1 week ago

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

Odizinne commented 1 week ago

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

philhzss commented 1 week ago

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??

Odizinne commented 1 week ago

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

philhzss commented 1 week ago

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!

Odizinne commented 1 week ago

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.

philhzss commented 1 week ago

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

Odizinne commented 1 week ago

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.

philhzss commented 1 week ago

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 commented 6 days ago

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.

Odizinne commented 6 days ago

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

Logarythms commented 4 days ago

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!

philhzss commented 4 days ago

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

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!

Odizinne commented 2 days ago

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