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

OctoDash Segmentation Fault on Raspberry Pi 5 OctoPi 1.1.0 #4612

Open
autronix opened this issue Nov 29, 2024 · 3 comments
Open

OctoDash Segmentation Fault on Raspberry Pi 5 OctoPi 1.1.0 #4612

autronix opened this issue Nov 29, 2024 · 3 comments
Labels
support Something isn't working with the users setup

Comments

@autronix
Copy link

autronix commented Nov 29, 2024

What doesn't work?
When I run octodash, it throws a Segmentation Fault
image

What did you already try?

  • I followed all the instructions on the troubleshooting guide
  • installed rpi additional ui packages
  • I edited the .xinit file to only run ratpoison - ratpoison starts, I can interact with keyboard and touch
    image
  • Tried starting Octodash from ratpoison doing ^C ! then entering octodash - Segfaults
  • Tried running Octodash from a ratpoison shell - Segfaults
  • Tried disabling .xinitrc file - starts the window manager and tried running the Octodash command - SegFaults
  • Tried to do a fresh install of OctoPi, and install OctoDash through the script - Same issue
  • Checked and tried several other issue reports and forum posts associated with the screen, rpi and octodash - no solution

General Information:

  • Raspberry Pi 5 4Gb with Waveshare 5" DSI screen (connected to DSI 1)
  • OctoPi 1.1.0
  • OctoDash Version 2.3.1
  • OctoPrint Version 1.10.3

Additional context
Notes:

I'm not sure what else I should be trying. I can't seem to find any logging information relating to Octodash that would provide me with more details about the error.

From what I can tell, xinit and startx are working, including the touch functionality; I'm able to start both ratpoison and the window managers.

Any help appreciated.

@autronix autronix added the support Something isn't working with the users setup label Nov 29, 2024
@waysert
Copy link

waysert commented Nov 29, 2024

Hi, i am facing the same challenge. I already tried pretty the same possible solutions but nothing worked in my case. I really hope there is an solution out there for this issue. I really want to get this running, if anybody has an idea, i can test it, i run a second Installation where i can test new solutions without destroying my running OctoPrint installation ;-)

@autronix
Copy link
Author

autronix commented Nov 29, 2024

Quick Update:

After doing some research and trying to build OctoDash from source (node 18.19.1, npm 10.5.2), I was able to successfully build the OctoDash, however, the issue came when I tested the service:

image

It looks like electron has some issues with aarch64 architecture, any attempt to run it triggers a Segmentation Fault error, which in turns prevents OctoDash from starting.

I'm not sure what the solution is here, I'm not familiar enough with node and the few posts online were inconclusive how to resolve this issue with electron crashing on arm64 devices...

Update # 2

image

After some more research I think I figured out the underlying cause of the issue: the Raspberry Pi 5 has a page size of 16k, according to some sources, electron is compiled with a page size of 4k, as a result, when electron tries to run it Seg Faults.

The quick workaround is simple but comes with the tradeoff of reducing page size from 16k to 4k until someone comes up with a compiled version of electron that supports 16k page size.

To get OctoDash working I needed to change the pagesize of the kernel from 16k to 4k

As for the fix in the case of the RPi5 running OctoPi, add the following line to the /boot/firmware/config.txt:

# Switch to 4k pagesize - comment to go back to 16k
kernel=kernel8.img

kernel8.img is a kernel version that supports 4k page size instead of 16k.

The long term solution for something like the RPi5 would probably be to update the codebase of OctoDash to use a version of electron that supports page sizes greater than 4k - in this case 16k+.

Hope this helps anyone else in this situation

Sources:

@waysert
Copy link

waysert commented Nov 30, 2024

I'm speechless, it works also for me. i used the original install script from OctoDash, made the changes you mentioned in the config.txt, and set manually the boot option B2 (Console with Autologin). Now it runs!! Thank you for this huge step forward!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Something isn't working with the users setup
Projects
None yet
Development

No branches or pull requests

2 participants