Repository navigation
fix(splash): give the initramfs a framebuffer to animate on - #5305
Conversation
Omitting plymouth from the splash initramfs also removes dracut's drm and simpledrm modules, because plymouth's depends() is the only thing that pulls them in and both have a check() that returns 255. The initramfs therefore has no KMS driver and draws on the firmware text console, 80x25 on a BIOS VGA machine, while the booted system binds a real driver and fbcon switches to the panel resolution. The same artwork lands in cells less than half the size, so the logo visibly shrinks halfway through the boot. The kairos-splash dracut module now has an installkernel() that names the few drivers an initramfs can use: simpledrm for the framebuffer EFI hands over, bochs for QEMU -vga std, and virtio-gpu. Depending on dracut's drm module instead is not an option, because Kairos builds with hostonly="no" and that module then installs every driver under drivers/gpu/drm. instmods is optional unless called with -c, so a kernel built without one of these skips it rather than failing the image build. Signed-off-by: Ettore Di Giacinto <mudler@kairos.io> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Sibling note: #5305 and this one are the last two items of #5272 and both |
Taking this one for review. I'll run the splash tests and read the change. |
itxaka-agent
left a comment
There was a problem hiding this comment.
Automated triage agent (
kairos-triage-agent) running as@itxaka-agent.
This comment was generated by software. A human maintainer can override
any action taken here.
Approving. The splash package tests pass (123/123) with this branch merged onto current master. I also ran dracut 106 as a normal user: hostonly='' instmods without -c exits 0 when a driver is missing and installs the ones that exist, so the build can't fail on a kernel without one of them.
I did not boot it, so the logo staying the same size at switch-root still needs a QA boot.
QA in progress: I'm testing this now. Results and proof will follow here. |
QA verification: QA: pass at 57487ab (before: 1f8aae5 on master). I built real ISOs of both refs, installed each to disk and booted them under QEMU (BIOS,
Limits: simpledrm is built into this kernel, so only bochs and virtio-gpu showed up in the initramfs. I did not boot virtio-gpu. The live ISO cmdline ( |


Part of #5272
Summary
SplashDracutConfigomits plymouth, and plymouth'sdepends()is the onlything that pulls dracut's
drmorsimpledrmmodule in: both of those have acheck()that returns 255, so neither is ever included on its own. The splashinitramfs therefore has no KMS driver at all and draws on the firmware text
console, 80x25 on the BIOS VGA machine in the report. The booted system binds a
real driver and fbcon switches to the panel resolution, 160x50 on the same
screen, so the second half of the animation is drawn into cells less than half
the size. That is root cause 3 of #5272: the logo visibly shrinks at
switch-root.
The
kairos-splashdracut module now has aninstallkernel()that names thedrivers an initramfs can actually use:
simpledrm, for the framebuffer EFI hands over.bochs, for QEMU-vga std, which is what the report booted on.bochs-drmis the same driver's name before Linux 6.4 and is listed as well, because
kairos-init builds on base images whose kernels straddle the rename.
virtio-gpu, for QEMU and the hypervisors that use virtio.Depending on dracut's own
drmmodule instead is not an option here. Kairossets
hostonly="no"image-wide, and with no host to narrow it down 45drminstalls every KMS driver under
drivers/gpu/drm, which is tens of megabytesof initramfs for a logo.
instmodsis optional unless it is called with-c,so a kernel built without one of these skips it rather than failing the image
build, and
hostonly=''keeps the decision independent of the machine theimage is built on, the same way dracut's own simpledrm module does it.
This grows the initramfs by
drm,drm_kms_helperand the three small drivers.Note for review order: the console now changes size while the initramfs half is
animating, because the driver binds around the time the splash unit starts.
#5303 is what makes the animation follow that, so this is best read after it.
How it was tested
installkernel()runs only inside a dracut build, so it is exercised throughthe harness already in
splash_test.gothat sources the module with the dracuthelpers stubbed out. Four specs added, with an
instmodsstub that records thearguments and the
hostonlythe call was made with. Each was run against adeliberately broken module and fails with a message naming the defect:
installkernel()renamed awayhostonly=''prefix droppedinstmods -cinstead ofinstmods"=drivers/gpu/drm"instead of named driversvirtio-gpudropped from the listCGO_ENABLED=0 go test ./kairos-init/... -count=1green, run four times.golangci-lintat the version in.golangci-version(v2.13.2) reports 0issues.
CGO_ENABLED=0 go build ./...green.Not booted. This box has no KVM, qemu or
/dev/kvm, so the dracut build andthe resulting console geometry were not observed on a real boot. The dracut
behaviour the change relies on was read from dracut-ng rather than assumed:
modules.d/45plymouth/module-setup.shdepends()echoesdrmorsimpledrm,modules.d/45drmandmodules.d/45simpledrmboth havecheck() { return 255 },and
instmods()indracut-functions.shpasses-ounless its first argumentis
-c.AI was used to write this change. No human has read it before it was opened.