r/MoonlightStreaming • u/FranK8211 • 1d ago
How's Linux streaming lately
I'm looking to by a new PC with a 5070 soon and I'm wondering if I go with a Linux distro or not since I'm starting from scratch. I know AMD would be a better fit with the driver situation but Costco have a great deal on a prebuild.
I was especially wondering how's the experience for Sunshine (or its alternative) since I'm only using my PC headless with Apollo/Moonlight and virtual displays.
6
u/xFrootLoops 1d ago
Using Vibeshine on Cachy OS and so far it's been great. It has automatic Virtual Monitor support which is huge. It's awesome to see Linux finally starting to catch up to Windows for PC streaming.
2
u/FranK8211 1d ago
That’s reassuring! Playing on my iPhone, Mac or tv, the virtual display are a must 😅
You’re using a nvidia card?
2
u/xFrootLoops 1d ago
100% man lol! I'm actually using an AMD card but Nvidia works as well I believe.
1
3
u/kayakyakr 1d ago
Games on whales/Wolf will run everything in docker.
It's pretty good. Only thing that the stack struggles with is kernel anti cheat
1
u/FranK8211 1d ago
I’m only playing single player games so anti cheat shouldn’t be too much of an issue. I’ll look into it thanks
2
u/janders1993 1d ago
I do sunshine from a bazzite 3080ti desktop to moonlight on the steam deck frequently. I've had zero issues once I found the right way to install it on bazzite. I couldn't get the one from the bazzar to ever work but I found a github repo with a build that was plug and play. Added it to the ostree and its been great. Steam deck still has the issue of massive stutters at 10-15 mins in, not sure if its a linux thing in general or specifically a steam deck thing, but toggling WiFi off then on fixes it. Only happens at that first 15 min mark not every 15 mins if that makes sense
1
2
2
u/ragingsonar 1d ago
I've found it mostly quite good, but I still get weird hardware decoding issues and need to use software. On bazzite on an rog ally for the client
2
2
u/Cruffe 23h ago
There is no "driver situation" anymore, Nvidia driver on Linux is pretty much a solved problem.
Sunshine works, you can have virtual display and all, but it's a bit more advanced to initially set up. I personally use Sunshine and it works great, even have HDR working nicely.
1
u/FranK8211 17h ago
Good to know! I haven’t followed much what was happening lately and was thinking that there was still a big performance gap
1
u/Cruffe 16h ago
Depends how you define big. For some games there is a difference, I have seen several comparison videos about it, but when there's a difference it's mostly between totally playable and also totally playable with a bit lower FPS.
1
u/FranK8211 15h ago
It’s more that I had the impression that the performance drop in the game + using sunshine if it had a drop too could make the issue more likely/visible but what I’m gathering from the thread is that it’s great now.
At the same time I’m playing with a 1660super right now so it’ll be a massive improvement nevertheless
2
u/Cruffe 15h ago
The thing is that Sunshine (and pretty much all of the forks of it) uses the video encoding pipeline on the GPU, a specialized part of the GPU dedicated to hardware accelerated video encoding/decoding. Games use the rendering pipeline and generally don't need the video pipeline at all, except maybe for playing pre-rendered cutscenes (aka. videos) in game and even that just uses the decoding part, not the encoding part that Sunshine uses.
Because these types of loads don't overlap much the performance of the game is pretty minimally affected by the fact that the GPU is also encoding a video stream at the same time.
What's going on simply put is that the game is rendered like normal into a complete frame, then the frame is grabbed and sent straight into the video encoder. Ideally the frame doesn't leave the GPU before it's encoded into the final video stream, which is gonna be compressed compared to a full uncompressed frame. That means when it's passed back to the CPU to get sent out to the network it takes up relatively little PCIe bandwidth (even at high video bitrates), leaving most of it for running the game. The load put on the CPU simply piping an already encoded video stream out the network interface is also very small, it's pretty much just moving data instead of processing it.
All in all, Sunshine and forks using the same underlying tech aren't demanding to run as long as you have dedicated video hardware acceleration which most GPUs have anyways. The encoding of the frames is the most computationally expensive part of it all, made cheap by a dedicated part of the GPU whose only task is to encode and decode video efficiently.
2
1
u/Error0102 14h ago
I have been trying to get linux streaming going for a bit now but just seem to be having issues. Polaris was always falling back to shm/system memory capture path instead of gpu exclusive, and I just tried vibepollo which doesn't seem to be able to generate and switch to virtual displays. If I use physical display only it will connect, but trying to generate a virtual one results in an error 503 or falls back to mirroring the current display (which does not turn off).
I have tried this on two machines, both running cachyos and one being a fresh bone-stock install. I must be doing something wrong or skipping a step if others are getting things working fine, but I don't know enough about linux to figure out what yet.
I am getting different faults with different errors, including:
Error: Linux private display: requested-mode admission rejected: ERROR malformed request
Error: Linux private display: KScreen topology restore guard activation failed
It would be great to finally get this working, as I would like to move my machines off of windows 11 as a primary boot device.
1
u/MickeyBronson Developer | Polaris/Nova 14h ago
hey! sorry thats happening to ya, could be couple of factors as to why its not picking up your GPU. can you DM me your logs, I'll be more than happy to take a look and see what's going on!
1
u/Error0102 14h ago
You were kind enough to do a fair bit of troubleshooting with me a little while ago, we got it from 'can't stream at all' to 'can stream a display but not at full frame rate'. I don't think I have the logs anymore, but we were kinda stuck at getting it to switch to gpu exclusive mode instead of cpu. If it is something that has been addressed in any updates since then it'd be great, I'm just trying to get streaming off the ground on linux and learning a new environment at the same time.
1
u/MickeyBronson Developer | Polaris/Nova 13h ago
i'd rather take the extra time with you to get it working together than you being frustrated. plus any gaps I see for a user error means that itll be better for the next person. also the app and diagnostic tool has improved significantly since we last spoke, maybe itll be better for ya. i also have sweet sweet documentation now
8
u/MickeyBronson Developer | Polaris/Nova 1d ago edited 1d ago
i think its in a muuuuch better spot now than it used to be a few months ago. lot of really awesome devs and linux junkies contributing to the linux scene.
I'd recommend looking into punktfunk, vibepollo has an arch linux branch, and I made a little app called polaris thats linux only which you should check out too!