moonlight-stream / moonlight-qt

GameStream client for PCs (Windows, Mac, Linux, and Steam Link)
GNU General Public License v3.0
10.18k stars 594 forks source link

Can't get to 60 fps in most games/desktop (Big picture is 60fps but a flickering mess) #376

Closed talynone closed 4 years ago

talynone commented 4 years ago

Bug Description Inconsistent fps behavior. Can't get to 60 fps most of the time, when I bring up the stats (Ctrl-Alt-Shift-S) it hovers around 25-40 fps.

If I run through Steam (which launches Big Picture) I can get a consistent 60 fps in games like Blur and Left4Dead 2 but whenever a game is streamed from Steam Big Picture it's a flickering unplayable mess.

When run without Steam Big Picture, directly, those games hover at 25-40 fps. When running in desktop mode (mstsc.exe), it hovers 25-40fps. However some games, like Borderlands 3, do run 60 fps when running outside of Big Picture. In all cases the stats overlay shows no dropped frames.

Moonlight settings -Moonlight PC v2.0.0 -Resolution 1080p at 60fps (tried lower resolution with no difference) -Video bitrate: 70.5 Mbps (also tried adjusting with no difference) -Display Mode: Full-Screen -Tested with V-Sync on/off -Tested with Frame pacing on/off -Tested with Optimize game settings on/off

Client PC details -Dell Inspiron 5591 2n1 Laptop with 32GB of Memory -Windows 10 Home Edition Version 1909 Build 18363.815 -Intel Core i3-1011U CPU -Integrated Intel UHD Graphcs -Moonlight PC v2.0.0

Server PC details -MSI GP73 Leopard-636 Laptop with 32GB of Memory (120hz Monitor) -Windows 10 Home Edition Version 1909 Build 18363.815 -Intel Core i7-8750H CPU -Nvidia GTX 1070 8GB GPU and Intel UHD Graphics 630 (NVidia Optimus) -Driver version: 445.87 -GeForce Experience version: 3.20.3.63 --Whisper Mode: off --Battery Boost: Off

Moonlight Logs Moonlight.zip

auto-comment[bot] commented 4 years ago

If this is a question about Moonlight or you need help troubleshooting a streaming problem, please use the help channels on our Discord server instead of GitHub issues. There are many more people available on Discord to help you and answer your questions.

This issue tracker should only be used for specific bugs or feature requests.

Thank you, and happy streaming!

cgutman commented 4 years ago

Yeah I can confirm the host seems to be capturing frames at a low frame rate.

Estimated host PC frame rate: 34.24 FPS
Incoming frame rate from network: 34.24 FPS
Decoding frame rate: 34.24 FPS
Rendering frame rate: 34.24 FPS
Frames dropped by your network connection: 0.00%
Frames dropped due to network jitter: 0.00%
Average receive time: 0.26 ms
Average decoding time: 0.46 ms
Average frame queue delay: 0.32 ms
Average rendering time (including monitor V-sync latency): 0.64 ms

This looks like an issue on the host-side of things. I can't guarantee a solution since we don't control that obviously, but I can have a look at your logs.

GameStream logs can be found on the host in C:\ProgramData\NVIDIA Corporation\NvStream. C:\ProgramData is a hidden folder, so you may need to enable viewing hidden files or type the path into File Explorer manually

talynone commented 4 years ago

Thanks for looking into it, I've attached the requested logs.

GameStream Logs 05_02_2020.zip

cgutman commented 4 years ago

OK, looking at the logs, there's definitely something that's really crushing your capture performance:

#9(I)[2020-05-02 18:16:09,065]=11:16:09={10804}<Reporting>        Server E2E stats for 440 pkts at 1920x1080@60, received 1440.
#0(I)[2020-05-02 18:16:09,065]=11:16:09={10804}<Reporting>        CaptureTime 33.793538, SendPktsTime 0.084690, CapStartToPktOut 37.610784, validRate 1.000000.
#1(I)[2020-05-02 18:16:09,065]=11:16:09={10804}<Reporting>        Network E2E: 0.000000 ms, 1441 samples.

The server taking 33 ms just to capture a frame, which amounts to a 30 FPS stream.

Comparing that to my system, my capture time is less than half of what you're seeing.

#4(I)[2020-05-02 05:27:54,590]=22:27:54={15404}<Reporting>        Server E2E stats for 16187 pkts at 1920x1080@60, received 17187.
#5(I)[2020-05-02 05:27:54,590]=22:27:54={15404}<Reporting>        CaptureTime 14.626845, SendPktsTime 0.114782, CapStartToPktOut 19.201097, validRate 1.000000.
#6(I)[2020-05-02 05:27:54,590]=22:27:54={15404}<Reporting>        Network E2E: 0.000000 ms, 17188 samples.

I think it must have something to do with Optimus. Maybe try updating your Intel GPU drivers, or even downgrading them to see if performance improves.

talynone commented 4 years ago

Thanks, I'll give it a go soon. What's strange is that on a much heavier game like Borderlands 3 it has no problems capturing at 60fps, but on Left4Dead 2 or Desktop streaming it's struggling.

pablosarm commented 4 years ago

Have the same issue here, with NVIDIA Geforce 1050 + Intel Integrated Graphics

Thanks, I'll give it a go soon. What's strange is that on a much heavier game like Borderlands 3 it has no problems capturing at 60fps, but on Left4Dead 2 or Desktop streaming it's struggling.

Did you have any improvement ? I have the same issue

talynone commented 4 years ago

Have the same issue here, with NVIDIA Geforce 1050 + Intel Integrated Graphics

Thanks, I'll give it a go soon. What's strange is that on a much heavier game like Borderlands 3 it has no problems capturing at 60fps, but on Left4Dead 2 or Desktop streaming it's struggling.

Did you have any improvement ? I have the same issue

Sorry no. I tried upgrading to the latest Intel Graphics Driver (27.20.100.8236 dated 5/12/2020). No difference. I even tried turning off all the power saving features of the Intel drivers through the Intel Graphics Command Center application, no difference. If I'm in remote desktop mode (mstsc) and go to Steam then go to Big Picture mode the fps jumps to 60, but that's of no help. Trying to minimize Big Picture, minimizes the actual Steam Big Picture but through Moonlight it still displays Big Picture as if it was running full screen.

pablosarm commented 4 years ago

in remote desktop mode (mstsc) and go to Steam then go to Big Picture mode the fps jumps to 60, but that's of no help. Trying to minimize Big Picture, minimizes the actual Steam Big Picture but through Moonlight it still displays Big Picture as if it was running full

Now Im trying using sunshine alternative 60fps everywhere nvidia is the one that has conflicts with iGPU on laptops

talynone commented 4 years ago

in remote desktop mode (mstsc) and go to Steam then go to Big Picture mode the fps jumps to 60, but that's of no help. Trying to minimize Big Picture, minimizes the actual Steam Big Picture but through Moonlight it still displays Big Picture as if it was running full

Now Im trying using sunshine alternative 60fps everywhere nvidia is the one that has conflicts with iGPU on laptops

I just tried Sunshine and got much worse results. Did you run Sunshine under Windows or Linux? It kept giving "Slow connection to PC Reduce your bitrate" warnings from Moonlight PC client. Even though "Frame drops by your network connection" was at 0%. It also froze up every 10 seconds or so. The fps sometimes jumped to 60-70fps but only for a second, but dropped as low as 1fps and was mostly around 25-35fps. Switching back to the native NVidia gamestream didn't exhibit these issues. Sunshine seemed to be using my Intel UHD 630 as the encoding source according to the Sunshine console. I tried forcing the sunshine .exe to use the Nvidia GPU but it gave some "duplicate" error and crashed.

pablosarm commented 4 years ago

around

I run it on windows and I really had good results . If I understood correctly during this days , the encoding is done by the iGPU. My laptop is connected using Ethernet and the client uses WiFi 5 ghz or Ethernet too. Resolution: 1080p (or 720p) at 20 mbits of bitrate

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.