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

2024-03-12 Thread Vladimir K
If plymouth password prompt is used during boot (i.e. root volume decryption 
from initramfs), just the patch above will not work, also need to add 
plymouth-quit.service to 'After' property in console-setup.service



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

2024-02-13 Thread Vladimir K
A bit more refined variant without ps:

--- a/lib/console-setup/console-setup.sh   2024-02-09 17:45:38.0 +0300  

+++ b/lib/console-setup/console-setup.sh 2024-02-14 01:15:24.413177808 +0300
  
@@ -16,6 +16,16 @@
   -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, this means
+# plymouth released tty1 for us to fix
+if [ -r /proc/1/comm ] &&
+  [ "$(read -r INIT < /proc/1/comm ; echo "$INIT")" = "systemd" ] 
&&
+  command -v systemctl >/dev/null &&
+  systemctl is-active -q plymouth-quit.service
+then
+  do_configure=yes
+fi
 ;;
 esac



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

2023-02-08 Thread Vladimir K
Check if systemd is present to avoid errors if it is not.

--- /lib/console-setup/console-setup.sh 2023-02-09 01:33:51.198998809 +0300
+++ /lib/console-setup/console-setup.sh 2023-02-09 01:59:48.786418782 +0300
@@ -16,6 +16,13 @@
   -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, this means
+# plymouth released tty1 for us to fix
+command -v systemctl >/dev/null && \
+  [ $(ps -p 1 -o comm=) == "systemd" ] && \
+  systemctl is-active -q plymouth-quit.service && \
+  do_configure=yes
 ;;
 esac


Other than that I do not know how to quickly detect exited plymouth and 
properly order console-setup launch in a SysV boot.
Maybe modify /etc/init.d/console-setup.sh to hold while plymouthd is running 
(with a timeout).



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

2023-02-08 Thread Vladimir K
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



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

2021-04-17 Thread Pavel Samsonov
Package: console-setup
Version: 1.202
Severity: normal
X-Debbugs-Cc: pvsamsono...@gmail.com

Dear Maintainer,

The /etc/init.d/console-setup.sh startup script does not change
 the system console font if the plymouth graphic splash screen is
 enabled at startup.


-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.31-tinyware-amd64 (SMP w/3 CPU threads)
Kernel taint flags: TAINT_UNSIGNED_MODULE
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages console-setup depends on:
ii  console-setup-linux 1.202
ii  debconf 1.5.75
ii  keyboard-configuration  1.202
ii  xkb-data2.29-2

console-setup recommends no packages.

Versions of packages console-setup suggests:
ii  locales   2.31-11
ii  lsb-base  11.1.0

Versions of packages keyboard-configuration depends on:
ii  debconf 1.5.75
ii  liblocale-gettext-perl  1.07-4+b1

Versions of packages console-setup-linux depends on:
ii  init-system-helpers 1.60
ii  kbd 2.3.0-3
ii  keyboard-configuration  1.202

console-setup-linux suggests no packages.

Versions of packages console-setup is related to:
pn  console-common
pn  console-data  
pn  console-tools 
pn  gnome-control-center  
ii  kbd   2.3.0-3
ii  systemd   247.3-3

-- debconf-show failed