zbm-dev / zfsbootmenu

ZFS Bootloader for root-on-ZFS systems with support for snapshots and native full disk encryption
https://zfsbootmenu.org
MIT License
841 stars 65 forks source link

[Feature request] Seamless/flicker-free boot with `zbm.timeout=0` #263

Closed solbjorn closed 2 years ago

solbjorn commented 2 years ago

When both the BIOS and the kernel (which is shipped with the binary ZBM builds) support keeping the BIOS vendor splash screen during boot process, transition between BIOS and ZBM kernel initialization is seamless/flicker-free, up to the moment of tearing down the USB controllers. Then, the splash disappears as "Tearing down devX" is being displayed all the time. Then the host kernel brings BIOS splash back, and it finally transits to the display manager.

I was just curious if it's possible to print those teardown messages only when there's a debug level set in the ZBM command line and do not remove the splash otherwise, so it could stay all the time from the BIOS post and until the DM is launched. WDYT?

ahesford commented 2 years ago

I doubt this would work as you expect even if we suppressed the tear-down text. The ZBM kernel will still grab and initialize the console, so you'll instead see a blank screen with a cursor in the upper left.

solbjorn commented 2 years ago

Usually the kernel doesn't switch from the splash to the console until something is printed (not counting cursor character). I could test some binary build with no teardown messages to double-check (commit https://github.com/zbm-dev/zfsbootmenu/commit/5a5ab0b4d4bda2dd3d2691772d904f720047e94f may've broken it, but anyways).

zdykstra commented 2 years ago

Usually the kernel doesn't switch from the splash to the console until something is printed (not counting cursor character). I could test some binary build with no teardown messages to double-check (commit https://github.com/zbm-dev/zfsbootmenu/commit/5a5ab0b4d4bda2dd3d2691772d904f720047e94f may've broken it, but anyways).

You can always try setting console=ttyS0 (or some other device) to keep ZBM from trying to touch tty0. However, there's no promise that this behavior might not change in future releases.

Edit: This seems to work as expected on my local machine when booting the v1.12.0 release image. After exiting reFInd it shows the UEFI splash screen again until runit starts printing messages to the console in my boot environment. Obviously you'll lose the ability to interact with ZBM in any capacity, but that's not really a huge issue. Add another entry to refind_linux.conf that doesn't squash out the controlling terminal, or add another entry via efibootmgr that lets you have a normal boot. Then you can interrupt it as you see fit.

solbjorn commented 2 years ago

Wow, works like charm! Bootsplash was still here with no flickering from the BIOS right to the display manager. Since I already have timeout=0 by default, not an issue at all. When I have some problems, I usually edit bootmenu's KCL manually.

Thanks!