Commit 39147d6b authored by Guido Gunther's avatar Guido Gunther
Browse files

phosh.service: Reduce boot flicker

Reduce flicker during boot by using tty1 and stopping
plymouth ourself.
parent c9b32753
Pipeline #71001 passed with stages
in 19 minutes and 34 seconds
From: =?utf-8?q?Guido_G=C3=BCnther?= <agx@sigxcpu.org>
Date: Thu, 9 Sep 2021 15:23:51 +0200
Subject: phosh.service: Reduce boot flicker
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Backport of upstream MR
https://gitlab.gnome.org/World/Phosh/phosh/-/merge_requests/890
Signed-off-by: Guido Günther <guido.gunther@puri.sm>
Signed-off-by: Guido Günther <agx@sigxcpu.org>
---
data/phosh.in | 4 ++++
data/phosh.service | 22 ++++++++++++++++++----
2 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/data/phosh.in b/data/phosh.in
index 0fcf1fb..a34e8c5 100755
--- a/data/phosh.in
+++ b/data/phosh.in
@@ -44,6 +44,10 @@ elif [ -f /etc/phosh/rootston.ini ]; then
PHOC_INI=/etc/phosh/rootston.ini
fi
+if type plymouth >/dev/null 2>&1; then
+ plymouth quit >/dev/null 2>&1
+fi
+
# Run gnome-session through a login shell so it picks
# variables from /etc/profile.d (XDG_*)
[ -n "$WLR_BACKENDS" ] || WLR_BACKENDS=drm,libinput
diff --git a/data/phosh.service b/data/phosh.service
index 6a1bda3..f91e3ea 100644
--- a/data/phosh.service
+++ b/data/phosh.service
@@ -2,10 +2,24 @@
Description=Phosh, a shell for mobile phones
Documentation=https://gitlab.gnome.org/World/Phosh/phosh
-# Make sure we are started after logins are permitted.
-After=systemd-user-sessions.service
-# If Plymouth is used, we want to start when it is on its way out.
-After=plymouth-quit-wait.service
+# replaces the getty
+Conflicts=getty@tty1.service
+After=getty@tty1.service
+
+# replaces plymouth-quit since it quits plymouth on its own
+Conflicts=plymouth-quit.service
+After=plymouth-quit.service
+
+# Needs all the dependencies of the services it's replacing
+# pulled from getty@.service and plymouth-quit.service
+# (except for plymouth-quit-wait.service since it waits until
+# plymouth is quit, which we do)
+After=rc-local.service plymouth-start.service systemd-user-sessions.service
+
+# phosh takes responsibility for stopping plymouth, so if it fails
+# for any reason, make sure plymouth still stops
+OnFailure=plymouth-quit.service
+OnFailure=getty@tty1.service
# D-Bus is necessary for contacting logind. Logind is required.
Wants=dbus.socket
phosh.service-Reduce-boot-flicker.patch
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment