Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 5 additions & 29 deletions install/hardware/n1x.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,14 @@ cat > /etc/mkinitcpio.conf.d/omarchy-n1x-input.conf <<'CONF'
MODULES+=(i2c_mt65xx i2c_hid_acpi)
CONF

# Console and rescue boot contract.
# Console boot contract.
#
# The firmware publishes an ACPI SPCR serial console at 0x16a00000; without
# acpi=nospcr the kernel adopts it and the LUKS prompt and any initramfs
# emergency shell go to a UART nobody is watching. The ISO installer gives
# every aarch64 install console=tty0 acpi=nospcr (00-omarchy-console.conf). The
# normal entry otherwise boots as quietly as on x86, so Plymouth stays up from
# the LUKS prompt to the login screen; the rescue entry below is the verbose
# one. BOOT_ORDER is a plain assignment where the last file read wins, hence
# the zz- drop-in.
# entry otherwise boots as quietly as on x86, so Plymouth stays up from the
# LUKS prompt to the login screen.
mkdir -p /etc/limine-entry-tool.d

# cppc_cpufreq leaves CPPC autonomous selection off, so the CPUs follow the
Expand Down Expand Up @@ -75,28 +73,6 @@ KERNEL_CMDLINE[default]+=" pci=hpbussize=0x20"
CONF
fi

# Rescue entry: limine-mkinitcpio-hook builds a fallback UKI for the kernel
# (every module, no autodetect) and keeps it in step with kernel updates. It
# boots with NVIDIA blacklisted, the multi-user target and a verbose console on
# the panel. Limine passes an entry's cmdline as EFI load options and
# systemd-stub prefers those over the UKI's embedded cmdline, so the fallback
# entry gets its whole cmdline, root= included, from KERNEL_CMDLINE[fallback].
# BOOT_ORDER is a plain assignment where the last file read wins, hence the
# zz- drop-in; the snapshot entries leave the fallback out to save ESP space.
root_cmdline=$(cat /etc/kernel/cmdline 2>/dev/null || true)
if [[ -z $root_cmdline || $root_cmdline != *root=* ]]; then
echo "Error: /etc/kernel/cmdline has no root= (Limine defaults not written yet)" >&2
return 1
fi
rescue_cmdline="$root_cmdline initramfs_async=0 console=tty0 acpi=nospcr plymouth.enable=0 nomodeset module_blacklist=nvidia,nvidia_drm,nvidia_modeset,nvidia_uvm,nvidia_peermem,nouveau modprobe.blacklist=nvidia,nvidia_drm,nvidia_modeset,nvidia_uvm,nvidia_peermem,nouveau nvidia_drm.modeset=0 systemd.unit=multi-user.target fbcon=map:0 loglevel=7 ignore_loglevel systemd.show_status=1 systemd.log_target=console vt.global_cursor_default=1"
printf '%s\n' \
'# N1x: a text-console rescue entry sits right below the normal one; see install/hardware/n1x.sh.' \
'MKINITCPIO_FALLBACK=linux-omarchy' \
"KERNEL_CMDLINE[fallback]=\"$rescue_cmdline\"" \
'EXCLUDE_SNAPSHOT_ENTRIES="Windows*, windows*, *fallback"' \
'BOOT_ORDER="linux-omarchy, linux-omarchy-fallback, *, Snapshots"' \
> /etc/limine-entry-tool.d/zz-omarchy-n1x-boot-order.conf

# GPU policy, decided by the system firmware version.
#
# Dell's pre-release firmware (0.x, e.g. 0.60.1) leaves the GPU's secure boot
Expand Down Expand Up @@ -189,6 +165,6 @@ install nvidia_uvm /bin/false
CONF
fi

# omarchy-n1x-probe collects hardware and boot evidence on demand, from the
# rescue entry or a running system, and uses lspci.
# omarchy-n1x-probe collects hardware and boot evidence on demand and uses
# lspci.
omarchy-pkg-add pciutils
20 changes: 20 additions & 0 deletions migrations/1794673542.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
echo "Drop the N1x rescue boot entry"

# N1x laptops booted a text-console rescue entry from a fallback UKI built with
# every module, which cost about a minute on every kernel update and install.
# Release firmware boots the GPU, and snapshots cover recovery. A rebuild with
# no fallback configured removes the fallback UKI and its menu entry.
conf="${OMARCHY_N1X_BOOT_ORDER_CONF:-/etc/limine-entry-tool.d/zz-omarchy-n1x-boot-order.conf}"
# Removing the drop-in also removes what this migration looks for, so a marker
# keeps the rebuild pending until it finishes: an interrupted run retries it.
pending="${OMARCHY_N1X_RESCUE_REBUILD_MARKER:-/var/lib/omarchy/migrations/1794673542.pending}"

if [[ -f $conf ]]; then
sudo install -Dm644 /dev/null "$pending"
sudo rm -f "$conf"
fi

[[ -e $pending ]] || exit 0

sudo limine-mkinitcpio
sudo rm -f "$pending"
Loading