Steam Link

Steam Link

My long journey to get a working steamlink at home with a pi4
Maybe this will provide some interesting info to other people in this long but interesting project, as I wished I had all that info in just 1 place...

Config :
Desktop : i8700k, r9 fury, dualoot : win10 and archliux
Client : raspberry pi 4, 2go
Wired network. Hdmi to my Home Cinema Amplifier which feeds the video signal in a projector (1080p)
Initial setup :
raspbian from https://www.raspberrypi.org/software/ (4.7.1)
cat /etc/os-release PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
sudo apt install steamlink
To avoid the prompt whether to execute Steam Link when double-clicking the desktop iconĀ : edit /etc/xdg/libfm/libfm.conf and add the following line under the [config] section:
quick_exec=1
(reboot required)
Remote acces :
Fixed ip :
Open the file /etc/dhcpcd.conf and replace:
# Example static IP configuration: interface eth0 static ip_address=192.168.1.5/24 #static ip6_address=fd51:42f8:caae:d92e::ff/64 static routers=192.168.1.1 static domain_name_servers=192.168.1.1 8.8.8.8
In the config panel : enable ssh
To remove the annoying ssh password warning (I kept pi/raspberry)
sudo rm /etc/xdg/lxsession/LXDE-pi/sshpwd.sh
Change the colors of mc
I always use mc to edit files via ssh. But default colors are terrible (can’t read certain parameters in the editor). Download solarized.ini from https://github.com/iwfmp/mc-solarized-skin and put it in ~/solarized.ini then (you can’t edit mc config files with mc : they are overwritten when you exit)
nano .config/mc/ini
Go to skin and change default to /home/pi/solarized.ini
Ctrl+o to save, ctrl+x to quit
Readable, at last !
Sound config
apt install pavucontrol
There’s no 5.1 profile, so (after many hours of searching…), I went to output to Ā« Digital Stereo Ā». On my Amplifier, I can set some processing Ā« Dolby pro logic Ā» which simulates some surround effects by treating a stereo signal. Not a true 5.1, but better than just stereo.
I had audio dropouts : when the pi starts playing a sound, the amplifier must configure itself, so it starts playing after 2s and then disconnects. I tried this trick in my ~/.config/pulse/default.pa

.include /etc/pulse/default.pa .nofail unload-module module-suspend-on-idle .fail
But, same result.
Finally, the update2 of this (https://unix.stackexchange.com/questions/362223/short-audio-playback-is-muted-requires-warming-up-or-secondary-audio-in-backgro) solved it : it continuously sends an inaudible sinus to the speakers.
apt install sox
Create this file : ~/.config/systemd/user/continuous-silence.service
[Unit] Description=Continuous silence [Service] ExecStart=play -n -c2 synth sin gain -100 [Install] WantedBy=default.target
And enable it with
systemctl --user enable continuous-silence
Success !
Hardware Shutdown button
I plugged a real push button between pins 5 and 6 (gpio3 and gnd)
Then saved in /home/pi/shutdown.py
#!/bin/python # Simple script for shutting down the Raspberry Pi at the press of a button. # by Inderpreet Singh import RPi.GPIO as GPIO import time import os # Use the Broadcom SOC Pin numbers # Setup the pin with internal pullups enabled and pin in reading mode. GPIO.setmode(GPIO.BCM) GPIO.setup(3, GPIO.IN, pull_up_down=GPIO.PUD_UP) # Our function on what to do when the button is pressed def Shutdown(channel): print("Shutting Down") time.sleep(5) os.system("sudo shutdown -h now") # Add our function to execute when the button pressed event happens GPIO.add_event_detect(3, GPIO.FALLING, callback=Shutdown, bouncetime=2000) # Now wait! while 1: time.sleep(1)
Autostart steamlink
In the control panel>wait for network (otherwise you get some Ā« can’t update Ā» message boxes)
I created ~/start_perso.sh
# !/bin/bash /home/pi/shutdown.py & steamlink steamlink
I put steamlink twice because I sometimes make a mistake and press B, which brings me back to the desktop. With that, it relaunches steamlink a 2nd time.

Create ~/.config/lxsession/LXDE/autostart with (it will disable this one : /etc/xdg/lxsession/LXDE-pi/autostart)
@lxpanel --profile LXDE-pi @pcmanfm --desktop --profile LXDE-pi @xscreensaver -no-splash @/home/pi/start_perso.sh
Steamlink config
On desktop : remote play : enable hardware encoding just for intel igpu
On client : quality : beautiful (was blocky with balanced with some snow on a lego game), stereo, hevc enabled.
Good quality, fluid. I’m sometimes under the impression that some button pressed are slightly delayed (or even skipped), but I might be because of the projector lag (or me).
Custom Arcade stick
I have 2 dragonrise homemade arcade sticks

In steamlink client : config>Gamepads : I was able to map them correctly (except : I can’t map the dpad, but maybe it’s because I mapped the stick to analog and it won’t accept to output analog and dpad at the same time).

Steam host computer name
I changed in windows control pannel, but it always displayed the old name on linux. Editing
~/.config/Valve Corporation made the trick
Force hdmi output even if tv is off
In /boot/config.txt:
framebuffer_width=1920 framebuffer_height=1080 hdmi_force_hotplug=1 hdmi_group=2 hdmi_mode=82 hdmi_force_edid_audio=1
As I had big black borders on the projector :
# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
disable_overscan=0

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
overscan_left=-40
overscan_right=-40
overscan_top=-40
overscan_bottom=-40

All this was not sufficient : to be able to get a picture if I switch on tv after the pi4, I also added a Ā« dr hdmi Ā» box between the pi and my amplifier. Maybe you can do it just with the proper config on the pi, but after hours of searching, this is what worked.

Ultra street fighter IV
There’s a problem separating the inputs (can’t play versus : the 2nd stick is not wroking). The trick is :
1) enter Ā« arcade mode Ā», up to the character selection, then go back
2) you can now play versus with 2 gamepads.

Remaining problems
I’m rather pleased with the system (but I’m just beginning using it).
1) I wish I could find a proper solution for a true 5.1 output (dolbyprologic simulation is not bad, but just for the sake of having the best out of my hardware...). It should be as simple as selecting a 5.1 output profile in pavucontrol. The hardware is capable (as libreelec works fine with 5.1 output).
There’s some discussion here: https://steamcommunity.com/app/353380/discussions/6/1743353164095764346/
I spent a lot of time trying that : on a retropie install (without desktop), I was able to configure alsa via a .asoundrc file and get speaker-test -c6 -Dsurround51 output to my 6 speakers. But, with steamlink, my rear speackers were aways silent.
On a raspbian, the .asoundrc file is always deleted (even if you change its permissions) : they have switched to pulse audio, so they don’t want to mess up with alsa anymore. So this config is outdated for raspbian at least.
2) I tried to get pegasus frontend to work (as emulation seems to be only non-x) : could never launch it (event with flatpak). I abandonned : I will only use steamlink interface (and maybe launch retroarch from it).
< >
Showing 1-1 of 1 comments
Hello,
With some trick you can start a X server just for steamlink ( i'm using it with a minimalist raspbian with steamlink and kodi )
< >
Showing 1-1 of 1 comments
Per page: 1530 50