veldenb / plugin.program.moonlight-qt

A launcher and updater for running Moonlight-qt on LibreELEC.
GNU General Public License v3.0
86 stars 11 forks source link

Crash on LibreElec 10.95.0 (Kodi 20) due to missing libssl1.1.so and no HW-decoding #30

Closed Tea23 closed 1 year ago

Tea23 commented 1 year ago

In LibrELEC 10.95.0 which is running Kodi 20, Moonlight will cause Kodi to restart because libssl.so.1.1 cannot be found.

I have tried adding libssl1.1 to the Dockerfile with no luck. I'm not sure "where" libssl is meant to be coming from, I'd have figured in the container?

Jan 31 19:51:36.842627 vulcan systemd[1]: Started run-r2d9383b5a645470db5c281f73948177d.service.
Jan 31 19:51:36.844040 vulcan kodi.sh[16560]: Running as unit: run-r2d9383b5a645470db5c281f73948177d.service
Jan 31 19:51:36.857178 vulcan bash[16564]: Platform 'rpi' running 'libreelec' detected...
Jan 31 19:51:36.857178 vulcan bash[16564]: Loading LibreELEC profile for setting up environment...
Jan 31 19:51:36.876088 vulcan bash[16564]: Using custom libraries from /storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-qt/lib...
Jan 31 19:51:36.876088 vulcan bash[16564]: Using Qt library from /storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-qt/lib/qt5...
Jan 31 19:51:36.876379 vulcan bash[16564]: Running without window manager...
Jan 31 19:51:36.881990 vulcan bash[16564]: Detected resolution 1920,1080...
Jan 31 19:51:36.881990 vulcan bash[16564]: Using Qt scale factor 0.64...
Jan 31 19:51:36.900378 vulcan bash[16564]: Using Kodi hooks for libreelec...
Jan 31 19:51:36.939234 vulcan systemd[1]: Stopping kodi.service...
Jan 31 19:51:45.546674 vulcan systemd[1]: kodi.service: Deactivated successfully.
Jan 31 19:51:45.547065 vulcan systemd[1]: Stopped kodi.service.
Jan 31 19:51:45.547539 vulcan systemd[1]: kodi.service: Consumed 3min 58.948s CPU time.
Jan 31 19:51:45.549123 vulcan bash[16564]: --- Starting Moonlight ---
Jan 31 19:51:45.553622 vulcan bash[16564]: ./moonlight-qt: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
Jan 31 19:51:45.573131 vulcan systemd[1]: Starting kodi.service...
Jan 31 19:51:45.584988 vulcan systemd[1]: Started kodi.service.
Jan 31 19:51:45.590142 vulcan systemd[1]: run-r2d9383b5a645470db5c281f73948177d.service: Deactivated successfully.
Tea23 commented 1 year ago

I have it running now by adding libssl.so* and libcrypto.so* to create_standalone_moonlight_qt.sh but it doesn't have GPU acceleration. Moonlight throws a warning that there's no functioning hardware accelerated decoder.

veldenb commented 1 year ago

Hi,

Adding libssl there should indeed fix the missing library. Hardware acceleration is another issue that I think is an issue in moonlight itself. I created an issue for it upstream: https://github.com/moonlight-stream/moonlight-qt/issues/922

The currently stable LibreELEC 10 (kodi 19) should work.

JeroenED commented 1 year ago

Hi, I just wanted to check.

You are mainly refering to raspberry pi 4? Does that mean this issue is only observed on raspberry pi 4 for now? Or is it known to crash on Generic LE as well?

I'm mainly asking to know that I have the same issue or need to create my own issue. I have currently installed the latest master of the addon on LE on my HTPC (intel processor with igpu). I can confirm that moonlight is starting and everything seems to be working but the moment you try to start a game it all turns black and only closing the game is the only path to go.

Philltorian commented 1 year ago

I can confirm that moonlight is starting and everything seems to be working but the moment you try to start a game it all turns black and only closing the game is the only path to go.

You will need to go into the moonlight settings and set the Video Decoder to Force Software as hardware acceleration is currently not working with the most recent version of LibreElec.

veldenb commented 1 year ago

Ok, there is some progress on the Pi 4 front.

If you extract the executable from this zip moonlight-qt.zip (armhf) and put it in /storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-qt/bin/ in LibreELEC you should be good to go. You can use this as a workaround until a new version of moonlight-qt is released.

I'm not sure about the hardware acceleration on the Generic LE builds. Downloading master should fix the libssl1.1-error, but hardware acceleration needs to be fixed in moonlight itself.

veldenb commented 1 year ago

I found a new build for Generic LE. I haven't tried it myself yet but maybe it works: moonlight-qt-amd64.zip

Same instructions as for the pi4, extract it and put it in the bin-folder.

JeroenED commented 1 year ago

Hi, I cannot confirm yet that it works. The only thing I can confirm is that the build linked requires some dependencies that are not met (fixed libopus and started complaining about libvdpau, so gave up for now since I could only do quick fixes). I will create a PR whenI got it fixed. However I'm not sure if these dependencies are permanent.

Or maybe they are related to the GBM/X11 change in libreelec generic 💡

veldenb commented 1 year ago

Or maybe they are related to the GBM/X11 change in libreelec generic 💡

In LE 19 X11 was used for moonlight-qt, so this might be a differcult change to manage.

veldenb commented 1 year ago

Any succes on the LE Legacy Generic image with X11?

JeroenED commented 1 year ago

Any succes on the LE Legacy Generic image with X11?

Cannot test that one. Don't have a VM to test this. Was testing straight on my htpc.

In LE 19 X11 was used for moonlight-qt, so this might be a differcult change to manage.

I meanwhile realised that with official appimage it was running (justthe menu, but this has become impossible as well) so might just be this build and that there need to be some cleaning.

veldenb commented 1 year ago

Hi all,

v0.3.0 should fix the LibreELEC 11 Rpi and Generic issues. Install the update and update moonlight-qt.

For LibreELEC 11 Generic the legacy-image is recommended. The regular image doesn't seem to work well with moonlight-qt because hardware acceleration is very limited.

Tea23 commented 1 year ago

So far with 0.3.0 and updated moonlight-qt I get maybe a frame of video before it crashes. Not sure if thats on the moonlight or sunshine side.

veldenb commented 1 year ago

@Tea23 can you post your cat /storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-qt.log?

Tea23 commented 1 year ago

Yep here we go:

https://gist.github.com/Tea23/3a36d61a0fb77157e095f941101abe5f

Moved to gist because it's pretty big

veldenb commented 1 year ago

@Tea23 it looks like Sunshine or Gamestream stops sending data:

00:00:04 - SDL Info (0): Control stream received unexpected disconnect event
00:00:04 - SDL Error (0): Connection terminated: -1
00:00:04 - SDL Info (0): Quit event received
00:00:04 - SDL Info (0): Failed to send ENet control packet

So the plugin works, but there is still a problem on the host. Maybe a problem with GPU-scheduling: https://github.com/moonlight-stream/nvidia-gamestream-issues/issues/27