Fixing the Graphical Black Screen When Booting Legacy Desktop Systems in Pure UEFI
This article explains why older desktop operating systems get stuck on a black screen during boot on modern pure-UEFI machines, and how to address it. It walks through the shift from the legacy BIOS model, which exposed video services through the real-mode `INT 10h` interrupt, to UEFI's protocol-based model, where graphics output is handled by the Graphics Output Protocol (GOP). It explains how the Compatibility Support Module (CSM) previously bridged this gap, and what happens when vendors remove it in Class 3 (pure UEFI) systems. The core solution described is installing an `INT 10h` compatibility shim before the OS kernel takes over the display, translating a minimal set of critical function calls (AH=0x00, 0x0E, 0x13) onto GOP modes and framebuffer writes. The article closes with key engineering considerations: hook timing, real-mode/long-mode transitions, pixel format and font glyph handling, graceful handoff to the OS driver, and preferring CSM when still available.
1. Where the Problem Comes From: The Gap Between Legacy BIOS and Pure UEFI
To understand the “black screen stuck at boot” behavior, you first need to clarify the fundamental difference in responsibility between the two firmware generations.
In the traditional BIOS era, firmware did more than initialize hardware. It also exposed a full set of “runtime services” through software interrupts. The most critical graphics capability was provided via the Video Services, exposed through the INT 10h interrupt vector in x86 real mode. Early desktop operating systems were designed on the assumption that, even before their own graphics drivers loaded, they could still rely on these firmware services for basic tasks such as text output, mode switching, and printing boot logs.
The arrival of UEFI rewrote this convention entirely. UEFI no longer provides services through real-mode software interrupts. Instead, it uses a programming model based on “protocols,” running in protected mode or long mode. Graphics output is now handled by the Graphics Output Protocol (GOP), which draws the screen by directly manipulating the framebuffer, with no real-mode entry point like INT 10h.
This is the root of the gap: legacy systems expect firmware to provide INT 10h, but a pure-UEFI environment simply does not offer it.
2. Once CSM Is Removed, Who Provides the Backstop?
During the transition period when UEFI was becoming widespread, firmware vendors introduced a component called the Compatibility Support Module (CSM). It essentially layers a simulation of the traditional BIOS on top of a pure-UEFI environment, restoring classic services such as INT 10h so that legacy systems can continue to boot in Legacy mode.
Many documents conclude that “legacy systems can boot under UEFI,” and that conclusion is built on the premise that CSM exists. Installation media often includes both Legacy and UEFI boot paths. This “dual boot media” masks the real technical barrier.
The problem is that a new generation of motherboards and servers is systematically removing CSM. When a machine enters so-called “pure UEFI” (Class 3) mode, the Compatibility Support Module no longer exists, and INT 10h disappears along with it. At this point, when a legacy system boots to the stage that needs to initialize the display, it cannot find any video services to call, and it stalls on a black screen. The boot logic itself reports no error; it simply “cannot draw the next frame.”
The conclusion is clear: legacy systems can boot via UEFI themselves. What they truly cannot get past is that, once CSM is removed, nothing restores the underlying video services for them.
3. The Approach: Restore INT 10h Before the OS Takes Over
Since the crux of the problem is that “legacy systems lack INT 10h during early boot,” the direction of the solution follows naturally. Before the OS kernel truly takes over the display, use an intermediate layer to restore these services.
The core responsibility of this intermediate layer is not to rewrite the entire BIOS, but to precisely “translate” the few function numbers the legacy system relies on most. During early boot, a legacy system mainly uses the following types of calls:
AH=0x00: Set the video mode;AH=0x0E: Single-character teletype output (including carriage return, line feed, and backspace handling);AH=0x13: String write with cursor positioning.
For these calls, the intermediate layer needs to map them onto capabilities available at the lower level: mode setting should match an equivalent GOP display mode, character output should be converted into direct writes to the framebuffer, and the layer must implement its own cursor advance and screen scrolling logic.
The following is illustrative code that only demonstrates the call relationships. It shows the structure of this “shim” logic and is not a complete, directly runnable implementation:
// Illustration: install an INT 10h compatibility handler stub before the OS kernel loads// The goal is to let legacy systems that depend on classic video services display output normallyVOID InstallVideoShim(EFI_SYSTEM_TABLE *SystemTable){EFI_GRAPHICS_OUTPUT_PROTOCOL *Gop;// 1. Locate the Graphics Output Protocol to obtain the framebuffer's// physical address, resolution, and pixel formatSystemTable->BootServices->LocateProtocol(&gGraphicsOutputProtocolGuid, NULL, (VOID **)&Gop);// 2. Register a takeover entry point for interrupt 0x10 (in a compatible boot context)// 3. Dispatch based on the AH function number passed in:switch (Ah) {case 0x00: // Set mode: pick the GOP mode closest to the requestSetCompatibleMode(Gop);break;case 0x0E: // Single-character output: write to the framebuffer and handle// newline, backspace, and cursor advanceTeletypePutChar(Gop, Al);break;case 0x13: // String write: reuse the 0x0E drawing logic character by characterTeletypePutString(Gop, Buffer, Count);break;default:// Provide conservative fallback behavior for unimplemented function numbersbreak;}}
The essence of this logic lies in “minimal completeness”: rather than emulating a full legacy BIOS, it covers only the few function numbers the legacy system actually calls on the critical boot path, and keeps everything else as simple as possible.
4. Key Engineering Considerations in Practice
Once the theory is clear, the real test lies in the details of the implementation. The following points deserve particular attention:
Choosing the timing of the takeover. This shim must register itself before the OS kernel loads and initializes its own display driver. Register too late, and the legacy system will already be stuck because it cannot obtain the services; register too early, and it may interfere with the firmware’s own initialization flow. The usual approach is to hook it at the bootloader stage, between the firmware and the kernel.
Mode switching in the execution environment.
INT 10his a real-mode concept, while UEFI services run in long mode. The shim must handle the switch between execution environments and the registration of interrupt vectors. This part involves low-level assembly and the boot context, and is the most error-prone step, requiring thorough testing and validation.Pixel format and character raster. The framebuffer on different graphics cards may be RGB, BGR, or formats with different bit depths. Before writing characters directly, you must correctly parse the pixel layout and include a built-in character bitmap (font glyph); otherwise you will get garbled colors or text.
Graceful exit rather than long-term residency. This shim is positioned as a “transitional bridge during boot.” Once the legacy system’s own display driver finishes initializing, control of the screen should be handed back smoothly to the operating system, avoiding a situation where the intermediate layer and the OS driver fight over the framebuffer and cause screen artifacts or a freeze.
Prioritize the fallback strategy. If the target machine’s firmware still retains the CSM option, simply enabling the Compatibility Support Module is the easiest solution. Only when CSM is genuinely unavailable should you resort to the shim approach described above.
5. Summary
“A legacy system showing a black screen under pure UEFI” may look tricky, but it is essentially a technical problem with clear boundaries: it is not that the system cannot boot, but that the underlying video services it depends on are absent in the new firmware. Grasping the main thread of “restoring INT 10h before the OS takes over,” building a minimal-complete mapping centered on mode setting and character output, and then supplementing it with careful handling of timing, mode switching, pixel format, and graceful exit is enough to bring the screen up reliably.
For developers and operations engineers, the broader lesson of this case is this: when facing compatibility issues during the handoff between old and new technology stacks, rather than getting stuck in debates about whether something is “possible,” it is often more productive to break the problem down to the level of interrupt vectors and protocol calls, where you can usually find an engineering path that is reproducible and maintainable.
