Menu

Passing efi resolution to kernel

Cory Bolar
2017-03-15
2017-04-30
  • Cory Bolar

    Cory Bolar - 2017-03-15

    Hi,

    I've been having trouble passing the resolution set in rEFInd, 1920x1080, on to the booted kernel. The resolution appears to be set correctly in the boot manager but after selecting what kernel to boot, falls back to what I believe is the default resolution of 800x600. The resolution has already fallen back when rEFInd prints the kernel command line being used.

    The interesting thing about this is if I chain load refind again from itself and then boot whichever kernel, the resolution from rEFInd is preserved and I end up with a high res console.

    Just to clarify, my observations are:

    1. rEFInd boots - 1920x1080
    2. kernel is selected and refind prints kernel command line - 800x600
    3. efifb appears - 800x600
    

    If I chainload:

    1. refind boots - 1920x1080
    2. choose to boot into refind again, gui is exited - 800x600
    3. refind boots a second time - 1920x1080
    4. kernel is selected and refind prints kernel command line - 1920x1080
    5. efifb appears - 1920x1080
    

    Any thoughts as to why this might be the case?

    Using v0.10.5

     
  • Roderick W. Smith

    One idea is to pass the nomodeset kernel option (in /boot/refind_linux.conf or your manual boot stanza, whichever you're using; or temporarily by hitting F2, Insert, or Tab twice, rather than Enter, to enable you to edit kernel options on a one-time basis when launching a kernel).

    Another option is to use the fbset tool, which can set the resolution of the framebuffer device, which is probably what's driving the video display. This tool works differently with different framebuffer devices, though, and there's no guarantee it will work for you. Also, it's not installed by default in some distributions, so you may need to install it. Here are a few references, tutorials, and forum threads about it:

    Googling may turn up more references; however, Google tends to turn up very old pre-EFI suggestions on setting the resolution by passing VGA options to the kernel, and this approach will not work on a modern system booted in EFI mode.

    In any event, if you can get fbset to work, you can include the relevant commands in a local startup script, such as /etc/rc.local. (The appropriate script varies from one distribution to another, though.)

     
  • Olivier Esser

    Olivier Esser - 2017-04-30

    To change the resolution of the efi fb, boot the kernel in graphic mode

    use_graphics_for + linux

    Normally refind put the console in text mode before booting linux. With this option refind will leave the console in graphic mode and the kernel will use it. Note that once the kernel is running it cannot change the resolution of the efi framebuffer anymore. This is a limitation of efi, the resolution can only be changed in the preboot environnement.

    But normally the efi fb is not really used. The kernel should load the driver of the graphic card and not relying on efi anymore for the graphic. It can then do what's the driver is capable (often changing the resolution). The efi fb is really usefull to see something before the driver is loaded (in case of problems with the driver or to be able to install the driver).

     

    Last edit: Olivier Esser 2017-04-30

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.