spleen1981 / retroarch-kodi-addon-CoreELEC

RetroArch KODI add-on for CoreELEC
51 stars 5 forks source link

S922x support? (Odroid N2+) #1

Closed AlgusDark closed 2 years ago

AlgusDark commented 2 years ago

Hi, first of all, amazing work here. This is something that I've been waiting for. Any ideas on how to get this working in an odroid N2? I tried the latest release but it doesn't do anything. I can try to compile it but I was wondering if you have some instructions on some Params I should use instead or if this requires extra work.

Thanks!

AlgusDark commented 2 years ago

I was able to run it if I uncheck the "close Kodi" setting, but my controller isn't configured and I need to reconnect my keyboard to start working. Also, no sound.

spleen1981 commented 2 years ago

Hi, I don't have this device to test, but default script settings (AMLG12 device) should be already ok. You may try v1.4.0 What is your CoreELEC version? What does it mean "doesn't do anything"? Do you see the addon installed in kodi? When you launch the addon, is kodi restarting? Do you see the notice "RetroArch Launching"? Give some detail pls. Do you have any retroarch log file in /storage? If you activated verbose logging and logging of retroarch output in addon settings you should find a /storage/retroarch.log. check that and share. Other things you may try: Access the device through SSH and:

spleen1981 commented 2 years ago

I was able to run it if I uncheck the "close Kodi" setting, but my controller isn't configured and I need to reconnect my keyboard to start working. Also, no sound.

ok good, what's the output if you access through SSH and type systemctl stop kodi with v1.4.0? Try it while kodi is open. Also providing the output of retroarch.start (if any) would be useful as per my previous post (again while kodi is open). Audio issue occurs with a specific core or all of them? What is the audio driver currently selected in RA settings? If you have CEC working you should be able to navigate RA menu with the remote controller (if option is activated in addon settings) and set up the gamepads (this is supposed to happen on first run only with that gamepad). Also you may download controller profiles and other stuff through RA online updater.

flutejoust commented 2 years ago

Hey there. Thanks for your work on this.

I'm also having trouble getting this running properly on an N2+. I'm able to update assets. controller profiles, etc, but selecting Update Installed Cores returns a "Failed to retrieve core list!" error. When I select Core Downloader, it says "Fetching core list..." but nothing happens and trying to navigate the menu after that causes the screen to glitch out and I can't click on anything else. I'm also not getting audio.

Here's a video: https://youtu.be/4GTDY20E_G4

And here's the log file (I wasn't able to glean any useful info from it, but maybe you can): retroarch.log

spleen1981 commented 2 years ago

Hey there. Thanks for your work on this.

I'm also having trouble getting this running properly on an N2+. I'm able to update assets. controller profiles, etc, but selecting Update Installed Cores returns a "Failed to retrieve core list!" error. When I select Core Downloader, it says "Fetching core list..." but nothing happens and trying to navigate the menu after that causes the screen to glitch out and I can't click on anything else. I'm also not getting audio.

Here's a video: https://youtu.be/4GTDY20E_G4

And here's the log file (I wasn't able to glean any useful info from it, but maybe you can): retroarch.log

Hi, both the unavailability of cores from online updater for armhf and the following mess up of UI are related to retroarch itself (and not specific to N2+). First issue should be related to the missing built cores here for armhf, not sure why. Second seems to be a retroarch bug, I will try to take a look and submit a PR if I find something.

However all needed cores should be available in the package and updated in the next revs, similarly to Lakka distro. Should an additional package be needed, it can be added with the build script as per instructions in README.md. Actually the core downloader feature is useless, I will take a look if it can be selectively removed easily with RA build options. Thanks for the feedback anyways.

AlgusDark commented 2 years ago

Hi, thanks for the reponse. Here is more info.

CoreElec Version: 19.4-Matrix_rc2 When I launch retroarch plugin, the screen goes black. If I push the ESC key several times, I can go back to kodi. This is with setting “stop kodi before launching RetroArch” enabled.

This is /storage/retroarch.log:

[INFO] [Config]: Loading config from: "/storage/.config/retroarch//retroarch.cfg".
[INFO] RetroArch 1.10.0 (Git 60eaf14afc)
[INFO] === Build =======================================
[INFO] Capabilities:  NEON ASIMD
[INFO] Built: Jan 29 2022
[INFO] Version: 1.10.0
[INFO] Git: 60eaf14afc
[INFO] =================================================
[INFO] [Input]: Found input driver: "udev".
[INFO] [Environ]: SET_PIXEL_FORMAT: RGB565.
[INFO] [Core]: Version of libretro API: 1, Compiled against API: 1
[INFO] [Audio]: Set audio input rate to: 48000.00 Hz.
[INFO] [Video]: Set video size to: fullscreen.
[INFO] [Video]: Starting threaded video driver ...
[INFO] [EGL] Falling back to eglGetDisplay
[INFO] [EGL]: EGL version: 1.4
[INFO] [EGL]: Created shared context: 0xf241e710.
[INFO] [EGL]: Current context: 0xf2445880.
[INFO] [GL]: Found GL context: "fbdev_mali".
[INFO] [GL]: Detecting screen resolution: 1920x1080.
[INFO] [GL]: Vendor: ARM, Renderer: Mali-G52.
[INFO] [GL]: Version: OpenGL ES 3.2 git.db77a4c.74502ed16b0fc2da36c811f236840b85.
[INFO] [GL]: Using resolution 1920x1080.
[INFO] [GL]: Default shader backend found: glsl.
[INFO] [Shader driver]: Using GLSL shader backend.
[WARN] [GL]: Stock GLSL shaders will be used.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] Setting up menu pipeline shaders for XMB ...
[INFO] [GLSL]: Compiling ribbon shader..
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Compiling simple ribbon shader..
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Compiling snow shader..
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Compiling modern snow shader..
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Compiling bokeh shader..
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Compiling snowflake shader..
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GL]: Using 4 textures.
[INFO] [GL]: Loaded 1 program(s).
[ERROR] [Font]: Failed to create rendering backend: "freetype".
[ERROR] [Font]: Failed to create rendering backend: "stb-unicode".
[INFO] [Font]: Using font rendering backend: "bitmap".
[INFO] [Video]: Graphics driver did not initialize an input driver. Attempting to pick a suitable driver.
[WARN] [udev]: Full-screen pointer won't be available.
[INFO] [udev]: Keyboard #0: "meson-ir" (/dev/input/event2).
[INFO] [udev]: Keyboard #1: "cec_input" (/dev/input/event0).
[INFO] [udev]: Keyboard #2: "cec-mini-kb" (/dev/input/event3).
[INFO] [udev]: Pad #0 (/dev/input/event1) supports force feedback.
[INFO] [udev]: Pad #0 (/dev/input/event1) supports 16 force feedback effects.
[INFO] [Joypad]: Found joypad driver: "udev".
[INFO] [Video]: Found display server: "null".
[WARN] [udev]: Mouse grab/ungrab feature unavailable.
[INFO] ALSA: Using signed 16-bit format.
[INFO] ALSA: Period size: 384 frames
[INFO] ALSA: Buffer size: 1536 frames
[INFO] [Display]: Found display driver: "gl".
[ERROR] [Font]: Failed to create rendering backend: "freetype".
[ERROR] [Font]: Failed to create rendering backend: "stb-unicode".
[ERROR] [Font]: Failed to create rendering backend: "freetype".
[ERROR] [Font]: Failed to create rendering backend: "stb-unicode".
[ERROR] [Font]: Failed to create rendering backend: "freetype".
[ERROR] [Font]: Failed to create rendering backend: "stb-unicode".
[ERROR] [Font]: Failed to create rendering backend: "freetype".
[ERROR] [Font]: Failed to create rendering backend: "stb-unicode".
[ERROR] [Font]: Failed to create rendering backend: "freetype".
[ERROR] [Font]: Failed to create rendering backend: "stb-unicode".
[WARN] [XMB] Asset missing: /storage/.kodi/addons/script.retroarch.launcher.Amlogic-ng.arm/resources/assets/xmb/monochrome/png/retroarch.png
[WARN] [XMB] Critical asset missing, no icons will be drawn
[INFO] [SRAM]: SRAM will not be saved.
[INFO] [Playlist]: Loading history file: "/storage/.config/retroarch/content_history.lpl".
[INFO] [Playlist]: Loading history file: "/storage/.config/retroarch/content_music_history.lpl".
[INFO] [Playlist]: Loading history file: "/storage/.config/retroarch/content_video_history.lpl".
[INFO] [Playlist]: Loading history file: "/storage/.config/retroarch/content_image_history.lpl".
[INFO] [Playlist]: Loading favorites file: "/storage/.config/retroarch/content_favorites.lpl".

Doing retroarch.start does the same as above, black screen. Doing retroarch -v starts retroarch, even with “stop kodi before launching RetroArch” enabled, the problem is that when I try to navigate, it actually navigates kodi and I have both kodi layout + retroarch layout running on the same time. It looks like an overlay where kodi is the one that has the control while the retroarch looks like an animated background. Output is:

[INFO] [Config]: Loading default config.
[INFO] [Config]: Looking for config in: "/storage/.config/retroarch/retroarch.cfg"

Doing systemctl stop kodi puts the screen on black. I tried after retroarch -v.

spleen1981 commented 2 years ago

Retroarch log seems to be ok. Did you try the latest version (v1.4.0)? No error is printed for retroarch.start? Also after retroarch.start try waiting few minutes and see if anything happens. What happens if you type systemctl stop kodi and then retroarch -v?

AlgusDark commented 2 years ago

Yes, everything is done with v1.4.0. Btw, after updating from retroarch to get updates, I was able to use the gamepad.

The only print after retroarch.start is:

Running as unit: cec-kb.service

Nothing happens after several minutes, a black screen is all I have.

When I systemctl stop kodi, the screen goes black and then I retroarch -v, the only output from the terminal is:

[INFO] [Config]: Loading default config.
[INFO] [Config]: Looking for config in: "/storage/.config/retroarch/retroarch.cfg".
spleen1981 commented 2 years ago

I'm not able to reproduce the issue, so it's hard to figure out what happens... @flutejoust do you have the same issue with the "Stop Kodi" setting? However based on the logs everything is working including retroarch (as ESC-ESC closes RA and goes back to Kodi), but nothing is displayed, so maybe is something related to the buggy libmali and retroarch itself.

We can try to find the cause by some trial and error. From terminal, after systemctl stop kodi:

If no results from the above, try to reboot and launch RA addon from kodi with "Stop Kodi" setting enabled, and while the screen is black launch from terminal ./fbtestfix and see what happens. Also you may share /storage/.kodi/temp/kodi.log after systemctl stop kodi

spleen1981 commented 2 years ago

Ok, maybe it's simpler than what I though... I suspect you have CEC setting to power off the screen on kodi exit activated (which I don't use). Hence after systemctl stop kodi you cannot see anything simply because the monitor/TV is in stand-by... Then to fix it you may change this setting to off in kodi or try v1.4.1 which includes a workaround for this.

AlgusDark commented 2 years ago

Interesting. Let me try it today and I'll post back :)

spleen1981 commented 2 years ago

Guess v1.4.1 closes the issue.