From fe29c9ab343c1dab5fb0e05fa685ff98f960b370 Mon Sep 17 00:00:00 2001 From: Caleb Connolly Date: Mon, 20 Feb 2023 19:26:54 +0000 Subject: [PATCH] main/postmarketos-bootsplash: kill pbsplash before display-manager (MR 3893) If pbsplash is running when a display manager starts it often causes issues as display managers want to run on a particular VT, but are unable to switch the active VT since pbsplash has exclusive control of the framebuffer. Making DMs not start until after local would solve the issue but it would also needlessly delay the boot process. Until we have a better way to detect display managers starting and react to it, this will at least get devices working again. Though due to how openrc resolves service start order it may mean the splash is killed earlier than necessary. --- .../postmarketos-bootsplash/99-kill-pbsplash.start | 4 ---- main/postmarketos-bootsplash/APKBUILD | 14 ++++++++++---- main/postmarketos-bootsplash/kill-pbsplash | 12 ++++++++++++ .../postmarketos-bootsplash-openrc.post-install | 2 ++ 4 files changed, 24 insertions(+), 8 deletions(-) delete mode 100644 main/postmarketos-bootsplash/99-kill-pbsplash.start create mode 100644 main/postmarketos-bootsplash/kill-pbsplash create mode 100644 main/postmarketos-bootsplash/postmarketos-bootsplash-openrc.post-install diff --git a/main/postmarketos-bootsplash/99-kill-pbsplash.start b/main/postmarketos-bootsplash/99-kill-pbsplash.start deleted file mode 100644 index 30e3cf251..000000000 --- a/main/postmarketos-bootsplash/99-kill-pbsplash.start +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -echo "Killing boot splash" -killall pbsplash diff --git a/main/postmarketos-bootsplash/APKBUILD b/main/postmarketos-bootsplash/APKBUILD index 8562cbb38..4eb2d8fc7 100644 --- a/main/postmarketos-bootsplash/APKBUILD +++ b/main/postmarketos-bootsplash/APKBUILD @@ -1,6 +1,6 @@ # Maintainer: Caleb Connolly pkgname=postmarketos-bootsplash -pkgver=0.1 +pkgver=0.2 pkgrel=0 pkgdesc="pmOS integration components for pbsplash" url="https://postmarketos.org" @@ -8,8 +8,9 @@ arch="all" license="CC-BY-SA-3.0" depends="pbsplash" options="!check" # no testsuite +subpackages="$pkgname-openrc" source=" - 99-kill-pbsplash.start + kill-pbsplash OpenSans-Regular.svg pmos-logo.svg pmos-logo-text.svg @@ -18,7 +19,7 @@ source=" " package() { - install -Dm755 "$srcdir/99-kill-pbsplash.start" -t "$pkgdir"/etc/local.d/ + install -Dm755 "$srcdir/kill-pbsplash" -t "$pkgdir"/etc/init.d/ install -Dm644 "$srcdir"/OpenSans-Regular.svg -t "$pkgdir"/usr/share/pbsplash/ install -Dm644 "$srcdir"/pmos-logo.svg -t "$pkgdir"/usr/share/pbsplash/ install -Dm644 "$srcdir"/pmos-logo-text.svg -t "$pkgdir"/usr/share/pbsplash/ @@ -27,8 +28,13 @@ package() { "$pkgdir"/etc/postmarketos-mkinitfs/files/30-postmarketos-bootsplash.files } +openrc() { + install="$subpkgname.post-install" + default_openrc +} + sha512sums=" -c49513ec133e53816c68757f93adf053bcf93e2da9e8a1c0a4590ab315ce4b77edbe97c5895c36d8c2ccfb29447c7527ece0cf3be7744b94ddd4345e8d318a1c 99-kill-pbsplash.start +7e5416f0f9de3605dcbc5ddd4b93d244fd6d4fd1bc2d5a15a034263f8517fc51e73509f29f2a13397d059913917990ada89b36ac7b00a0d21c0283fade755c1c kill-pbsplash 2387c64d84f0ba3ee76925f55c87ce025140aa3cd462107a851c34ffd89bd52f606e0d1f9f371d4f642d96545d5cc1bc0fcfb23ca7629a9149055f068da6bffd OpenSans-Regular.svg 98984fd67b99400d2b08422c4d314da558d3c94ee67dbc895e7bbfd6fdf22d4b2c9d35f48f4b73b383a054f535d4089fb705c5532f034cb2ee54eab2184e8e86 pmos-logo.svg 1940480fb98ffd1cef17c0ed440d44aa200119d022ce59973a18fa39ee040b19e748312ae61edae4ff8d2bacf42b4d7c9144274b99cd8563e4a106447825b8f2 pmos-logo-text.svg diff --git a/main/postmarketos-bootsplash/kill-pbsplash b/main/postmarketos-bootsplash/kill-pbsplash new file mode 100644 index 000000000..bceba66f8 --- /dev/null +++ b/main/postmarketos-bootsplash/kill-pbsplash @@ -0,0 +1,12 @@ +#!/sbin/openrc-run +# Copyright 2023 Caleb Connolly +# SPDX-License-Identifier: GPL-3.0-or-later +name="kill-pbsplash" +description="Stop the splash animation" + +command="/usr/bin/killall" +command_args="pbsplash" + +depend() { + before display-manager +} diff --git a/main/postmarketos-bootsplash/postmarketos-bootsplash-openrc.post-install b/main/postmarketos-bootsplash/postmarketos-bootsplash-openrc.post-install new file mode 100644 index 000000000..04e92d376 --- /dev/null +++ b/main/postmarketos-bootsplash/postmarketos-bootsplash-openrc.post-install @@ -0,0 +1,2 @@ +#!/bin/sh +rc-update add kill-pbsplash default