mbox series

[0/3] Display manager proposal for x11 and wayland

Message ID 20250502202840.3148565-2-rs@ti.com
Headers show
Series Display manager proposal for x11 and wayland | expand

Message

Randolph Sapp May 2, 2025, 8:28 p.m. UTC
From: Randolph Sapp <rs@ti.com>

We've recently run into some issues with weston-init attempting to start
Weston prior to all drm devices being registered. There's not really a
good, scriptable mechanism to listen in to device registration events
that works with the existing weston-init package. Well, at least one
that doesn't involve polling files or introducing more dependency on the
init system being used.

I also see there is also a lot of scripting around starting X11,
xserver-nodm-init, that (from my limited review) should experience the
same issue.

I'd like to introduce the following display manager for oe-core, emptty
[1]. This display manager is, as described upstream, a "Dead simple CLI
Display Manager on TTY". It supports both x11 and wayland sessions, with
togglable build parameters to completely remove x11 and pam
dependencies. It's licensed MIT, which shouldn't be an issue for any
users. (It is written in Go, if you have opinions about that.)

With this, both weston-init and the xserver-nodm-init packages can be
re-tuned to leverage this display manager and simply add a user and
emptty config for an autologin session. This can resolve the current
behavior across init systems without additional scripting, and move some
development out of this layer.

This lists myself as a maintainer of emptty as well as xserver-nodm-init and
xuser-account since these are currently unassigned and I've reworked them
significantly here.

Sorry for the delay on this series. I found a few bugs in emptty that I wanted
to address before submitting this officially.

[1] https://github.com/tvrzna/emptty

Randolph Sapp (3):
  emptty: add version 0.14.0
  weston-init: convert to virtual-emptty-conf
  xserver-nodm-init: convert to virtual-emptty-conf

 .../conf/distro/include/default-providers.inc |   1 +
 meta/conf/distro/include/maintainers.inc      |   5 +-
 meta/recipes-graphics/emptty/emptty-conf.bb   |  14 +
 meta/recipes-graphics/emptty/emptty.inc       |  26 ++
 .../recipes-graphics/emptty/emptty/emptty.tab |   1 +
 meta/recipes-graphics/emptty/emptty/pamconf   |  10 +
 meta/recipes-graphics/emptty/emptty_0.14.0.bb |  53 +++
 meta/recipes-graphics/wayland/weston-init.bb  |  61 +--
 .../wayland/weston-init/emptty.conf           |  77 ++++
 .../recipes-graphics/wayland/weston-init/init |  54 ---
 .../wayland/weston-init/weston-autologin      |  11 -
 .../wayland/weston-init/weston-socket.sh      |  20 -
 .../wayland/weston-init/weston-start          |  76 ----
 .../wayland/weston-init/weston.env            |   0
 .../wayland/weston-init/weston.service        |  71 ----
 .../wayland/weston-init/weston.socket         |  14 -
 .../x11-common/xserver-nodm-init/X11/Xsession |  38 --
 .../X11/Xsession.d/13xdgbasedirs.sh           |  19 -
 .../X11/Xsession.d/89xdgautostart.sh          |   7 -
 .../X11/Xsession.d/90XWindowManager.sh        |   7 -
 .../x11-common/xserver-nodm-init/Xserver      |  25 --
 .../xserver-nodm-init/capability.conf         |   2 -
 .../xserver-nodm-init/default.desktop         |   5 +
 .../xserver-nodm-init/emptty.conf.in          |  77 ++++
 .../xserver-nodm-init/gplv2-license.patch     | 355 ------------------
 .../x11-common/xserver-nodm-init/xserver-nodm |  75 ----
 .../xserver-nodm-init/xserver-nodm.conf.in    |   7 -
 .../xserver-nodm-init/xserver-nodm.service.in |  11 -
 .../x11-common/xserver-nodm-init_3.0.bb       |  57 +--
 .../user-creation/xuser-account_0.1.bb        |   3 +-
 30 files changed, 297 insertions(+), 885 deletions(-)
 create mode 100644 meta/recipes-graphics/emptty/emptty-conf.bb
 create mode 100644 meta/recipes-graphics/emptty/emptty.inc
 create mode 100644 meta/recipes-graphics/emptty/emptty/emptty.tab
 create mode 100644 meta/recipes-graphics/emptty/emptty/pamconf
 create mode 100644 meta/recipes-graphics/emptty/emptty_0.14.0.bb
 create mode 100644 meta/recipes-graphics/wayland/weston-init/emptty.conf
 delete mode 100644 meta/recipes-graphics/wayland/weston-init/init
 delete mode 100644 meta/recipes-graphics/wayland/weston-init/weston-autologin
 delete mode 100755 meta/recipes-graphics/wayland/weston-init/weston-socket.sh
 delete mode 100755 meta/recipes-graphics/wayland/weston-init/weston-start
 delete mode 100644 meta/recipes-graphics/wayland/weston-init/weston.env
 delete mode 100644 meta/recipes-graphics/wayland/weston-init/weston.service
 delete mode 100644 meta/recipes-graphics/wayland/weston-init/weston.socket
 delete mode 100644 meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession
 delete mode 100644 meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession.d/13xdgbasedirs.sh
 delete mode 100644 meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession.d/89xdgautostart.sh
 delete mode 100644 meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession.d/90XWindowManager.sh
 delete mode 100644 meta/recipes-graphics/x11-common/xserver-nodm-init/Xserver
 delete mode 100644 meta/recipes-graphics/x11-common/xserver-nodm-init/capability.conf
 create mode 100644 meta/recipes-graphics/x11-common/xserver-nodm-init/default.desktop
 create mode 100644 meta/recipes-graphics/x11-common/xserver-nodm-init/emptty.conf.in
 delete mode 100644 meta/recipes-graphics/x11-common/xserver-nodm-init/gplv2-license.patch
 delete mode 100755 meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm
 delete mode 100644 meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf.in
 delete mode 100644 meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.service.in

Comments

Mathieu Dubois-Briand May 3, 2025, 1:05 p.m. UTC | #1
On Fri May 2, 2025 at 10:28 PM CEST, Randolph Sapp via lists.openembedded.org wrote:
> From: Randolph Sapp <rs@ti.com>
>
> We've recently run into some issues with weston-init attempting to start
> Weston prior to all drm devices being registered. There's not really a
> good, scriptable mechanism to listen in to device registration events
> that works with the existing weston-init package. Well, at least one
> that doesn't involve polling files or introducing more dependency on the
> init system being used.
>
> I also see there is also a lot of scripting around starting X11,
> xserver-nodm-init, that (from my limited review) should experience the
> same issue.
>
> I'd like to introduce the following display manager for oe-core, emptty
> [1]. This display manager is, as described upstream, a "Dead simple CLI
> Display Manager on TTY". It supports both x11 and wayland sessions, with
> togglable build parameters to completely remove x11 and pam
> dependencies. It's licensed MIT, which shouldn't be an issue for any
> users. (It is written in Go, if you have opinions about that.)
>
> With this, both weston-init and the xserver-nodm-init packages can be
> re-tuned to leverage this display manager and simply add a user and
> emptty config for an autologin session. This can resolve the current
> behavior across init systems without additional scripting, and move some
> development out of this layer.
>
> This lists myself as a maintainer of emptty as well as xserver-nodm-init and
> xuser-account since these are currently unassigned and I've reworked them
> significantly here.
>
> Sorry for the delay on this series. I found a few bugs in emptty that I wanted
> to address before submitting this officially.
>

Hi Randolph,

Thanks for your patches.

We got some warnings on the autobuilder, as no maintainer is assigned to
the emptty-conf recipe:

WARNING: emptty-conf-1.0-r0 do_recipe_qa: QA Issue: Recipe emptty-conf in /srv/pokybuild/yocto-worker/a-full/build/meta/recipes-graphics/emptty/emptty-conf.bb does not have an assigned maintainer. Please add an entry into meta/conf/distro/include/maintainers.inc. [missing-maintainer]

https://autobuilder.yoctoproject.org/valkyrie/#/builders/29/builds/1515/steps/13/logs/stdio

Can you fix this on the next iteration please?
Mathieu Dubois-Briand May 3, 2025, 1:16 p.m. UTC | #2
Sorry, but we probably have two more issues on the autobuilder related
to this series.

First, it looks like we have a dependency issue:

ERROR: Nothing PROVIDES 'libxcrypt' (but /srv/pokybuild/yocto-worker/musl-qemux86/build/meta/recipes-graphics/emptty/emptty_0.14.0.bb DEPENDS on or otherwise requires it)
libxcrypt was skipped: PREFERRED_PROVIDER_virtual/crypt set to musl, not libxcrypt
ERROR: Nothing RPROVIDES 'emptty' (but /srv/pokybuild/yocto-worker/musl-qemux86/build/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb, /srv/pokybuild/yocto-worker/musl-qemux86/build/meta/recipes-graphics/wayland/weston-init.bb, /srv/pokybuild/yocto-worker/musl-qemux86/build/meta/recipes-graphics/emptty/emptty_0.14.0.bb RDEPENDS on or otherwise requires it)
No eligible RPROVIDERs exist for 'emptty'
NOTE: Runtime target 'emptty' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['emptty']
ERROR: Nothing RPROVIDES 'xserver-nodm-init-dev' (but /srv/pokybuild/yocto-worker/musl-qemux86/build/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb RDEPENDS on or otherwise requires it)
No eligible RPROVIDERs exist for 'xserver-nodm-init-dev'
NOTE: Runtime target 'xserver-nodm-init-dev' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['xserver-nodm-init-dev']
ERROR: Nothing RPROVIDES 'xserver-nodm-init' (but /srv/pokybuild/yocto-worker/musl-qemux86/build/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb, /srv/pokybuild/yocto-worker/musl-qemux86/build/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb RDEPENDS on or otherwise requires it)
No eligible RPROVIDERs exist for 'xserver-nodm-init'
NOTE: Runtime target 'xserver-nodm-init' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['xserver-nodm-init']
ERROR: Nothing RPROVIDES 'weston-init-dev' (but /srv/pokybuild/yocto-worker/musl-qemux86/build/meta/recipes-graphics/wayland/weston-init.bb RDEPENDS on or otherwise requires it)
No eligible RPROVIDERs exist for 'weston-init-dev'
NOTE: Runtime target 'weston-init-dev' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['weston-init-dev']
ERROR: Nothing RPROVIDES 'weston-init' (but /srv/pokybuild/yocto-worker/musl-qemux86/build/meta/recipes-graphics/wayland/weston-init.bb, /srv/pokybuild/yocto-worker/musl-qemux86/build/meta/recipes-graphics/packagegroups/packagegroup-core-weston.bb, /srv/pokybuild/yocto-worker/musl-qemux86/build/meta/recipes-graphics/wayland/weston_14.0.1.bb RDEPENDS on or otherwise requires it)

https://autobuilder.yoctoproject.org/valkyrie/#/builders/6/builds/1541
https://autobuilder.yoctoproject.org/valkyrie/#/builders/3/builds/1571
https://autobuilder.yoctoproject.org/valkyrie/#/builders/11/builds/1494
https://autobuilder.yoctoproject.org/valkyrie/#/builders/37/builds/1565
https://autobuilder.yoctoproject.org/valkyrie/#/builders/111/builds/259

Then we have a test error on some other builds:

RESULTS - xorg.XorgTest.test_xorg_running: FAILED (1.05s)
...
AssertionError: 1 != 0 : Xorg does not appear to be running   PID USER       VSZ STAT COMMAND

https://autobuilder.yoctoproject.org/valkyrie/#/builders/20/builds/1491
https://autobuilder.yoctoproject.org/valkyrie/#/builders/30/builds/1502
https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/1471
...

Can you have a look at these failures please?