fix(menu): open the graphics output shared to keep the text console connected

This commit is contained in:
alex authored and Alex Zenla committed 2026-10-03 18:05:12 -07:00
1 parent e12e5dd7cf
commit 795e310ae7
1 file changed
+4 -2
+4 -2
View File
@@ -626,8 +626,10 @@ impl BootMenu for GraphicalMenu {
let handle = uefi::boot::get_handle_for_protocol::<GraphicsOutput>() let handle = uefi::boot::get_handle_for_protocol::<GraphicsOutput>()
.context("unable to find a graphics output")?; .context("unable to find a graphics output")?;
let mut gop = uefi::boot::open_protocol_exclusive::<GraphicsOutput>(handle) // Opening it exclusively would disconnect the firmware's text console from the display,
.context("unable to open the graphics output")?; // and anything printed after the menu may not show up.
let mut gop =
open_shared::<GraphicsOutput>(handle).context("unable to open the graphics output")?;
let (width, height) = gop.current_mode_info().resolution(); let (width, height) = gop.current_mode_info().resolution();
let mut fb = Framebuffer::new(width, height)?; let mut fb = Framebuffer::new(width, height)?;
let mut mouse = Mouse::open(); let mut mouse = Mouse::open();