Day 2 with the Steam Machine (or: running Sunshine)
For many years I have only used laptops. Because who has the space for a tower PC? But now with the Steam Machine sitting on my desk I can no longer unplug and continue work on the couch.
A quick look around the internet pointed me at the Sunshine and Moonlight combo. So I went with that instead of the old VNC stuff I was using 20 years ago. Blindly trusting my fellow webizens here.
Sunshine was quickly installed via Discovery (Flatpak). And I installed Moonlight on both my work laptop (via brew) and phone (via F-Droid).
I quickly ran into one issue: the Steam Machine is connected to a 3440×1440 wide screen monitor. And that is what Sunshine will start to stream. I was able to configure Sunshine to change my resolution when I connect from a Moonshine client.
How I did that.
Within the Sunshine configuration there was a new “application” called Desktop. I navigated into its Edit section. In there is a subsection called “Command Preparations”, where I could set commands that will run on start and end of streaming.
I set the Do Command to bring my screen down to a non-wide-screen 720p with the following:
flatpak-spawn --host kscreen-doctor output.HDMI-A-1.mode.30
I set the Undo Command to bring my screen back to its usual format:
flatpak-spawn --host kscreen-doctor output.HDMI-A-1.mode.1
And everything worked!
But where did I get those values?
Running kscreen-doctor -o on the command line can give you information about what is currently running:
Output: 1 HDMI-A-1 f26f4ee9-d493-4a1a-ab41-ebec598e97e0
enabled
connected
priority 1
HDMI
replication source:0
Modes: 1:3440x1440@85*! 2:3840x2160@60 3:3840x2160@60 […] 26:1280x1024@85 27:1440x900@85 28:1280x800@85 29:1280x720@60 30:1280x720@60 31:1024x768@60 32:800x600@60 […]
Geometry: 0,0 3440x1440
On the very first line it told me my display was available as HDMI-A-1. After that I just needed to identify the right modes. The currently selected and recommended display is mode 1 at 3440×1440, so that was easy for the Undo. Then I just kept scrolling through the list until I saw a resolution that made sense for me to stream. I settled on mode 30 at your old school 1280×720.