Run mir-kiosk in Hyper-V (No DRM devices detected)

Hi,

I am trying to get mir-kiosk to work in windows running Ubuntu Core in Hyper-V.

Ubuntu Core is running fine.

This is the log for mir-kiosk. Is there anything I could do to make it work?

08 08:21:10 ubuntu systemd[1]: Stopped Service for snap application mir-kiosk.daemon.
Aug 08 08:21:10 ubuntu systemd[1]: Started Service for snap application mir-kiosk.daemon.
Aug 08 08:21:10 ubuntu mir-kiosk.daemon[4093]: [2021-08-08 08:21:10.498685] <information> mirserver: Starting
Aug 08 08:21:10 ubuntu mir-kiosk.daemon[4093]: [2021-08-08 08:21:10.499072] < - debug - > mirserver: Using Linux VT subsystem for session management
Aug 08 08:21:10 ubuntu mir-kiosk.daemon[4093]: [2021-08-08 08:21:10.499174] <information> mircommon: Loading modules from: /snap/mir-kiosk/7278/usr/lib/x86_64-linux-gnu/mir/server-platform
Aug 08 08:21:10 ubuntu mir-kiosk.daemon[4093]: [2021-08-08 08:21:10.499207] <information> mircommon: Loading module: /snap/mir-kiosk/7278/usr/lib/x86_64-linux-gnu/mir/server-platform/graphics-gbm-kms.so.19
Aug 08 08:21:10 ubuntu mir-kiosk.daemon[4093]: [2021-08-08 08:21:10.499219] <information> mircommon: Loading module: /snap/mir-kiosk/7278/usr/lib/x86_64-linux-gnu/mir/server-platform/server-x11.so.19
Aug 08 08:21:10 ubuntu mir-kiosk.daemon[4093]: [2021-08-08 08:21:10.499228] <information> mircommon: Loading module: /snap/mir-kiosk/7278/usr/lib/x86_64-linux-gnu/mir/server-platform/input-evdev.so.8
Aug 08 08:21:10 ubuntu mir-kiosk.daemon[4093]: [2021-08-08 08:21:10.500143] <information> gbm-kms: Unsupported: No DRM devices detected
Aug 08 08:21:10 ubuntu mir-kiosk.daemon[4093]: [2021-08-08 08:21:10.500236] <information> mirserver: Found graphics driver: mir:gbm-kms (version 2.4.1) Support priority: 0
Aug 08 08:21:10 ubuntu mir-kiosk.daemon[4093]: [2021-08-08 08:21:10.500283] <information> mirserver: Found graphics driver: mir:x11 (version 2.4.1) Support priority: 0
Aug 08 08:21:10 ubuntu mir-kiosk.daemon[4093]: ERROR: /build/mir-VQizFV/mir-2.4.1/src/server/graphics/default_configuration.cpp(232): Throw in function virtual const std::vector<std::shared_ptr<mir::graphics::DisplayPlatform> >& mir::DefaultServerConfiguration::the_display_platforms()
Aug 08 08:21:10 ubuntu mir-kiosk.daemon[4093]: Dynamic exception type: boost::wrapexcept<std::runtime_error>
Aug 08 08:21:10 ubuntu mir-kiosk.daemon[4093]: std::exception::what: Exception while creating graphics platform
Aug 08 08:21:10 ubuntu mir-kiosk.daemon[4093]: ERROR: /build/mir-VQizFV/mir-2.4.1/src/server/graphics/platform_probe.cpp(137): Throw in function std::vector<std::shared_ptr<mir::SharedLibrary> > {anonymous}::modules_for_device({anonymous}::ModuleType, const std::vector<std::shared_ptr<mir::SharedLibrary> >&, const mir::options::ProgramOption&, const std::shared_ptr<mir::ConsoleServices>&)
Aug 08 08:21:10 ubuntu mir-kiosk.daemon[4093]: Dynamic exception type: boost::wrapexcept<std::runtime_error>
Aug 08 08:21:10 ubuntu mir-kiosk.daemon[4093]: std::exception::what: Failed to find any platforms for current system
Aug 08 08:21:10 ubuntu systemd[1]: snap.mir-kiosk.daemon.service: Main process exited, code=exited, status=1/FAILURE
Aug 08 08:21:10 ubuntu systemd[1]: snap.mir-kiosk.daemon.service: Failed with result 'exit-code'.
Aug 08 08:21:13 ubuntu systemd[1]: snap.mir-kiosk.daemon.service: Scheduled restart job, restart counter is at 18.

Mir-kiosk won’t work without DRM. I do see a few hits searching Hyper-V DRM, but don’t have the resources to investigate further.

It looks like you’ll need to spin your own device image with a new kernel - the Hyper-v DRM code is still not in mainline kernel, but is currently scheduled for 5.14:

https://phoronix.com/scan.php?page=news_item&px=Linux-5.14-Hyper-V-Display