main/postmarketos-bootsplash: add udev rules for plymouth

Without this rule, fb0 doesn't get ID_PATH set in the udev database
and plymouth this to detect that fb0 is backed by a DRM device. This
fixes an issue where plymouth times out and treats fb0 as an independent
display, and creates a second framebuffer renderer, which caused it to
render the splash at the wrong resolution.

These lines were lifted from 71-seat.rules, which are packaged in
systemd-udevd and elogind. They're vendored here because we don't want
to depend on elogind just for a few udev rules. These rules should be
idempotent in the rootfs (setting ID_PATH is guarded by ID_PATH=="" and
IIUC setting an existing TAG is a noop in udev)

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8561>
This commit is contained in:
Clayton Craft 2026-05-24 13:45:06 -07:00 committed by The Friendly Meow (merge) Bot
parent be5d39de3c
commit 4257f74e62
No known key found for this signature in database
3 changed files with 9 additions and 1 deletions

View file

@ -0,0 +1,4 @@
SUBSYSTEM=="graphics", KERNEL=="fb[0-9]*", TAG+="seat"
SUBSYSTEM=="drm", KERNEL=="card[0-9]*", TAG+="seat", TAG+="master-of-seat"
TAG=="seat", ENV{ID_PATH}=="", IMPORT{builtin}="path_id"
TAG=="seat", ENV{ID_FOR_SEAT}=="", ENV{ID_PATH_TAG}!="", ENV{ID_FOR_SEAT}="$env{SUBSYSTEM}-$env{ID_PATH_TAG}"

View file

@ -18,6 +18,7 @@ options="!check" # no testsuite
subpackages="$pkgname-openrc"
source="
20-plymouth.conf
60-seat-id-path.rules
kill-plymouth
plymouthd.conf
postmarketos-bootsplash.files
@ -43,6 +44,7 @@ package() {
"$pkgdir"/usr/share/mkinitfs-triggers/bootsplash
install -Dm644 20-plymouth.conf -t "$pkgdir"/usr/lib/kernel-cmdline.d
install -Dm644 60-seat-id-path.rules -t "$pkgdir"/usr/lib/udev/rules.d
}
openrc() {
@ -53,7 +55,8 @@ openrc() {
sha512sums="
dc6d38d3048ee3be47871cb9f4909cc7572f57be792c1cf39688abfd9659e5149699308ead35fe7fd37b87fbac5668cbf03d3b6acd74ec05c8c4b39735e9e8df 20-plymouth.conf
94a75f556c048296ee80fe61f7f9a68e408102eab00d12916cdc2f9ad860e2d449e0d86ef014caea43361621ed2cbb9d61cb21a8f573b4e93fc9f6052459e4c6 60-seat-id-path.rules
5d11ab555600606f5f27146aa982075d622068bb82b34144459c174da9e22c19b3adcd076d780885cd97313f1e3aee87052769e32d8b1332e4516abd0c9dda0d kill-plymouth
d4cab2578116afa4ca33ca94671191d44e71d4c46cfb11248c42f6bd1e49714eae56339330f483b247a3da0865892a100dc6f33e378a9cbfaea2f56e9616fcd8 plymouthd.conf
c261e23acc70c8062abf4d5419806a832889a70ed8222535269206bb333dfa6f9ab953fe2ddfcf032fe7f89c2ca0ed6497e6a61cf9fd99f6b6372b3dd55658af postmarketos-bootsplash.files
c2bad06ed32f9a84dc111e32dcb938fa6309617a33431102de898b8e2d4088d6af82718b3fca91b1271f9d14f2af7ec9ed1de0a17ce8870baa2b80276269e440 postmarketos-bootsplash.files
"

View file

@ -12,6 +12,7 @@
/usr/lib/plymouth/renderers/drm.so
/usr/lib/plymouth/renderers/frame-buffer.so
/usr/lib/plymouth/script.so
/usr/lib/udev/rules.d/60-seat-id-path.rules
/usr/sbin/plymouthd
/usr/share/fonts/droid/DroidSans.ttf
/usr/share/plymouth