From 3a10cafbad76be68d956e0653e044a4a6c5dafce Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 26 Mar 2026 23:43:32 +0100 Subject: [PATCH] boot: do no show pixel width/height in text mode When running in pure text mode (i.e. serial terminal) the pixel width/height is zero and makes no sense to report. Suppress it. (cherry picked from commit 208cc69c5005a7c9edec96ca5109c226126106a6) --- src/boot/boot.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/boot/boot.c b/src/boot/boot.c index e5a2874c290..b2681b2d278 100644 --- a/src/boot/boot.c +++ b/src/boot/boot.c @@ -325,9 +325,13 @@ static void print_status(Config *config, char16_t *loaded_image_path) { secure_boot_mode_to_string(secure)); printf(" shim: %ls\n", yes_no(shim_loaded())); printf(" TPM: %ls\n", yes_no(tpm_present())); - printf(" console mode: %i/%" PRIi64 " (%zux%zu @%ux%u)\n", - ST->ConOut->Mode->Mode, ST->ConOut->Mode->MaxMode - INT64_C(1), - x_max, y_max, screen_width, screen_height); + printf(" console mode: %i/%" PRIi64 " (%zux%zu", + ST->ConOut->Mode->Mode, ST->ConOut->Mode->MaxMode - INT64_C(1), + x_max, y_max); + if (screen_width > 0 && screen_height > 0) + printf(" @ %ux%u", + screen_width, screen_height); + printf(")\n"); if (!ps_continue()) return;