Mir-kiosk. does it work?


#1

I’m trying to get a simple app running under mirkiosk. I’ve built a raspberry pi 3 with the official raspberry pi 7inch LCD and installed the edge variant of the pi3 snappy ubuntu core. I installed mir-kiosk and mir-libs via snap. Currently they’re sitting at:

core               16-2.28.1+git394.41c018d  3055  canonical  core
mir-kiosk          1.2.3                     35    canonical  -
mir-libs           0.26.3                    33    canonical  -

I then installed the snap I built on launchpad which uses QT and the mir-libs content interface. Upon starting mir-kiosk everything is good, with the display updating to a blank screen with a mouse cursor indicating that mir successfully started. But when I try to start my app mir immediately quits and is restarted by systemd, and my app sits idle without the display because the mir it connected to died and was replaced. My app thinks everything is fine but because mir died it is in the background not presenting its UI to the screen. The system logs the following as I start my app, which is called netconsole-reader:

Oct 02 22:04:21 localhost.localdomain systemd[1]: Started Service for snap application netconsole-reader.netconsole-reader.
-- Subject: Unit snap.netconsole-reader.netconsole-reader.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit snap.netconsole-reader.netconsole-reader.service has finished starting up.
-- 
-- The start-up result is done.
Oct 02 22:04:21 localhost.localdomain sudo[3755]: pam_unix(sudo:session): session closed for user root
Oct 02 22:04:21 localhost.localdomain netconsole-reader.netconsole-reader[3759]: Running /snap/netconsole-reader/x4/usr/bin/netconsole-reader
Oct 02 22:04:21 localhost.localdomain netconsole-reader.netconsole-reader[3759]: Loading module: 'libubuntu_application_api_desktop_mirclient.so.3.0.0'
Oct 02 22:04:21 localhost.localdomain audit[3819]: AVC apparmor="ALLOWED" operation="open" profile="snap.netconsole-reader.netconsole-reader" name="/usr/share/applications/" pid=3819 comm="netconsole-read
Oct 02 22:04:21 localhost.localdomain kernel: audit: type=1400 audit(1506981861.528:45): apparmor="ALLOWED" operation="open" profile="snap.netconsole-reader.netconsole-reader" name="/usr/share/application
Oct 02 22:04:21 localhost.localdomain audit[3819]: AVC apparmor="ALLOWED" operation="open" profile="snap.netconsole-reader.netconsole-reader" name="/usr/share/fonts/" pid=3819 comm="netconsole-read" reque
Oct 02 22:04:21 localhost.localdomain audit[3819]: AVC apparmor="ALLOWED" operation="open" profile="snap.netconsole-reader.netconsole-reader" name="/usr/share/fonts/" pid=3819 comm="netconsole-read" reque
Oct 02 22:04:21 localhost.localdomain audit[3819]: AVC apparmor="ALLOWED" operation="open" profile="snap.netconsole-reader.netconsole-reader" name="/usr/local/share/fonts/" pid=3819 comm="netconsole-read"
Oct 02 22:04:21 localhost.localdomain audit[3819]: AVC apparmor="ALLOWED" operation="open" profile="snap.netconsole-reader.netconsole-reader" name="/usr/local/share/fonts/" pid=3819 comm="netconsole-read"
Oct 02 22:04:21 localhost.localdomain kernel: audit: type=1400 audit(1506981861.640:46): apparmor="ALLOWED" operation="open" profile="snap.netconsole-reader.netconsole-reader" name="/usr/share/fonts/" pid
Oct 02 22:04:21 localhost.localdomain kernel: audit: type=1400 audit(1506981861.640:47): apparmor="ALLOWED" operation="open" profile="snap.netconsole-reader.netconsole-reader" name="/usr/share/fonts/" pid
Oct 02 22:04:21 localhost.localdomain kernel: audit: type=1400 audit(1506981861.640:48): apparmor="ALLOWED" operation="open" profile="snap.netconsole-reader.netconsole-reader" name="/usr/local/share/fonts
Oct 02 22:04:21 localhost.localdomain kernel: audit: type=1400 audit(1506981861.640:49): apparmor="ALLOWED" operation="open" profile="snap.netconsole-reader.netconsole-reader" name="/usr/local/share/fonts
Oct 02 22:04:21 localhost.localdomain netconsole-reader.netconsole-reader[3759]: xkbcommon: ERROR: couldn't find a Compose file for locale "C.UTF-8"
Oct 02 22:04:21 localhost.localdomain netconsole-reader.netconsole-reader[3759]: xkbcommon: ERROR: couldn't find a Compose file for locale "C.UTF-8"
Oct 02 22:04:21 localhost.localdomain netconsole-reader.netconsole-reader[3759]: xkbcommon: ERROR: couldn't find a Compose file for locale "C.UTF-8"
Oct 02 22:04:21 localhost.localdomain mir-kiosk.mir-kiosk[3150]: /snap/mir-kiosk/35/bin/run-miral: line 68:  3481 Floating point exception${SNAP}/usr/bin/${bin_to_run} --vt 1 --arw-file --file /run/mir_so
Oct 02 22:04:21 localhost.localdomain mir-kiosk.mir-kiosk[3150]: /snap/mir-kiosk/35/bin/run-miral: line 73:  3482 Terminated              $SNAP/usr/bin/inotifywait -e modify ${CONFIG_FILE}
Oct 02 22:04:21 localhost.localdomain mir-kiosk.mir-kiosk[3150]: Shutting down miral-kiosk (pid: 3481)
Oct 02 22:04:21 localhost.localdomain mir-kiosk.mir-kiosk[3150]: /snap/mir-kiosk/35/bin/run-miral: line 78: kill: (3481) - No such process
Oct 02 22:04:21 localhost.localdomain mir-kiosk.mir-kiosk[3150]: miral-kiosk was already dead!
Oct 02 22:04:21 localhost.localdomain systemd[1]: snap.mir-kiosk.mir-kiosk.service: Main process exited, code=exited, status=1/FAILURE
Oct 02 22:04:21 localhost.localdomain systemd[1]: snap.mir-kiosk.mir-kiosk.service: Unit entered failed state.
Oct 02 22:04:21 localhost.localdomain systemd[1]: snap.mir-kiosk.mir-kiosk.service: Failed with result 'exit-code'.
Oct 02 22:04:21 localhost.localdomain systemd[1]: snap.mir-kiosk.mir-kiosk.service: Service hold-off time over, scheduling restart.
Oct 02 22:04:21 localhost.localdomain systemd[1]: Stopped Service for snap application mir-kiosk.mir-kiosk.
-- Subject: Unit snap.mir-kiosk.mir-kiosk.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit snap.mir-kiosk.mir-kiosk.service has finished shutting down.
Oct 02 22:04:21 localhost.localdomain systemd[1]: Started Service for snap application mir-kiosk.mir-kiosk.
-- Subject: Unit snap.mir-kiosk.mir-kiosk.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit snap.mir-kiosk.mir-kiosk.service has finished starting up.
-- 
-- The start-up result is done.
Oct 02 22:04:22 localhost.localdomain sshd[2521]: pam_unix(sshd:session): session closed for user diddledan
Oct 02 22:04:22 localhost.localdomain sudo[3067]: pam_unix(sudo:session): session closed for user root
Oct 02 22:04:22 localhost.localdomain systemd-logind[1081]: Removed session 1.
-- Subject: Session 1 has been terminated
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
-- 
-- A session with the ID 1 has been terminated.
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: Setting up watches.
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: Watches established.
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.118822] mirplatform: Found graphics driver: mir:mesa-kms (version 0.26.3)
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.119129] mirplatform: Found graphics driver: mir:mesa-x11 (version 0.26.3)
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.122248] mirserver: Starting
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.122635] mircommon: Loading modules from: /snap/mir-kiosk/35/mir-libs/arm-linux-gnueabihf/mir/server-platform
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.122873] mircommon: Loading module: /snap/mir-kiosk/35/mir-libs/arm-linux-gnueabihf/mir/server-platform/graphics-mesa-k
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.122989] mircommon: Loading module: /snap/mir-kiosk/35/mir-libs/arm-linux-gnueabihf/mir/server-platform/server-mesa-x11
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.126654] mircommon: Loading module: /snap/mir-kiosk/35/mir-libs/arm-linux-gnueabihf/mir/server-platform/input-evdev.so.
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.135863] mirplatform: Found graphics driver: mir:mesa-kms (version 0.26.3)
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.136066] mirplatform: Found graphics driver: mir:mesa-x11 (version 0.26.3)
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.136783] mirserver: Selected driver: mir:mesa-kms (version 0.26.3)
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.209356] <DEBUG> mesa-kms: No EDID data available on connector 26
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.252679] mirserver: Using hardware cursor
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: xkbcommon: ERROR: couldn't find a Compose file for locale "C.UTF-8"
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.254450] mircommon: Loading modules from: /snap/mir-kiosk/35/mir-libs/arm-linux-gnueabihf/mir/server-platform
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.254941] mircommon: Loading module: /snap/mir-kiosk/35/mir-libs/arm-linux-gnueabihf/mir/server-platform/graphics-mesa-k
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.255171] mircommon: Loading module: /snap/mir-kiosk/35/mir-libs/arm-linux-gnueabihf/mir/server-platform/server-mesa-x11
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.259415] mircommon: Loading module: /snap/mir-kiosk/35/mir-libs/arm-linux-gnueabihf/mir/server-platform/input-evdev.so.
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.420711] mirserver: Selected input driver: mir:evdev-input (version: 0.26.3)
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.421223] mirserver: Mir version 0.26.3
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.460841] GLRenderer: EGL vendor: Mesa Project
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.461023] GLRenderer: EGL version: 1.4 (DRI2)
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.461087] GLRenderer: EGL client APIs: OpenGL OpenGL_ES
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.461157] GLRenderer: GL vendor: Broadcom
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.461206] GLRenderer: GL renderer: Gallium 0.4 on VC4
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.461252] GLRenderer: GL version: OpenGL ES 2.0 Mesa 12.0.6
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.461296] GLRenderer: GLSL version: OpenGL ES GLSL ES 1.0.16
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.461361] GLRenderer: GL max texture size = 2048
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.461442] GLRenderer: GL framebuffer bits: RGBA=8880, depth=0, stencil=0
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.467324] evdev-input: Added /dev/input/event0
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.468173] mirserver: Initial display configuration:
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.468289] mirserver:   Output 24: HDMI-A disconnected
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.468341] mirserver:   Output 26: DSI connected, used
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.468506] mirserver:       Physical size 10.1" 217x136mm
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.468554] mirserver:       Power is on
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.468603] mirserver:       Current mode 800x480 180.15Hz
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.468654] mirserver:       Preferred mode 800x480 180.15Hz
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.468700] mirserver:       Orientation normal
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.468755] mirserver:       Logical size 800x480
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: [2017-10-02 22:04:23.468801] mirserver:       Logical position +0+0
Oct 02 22:04:23 localhost.localdomain mir-kiosk.mir-kiosk[3828]: xkbcommon: ERROR: couldn't find a Compose file for locale "C.UTF-8"

The thing that jumps out at me are these two lines:

Oct 02 22:04:21 localhost.localdomain mir-kiosk.mir-kiosk[3150]: /snap/mir-kiosk/35/bin/run-miral: line 68:  3481 Floating point exception${SNAP}/usr/bin/${bin_to_run} --vt 1 --arw-file --file /run/mir_so
Oct 02 22:04:21 localhost.localdomain mir-kiosk.mir-kiosk[3150]: /snap/mir-kiosk/35/bin/run-miral: line 73:  3482 Terminated              $SNAP/usr/bin/inotifywait -e modify ${CONFIG_FILE}

Anyone have any thoughts as to what’s broken?


#2

while not being a mir developer, i know the mir-kiosk-apps snap generally works here (i use it to test graphics stuff every now and then on the pi and dragonboard) the source is at:

https://git.launchpad.net/mir-kiosk-apps

perhaps it helps to compare your app code with something in there …


#3

@bschaefer can you please have a look?


#4

did this get forgotten?


#5

Sorry, yeah I missed this. Im pretty sure this could be caused by a div by
0 bug that was fixed and pushed to a snap:
mir-kiosk --channel=edge/webkit-demo
mir-libs --channel=edge/webkit-demo

Hopefully those snaps are still around in those temp channnels!

https://bugs.launchpad.net/mir/+bug/1717061

As well double check your demo is also connected to mir-libs:mir-libs!


#6

It would seem that this is a different issue. It still fails after installing the snaps you suggest above from edge/webkit-demo channel. I rebooted to be sure that the change was finalised. My snap is connected to:

Slot               Plug
:network           netconsole-reader
:network-bind      netconsole-reader
:opengl            mir-kiosk,netconsole-reader
mir-kiosk:mir      netconsole-reader
mir-libs:mir-libs  mir-kiosk,netconsole-reader

#7

Hmm interesting, ive been on holiday this week. Ill be back tomorrow and
will try to reproduce!


#8

@daniel

I have just updated the mir-kiosk snap, which includes the latest mir release, fixing various issues. We are also in the process of deprecating mir-libs snap and instead the mir-libs slot is part of the mir-kiosk snap. So you should uninstall the mir-libs snap.

I made some slight changes to your code here:
https://code.launchpad.net/~albaguirre/+git/netconsole-reader-mods/+ref/master

The main thing is to avoid having mir libraries in the final snap, so they are not loaded by accident instead of the libs provided through the mir-libs content i/f. This ensures compatibility as we update the mir-kiosk snap.

For now you’ll have to manually connect the mir-libs plug (at least until this is approved: Mir-kiosk:mir-libs Auto-Connection)

snap connect netconsole-reader:mir-libs mir-kiosk:mir-libs

After a reboot, your netconsole app starts up as expected with the changes from my branch.


#9

thankyou so much. Your changes combined with the mir-kiosk in the edge channel works correctly now! awesome!


#10

Hi,

I’m testing it with the latest mir-kiosk and mir-kiosk-apps, still getting the same error as above. I removed mir-libs as mir-kiosk seems to provide mir-libs slot with this version and it seems to work (screen fades red to black, mouse moves).

The error in syslog:

Nov 15 23:06:00 localhost mir-kiosk-apps.mir-kiosk-app-daemon[6737]: QStandardPaths: XDG_RUNTIME_DIR points to non-existing path ‘/run/user/0/snap.mir-kiosk-apps’, please create it with 0700 permissions.
Nov 15 23:06:00 localhost mir-kiosk-apps.mir-kiosk-app-daemon[6737]: Loading module: 'libubuntu_application_api_desktop_mirclient.so.3.0.0’
Nov 15 23:06:00 localhost mir-kiosk-apps.mir-kiosk-app-daemon[6737]: pci id for fd 10: 80ee:beef, driver (null)
Nov 15 23:06:01 localhost mir-kiosk-apps.mir-kiosk-app-daemon[6737]: xkbcommon: ERROR: couldn’t find a Compose file for locale “C.UTF-8”

The interfaces seem to be connected properly:

mir-kiosk:mir mir-kiosk-apps
mir-kiosk:mir-libs-1604 mir-kiosk-apps

mir-kiosk info:
services:
mir-kiosk: simple, enabled, active
tracking: edge
installed: 0.28.1 (44) 53MB devmode
refreshed: 2017-11-09 16:08:00 +0000 UTC
channels:
stable: –
candidate: –
beta: 1.2.0 (30) 20MB -
edge: 0.28.1 (44) 53MB -

services:
mir-kiosk-apps.mir-kiosk-app-daemon: simple, enabled, active
tracking: edge
installed: 0.2.2 (30) 75MB devmode
refreshed: 2017-11-15 16:05:43 +0000 UTC
channels:
stable: –
candidate: –
beta: 0.1 (13) 71MB -
edge: 0.2.2 (30) 75MB -

When I check the xkb locale, it doesn’t exists:

ls /usr/share/X11/xkb/
compat geometry keycodes rules symbols types

I’m using the latest Core 16 image as VirtualBox guest.

Any ideas?


#11

@yossi,

Sorry I missed this. I don’t think VirtualBox has the appropriate support for mesa kms drivers as used by mir (or wayland for that matter).

Qemu/KVM does though.

See: https://developer.ubuntu.com/core/examples/snaps-on-mir

You may also want t to post mir and mir snap related questions on the mir forum here: