Mir-kiosk fails to start. only black screen appears and no orangish fade pops up

I have been using mir-kiosk to build kiosk snap. I also successfully build one and deployed it. After I tried the same configurations and setting and try to run mir-kiosk and electron kiosk snap on another system but i get the following error.

2021-02-10T11:33:28Z mir-kiosk.daemon[27832]: [2021-02-10 11:33:28.086839] < - debug - > gbm-kms: MIR_MESA_KMS_DISABLE_MODESET_PROBE is set
2021-02-10T11:33:28Z mir-kiosk.daemon[27832]: [2021-02-10 11:33:28.086851] < -warning- > gbm-kms: Failed to detect whether device /dev/dri/card0 supports KMS, but continuing anyway
2021-02-10T11:33:28Z mir-kiosk.daemon[27832]: [2021-02-10 11:33:28.086866] <information> gbm-kms: Using DRM device /dev/dri/card0
2021-02-10T11:33:28Z mir-kiosk.daemon[27832]: Failed to create /root/.cache/mesa_shader_cache for shader cache (Permission denied)---disabling.
2021-02-10T11:33:28Z mir-kiosk.daemon[27832]: ERROR: /build/mir-K7y0Z4/mir-2.2.0/src/platforms/common/server/kms-utils/drm_mode_resources.cpp(41): Throw in function mir::graphics::kms::DRMModeResUPtr {anonymous}::resources_for_drm_node(int)
2021-02-10T11:33:28Z mir-kiosk.daemon[27832]: Dynamic exception type: boost::wrapexcept<std::system_error>
2021-02-10T11:33:28Z mir-kiosk.daemon[27832]: std::exception::what: Couldn't get DRM resources: Operation not supported
2021-02-10T11:33:28Z systemd[1]: snap.mir-kiosk.daemon.service: Main process exited, code=exited, status=1/FAILURE
2021-02-10T11:33:28Z systemd[1]: snap.mir-kiosk.daemon.service: Failed with result 'exit-code'.
2021-02-10T11:33:29Z systemd[1]: Stopped Service for snap application mir-kiosk.daemon.

I am not able to see a orangish fade like before. just a black screen. Above are the logs of the same. Kindly help me on this.

well, what is the difference between these systems ? looks like the new one has no proper graphics drivers around or some such …

Well, there is no differemce in the systems. Both uses ubuntu desktop 18.04. To add both have nvidia drivers installed for our particular tasks. But it worked on previous machine and popping up error on this new one. Can you guide to overcome this error if its related to graphics?

Regards,

This is the output of

sudo journalctl -u snap.mir-kiosk*

-- Logs begin at Sat 2021-02-06 18:07:54 IST, end at Thu 2021-02-11 13:32:32 IST. --
Feb 10 17:00:56 cfai-AX370-Gaming-3 systemd[1]: Started Service for snap application mir-kiosk.daemon.
Feb 10 17:00:57 cfai-AX370-Gaming-3 mir-kiosk.daemon[17839]: [2021-02-10 11:30:57.087340] <information> mirserver: Starting
Feb 10 17:00:57 cfai-AX370-Gaming-3 mir-kiosk.daemon[17839]: [2021-02-10 11:30:57.263495] < - debug - > mirserver: Using Linux VT subsystem for session m
Feb 10 17:00:57 cfai-AX370-Gaming-3 mir-kiosk.daemon[17839]: [2021-02-10 11:30:57.263690] <information> mircommon: Loading modules from: /snap/mir-kiosk/
Feb 10 17:00:57 cfai-AX370-Gaming-3 mir-kiosk.daemon[17839]: [2021-02-10 11:30:57.263734] <information> mircommon: Loading module: /snap/mir-kiosk/6458/u
Feb 10 17:00:57 cfai-AX370-Gaming-3 mir-kiosk.daemon[17839]: [2021-02-10 11:30:57.263743] <information> mircommon: Loading module: /snap/mir-kiosk/6458/u
Feb 10 17:00:57 cfai-AX370-Gaming-3 mir-kiosk.daemon[17839]: [2021-02-10 11:30:57.263750] <information> mircommon: Loading module: /snap/mir-kiosk/6458/u
Feb 10 17:00:57 cfai-AX370-Gaming-3 mir-kiosk.daemon[17839]: [2021-02-10 11:30:57.263757] <information> mircommon: Loading module: /snap/mir-kiosk/6458/u
Feb 10 17:00:57 cfai-AX370-Gaming-3 mir-kiosk.daemon[17839]: [2021-02-10 11:30:57.283248] < - debug - > gbm-kms: MIR_MESA_KMS_DISABLE_MODESET_PROBE is se
Feb 10 17:00:57 cfai-AX370-Gaming-3 mir-kiosk.daemon[17839]: [2021-02-10 11:30:57.283277] < -warning- > gbm-kms: Failed to detect whether device /dev/dri
Feb 10 17:00:58 cfai-AX370-Gaming-3 mir-kiosk.daemon[17839]: Failed to create /root/.cache/mesa_shader_cache for shader cache (Permission denied)---disab
Feb 10 17:00:58 cfai-AX370-Gaming-3 mir-kiosk.daemon[17839]: [2021-02-10 11:30:58.335171] <information> gbm-kms: Detected software renderer: llvmpipe (LL
Feb 10 17:00:58 cfai-AX370-Gaming-3 mir-kiosk.daemon[17839]: [2021-02-10 11:30:58.335625] <information> mirserver: Found graphics driver: mir:gbm-kms (ve
Feb 10 17:00:58 cfai-AX370-Gaming-3 mir-kiosk.daemon[17839]: [2021-02-10 11:30:58.335651] <information> mirserver: Found graphics driver: mir:wayland (ve
Feb 10 17:00:58 cfai-AX370-Gaming-3 mir-kiosk.daemon[17839]: [2021-02-10 11:30:58.358405] <information> mirserver: Found graphics driver: mir:x11 (versio
Feb 10 17:00:58 cfai-AX370-Gaming-3 mir-kiosk.daemon[17839]: [2021-02-10 11:30:58.365509] <information> mirserver: Selected driver: mir:gbm-kms (version 
Feb 10 17:00:58 cfai-AX370-Gaming-3 mir-kiosk.daemon[17839]: [2021-02-10 11:30:58.365809] < - debug - > gbm-kms: MIR_MESA_KMS_DISABLE_MODESET_PROBE is se
Feb 10 17:00:58 cfai-AX370-Gaming-3 mir-kiosk.daemon[17839]: [2021-02-10 11:30:58.365817] < -warning- > gbm-kms: Failed to detect whether device /dev/dri
Feb 10 17:00:58 cfai-AX370-Gaming-3 mir-kiosk.daemon[17839]: [2021-02-10 11:30:58.365826] <information> gbm-kms: Using DRM device /dev/dri/card0
Feb 10 17:00:58 cfai-AX370-Gaming-3 mir-kiosk.daemon[17839]: Failed to create /root/.cache/mesa_shader_cache for shader cache (Permission denied)---disab
Feb 10 17:00:58 cfai-AX370-Gaming-3 mir-kiosk.daemon[17839]: ERROR: /build/mir-K7y0Z4/mir-2.2.0/src/platforms/common/server/kms-utils/drm_mode_resources.
Feb 10 17:00:58 cfai-AX370-Gaming-3 mir-kiosk.daemon[17839]: Dynamic exception type: boost::wrapexcept<std::system_error>
Feb 10 17:00:58 cfai-AX370-Gaming-3 mir-kiosk.daemon[17839]: std::exception::what: Couldn't get DRM resources: Operation not supported
Feb 10 17:00:58 cfai-AX370-Gaming-3 systemd[1]: snap.mir-kiosk.daemon.service: Main process exited, code=exited, status=1/FAILURE
Feb 10 17:00:58 cfai-AX370-Gaming-3 systemd[1]: snap.mir-kiosk.daemon.service: Failed with result 'exit-code'.
Feb 10 17:01:01 cfai-AX370-Gaming-3 systemd[1]: snap.mir-kiosk.daemon.service: Service hold-off time over, scheduling restart.
Feb 10 17:01:01 cfai-AX370-Gaming-3 systemd[1]: snap.mir-kiosk.daemon.service: Scheduled restart job, restart counter is at 1.
Feb 10 17:01:01 cfai-AX370-Gaming-3 systemd[1]: Stopped Service for snap application mir-kiosk.daemon.
Feb 10 17:01:01 cfai-AX370-Gaming-3 systemd[1]: Started Service for snap application mir-kiosk.daemon.
Feb 10 17:01:01 cfai-AX370-Gaming-3 mir-kiosk.daemon[18046]: [2021-02-10 11:31:01.813278] <information> m

perhaps @alan_g has some idea about the DRM errors here, i’m also not sure why the snap tries to write to /root/.cache (it’s a daemon and should better point its home to $SNAP_DATA or $SNAP_COMMON)

Not sure what is happening here. Unfortunately the interesting part of the log messages is truncated.

From what I can see, mesa is falling back to s/w rendering because it lacks drivers to use the hardware directly. I suspect the DRM errors are related to the unsupported stack.

What hardware and OS is this running on?

I suspect it is llvmpipe that tries to use /root/.cache. (Not sure how it chooses that location but I take the point about $HOME.)

I am using ubuntu desktop 18.04 as an OS and i have nvidia drivers installed in it. Is there any workaround to solve the DRM issue?
On my previous machine with same configurations, mir-kiosk started and ran perfectly without any error.

You’ll need to enable drm modeset before Mir can work with the Nvidia drivers. E.g.

sudo echo options nvidia-drm modeset=1 > /etc/modprobe.d/nvidia-kms.conf

BUT enabling DRM won’t solve all your problems as the mir-kiosk snap requires drivers that support gbm-kms. (It does not bundle the alternative “eglstream-kms” platform it would need to work with Nvidia.)

Reference:

Hi @shakib1126, unfortunately due to how Nvidia drivers work (matching kernel module and userspace), we’ve not found a way to have snaps reliably work across releases:

You’ll need to upgrade to 20.04 (about time, too ;)), or rebuild the mir-kiosk snap with base: core18.

This is a ThinkPad X61s running Ubuntu Core 16 on the bare metal, no VM. perfectly as expected (including “orange fade to black animation”) up to the point of It is just that the display on the device only shows a black screen and a The problem lies in the combination of the chromium-mir -kiosk snap and your setup.

this topic is about systems where the orange splash does not show up at all, if you see it but have a black screen afterwards, this is different … you should start a new discussion in a fresh thread instead …

Okay so I tried @alan_g reference and instructions on running mir-kiosk on nvidia drivers and thankfully mir-kiosk is running just perfect without any errors and i am able to run electron kiosk app on my ubuntu system.

Thankyou @ogra, @alan_g and @Saviq for the instant support and guidelines provided.

2 Likes