Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PS5 Pro Support #404

Open
streetpea opened this issue Sep 10, 2024 · 31 comments
Open

PS5 Pro Support #404

streetpea opened this issue Sep 10, 2024 · 31 comments

Comments

@streetpea
Copy link
Owner

streetpea commented Sep 10, 2024

Is your feature request related to a problem? Please describe.

chiaki-ng probably won’t work on ps5 pro out of the box (such us having some new options that aren’t currently in chiaki-ng)

Describe the solution you'd like
A clear and concise description of what you want to happen.

to be able to remote play ps5 pro using chiaki-ng

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

There won’t really be an alternative if the user sells their ps5 for a ps5 pro or doesn’t have a ps5 to begin with.

Additional context
Add any other context or screenshots about the feature request here.

none needed

@streetpea
Copy link
Owner Author

I’ll get a ps5 pro to test this out and do the necessary upgrades. If anyone else is getting a ps5 pro and wants to help lmk.

@zutmkr
Copy link

zutmkr commented Sep 11, 2024

Im very curoius if they will bump stream resolution to like 1440p at least or maybe 4k even using PSSR. I'm thinking to preorder one, so if that happens I will gladly help to get the chiaki working for PS5 pro.

@streamingdv
Copy link

@zutmkr to be honest I don't think so, maybe 1440p but I don't think 4k is going to happen as this would significantly increase the need for the video decoding capability of the PS5 device. But we will see 💪

@Entropy512
Copy link

I do wonder if PS5 Pro will actually break anything if you use it in "backwards compatible" modes. After all I don't think there was anything special needed for PS4 vs PS4Pro other than possibly some new resolution modes.

Obviously the Pro-specific resolutions (if there are any that aren't already supported by PS5, just at higher texture resolutionns and framerates) would be a nice to have.

I haven't contributed anything yet, but as someone who is working on a downstream project ( https://github.com/Entropy512/libchiaki_cython - cython bindings for libchiaki) and is probably going to get a PS5Pro (although possibly not at launch depending on whether the games I play are adding Pro support this time around), I'll definitely be taking a look at this. Of course since my current focus is commandline controller input, additional resolutions/framerates aren't on my list since I'm literally throwing the video data out after setting it to the lowest resolution/framerate I can...

@fabrecordz
Copy link

I preordered Ps5 Pro and I would like to assist with this in any way I can.

@Rahzadan
Copy link

Will be getting a Pro as well - available to assist/test!

@zutmkr
Copy link

zutmkr commented Nov 6, 2024

Getting ps5 tommorow. @streetpea pm me on discord @kruhol so we can schedule a quick call of how I can help you to get the app compatible and working.

@Rahzadan
Copy link

Rahzadan commented Nov 7, 2024

@streetpea I can confirm that PS5 Pro just works.

I'm obviously not sure if it's capable of higher than 1080p / 60fps through Chiaki, but I can confirm everything works just the same as it did on my PS5!

@streetpea
Copy link
Owner Author

@Rahzadan Does remote connection via psn work as well?

@Rahzadan

This comment was marked as abuse.

@Rahzadan
Copy link

Rahzadan commented Nov 8, 2024

I should also note that chiaki seems to randomly crash to desktop (no error) after it fails to connect with nothing additional in the log.

@Rahzadan
Copy link

Rahzadan commented Nov 9, 2024

@streetpea Remote PSN connection is also working fine on PS5 Pro!

The issue was on my end. For some reason my Decktop PC was having issues establishing a uPnP connection to my router. I tried on my laptop and it worked perfectly. I went to a public WiFi hotspot and it worked from there too:

[2024-11-09 10:35:11:817817] [I] Added local UPNP port mapping to port 50511
[2024-11-09 10:35:13:214214] [I] Sent response to (public ip):9303
[2024-11-09 10:35:13:725725] [I] Sent response to (public ip):9303
[2024-11-09 10:35:14:237237] [I] Sent response to (public ip):9303
[2024-11-09 10:35:16:914914] [I] >> Punched hole for control connection!

The PS5 Pro (10.0.3.5 private IP) opened the following ports in my router via uPnP for remote PSN:

{11C4FEC4-9C74-4AAB-9341-552A8F4C82A7}

@L0WR1D3Rz
Copy link

L0WR1D3Rz commented Nov 9, 2024

Streetpea i opened an issue. I have the ps5 pro. All works well in same wifi but it won't see the console when I try to connect via PSN. How can I help to fix this? I'm in 1.9.1 and use steamdeck oled for remote play. If I use the official Android app it works while on the same remote wifi the steam deck is connected to with which it doesn't work..

@Rahzadan
Copy link

Rahzadan commented Nov 9, 2024

@L0WR1D3Rz, PSN connection relies on uPnP. Make sure it's enabled in your router.

@streetpea
Copy link
Owner Author

@Rahzadan it doesn’t require upnp, but if you enable upnp it should always work independent of the network type. In this case it’s not actually the remote play he’s saying is failing though but the listing of the console via calling the psn api.

It seems that works for you though at rhazadan, since you can see the remote play via psn tab to select it.

@Rahzadan
Copy link

Rahzadan commented Nov 9, 2024

@streetpea Yes in each instance I tried it, I was always able to see the remote PSN tab appear. I however couldn't get remote PSN connection to connect at all without uPnP, otherwise I have to manually forward the ports in my router (which did work before you implemented PSN connection). I also get the upnp error below in the logs (which I also mentioned above) if upnp isn't working, followed by remote PSN failing:

Failed to find UPnP-capable devices on network: err=0

Doesn't the PSN api invoke the console (and the Chiaki client) to hole-punch the ports it needs for a remote connection? How could it work otherwise?

@streetpea
Copy link
Owner Author

streetpea commented Nov 9, 2024

@Rahzadan There is two separate sections. The first is to discover consoles registered with psn. This is the how the console is listed. Next, is the actual udp hole punching. This enables a direct connection to the console from the client, using psn to exchange information between parties. (See https://stackoverflow.com/a/70629303) This works in the majority (~92% based on statistics from googles remote connection turn service) of networks. However, in the other 8% of networks you won’t be able to make a connection. Enabling upnp means you open a hole yourself so the hole doesn’t actually need to be punched so it will always work even if you are using an incompatible network.

As far as why it’s not working without upnp in your particular case I would need to see your verbose logs from a failed connection.

@Rahzadan
Copy link

Rahzadan commented Nov 10, 2024

@streetpea Thank you for clarifying! Is it possible that the 8% you speak of are those that are on a network where either there is no uPnP, or uPnP isn't working correctly? In my case, my network DOES have working uPnP, but on 1 particular PC in my house, for some reason it doesn't work (probably my PC's fault). My laptop, which IS on the exact same network, DOES work when I enable remote PSN (clicking the symbol in the lower left corner of Chiaki). On both my PC and Laptop, the PS5 creates the uPnP entries in my router and "hole punches" through the firewall. On my laptop, it also creates a couple of uPnP entries, however my PC does not (getting the "failed to find uPnP-capable devices" error).

Here are the verbose logs for both my non-working PC, and my working lapaop. Note that I redacted some info that looked personally identifiable... If you also need that info please let me know.

Verbose log - PC (Desktop) not working.log
Verbose log - Laptop working.log

Here are the uPnP entries created by Chiaki running on my Laptop:

image

Please also let me know if there's anything I can do on my end to determine if the PS5 Pro is capable of streaming in anything higher than 1080p 60fps

@Rahzadan
Copy link

@streetpea Sorry, re-uploading my Laptop's verbose log as I realized the one above wasn't verbose..oops!

Verbose Log - Laptop working.log

@streetpea
Copy link
Owner Author

Upnp punches it own holes so you don’t really need to do the holepunching . That is a surefire wire to get things working so is tried first and then if that doesn’t work it uses STUN and actually does the udp hole punching.

@L0WR1D3Rz
Copy link

@L0WR1D3Rz, PSN connection relies on uPnP. Make sure it's enabled in your router.

Since it works fine using official Android app though, shouldn't it work on steam deck as well? Or is Upnp necessary only for chiaki?

@Rahzadan
Copy link

@streetpea In my case above with my Desktop PC, it seems even STUN didn't work, however. Doesn't STUN still rely on uPnP though? My understanding is that STUN is used by uPnP when it can't otherwise determine the external IP address.

@streetpea
Copy link
Owner Author

@Rahzadan the verbose log you posted for the not working one just shows psn failing to find the ps5. This means the ps5 is temporarily unavailable via psn. Either the console isn’t connected to psn currently such as being completely off or more likely a connection has just completed so the ps5 is showing unavailable for a short period of time (a cooldown). Please try again and post the updated log.

@streetpea
Copy link
Owner Author

streetpea commented Nov 10, 2024

@Rahzadan no STUN and upnp are separate.

In general routers’ NAT are set to only allow incoming connections from devices (identified by external ip and port) that we sent to first

Upnp is essentially adding dynamic port forwarding rules. Once this is done we can always reach that side at the given ip and port. This means we punch a hole in our NAT for that side and once that side gets our packet it will know our external ip and port and can send packets back establishing a connection.

On the other hand, STUN is pinging a server and asking it the ip and port it sees for your device. You then send this information to the go-between (psn) and it sends it to the other side (ps5 to Chiaki-ng / chiaki-ng to ps5). Then that side makes a connection to the other side punching a hole in their firewall for that ip and port. Both sides do this so they can now connect. In certain networks different ports ok your router are assigned for connections to different ips and ports instead of using the same external port for all connections from the given internal port. This means the hole punched in the firewall will be a different port then the one the other side tries to connect to so it won’t work. That 8% is for those networks (called symmetric NAT)

@Rahzadan
Copy link

Rahzadan commented Nov 10, 2024

@Rahzadan the verbose log you posted for the not working one just shows psn failing to find the ps5. This means the ps5 is temporarily unavailable via psn. Either the console isn’t connected to psn currently such as being completely off or more likely a connection has just completed so the ps5 is showing unavailable for a short period of time (a cooldown). Please try again and post the updated log.

@streetpea The log for my non-working connection from my Desktop PC is the same every time, and it also fails every time, regardless of cooldown (been spending way too much time on this, lol) I should also mention that GAMES that I try to play (like Call of Duty) which use uPnP opn my desktop PC also fail to open a uPnP port (I have to manually forward for those games - but I shouldn't have to). For some reason my Desktop cannot establish communication with uPnP running on my router, but my laptop can.

If my desktop couldn't find the PS5 at all (via PSN), how is it that the PS5 still wakes from standby, but doesn't establish the video stream? The common denominator I see is the uPnP error in my desktop's logs.

I will try and see why uPnP is failing on my Desktop, and will let you know if it starts working when I fix that.

@streetpea
Copy link
Owner Author

@Rahzadan I see you updated the log. You’re actually running into a problem uI’ve fixed in main. Try this windows build: https://github.com/streetpea/chiaki-ng/actions/runs/11751482964/artifacts/2165714691. Should fix your issue

@Rahzadan
Copy link

Rahzadan commented Nov 10, 2024

@streetpea So as a test, I just disabled uPnP in my router:

{4EDB138E-FA41-420C-B949-25F4A0D87BD2}

After doing this, my Laptop now also fails to connect via PSN.

Here is the verbose log for my (previously working) laptop, now failing (due to uPnP being disabled?):

Verbose log - Laptop with uPnP disabled on router.log

@streetpea I saw your above post while I was typing this one....lol. I will try your test build and let you know!

@Rahzadan
Copy link

Rahzadan commented Nov 10, 2024

@streetpea With the above test build, PSN remote now works on my desktop and laptop regardless if uPnP is enabled or not. You rock :)

I did notice that it's slightly hit-or-miss though, but that may have to do with the PSN network or other factors. What I mean by that, is that if my PS5 Pro is in standby/sleep mode first, chiaki will sometimes fail to connect via PSN (it always connects every time using local connection, regarless of PS5 sleep state). If my PS5 is already awake, chiaki now seems to always connect via PSN whether or not uPnP is enabled in my router.

I do still get the "Failed to find UPnP-capable devices" error in the logs, but it still connects now despite that error. Whatever you changed in the test build helped tremendously.

Now to figure out why my desktop PC can't see uPnP on my router... but that's a separate "me" problem now... haha.

@streetpea
Copy link
Owner Author

streetpea commented Nov 10, 2024

@Rahzadan which error are you getting in those cases? It sounds like what you’re describing is trying to contact the PlayStation when it isn’t connected to psn. PSN is used to wake up the console from sleep mode. The console disconnects from psn (as far as remote play is concerned) initially when going to sleep or when finishing another connection. In this case, upon failing the chiaki-ng screen should prompt you to try again.

@streetpea
Copy link
Owner Author

@Rahzadan failing to find upnp devices isn’t an error for chiaki-ng. Errors are denoted in the logs with [E] … that is an info log denoted with [I]

@Rahzadan
Copy link

Rahzadan commented Nov 10, 2024

@streetpea I just now tried it again after letting the PS5 sit in sleep mode for about 10 minutes, and it worked fine. May have been because I wasn't letting it cool down long enough like you mentioned in an above post. Got a little too hasty I think!

Either way, your test build seems to have saved the day for me. Thank you for your help and continued development!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants