Lime-3DS-Emulator icon indicating copy to clipboard operation
Lime-3DS-Emulator copied to clipboard

android: Cannot launch games on Raspberry Pi 5

Open SilverGreen93 opened this issue 1 year ago • 14 comments
trafficstars

Is there an existing issue for this?

  • [X] I have searched the existing issues

Affected Build(s)

2118

Description of Issue

Whenever I try to start a game, the games closes instantly and I am brought back to the list of games.

Expected Behavior

The game should start normally.

Reproduction Steps

Launch any game rom from Lime3DS

Log File

The main error in the log is: Cannot open content uri, error: Failed to determine if primary:roms/n3ds/New Super Mario Bros 2.3ds.exheader is child of primary:roms/n3ds -- edit: I don't think this error has anything to to with the issue actually.

lime3ds_log.txt

System Configuration

System: Raspberry Pi 5 RAM: 8GB TF: 64GB OS: Android 14 (LineageOS 21)

SilverGreen93 avatar Sep 17 '24 19:09 SilverGreen93

Have you tried any other games? What about a CIA installation?

OpenSauce04 avatar Sep 19 '24 13:09 OpenSauce04

Yes, I tried several games in 3ds format, which work fine on my Nintendo Switch running the same LineageOS 21. Didn't try CIA, but if it helps in debugging I can try that as well.

SilverGreen93 avatar Sep 19 '24 17:09 SilverGreen93

Ok, so I tried installing a CIA file and I got the message that it should be decrypted. So I decrypted it to a cci file and then tried launching it the same way as the 3ds file. I got the exact same error: lime3ds_log.txt

SilverGreen93 avatar Sep 19 '24 19:09 SilverGreen93

On a second thought, I think this error is normal, as I can see the same log file on the other LineageOS 21 device, but there all games launch properly. So it seems that this error has nothing to do with the issue. Is there anything else I can grab/activate for debugging this issue?

SilverGreen93 avatar Sep 19 '24 20:09 SilverGreen93

Maybe try a sanity check before going any further. Does the game run on the last Citra Nightly? If not, then it's a bug that was inherited from upstream. If it does run, then something obviously changed since March, but at least it would give people a hint on what to look at.

rtiangha avatar Sep 20 '24 04:09 rtiangha

Ok, so I tried installing a CIA file and I got the message that it should be decrypted.

Dump a "standard" CIA, not a "legit" CIA. Standard CIAs are already decrypted and can be easily installed without conversion.

OpenSauce04 avatar Sep 20 '24 07:09 OpenSauce04

Maybe try a sanity check before going any further. Does the game run on the last Citra Nightly? If not, then it's a bug that was inherited from upstream. If it does run, then something obviously changed since March, but at least it would give people a hint on what to look at.

I tried Citra build 518f723. It has the same behaviour.

Ok, so I tried installing a CIA file and I got the message that it should be decrypted.

Dump a "standard" CIA, not a "legit" CIA. Standard CIAs are already decrypted and can be easily installed without conversion.

Got it, thanks! I now installed a Standard CIA instead of converting a Legit CIA and I got the exact same behaviour. The app crashes just after displaying the Loading popup.

SilverGreen93 avatar Sep 20 '24 10:09 SilverGreen93

Surely this can't be related to LineageOS itself right? I've heard of several people successfully using Lime3DS on a hacked Switch, which as far as I'm aware is almost always done with Lineage.

OpenSauce04 avatar Sep 20 '24 10:09 OpenSauce04

Surely this can't be related to LineageOS itself right? I've heard of several people successfully using Lime3DS on a hacked Switch, which as far as I'm aware is almost always done with Lineage.

I am using it too with LineageOS 21 on my Nintendo Switch and it works just fine. It might be something with either the storage or the graphics driver/api which is different on the Raspberry Pi 5. I tried both OpenGL and Vulkan, of course, with the same outcome.

I am tempted to report to LineageOS the issue as well, but I don't have any logs that I can suggest to "blame" either Lime3DS or LineageOS for the issue.

SilverGreen93 avatar Sep 20 '24 10:09 SilverGreen93

I wish I had access to a Pi to test, but my understanding is that you can swap out SD cards and try different distros, right? So if Lime3DS will run on a Debian based distro on the same hardware, then I would assume one could make the case that there's something different with Lineage (other than the whole Android thing). Perhaps the video driver if that's the case? Does it run on a Debian based distro?

Edit: And maybe try this Android version of Lime3DS; the Vulkan bits are updated to support v1.3.290. I don't think it'll make a difference, but you never know.

https://github.com/Lime3DS/Lime3DS/actions/runs/10874188441/artifacts/1935200034

And this custom build of PabloMK7's Citra I made supports Vulkan v1.3.295: https://github.com/rtiangha/bravely-offline-citra/actions/runs/10953235108/artifacts/1956561408

rtiangha avatar Sep 20 '24 12:09 rtiangha

I wish I had access to a Pi to test, but my understanding is that you can swap out SD cards and try different distros, right? So if Lime3DS will run on a Debian based distro on the same hardware, then I would assume one could make the case that there's something different with Lineage. Perhaps the video driver if that's the case? Does it run on a Debian based distro?

I don't think the test is relevant. You cannot compare the Linux build with the Android build.

SilverGreen93 avatar Sep 20 '24 12:09 SilverGreen93

The Android version is just a glorified front end. Other than the different graphical system, you'd be testing video driver support (ex Mesa vs whatever Lineage bundles, which could also be Mesa or it could be a binary blob) and Lime3DS's backend. And if you do encounter issues, the Desktop version has better logging and debugging features that may give more meaningful hints on what might be causing issues on that hardware; the Pi 5 is still relatively new.

rtiangha avatar Sep 20 '24 13:09 rtiangha

I see. Will try the two builds you provided above with support for Vulkan 1.3 to see if they behave differently. If it still does not work, I might try under Ubuntu 24.04.1 if I find a different sdcard to boot it.

Regarding LineageOS, the driver is Mesa (snippet from the changelog):

  • update to Vulkan 1.3
  • update to FFmpeg 7.0.2
  • update to libcamera master/v0.3.0, libpisp v1.0.6
  • update to alsa-lib/alsa-utils v1.2.12
  • update to Mesa 24.2.0
  • update to Linux 6.1.93 kernel

SilverGreen93 avatar Sep 20 '24 13:09 SilverGreen93

@rtiangha So, I tested both versions you provided:

  • Lime3DS has the same issue
  • Citra does not launch at all.

I then installed Ubuntu 24.04.1 on a different sdcard and installed Lime3DS 2118 as a flatpak. It runs indeed on Ubuntu, but I found another bug which I will open in a separate Issue (#449): Only the upper screen is rendered, but twice. The lower (touchscreen) is not displayed.

SilverGreen93 avatar Sep 20 '24 18:09 SilverGreen93

This issue has been marked as stale. If there is no activity within the next 10 days, this issue will be closed.

github-actions[bot] avatar Apr 07 '25 00:04 github-actions[bot]

Is there an Azahar flatpak (or build) for arm64 to test on my Raspberry Pi 5?

SilverGreen93 avatar Apr 07 '25 08:04 SilverGreen93

Is there an Azahar flatpak (or build) for arm64 to test on my Raspberry Pi 5?

We've had one in review for a couple of weeks. In the mean time you should compile the emulator manually.

OpenSauce04 avatar Apr 07 '25 14:04 OpenSauce04

Hi, I got today some time and compiled Azahar from scratch on my Raspberry Pi 5 running Ubuntu 24.10. (commit: 8dcef46a117ebdbf63cf196642ce36cd358f884f)

I am happy to report that now the games are opening fine:

  • Picross e (e2, e3 etc) work great and are playable.
  • New Super Mario Bros 2 displays fine, but runs at about 60% speed.
  • Picross 3D Round 2 is slow, but has an issue with the upper screen being shown twice (reported already here: #449)

I haven't tried tweaks for improving the speed and I don't know if it's possible.

SilverGreen93 avatar Apr 13 '25 15:04 SilverGreen93