Open mvrk69 opened 10 months ago
From moonlight-qt 5.0.0 and up there seem to be generic ARM packages available, so it might be possible. I own a ODROID-C2 so that might be comparable to the C4 for testing. I'll give it a try when I have some spare time :)
edit: if you want to try for yourself, see this guide to install it on a Debian image to check if it can work with your hardware: https://github.com/moonlight-stream/moonlight-docs/wiki/Installing-Moonlight-Qt-on-ARM%E2%80%90based-Single-Board-Computers
I tried this manual to install moonlight-qt on my C2 with Armbian, but my device isn't compatible with moonlight-qt. It starts but very quickly segfaults:
Can you try the same manual to see if it works with your C4 so we can check compatibility?
Version 0.4.3 has an experimental Amlogic build, feel free to try it on LibreELEC Amlogic or CoreELEC.
nice to see its coming for amlogic :) i tried it on coreelec NE kodi 20 version but actually whole system is aarch64 now. New kernel version NO too. So plugin compiled wrong version of moonlight-qt, i get exec error"
bootstrap_moonlight-qt.sh: line 120: ./moonlight-qt: cannot execute binary file: Exec format error
I will try coreelec old kernel version NG which is still arm.
my build.log:
Platform amlogic-ce (aarch64) running coreelec 20.3 detected, using platform generic... Building generic_local_libs... removed 'moonlight-qt/bin/moonlight-qt' removed directory: 'moonlight-qt/bin' removed directory: 'moonlight-qt' 'tmp' -> 'moonlight-qt'
my moonlight-qt.log
Platform amlogic-ce (aarch64) running coreelec 20.3 detected, using platform generic... Running without window manager... Detected resolution 1920,2160... Using Qt scale factor 1.28... --- Starting Moonlight --- bootstrap_moonlight-qt.sh: line 120: ./moonlight-qt: cannot execute binary file: Exec format error
os-release
NAME="CoreELEC" VERSION="20.3-Nexus" ID="coreelec" VERSION_ID="20.3" PRETTY_NAME="CoreELEC (official): 20.3-Nexus" HOME_URL="https://coreelec.org" BUG_REPORT_URL="https://github.com/CoreELEC/CoreELEC" LIBREELEC_ARCH="Amlogic-ne.aarch64" LIBREELEC_BUILD="official" LIBREELEC_PROJECT="Amlogic-ce" COREELEC_ARCH="Amlogic-ne.aarch64" COREELEC_BUILD="official" COREELEC_PROJECT="Amlogic-ce" COREELEC_DEVICE="Amlogic-ne"
CoreELEC seems to add a -ce suffix, I added a workaround for it in this version. Can you try if this helps?
Oki, its build a lot :) i cant write build.log, cause after restart was deleted,
my moolight-qt.log
Platform amlogic (aarch64) running coreelec 20.3 detected... Using custom libraries from /storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-qt/lib... Using Qt library from /storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-qt/lib/qt5... Running without window manager... Detected resolution 1920,2160... Using Qt scale factor 1.28... --- Starting Moonlight --- 00:00:00 - Qt Info: Unable to detect Wayland or X11, so EGLFS will be used by default. Set QT_QPA_PLATFORM to override this. 00:00:00 - Qt Info: Setting display mode by default. Set QT_QPA_EGLFS_ALWAYS_SET_MODE=0 to override this. 00:00:00 - Qt Warning: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root' 00:00:00 - Qt Warning: Failed to load EGL device integration "eglfs_kms" 00:00:00 - Qt Fatal: EGL library doesn't support Emulator extensions bootstrap_moonlight-qt.sh: line 120: 1312 Aborted ./moonlight-qt "$@"
CoreELEC seems to add a -ce suffix, I added a workaround for it in this version. Can you try if this helps?
Hi,
With this version, on my CoreELEC-Amlogic-ng.arm-19.5-Matrix-Odroid_C4, seems to build ok, but i end up with wrong architecture binary:
.../addon_data/plugin.program.moonlight-qt/moonlight-qt/bin # ldd moonlight-qt $ not a dynamic executable
I think binaries in CoreELEC for ODROID-C4 are armhf not arm64, runs a 64-bit kernel, but userspace is 32-bit.
After adding some workarounds on the scripts:
on plugin.program.moonlight-qt/resources/bin/bootstrap_moonlight-qt.sh changed if [ "$PLATFORM_DISTRO" == "libreelec" ]; then to if [ "$PLATFORM_DISTRO" == "libreelec" ] || [ "$PLATFORM_DISTRO" == "coreelec" ]; then
on plugin.program.moonlight-qt/resources/bin/get-platform.sh changed if [ "$LIBREELEC_ARCH" == "RPi4.arm" ]; then to if [ "$LIBREELEC_ARCH" == "RPi4.arm" ] || [ "$LIBREELEC_ARCH" == "Amlogic-ng.arm" ]; then
on plugin.program.moonlight-qt/resources/bin/kodi_hooks/ created a symlink called coreelec pointing to libreelec
Now with all this changes, it built the the binaries for the correct architecture (armhf), but now i have this error when it tries to run moonlight:
Platform amlogic (armhf) running coreelec 20.3 detected... Loading LibreELEC profile for setting up environment... Using custom libraries from /storage/.kodi/userdata/profiles/Maverick/addon_data/plugin.program.moonlight-qt/moonlight-qt/lib... Using Qt library from /storage/.kodi/userdata/profiles/Maverick/addon_data/plugin.program.moonlight-qt/moonlight-qt/lib/qt5... Running without window manager... Detected resolution 1920,2160... Using Qt scale factor 1.28... Using Kodi hooks for coreelec... --- Starting Moonlight --- 00:00:00 - Qt Info: Unable to detect Wayland or X11, so EGLFS will be used by default. Set QT_QPA_PLATFORM to override this. 00:00:00 - Qt Info: Setting display mode by default. Set QT_QPA_EGLFS_ALWAYS_SET_MODE=0 to override this. 00:00:00 - Qt Warning: Unable to find a KMSDRM display device! 00:00:00 - Qt Warning: On the Raspberry Pi, you must enable the 'fake KMS' driver in raspi-config to use Moonlight outside of the GUI environment. 00:00:00 - Qt Warning: Failed to load EGL device integration "eglfs_kms" 00:00:00 - Qt Fatal: EGL library doesn't support Emulator extensions bootstrap_moonlight-qt.sh: line 128: 21200 Aborted ./moonlight-qt "$@"
I got some success getting amlogic to work. I removed some Pi-stuff from the 32-bit amlogic build and added quirks for known amlogic 64-bit kernels with 32-bit userspace. Also added hooks for CoreELEC.
My ODROID-C2 is not supported anymore on CoreELEC but it is on LibreELEC and I got it running by forcing the dri card to /dev/dri/card0. There was already a similar quirk for the Pi 5 so I decided to replace that with an option in the settings menu to force a specific card. The C2 managed to stream on 720p fairly decent for such an old device, 1080p didn't work (black screen).
Could you try the latest version and check if building ("Update moonlight to latest version") works better and get it running, optionally by forcing card0 or card1?
With the new version i still get this error when i try to launch moonlight:
moonlight-qt.log: Platform amlogic (armhf) running coreelec 20.3 detected... Loading LibreELEC profile for setting up environment... Using custom libraries from /storage/.kodi/userdata/profiles/Maverick/addon_data/plugin.program.moonlight-qt/moonlight-qt/lib... Using Qt library from /storage/.kodi/userdata/profiles/Maverick/addon_data/plugin.program.moonlight-qt/moonlight-qt/lib/qt5... Running without window manager... Detected resolution 1920,2160... Using Qt scale factor 1.28... Using Kodi hooks for coreelec... --- Starting Moonlight --- 00:00:00 - Qt Info: Unable to detect Wayland or X11, so EGLFS will be used by default. Set QT_QPA_PLATFORM to override this. 00:00:00 - Qt Info: Setting display mode by default. Set QT_QPA_EGLFS_ALWAYS_SET_MODE=0 to override this. 00:00:00 - Qt Warning: Unable to find a KMSDRM display device! 00:00:00 - Qt Warning: On the Raspberry Pi, you must enable the 'fake KMS' driver in raspi-config to use Moonlight outside of the GUI environment. 00:00:00 - Qt Warning: QStandardPaths: wrong permissions on runtime directory /var/run/, 0755 instead of 0700 00:00:00 - Qt Warning: Failed to load EGL device integration "eglfs_kms" 00:00:00 - Qt Fatal: EGL library doesn't support Emulator extensions bootstrap_moonlight-qt.sh: line 120: 4738 Aborted ./moonlight-qt "$@"
Can you explain what you mean by forcing dri card?
On CoreELEC i don't have any /dev/dri.
Can you explain what you mean by forcing dri card?
There is a new setting "EGL card" in the settings screen of the plugin in Kodi. You can now select card0 or card1 there to overwrite the default behaviour in moonlight. It was needed for my C2.
the same error no matter what card i choose
Platform amlogic (aarch64) running coreelec 20.3 detected... Loading LibreELEC profile for setting up environment... Using custom libraries from /storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-qt/lib... Using Qt library from /storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-qt/lib/qt5... Running without window manager... Forcing KMS mode: { "device": "/dev/dri/card0" } Detected resolution 1920,2160... Using Qt scale factor 1.28... Using Kodi hooks for coreelec... --- Starting Moonlight --- 00:00:00 - Qt Info: Unable to detect Wayland or X11, so EGLFS will be used by default. Set QT_QPA_PLATFORM to override this. 00:00:00 - Qt Info: Setting display mode by default. Set QT_QPA_EGLFS_ALWAYS_SET_MODE=0 to override this. 00:00:00 - Qt Warning: QStandardPaths: wrong permissions on runtime directory /var/run/, 0755 instead of 0700 00:00:00 - Qt Warning: Failed to load EGL device integration "eglfs_kms" 00:00:00 - Qt Fatal: EGL library doesn't support Emulator extensions bootstrap_moonlight-qt.sh: line 120: 4300 Aborted ./moonlight-qt "$@"
Yes, same as me:
Platform amlogic (armhf) running coreelec 20.3 detected... Loading LibreELEC profile for setting up environment... Using custom libraries from /storage/.kodi/userdata/profiles/Maverick/addon_data/plugin.program.moonlight-qt/moonlight-qt/lib... Using Qt library from /storage/.kodi/userdata/profiles/Maverick/addon_data/plugin.program.moonlight-qt/moonlight-qt/lib/qt5... Running without window manager... Forcing KMS mode: { "device": "/dev/dri/card0" }
Detected resolution 1920,2160... Using Qt scale factor 1.28... Using Kodi hooks for coreelec... --- Starting Moonlight --- 00:00:00 - Qt Info: Unable to detect Wayland or X11, so EGLFS will be used by default. Set QT_QPA_PLATFORM to override this. 00:00:00 - Qt Info: Setting display mode by default. Set QT_QPA_EGLFS_ALWAYS_SET_MODE=0 to override this. 00:00:00 - Qt Warning: Unable to find a KMSDRM display device! 00:00:00 - Qt Warning: On the Raspberry Pi, you must enable the 'fake KMS' driver in raspi-config to use Moonlight outside of the GUI environment. 00:00:00 - Qt Warning: QStandardPaths: wrong permissions on runtime directory /var/run/, 0755 instead of 0700 00:00:00 - Qt Warning: Failed to load EGL device integration "eglfs_kms" 00:00:00 - Qt Fatal: EGL library doesn't support Emulator extensions bootstrap_moonlight-qt.sh: line 120: 7738 Aborted ./moonlight-qt "$@"
Seems CoreELEC doesn't have any dri devices:
odroidc4:~ # ls -l /dev/dri/card0 ls: /dev/dri/card0: No such file or directory
odroidc4:~ # ls -l /dev/dri/card1 ls: /dev/dri/card1: No such file or directory
odroidc4:~ # ls -l /dev/dri ls: /dev/dri: No such file or directory
Strange, can you try the LibreELEC Amlogic build? Not sure but it looks like CoreELEC is missing some functionality.
my dri folder, so i have card 0, and error is the same. Iam using 20NE version.
CoreELEC:/dev/dri # ls by-path card0 renderD128
Could you try the LibreELEC builds to figure out if this is software or hardware related?
Any news on this feature? I've installed 0.4.3 and 0.4.4 versions on Ugoos AM6B+ but Moonlight isn't starting. On 0.4.4 it restarts Kodi.
Hi,
Is there any possibility of a version for CoreELEC (ODROID-C4)?