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

How can I install Mir-kiosk 2.2.0 on my system? I am facing issues in new version of mir-kiosk and previous version that is 2.2.0 seems to work seamlessly for my use case.
@ogra @alan_g

In the short term snap revert, but it isn’t clear what is happening on your system as mir-kiosk 2.2.0 doesn’t work on Nvidia either.

Snap revert seems to only work if there is a previously installed mir-kiosk version. I want to install mir-kiosk 2.2.0 on a fresh machine . We have already ran our electron kiosk application with mir-kiosk 2.2.0 with nvidia driver version 440.59.

Specific issue I am facing with mir-kiosk 2.3.2 is the cursor gets stuck on top left corner and wherever you click any part of the screen, the click gets executed at top left corner everytime.

Note: I have already used this command - sudo snap set mir-kiosk cursor=software

As mentioned by @alan_g at Call for testing: mir-kiosk that mir-kiosk 2.3.2 has rectifications which corrects pointer sticking to the side of the screen. However, It used to work fine for my electron kiosk snap but after updating to mir-kiosk 2.3.2, the pointer seems to get stuck on top left corner everytime and also the click gets executed at top left corner.

Is there a solution for this? or if you can guide me on how can I use the previous mir-kiosk version i-e 2.2.0 on a fresh machine, or how can I build mir-kiosk 2.2.0 snap from the source code on your github. This would be highly helpful to me as mir-kiosk is one of our major part of deploying our software. @alan_g @ogra @Saviq

It is unhelpful to add this discussion to the topic “Mir-kiosk fails to start. only black screen appears and no orangish fade pops up”. How will anyone else encountering this problem find it?

The change you refer to does indeed allow a client snap (such as yours) to request the cursor be locked in position. If the cursor shouldn’t be locked then, ideally, your snap not ask for it to be locked.

However, it is possible to disable the pointer confinement protocols in mir-kiosk to prevent the request being made using drop-wayland-extensions=zwp_pointer_constraints_v1:zwp_relative_pointer_manager_v1 in the configuration file described in Configuring mir-kiosk: a masterclass.

1 Like

Thankyou for your reply. I will open another discussion topic on the same problem. @alan_g