swetoast / steamlink-launcher

Steamlink launcher for OSMC
GNU General Public License v2.0
157 stars 19 forks source link

Raspberry Pi 4 #13

Closed mdPlusPlus closed 4 years ago

mdPlusPlus commented 4 years ago

In the README.md it says:

its intended for RPI 2 and 3 not 4

Could we get a quick explanation on why the Raspberry Pi 4 is not supported and whether it will be supported in the future?

What work needs to be done to make it work on the Pi 4 (if possible at all)?

swetoast commented 4 years ago

it probly will be but for now its not

swetoast commented 4 years ago

its due to HW issues in the firmware, since it might not run as intended when streaming in full hd again this is due to the firmware

techically u can install it but it might not run smooth

mdPlusPlus commented 4 years ago

When you say firmware you mean the one located in the Raspberry Pi's EEPROM?
Are we talking about explicit bugs in the current firmware or have certain APIs/syscalls/whatever changed due to Video Core VI having a new hardware decoder?

swetoast commented 4 years ago

last time i check the checked it couldnt handle full hd without lagging but if you have a rpi4 feel free to try it out and report back

mdPlusPlus commented 4 years ago

Okay, this is still very vague. So the issue is with OSMC (and LibreELEC) not being able to utiliize hardware accelerated video decoding? I'm just trying to find out what I have to look out for.

Guess I'll just have to try it out.

Edit: I just realized you were probably talking about OSMC not providing a Raspberry Pi 4 image yet. LibreELEC however does support the Pi 4 already.
There will be experimental builds of OSMC soon, though:
https://osmc.tv/2020/06/osmcs-june-update-is-here-with-kodi-v18-7/

We also continue to work on Raspberry Pi 4 support and we will shortly make some kernel 5.x test builds available in our forums for currently supported Pi models so we can use a unified kernel code base for all models.

mdPlusPlus commented 4 years ago

Until the OSMC test images are up, I'm trying to get this to work on LibreELEC: https://github.com/mdPlusPlus/steamlink-launcher
Changes: https://github.com/swetoast/steamlink-launcher/compare/dev...mdPlusPlus:dev

I was able to fix your installation script so it would install on LibreELEC-RPi4.arm-9.80-Milhouse-20200602023748-#0601-g44747ec.

However, running /storage/steamlink/steamlink.sh results in the following error:
* failed to add service - already in use?

Official responses in the Steam forums indicate you need X11 to run Steam Link.
LibreELEC does not ship with X11 anymore, though.

Do you have any idea how to work around this? Would this require custom LibreELEC builds with X11 enabled? Or am I missing something and X11 isn't required at all under LibreELEC?

Edit: Apparently X11 can be included at build time: https://github.com/LibreELEC/LibreELEC.tv/blob/0848005fbf0dedb148df71ed1b137ab2ab2d497e/projects/RPi/options#L79-L80
I guess I'm going to compile my own image and see if it works there. At least I'm going to get confirmation on whether Steam Link will ever be able to be run on the official image or not.

Edit2: Okay, simply including X11 in the build did not work. I'm getting the following error on the screen:

failed to start xorg.
is your GPU supported?

And on the command line:

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Aborted

I'm out of ideas for now. If anyone feels like picking up my work, go ahead.

swetoast commented 4 years ago

Did u manage to get it running ?

mdPlusPlus commented 4 years ago

Not on a Raspberry Pi 4 running LibreELEC. However, I started a complete rewrite which currently installs and starts fine under Kodi Matrix on LibreELEC and OSMC on a Raspberry Pi 3: https://github.com/mdPlusPlus/steamlink-launcher/tree/rewrite/
(I will probably put that branch into its own repository though.)

Next on the map is the installation under Kodi 19 on Raspberry Pi OS (formerly Raspbian). Then I will check whether the actual streaming works how it's supposed to.

swetoast commented 4 years ago

So feel free to push updates to my dev branch if you find issues :)

mdPlusPlus commented 4 years ago

I stumbled upon several issues which I tried to address in my dev and later the systemd branch: https://github.com/mdPlusPlus/steamlink-launcher/commits/systemd I'm not sure which state that branch is currently in, since I focussed on the rewrite in Python.

I think it is in a working state on a RPi3 running LibreELEC Matrix and the only issue is unwanted autostart at boot, which can easily be fixed by adding ConditionPathExists=/tmp/steamlink.ready to the systemd service file and then actually writing /tmp/steamlink.ready before starting it.

However, I don't think I will put any more work into these branches, as I found the Python rewrite to be more flexible.