Skip to content

Development ​

The flake's dev shell (nix develop .#splash) provides Go, gopls, golangci-lint, delve, just, git, gh and the lys-ci tools, with CGO_ENABLED=0 and GOTOOLCHAIN=local.

Layout ​

Paths are under splash/ in the repository.

PathContents
cmd/lys-splashRole selection; starts the daemon or the client
internal/protocolplymouthd's socket protocol: request and response codec
internal/serverDaemon side of the socket: peer credentials, deferred answers
internal/clientThe plymouth command line
internal/daemonSplash lifecycle from boot to quit, modes, boot duration
internal/themetheme.yaml validation (defaults from desktop/tokens), frame rendering with damage, fades
internal/kmsOutputs on two dumb buffers per card: mode and scale, rotation, paced damage-limited flips, uevents
internal/consoleVirtual terminal, captured console output, text fallback
internal/keyTerminal bytes decoded into keys
internal/keymapConsole keymap from vconsole.conf or default/keyboard
internal/askPrompt queue, typed text, cached passwords, keystroke watches
internal/kmsgLog handler writing to /dev/kmsg for the detached daemon
internal/asynclogLog handler that never blocks the caller
units/systemd units with @placeholders@ filled in by the package
initramfs-tools/Hook and scripts for Ubuntu and Debian
nix/Package, NixOS module, dev shell, checks

Recipes ​

RecipeEffect
just checkAll gates in order: vet, lint, no-fused, test, build
just vetgo vet ./...
just lintgolangci-lint run with .golangci.yml
just no-fusedFails on float products fused into FMA, which round differently from amd64
just testgo test ./...
just buildCompile-checks every package
just fmtgofmt -w .
just plymouth-clientRuns the plymouth-client check
just initramfs-tools [image] [mirror]Builds an initramfs-tools image from the compat output in an Ubuntu container (default ubuntu:24.04, packages from the azure mirror) and checks it holds the binary, links and scripts in order; needs Docker. Each step prints a line as it starts and fails by name, the network steps naming the mirror, when it outlasts its bound (splash/scripts/initramfs-tools-image.sh). It does not boot the image
just initramfs-tools-stalled-mirror [image]Runs initramfs-tools against a mirror that accepts connections and never answers, and checks it fails within the apt-get update bound naming the step and the mirror; needs Docker

Nix ​

  • just packages lys-splash: the package (nix/package.nix), outputs out and compat.
  • nix fmt: alejandra.
  • just checks splash-<name> runs each of these, from the repository root. Repository-wide recipes, the Nix layout, CI and releases are in Developing lys.
CheckTests
packageBuilds the package and runs the unit tests
plymouth-clientnixpkgs' plymouth client against the server
unitsEvery unit conflicts with its Plymouth unit; units and initramfs-tools script agree on a table of kernel command lines
moduleEvaluates the NixOS module and finds the splash in the initrd
vms-greeterVMs on virtio-gpu, without a display and on vkms, booted at once, their scenarios in turn, each failure naming its scenario: boot, a boot through the module on virtio-gpu and with no display; greeter, hand-over to lys-login's greeter on lys-wm, checking every screen dump: the splash fades its group out, and the greeter's first frame holds the logo exactly where the splash left it while its screen fades in, then a login into a lys-wm session, checking every flip scanout-watch reads off the primary plane across both hand-overs: never dark, never black, never the kernel's console, and from the greeter's last frame to the desktop's a monotonic blend of the two with frames between; on one vkms VM with two outputs, one turned, kms, the kms package's real-card test as root, then greeter-outputs, hand-over to the greeter with both outputs lit by the splash and both taken by the greeter, then journal, reading the guest's whole journal through a slowly drained VM shell
vms-luksAn OVMF VM, e2e, the full path, each stage failing by name: OVMF and simpledrm, virtio-gpu, a LUKS root and a second LUKS disk unlocked by one passphrase at the splash, switch root, the plymouth client, hand-over to the greeter, the reboot splash
vms-luks-headlessA display-less OVMF VM, e2e-headless, typing its LUKS passphrase at the text fallback
vms-firmwareAn OVMF VM: kms-switch, the splash on simpledrm, then on the native driver as it takes over, then daemon, the daemon on virtio-gpu with the plymouth client and systemd's password agent, then detached as plymouthd logging to the journal

The grid, the lys logo, the BGRT logo's placement and the record of the last frame are desktop/splashframe, outside the splash, because lys-login's greeter computes its first frame from them too.

virtio-gpu and vkms have no Vulkan driver, so nix/greeter.nix sets LYS_WM_RENDERER=lavapipe in the session variables, which reach the greeter's lys-wm through PAM: it renders with Vulkan on lavapipe instead of stopping.

Expected frames live in internal/theme/testdata/golden; this manual's pictures of the splash are those files.

Released under the MIT License.