[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#987124: console-setup not work properly with plymouth



Still reproducible on testing.

Here is the deal:
Console setup is supposed to rely on cached scripts in /etc/console-setup (copied to initramfs). But plymouth starts in initramfs, occupies tty1, which causes setupcon to detect graphical mode and skip tty1.
When scripts exist in /etc/console-setup, conditions in /lib/console-setup/console-setup.sh basically skip running setupcon if console-setup.service is launched first time during boot.

To fix this:
1. add plymouth-exit.service to After= in console-setup.service
2. add plymouth exit detection to console-setup.sh

--- /lib/console-setup/console-setup.sh	2023-02-09 01:33:51.198998809 +0300
+++ /lib/console-setup/console-setup.sh	2023-02-09 01:34:10.826464995 +0300
@@ -16,6 +16,10 @@
               -nt /etc/default/keyboard ] || do_configure=yes
         [ /etc/console-setup/cached_setup_terminal.sh \
               -nt /etc/default/console-setup ] || do_configure=yes
+
+        # if plymouth-exit.service was launched and registered as active,
+        # plymouth has released tty1 for us to fix
+        systemctl is-active -q plymouth-quit.service && do_configure=yes
         ;;
 esac


Reply to: