Closed lawik closed 5 years ago
That's not good. The display width and height look suspicious in the log messages. Maybe a clue?
I got a minimal test-case that seems to confirm it as part of 1.8 -> 1.9 or OTP 21 to 22. https://github.com/pappersverk/scenic_driver_inky/issues/3 I'll take a deeper look if I have a chance.
Clean nerves-project on Erlang 22.0 and Elixir 1.9 OTP 22.
Just added the RpiFbCapture dependency and then I just pushed the firmware and ran from iex:
iex(nerves_hello@nerves.local)1> {:ok, cap} = RpiFbCapture.start_link(width: 5, height: 5, display: 0)
{:ok, #PID<0.1030.0>}
** (EXIT from #PID<0.1028.0>) shell process exited with reason: bad return value: {:stop, :port_crashed}
Ah, RingLogger gave me a bit more story:
00:01:02.000 [error] Jan 1 00:01:01 rpi_fb_capture: Unable to open primary display
I can reproduce. I've narrowed it down to the rpi-firmware version update from https://github.com/raspberrypi/firmware. Cherry-picking through releases now...
This is the commit that where I start getting "Unable to open primary display": https://github.com/raspberrypi/firmware/commit/64b5649a41b69d09bfe0ed05448d28a66be3edfd.
It could be that there's some setting or something that we need to do now.
Apparently it works better with the latest: https://github.com/raspberrypi/firmware/commit/38e81f25e639d19fc0ce6e67fd39998c340a15d5. The "Unable to open primary display" message goes away. There's a scenic error with no info for me now - may be unrelated.
Ok, things seem to work. After a clean build the scenic error went away.
I made a nerves_system_br update (v1.8.5) with the fix. You can create a custom nerves_system_rpi0 and bump the version of nerves_system_br in it to get the fix. Or you can wait. I think that it will take a day or two to get new official system releases out.
I'll wait for the release. Good job :)
I had a user get in touch about some issues with our Inky scenic driver which uses this where this module would end up sending a crash message because the port crashed.
I haven't confirmed that this is related to the updates but I figured I'd give a heads up in case you have something off of the top of your head about what might cause such an issue. Otherwise I'll follow up if I get more info.
I received this log: