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

Stream freezes when entering fullscreen application #228

Closed
hadicharara opened this issue Sep 25, 2021 · 16 comments
Closed

Stream freezes when entering fullscreen application #228

hadicharara opened this issue Sep 25, 2021 · 16 comments

Comments

@hadicharara
Copy link
Contributor

hadicharara commented Sep 25, 2021

Issue is as the title describes. Weirdly, it seems to affect most but not all Moonlight clients.
Works fine on the desktop on all devices.
When entering full screen mode on some devices, or when clicking the Steam Big Picture icon, the stream opens, shown the desktop briefly while Steam Big picture hasn't lauched yet, then freezes and I get a bad connection error. Gamepad controls still works. I also tried launching a game manually from the Desktop, but it the stream freezes when it launches,

Tested on:

  • Nintendo Switch [WiFi] (Works on desktop, freezes on fullscreen)
  • Moonlight Android on OnePlus 6 [WiFi] (Works fine all the time, even in full screen)
  • Moonlight Android on Google Chromecast with Google TV [Ethernet] (Works on desktop, freezes on fullscreen)

Running Sunshine on KDE Neon with 5.13.13-051313-generic x86_64 x86_64 GNU/Linux kernel (X11, VAAPI on AMD RX 6700 XT).

Sample verbose log for OnePlus 6 stream here
Sample verbose log for Nintendo Switch stream here

Thanks!

@loki-47-6F-64
Copy link
Owner

This is fixed in the master branch. :P

You can either wait for the next release. (A week or so).

Or you can compile from source.

@hadicharara
Copy link
Contributor Author

I pulled and compiled today. I tried running pull again but it seems I'm on the latest commit.

@hadicharara
Copy link
Contributor Author

hadicharara commented Sep 25, 2021

I just tried running the Switch client @ 720p and it seems to work fine. I tried the Android TV one @ 480p to no avail. Could this be a client-specific problem then?

@loki-47-6F-64
Copy link
Owner

What if you run on Moonlight Android on Google Chromecast with Google TV with 720p?

@hadicharara
Copy link
Contributor Author

hadicharara commented Sep 25, 2021

The initial test was @ 720p. I haven't tried it @ 1080p yet. Sorry should have specified the resolutions above.
OnePlus 6 @ 720p as well. Just tried the OnePlus @ 1080p and it works fine.

@loki-47-6F-64
Copy link
Owner

loki-47-6F-64 commented Sep 25, 2021

That's weird. So it's all running fine now?, woops mistook that one for the one that didn't work

@hadicharara
Copy link
Contributor Author

hadicharara commented Sep 25, 2021

Would you like me to run other tests? I can use a Windows Moonlight QT client

@loki-47-6F-64
Copy link
Owner

loki-47-6F-64 commented Sep 25, 2021

Could you repeat the test with the switch on 1080p? Just in case since 720p seems to work.

Would you like me to run other tests? I can use a Windows Moonlight QT client

Yes please :P

@loki-47-6F-64
Copy link
Owner

Could you also test changing desktop resolution while it's still streaming?

@hadicharara
Copy link
Contributor Author

hadicharara commented Sep 25, 2021

Tested the Switch @ 1080p. I discovered it actually freezes after a big screen refresh. IE, if I open any program, it freezes at the animation.
Tested The WIndows client at many resolutions. White screen on client even when host is on desktop. Logs show Waiting for IDR frame.
Tried changing the resolution but the results matched the resolution set at the client level. Didn't discover anything.

@loki-47-6F-64
Copy link
Owner

Is your ffmpeg version 4.3 or higher?

If not, that could be the issue.

@hadicharara
Copy link
Contributor Author

ffmpeg version 4.2.4-1ubuntu0.1

@hadicharara
Copy link
Contributor Author

Hmm you might be right. I'll try to upgrade versions then I'll report back. Is there a bug in versions below 4.3?

@loki-47-6F-64
Copy link
Owner

loki-47-6F-64 commented Sep 25, 2021

That's the root of the issue.

There's a bug which is fixed in 4.3 that prevents applications from sending key frames manually when using VAAPI.

Which is why it's waiting for IDR frames indefinitely.

@hadicharara
Copy link
Contributor Author

hadicharara commented Sep 25, 2021

Man this was exactly it! Installed ffmpeg from here: https://launchpad.net/%7Esavoury1/+archive/ubuntu/ffmpeg4, and it solved all my problems. We should probably add a warning to README.md. I assume this only affects when using KMS? I can add a warning and submit a PR.

@loki-47-6F-64
Copy link
Owner

This affects vaapi only. Which is the hardware encoder used for Intel and AMD on Linux.

I can add a warning and submit a PR.

Yeah, under the troubleshooting.
Thank you 👍

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

2 participants