Steam Link

Steam Link

Tutorial | Automatically start Steam Link on Raspberry Pi 3
Updated tutorial that works on Raspberry Pi 3B+
https://steamcommunity.com/sharedfiles/filedetails/?id=3383126819

_______________________
OLD tutorial that no longer works but may be useful to some
If you want to make Steam Link automatically start with your Raspberry (assuming that you already have the latest Raspbian and the Steam Link package already installed) follow the steps below.

1. Create the service file
Use nano to open a new file:
sudo nano /etc/systemd/system/steamlink.service

Then paste the following into the editor:
[Unit] Description=Start Steam Link at desktop load [Service] Type=simple User=pi ExecStart=/usr/bin/steamlink #Restart=always Restart=on-failure [Install] WantedBy=graphical.target #WantedBy=multi-user.target

Save the file using Ctrl-O, Enter, Ctrl-X

If you would like Steam Link to always be running, even when exiting normally, then uncomment the 'Restart=always' line and delete the 'Restart=on-failure' line. But make sure you can ssh into your Raspberry Pi to change it back if you need to as this will force Steam Link into full view all the time.

If you don't have a graphical desktop installed, you can also switch the commenting of the 'WantedBy' line for a truly headless Steam Link.

2. Enable the service

Again, from the terminal, run the following commands to enable the new service that we just created:
sudo systemctl daemon-reload
sudo systemctl enable steamlink.service

That's it! Reboot your Raspberry Pi and it should go directly into the Steam Link app so you can start streaming!
< >
Showing 1-13 of 13 comments
i have always used to get steam to auto start
sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
Originally posted by Tony:
i have always used to get steam to auto start
sudo nano /etc/xdg/lxsession/LXDE-pi/autostart

This did not work for me but the solution above worked. :)
The described solution was working for me fine previously on RPi with buster. However, I had to create a new card from a scratch and this time this service-based solution doesn't work for me.

After restarting nothing happened. When I ran `sudo systemctl status steamlink` to see if it's working, it reported:

● steamlink.service - Start Steam Link at desktop load Loaded: loaded (/etc/systemd/system/steamlink.service; enabled; vendor preset: enabled) Active: active (running) since Sun 2022-01-16 23:55:37 CET; 51s ago Main PID: 374 (steamlink.sh) Tasks: 25 (limit: 3292) CGroup: /system.slice/steamlink.service ├─374 /bin/bash /home/pi/.local/share/SteamLink/steamlink.sh ├─572 cec-client ├─573 steamlink-cec └─575 shell Jan 16 23:55:43 steamlink-rpi steamlink[374]: Could not queue DRM page flip on screen HDMI1 (Permission denied) Jan 16 23:55:44 steamlink-rpi steamlink[374]: INFO: Couldn't send message, trying to recreate socket Jan 16 23:55:44 steamlink-rpi steamlink[374]: INFO: Couldn't send message, trying to recreate socket Jan 16 23:55:45 steamlink-rpi steamlink[374]: INFO: Web request https://api.steampowered.com/ISteamApps/GetSDRConfig/v1?appid=1234 failed, CURL error code 6, HTTP error code 0 Jan 16 23:55:46 steamlink-rpi steamlink[374]: Could not queue DRM page flip on screen HDMI1 (Permission denied) Jan 16 23:55:48 steamlink-rpi steamlink[374]: Could not queue DRM page flip on screen HDMI1 (Permission denied) Jan 16 23:55:48 steamlink-rpi steamlink[374]: Could not queue DRM page flip on screen HDMI1 (Permission denied) Jan 16 23:55:48 steamlink-rpi steamlink[374]: Could not queue DRM page flip on screen HDMI1 (Permission denied) Jan 16 23:55:51 steamlink-rpi steamlink[374]: INFO: Connected to Remote Client service with session 6191654176516082776 Jan 16 23:55:52 steamlink-rpi steamlink[374]: Could not queue DRM page flip on screen HDMI1 (Permission denied)

(I substituted appid in CURL error to a dummy value in case that was something related with my account)

So the service was triggered upon restart. I'll start to look for a solution.
Given that I'm familiar with JavaScript programming I used a node library pm2 to autoboot steamlink and it had worked fine 🙂

The command was:

```
pm2 start steamlink --interpreter none --no-autorestart
```

For more see the pm2 library docs.
Originally posted by Sick:
Given that I'm familiar with JavaScript programming I used a node library pm2 to autoboot steamlink and it had worked fine 🙂

The command was:

```
pm2 start steamlink --interpreter none --no-autorestart
```

For more see the pm2 library docs.


How does this work? I installed node and then pm2 and then executed the command you had, which seemed to work fine, but SteamLink didn't start, not right away, and not after a reboot. What am I doing wrong?
Originally posted by Kristophersson:
Originally posted by Sick:
Given that I'm familiar with JavaScript programming I used a node library pm2 to autoboot steamlink and it had worked fine 🙂

The command was:

```
pm2 start steamlink --interpreter none --no-autorestart
```

For more see the pm2 library docs.


How does this work? I installed node and then pm2 and then executed the command you had, which seemed to work fine, but SteamLink didn't start, not right away, and not after a reboot. What am I doing wrong?

Okay, I've figured it out, and anyone that's still looking and has a raspberry pi 4, refer to this forum post: https://steamcommunity.com/app/353380/discussions/6/1642042464752247649/

Step 1: add 'gpu_mem=256' to /boot/config.txt
Step 2: Add '/bin/start-steamlink.sh' with the following content:
'sleep 10
/bin/steamlink'
And make it executable with 'sudo chmod +x /bin/start-steamlink.sh'
Step 3: Add '@/bin/start-steamlink.sh' to '/etc/xdg/lxsession/LXDE-pi/autostart' before the @screensaver line.
Step 4: Reboot
I just wanted to share, since I ran around all over the place with this issue where nothing would work. The thing that solved all my problems that I didn't really see anyone mention in any forums was just opening the raspberry pi config and changing the boot options to select "wait for network". Hopefully this helps someone
Instead of delaying the Pi boot itself, it might be more efficient to delay just the Steam Link service:

[Unit] Description=Steam Link After=network.target Requires=bluetooth.target [Service] Type=simple WorkingDirectory=%h ExecStart=steamlink Restart=on-failure RestartSec=5 [Install] WantedBy=default.target
I have tried all these options and more, but I still get:

raspberrypi steamlink[7871]: Failed to move cursor on screen HDMI1: -13
raspberrypi steamlink[7871]: Failed to move cursor on screen HDMI2: -13
raspberrypi steamlink[7871]: Could not set cursor on screen HDMI1: -13
raspberrypi steamlink[7871]: Could not set cursor on screen HDMI2: -13
raspberrypi steamlink[7871]: Could not set cursor on screen HDMI1: -13
raspberrypi steamlink[7871]: Could not set cursor on screen HDMI2: -13
raspberrypi steamlink[7871]: Connected to Remote Client service with session 1615156086612047414
raspberrypi steamlink[7871]: Could not set DRM mode for screen HDMI1 (Permission denied)
raspberrypi steamlink[7871]: Could not queue DRM page flip on screen HDMI1 (Permission denied)
raspberrypi steamlink[7871]: Could not queue DRM page flip on screen HDMI1 (Permission denied)

{EDIT}
I think the problem might be that I was trying to start Steamlink from a remote SSH terminal, rather than from the physical console. My Pi was configured as headless and even though I had set up HDMI and it was working, I wasn't logging into the thing directly, since I wasn't set up for that.

Once I plugged in a keyboard and logged in directly Steamlink started working. Now I just have to figure out why the resolution is weird and looks terrible despite a good connection.
That doesn't work.
Originally posted by f1ames0ff:
That doesn't work.
It took many trials and errors for this to make it work in 2024 on the 3b+ specifically but it finally did, check main post for updated tutorial.
Originally posted by psydex:
Originally posted by f1ames0ff:
That doesn't work.
It took many trials and errors for this to make it work in 2024 on the 3b+ specifically but it finally did, check main post for updated tutorial.
I tried it and it still doesn’t work (pie OS lite, 64 bit).

I created own tutorial which is much easier and workable: https://steamcommunity.com/app/353380/discussions/6/501685433118244791/
Originally posted by f1ames0ff:
Originally posted by psydex:
It took many trials and errors for this to make it work in 2024 on the 3b+ specifically but it finally did, check main post for updated tutorial.
I tried it and it still doesn’t work (pie OS lite, 64 bit).
It seems like you didn't follow the tutorial closely, as per my tutorial Raspbian (Buster) is REQUIRED! You seem to have installed your own OS of choice.
< >
Showing 1-13 of 13 comments
Per page: 1530 50