SteamLink
Contents
About
In the meantime there is a steamlink version in the Raspian repositories.
Shell Access
SteamLink-SDK describes how to gain access to the device via ssh.
Format a USB-Stick with FAT32 and create a non-empty file on a specific path.
Reboot SteamLink
Login |
root |
Password |
steamlink123 |
~/.ssh/config
Copy pubkey and login
Change password. passwd
You may use busybox as a more comfortable shell to ash.
- PS1 is set
- Tab completion
- …
Logs can be found at
/mnt/scratch/log.
Configure
Pubkey Auth Fails
Start a second instance of sshd
1 /usr/sbin/sshd -E /tmp/sshd.log -p 2222
Connect
1 ssh -p 2222 root@steamlink
Take a look in the log
/tmp/sshd.log
It fails because of the ownership of the home directory.
Fix permissions
1 chmod g-w /home/steam
xow is already running
/mnt/scratch/log/S99steam spams
2020-12-20 22:53:18 ERROR - Another instance of xow is already running 2020-12-20 22:53:18 INFO - xow v0.5-2-g73f5273 ..Severin v. W. 2020-12-20 22:53:18 ERROR - Another instance of xow is already running 2020-12-20 22:53:18 INFO - xow v0.5-2-g73f5273 ..Severin v. W. 2020-12-20 22:53:18 ERROR - Another instance of xow is already running 2020-12-20 22:53:18 INFO - xow v0.5-2-g73f5273 ..Severin v. W. 2020-12-20 22:53:18 ERROR - Another instance of xow is already running 2020-12-20 22:53:18 INFO - xow v0.5-2-g73f5273 ..Severin v. W. 2020-12-20 22:53:18 ERROR - Another instance of xow is already running 2020-12-20 22:53:18 INFO - xow v0.5-2-g73f5273 ..Severin v. W. 2020-12-20 22:53:18 ERROR - Another instance of xow is already running 2020-12-20 22:53:18 INFO - xow v0.5-2-g73f5273 ..Severin v. W.
Alright let's trace it down.
At the end of boot init starts
/etc/init.d/startup/S99steam
Which starts /home/steam/rc.local
1 #!/bin/sh
2
3 cd /home/steam
4
5 export PATH=$PWD/bin:$PATH
6 export LD_LIBRARY_PATH=$PWD/lib
7
8 export LIBASOUND_THREAD_SAFE=0
9 export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
10
11 # Load modules
12 KERNEL_RELEASE=$(uname -r)
13 # Allow custom input drivers
14 for file in /lib/modules/${KERNEL_RELEASE}/kernel/drivers/hid/* /lib/modules/${KERNEL_RELEASE}/kernel/drivers/input/joystick/*; do
15 module=$(basename $file)
16 if [ -f modules/$module.disabled ]; then
17 continue
18 fi
19 if [ -f modules/$module ]; then
20 file=modules/$module
21 fi
22 insmod $file
23 done
24 insmod /lib/modules/${KERNEL_RELEASE}/kernel/arch/arm/mach-berlin/modules/pe/galois_pe.ko
25 insmod /lib/modules/${KERNEL_RELEASE}/kernel/arch/arm/mach-berlin/modules/gpu/gfx.ko
26 insmod /lib/modules/${KERNEL_RELEASE}/kernel/arch/arm/mach-berlin/modules/gpu3D/gal3d.ko contiguousSize=0x100000
27 ./bin/xow.sh &
28 sleep 1
29 ln -s /dev/graphics/gal3d /dev/gal3d
30 ln -s /dev/graphics/galcore /dev/galcore
31 chmod 777 /dev/galcore
32
33 # Note: setting this environment variable is done to prevent having
34 # PE_Single_CPU come up with one resolution, only to have the shell
35 # launch and immediately switch resolutions.
36 RESOLUTION_OVERRIDE_FILE=/mnt/config/system/display_resolution.txt
37 if [ -f "${RESOLUTION_OVERRIDE_FILE}" ]; then
38 export PE_USER_DEFAULT_RESOLUTION=$(cat "${RESOLUTION_OVERRIDE_FILE}")
39 fi
40
41 # Start PE
42 ./bin/PE_Single_CPU >/mnt/scratch/log/PE_server.log 2>&1 &
43
44 # Enable core dumps and set core dump output path
45 CORE_PATH=/mnt/scratch/tmp
46 mkdir -p $CORE_PATH
47 echo "$CORE_PATH/core.%e" >/proc/sys/kernel/core_pattern
48 ulimit -c unlimited
49
50 # Start power manager, which will start the application if appropriate
51 ./bin/powermanager.sh &
/home/steam/bin/xow.sh
And this is how XBOX controller driver is started? Honestly … this burns CPU.
Backup old file
1 cp -p $HOME/bin/xow.sh $HOME/bin/xow.sh_org
A very simple fix would be
/home/steam/bin/xow.sh
There are several instances of xow.sh running on the steamlink.
1 # ps faux| grep -e xow -e sleep
2 424 root 0:00 xow
3 789 root 0:20 {xow.sh} /bin/sh /home/steam/bin/xow.sh
4 859 root 0:25 {xow.sh} /bin/sh /home/steam/bin/xow.sh
5 884 root 0:24 {xow.sh} /bin/sh /home/steam/bin/xow.sh
6 1167 root 0:23 {xow.sh} /bin/sh /home/steam/bin/xow.sh
7 1231 root 0:22 {xow.sh} /bin/sh /home/steam/bin/xow.sh
8 1493 root 0:23 {xow.sh} /bin/sh ./bin/xow.sh
9 1576 root 0:22 {xow.sh} /bin/sh /home/steam/bin/xow.sh
10 1661 root 0:37 {xow.sh} /bin/sh /home/steam/bin/xow.sh
11 1871 root 0:32 {xow.sh} /bin/sh /home/steam/bin/xow.sh
12 1893 root 0:33 {xow.sh} /bin/sh /home/steam/bin/xow.sh
13 2657 root 0:43 {xow.sh} /bin/sh /home/steam/bin/xow.sh
14 2758 root 0:00 sleep 1
15 2760 root 0:00 sleep 1
16 2762 root 0:00 sleep 1
17 2764 root 0:00 sleep 1
18 2766 root 0:00 sleep 1
19 2768 root 0:13 {xow.sh} /bin/sh /home/steam/bin/xow.sh
20 2769 root 0:00 sleep 1
21 2771 root 0:00 grep -e xow -e sleep
22 2772 root 0:00 pgrep xow
23 2773 root 0:00 pgrep xow
24 2805 root 0:12 {xow.sh} /bin/sh /home/steam/bin/xow.sh
25 3769 root 0:16 {xow.sh} /bin/sh /home/steam/bin/xow.sh
26 3802 root 0:15 {xow.sh} /bin/sh /home/steam/bin/xow.sh
So i decided to write a new version with a lock file to avoid duplicate starts of the script.
/home/steam/bin/xow.sh
Reboot and test
1 shutdown -r now
OKAY - problem gone.
This saves CPU, thermal capacity and energy.
Crackling sound
When you are streaming from Linux and it's kinda likely that your sound is distorted heavily after some time in game. While stopping and reconnecting the steamlink to the host, this gets annoying very quickly.
There is already an active thread on
Github ValveSoftware/steam-for-linux issues - Remote Play Crackling Audio #6749
Reducing the sampling rate to 44,1 kHz (CD-quality) prolongs the time until the crackling occurs in
/etc/pulse/daemon.conf
1 default-sample-rate = 44100
It seams that recording the steam audio source froma HDMI port also works around the issue.
Open pavucontrol
- Set playback stream of the game to e.g. the HDMI port of your grafics card
- Set the recording of steam to the same HDMI device.
- Eventually reconnect to the host a last time.
Your problem should be gone.