Getting Moonlight streaming to work at 120hz using a Bazzite client
Hi team.
I've just set up a HTPC (TRIGKEY R7 6600H/660M/16GB/500GB) with Bazzite and having a great experience so far! Thank you for all your hard work on this OS. If I solve this issue I doubt I'll ever boot into the Windows partition again.
Now, I've setup this PC to mainly serve as a Moonlight streaming client from my main gaming PC to my living room, where I have a LG C3. As mentioned I've got a dual boot going with Windows, and setup Moonlight streaming clients identically on both OS. However, when trying to stream 4k@120hz HDR, I'm having a strange issue when running under Bazzite.
In the first attached picture, you can see while streaming under Windows 11 I have full 120 fps with no drops or other issues.
In the second attached picture, you can see while streaming under Bazzite Moonlight is capped somehow to only render at 60fps, with 50% (it does fluctuate a bit) attributed to be dropped due to "network jitter". Given the "frame queue delay" stat, I assume frames are only grabbed at 60fps and the network buffer is not consumed fast enough, leading to the drop being attributed as it is.
Under display settings I've set the resolution to 3840x2160@120. If I hop into desktop mode (gnome) and check the display settings there, it's all setup for 4k 120hz as well and seems to be working fine. If I run Moonlight under dektop mode I get the same issue.
I would love to get some input on what to try next and hear if anyone has run into any similar issue.
19 Replies
Did you enable higher fps in moonlight settings?
I have never used higher than 60fps as my network setup can't handle it (can't believe the landlord wouldn't let me drill a hole to the basement for a cable to my server /s)
Yes both Windows and Bazzite clients are configured for 4k 120hz 150mbps. That configures the incoming 120hz video stream, which is coming in fine on both ends. Reading the stats in the screenshots, the client under Bazzite has an issue rendering it at that rate.
Are you running moonlight through gamescope in desktop mode?
Well it's not something I can even attempt to replicate due to my situation so I can't think of more than gamescope locking it to 60 for whatever reason.
Or there being a difference with the network driver or moonlight on Linux
I've tried:
- Running it in Game mode (added Moonlight as a non-steam game in desktop mode, then switched over to Game mode and ran it)
- Running it directly in Desktop mode (e.g. not via Steam)
- Running it via Steam in Desktop mode
Only interesting observation is that rendering seems to cap at 60fps in Game mode and 50fps in Desktop mode.
Frame limit in performance overlay is at 120 fps default, and disabling frame limit changes nothing. Flipping "allow tearing" also doesn't change anything.
Then I am unsure since I can't test this myself due to being forced to use powerline between my apartment and the basement where my server is so I'm capped at 720p@60 🙃
Yeah I’m very aware I’m pushing the limits of what’s possible here. Tomorrow I’ll get a cable that hopefully lets me get VRR going as well, then I’ll have achieved end game streaming setup 🤩
Some more data. Running 720p@120hz @ 150mbps and 1080p@120hz @150mbps seems to cap out at around 80fps
Ah. Adding the performance overlay I can now see my GPU sitting at 100% even when doing the 720p test
huh what is the gpu?
nvm you said
if its gpu bottlenecked then its wrong for the stats to put that in network jitter :clueless:
My guess is back pressure from rendering not keeping up leading to network packets not being consumed quick enough. Very curious on why this issue only surface on Linux and not on Windows, but that might be a question for the Moonlight folks. Also strange that decoding is keeping up but not rendering.
Gonna go check GPU usage when steaming under Windows now.
probably a good idea
also keep in mind that windows and linux dont use the same driver
so could even come down to some difference in the gpu driver stack causing this behavior
or even a regression
On Windows 11 GPU sits at 60-65% usage when testing 4k@120hz@150mbps
Same scenario but under bazzite, rapidly fluctuating between 60-100% usage, mostly on the upper end. Wish I had a graph.
Dropping from 150mbps to 20mbps changes nothing, which makes sense as decoding is keeping up while rendering isn’t.
Definitely feels like something is off when this GPU isn't able to render a decoded 4k@120hz video stream.
For good measure I did a rebase on stable-40, same results
maybe check
see if those 2 numbers are matching
essentially thats the tdp of the gpu (if its exposed) and the default tdp
and they should be identical
but we have had situations in the past where steam has found a way to set it to 30W which we have mitigated :clueless:
Nothing with the name ”cap” inside the /sys/class/hwmon tree I’m afraid
ok then idk 🤔
But I believe power draw is a good lead you gave me! Looking at the performance overlay the GPU never reports more than 10w, but it’s rated for 15-45w if I’m reading the specs right. Going to try and tweak that later somehow.
if you can find out the path that controls the tdp for that card then hand me it and i will see if i can add it to our tdpfix, hopefully it will help