Correct Video Corruption for EFI Plus Bochs
cover Correct Video Corruption for EFI Plus Bochs
Disable building video_bochs for EFI x86 platforms. For EFI platforms efi_gop or efi_uga should provide the video support. Currently, in EFI platforms there is a risk that both the bochs devices is present and the EFI video interface - which can cause unexpected video corruption when a mix of the two interfaces are used. This can happen when all_video is loaded for simplicity in a GRUB config.
There is some additional analysis from the Qemu team in this thread:
https://gitlab.com/qemu-project/qemu/-/issues/2562
This is an issue on some major distros such as Debian on EFI when running under Qemu and potentially other scenarios.
There is some discussion on the Debian side in this thread:
https://salsa.debian.org/kernel-team/linux/-/merge_requests/1453
This relates to this discussion from grub-devel also:
https://lists.gnu.org/archive/html/grub-devel/2025-09/msg00244.html
Andrew Hamilton (1):
build: Disable building video_bochs for EFI x86 platforms
grub-core/Makefile.core.def | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
Signature · 7 lines
2.47.3 _______________________________________________ Grub-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/grub-devel
PATCH 1/1 build: Disable building video_bochs for EFI x86 platforms
Disable building video_bochs for EFI x86 platforms. For EFI platforms efi_gop or efi_uga should provide the video support. Currently, in EFI platforms there is a risk that both the bochs devices is present and the EFI video interface - which can cause unexpected video corruption when a mix of the two interfaces are used. This can happen when all_video is loaded for simplicity in a GRUB config.
--- grub-core/Makefile.core.def | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
grub-core/Makefile.core.def +5 -1
@@ -2169,7 +2169,11 @@ module = { module = { name = video_bochs; x86 = video/bochs.c; - enable = x86; + enable = i386_pc; + enable = i386_qemu; + enable = i386_coreboot; + enable = i386_multiboot; + enable = i386_ieee1275; }; module = {
Signature · 7 lines
2.47.3 _______________________________________________ Grub-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/grub-devel
---- On Sun, 28 Sep 2025 18:29:48 +0400 Andrew Hamilton <[email protected]> wrote ---
Quoted 2 lines
Disable building
video_bochsfor EFI x86 platforms. For EFI platformsefi_goporefi_ugashould provide the video support. Currently,
Thank you! I tested your patch, and it indeed solves the issue. But the problem still exists if I pass "-vga cirrus" to Qemu. I. e. we need to disable video_cirrus, too.
So, please, disable ALL video drivers, except for efi_gop and efi_uga.
And this should apply to all UEFI architectures, not only to x86.
Signature · 8 lines
Askar Safin https://types.pl/@safinaskar _______________________________________________ Grub-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/grub-devel
Thanks, I’ll send out a v2 this evening.
Sincerely,
Andrew
Quoted 9 lines · Askar Safin
---- On Sun, 28 Sep 2025 18:29:48 +0400 Andrew Hamilton <
[email protected]> wrote ---Quoted 2 lines
Disable building
video_bochsfor EFI x86 platforms. For EFI platformsefi_goporefi_ugashould provide the video support. Currently,Thank you! I tested your patch, and it indeed solves the issue. But the problem still exists if I pass "-vga cirrus" to Qemu. I. e. we need to disable
video_cirrus, too.
Quoted 8 lines
So, please, disable ALL video drivers, except for
efi_gopandefi_uga.And this should apply to all UEFI architectures, not only to x86. --
Askar Safin
https://types.pl/@safinaskar
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
Quoted 9 lines · Askar Safin
---- On Sun, 28 Sep 2025 18:29:48 +0400 Andrew Hamilton <[email protected]> wrote ---
Quoted 2 lines
Disable building
video_bochsfor EFI x86 platforms. For EFI platformsefi_goporefi_ugashould provide the video support. Currently,Thank you! I tested your patch, and it indeed solves the issue. But the problem still exists if I pass "-vga cirrus" to Qemu. I. e. we need to disable
video_cirrus, too.So, please, disable ALL video drivers, except for
efi_gopandefi_uga.
I support this request.
Quoted 1 line
And this should apply to all UEFI architectures, not only to x86.
I'm not sure about this, though. On x86 it seems safe to assume that the system firmware and discrete graphics cards have a UEFI graphics driver and support GOP. On other platforms, UEFI may be implemented by U-Boot, where video support is optional. So this could be a regression for them.
Ben.
Signature · 2 lines
Ben Hutchings - Debian developer, member of kernel, installer and LTS teams
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel