FrogTheFrog / moondeck-buddy

A server-side part of the MoonDeck plugin for the SteamDeck.
GNU Lesser General Public License v3.0
151 stars 9 forks source link

Failed to connect to <Desktop name> #50

Closed IanKapp closed 1 year ago

IanKapp commented 1 year ago

Hi, I really enjoy this app, but I have been experiencing problems since changing my mobo/CPU and reinstalling. I tried to find this issue in all the other reports but nothing matched so here I will describe the issue I am facing.

My system was upgraded as follows: GPU: 7900xt -> 7900xt CPU: i5-8600k -> 7800x3D

Regular Moonlight + Sunshine works as expected. The MoonDeck commands "Wake on LAN", "Restart PC", "Shutdown PC", and "Suspend PC" all work as expected. I have gone through all of the installation steps again, including a full reinstall of moondeck and moondeck buddy on my host and steamdeck respectively.

What does happen: When I try to launch a game from the moondeck shortcut I get a loading circle and the message "Establishing connection to PC..." after approx five seconds a pop-up appears saying "Failed to connect to ". The resolution of my Desktop's primary monitor changes to 1280x800. If I set a custom resolution and check "Enable custom resolution" in MoonDeck, then my primary monitor changes to that resolution instead. Additionally, the refresh rate of the monitor changes from 144.000 Hz to 59.940 Hz. After another approx. 5-10 seconds the screen returns to the steam page and there is a system notification from MoonDeck that MoonDeck failed to start.

What doesn't happen: Steam big picture does not open. No game I have tested has launched. The resolution and refresh rate of my Desktop's primary monitor does not change back. A reboot of the PC will revert the resolution, but not the refresh rate.

Please let me know what other information you would like. I can still use moonlight+sunshine normally, so this isn't the biggest deal, but it would be nice to reclaim the functionality of MoonDeck.

FrogTheFrog commented 1 year ago

Try removing all host entries from Moonlight with the same hostname. Since the hostname is used for starting the stream, it selects a random host that matches the hostname if there are multiple.

If that's not the case, post the moonlight log from /tmp directory.

IanKapp commented 1 year ago

I only have one host registered in Moonlight so I don't think that is the issue, but thank you for the suggestion. Here are the logs that I found in the /tmp directory relating to either MoonDeck or Moonlight

moondeck.log moondeck-runner.log moondeck-runner-moonlight.log

FrogTheFrog commented 1 year ago

In the moonlight logs it says that https url is unreachable, can you verify that it's using a correct port?

Maybe GFE shield thingy is still enabled?

IanKapp commented 1 year ago

This mobo/cpu/ssd/windows installation have never been connected to an Nvidia GPU so I'm not sure how GeForce Experience would be enabled, or how I would disable it if it was.

Buddy Port is set as 59999 in MoonDeck settings. Is that the correct port?

FrogTheFrog commented 1 year ago

Ah, sorry I'm blind 😁. Ignore the GFE nonsense. Everything is ok with MoonDeck and the issue is elsewhere.

In the Sunshine web GUI you can set 2 ports. One for http and one for https. Please verify that they match the ones from the moonlight log (at the very end of the log)

IanKapp commented 1 year ago

image The only option I see for port is to set the port family. It is set to the http option by default. Manually overriding the value with the either the http option (47989) and the https option (47984) resulted in no change in behavior.

FrogTheFrog commented 1 year ago

Ok, let's start from the basics again. Please run this command in the terminal on SteamDeck:

/usr/bin/flatpak run --arch=x86_64 --command=moonlight com.moonlight_stream.Moonlight stream desktop-u7kvtjl MoonDeckStream.

Also, Buddy knows that it has changed resolution and is now waiting in confusion for further commands. When you close Buddy, it will change the resolution back (that's what you get by restarting the PC).

IanKapp commented 1 year ago

Running this command started the same behaviour that attempting to launch a game through a MoonDeck shortcut. First I see that it is trying to establish a connection to my PC and then it reports that it failed to connect to the desktop.

I copied the Konsole output below in case it is useful.

MoonDeck_Konsole_output.txt

By the way, thank you very much for helping me with this problem.

FrogTheFrog commented 1 year ago

Ok, now run /usr/bin/flatpak run --arch=x86_64 --command=moonlight com.moonlight_stream.Moonlight and paste the log output again. Start the Desktop or any stream manually

IanKapp commented 1 year ago

Done and done. Manually launching the stream worked perfectly.

MoonDeck_Konsole_output_2.txt

FrogTheFrog commented 1 year ago

Please verify that /usr/bin/flatpak run --arch=x86_64 --command=moonlight com.moonlight_stream.Moonlight stream Desktop MoonDeckStream works.

If it does please paste the settings file for moondeck here (/home/deck/.config/moondeck/settings.json)

IanKapp commented 1 year ago

Here is the Konsole log and the settings.json file

MoonDeck_Konsole_output_3.txt

IanKapp commented 1 year ago

oh, looks like the .json filetype isnt supported settings.txt I changed the extension to .txt

FrogTheFrog commented 1 year ago

Ok, we're getting there. I know what the problem is, but not why it exists...

Please run http://192.168.0.218:47984/serverinfo in the browser and paste the output.

IanKapp commented 1 year ago

This is what I get when trying to access that address from firefox on my steam deck

serverinfo_deck.txt

FrogTheFrog commented 1 year ago

It seems that you have renamed the host PC in Moonlight. Apparently this complicates things so please don't do that.

You can rename it like this instead (this way MoonDeck will still work):

  1. Delete the current entry in Moonlight.
  2. Rename the host in Sunshine: image
  3. Re-add the renamed host to Moonlight.
  4. MoonDeck should pick-up new name automatically, if it does not, then re-add it in MoonDeck also.
IanKapp commented 1 year ago

I had to forget and repair the host in MoonDeck in addition to the steps you listed, but this worked!. Thank you very much.

It is odd though, because I had renamed the host through moonlight on my PC's previous configuration as well. Additionally, MoonDeck didn't seem to like when the name of my sunshine host contained a space or '

Regardless. Thanks again, I really appreciate it.

FrogTheFrog commented 1 year ago

It is odd though, because I had renamed the host through moonlight on my PC's previous configuration as well. Additionally, MoonDeck didn't seem to like when the name of my sunshine host contained a space or '

That an artifact of how Moonlight handles host name, can't do anything about it :/

FrogTheFrog commented 1 year ago

If I understand the issue is resolved, so I'm closing it :)