Suspending Steam Machine via Sunshine Application

I've been struggling for the last days with implementing a sleep button as a Sunshine Application to suspend my Steam Machine (host). My client is steam deck and I'm running Moonlight.

Currently, I can wake my steam machine via moonlight, but I would like to have an application next to desktop called Sleep Cube so I can send my Machine to sleep when I'm doing playing.

I'm not very technical but I've researched a lot and my understanding is that this can be done via detached commands on sunshine. I've tried systemctl suspend, then realised that for flatpaks I need to use flatpak-spawn -- for sunshine to be able to execute the command. No matter what I try, every time I click on sleep cube the stream starts again and the machine won't go to sleep.

I even tried making the script send an API to moon deck buddy, which has a sleep function that works, but still no luck.

Something very important is that all my scripts work on Konsole and they sleep the Machine successfully. I just can't get it to work via sunshine.

This is very fun, but I'm losing my patience as it seems very easy but I can't get it to work. Most tutorials are based on Windows.

Any idea?

Maybe some of you have Linux experience with sunshine.

reddit.com
u/MEchoPark — 1 day ago

Does the potential of a Steam Deck 2 influence your decision of getting the Machine?

Before the current logistics and RAM crisis it was rumoured that the steam deck 2 could be coming out in 2028. I know this could get pushed even further due to the current situation.

However, I was thinking that if it dropped around that time and the current €€€ becomes the new normal. That would be a lot of €€€ for yet another piece of Valve hardware in a short of amount of time.

2 years is not that long in the lifecycle of a system. So getting the Steam Machine now makes me a bit hesitant because the Steam Deck 2 would interest me much more.

Have you considered that?

Of course this doesn't apply to people who simultaneously own Xbox, ps5, switch, pc etc. I personally choose to own 2-3 systems max.

reddit.com
u/MEchoPark — 2 months ago