nyx icon indicating copy to clipboard operation
nyx copied to clipboard

[Bug] plymouth theme animation broken when using linuxPackages_cachyos* kernels

Open qweered opened this issue 11 months ago • 11 comments

What happens?

Animation is displayed only in last second on boot, it is static otherwise

What is expected to happen?

Animation displayed during all boot

If possible, please attach logs

N/A

More information

I am using this config for plymouth:

plymouth = {
      enable = true;
      theme = "nixos-bgrt";
      themePackages = [ pkgs.nixos-bgrt-plymouth ];
};

qweered avatar Jan 01 '25 20:01 qweered

Full config for boot:

{ pkgs, ... }:

{
  security.unprivilegedUsernsClone = true; # Required for hardened kernel
  services.scx.enable = true;
  # TODO: enably cachy ananicy rules

  boot = {
    loader.systemd-boot.enable = true;
    loader.efi.canTouchEfiVariables = true;
    tmp.cleanOnBoot = true;
    # initrd.systemd.enable = true; # TODO: Not feature-complete yet https://blog.decent.id/post/nixos-systemd-initrd/

    kernelPackages = pkgs.linuxPackages_cachyos; # TODO: evaluate switching to hardened when using nix-mineral

    plymouth = {
      enable = true;
      theme = "nixos-bgrt";
      # TODO: replace with my own theme
      themePackages = [ pkgs.nixos-bgrt-plymouth ];
    };

    # Silent boot
    initrd.verbose = false;
    consoleLogLevel = 0;
    # TODO: configure more parameters
    kernelParams = [
      "quiet"
      "splash"
      "vt.global_cursor_default=0"
      "loglevel=3"
      "rd.systemd.show_status=auto"
      "rd.udev.log_level=3"
      "udev.log_priority=3"

      "boot.shell_on_fail"
    ];

    # Hide the OS choice for bootloaders.
    # It's still possible to open the bootloader list by pressing any key
    # It will just not appear on screen unless a key is pressed
    loader.timeout = 0;
  };
}

qweered avatar Jan 01 '25 20:01 qweered

Just to be sure: does it work with kernelPackages = pkgs.linuxPackages_6_12;?

PedroHLC avatar Jan 01 '25 22:01 PedroHLC

I tested with linuxPackages_latest today on unstable nixpkgs, surely works

qweered avatar Jan 02 '25 00:01 qweered

Same correct behavior with pkgs.linuxPackages_6_12

qweered avatar Jan 02 '25 02:01 qweered

haven't stumble across this problem:

╭──╼ s0mePC-nix on NixOS 25.5.0 ❄️  
┆ ~ 
╰─> uname -a                                                                                                                                                                                ✓  at ❗ 00:13
Linux s0mePC-nix 6.12.6-cachyos #1-NixOS SMP PREEMPT_DYNAMIC Thu Dec 19 17:13:24 UTC 2024 x86_64 GNU/Linux

&

s0me1newithhand7s avatar Jan 02 '25 21:01 s0me1newithhand7s

@s0me1newithhand7s you didn't select theme

theme = "nixos-bgrt";

qweered avatar Jan 03 '25 06:01 qweered

@s0me1newithhand7s you didn't select theme

theme = "nixos-bgrt";

isn't "nixos-bgrt" and "nixos-bgrt-plymouth" are same? anyway - i'll try

s0me1newithhand7s avatar Jan 03 '25 06:01 s0me1newithhand7s

Still the same issue on latest everything, can debug it if anyoune told me how. Current boot config:

{ pkgs, inputs, ... }:

{
  services.scx.enable = true;

  boot = {
    loader.systemd-boot.enable = true;
    loader.efi.canTouchEfiVariables = true;
    tmp.cleanOnBoot = true;

    kernelPackages = pkgs.linuxPackages_cachyos;

    plymouth = {
      enable = true;
      theme = "nixos-bgrt";
      themePackages = [ pkgs.nixos-bgrt-plymouth ];
    };

    # Silent boot
    initrd.verbose = false;
    consoleLogLevel = 0;
    kernelParams = [
      "quiet"
      "splash"
      "vt.global_cursor_default=0"
      "loglevel=3"
      "rd.systemd.show_status=auto"
      "rd.udev.log_level=3"
      "udev.log_priority=3"

      "boot.shell_on_fail"
      "microcode.amd_sha_check=off" # for ucodenix to work properly
    ];
    loader.timeout = 0;
  };
}

qweered avatar May 08 '25 22:05 qweered

Which kernel configs are required for Plymouth?

Do you guys have some error in dmesg?

PedroHLC avatar May 08 '25 23:05 PedroHLC

Which kernel configs are required for Plymouth?

just

    plymouth = {
      enable = true;
      theme = "nixos-bgrt";
      themePackages = [ pkgs.nixos-bgrt-plymouth ];
    };

Do you guys have some error in dmesg?

[ 2.872619] systemd[1]: Dispatch Password Requests to Console Directory Watch was skipped because of an unmet condition check (ConditionPathExists=!/run/plymouth/pid). [ 2.872712] systemd[1]: Started Forward Password Requests to Plymouth Directory Watch.

Nothing else related

qweered avatar May 09 '25 00:05 qweered

Hi, same issue here, changing kernelPackages = pkgs.linuxPackages_cachyos to kernelPackages = pkgs.linuxPackages_zen makes it work without any other changes.

depeo avatar May 11 '25 10:05 depeo

When switching to cachyOs kernel from latest i see this:

Version changes: [U.] #1 initrd-linux 6.15 -> 6.15.0 [U.] #2 linux 6.15, 6.15-modules, 6.15-modules-shrunk -> 6.15.0, 6.15.0-modules, 6.15.0-modules-shrunk Added packages: [A.] #1 unit-systemd-tmpfiles-setup-sysroot.service Removed packages: [R.] #1 plymouth-initrd-plugins [R.] #2 unit-initrd-switch-root.service

qweered avatar May 29 '25 10:05 qweered

Oh, then it's something in Nixpkgs' nixosModules. Probably asserting some kernel version/passthru that I missed.

PedroHLC avatar May 29 '25 12:05 PedroHLC

I wrote a test VM, and it works perfectly:

cd /tmp
nix build -L github:chaotic-cx/nyx#linux_cachyos.passthru.tests.plymouth.driverInteractive \
  && result/bin/nixos-test-driver

PedroHLC avatar Jun 06 '25 15:06 PedroHLC

The only thing out-of-ordinary here, is that the virtualisation stuff adds a console=tty0, and so I needed this line: https://github.com/chaotic-cx/nyx/blob/1109c2cfdd262417b4d8148aa3cc1228679d9270/pkgs/linux-cachyos/test.nix#L61

PedroHLC avatar Jun 06 '25 16:06 PedroHLC

I'm now daily driving Plymouth without issues (except a resolution change after systemd-boot, and stage-2 making it disappear).

If someone can reproduce the issue originally described here (by editing pkgs/linux-cachyos/test.nix), please re-open and post the diff.

PedroHLC avatar Jul 02 '25 15:07 PedroHLC