i’m having problems getting wpe-webkit-mir-kiosk to work and hope this is the right place to ask for help. after installing the ubuntu-frame snap (snap install ubuntu-frame; snap set ubuntu-frame daemon=true) on a clean ubuntu installation, a gray/black screen is visible. then i execute the following:
snap install wpe-webkit-mir-kiosk
snap set wpe-webkit-mir-kiosk daemon=true
/snap/wpe-webkit-mir-kiosk/current/bin/setup.sh (which does as far as i know the same as "snap connect wpe-webkit-mir-kiosk:wayland")
and did a restart. ubuntu-frame seems to start, because the gray/black screen is visible again, but no browser. when i check the logs (snap logs wpe-webkit-mir-kiosk), there is one supicious line:
2023-08-31T20:59:14Z wpe-webkit-mir-kiosk.daemon[8401]: wl_display@1: error 1: invalid arguments for wl_shm@11.create_pool
because there were some apparmor errors visible via dmesg, i disabled apparmor for “snap.wpe-webkit-mir-kiosk.daemon”, but the error remains. i also tried other kiosk snaps like mir-kiosk-neverputt or dashkiosk-client-browser which work without any problems with ubuntu-frame. i’ve also tried different ubuntu version with the same result:
ubuntu core 22 arm64
ubuntu 20.04 server amd64 (latest; minimal installation)
ubuntu 22.04 server amd64 (latest; minimal installation)
ubuntu 23.04 server amd64 (latest; minimal installation)
all previous test were made on virtualbox for amd64 and qemu for arm64 ubuntu versions. today i’ve tried the same on ubuntu core 22.04 arm64 on rpi4 and everything works fine there. because i use raspberry as production platform, this issue is now low priority for me.
maybe someday this will be fixed, so testing on my dev platform is possible. maybe this thread will also save somebody some hours in trying.
Hi @ret, thanks for bringing this up. While the error message is different, it sounds a bit like https://gitlab.com/glancr/wpe-webkit-snap/-/issues/33 – did you enable 3D acceleration for your Virtualbox machine? Same question for the QEMU stack. I guess other kiosk snaps fall back to 2D rendering, as does ubuntu-frame.
snap get ubuntu-frame
Key Value
daemon false
display
layouts:
default:
cards:
- card-id: 0
DisplayPort-2:
mode: 1920x1080@60.0
snap get wpe-webkit-mir-kiosk
Key Value
bg-color black
daemon true
debug false
devmode false
error-to-console false
ignore-tls-errors false
inspector-http-server-port 8090
inspector-server-port 8080
url https://wpewebkit.org
Logs reveal the same error:
wpe-webkit-mir-kiosk.daemon[16928]: wl_display@1: error 1: invalid arguments for wl_shm@11.create_pool
More logs:
2024-03-14T16:53:33Z systemd[1]: Started Service for snap application wpe-webkit-mir-kiosk.daemon.
2024-03-14T16:53:33Z systemd[1]: Started Service for snap application wpe-webkit-mir-kiosk.restart-watcher.
2024-03-14T16:53:33Z wpe-webkit-mir-kiosk.restart-watcher[16864]: Setting up watches.
2024-03-14T16:53:33Z wpe-webkit-mir-kiosk.restart-watcher[16864]: Watches established.
2024-03-14T16:53:33Z -[16928]: Could not open /sys/class/dmi/id/chassis_type: Failed to open file “/sys/class/dmi/id/chassis_type”: Permission denied
2024-03-14T16:53:33Z -[16928]: Could not open /sys/firmware/acpi/pm_profile: Failed to open file “/sys/firmware/acpi/pm_profile”: Permission denied
2024-03-14T16:53:33Z wpe-webkit-mir-kiosk.daemon[16928]: MESA: warning: Driver does not support the 0xa7a0 PCI ID.
2024-03-14T16:53:33Z wpe-webkit-mir-kiosk.daemon[16928]: libEGL warning: DRI2: failed to create dri screen
2024-03-14T16:53:33Z wpe-webkit-mir-kiosk.daemon[16928]: Could not determine the accessibility bus address
2024-03-14T16:53:33Z -[16928]: Your application does not implement g_application_activate() and has no handlers connected to the 'activate' signal. It should do one of these.
2024-03-14T16:53:33Z -[16928]: Acquired D-Bus well-known name com.igalia.Cog
2024-03-14T16:53:33Z -[16938]: Could not open /sys/class/dmi/id/chassis_type: Failed to open file “/sys/class/dmi/id/chassis_type”: Permission denied
2024-03-14T16:53:33Z -[16938]: Could not open /sys/firmware/acpi/pm_profile: Failed to open file “/sys/firmware/acpi/pm_profile”: Permission denied
2024-03-14T16:53:33Z -[16928]: <https://wpewebkit.org/> Load started.
2024-03-14T16:53:33Z wpe-webkit-mir-kiosk.daemon[16928]: wl_display@1: error 1: invalid arguments for wl_shm@11.create_pool
2024-03-14T16:53:33Z -[16928]: <https://wpewebkit.org/> Loading...
2024-03-14T16:53:35Z -[16928]: <https://wpewebkit.org/> Loaded successfully.
2024-03-14T16:53:33Z ubuntu-frame.daemon[14729]: [2024-03-14 16:53:33.186304] <information> frame: New surface for snap="wpe-webkit-mir-kiosk" with title="Cog"
2024-03-14T16:53:33Z ubuntu-frame.daemon[14729]: file descriptor expected, object (11), message create_pool(nhi)
2024-03-14T16:53:33Z ubuntu-frame.daemon[14729]: error in client communication (pid 16928)
I tried to enable hardware acceleration by running:
@nblack-el the problem would appear to be with wpe-webkit-mir-kiosk not working with your graphics hardware. You don’t say what your hardware is and that might provide a clue.
What is your graphics hardware? The problem may well be that your hardware needs a more recent mesa than 21.2.6 (which is what mesa-core20 provides).
Pinging @tobias who maintains wpe-webkit-mir-kiosk.
BTW snap connect wpe-webkit-mir-kiosk:graphics-core20 ... doesn’t enable hardware acceleration and that connection is made by default anyway. (You wouldn’t get as far as you have without it.)
FWIW, I just released a core22-based WPE version on the track 22/stable for amd64 and armhf architectures. This uses mesa-core22, so maybe switching to this fixes your issue.
Run snap refresh --channel=22/stable wpe-webkit-mir-kiosk and start WPE to check. On desktop systems, you may also run the browser on-demand with wpe-webkit-mir-kiosk.cog.
@alan_g might have more insights if your graphics hardware requires newer MESA drivers.
I think that “Intel Corporation Device a7a0 (rev 04)” is from the last four years, but I don’t know exactly which Mesa version is needed to drive it. (The fact that mesa-core22 works for Frame and neverputt is reason to hope that this will work with WPE too.)