Failed to find platform for current system when starting mir-kiosk

Hello,

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'

Any insight or can i provide any other info?

Greetings,
Alessio

Hi @alessio,

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?

Thanks!

Hello Alan, thank for your answer.

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

Thank you,
Alessio

That’s disappointing.

Can you confirm whether you’re using Ubuntu Core or Classic?

If you’re on Ubuntu Core there’s no need to install mir-kiosk with --devmode.

If --candidate didn’t fix the problem for you then you should switch back to --stable. Once you’ve done that:

sudoedit /var/snap/mir-kiosk/current/miral-kiosk.config

And add the line:

env_hacks=MIR_MESA_KMS_DISABLE_MODESET_PROBE
Then snap restart mir-kiosk

To get more from the log use -n:

snap logs -n 50 mir-kiosk

Thank you for your support.

I’ve reverted the release to stable and addedd the env_hack.

I’m using Ubuntu Core, on a Compulab SOM mx7, so i’m not sure how the problem could be hardware related.

This is the complete log for a restart cycle:

2019-03-08T16:28:58Z mir-kiosk.mir-kiosk[9206]: [2019-03-08 16:28:58.352597] mirserver: Starting
2019-03-08T16:28:58Z mir-kiosk.mir-kiosk[9206]: [2019-03-08 16:28:58.355310] <DEBUG> mirserver: Using Linux VT subsystem for session management
2019-03-08T16:28:58Z mir-kiosk.mir-kiosk[9206]: [2019-03-08 16:28:58.356249] mircommon: Loading modules from: /snap/mir-kiosk/1217/usr/lib/arm-linux-gnueabihf/mir/server-platform
2019-03-08T16:28:58Z mir-kiosk.mir-kiosk[9206]: [2019-03-08 16:28:58.356548] mircommon: Loading module: /snap/mir-kiosk/1217/usr/lib/arm-linux-gnueabihf/mir/server-platform/graphics-mesa-kms.so.16
2019-03-08T16:28:58Z mir-kiosk.mir-kiosk[9206]: [2019-03-08 16:28:58.356689] mircommon: Loading module: /snap/mir-kiosk/1217/usr/lib/arm-linux-gnueabihf/mir/server-platform/server-mesa-x11.so.16
2019-03-08T16:28:58Z mir-kiosk.mir-kiosk[9206]: [2019-03-08 16:28:58.356781] mircommon: Loading module: /snap/mir-kiosk/1217/usr/lib/arm-linux-gnueabihf/mir/server-platform/input-evdev.so.7
2019-03-08T16:28:58Z mir-kiosk.mir-kiosk[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[9206]: [2019-03-08 16:28:58.369231] mirplatform: Found graphics driver: mir:mesa-kms (version 1.1.1) Support priority: 0
2019-03-08T16:28:58Z mir-kiosk.mir-kiosk[9206]: [2019-03-08 16:28:58.369370] mirplatform: Found graphics driver: mir:mesa-x11 (version 1.1.1) Support priority: 0
2019-03-08T16:28:58Z mir-kiosk.mir-kiosk[9206]: ERROR: /build/mir-x4RqAR/mir-1.1.1/src/server/graphics/default_configuration.cpp(172): Throw in function mir::DefaultServerConfiguration::the_graphics_platform()::<lambda()>
2019-03-08T16:28:58Z mir-kiosk.mir-kiosk[9206]: Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >
2019-03-08T16:28:58Z mir-kiosk.mir-kiosk[9206]: std::exception::what: Exception while creating graphics platform
2019-03-08T16:28:58Z mir-kiosk.mir-kiosk[9206]: ERROR: /build/mir-x4RqAR/mir-1.1.1/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-03-08T16:28:58Z mir-kiosk.mir-kiosk[9206]: Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >
2019-03-08T16:28:58Z mir-kiosk.mir-kiosk[9206]: std::exception::what: Failed to find platform for current system
2019-03-08T16:28:58Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Main process exited, code=exited, status=1/FAILURE
2019-03-08T16:28:58Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Unit entered failed state.
2019-03-08T16:28:58Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Failed with result 'exit-code'.
2019-03-08T16:28:58Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Service hold-off time over, scheduling restart.
2019-03-08T16:28:58Z systemd[1]: Stopped Service for snap application mir-kiosk.mir-kiosk.
2019-03-08T16:28:58Z systemd[1]: Started Service for snap application mir-kiosk.mir-kiosk.
2019-03-08T16:28:59Z mir-kiosk.mir-kiosk[9299]: [2019-03-08 16:28:59.389686] mirserver: Starting
2019-03-08T16:28:59Z mir-kiosk.mir-kiosk[9299]: [2019-03-08 16:28:59.394158] <DEBUG> mirserver: Using Linux VT subsystem for session management
2019-03-08T16:28:59Z mir-kiosk.mir-kiosk[9299]: [2019-03-08 16:28:59.396943] mircommon: Loading modules from: /snap/mir-kiosk/1217/usr/lib/arm-linux-gnueabihf/mir/server-platform
2019-03-08T16:28:59Z mir-kiosk.mir-kiosk[9299]: [2019-03-08 16:28:59.398415] mircommon: Loading module: /snap/mir-kiosk/1217/usr/lib/arm-linux-gnueabihf/mir/server-platform/graphics-mesa-kms.so.16
2019-03-08T16:28:59Z mir-kiosk.mir-kiosk[9299]: [2019-03-08 16:28:59.399580] mircommon: Loading module: /snap/mir-kiosk/1217/usr/lib/arm-linux-gnueabihf/mir/server-platform/server-mesa-x11.so.16
2019-03-08T16:28:59Z mir-kiosk.mir-kiosk[9299]: [2019-03-08 16:28:59.400654] mircommon: Loading module: /snap/mir-kiosk/1217/usr/lib/arm-linux-gnueabihf/mir/server-platform/input-evdev.so.7
2019-03-08T16:28:59Z mir-kiosk.mir-kiosk[9299]: [2019-03-08 16:28:59.411508] mesa-kms: EGL platform does not support EGL_KHR_platform_gbm extension
2019-03-08T16:28:59Z mir-kiosk.mir-kiosk[9299]: [2019-03-08 16:28:59.414274] mesa-kms: Device /dev/dri/card0 does not support KMS: Invalid argument
2019-03-08T16:28:59Z mir-kiosk.mir-kiosk[9299]: [2019-03-08 16:28:59.415705] mirplatform: Found graphics driver: mir:mesa-kms (version 1.1.1) Support priority: 0
2019-03-08T16:28:59Z mir-kiosk.mir-kiosk[9299]: [2019-03-08 16:28:59.416895] mirplatform: Found graphics driver: mir:mesa-x11 (version 1.1.1) Support priority: 0
2019-03-08T16:28:59Z mir-kiosk.mir-kiosk[9299]: ERROR: /build/mir-x4RqAR/mir-1.1.1/src/server/graphics/default_configuration.cpp(172): Throw in function mir::DefaultServerConfiguration::the_graphics_platform()::<lambda()>
2019-03-08T16:28:59Z mir-kiosk.mir-kiosk[9299]: Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >
2019-03-08T16:28:59Z mir-kiosk.mir-kiosk[9299]: std::exception::what: Exception while creating graphics platform
2019-03-08T16:28:59Z mir-kiosk.mir-kiosk[9299]: ERROR: /build/mir-x4RqAR/mir-1.1.1/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-03-08T16:28:59Z mir-kiosk.mir-kiosk[9299]: Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >
2019-03-08T16:28:59Z mir-kiosk.mir-kiosk[9299]: std::exception::what: Failed to find platform for current system
2019-03-08T16:28:59Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Main process exited, code=exited, status=1/FAILURE
2019-03-08T16:28:59Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Unit entered failed state.
2019-03-08T16:28:59Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Failed with result 'exit-code'.
2019-03-08T16:28:59Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Service hold-off time over, scheduling restart.
2019-03-08T16:28:59Z systemd[1]: Stopped Service for snap application mir-kiosk.mir-kiosk.
2019-03-08T16:28:59Z systemd[1]: Started Service for snap application mir-kiosk.mir-kiosk.
2019-03-08T16:29:00Z mir-kiosk.mir-kiosk[9392]: [2019-03-08 16:29:00.372733] mirserver: Starting
2019-03-08T16:29:00Z mir-kiosk.mir-kiosk[9392]: [2019-03-08 16:29:00.376573] <DEBUG> mirserver: Using Linux VT subsystem for session management
2019-03-08T16:29:00Z mir-kiosk.mir-kiosk[9392]: [2019-03-08 16:29:00.378549] mircommon: Loading modules from: /snap/mir-kiosk/1217/usr/lib/arm-linux-gnueabihf/mir/server-platform
2019-03-08T16:29:00Z mir-kiosk.mir-kiosk[9392]: [2019-03-08 16:29:00.379877] mircommon: Loading module: /snap/mir-kiosk/1217/usr/lib/arm-linux-gnueabihf/mir/server-platform/graphics-mesa-kms.so.16
2019-03-08T16:29:00Z mir-kiosk.mir-kiosk[9392]: [2019-03-08 16:29:00.380954] mircommon: Loading module: /snap/mir-kiosk/1217/usr/lib/arm-linux-gnueabihf/mir/server-platform/server-mesa-x11.so.16
2019-03-08T16:29:00Z mir-kiosk.mir-kiosk[9392]: [2019-03-08 16:29:00.381931] mircommon: Loading module: /snap/mir-kiosk/1217/usr/lib/arm-linux-gnueabihf/mir/server-platform/input-evdev.so.7
2019-03-08T16:29:00Z mir-kiosk.mir-kiosk[9392]: [2019-03-08 16:29:00.392956] mesa-kms: EGL platform does not support EGL_KHR_platform_gbm extension
2019-03-08T16:29:00Z mir-kiosk.mir-kiosk[9392]: [2019-03-08 16:29:00.395241] mesa-kms: Device /dev/dri/card0 does not support KMS: Invalid argument
2019-03-08T16:29:00Z mir-kiosk.mir-kiosk[9392]: [2019-03-08 16:29:00.396401] mirplatform: Found graphics driver: mir:mesa-kms (version 1.1.1) Support priority: 0
2019-03-08T16:29:00Z mir-kiosk.mir-kiosk[9392]: [2019-03-08 16:29:00.397420] mirplatform: Found graphics driver: mir:mesa-x11 (version 1.1.1) Support priority: 0
2019-03-08T16:29:00Z mir-kiosk.mir-kiosk[9392]: ERROR: /build/mir-x4RqAR/mir-1.1.1/src/server/graphics/default_configuration.cpp(172): Throw in function mir::DefaultServerConfiguration::the_graphics_platform()::<lambda()>
2019-03-08T16:29:00Z mir-kiosk.mir-kiosk[9392]: Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >
2019-03-08T16:29:00Z mir-kiosk.mir-kiosk[9392]: std::exception::what: Exception while creating graphics platform
2019-03-08T16:29:00Z mir-kiosk.mir-kiosk[9392]: ERROR: /build/mir-x4RqAR/mir-1.1.1/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-03-08T16:29:00Z mir-kiosk.mir-kiosk[9392]: Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >
2019-03-08T16:29:00Z mir-kiosk.mir-kiosk[9392]: std::exception::what: Failed to find platform for current system
2019-03-08T16:29:00Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Main process exited, code=exited, status=1/FAILURE
2019-03-08T16:29:00Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Unit entered failed state.
2019-03-08T16:29:00Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Failed with result 'exit-code'.
2019-03-08T16:29:00Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Service hold-off time over, scheduling restart.
2019-03-08T16:29:00Z systemd[1]: Stopped Service for snap application mir-kiosk.mir-kiosk.
2019-03-08T16:29:00Z systemd[1]: Started Service for snap application mir-kiosk.mir-kiosk.
2019-03-08T16:29:01Z mir-kiosk.mir-kiosk[9484]: [2019-03-08 16:29:01.384711] mirserver: Starting
2019-03-08T16:29:01Z mir-kiosk.mir-kiosk[9484]: [2019-03-08 16:29:01.387575] <DEBUG> mirserver: Using Linux VT     subsystem for session management
2019-03-08T16:29:01Z mir-kiosk.mir-kiosk[9484]: [2019-03-08 16:29:01.388613] mircommon: Loading modules from: /snap/mir-kiosk/1217/usr/lib/arm-linux-gnueabihf/mir/server-platform
2019-03-08T16:29:01Z mir-kiosk.mir-kiosk[9484]: [2019-03-08 16:29:01.388940] mircommon: Loading module: /snap/mir-kiosk/1217/usr/lib/arm-linux-gnueabihf/mir/server-platform/graphics-mesa-kms.so.16
2019-03-08T16:29:01Z mir-kiosk.mir-kiosk[9484]: [2019-03-08 16:29:01.389101] mircommon: Loading module: /snap/mir-kiosk/1217/usr/lib/arm-linux-gnueabihf/mir/server-platform/server-mesa-x11.so.16
2019-03-08T16:29:01Z mir-kiosk.mir-kiosk[9484]: [2019-03-08 16:29:01.389208] mircommon: Loading module: /snap/mir-kiosk/1217/usr/lib/arm-linux-gnueabihf/mir/server-platform/input-evdev.so.7
2019-03-08T16:29:01Z mir-kiosk.mir-kiosk[9484]: [2019-03-08 16:29:01.402046] mesa-kms: EGL platform does not support EGL_KHR_platform_gbm extension
2019-03-08T16:29:01Z mir-kiosk.mir-kiosk[9484]: [2019-03-08 16:29:01.403442] mesa-kms: Device /dev/dri/card0 does not support KMS: Invalid argument
2019-03-08T16:29:01Z mir-kiosk.mir-kiosk[9484]: [2019-03-08 16:29:01.403654] mirplatform: Found graphics driver: mir:mesa-kms (version 1.1.1) Support priority: 0
2019-03-08T16:29:01Z mir-kiosk.mir-kiosk[9484]: [2019-03-08 16:29:01.403836] mirplatform: Found graphics driver: mir:mesa-x11 (version 1.1.1) Support priority: 0
2019-03-08T16:29:01Z mir-kiosk.mir-kiosk[9484]: ERROR: /build/mir-x4RqAR/mir-1.1.1/src/server/graphics/default_configuration.cpp(172): Throw in function mir::DefaultServerConfiguration::the_graphics_platform()::<lambda()>
2019-03-08T16:29:01Z mir-kiosk.mir-kiosk[9484]: Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >
2019-03-08T16:29:01Z mir-kiosk.mir-kiosk[9484]: std::exception::what: Exception while creating graphics platform
2019-03-08T16:29:01Z mir-kiosk.mir-kiosk[9484]: ERROR: /build/mir-x4RqAR/mir-1.1.1/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-03-08T16:29:01Z mir-kiosk.mir-kiosk[9484]: Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >
2019-03-08T16:29:01Z mir-kiosk.mir-kiosk[9484]: std::exception::what: Failed to find platform for current system
2019-03-08T16:29:01Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Main process exited, code=exited, status=1/FAILURE
2019-03-08T16:29:01Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Unit entered failed state.
2019-03-08T16:29:01Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Failed with result 'exit-code'.
2019-03-08T16:29:01Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Service hold-off time over, scheduling restart.
2019-03-08T16:29:01Z systemd[1]: Stopped Service for snap application mir-kiosk.mir-kiosk.
2019-03-08T16:29:01Z systemd[1]: Started Service for snap application mir-kiosk.mir-kiosk.
2019-03-08T16:29:02Z mir-kiosk.mir-kiosk[9576]: [2019-03-08 16:29:02.372320] mirserver: Starting
2019-03-08T16:29:02Z mir-kiosk.mir-kiosk[9576]: [2019-03-08 16:29:02.376638] <DEBUG> mirserver: Using Linux VT subsystem for session management
2019-03-08T16:29:02Z mir-kiosk.mir-kiosk[9576]: [2019-03-08 16:29:02.378848] mircommon: Loading modules from: /snap/mir-kiosk/1217/usr/lib/arm-linux-gnueabihf/mir/server-platform
2019-03-08T16:29:02Z mir-kiosk.mir-kiosk[9576]: [2019-03-08 16:29:02.380355] mircommon: Loading module: /snap/mir-kiosk/1217/usr/lib/arm-linux-gnueabihf/mir/server-platform/graphics-mesa-kms.so.16
2019-03-08T16:29:02Z mir-kiosk.mir-kiosk[9576]: [2019-03-08 16:29:02.381594] mircommon: Loading module: /snap/mir-kiosk/1217/usr/lib/arm-linux-gnueabihf/mir/server-platform/server-mesa-x11.so.16
2019-03-08T16:29:02Z mir-kiosk.mir-kiosk[9576]: [2019-03-08 16:29:02.382887] mircommon: Loading module: /snap/mir-kiosk/1217/usr/lib/arm-linux-gnueabihf/mir/server-platform/input-evdev.so.7
2019-03-08T16:29:02Z mir-kiosk.mir-kiosk[9576]: [2019-03-08 16:29:02.394894] mesa-kms: EGL platform does not support EGL_KHR_platform_gbm extension
2019-03-08T16:29:02Z mir-kiosk.mir-kiosk[9576]: [2019-03-08 16:29:02.397850] mesa-kms: Device /dev/dri/card0 does not support KMS: Invalid argument
2019-03-08T16:29:02Z mir-kiosk.mir-kiosk[9576]: [2019-03-08 16:29:02.399461] mirplatform: Found graphics driver: mir:mesa-kms (version 1.1.1) Support priority: 0
2019-03-08T16:29:02Z mir-kiosk.mir-kiosk[9576]: [2019-03-08 16:29:02.400942] mirplatform: Found graphics driver: mir:mesa-x11 (version 1.1.1) Support priority: 0
2019-03-08T16:29:02Z mir-kiosk.mir-kiosk[9576]: ERROR: /build/mir-x4RqAR/mir-1.1.1/src/server/graphics/default_configuration.cpp(172): Throw in function mir::DefaultServerConfiguration::the_graphics_platform()::<lambda()>
2019-03-08T16:29:02Z mir-kiosk.mir-kiosk[9576]: Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >
2019-03-08T16:29:02Z mir-kiosk.mir-kiosk[9576]: std::exception::what: Exception while creating graphics platform
2019-03-08T16:29:02Z mir-kiosk.mir-kiosk[9576]: ERROR: /build/mir-x4RqAR/mir-1.1.1/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-03-08T16:29:02Z mir-kiosk.mir-kiosk[9576]: Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >
2019-03-08T16:29:02Z mir-kiosk.mir-kiosk[9576]: std::exception::what: Failed to find platform for current system
2019-03-08T16:29:02Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Main process exited, code=exited, status=1/FAILURE
2019-03-08T16:29:02Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Unit entered failed state.
2019-03-08T16:29:02Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Failed with result 'exit-code'.
2019-03-08T16:29:02Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Service hold-off time over, scheduling restart.
2019-03-08T16:29:02Z systemd[1]: Stopped Service for snap application mir-kiosk.mir-kiosk.
2019-03-08T16:29:02Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Start request repeated too quickly.
2019-03-08T16:29:02Z systemd[1]: Failed to start Service for snap application mir-kiosk.mir-kiosk.
2019-03-08T16:29:02Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Unit entered failed state.
2019-03-08T16:29:02Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Failed with result 'start-limit-hit'.'

The important part of that log is:

[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…

Oh! Sorry, the added line should read:

env-hacks=MIR_MESA_KMS_DISABLE_MODESET_PROBE

Note the hyphen, not underscore.

1 Like

I’ve fixed the miral-kiosk.config, that now looks like:

arw-file=
file=/run/mir_socket
console-provider=vt
display-layout=default
vt=4
cursor=auto
env-hacks=MIR_MESA_KMS_DISABLE_MODESET_PROBE

The behavior is changed but it seems that another error rise:

2019-03-08T16:56:18Z systemd[1]: Started Service for snap application mir-kiosk.mir-kiosk.
2019-03-08T16:56:19Z mir-kiosk.mir-kiosk[11256]: [2019-03-08 16:56:19.477607] mirserver: Starting
2019-03-08T16:56:19Z mir-kiosk.mir-kiosk[11256]: [2019-03-08 16:56:19.480559] <DEBUG> mirserver: Using Linux VT subsystem for session management
2019-03-08T16:56:19Z mir-kiosk.mir-kiosk[11256]: [2019-03-08 16:56:19.481619] mircommon: Loading modules from: /snap/mir-kiosk/1217/usr/lib/arm-linux-gnueabihf/mir/server-platform
2019-03-08T16:56:19Z mir-kiosk.mir-kiosk[11256]: [2019-03-08 16:56:19.482029] mircommon: Loading module: /snap/mir-kiosk/1217/usr/lib/arm-linux-gnueabihf/mir/server-platform/graphics-mesa-kms.so.16
2019-03-08T16:56:19Z mir-kiosk.mir-kiosk[11256]: [2019-03-08 16:56:19.482204] mircommon: Loading module: /snap/mir-kiosk/1217/usr/lib/arm-linux-gnueabihf/mir/server-platform/server-mesa-x11.so.16
2019-03-08T16:56:19Z mir-kiosk.mir-kiosk[11256]: [2019-03-08 16:56:19.482317] mircommon: Loading module: /snap/mir-kiosk/1217/usr/lib/arm-linux-gnueabihf/mir/server-platform/input-evdev.so.7
2019-03-08T16:56:19Z mir-kiosk.mir-kiosk[11256]: [2019-03-08 16:56:19.500793] mesa-kms: EGL platform does not support EGL_KHR_platform_gbm extension
2019-03-08T16:56:19Z mir-kiosk.mir-kiosk[11256]: MESA-LOADER: failed to retrieve device information
2019-03-08T16:56:19Z mir-kiosk.mir-kiosk[11256]: gbm: failed to open any driver (search paths /usr/lib/arm-linux-gnueabihf/dri:${ORIGIN}/dri:/usr/lib/dri)
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
2019-03-08T16:56:19Z mir-kiosk.mir-kiosk[11256]: [2019-03-08 16:56:19.666534] mesa-kms: Detected software renderer: llvmpipe (LLVM 6.0, 128 bits)
2019-03-08T16:56:19Z mir-kiosk.mir-kiosk[11256]: [2019-03-08 16:56:19.670133] mirplatform: Found graphics driver: mir:mesa-kms (version 1.1.1) Support priority: 128
2019-03-08T16:56:19Z mir-kiosk.mir-kiosk[11256]: [2019-03-08 16:56:19.670352] mirplatform: Found graphics driver: mir:mesa-x11 (version 1.1.1) Support priority: 0
2019-03-08T16:56:19Z mir-kiosk.mir-kiosk[11256]: [2019-03-08 16:56:19.671373] mirserver: Selected driver: mir:mesa-kms (version 1.1.1)
2019-03-08T16:56:19Z mir-kiosk.mir-kiosk[11256]: [2019-03-08 16:56:19.673614] mesa-kms: Using DRM device /dev/dri/card0
2019-03-08T16:56:19Z mir-kiosk.mir-kiosk[11256]: MESA-LOADER: failed to retrieve device information
2019-03-08T16:56:19Z mir-kiosk.mir-kiosk[11256]: gbm: failed to open any driver (search paths /usr/lib/arm-linux-gnueabihf/dri:${ORIGIN}/dri:/usr/lib/dri)
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
2019-03-08T16:56:19Z mir-kiosk.mir-kiosk[11256]: ERROR: /build/mir-x4RqAR/mir-1.1.1/src/platforms/common/server/kms-utils/drm_mode_resources.cpp(41): Throw in function mir::graphics::kms::DRMModeResUPtr {anonymous}::resources_for_drm_node(int)
2019-03-08T16:56:19Z mir-kiosk.mir-kiosk[11256]: Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::system_error> >
2019-03-08T16:56:19Z mir-kiosk.mir-kiosk[11256]: std::exception::what: Couldn't get DRM resources: Invalid argument
2019-03-08T16:56:19Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Main process exited, code=exited, status=1/FAILURE
2019-03-08T16:56:19Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Unit entered failed state.
2019-03-08T16:56:19Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Failed with result 'exit-code'.
2019-03-08T16:56:19Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Service hold-off time over, scheduling restart.
2019-03-08T16:56:19Z systemd[1]: Stopped Service for snap application mir-kiosk.mir-kiosk.
2019-03-08T16:56:19Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Start request repeated too quickly.
2019-03-08T16:56:19Z systemd[1]: Failed to start Service for snap application mir-kiosk.mir-kiosk.
2019-03-08T16:56:19Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Unit entered failed state.
2019-03-08T16:56:19Z systemd[1]: snap.mir-kiosk.mir-kiosk.service: Failed with result 'start-limit-hit'.

Excellent! It is now clear what is happening.

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: https://forum.snapcraft.io/t/libgl-and-snaps/6270

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?

Thank you!

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.)

Good luck!

1 Like

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.

Thank you,
Alessio

Hi @alessio, glad you’ve found a way forward :slight_smile: .

Would you be able to share something more? Any details about your particular use-case would be awesome to know :slight_smile: .

Apart from the problems we’ve discussed with the first device you tried, what worked well? What did not? Anything you feel missing?

Thanks!

Hi Alan,

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

40-1

4 Likes

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.

Reporting an issue with mir-kiosk as a review comment to a closed Mir PR is rather strange.

Reopening this thread is less strange, but the original post was about a Compulab SOM mx7, not a RPi3 b+.

You fixed the permission error on /run/user/0?

This is saying that there’s no display available. I assume you do have a display attached to the RPi?

Updating to 1.1.2 did yes thank you.

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”?

Direct Rendering Manager

I thought you said you were on stable before?

You also said there that you’re using “ubuntu core 18.04” could you clarify: are you using “Ubuntu Core 18” or “Ubuntu [classic] 18.04”?

I’m fairly confident that mir-kiosk runs with “Ubuntu Core 18” on RPi3 (because of the reported issues. e.g. https://github.com/MirServer/mir-kiosk/issues/23)

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).

Hi, Alan, I have a same error in Classic.

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?

The way to configure mir-kiosk to run on “classic” is:

sudo snap set mir-kiosk daemon=true
sudo snap restart mir-kiosk

Having said that, it won’t fix the error you are seeing. That comes from an incorrect AppArmor profile (this is described in https://discourse.ubuntu.com/t/howto-run-your-kiosk-snap-on-your-desktop/11180/4)

You can avoid this by installing the --edge version of snapd:

snap install --edge snapd