moonlight-stream / moonlight-qt

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

What is the best linux distribution for fast booting into moonlight ? #876

Open shodanx2 opened 2 years ago

shodanx2 commented 2 years ago

Hi,

I have an old laptop with a broken screen. I want to make it start, boot linux, start moonlight and autoconnect to windows running on proxmox with GPU IO passthrough (cloud gaming box). And, in case of any disconnect, it should just retry connecting forever.

Does such a specialized linux distribution for this purpose already exist ?

If not, what would you recommend for building such a distribution ?

My initial thought are pop os, install moonlight and a small script to start and loop restasrt moonlight forever ? As well as auto login and another script that checks the moonlight and make sure it is always maximized.

Also on caveat, my laptop has two monitor output. How could I make it work on two monitors ?

I know this is more of a discussion thread than a feature request, but, the discussion section on this project is closed.

Raymonf commented 1 year ago

I think that even Pop might be a bit heavy for the job if this is your use case. You don’t really need a whole desktop environment just to run this Qt application.

I’d personally go with a slightly more lightweight distro (Arch or some derivative would do fine, in my opinion). Then, you could write that script to start your display server and loop starting Moonlight from there.

shodanx2 commented 1 year ago

The reason I asked this was to know if maybe someone already had made such a single application distro, since a boot to viewer OS would make a lot of sense.

I've been searching into net booting a lot these days and the scope of what I'm searching has grown. I might end up making one myself if nothing else manifests itself.

So, I can now HTTP boot into an OS very quickly using iPXE and the only infrastructure needed to do that is my openwrt router plus a usb stick. And the speed limitation is, the size of the OS file plus the speed of my USB2 port on my old router.

So, time to boot and small total size are the most important factors.

Also, the same base should be usable with both moonlight and remmina (spice client, something very similar to moonlight) and probably the other video plus input over network protocols (vnc, rdp, ffmpeg+barrier)

It should also have the drivers for most applicable GPUs, nvidia, amd, intel, both open and closed versions.

So, maybe a basic debian and just the barebones to run these things, maybe over framebuffer instead of full X ? If the hardware video decoders can run ?

Then optimize for booting as fast as possible.

And then make that work from usb booting and pxe (http) booting and iscsi booting

It is possible that doing this might be viable using windows PE too but not sure.

And it should go from boot to logged in to a desktop with no user interactions at all. You turn it on and you're in.

Not sure how hard that's going to be but that doesn't seem super hard. The space budget should be under 500 megs, so about 5 second download time on slow ethernet.

gschintgen commented 7 months ago

Hi, I'm also interested in a minimal setup involving moonlight-qt. In my case I'd like to set up an old mini pc (i5-7500T, 8GB RAM) for dual boot between Batocera v39 (which has moonlight-embedded built-in but somehow it won't send any controller input to sunshine) and a minimal OS that boots right into moonlight-qt.

Since Ubuntu 24.04 comes closer, I just went ahead and installed the latest daily and moonlight-qt via snap. While the desktop environment was running great, moonlight was an exercise in frustration: If I used the default Wayland session moonlight produced lots of stuttering/microstuttering, even though the onscreen stats (Ctrl+Alt+Shift+S) seemed flawless. I then tried an xorg session. It was even worse: there was lots of screen tearing even though vsync was enabled in moonlight! (Again: the onscreen stats looked excellent: no packet loss, minimal decoding time, etc.)

I then tried moonlight-qt right from the console (in fact I'm also using a similar setup on a Pi4) and it was a great experience! I just had to launch it with -platform eglfs. I'll now have to configure everything else (booting right into moonlight, having bluetooth enabled, etc.), but the important point is: if possible, avoid any underlying desktop environment... Especially if the hardware is a bit older.

moi952 commented 6 months ago

gschintgen

Hi, with chimeraOs 0 problem, no stutter or microstuttering

gschintgen commented 6 months ago

gschintgen

Hi, with chimeraOs 0 problem, no stutter or microstuttering

Interesting suggestion, but it seems to be the antithesis of a minimal OS?

Anyway, my experimental 24.04 build broke (hangs at boot with no possibility to access a console), when I changed the default systemd boot target to multi-user.target. So I installed Ubuntu Server 22.04 to have a flexibel but minimal (no desktop!) base OS. I had to install bluez and pulseaudio (and figure out how to configure pulseaudio to use the correct output). Unfortunately launching moonlight directly at boot via a simple systemd unit does not seem to work (unlike on my Pi4). More tinkering is needed. But moonlight is flawless on it, except for the missing performance overlay when using -platform eglfs.

moi952 commented 6 months ago

gschintgen

Hi, with chimeraOs 0 problem, no stutter or microstuttering

Interesting suggestion, but it seems to be the antithesis of a minimal OS?

Anyway, my experimental 24.04 build broke (hangs at boot with no possibility to access a console), when I changed the default systemd boot target to multi-user.target. So I installed Ubuntu Server 22.04 to have a flexibel but minimal (no desktop!) base OS. I had to install bluez and pulseaudio (and figure out how to configure pulseaudio to use the correct output). Unfortunately launching moonlight directly at boot via a simple systemd unit does not seem to work (unlike on my Pi4). More tinkering is needed. But moonlight is flawless on it, except for the missing performance overlay when using -platform eglfs.

ChimeraOs is very minimalist, it consumes little RAM, very fluid. In any case, the moonlight experience is really superb :)

thefritz11 commented 5 months ago

Hi all., also looking for an experience that would boot me directly into moonlight stream session (via Sunshine). I'm a linux newbie but have been playing around with ChimeraOS and Bazzite "for fun". Anyione tackle this one yet and care to share?

moi952 commented 5 months ago

Hi all., also looking for an experience that would boot me directly into moonlight stream session (via Sunshine). I'm a linux newbie but have been playing around with ChimeraOS and Bazzite "for fun". Anyione tackle this one yet and care to share?

You can use LibreElec (it's OS very light) and you can use this lib for use moonlight and apply to a kodi theme like this https://github.com/veldenb/plugin.program.moonlight-qt/issues/63#issuecomment-2000463059

shodanx2 commented 5 months ago

Hello,

Check this lemmy thread

https://lemmy.ml/post/14584660

I think that covers most of the possibilities for the basis to create a Moonlight client OS dedicated Distro.

Also the proxmox people, need a cookbook for adding a lightweight moonlight client to their host.

Also OpenWRT / OpenLEDE