From 12d3dbf7de0a3416bad66737d4e0917ed7c7b6e5 Mon Sep 17 00:00:00 2001 From: Mintsuki Date: Sun, 12 Apr 2026 01:00:45 +0200 Subject: [PATCH] lib/term: Reset ConOut when falling back from graphical terminal --- common/lib/term.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common/lib/term.c b/common/lib/term.c index bbc26e16..96f0e220 100644 --- a/common/lib/term.c +++ b/common/lib/term.c @@ -225,6 +225,10 @@ static bool dummy_handle(void) { } void term_fallback(void) { +#if defined (UEFI) + int prev_backend = term_backend; +#endif + term_notready(); terms = ext_mem_alloc(sizeof(void *)); @@ -236,6 +240,9 @@ void term_fallback(void) { #if defined (UEFI) if (!efi_boot_services_exited) { + if (prev_backend != FALLBACK && prev_backend != _NOT_READY) { + gST->ConOut->Reset(gST->ConOut, true); + } #endif // XXX: Ideally we clear the screen, but that gets rid of the BGRT boot logo