Mir-kiosk on Raspberry Pi 4

HiAll,
I have a iot kiosk project based on raspberry pi4 and ubuntu core 20.04. I installed “mir-kiosk” and start that with snap “sudo snap start mir-kiosk”, but when I run mir-kiosk gives the following error:
+ mkdir -p /root/snap/mir-kiosk/3782/.config/
+ grep -vE (^vt=|^console-provider=vt|^display-layout=) /var/snap/mir-kiosk/3782/miral-kiosk.config
+ exec /snap/mir-kiosk/3782/bin/run-miral
[2020-05-01 17:58:22.644570] mirserver: Starting
[2020-05-01 17:58:22.655839] < - debug - > mirserver: Not using logind for session management: Seat has no active session
[2020-05-01 17:58:22.657191] < - debug - > mirserver: Using Linux VT subsystem for session management
[2020-05-01 17:58:22.657732] mircommon: Loading modules from: /snap/mir-kiosk/3782/usr/lib/aarch64-linux-gnu/mir/server-platform
[2020-05-01 17:58:22.658096] mircommon: Loading module: /snap/mir-kiosk/3782/usr/lib/aarch64-linux-gnu/mir/server-platform/graphics-mesa-kms.so.16
[2020-05-01 17:58:22.658221] mircommon: Loading module: /snap/mir-kiosk/3782/usr/lib/aarch64-linux-gnu/mir/server-platform/graphics-wayland.so.16
[2020-05-01 17:58:22.658279] mircommon: Loading module: /snap/mir-kiosk/3782/usr/lib/aarch64-linux-gnu/mir/server-platform/server-mesa-x11.so.16
[2020-05-01 17:58:22.658329] mircommon: Loading module: /snap/mir-kiosk/3782/usr/lib/aarch64-linux-gnu/mir/server-platform/input-evdev.so.7
[2020-05-01 17:58:22.662996] mesa-kms: Unsupported: No DRM devices detected
[2020-05-01 17:58:22.663112] mirserver: Found graphics driver: mir:mesa-kms (version 1.7.2) Support priority: 0
[2020-05-01 17:58:22.663165] mirserver: Found graphics driver: mir:wayland (version 1.7.2) Support priority: 0
[2020-05-01 17:58:22.663241] mirserver: Found graphics driver: mir:mesa-x11 (version 1.7.2) Support priority: 0
ERROR: /build/mir-_elhGa/mir-1.8.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_injectorstd::runtime_error >
std::exception::what: Exception while creating graphics platform
ERROR: /build/mir-_elhGa/mir-1.8.0/src/server/graphics/platform_probe.cpp(119): Throw in function std::shared_ptrmir::SharedLibrary mir::graphics::module_for_device(const std::vector<std::shared_ptrmir::SharedLibrary >&, const mir::options::ProgramOption&, const std::shared_ptrmir::ConsoleServices&)
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorstd::runtime_error >
std::exception::what: Failed to find platform for current system

[quote=“smaeilirib, post:123, topic:6424, full:true”]
HiAll,
I have a iot kiosk project based on raspberry pi4 and ubuntu core 20.04. I installed “mir-kiosk” and start that with snap “sudo snap start mir-kiosk”, but when I run mir-kiosk gives the following error:
+ mkdir -p /root/snap/mir-kiosk/3782/.config/
+ grep -vE (^vt=|^console-provider=vt|^display-layout=) /var/snap/mir-kiosk/3782/miral-kiosk.config
+ exec /snap/mir-kiosk/3782/bin/run-miral
[2020-05-01 17:58:22.644570] mirserver: Starting
[2020-05-01 17:58:22.655839] < - debug - > mirserver: Not using logind for session management: Seat has no active session
[2020-05-01 17:58:22.657191] < - debug - > mirserver: Using Linux VT subsystem for session management
[2020-05-01 17:58:22.657732] mircommon: Loading modules from: /snap/mir-kiosk/3782/usr/lib/aarch64-linux-gnu/mir/server-platform
[2020-05-01 17:58:22.658096] mircommon: Loading module: /snap/mir-kiosk/3782/usr/lib/aarch64-linux-gnu/mir/server-platform/graphics-mesa-kms.so.16
[2020-05-01 17:58:22.658221] mircommon: Loading module: /snap/mir-kiosk/3782/usr/lib/aarch64-linux-gnu/mir/server-platform/graphics-wayland.so.16
[2020-05-01 17:58:22.658279] mircommon: Loading module: /snap/mir-kiosk/3782/usr/lib/aarch64-linux-gnu/mir/server-platform/server-mesa-x11.so.16
[2020-05-01 17:58:22.658329] mircommon: Loading module: /snap/mir-kiosk/3782/usr/lib/aarch64-linux-gnu/mir/server-platform/input-evdev.so.7
[2020-05-01 17:58:22.662996] mesa-kms: Unsupported: No DRM devices detected
[2020-05-01 17:58:22.663112] mirserver: Found graphics driver: mir:mesa-kms (version 1.7.2) Support priority: 0
[2020-05-01 17:58:22.663165] mirserver: Found graphics driver: mir:wayland (version 1.7.2) Support priority: 0
[2020-05-01 17:58:22.663241] mirserver: Found graphics driver: mir:mesa-x11 (version 1.7.2) Support priority: 0
ERROR: /build/mir-_elhGa/mir-1.8.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_injectorstd::runtime_error >
std::exception::what: Exception while creating graphics platform
ERROR: /build/mir-_elhGa/mir-1.8.0/src/server/graphics/platform_probe.cpp(119): Throw in function std::shared_ptrmir::SharedLibrary mir::graphics::module_for_device(const std::vector<std::shared_ptrmir::SharedLibrary >&, const mir::options::ProgramOption&, const std::shared_ptrmir::ConsoleServices&)
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorstd::runtime_error >
std::exception::what: Failed to find platform for current system

HiAll,
I have an iot kiosk project based on raspberry pi4 and ubuntu core 20.04. I installed “mir-kiosk” and start that with snap “sudo snap start mir-kiosk”, but when I run mir-kiosk gives the following error:


ERROR: /build/mir-_elhGa/mir-1.8.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_injectorstd::runtime_error >
std::exception::what: Exception while creating graphics platform
ERROR: /build/mir-_elhGa/mir-1.8.0/src/server/graphics/platform_probe.cpp(119): Throw in function std::shared_ptrmir::SharedLibrary mir::graphics::module_for_device(const std::vector<std::shared_ptrmir::SharedLibrary >&, const mir::options::ProgramOption&, const std::shared_ptrmir::ConsoleServices&)
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorstd::runtime_error >
std::exception::what: Failed to find platform for current system

Hi @smaeilirib,

As far as I am aware mir-kiosk runs on the RPi4, but clients are restricted to s/w rendering. I don’t have the hardware myself, so I can’t reproduce your problem.

Maybe you can find answers here:

OK, firstly, I would require months of study too even qualify as noob. new to OS, App, and everything in between. Secondly, if this is the wrong place to post this, please direct me and i will be happy to correct. Here is the issue. trying to set up a PI4 just to display a web page in a kiosk mode with no user input required. basically just a digital sign. pi3 and screenly would have been great, but page is too complex and pi3 lacked horsepower. so trying webkit-mir-kiosk. installed core 18, installed snap mir-kiosk and daemonized mir-kiosk . installed snap wpe-webkit-mir-kiosk. (not dev mode as this will be production box eventually) geting black screen and mouse pointer only. Have lots of apparmor=“DENIED” (example: type=1400 audit(1586278024.007:155): apparmor=“DENIED” operation=“rmdir” profile=“snap.wpe-webkit-mir-kiosk.browser” name="/root/snap/wpe-webkit-mir-kiosk/38/" pid=6481 comm=“rmdir” requested_mask=“d” denied_mask=“d” fsuid=0 ouid=0)

tried to figure out how to resolve by editing profile snap.wpe-webkit-mir-kiosk.browser, or at least put it in warn to confirm this is the issue, but the file is not in /etc/apparmor.d/ or /etc/apparmor.d/local and i don’t know where else to look. ANY advice would be appreciated as I am at a loss.

the question is probably better suited for https://forum.snapcraft.io

@rbaldauf I’ve moved your question here.

So far we’ve tracked the first problem to be LP#1876862 - missing kernel support.

update- to clarify, I am running webkit-mir-kiosk, not chromium-mir-kiosk (getting a lot of links to post about chromium issues)… also, mir-kiosk itself is not kicking any errors, giving black screen and mouse fine. only errors i can find appear to be the apparmor (not saying those might be stopping me from even getting to the other errors)

The problem is not mir-kiosk (as you noticed it starts fine and renders the cursor) … it falls back gracefully to software rendering …

but any X11 application will need access to working GL(ES) which is not properly provided by the kernel in a working state currently … so neither chromium-* nor webkit-mir-kiosk (or any other X11 based application) will be able to start …

Can this be tested without mir for opengl data processing purposes?

sure, mir is just needed for apps that require a display framework, you can indeed always talk directly to the GLES libs for computing purposes or via toolkits like Qt, SDL etc.

but that does not solve the problem that the kernel layer is not ready and the system will fall back to software rendering until the bugs around it are fixed.

So,if I connect openGL to docker, I not going to be able to use GPU because of kernel issues.isn’t it? Is this work planned for next releases?

On the other hand, there is an interesting snapcraft thread:

beta status can be tested like this:
https://blogs.igalia.com/apinheiro/2020/06/v3dv-quick-guide-to-build-and-run-some-demos/

I comment this, because not only opengl would be interesting, vulkan for rpi4 which is a very close milestone(and a closed one for rp3 rpi-vk-driver), would open many possibilities. But i see the thread is dead, because I guess is like a Santa Claus’ letter. Otherwise,if you could bring us some light about this…

well, you shoudl ask zyga in the other thread about the status …

what i know is that the kernel, mir and snapd teams work together on fixing GLES support for Ubuntu Core 20 on the pi4 and that they will (if possible in any way) backport the fix to Core 18 at least … (not sure about 16) …

Sorry, I asked here,because last comment in the thread was precisely someone asking for the status. I’ve already done the same

what i know is that the kernel, mir and snapd teams work together on fixing GLES support for Ubuntu Core 20

Great!

Ok,it looks like is not at the 20.1 roadmap (according to @zyga)

That’s “20.10” I guess.