L A Walsh composed on 2016-11-22 13:45 (UTC-0800):
I found that it's the boot loader that sets the initial screen mode before the kernel is loaded.
It is often set again during boot by programs that set the console keyboard and font -- and seems to be separate from the mode one is in during a graphical boot.
I'm trying to figure out how to set that VGA mode from "userland" (running as root) just before jumping to a new kernel with kexec.
If I don't, kexec starts the new kernel in a non-deterministic mode that displays mostly garbage on the screen up until the screen's mode is reset by console kbd+font progs. Alternatively -- I've also seen the screen go blank for the entire boot process until the system displays the login prompt.
Does anyone know how to do set the VGA mode from userland so kexec will start in a known state?
I don't think the method used in boot loaders would work, as I think they are making BIOS calls to detect and set modes... :-(
So you want to be able to do this on any normal boot? Why not do as I do as a matter of course, disable graphical boot? I don't know how Grub2 works WRT initializing video mode because I don't use it. Same for Lilo. But with Grub, I notice only one mode switch during boot, and that resultant mode remains on the vttys as long as the boot lasts. The change I notice is either from whatever it is that the kernel or Grub come up with on its/their own as a consequence of vga= or no vga= being present on cmdline, to whatever KMS produces as a result of the video= I put on the cmdline. That switch's timing apparently varies with kernel version, but occurs roughly halfway through the init process. In Fedora that switch is particularly noticable because post-switch the foreground color is initially yellow but quickly changes to normal gray/white. -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org