diff -c2 --recursive a/stand/common/gfx_fb.c b/stand/common/gfx_fb.c *** a/stand/common/gfx_fb.c Wed Dec 31 06:36:43 2025 --- b/stand/common/gfx_fb.c Wed Dec 31 06:36:55 2025 *************** *** 794,798 **** * boot services. */ ! if (gop != NULL && boot_services_active) { tpl = BS->RaiseTPL(TPL_NOTIFY); switch (BltOperation) { --- 794,798 ---- * boot services. */ ! if (gop != NULL && boot_services_active && gfx_state.tg_fb_type == FB_GOP) { tpl = BS->RaiseTPL(TPL_NOTIFY); switch (BltOperation) { diff -c2 --recursive a/stand/efi/loader/framebuffer.c b/stand/efi/loader/framebuffer.c *** a/stand/efi/loader/framebuffer.c Wed Dec 31 06:36:43 2025 --- b/stand/efi/loader/framebuffer.c Wed Dec 31 06:36:55 2025 *************** *** 586,636 **** free(hlist); } - if (EFI_ERROR(status)) - return (efi_status_to_errno(status)); ! nhandles = hsize / sizeof(*hlist); ! /* ! * Search for ConOut protocol, if not found, use first handle. ! */ ! gop_handle = NULL; ! for (i = 0; i < nhandles; i++) { ! EFI_GRAPHICS_OUTPUT *tgop; ! void *dummy; ! status = OpenProtocolByHandle(hlist[i], &gop_guid, (void **)&tgop); ! if (status != EFI_SUCCESS) ! continue; ! if (tgop->Mode->Info->PixelFormat == PixelBltOnly || ! tgop->Mode->Info->PixelFormat >= PixelFormatMax) ! continue; ! status = OpenProtocolByHandle(hlist[i], &conout_guid, &dummy); ! if (status == EFI_SUCCESS) { ! gop_handle = hlist[i]; ! gop = tgop; ! break; ! } else if (gop_handle == NULL) { ! gop_handle = hlist[i]; ! gop = tgop; } - } ! free(hlist); - if (gop_handle != NULL) { gfx_state->tg_fb_type = FB_GOP; gfx_state->tg_private = gop; if (edid_info == NULL) edid_info = efifb_gop_get_edid(gop_handle); - } else { - status = BS->LocateProtocol(&uga_guid, NULL, (VOID **)&uga); - if (status == EFI_SUCCESS) { - gfx_state->tg_fb_type = FB_UGA; - gfx_state->tg_private = uga; - } else { - return (1); - } } --- 586,638 ---- free(hlist); } ! if (EFI_ERROR(status)) { ! status = BS->LocateProtocol(&uga_guid, NULL, (VOID **)&uga); ! if (status == EFI_SUCCESS) { ! gfx_state->tg_fb_type = FB_UGA; ! gfx_state->tg_private = uga; ! } else { ! return (efi_status_to_errno(status)); ! } ! } else { ! nhandles = hsize / sizeof(*hlist); ! /* ! * Search for ConOut protocol, if not found, use first handle. ! */ ! gop_handle = NULL; ! for (i = 0; i < nhandles; i++) { ! EFI_GRAPHICS_OUTPUT *tgop; ! void *dummy; ! status = OpenProtocolByHandle(hlist[i], &gop_guid, ! (void **)&tgop); ! if (status != EFI_SUCCESS) ! continue; ! if (tgop->Mode->Info->PixelFormat == PixelBltOnly || ! tgop->Mode->Info->PixelFormat >= PixelFormatMax) ! continue; ! status = OpenProtocolByHandle(hlist[i], &conout_guid, &dummy); ! if (status == EFI_SUCCESS) { ! gop_handle = hlist[i]; ! gop = tgop; ! break; ! } else if (gop_handle == NULL) { ! gop_handle = hlist[i]; ! gop = tgop; ! } } ! free(hlist); ! ! if (gop_handle == NULL) ! return (ENXIO); gfx_state->tg_fb_type = FB_GOP; gfx_state->tg_private = gop; if (edid_info == NULL) edid_info = efifb_gop_get_edid(gop_handle); }