I have a weird issue that I’ve tried to debug and fix but I’ve exhausted my knowledge on the topic.
Regular flow during boot up
- Nixos generation select screen
- zfs prompt for password for the root fs
- rest of system bring up
- login screen
Issue
In the last couple months, between steps 1 and 2 I briefly see a message that says:
EFI stub: Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path
EFI stub: Measured initrd data into PCR 9
It disappears and the prompt for my zfs password takes over. However, once i3/xserver decides to put my display to sleep, that message/screen comes to the forefront again and I’m unable to get back to my i3 session.
Attempts to solve that didn’t work
- I’ve tried updating my BIOS but since this isn’t a bug in the BIOS the issue remains
- Setting
initrd.systemd.enable = true; - PCR 9 is controlled by the TPM typically so I tried disabling the TPM but that just removes the second line of the message
- I’ve set
boot.consoleLogLevelto3and0 - I’ve set
initrd.verbose = false - I’ve set the
quietkernel param. Interestingly this resulted in no message being shown but a black screen that persisted.
The last one in particular makes me think this issue is that a “different” console is being used in stage 1 (or whatever that stage is) and not properly dismissed for some reason. Does that make any sense?
My configuration
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
let
xmodmap = pkgs.writeText ".Xmodmap" ''
keycode 66 = Multi_key
clear Lock
'';
in {
require = [ ../scripts.nix ./packages.nix ./crate.nix ../master.nix ];
imports = [
./hardware-configuration.nix
(fetchTarball
"https://github.com/msteen/nixos-vscode-server/tarball/master")
];
fileSystems."/home/adam/Source" = {
device = "shire/source";
fsType = "zfs";
};
fileSystems."/home/adam/Projects" = {
device = "shire/projects";
fsType = "zfs";
};
boot = rec {
kernelPackages = pkgs.linuxPackages_6_1;
extraModulePackages = [ kernelPackages.v4l2loopback ];
zfs.requestEncryptionCredentials = true;
kernelParams = [ "intel_iommu=on" "i915.force_probe=4680" ];
kernelModules = [
"v4l2loopback"
"kvm-intel"
"vfio_virqfd"
"vfio_pci"
"vfio_iommu_type1"
"vfio"
];
extraModprobeConfig = "options vfio-pci ids=10de:2487,10de:228b";
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
grub.copyKernels = true;
};
supportedFilesystems = [ "zfs" ];
kernel.sysctl = {
"dev.i915.perf_stream_paranoid" = 0;
"net.ipv4.ip_forward" = 1;
"net.ipv6.conf.all.forwarding" = 1;
};
};
nixpkgs.config.allowUnfree = true;
nix = {
settings = {
auto-optimise-store = true;
allowed-users = [ "@wheel" ];
};
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
};
time.timeZone = "America/New_York";
networking = {
interfaces = { enp8s0 = { wakeOnLan.enable = true; }; };
firewall = {
enable = true;
allowedTCPPorts = [ 3000 8080 ];
allowedUDPPorts = [ 41641 ];
checkReversePath = "loose";
};
hostId = "47ffe1b9"; # head -c4 /dev/urandom | od -A none -t x4
hostName = "fin";
iproute2.enable = true;
wireless = { iwd = { enable = true; }; };
};
fonts = {
enableDefaultPackages = true;
# Give fonts to 32-bit binaries too (e.g. steam).
fontconfig.cache32Bit = true;
packages = with pkgs; [
hack-font
google-fonts
liberation_ttf
open-sans
roboto
roboto-mono
];
};
sound.enable = true;
hardware.pulseaudio.enable = false;
hardware.logitech.wireless.enable = true;
hardware.i2c.enable = true;
hardware.opengl = {
enable = true;
extraPackages = with pkgs; [
intel-media-driver # LIBVA_DRIVER_NAME=iHD
vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
vaapiVdpau
libvdpau-va-gl
];
};
security.polkit.enable = true;
programs.dconf.enable = true;
programs.zsh.enable = true;
programs.ssh.startAgent = true;
programs.light.enable = true;
programs.gnupg.agent.enable = true;
users.users.adam = {
isNormalUser = true;
extraGroups = [ "docker" "wheel" "lp" "video" "audio" "libvirtd" ];
shell = pkgs.zsh;
};
services = {
vscode-server.enable = true;
syncthing = {
enable = true;
user = "adam";
dataDir = "/home/adam/Sync";
configDir = "/home/adam/.config/syncthing";
settings = {
devices = {
astromech = {
id =
"ITT5GJ7-2YMQNSL-6L5WYRA-FC3YPAO-ON6WKRT-HO27JBK-WVZGPCT-UTCEJQO";
};
};
folders = {
"/home/adam/Shared" = {
id = "x2lgj-4mf6q";
devices = [ "astromech" ];
label = "Shared";
};
};
};
};
xserver = {
layout = "us";
enable = true;
libinput.enable = true;
desktopManager = { xterm.enable = false; };
displayManager = {
defaultSession = "none+i3";
sessionCommands = "${pkgs.xorg.xmodmap}/bin/xmodmap ${xmodmap}";
};
windowManager.i3 = {
enable = true;
extraPackages = with pkgs; [
rofi # application launcher most people use
i3status # gives you the default i3 status bar
];
};
};
lorri.enable = true;
mpdscribble = {
enable = true;
endpoints = {
"last.fm" = {
username = "skimpson";
passwordFile = "/home/adam/lastfm-pass";
};
};
};
tailscale.enable = true;
gnome.sushi.enable = true;
printing = {
enable = true;
drivers = [ pkgs.brlaser ];
};
openssh.enable = true;
gnome.gnome-keyring.enable = true;
zfs = {
autoSnapshot.enable = true;
autoScrub.enable = true;
};
timesyncd = {
enable = true;
servers = [ "time.google.com" ];
};
acpid.enable = true;
colord.enable = true;
fwupd.enable = true;
cron.enable = true;
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
udev = {
extraRules = ''
LABEL="gmk pro regular user access"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="320f", ATTRS{idProduct}=="5044", TAG+="uaccess"
'';
};
};
virtualisation = {
spiceUSBRedirection.enable = true;
libvirtd = {
enable = true;
qemu = {
package = pkgs.qemu_kvm;
runAsRoot = true;
swtpm.enable = true;
ovmf = {
enable = true;
packages = [ pkgs.OVMFFull.fd ];
};
};
};
docker = {
enable = true;
autoPrune.enable = true;
};
};
security.pam = {
u2f.enable = true;
u2f.cue = true;
u2f.authFile = "/home/adam/.config/Yubico/u2f_keys";
services = {
login.u2fAuth = true;
login.fprintAuth = false;
lightdm.u2fAuth = true;
sudo.u2fAuth = true;
sudo.fprintAuth = false;
lightdm.enableGnomeKeyring = true;
login.enableGnomeKeyring = true;
};
};
system.autoUpgrade.enable = true;
system.autoUpgrade.channel = "https://nixos.org/channels/nixos-unstable";
environment.etc."polkit-gnome-authentication-agent-1".source =
"${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
#environment.etc."X11/xorg.conf.d/20-intel.conf" = {};
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It‘s perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "21.11"; # Did you read the comment?
}```
Thanks in advance!