Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

Grub + framebuffer switching

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
22 posts • Page 1 of 1
Author
Message
ALF__
Apprentice
Apprentice
Posts: 252
Joined: Sun Nov 30, 2003 12:48 am

Grub + framebuffer switching

  • Quote

Post by ALF__ » Sun Mar 06, 2022 2:23 am

Hey!

I'm trying to see if there is any way to optimize the boot process on one of my computers.

I have frame buffer for the grub menu, but after its booting, it gets switched temporarily to no FB(?) and then back to FB again.
I feel like maybe this switch delays the boot by the amount of time it takes for it to switch back and forth.

Using Intel onboard graphics (i915)

Its easier to explain on a video clip so please see this link: https://youtu.be/viWYMPjmB5M

Maybe it cannot be avoided, and i guess that's fine, its no big issue :D

Any ideas on where to start is appreciated!

Br,
Top
CaptainBlood
Advocate
Advocate
User avatar
Posts: 4237
Joined: Sun Jan 24, 2010 9:38 am

  • Quote

Post by CaptainBlood » Sun Mar 06, 2022 3:13 am

Do you have some modules within kernel graphic stack?
Plz check with

Code: Select all

lsmod
Thks 4 ur attention, interest & support.
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Top
ALF__
Apprentice
Apprentice
Posts: 252
Joined: Sun Nov 30, 2003 12:48 am

  • Quote

Post by ALF__ » Sun Mar 06, 2022 9:57 pm

CaptainBlood wrote:Do you have some modules within kernel graphic stack?
Plz check with

Code: Select all

lsmod
Thks 4 ur attention, interest & support.
Hello, thank you for your assistance!

Output of lsmod:
Module Size Used by
x86_pkg_temp_thermal 16384 0
Does not sound like anything graphical? :o
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56078
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun Mar 06, 2022 10:07 pm

ALF__,

Your video clip shows the kernel switching console drivers.
As you don't have the Tux logo at the top of the console to start with, that may not be a framebuffer console driver.

We need to see your kernel .config file. Put that onto a pastebin please.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
ALF__
Apprentice
Apprentice
Posts: 252
Joined: Sun Nov 30, 2003 12:48 am

  • Quote

Post by ALF__ » Sun Mar 06, 2022 10:17 pm

Hey!

Yes, exactly, it seems like FB is present in grub, but when boot it switch to non fb, and then back to FB and display the logo as normal.

Here is the pastebin: https://pastebin.com/bhyxvPkP

Kernel version is 5.15.23-gentoo

Thank you very much!
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56078
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun Mar 06, 2022 10:34 pm

ALF__,

Grub does its own thing to display its menu. It can pass its framebuffer onto the kernel.
That requires Simple Framebuffer in the kernel and its not set.

Code: Select all

# CONFIG_FB_SIMPLE is not set
However, you have

Code: Select all

CONFIG_VGA_CONSOLE=y
that the old 24x40 text console.
As an implementation detail, its another framebuffer but there is no graphics support there, its text only.

Your framebuffer (with the logos) is provided by

Code: Select all

CONFIG_DRM_I915=y
Here's what happens. Your video shows grub, then some early messages using the VGA text console.
It then switches to the inteldrmfb.
You should be able to see that in dmesg.

If you turn off the VGA console, the early messages will not be shown and the console display will start when inteldrmfb is ready.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
ALF__
Apprentice
Apprentice
Posts: 252
Joined: Sun Nov 30, 2003 12:48 am

  • Quote

Post by ALF__ » Sun Mar 06, 2022 10:41 pm

Aha I see!

So, would it be possible to enable CONFIG_FB_SIMPLE to keep the early messages but without flickering? Or is the best alternative to just turn off CONFIG_VGA_CONSOLE?
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56078
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun Mar 06, 2022 10:44 pm

ALF__,

The flickering is the handover. That handover will happen sometime.

All I can say it to try it and see.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
ALF__
Apprentice
Apprentice
Posts: 252
Joined: Sun Nov 30, 2003 12:48 am

  • Quote

Post by ALF__ » Sun Mar 06, 2022 11:01 pm

Alright lets test it,

Strange thing

In menuconfig i do have "Support for frame buffer devices" active. Did not have any drivers here choosed here, so i just selected VESA VGA graphics, but that does still not change "CONFIG_FB_SIMPLE" to get activated..
and the I915 is not present there..

Edit, and VGA_CONSOLE is no where to be found to be deactivated..
It should be :

Code: Select all

cation:                                                                                                                                                               x  
  x     -> Device Drivers                                                                                                                                                     x  
  x       -> Graphics support                                                                                                                                                 x  
  x (1)     -> Console display driver support 

Not really sure the correct selection here..

I'll edit it manually and see what happens
Top
pietinger
Moderator
Moderator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Sun Mar 06, 2022 11:33 pm

ALF__ wrote:I'll edit it manually and see what happens
Dont do this ever !

Work only in "Make menuconfig". Reason: Many modules DEPENDS and/or SELECTS others. Example:

If you have SIMPLEDRM enabled you dont see "simple Frambuffer" in this section.

Take a look into Device Drivers -> Firmware and try:

Code: Select all

[*] Mark VGA/VBE/EFI FB as generic system framebuffer
This is the SYSFB_SIMPLEFB. More modern as the old one (Neddy doesnt recommend because sometimes makes troubles); but you can try - OR -

Disable SIMPLEDRM to get Simple_FB
Top
ALF__
Apprentice
Apprentice
Posts: 252
Joined: Sun Nov 30, 2003 12:48 am

  • Quote

Post by ALF__ » Sun Mar 06, 2022 11:48 pm

No worries, have several backup kernels.
Thanks for the tips though.

So, i do not have simpleDRM enabled. and Mark VGA/VBE/EFI is already enabled.
But no simple_fb with or without mark vga/vbe/efi
Top
pietinger
Moderator
Moderator
Posts: 6620
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Mon Mar 07, 2022 12:58 am

This is strange. I give you my page (not complete); watch the last line I have enabled:

Code: Select all

[*] /dev/agpgart (AGP Support)  --->    
[*] VGA Arbitration            
(16)  Maximum number of GPUs                
[ ] Laptop Hybrid Graphics - GPU switching support             
[*] Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)  --->      
    ARM devices  ----
[ ] ATI Radeon         
[ ] AMD GPU                   
[ ] Nouveau (NVIDIA) cards                     
[*] Intel 8xx/9xx/G3x/G4x/HD Graphics       
(*)   Force probe driver for selected new Intel hardware    
[*]   Enable capturing GPU state following a hang      
[*]     Compress GPU error state                  
[*]   Always enable userptr support                          
[ ]   Enable Intel GVT-g graphics virtualization host support   
      drm/i915 Debugging  --->                                 
      drm/i915 Profile Guided Optimisation  --->               
[ ] Virtual GEM provider                                           
[ ] Virtual KMS (EXPERIMENTAL)                  
[ ] DRM driver for VMware Virtual GPU              
[ ] Intel GMA500/600/3600/3650 KMS Framebuffer           
[ ] DisplayLink                                    
[ ] AST server chips                             
[ ] Matrox G200          
[ ] QXL virtual GPU      
    Display Panels  --->  
    Display Interface Bridges  --->  
[ ] ETNAVIV (DRM support for Vivante GPU IP cores)     
[ ] DRM Support for bochs dispi vga interface (qemu stdvga)
[ ] Cirrus driver for QEMU emulated device     
[ ] GM12U320 driver for USB projectors 
[*] Simple framebuffer driver
This is DRM_SIMPLEDRM
With this enabled you will see no SIMPLE_FB. When I disable it I see it in (at the end of the page):

Code: Select all

Device drivers ---> Graphics support  ---> Frame buffer Devices  ---> [*] Support for frame buffer devices  --->
    [ ]   Simple framebuffer support (NEW)
(Dont get confused about the text "Simple framebuffer driver" ... it is DRM_SIMPLEDRM)

(I have also enabled the new SYSFB_SIMPLEFB because I have DRM_SIMPLEDRM enabled and FB_SIMPLE disabled; I am using EFI because no grub ).
Top
ALF__
Apprentice
Apprentice
Posts: 252
Joined: Sun Nov 30, 2003 12:48 am

  • Quote

Post by ALF__ » Mon Mar 07, 2022 2:09 am

Yes!

Found em!

However, it did not do any difference at all. Everything works as before.

Guessing this might be a loosing battle? :D
Top
Logicien
Veteran
Veteran
User avatar
Posts: 1555
Joined: Fri Sep 16, 2005 8:04 am
Location: Montréal

  • Quote

Post by Logicien » Mon Mar 07, 2022 4:03 am

Thereis an option in /etc/default/grub who allow Grub to pass it's video configuration and resolution to the Linux kernel when you start Linux from the Grub menu. I think that it is GRUB_GFXMODE=keep or auto. Try to comment this option amd remake your Grub menu with grub-mkconfig.
Paul
Top
CaptainBlood
Advocate
Advocate
User avatar
Posts: 4237
Joined: Sun Jan 24, 2010 9:38 am

  • Quote

Post by CaptainBlood » Mon Mar 07, 2022 8:04 am

Snippet

Code: Select all

# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
#
# To populate all changes in this file you need to regenerate your
# grub configuration file afterwards:
#     'grub2-mkconfig -o /boot/grub/grub.cfg'
#
# See the grub info page for documentation on possible variables and
# their associated values.

GRUB_GFXMODE=1366x768
#GRUB_GFXMODE=1920x1080

GRUB_GFXPAYLOAD_LINUX=keep

GRUB_BACKGROUND="/boot/grub/splash/livecd-2007.0/background-1366x768-4-grub.png"
GRUB_INIT_TUNE="480 440 1"
likely working here...

Thks 4 ur attention, interest & support.
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Top
CaptainBlood
Advocate
Advocate
User avatar
Posts: 4237
Joined: Sun Jan 24, 2010 9:38 am

  • Quote

Post by CaptainBlood » Mon Mar 07, 2022 8:10 am

Additionaly,here's

Code: Select all

CONFIG_SYSFB=y
CONFIG_DRM_FBDEV_EMULATION=y
CONFIG_DRM_FBDEV_OVERALLOC=100
CONFIG_FB_CMDLINE=y
CONFIG_FB_NOTIFY=y
CONFIG_FB=y
CONFIG_FB_CFB_FILLRECT=y
CONFIG_FB_CFB_COPYAREA=y
CONFIG_FB_CFB_IMAGEBLIT=y
CONFIG_FB_SYS_FILLRECT=y
CONFIG_FB_SYS_COPYAREA=y
CONFIG_FB_SYS_IMAGEBLIT=y
CONFIG_FB_SYS_FOPS=y
CONFIG_FB_DEFERRED_IO=y
Possibly not optimal.

Thks 4 ur attention, interest & support.
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56078
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Mon Mar 07, 2022 8:22 am

ALF__,

When something you are looking for in menuconfig cannot be found it's usually hidden by its Depends on: not being satisfied.
The search won't find it either. That's a feature.

Another feature is the 'z' key toggle to display hidden symbols.
Once hidden symbols are displayed, you can read the help on the symbol you want and fix the Depends On:
You may need to do that recursively too.

All of the DRM drivers include *drmfb console support. There is nothing else to select.

If nothing changed, does

Code: Select all

uname -a 
show the build date/time you expected?
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
ALF__
Apprentice
Apprentice
Posts: 252
Joined: Sun Nov 30, 2003 12:48 am

  • Quote

Post by ALF__ » Mon Mar 07, 2022 6:51 pm

Logicien wrote:Thereis an option in /etc/default/grub who allow Grub to pass it's video configuration and resolution to the Linux kernel when you start Linux from the Grub menu. I think that it is GRUB_GFXMODE=keep or auto. Try to comment this option amd remake your Grub menu with grub-mkconfig.

YES everyone! That was the final thing needed! No more adjusting resolutions during boot!
Feels a lot more streamlined now. I know this is a luxury issue, but apparently one thing i never got right during all years, and it have always annoyed me :lol:

However, there is one "flicker" that happens between "Loading linuxblahblah" and until openRC loads. Screens go blank and then come back.
Likely this is nothing to do about? I'm guessing that one is mandatory?
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56078
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Mon Mar 07, 2022 6:54 pm

ALF__,

You no longer have an early console driver.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
ALF__
Apprentice
Apprentice
Posts: 252
Joined: Sun Nov 30, 2003 12:48 am

  • Quote

Post by ALF__ » Mon Mar 07, 2022 6:57 pm

NeddySeagoon wrote:ALF__,

You no longer have an early console driver.
So.. is there a way to even skip this handover?
Is the i915 loadable grub (Probably not?) or is there a driver that is compatible from grub all the way to login?
However, I of course want the i915 for x-session..

Again, thanks everyone for your assistance in this "issue"
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56078
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Mon Mar 07, 2022 7:24 pm

ALF__,

The best you can do is to use VESA Framebuffer for the early console but you have ho switch to the inteldrmfb later.

As the VESA Framebuffer can use different resolutions and colour depths, which you choose with kernel command line parameters, you can avoid the resolution jump.
You will still get the 'flicker' due to the switch though as the kernel will not wait for the new framebuffer to have an image to display before it does the switch.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
ALF__
Apprentice
Apprentice
Posts: 252
Joined: Sun Nov 30, 2003 12:48 am

  • Quote

Post by ALF__ » Mon Mar 07, 2022 8:15 pm

NeddySeagoon wrote:ALF__,

The best you can do is to use VESA Framebuffer for the early console but you have ho switch to the inteldrmfb later.

As the VESA Framebuffer can use different resolutions and colour depths, which you choose with kernel command line parameters, you can avoid the resolution jump.
You will still get the 'flicker' due to the switch though as the kernel will not wait for the new framebuffer to have an image to display before it does the switch.
Thanks again!
Then it confirms it. Because now everything works as i want it. the resolution is correct between grub and console. Just blanking happening between "loading linux blah blah.." until openRc


Thank you everyone for participating!
Top
Post Reply

22 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic