Bug#859458: Because of displays with very high dpi, not only the keyboard, but the font has to be configured early
Here you go. Both scripts are in the attached "SCRIPTS.txt". Note that on my systems I keep only the one PSF font that I actually use, so my hook script does not need to update cached fonts + my systems are without PLYMOUTH. Check Pedro's scripts if you need to handle those more complex usages. Regards, JmkrSCRIPT 1 "/etc/initramfs-tools/hooks/console-setup": #!/bin/sh case "$1" in prereqs) echo 'keymap' exit 0;; esac . /usr/share/initramfs-tools/hook-functions if [ -x /bin/plymouth ]; then echo 'W: Graphical boot splash prevents setting console fonts.' fi fontfile=$(ls -1 -t /etc/console-setup/cached_*.psf.gz 2>/dev/null | head -n 1) if [ -n "$fontfile" ] && [ -r "$fontfile" ]; then copy_exec /bin/setfont copy_file font "$fontfile" fi if [ ! -x "$DESTDIR"/bin/setfont ]; then echo 'E: Failed to copy the "/bin/setfont" executable.' exit 1 fi if [ ! -r "$DESTDIR$fontfile" ]; then echo "E: Failed to copy the \"$fontfile\" file." exit 1 fi -- SCRIPT 2 "/etc/initramfs-tools/scripts/init-top/console-setup": #!/bin/sh case "$1" in prereqs) echo 'udev keymap' exit 0;; esac fontfile=$(ls -1 -t /etc/console-setup/cached_*.psf.gz 2>/dev/null | head -n 1) if [ -x /bin/setfont ] && [ -n "$fontfile" ] && [ -r "$fontfile" ]; then setfont "$fontfile" fi
Bug#859458: Because of displays with very high dpi, not only the keyboard, but the font has to be configured early
Jmkr schrieb am Di 26. Mär, 23:31 (+0100): > Although Plymouth is not installed on my systems I adapted some safety > check bits from those scripts for my systems. So thanks again Jörg Sommer > and Pedro Dias:). Cool, the power of open source team work. Could you provide your new script? I've published mine somewhere else and would like to also adjust this. Regards Jörg -- > Definiere ‚Demokratie‘ … … eine Mehrheit beweist einer Minderheit, dass Widerstand zwecklos ist. signature.asc Description: PGP signature
Bug#859458: Because of displays with very high dpi, not only the keyboard, but the font has to be configured early
I checked the INITRAMFS-TOOLS source code and the "PREREQ" variable + "prereqs" function seems redundant - details are in a new bug I submitted: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1067804 I also found an alternative to Jörg's scripts that could be useful for Plymouth boot splash users: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=857132#207 Although Plymouth is not installed on my systems I adapted some safety check bits from those scripts for my systems. So thanks again Jörg Sommer and Pedro Dias:). Regards, Jmkr
Bug#859458: Because of displays with very high dpi, not only the keyboard, but the font has to be configured early
Hello, I also hit this bug when switching from BIOS to UEFI boot process. Details for context are in the next paragraph, but feel free to skip to the QUESTION part:). After disabling the legacy BIOS support on my machines I noticed UEFI boot process uses the native LCD resolution. This causes smaller looking console fonts. It also makes GRUB use its GFXTERM font that in addition to being small has completely different style compared to "Uni2-VGA16.psf.gz". I previously used that ugly default looking font just to avoid even uglier noticeable font switching (during both booting and installing Debian). Thanks to Jörg Sommer's scripts I was finally able to set a much nicer and more adequately sized font ("Uni2-TerminusBold24x12.psf.gz") without noticeable font switching during booting. I did not finish integrating this into my customized Debian installer yet, but it is still a nice improvement for my machines. QUESTION: I have one question about INITRAMFS-TOOLS PREREQ mechanism. My other scripts use this redundant-looking "PREREQ" variable + "prereqs" function: ... PREREQ='...' prereqs () { echo "$PREREQ" } case "$1" in prereqs) prereqs exit 0;; esac ... I tested that all my INITRAMFS-TOOLS scripts work with this code or without it (= echo '...' directly in "case" statement like in Jörg's scripts) - at least the system boots fine. But I noticed that the INITRAMFS-TOOLS(7) manpage also recommends such code. So does anyone know if and why the "PREREQ" variable + "prereqs" function is really necessary? Regards, Jmkr
Bug#859458: Because of displays with very high dpi, not only the keyboard, but the font has to be configured early
Package: console-setup Followup-For: Bug #859458 X-Debbugs-Cc: die...@gnome.org I seem unable to reproduce in my current unstable/sid system. At first I thought it was because I had switched to `dracut`, but seems like I can't reproduce the original issue with `initramfs-tools`. Perhaps something else solved this? Maybe a newer `udev`? Can anyone confirm? -- System Information: Debian Release: bullseye/sid APT prefers unstable-debug APT policy: (500, 'unstable-debug'), (500, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 5.7.0-2-amd64 (SMP w/4 CPU threads) Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en 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.196 ii debconf 1.5.74 ii keyboard-configuration 1.196 ii xkb-data2.29-2 console-setup recommends no packages. Versions of packages console-setup suggests: ii locales 2.31-2 ii lsb-base 11.1.0 Versions of packages keyboard-configuration depends on: ii debconf 1.5.74 ii liblocale-gettext-perl 1.07-4 Versions of packages console-setup-linux depends on: ii init-system-helpers 1.58 ii kbd 2.0.4-4 ii keyboard-configuration 1.196 console-setup-linux suggests no packages. Versions of packages console-setup is related to: pn console-common pn console-data pn console-tools ii gnome-control-center 1:3.36.4-1 ii kbd 2.0.4-4 ii systemd 246-2 -- debconf information: * keyboard-configuration/xkb-keymap: es * keyboard-configuration/compose: No compose key * keyboard-configuration/layout: keyboard-configuration/unsupported_config_layout: true keyboard-configuration/unsupported_layout: true * keyboard-configuration/other: * console-setup/fontsize-fb47: 16x32 (framebuffer only) * console-setup/fontface47: Terminus * console-setup/codeset47: Guess optimal character set * keyboard-configuration/variant: Spanish console-setup/framebuffer_only: console-setup/guess_font: console-setup/fontsize-text47: 16x32 (framebuffer only) * keyboard-configuration/variantcode: * keyboard-configuration/layoutcode: es * keyboard-configuration/altgr: The default for the keyboard layout console-setup/store_defaults_in_debconf_db: true * keyboard-configuration/toggle: No toggling keyboard-configuration/ctrl_alt_bksp: false * keyboard-configuration/optionscode: * keyboard-configuration/store_defaults_in_debconf_db: true * keyboard-configuration/modelcode: pc105 console-setup/use_system_font: keyboard-configuration/unsupported_options: true * console-setup/charmap47: UTF-8 console-setup/codesetcode: guess * keyboard-configuration/switch: No temporary switch debian-installer/console-setup-udeb/title: console-setup/fontsize: 16x32 * keyboard-configuration/model: Generic 105-key PC (intl.) keyboard-configuration/unsupported_config_options: true