Bug #13075


No console messages after early boot on non-VGA graphics

Added by Paul Winder almost 3 years ago. Updated over 2 years ago.

Start date:
Due date:
% Done:


Estimated time:
Gerrit CR:
External Bug:


If the console is attached to a graphics card/chipset which does not advertise it is VGA, on boot the console output stops after the initial "illumos Version ...." (and possibly copyright notice) messages.
The hostname and login prompt are not displayed and the console appears to be dead. If a dtrace probe is setup in the generic driver, key presses do generate activity but no output.
The messages stop after the console frame buffer is switched from boot code to the generic driver.
This is a dump of the core graphic structure on a non-functional console:

> 0xffffd0631000e000::print -ta struct gfxp_fb_softc
ffffd0631000e000 struct gfxp_fb_softc {
    ffffd0631000e000 dev_info_t *devi = 0xffffd062c7555000
    ffffd0631000e008 int mode = 0xffffffff
    ffffd0631000e00c enum gfxp_type fb_type = 0 (0)
    ffffd0631000e010 unsigned int flags = 0
    ffffd0631000e018 kmutex_t lock = {
        ffffd0631000e018 void *[1] _opaque = [ 0 ]
    ffffd0631000e020 char silent = '\0'
    ffffd0631000e021 char happyface_boot = '\0'
    ffffd0631000e028 struct vis_polledio polledio = {
        ffffd0631000e028 struct vis_polledio_arg *arg = 0xffffd0631000e000
        ffffd0631000e030 void (*)() display = bitmap_polled_display
        ffffd0631000e038 void (*)() copy = bitmap_polled_copy
        ffffd0631000e040 void (*)() cursor = bitmap_polled_cursor
    ffffd0631000e048 struct gfxp_ops *gfxp_ops = gfxp_bitmap_ops
    ffffd0631000e050 struct gfxp_blt_ops blt_ops = {
        ffffd0631000e050 int (*)() blt = 0
        ffffd0631000e058 int (*)() copy = 0
        ffffd0631000e060 int (*)() clear = 0
        ffffd0631000e068 int (*)() setmode = 0
    ffffd0631000e070 struct fbgattr *fbgattr = bitmap_attr
    ffffd0631000e078 union gfx_console *console = fb_info

The key field is mode == 0xffffffff which is "un-initialised". If the mode is not a valid setting it will not write to the console frame buffer. Further the mode get set by tem driver issuing a KDSETMODE ioctl, but this was not being actioned because the terminal is not recognised as a console.
The determination as to whether the device is to be considered a console happens in gfxp_check_for_console(). It looks for two things, the device itself has PCI IO access enabled and the parent bridge has VGA enabled. On the specific platform I was testing, when the system was booted in "legacy" mode then the graphics adapter (and ASPEED IIRC) did have VGA enabled and the console worked. When booted in UEFI mode VGA was not enabled and the console stopped working.

Actions #1

Updated by Paul Winder almost 3 years ago

When bootloader is involved, then gfx_private driver inherits frame buffer info from the bootloader, part of that is the address of the framebuffer. In other OS' (Eg FreeBSD) the presence of this address is enough. We can make the same assumption. When it is not there we can fall back to checking for VGA.

I have been testing with this assumption (the framebuffer address is enough):
  1. Tested on the original system in legacy and BIOS mode.
  2. Tested on a mixture of platforms with bootloader.
  3. Tested on a mixture of platforms with grub. I was able to confirm they did not have a framebuffer address and used the VGA method,
Actions #2

Updated by Electric Monk almost 3 years ago

  • Gerrit CR set to 870
Actions #3

Updated by Paul Winder over 2 years ago

  • Assignee set to Paul Winder
Actions #4

Updated by Electric Monk over 2 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit 24571f7b017865fbad5f588fb0694b558c94e14d

commit  24571f7b017865fbad5f588fb0694b558c94e14d
Author: Paul Winder <>
Date:   2020-09-18T11:41:21.000Z

    13075 No console messages after early boot on non-VGA graphics
    Reviewed by: Toomas Soome <>
    Reviewed by: Garrett D'Amore <>
    Reviewed by: Randy Fishel <>
    Approved by: Robert Mustacchi <>


Also available in: Atom PDF