MagnificentPako
Hello!
I have been trying to get Nerves on a Pi 5B together with the 7" Display sold by RaspberryPi working and only had mild successes.
First of all, I made sure the setup works with vanilla Raspberry Pi OS (the screen is picked up, DM starts, touch works).
I also managed to flash a nerves livebook image to the SD card and build one myself based on the livebook example repo, including modifications to the code like adding extra processes to the supervision tree. The display gets picked up and is used for iex.
I cannot start a project created with mix nerves.new <name>. The Pi is never reachable from the network, or does the screen light up, nothing. The status LED switches between long phases of solid green, to a short phase of solid red, which I assume means it is restarting after failing to start for some reason I have not figured out how to debug. (I did set up wifi in the config using vintagenet so it should be connecting fine)
Now, in this local livebook project I swapped out the regular rpi5 system for GitHub - nerves-web-kiosk/kiosk_system_rpi5: Experimental web kiosk for the RPi5 · GitHub
it boots fine, some poking around in iex reveals that i do have access to weston etc. Trying to execute weston however leads to an error that I am unable to figure out with my limited embedded linux experience.
iex(livebook@nerves-bcc1.local)8> cmd("XDG_RUNTIME_DIR=/run weston --shell=kiosk --continue-without-input &")
Date: 2025-01-30 UTC
[16:11:42.820] weston 13.0.3
https://wayland.freedesktop.org
Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
Build: 13.0.3
[16:11:42.820] Command line: weston --shell=kiosk --continue-without-input
[16:11:42.820] OS: Linux, 6.6.64-v8-16k, #1 SMP PREEMPT Mon Jan 20 14:16:05 UTC 2025, aarch64
[16:11:42.820] Flight recorder: enabled
[16:11:42.820] warning: XDG_RUNTIME_DIR "/run" is not configured
correctly. Unix access mode must be 0700 (current mode is 0755),
and must be owned by the user UID 0 (current owner is UID 0).
Refer to your distribution on how to get it, or
http://www.freedesktop.org/wiki/Specifications/basedir-spec
on how to implement it.
[16:11:42.820] Starting with no config file.
[16:11:42.820] Output repaint window is 7 ms maximum.
[16:11:42.820] Loading module '/usr/lib/libweston-13/drm-backend.so'
[16:11:42.821] initializing drm backend
[16:11:42.821] Trying libseat launcher...
[16:11:42.822] [seatd/seat.c:39] Created VT-bound seat seat0
[16:11:42.822] [seatd/server.c:145] New client connected (pid: 301, uid: 0, gid: 0)
[16:11:42.822] [libseat/backend/seatd.c:633] Started embedded seatd
[16:11:42.822] [seatd/seat.c:170] Added client 1 to seat0
[16:11:42.822] [seatd/seat.c:480] Opened client 1 on seat0
[16:11:42.822] [libseat/libseat.c:73] Seat opened with backend 'builtin'
[16:11:42.822] [libseat/backend/seatd.c:212] Enabling seat
[16:11:42.822] libseat: session control granted
[16:11:42.823] using /dev/dri/card0
[16:11:42.823] DRM: supports atomic modesetting
[16:11:42.823] DRM: supports GBM modifiers
[16:11:42.823] DRM: does not support async page flipping
[16:11:42.823] DRM: supports picture aspect ratio
MESA-LOADER: failed to open drm-rp1-dsi: /usr/lib/dri/drm-rp1-dsi_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/dri, suffix _dri)
MESA-LOADER: failed to open kms_swrast: /usr/lib/dri/kms_swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/dri, suffix _dri)
MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/dri, suffix _dri)
[16:11:42.825] failed to initialize egl
[16:11:42.825] [seatd/seat.c:418] No clients on seat0 to activate
[16:11:42.860] [seatd/seat.c:524] Closed client 1 on seat0
[16:11:42.860] [seatd/seat.c:192] Removed client 1 from seat0
[16:11:42.860] fatal: failed to create compositor backend
Internal warning: debug scope 'drm-backend' has not been destroyed.
[16:11:42.861] [seatd/client.c:471] Client disconnected
[16:11:42.861] [libseat/backend/seatd.c:645] Stopped embedded seatd
I have also tried this with different XDG_RUNTIME_DIRs and by passing weston a configuration file to make sure it isn’t related to either of those.
Is weston/mesa supposed to look for those drivers and should i have them? Are they not supposed to be around and it should try to load something else entirely?
How could I go about debugging something like this myself in the future? I tried looking around online and found a lot of random discussions, none of them fruitful. Some pointed towards building mesa in a different way, or updating mesa. Others sent me on a goose chase trying to load different overlays, changing my config and cmdline in small ways, but nothing led me anywhere.
If anyone has experienced this before or has any insights on what I might be doing wrong I would greatly appreciate any form of contact.
Thank you very much in advance, and have a great day.
Trending in Questions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #phoenix_html
- #iex
- #graphql
- #ai
- #genstage
- #elixirconf-us
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex










Showing Posts 1 to 5- Show Best Posts
- Show All Posts (oldest first)
- Show All Posts (newest first)
lawik
The RPi5 changed stuff about the IO to use the new RP1 chip for DSI displays. That means we need some more overlays and drivers in the system. And can probably remove an old one if we’re lucky.
If you can start the system on Raspberry Pi OS and run these and share the outputs we can get the full set of changed overlays and drivers:
Bootlog:
Kernel modules:
And that should give us roughly what we need to add support
MagnificentPako
Here is the output of
And the output of lsmod:
Both of these were taken from a fresh installation of Raspberry Pi OS.
Thank you so much for looking into this!
lawik
Great, thanks
fhunleth
Hi @MagnificentPako,
I assumed it was going to be really easy to point out the missing device tree overlay or kernel module. That’s not the issue, though. You actually found it. I’ll repeat what I saw when looking through Mesa 3D
The problem is that the version of Mesa 3D, 24.0.9, supplied by Buildroot isn’t new enough.
The technical issue is described pretty well in this Mesa 3D commit message. It looks like you found this and started down this path.
These updates are in the Mesa 3D 24.3.0 release.
The good news is that there’s a patch to update Mesa 3D to 24.3.3 that was posted on Jan 18. It’s part of a patch series that is more complicated than I was expecting.
Waiting for the Buildroot maintainers to accept the patch is by far the easiest option, but it takes time. Luckily, the submitter is a maintainer so it may take less time, but I’d still allow for it to take a few more weeks.
The alternative is to fork
kiosk_system_rpi5, copy/paste in the Buildroot patch I linked above, rename the package to MESA3D_RPI (or anything that’s not MESA3D so that it doesn’t conflict), and update thenerves_defconfigto use it instead. This is more time consuming than I’m making it sound, and my strategy at this would be to get the update patch working in Buildroot first before trying it out with Nerves. The reason being that the patch looked more involved than I expected and I didn’t understand why on my brief skim of it.If I get time this week, I’ll take a harder look at that patch. I have a 7" touchscreen, but not the right cable for the RPi 5. I’ll see if I can find one.
Anyway, the summary is that if you can wait, I’m pretty sure this will be fixed in the coming weeks. Thanks for posting that it didn’t work, since until I saw your post, I didn’t know that the situation had changed on the RPi5.
MagnificentPako
Thank you for the swift reply!
I don’t feel comfortable enough with my embedded Linux knowledge to attempt my own buildroot setup, especially considering this is already on its way to being accepted into the repo on its own. Can’t really justify a deep dive on company time and this project already skirts hard on the line if it should be done on company time at all or not haha.
For now I am going to switch to an rPi4 to continue testing my application itself but I will make sure to try it out on the rPi5 down the line once it has been merged to give further input if needed.
Also, thank you for the deep-dive explanation and links for further reading on e.g. the Mesa 3D commit and the buildroot patch. This has been extremely informative for me and I really want to spend some private time on learning more.