plymouthd does not quit and prevents gui apps from rendering

Hi,

Plymouthd does not quit after boot. This prevents DRM/DRI gui applications from rendering.
This happens on each boot. BalenaOS 6.0.24+rev1 (Intel Celeron J6412, industrial motherboard, all-in-one device with integrated touch screen).

Here is an example kmscube configuration that has this problem, but works when you manually kill plymouth on the balena host.

[Logs]    [2024-10-15T08:52:36.914Z] [kmscube] failed to set mode: Permission denied

Dockerfile

FROM balenalib/genericx86-64-ext-debian:latest

RUN apt-get update && apt-get install -y \
    kmscube \
    libdrm2 \
    libdrm-tests \
    libgbm1 \
    libegl1-mesa \
    libgles2-mesa \
    libgl1-mesa-dri \
    libinput10 \
    udev \
    --no-install-recommends

RUN apt-get install -y \
    x11-utils \
    mesa-utils \
    && apt-get clean

WORKDIR /root

CMD ["kmscube"]

Docker compose:

version: "2"
services:
  kmscube:
    build: .
    restart: always
    privileged: true
    environment:
      UDEV: 1
    devices:
      - "/dev/dri:/dev/dri"
      - "/dev/input:/dev/input"
root@d94785e:~# lsof /dev/dri/*
COMMAND    PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
plymouthd 1014 root    9u   CHR  226,0      0t0  737 /dev/dri/card0

Stopping all plymouth systemd units fixes the issue and kmscube runs perfectly.

systemctl stop plymouth*

How can i ensure plymouth is stops as the container starts?

I tried using dbus:

CMD \
    dbus-send --system --print-reply --dest=org.freedesktop.Plymouth /org/freedesktop/Plymouth org.freedesktop.Plymouth.Quit && \
    sleep 2 && \
    kmscube
version: "2"
services:
  kmscube:
    build: .
    restart: always
    privileged: true
    environment:
      UDEV: 1
      DBUS_SYSTEM_BUS_ADDRESS: unix:path=/host/run/dbus/system_bus_socket
    devices:
      - "/dev/dri:/dev/dri"
      - "/dev/input:/dev/input"
      - "/run/dbus/system_bus_socket:/run/dbus/system_bus_socket"
    labels:
      io.balena.features.dbus: '1'

But it does not seem to work.

Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Plymouth was not provided by any .service files

Seems hacky anyway. What’s the correct way to ensure that plymouth is quit as the application containers are started? This problem repeats on every reboot.

Thanks!

(related thread died: How to run gui apps? DRI/DRM with kmscube "failed to set mode: Permission denied")

Hey @dotdev2 , I have a similar project that needs to stop the plymouthd service and this is what works for me:

In fact at one point in the past this stopped working correctly so we made a change to balenaOS to restore the intended behaviour:

I hope this helps!