streetpea / chiaki4deck

Fork of Chiaki (Open Source Playstation Remote Play) with Enhancements for Steam Deck and Documentation around how to use
https://streetpea.github.io/chiaki4deck/
GNU Affero General Public License v3.0
913 stars 56 forks source link

Chiaki4deck and OG chiaki constantly disconnects/freezes after 20 mins or so #130

Open Traillaitor opened 6 months ago

Traillaitor commented 6 months ago

Hello!

I have the new Steam Deck OLED and installed Chiaki (tried both versions) and it runs absolutely fine, until it the screen freezes up entirely after about 20-30 mins of gameplay. Still able to control the console for about another 30 seconds-1 minute using the deck before the controller also disconnects.

I’ve tried fiddling around with pretty much all the setting but no luck. It’s the only issue I’ve encountered with chiaki really, otherwise the performance is fine. Any suggestions/ideas? Also please feel free to move this thread elsewhere if there’s other related issues.

Thanks in advance!

streetpea commented 6 months ago

This seems like a dup of #39. Posting a log would help determine that though. In that case basically packets are getting dropped between the PS4/5 and chiaki

CaptainYan2 commented 6 months ago

I have the similar issue with Steam deck OLED. I am thinking it is related to the wireless driver somehow. Currently it would mess up with 160Mhz 5Ghz hotspot. If you enable 160 MHz, the steam deck oled would no longer search on any other hotspots after a while. I can imagine the driver issue could cause other potential issues.

iTsMute commented 5 months ago

This seems like a dup of #39. Posting a log would help determine that though. In that case basically packets are getting dropped between the PS4/5 and chiaki

So I've been running into this same issue. I think it has to do with the "HDR". I say this because when I change it off of HDR to just H265 1080 ps5 I do not run into this issue anymore. If I use the HDR option I run into the issue everytime within 20 minutes. Everything else I have kept the same settings wise. I have also turned my wifi 6 off and tested with wifi 5 before this and that did not fix it aswell as disabling "wifi power managment" in dev mode on the deck.

Hopefully this can get figured out but it's not a huge loss. Still works and looks great without HDR.

One other thing I'd like to note is the total system power is oddly high on HDR vs non hdr even when the brightness setting is set to the same low brightness. 7-8.4w on HDR vs 5.7w-6.2w non HDR. It would make sense if I had the brightness on max with HDR but I don't so it doesn't make much sense why the extra power is being drawn.

plexecutor commented 5 months ago

This seems like a dup of #39. Posting a log would help determine that though. In that case basically packets are getting dropped between the PS4/5 and chiaki

So I've been running into this same issue. I think it has to do with the "HDR". I say this because when I change it off of HDR to just H265 1080 ps5 I do not run into this issue anymore. If I use the HDR option I run into the issue everytime within 20 minutes. Everything else I have kept the same settings wise. I have also turned my wifi 6 off and tested with wifi 5 before this and that did not fix it aswell as disabling "wifi power managment" in dev mode on the deck.

Hopefully this can get figured out but it's not a huge loss. Still works and looks great without HDR.

One other thing I'd like to note is the total system power is oddly high on HDR vs non hdr even when the brightness setting is set to the same low brightness. 7-8.4w on HDR vs 5.7w-6.2w non HDR. It would make sense if I had the brightness on max with HDR but I don't so it doesn't make much sense why the extra power is being drawn.

Turning off hdr made no difference for me. Still freezes after several minutes of play for me. As for why HDR uses more power, even when the brightness slider is lower, is the highlights are still being shown brighter than they would be in SDR. The screen just needs more power to run in HDR mode.

iTsMute commented 5 months ago

This seems like a dup of #39. Posting a log would help determine that though. In that case basically packets are getting dropped between the PS4/5 and chiaki

So I've been running into this same issue. I think it has to do with the "HDR". I say this because when I change it off of HDR to just H265 1080 ps5 I do not run into this issue anymore. If I use the HDR option I run into the issue everytime within 20 minutes. Everything else I have kept the same settings wise. I have also turned my wifi 6 off and tested with wifi 5 before this and that did not fix it aswell as disabling "wifi power managment" in dev mode on the deck. Hopefully this can get figured out but it's not a huge loss. Still works and looks great without HDR. One other thing I'd like to note is the total system power is oddly high on HDR vs non hdr even when the brightness setting is set to the same low brightness. 7-8.4w on HDR vs 5.7w-6.2w non HDR. It would make sense if I had the brightness on max with HDR but I don't so it doesn't make much sense why the extra power is being drawn.

Turning off hdr made no difference for me. Still freezes after several minutes of play for me. As for why HDR uses more power, even when the brightness slider is lower, is the highlights are still being shown brighter than they would be in SDR. The screen just needs more power to run in HDR mode.

Hmmm.... thats interesting. I just let it run for a little Over 2 hours with no issues for the first time since this HDR update. Do you know what channel you are using for your router by Any chance? I wanna figure this out aswell because I would like to use the HDR mode. I'm wondering if I disable the 160mhz channel if that would help.

Edit: 160mhz disabled. HDR still has the issue. No HDR smooth as butter 😕

plexecutor commented 5 months ago

This seems like a dup of #39. Posting a log would help determine that though. In that case basically packets are getting dropped between the PS4/5 and chiaki

So I've been running into this same issue. I think it has to do with the "HDR". I say this because when I change it off of HDR to just H265 1080 ps5 I do not run into this issue anymore. If I use the HDR option I run into the issue everytime within 20 minutes. Everything else I have kept the same settings wise. I have also turned my wifi 6 off and tested with wifi 5 before this and that did not fix it aswell as disabling "wifi power managment" in dev mode on the deck. Hopefully this can get figured out but it's not a huge loss. Still works and looks great without HDR. One other thing I'd like to note is the total system power is oddly high on HDR vs non hdr even when the brightness setting is set to the same low brightness. 7-8.4w on HDR vs 5.7w-6.2w non HDR. It would make sense if I had the brightness on max with HDR but I don't so it doesn't make much sense why the extra power is being drawn.

Turning off hdr made no difference for me. Still freezes after several minutes of play for me. As for why HDR uses more power, even when the brightness slider is lower, is the highlights are still being shown brighter than they would be in SDR. The screen just needs more power to run in HDR mode.

Hmmm.... thats interesting. I just let it run for a little Over 2 hours with no issues for the first time since this HDR update. Do you know what channel you are using for your router by Any chance? I wanna figure this out aswell because I would like to use the HDR mode. I'm wondering if I disable the 160mhz channel if that would help.

Edit: 160mhz disabled. HDR still has the issue. No HDR smooth as butter 😕

I have a Wifi 5 router running in access point mode. 5ghz and 2.4ghz are consolidated to a single SSD although I have tested separating 5ghz out into its own SSID which did not help. I have a usb-c to ethernet adapter I tested on the OLED deck and I was able to stream indefinitely with no issues so I think we can safely narrow it down to a wifi issue on the new OLED model decks. My suspicion is that this is a Steam OS issue more so than a Chiaki issue.

iTsMute commented 5 months ago

This seems like a dup of #39. Posting a log would help determine that though. In that case basically packets are getting dropped between the PS4/5 and chiaki

So I've been running into this same issue. I think it has to do with the "HDR". I say this because when I change it off of HDR to just H265 1080 ps5 I do not run into this issue anymore. If I use the HDR option I run into the issue everytime within 20 minutes. Everything else I have kept the same settings wise. I have also turned my wifi 6 off and tested with wifi 5 before this and that did not fix it aswell as disabling "wifi power managment" in dev mode on the deck. Hopefully this can get figured out but it's not a huge loss. Still works and looks great without HDR. One other thing I'd like to note is the total system power is oddly high on HDR vs non hdr even when the brightness setting is set to the same low brightness. 7-8.4w on HDR vs 5.7w-6.2w non HDR. It would make sense if I had the brightness on max with HDR but I don't so it doesn't make much sense why the extra power is being drawn.

Turning off hdr made no difference for me. Still freezes after several minutes of play for me. As for why HDR uses more power, even when the brightness slider is lower, is the highlights are still being shown brighter than they would be in SDR. The screen just needs more power to run in HDR mode.

Hmmm.... thats interesting. I just let it run for a little Over 2 hours with no issues for the first time since this HDR update. Do you know what channel you are using for your router by Any chance? I wanna figure this out aswell because I would like to use the HDR mode. I'm wondering if I disable the 160mhz channel if that would help. Edit: 160mhz disabled. HDR still has the issue. No HDR smooth as butter 😕

I have a Wifi 5 router running in access point mode. 5ghz and 2.4ghz are consolidated to a single SSD although I have tested separating 5ghz out into its own SSID which did not help. I have a usb-c to ethernet adapter I tested on the OLED deck and I was able to stream indefinitely with no issues so I think we can safely narrow it down to a wifi issue on the new OLED model decks. My suspicion is that this is a Steam OS issue more so than a Chiaki issue.

I suspected it being a wifi driver/steamos issue aswell but that doesn't explain why it works fine on the same network settings for me with non hdr vs hdr on.

I also do not run into this issue with my rog ally which doesn't have the hdr option.

It does seem like the wifi chip is going into a low power state and dropping packets causing inconsistencies but for me now that I've narrowed my issue down to only happening with HDR on I'm stumped.

I do not use any AP in my home just one router. Are you able to connect to your main router to test if non hdr works for you on there?

My Settings.

1080p H265, vaapi, Fast (no advanced rendering features), bitrate 35k, Audio bitrate (default)

Separated bands using 5Ghz but it also works on my 2.4Ghz on wifi 5 and 6 tested.

plexecutor commented 5 months ago

I do not use ant AP in my home just one router. Are you able to connect to your main router to test if non hdr works for you on there?

My network setup is probably a bit unique by normal standards but I have fiber coming in via ONT which is routed to an enterprise grade Ubiquite Edgemax router. From there I have a 24 port switch that feeds ethernet to my entire home. I have repurposed an older Wifi 5 (802.11AC) TP-Link Archer C7 running in access point mode for my wireless needs though I am planning on upgrading this very soon. My PS5 is hardwired in. No variation of settings in Chiaki will allow me to stream consistently via wifi. The only way I can get a solid and reliable stream is by hardwiring my deck via an usb-c to ethernet dongle.

iTsMute commented 5 months ago

I do not use ant AP in my home just one router. Are you able to connect to your main router to test if non hdr works for you on there?

My network setup is probably a bit unique by normal standards but I have fiber coming in via ONT which is routed to an enterprise grade Ubiquite Edgemax router. From there I have a 24 port switch that feeds ethernet to my entire home. I have repurposed an older Wifi 5 (802.11AC) TP-Link Archer C7 running in access point mode for my wireless needs though I am planning on upgrading this very soon. My PS5 is hardwired in. No variation of settings in Chiaki will allow me to stream consistently via wifi. The only way I can get a solid and reliable stream is by hardwiring my deck via an usb-c to ethernet dongle.

Ahh i see. This is where I'm at with this from my testing. HDR seems like the issue. From your testing it does seem like the decks wifi chip is the issue. However to rule out your own unique internet setup being the issue it may be worth it to try testing it out on a friend's network to rule out your own network being the issue.

I see it is not just us having this issue and it could very well be a mix of wifi chip and coding for this new hdr feature that is causing these packet loss.

Another key takeaway I tested last night is my mobile Hotspot. With hdr on I can't establish a connection with hdr off I can. This makes me think it's a coding issue that streatpea is going to have to figure out.

hvmzx commented 5 months ago

I saw someone say that he has the LCD and OLED deck, with the same settings/network... and only OLED has used issues.

Also I tried the .Appimage version and it doesn't freeze (however I do get some white flashes)

It's definitely an OLED only issue, now is it only a valve issue or both valve and chiaki, I wonder.

Down to run some tests if needed

Tubo commented 5 months ago

I mainly use Chiaki4deck and am also experiencing this.

It seems the folks that streams using Moonlight are also experiencing similar issues, see https://github.com/ValveSoftware/SteamOS/issues/1256.

iTsMute commented 5 months ago

I mainly use Chiaki4deck and am also experiencing this.

It seems the folks that streams using Moonlight are also experiencing similar issues, see ValveSoftware/SteamOS#1256.

whats your bitrate set at for video

plexecutor commented 5 months ago

I joined the preview branch for Steam OS today and also turned on developer mode on my OLED deck to turn off WiFi power saving mode. Since doing these two changes I have not had any issues with chiaki4deck. I just got done playing Returnal for 2 hours without a single stutter or lag. This was basically impossible for me when I was on stable branch without the WiFi power saving disabled. Anyone having issues still might want to give this a try.

Tubo commented 5 months ago

I mainly use Chiaki4deck and am also experiencing this. It seems the folks that streams using Moonlight are also experiencing similar issues, see ValveSoftware/SteamOS#1256.

whats your bitrate set at for video

I've tried enumerations of settings including video and audio bitrate and HDR, as well as Wifi Power Saving. Nothing helped so far. I am on stable release so will try preview branch next time.

hvmzx commented 5 months ago

I joined the preview branch for Steam OS today and also turned on developer mode on my OLED deck to turn off WiFi power saving mode. Since doing these two changes I have not had any issues with chiaki4deck. I just got done playing Returnal for 2 hours without a single stutter or lag. This was basically impossible for me when I was on stable branch without the WiFi power saving disabled. Anyone having issues still might want to give this a try.

Will try this when i get home from work. I hope it fixes it.

It seems SteamOS 3.5.12 Preview has this fix : "Fixed a WiFi crash occurring where certain bands would cause the driver to attempt to set an incorrect spatial stream count"

https://store.steampowered.com/news/app/1675200?emclan=103582791470414830&emgid=3869219147448985333

While 3.5.13 Preview has this one : "Fixed a case where wifi would fail to connect in certain conditions"

https://store.steampowered.com/news/app/1675200?emclan=103582791470414830&emgid=3860212413467404192

streetpea commented 5 months ago

If you're still having issues you can also try the appimage build from the latest release. It now works with vaapi.

deedeeped commented 5 months ago

I joined the preview branch for Steam OS today and also turned on developer mode on my OLED deck to turn off WiFi power saving mode. Since doing these two changes I have not had any issues with chiaki4deck. I just got done playing Returnal for 2 hours without a single stutter or lag. This was basically impossible for me when I was on stable branch without the WiFi power saving disabled. Anyone having issues still might want to give this a try.

Will try this when i get home from work. I hope it fixes it.

It seems SteamOS 3.5.12 Preview has this fix : "Fixed a WiFi crash occurring where certain bands would cause the driver to attempt to set an incorrect spatial stream count"

https://store.steampowered.com/news/app/1675200?emclan=103582791470414830&emgid=3869219147448985333

While 3.5.13 Preview has this one : "Fixed a case where wifi would fail to connect in certain conditions"

https://store.steampowered.com/news/app/1675200?emclan=103582791470414830&emgid=3860212413467404192

Did it work for you? I’ve made these changes (preview channel and WiFi power management off) and it’s okay so far, but usually my connection starts “degrading” after about a day. Time will tell. I’m on chiaki4deck 1.6.1 now.

hvmzx commented 5 months ago

@deedeeped It's alright, I tried the appImage and it doesn't have any difference with the flatpak. So now I run the flatpak 1.6.1 with both devices on 5GHz and the deck either on stable or preview, and it has stutters and stuff. I will wait more, but it seems people are having good performance so maybe it's my router ? https://www.youtube.com/watch?v=66oOiYNPAlM&lc=UgyeVGZgnxl6IIyDRAp4AaABAg

Traillaitor commented 5 months ago

@deedeeped It's alright, I tried the appImage and it doesn't have any difference with the flatpak. So now I run the flatpak 1.6.1 with both devices on 5GHz and the deck either on stable or preview, and it has stutters and stuff. I will wait more, but it seems people are having good performance so maybe it's my router ? https://www.youtube.com/watch?v=66oOiYNPAlM&lc=UgyeVGZgnxl6IIyDRAp4AaABAg

Not just you! I have tried all of the steps discussed in this thread and nothing seems to matter. Game freezes and cuts out after 20 mins or so every time.

darrenhaken commented 3 months ago

How's everyone finding the experience now? I've done everything but try the preview branch to solve this

darrenhaken commented 3 months ago

If you're still having issues you can also try the appimage build from the latest release. It now works with vaapi.

Why would appimage make a difference @streetpea ?

streetpea commented 3 months ago

Can someone who is still getting the complete disconnect post a log with verbose logging on using the latest version of Chiaki4deck? (there is a bit more logging now so it's possible we can see something now)

darrenhaken commented 3 months ago

Can someone who is still getting the complete disconnect post a log with verbose logging on using the latest version of Chiaki4deck? (there is a bit more logging now so it's possible we can see something now)

I can send a log later today with the latest version of Chiaki4deck. Do I grab the log as soon as the problem presents itself?

streetpea commented 3 months ago

@darrenhaken yes

darrenhaken commented 3 months ago

@streetpea here is a log from a network failure I just had. If this doesn't have the right logs let me know and I'll try again. I was using my Steam Deck in a different location than when it normally happens (right in front of my route).

There's log messages around congestion. Chiaki Session Mar 28 log.log

streetpea commented 3 months ago

@darrenhaken did this exhibit the complete freezing you were experiencing? From the newer logging I can see what's happening in this session is that we are getting network is unreachable from the underlying Linux network calls (that Chiaki4deck is operating on top of)... this implies for the logs you posted the error is coming from a network connectivity loss on the Steam Deck itself (or more accurately between the Steam deck and the PlayStation) (I.e., not Chiaki4deck itself)

darrenhaken commented 3 months ago

@streetpea - let me test it again during the conditions I normally play and I’ll send an additional log; then we can compare.

fyi, having done some digging there’s a hypothesis that the steam deck oled has driver issues with its newer WiFi chip. That could be the cause but I’m not sure if Chiaki4deck can have any influence in the issue. Just sharing for context.

Chiaki4deck used to work flawlessly on my steam deck lcd model, hence the above hypothesis too.

streetpea commented 3 months ago

@darrenhaken the logs you posted have 3 periods where there is a complete connection loss between the PlayStation and Steam Deck which causes issues with the stream for a while in all 3 instances as well as intermittent drops. There definitely seems to be an issue with network connectivity in this case and may be related to #230. Having said that, the logs look different than the complete lock up logs posted by other users earlier as those show 0 frames getting received or lost after a while and no recovery unlike this which just has spurts of no connection and then recovery before it happens again. I'll ask for the logs from a user in #230 and see how they compare to your recent logs.

darrenhaken commented 3 months ago

@streetpea sounds good. When I play next (within 24 hours) under my normal conditions I’ll send another log.

I must admit, some connectivity did come through in this session but I thought it might have been sufficient. Normally I lose so much connection I can’t even pause the game on the ps5.

I’ll read #230 as well.

Thanks for digging into this, I can’t express how grateful I am.

darrenhaken commented 3 months ago

@streetpea I attached another log for you. Does this one help? chiaki_session_2024-03-29_19-43-25-999999.log

The entire experience froze. If I leave it long enough it eventually comes back but I cannot get a stable connection until I disconnect wifi on the steam deck and reconnect it.

I'm running on a 5ghz dedicated line, my PS5 is hard wired.

Sweetcheezus commented 3 months ago

I wish this was fixed. Maybe one day.

Odizinne commented 1 month ago

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

Could you guys please try this?

It fixed my remote play issue, but i would need some more testing.