libretro / Lakka-LibreELEC

Lakka is a lightweight Linux distribution that transforms a small computer into a full blown game console.
https://www.lakka.tv
1.74k stars 286 forks source link

Orange Pi 4 LTS support #1686

Closed soda-pop-ice-cream closed 2 months ago

soda-pop-ice-cream commented 2 years ago

Hello! It's possible to add support of Orange Pi 4 LTS board? It's same Orange Pi 4, but with diffirent WiFi + BT chip(CDW 20U5622-00 instead of AP6256) On Lakka website listed literally all RK3399 boards except it. I tested all provided RK3399 boards images with no luck(and sorry for generating some network load). I had luck booting up image for ROCKPro64 board from Batocera, and everything works except WiFi and BT. I have UART and would be glad to test images and provide logs.

Se121d90af825407fa85f8d9dc5482d2cy

slowpokefarm commented 2 years ago

+1 to this. Original Orange Pi 4 seems not to be even available for purchase anymore with only LTS version left on the market.

Ntemis commented 2 years ago

Unfortunately orange pi dont send R&D boards to our team so we cant fix this

slowpokefarm commented 2 years ago

I have contacted Orange Pi customer support about this issue with Pi 4 LTS drivers and they responded positively about them willing to help to resolve it. They also mentioned they have contacted Lakka team and @Ntemis specifically. Please tell if there is some progress with this issue in case they actually did contact anyone. I kind of already regret getting LTS boards for Lakka.

Ntemis commented 2 years ago

@slowpokefarm can you come over to lakka channel over discord/retroarch ? I don't remember been ever contacted by them for the Orange Pi 4 or any board Also you sure CDW 20U5622-00 is even supported by linux?

dmrlawson commented 2 years ago

@slowpokefarm @soda-pop-ice-cream please could you have a go with this image?

https://nightly.builds.lakka.tv/members/dmrlawson/Lakka-RK3399.aarch64-4.2-devel-20220717183455-62320b3-orangepi-4-lts.img.gz

I expect that sound/WiFi/ethernet/Bluetooth do not work yet, but other things should

soda-pop-ice-cream commented 2 years ago

@dmrlawson thank you! I tested it and results so far: Sound - work! WIFI - doesn't work Bluetooth - doesn't work Ethernet - ethernet port itself works, it has link, but can't acquire IP-addres with DHCP(dispaying 169.254.. IP-address). I tried adding some random ip from my router subnet as static via connman but sadly it didn't work too, even after i manually added default route

So, i tested some random snes, nes, megadrive games, even with shaders, and everything emulation-related works. Some logs:

dmesg.log boot.log connman.log log-2021-10-29-09.24.32.zip

slowpokefarm commented 2 years ago

I have tested the latest available image on nightly list, the results are similar to those of @soda-pop-ice-cream

Networking doesn't work, neither wireless nor wired. eth0 interface receives wrong IP address, network doesn't work after setting a valid address manually.

Bluetooth doesn't work.

dmrlawson commented 1 year ago

@slowpokefarm @soda-pop-ice-cream please would you try out this build?

https://nightly.builds.lakka.tv/members/dmrlawson/Lakka-RK3399.aarch64-5.0-devel-20221016235533-cc0fbe3-orangepi-4-lts.img.gz

Ethernet is working for me now, I'll try to get the wifi/bt going next.

I get a black screen with mupen64plus. Dolphin works but is slow.

soda-pop-ice-cream commented 1 year ago

@dmrlawson doesn't boot for me:

U-Boot TPL 2022.10 (Oct 16 2022 - 23:39:53)                                  
sdram_init: DDR3 - 666MHz failed!                                            
rk3399_dmc_init DRAM init failed -22                                         
Missing DTB
dmrlawson commented 1 year ago

@dmrlawson doesn't boot for me:

U-Boot TPL 2022.10 (Oct 16 2022 - 23:39:53)                                  
sdram_init: DDR3 - 666MHz failed!                                            
rk3399_dmc_init DRAM init failed -22                                         
Missing DTB

Hm, sorry about that. Maybe I linked the wrong version. Will check tonight.

dmrlawson commented 1 year ago

@soda-pop-ice-cream I just flashed the image at the link I posted above to a fresh SD card and it worked. Would you mind trying again?

soda-pop-ice-cream commented 1 year ago

Well, I tried 2 different SD cards, had no luck on both. Previous build that you provided in july boots just fine on both of them.

dmrlawson commented 1 year ago

Very strange. Thank you very much for trying again.

The only thing I can think of at the moment is to get more data. @Ntemis did you have one of these?

Ntemis commented 1 year ago

I do. I can test tonight

Στις Τετ, 19 Οκτ 2022, 09:54 ο χρήστης David Lawson < @.***> έγραψε:

Very strange. Thank you very much for trying again.

The only thing I can think of at the moment is to get more data. @Ntemis https://github.com/Ntemis did you have one of these?

— Reply to this email directly, view it on GitHub https://github.com/libretro/Lakka-LibreELEC/issues/1686#issuecomment-1283520111, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQGQ5N32SCWGF7J7LXIXPLWD6LJXANCNFSM5T2NBARA . You are receiving this because you were mentioned.Message ID: @.***>

Ntemis commented 1 year ago

Boots ethernet works no wifi or Bluetooth

Στις Τετ, 19 Οκτ 2022, 14:18 ο χρήστης Demetris Ierokipides < @.***> έγραψε:

I do. I can test tonight

Στις Τετ, 19 Οκτ 2022, 09:54 ο χρήστης David Lawson < @.***> έγραψε:

Very strange. Thank you very much for trying again.

The only thing I can think of at the moment is to get more data. @Ntemis https://github.com/Ntemis did you have one of these?

— Reply to this email directly, view it on GitHub https://github.com/libretro/Lakka-LibreELEC/issues/1686#issuecomment-1283520111, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQGQ5N32SCWGF7J7LXIXPLWD6LJXANCNFSM5T2NBARA . You are receiving this because you were mentioned.Message ID: @.***>

dmrlawson commented 1 year ago

@soda-pop-ice-cream I suspect one of two things:

Could you try the older image you tried before and reported working? If this no longer works I think it's option two. If it does and the new image doesn't work when flashed with the same process I've no idea what's going on.

slowpokefarm commented 1 year ago

Is there any progress on this? I can't test the latest image at the moment since I'm away from hardware, just wanted to know if anyone tested it since October.

dmrlawson commented 1 year ago

Is there any progress on this? I can't test the latest image at the moment since I'm away from hardware, just wanted to know if anyone tested it since October.

The patches to make it build with ethernet support are merged into the Lakka-v5.x branch. It boots for Ntemis and me but not soda-pop-ice-cream for some unknown reason.

I recently managed to build the wifi/bt drivers (or at least part of them) but haven't had any success getting them to work yet.

We don't have nightly builds for v5 yet but when we do I'll make sure we're building for it.

slowpokefarm commented 1 year ago

I'm finally able to test the build, which image should I try?

ToKe79 commented 1 year ago

you can check latest devel build with orange-pi4-lts in the file name.

slowpokefarm commented 1 year ago

you can check latest devel build with orange-pi4-lts in the file name.

Ethernet works, no wifi/bluetooth, mupen64plus and PPSSPP show black screen only. Do I need to test anything else?

slowpokefarm commented 1 year ago

Did some more testing with 22030304 build, I was able to run Dolphin with GameCube ROM exactly once and it was running smoothly without any issues or FPS drops. After that one time it always ended with black screen again with bad_ps_OGL_0.txt file created in Dump containing the following:

Details

``` #version 310 es #define FORCE_EARLY_Z layout(early_fragment_tests) in #define ATTRIBUTE_LOCATION(x) #define FRAGMENT_OUTPUT_LOCATION(x) #define FRAGMENT_OUTPUT_LOCATION_INDEXED(x, y) #define UBO_BINDING(packing, x) layout(packing, binding = x) #define SAMPLER_BINDING(x) layout(binding = x) #define TEXEL_BUFFER_BINDING(x) layout(binding = x) #define SSBO_BINDING(x) layout(binding = x) #define IMAGE_BINDING(format, x) layout(format, binding = x) #define VARYING_LOCATION(x) #extension GL_OES_texture_buffer : enable #extension GL_EXT_blend_func_extended : enable #extension GL_EXT_shader_framebuffer_fetch: enable #define FB_FETCH_VALUE real_ocol0 #define FRAGMENT_INOUT inout precision highp float; precision highp int; precision highp sampler2DArray; precision highp usamplerBuffer; precision highp sampler2DMS; precision highp image2DArray; #define API_OPENGL 1 #define float2 vec2 #define float3 vec3 #define float4 vec4 #define uint2 uvec2 #define uint3 uvec3 #define uint4 uvec4 #define int2 ivec2 #define int3 ivec3 #define int4 ivec4 #define frac fract #define lerp mix SAMPLER_BINDING(0) uniform sampler2DMSArray samp0; VARYING_LOCATION(0) in float3 v_tex0; FRAGMENT_OUTPUT_LOCATION(0) out float ocol0; void main() { int layer = int(v_tex0.z); int3 coords = int3(int2(gl_FragCoord.xy), layer); ocol0 = texelFetch(samp0, coords, 0).r; for (int i = 1; i < 4; i++) ocol0 = min(ocol0, texelFetch(samp0, coords, i).r); } 0:49(29): error: illegal use of reserved word `sampler2DMSArray' 0:49(29): error: syntax error, unexpected ERROR_TOK \00 Dolphin Version: Dolphin [HEAD] 2f4b0f7 Video Backend: OpenGL ES ```

I also was able to run a lot of more lightweight cores for NES, SNES, GBA etc without any issues. I also was able to run PPSSPP core with x2 resolution without any fps drops or other issues. I also tried to run Mupen64Plus-next core with N64 roms but each time Lakka was restarting without leaving any logs.

EDIT: The issue with dolphin blackout seems to be a bug in the emulator according to following threads:

  1. https://gitlab.freedesktop.org/mesa/mesa/-/issues/8405
  2. https://github.com/dolphin-emu/dolphin/pull/11628

I suppose provided fix will reach upstream and dolphin will work but I still have no idea what could cause it to run once without issues.

EDIT 2: Tried running ps2 emulation with Play!, performance is expectedly poor. Is PCSX2 available to test with lakka? PS1 emulation works with no issues under any provided emulator, especially PCSX reARMed.

slowpokefarm commented 1 year ago

Small update - I switched off MSAA for dolphin and it works with orange pi 4 lts under lakka devbuild v5.x. Mupen64Plus-next does not work both on pi 3 lts and pi 4 lts. Always restarts lakka without producing any logs or dumps.

Ethernet works, wi-fi and bluetooth don't work.

gordaogameplay commented 8 months ago

Hello, it's been a while since the topic had any related progress, I've had an orangepi 4 LTS board for a long time, and this month I started using it again but wanting to use the emulation resources. When searching on the internet I found Lakka, but their website does not have a specific image for orangepi 4 lts, so I found this topic. Has anyone had any progress on a fully functional image?

Ntemis commented 8 months ago

https://nightly.builds.lakka.tv/2024-02-02_5.x/RK3399.aarch64/Lakka-RK3399.aarch64-devbuild-v5.x-20240202-0acbf0c-orangepi-4-lts.img.gz

gordaogameplay commented 8 months ago

https://nightly.builds.lakka.tv/2024-02-02_5.x/RK3399.aarch64/Lakka-RK3399.aarch64-devbuild-v5.x-20240202-0acbf0c-orangepi-4-lts.img.gz

Thanks @Ntemis, But, is it normal for the screen to go black and the Orange Pi to not show any blinking LEDs, indicating that something is being done by the system?

Edit: 30 minutes have passed after inserting the microSD with this image, and the screen connected to the orangepi 4 LTS is still black. and the LEDs do not blink. It's normal? I'm going to leave orangepi connected in this state to test if it will start at some point, I believe it is taking a while to create partitions and the like, just like the other LAKKA distros do.

gordaogameplay commented 8 months ago

https://nightly.builds.lakka.tv/2024-02-02_5.x/RK3399.aarch64/Lakka-RK3399.aarch64-devbuild-v5.x-20240202-0acbf0c-orangepi-4-lts.img.gz

this img still not working, nothing happens when i turn on my orangepi 4 with th SD card =( any solution?

Ntemis commented 8 months ago

will test this when i find some time

gordaogameplay commented 8 months ago

will test this when i find some time

Thanks a lot, i appreciate so much!

gouchi commented 6 months ago

What is the status on the port ?

Can you make a test with latest nightly ?

Thank you.

Ntemis commented 4 months ago

@gordaogameplay If you don't test stable 5.0 then i have to shut this down, i give you 4 days until monday

WiseToad commented 4 months ago

Hello!

I tested my Orange Pi 4 LTS board with some versions of Lakka and got the following results:

I noticed that the dtb file appeared on sd card after flushing 4.3 version differs from the same file for the 5.0 version. So, maybe new version contains invalid dtb file and that the reason why new version doesn't work for me?

btw, I managed to build 5.x from source (it was challenge for me, the process wasn't smooth). So, result is the same - no image on screen, no flashing light after sbc powered on with the image built by me.

gordaogameplay commented 3 months ago

Has anyone tested the versions shown in the post above to see if they have a 3DS emulator?

Ntemis commented 2 months ago

OP request was fulfilled, i tested and is fully working on me, closing down. Please open a new one if issues continue on next stable.

gordaogameplay commented 2 months ago

OP request was fulfilled, i tested and is fully working on me, closing down. Please open a new one if issues continue on next stable.

What version are you using? Do you have an OrangePi 4 LTS or are you emulating? I don't mean to offend, because you clearly have much more knowledge than me, and I respect that, but I went to this link https://nightly.builds.lakka.tv , and downloaded literally every version from this site. I tested them all and none of them work, and it's not because I'm stupid, because all the Linux and Android versions I tested worked (not for emulation purposes), only the Lakka versions (all of them) don't work... and I apologize for the delay in testing and responding, but I work a lot and have little time to test, I'll be on vacation soon and I'll have time to try again. But this weekend I tested literally every build, date by date of modification of the builds, and none of them worked, whether 5.x or 6.x or 4.x .....