Skip to content

fix(splash): give the initramfs a framebuffer to animate on - #5305

Merged
Itxaka merged 1 commit into
kairos-io:masterfrom
ci-forks:bot/5272-splash-initramfs-kms
Oct 22, 2026
Merged

Itxaka merged 1 commit into
kairos-io:masterfrom
ci-forks:bot/5272-splash-initramfs-kms

Conversation

@ci-robbot

Copy link
Copy Markdown
Collaborator

Part of #5272

Summary

SplashDracutConfig omits plymouth, and plymouth's depends() is the only
thing that pulls dracut's drm or simpledrm module in: both of those have a
check() that returns 255, so neither is ever included on its own. The splash
initramfs 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-splash dracut module now has an installkernel() that names the
drivers 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-drm
    is 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 drm module instead is not an option here. Kairos
sets hostonly="no" image-wide, and with no host to narrow it down 45drm
installs every KMS driver under drivers/gpu/drm, which is tens of megabytes
of initramfs for a logo. instmods is 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 the
image is built on, the same way dracut's own simpledrm module does it.

This grows the initramfs by drm, drm_kms_helper and 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 through
the harness already in splash_test.go that sources the module with the dracut
helpers stubbed out. Four specs added, with an instmods stub that records the
arguments and the hostonly the call was made with. Each was run against a
deliberately broken module and fails with a message naming the defect:

break specs that fail
installkernel() renamed away 3
hostonly='' prefix dropped 1
instmods -c instead of instmods 1
"=drivers/gpu/drm" instead of named drivers 2
virtio-gpu dropped from the list 1

CGO_ENABLED=0 go test ./kairos-init/... -count=1 green, run four times.
golangci-lint at the version in .golangci-version (v2.13.2) reports 0
issues. CGO_ENABLED=0 go build ./... green.

Not booted. This box has no KVM, qemu or /dev/kvm, so the dracut build and
the 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.sh depends() echoes drm or simpledrm,
modules.d/45drm and modules.d/45simpledrm both have check() { return 255 },
and instmods() in dracut-functions.sh passes -o unless its first argument
is -c.

AI was used to write this change. No human has read it before it was opened.

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>
@ci-robbot

Copy link
Copy Markdown
Collaborator Author

Sibling note: #5305 and this one are the last two items of #5272 and both
touch bundled.go and splash_test.go, in different constants and different
Describe blocks. Merged locally in either order the tree is clean and
CGO_ENABLED=0 go test ./kairos-init/... -count=1 is green, so there is no
ordering constraint between the two.

@itxaka-agent

Copy link
Copy Markdown
Collaborator

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.

Taking this one for review. I'll run the splash tests and read the change.

@itxaka-agent itxaka-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@itxaka-agent

Copy link
Copy Markdown
Collaborator

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.

QA in progress: I'm testing this now. Results and proof will follow here.

@itxaka-agent

Copy link
Copy Markdown
Collaborator

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.

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, -vga std).

  • Before: the initramfs has no KMS driver. bochs-drm only loads at 7.28s, after switch-root, so the logo is drawn on the 80x25 console (about 71% of the width) and then shrinks to about 36% on the 160x50 framebuffer.
  • After: the initramfs contains bochs and virtio-gpu. bochs-drm loads at 2.67s inside the initramfs, the console is 160x50 from then on, and the logo stays about 35% wide.

Before:
before

After:
after

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 (vga=795 nomodeset) hides the difference, so the check used the installed system.

@Itxaka
Itxaka merged commit e5c61b1 into kairos-io:master Oct 22, 2026
46 checks passed
@github-project-automation github-project-automation Bot moved this from QA OK to Done âś… in đź§™Issue tracking board Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants