Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cura on Pi 5 Crash Fix #2552

Closed
3 tasks done
mikepaxton opened this issue Feb 23, 2024 · 7 comments
Closed
3 tasks done

Cura on Pi 5 Crash Fix #2552

mikepaxton opened this issue Feb 23, 2024 · 7 comments
Labels
Upstream Bug something isn't working that can only be fixed upstream

Comments

@mikepaxton
Copy link

Confirmations

What happened?

Installed Cura but crashed on Pi 5

Description

After installing Cura on Raspberry Pi PiOS Bookworm it crashes immediately on startup. I found that if I changed the install script to use the aarch64-16k version (which Pi 5 is), then it installs and runs great.

What are your system specs (run the following command in your terminal)?

OS: Debian GNU/Linux 12 (bookworm)
OS architecture: 64-bit
Last updated Pi-Apps on: 02/18/2024
Latest Pi-Apps version: 02/23/2024
Kernel: aarch64 6.1.0-rpi8-rpi-2712
Device model: Raspberry Pi 5 Model B Rev 1.0
SOC identifier: bcm2712
Cpu name: Cortex-A76
Ram size: 8.04 GB
Raspberry Pi OS image version: 2023-12-05
Language: en_US.UTF-8

(Recommended) Error log? Terminal output? Debug messages?

No response

@mikepaxton mikepaxton added the bug Something isn't working label Feb 23, 2024
@Botspot
Copy link
Owner

Botspot commented Feb 23, 2024

Interesting. I was under the impression that the cura build for 4k would work on 16k.
Was this incorrect, @smartavionics?

If so, I can update our script to select the right build based on the kernel version.

Potential complication:
I have actually been using the 4k kernel to get more apps to work. If somebody starts off with the 16k kernel, installs Cura, and then switches to 4k, then cura would probably fail to launch. I will need to decide if we need a system in place to detect this edge-case and warn the user.

@mikepaxton
Copy link
Author

I believe the default RPiOS for Pi5 is a 16k kernel so i'm not sure it's an edge case, maybe i'm wrong though.

@smartavionics
Copy link

The 16k Cura build is built on a Pi5 running the default kernel. The other 64 bit Cura build is built on a Pi4 running buster (i.e. quite an old release). I haven't tried building on a Pi5 running the 4k kernel. I guess it is possible that such a build would also run when using the 16k kernel but then it wouldn't be usable on Pi4s running earlier systems which would be very confusing.

@theofficialgman
Copy link
Collaborator

theofficialgman commented Feb 24, 2024

The other 64 bit Cura build is built on a Pi4 running buster (i.e. quite an old release)

@smartavionics that will have issues on 16k pagesize kernels due to a bug in patchelf which was fixed in 0.12. buster has 0.9. Build it and install yourself or grab the packages from the ppa here https://launchpad.net/~theofficialgman/+archive/ubuntu/patchelf/+packages , these particular bionic packages will work fine on buster.
see musescore/MuseScore#20356 for more info.

CC @Botspot ^

@theofficialgman theofficialgman added Upstream Bug something isn't working that can only be fixed upstream and removed bug Something isn't working labels Feb 24, 2024
@theofficialgman
Copy link
Collaborator

theofficialgman commented Feb 24, 2024

marking as upstream bug. if @smartavionics builds on buster with patchelf 0.12+ then that build should be compatible with 4k, 16k, and 64k pagesize kernel systems

I can confirm that the cura binary has an incorrect 4K alignment load address that prevents it from running 16/64K pagesize kernels

readelf -l usr/bin/cura

Elf file type is DYN (Position-Independent Executable file)
Entry point 0x68834
There are 10 program headers, starting at offset 64
...
  LOAD           0x0000000000343000 0x0000000000375000 0x0000000000375000
                 0x000000000000a958 0x000000000000a958  RW     0x1000

@smartavionics
Copy link

I have now done as suggested and https://github.com/smartavionics/Cura/releases/download/4.20.17/Cura-4.20.17-mb-aarch64.AppImage should now be compatible with systems using either 4k or 16k pages.

@theofficialgman
Copy link
Collaborator

@smartavionics tested it and it works well. thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Upstream Bug something isn't working that can only be fixed upstream
Projects
None yet
Development

No branches or pull requests

4 participants