i’m trying to bootstrap a web kiosk based on a armhf (mx7) SOM.
After installing the mir-kiosk SNAP i’m stuck at a black screen with a blinking cursor.
The snap logs output is:
2019-03-08T14:20:29Z mir-kiosk.mir-kiosk[6351]: std::exception::what: Failed to find platform for current system
2019-03-08T14:20:29Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Main process exited, code=exited, status=1/FAILURE
2019-03-08T14:20:29Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Unit entered failed state.
2019-03-08T14:20:29Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Failed with result 'exit-code'.
2019-03-08T14:20:30Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Service hold-off time over, scheduling restart.
2019-03-08T14:20:30Z systemd[1]: Stopped Service for snap application mir-kiosk.mir-kiosk.
2019-03-08T14:20:30Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Start request repeated too quickly.
2019-03-08T14:20:30Z systemd[1]: Failed to start Service for snap application mir-kiosk.mir-kiosk.
2019-03-08T14:20:30Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Unit entered failed state.
2019-03-08T14:20:30Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Failed with result 'start-limit-hit'
there’s not really enough log there to be sure, but I can guess what the problem is likely to be as I’ve seen similar problems twice recently. (E.g. https://github.com/MirServer/mir/issues/704)
Can you try the effect of switching to the --candidate channel?
At first, where i can find the complete log to extract more informations?
Then, i’ve tried to install with --candidate --devmode options, same situations (a pair of seconds of total black monitor, then black with blinking white cursor), and the top error in the log became:
std::exception::what: Couldn't get DRM resources: Invalid argument
[9206]: [2019-03-08 16:28:58.367813] mesa-kms: EGL platform does not support EGL_KHR_platform_gbm extension 2019-03-08T16:28:58Z mir-kiosk.mir-kiosk
[9206]: [2019-03-08 16:28:58.369044] mesa-kms: Device /dev/dri/card0 does not support KMS: Invalid argument 2019-03-08T16:28:58Z mir-kiosk.mir-kiosk
That shows that libdrm is reporting that KMS is not supported. And the problem I alluded to earlier is that there are platforms which report this even though KMS is actually supported.
However, this looks wrong:
[9206]: [2019-03-08 16:28:58.369231] mirplatform: Found graphics driver: mir:mesa-kms (version 1.1.1) Support priority: 0
With MIR_MESA_KMS_DISABLE_MODESET_PROBE this should be non-zero…
2019-03-08T16:56:19Z mir-kiosk.mir-kiosk[11256]: gbm: Last dlopen error: /usr/lib/dri/vivante_dri.so: cannot open shared object file: No such file or directory
2019-03-08T16:56:19Z mir-kiosk.mir-kiosk[11256]: failed to load driver: vivante
Short answer:
I’m afraid that mir-kiosk won’t work on this kit.
Long answer:
The way Ubuntu Core is architected is problematic for graphical snaps. There are plans to address this, but currently it needs the correct graphics drivers for the kit to be included in both the mir-kiosk and client snaps. There’s a discussion here: libGL and snaps - device - snapcraft.io
As things stand at the moment you’d need special variants of mir-kiosk and your web snap with the vivante drivers. You may also need a build of Ubuntu Core with the corresponding kernel module.
Thank you Alan, you gave me a lot of support, kudos.
I know that’s not more related to Mir, but I’m new on Core and i need to run a web interface on this board, could you give any insight on which direction i should take?
Sorry, I’m not sure what the options are for this type of board. I only get involved bringing Mir up on a working graphics stack.
If you have a “classic” system you can run then you could install Mir on that. With the right drivers it likely works. (This is easiest with Ubuntu, Fedora or debian base, but Arch & postmarketOS are also possible.)
Thank you Alan, just to bring the discussion to an end: we have moved the development and test to another IoT Gateway, using the Raspberry CM3 and now mir-kiosk works flawlessy.
we are developing an IoT platform for the SMB, focused on integrating the production machinery with data analysis algorithms, both traditional and ml based.
We use an Iot Gateway to move the data visualization and user interaction near the production line, our applications are 100% web based, so the option tu use a super light version of chromium is the optimum.
Until now we used custom version of Debian, with openbox and chromium, but now we’re moving to Ubuntu Core.
We develop both hw and sw and we’re designign an IoT expansion board for our projects, that’s why we’re testing multiple SOM, like the Variscite iMX7, to choose one to embed inside our expansion board.
This is a picture of a test gateway running a Raspberry CM3 module, connected to a Siemens S7-300 PLC through a MOXA E1212 remote-io. The interface is a web page served using chromium-mir-kiosk
Found this thread trying to get mir-kiosk working on Rpi 3 B+. @alan_g you’ve already found me mis-posting bugs on github, I see you’re maintaining a heroic amount of mir related repos and applying fixes so thanks for that, I’m unable to help there but hopefully this helps anyone else coming across the same problems.
After trawling through the various recent fixes and thinking I had a one issue when updating to latest version of snapd fixed that I’m still getting errors that are mesa-kms related. Fresh install with latest stable mir-kiosk:
2019-05-07T15:50:02Z systemd[1]: Started Service for snap application mir-kiosk.mir-kiosk.
2019-05-07T15:50:02Z mir-kiosk.mir-kiosk[7529]: [2019-05-07 15:50:02.957560] mirserver: Starting
2019-05-07T15:50:02Z mir-kiosk.mir-kiosk[7529]: [2019-05-07 15:50:02.959413] <DEBUG> mirserver: Using Linux VT subsystem for session management
2019-05-07T15:50:02Z mir-kiosk.mir-kiosk[7529]: [2019-05-07 15:50:02.960221] mircommon: Loading modules from: /snap/mir-kiosk/1386/usr/lib/arm-linux-gnueabihf/mir/server-platform
2019-05-07T15:50:02Z mir-kiosk.mir-kiosk[7529]: [2019-05-07 15:50:02.960511] mircommon: Loading module: /snap/mir-kiosk/1386/usr/lib/arm-linux-gnueabihf/mir/server-platform/graphics-mesa-kms.so.16
2019-05-07T15:50:02Z mir-kiosk.mir-kiosk[7529]: [2019-05-07 15:50:02.960673] mircommon: Loading module: /snap/mir-kiosk/1386/usr/lib/arm-linux-gnueabihf/mir/server-platform/server-mesa-x11.so.16
2019-05-07T15:50:02Z mir-kiosk.mir-kiosk[7529]: [2019-05-07 15:50:02.960746] mircommon: Loading module: /snap/mir-kiosk/1386/usr/lib/arm-linux-gnueabihf/mir/server-platform/input-evdev.so.7
2019-05-07T15:50:02Z mir-kiosk.mir-kiosk[7529]: [2019-05-07 15:50:02.967489] mesa-kms: Unsupported: No DRM devices detected
2019-05-07T15:50:02Z mir-kiosk.mir-kiosk[7529]: [2019-05-07 15:50:02.967616] mirplatform: Found graphics driver: mir:mesa-kms (version 1.1.2) Support priority: 0
2019-05-07T15:50:02Z mir-kiosk.mir-kiosk[7529]: [2019-05-07 15:50:02.967713] mirplatform: Found graphics driver: mir:mesa-x11 (version 1.1.2) Support priority: 0
2019-05-07T15:50:02Z mir-kiosk.mir-kiosk[7529]: ERROR: /build/mir-eQgTJy/mir-1.1.2/src/server/graphics/default_configuration.cpp(172): Throw in function mir::DefaultServerConfiguration::the_graphics_platform()::<lambda()>
2019-05-07T15:50:02Z mir-kiosk.mir-kiosk[7529]: Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >
2019-05-07T15:50:02Z mir-kiosk.mir-kiosk[7529]: std::exception::what: Exception while creating graphics platform
2019-05-07T15:50:02Z mir-kiosk.mir-kiosk[7529]: ERROR: /build/mir-eQgTJy/mir-1.1.2/src/platform/graphics/platform_probe.cpp(109): Throw in function std::shared_ptr<mir::SharedLibrary> mir::graphics::module_for_device(const std::vector<std::shared_ptr<mir::SharedLibrary> >&, const mir::options::ProgramOption&, const std::shared_ptr<mir::ConsoleServices>&)
2019-05-07T15:50:02Z mir-kiosk.mir-kiosk[7529]: Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >
2019-05-07T15:50:02Z mir-kiosk.mir-kiosk[7529]: std::exception::what: Failed to find platform for current system
2019-05-07T15:50:02Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Main process exited, code=exited, status=1/FAILURE
2019-05-07T15:50:02Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Failed with result 'exit-code'.
2019-05-07T15:50:03Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Service hold-off time over, scheduling restart.
2019-05-07T15:50:03Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Scheduled restart job, restart counter is at 4.
2019-05-07T15:50:03Z systemd[1]: Stopped Service for snap application mir-kiosk.mir-kiosk.
2019-05-07T15:50:03Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Start request repeated too quickly.
2019-05-07T15:50:03Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Failed with result 'exit-code'.
2019-05-07T15:50:03Z systemd[1]: Failed to start Service for snap application mir-kiosk.mir-kiosk.
Support Priority is 0 for the mesa drivers was mentioned in a thread from a while back, though it does seem to find drivers it thinks they aren’t supported? There’s mention elsewhere of enabling GL on the Pi. Should I be using ‘pi-gadget’ or install snapd on raspbian to do this, or is this a bug? Any pointers greatly appreciated.
I have monitor connected that shows boot text on power up yes, though it just shows a blinking cursor currently, will try swapping it for another one. What does DRM stand for in “DRM Device”?
I know mir-kiosk works fine on Ubuntu Core 16 with the Rpi 3 B+, we have that on several setups. So I would recommend trying that.
With “Ubuntu Classic 18.04” on the RPi3 I am told you need “manual changes to config.txt before Mir can work at all (enabling the kms overlay) https://github.com/snapcore/pi3-gadget/blob/16/configs/config.txt#L59”. But I wouldn’t recommend using mir-kiosk with classic unless there’s a good reason.
And as I keep telling you please don’t ask for help in the comments about unrelated issues. How would anyone encountering the same problem find it? This would be a better place: https://github.com/MirServer/mir-kiosk/issues (i.e. create an issue).
I run the mir-kiosk in ubuntu desktop Ubuntu 18.04.3 LTS. I install the mir-kiosk with below command:
sudo snap install mir-kiosk
When I run sudo mir-kiosk, I got the error:
+ mkdir -p /root/snap/mir-kiosk/2808/.config/
+ grep -vE (^vt=|^console-provider=vt|^display-layout=) /var/snap/mir-kiosk/2808/miral-kiosk.config
+ exec /snap/mir-kiosk/2808/bin/run-miral
[2019-12-11 02:59:42.474376] <information> mirserver: Starting
[2019-12-11 02:59:42.560669] < - debug - > mirserver: Not using logind for session management: Failed to connect to DBus system bus: Could not connect: Permission denied
[2019-12-11 02:59:42.563055] < - debug - > mirserver: Using Linux VT subsystem for session management
[2019-12-11 02:59:42.566467] <information> mircommon: Loading modules from: /snap/mir-kiosk/2808/usr/lib/x86_64-linux-gnu/mir/server-platform
[2019-12-11 02:59:42.566945] <information> mircommon: Loading module: /snap/mir-kiosk/2808/usr/lib/x86_64-linux-gnu/mir/server-platform/graphics-mesa-kms.so.16
[2019-12-11 02:59:42.567347] <information> mircommon: Loading module: /snap/mir-kiosk/2808/usr/lib/x86_64-linux-gnu/mir/server-platform/graphics-wayland.so.16
[2019-12-11 02:59:42.567860] <information> mircommon: Loading module: /snap/mir-kiosk/2808/usr/lib/x86_64-linux-gnu/mir/server-platform/server-mesa-x11.so.16
[2019-12-11 02:59:42.568363] <information> mircommon: Loading module: /snap/mir-kiosk/2808/usr/lib/x86_64-linux-gnu/mir/server-platform/input-evdev.so.7
[2019-12-11 02:59:42.610576] <information> mesa-kms: EGL platform does not support EGL_KHR_platform_gbm extension
[2019-12-11 02:59:42.622329] <information> mesa-kms: Failed to claim DRM master: Invalid argument
[2019-12-11 02:59:42.631757] <information> mirserver: Found graphics driver: mir:mesa-kms (version 1.6.0) Support priority: 0
[2019-12-11 02:59:42.632827] <information> mirserver: Found graphics driver: mir:wayland (version 1.6.0) Support priority: 0
[2019-12-11 02:59:42.654661] <information> mirserver: Found graphics driver: mir:mesa-x11 (version 1.6.0) Support priority: 0
ERROR: /build/mir-1V2l0n/mir-1.6.0/src/server/graphics/default_configuration.cpp(182): Throw in function mir::DefaultServerConfiguration::the_graphics_platform()::<lambda()>
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >
std::exception::what: Exception while creating graphics platform
ERROR: /build/mir-1V2l0n/mir-1.6.0/src/server/graphics/platform_probe.cpp(119): Throw in function std::shared_ptr<mir::SharedLibrary> mir::graphics::module_for_device(const std::vector<std::shared_ptr<mir::SharedLibrary> >&, const mir::options::ProgramOption&, const std::shared_ptr<mir::ConsoleServices>&)
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >
std::exception::what: Failed to find platform for current system
But When I install the mir-kiosk with a dev mode (sudo snap install --devmode mir-kiosk ), mir-kiosk running is ok.
So I do not know why dev mode is ok for classic and how to make it ok without dev mode?