Question about dealing with mkinitcpio.conf.pacnew

Hey all,
I’m getting prepared for updating (and dealing with the KDE6 + nvidia issues, but I’ll probably create a new topic for that if I can’t figure it out).

BUT my real question is this: I’m seeing a mkinitcpio.conf.pacnew file and I know that (per the Arch wiki) these probably shouldn’t be ignored, but I’m not sure how to deal with it in a way that plays nice with Garuda’s defaults and doesn’t leave me in a lurch.

My garuda-inxi and the differing files in question are posted below. I’m on “stock” Garuda Dr460nized install with no major system config changes AFAIK. I’ve tried searching the forum, but I’m not getting anything obvious (especially since “mkinitcpio” is a part of virtually every post due to garuda-inxi output).

So should I ignore/remove the pacnew, replace old config with pacnew, 3-way merge, or manually edit? If someone with a similar setup who’s dealt with this recent pacnew could advise that would be a huge help to me. Bonus points if you have some tips for Hooks or Modules I should add to ease the transition to KDE6 with Nvidia GPU :grin:

mkinitcpio.conf:

# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES=(crc32c-intel intel_agp i915 amdgpu radeon nouveau)
MODULES=(crc32c-intel intel_agp i915 amdgpu radeon nouveau)

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=()

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
FILES=""

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No raid, lvm2, or encrypted root is needed.
#    HOOKS=(base)
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS=(base udev autodetect block filesystems)
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev block filesystems)
#
##   This setup assembles a pata mdadm array with an encrypted root FS.
##   Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
#    HOOKS=(base udev block mdadm encrypt filesystems)
#
##   This setup loads an lvm2 volume group on a usb device.
#    HOOKS=(base udev block lvm2 filesystems)
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr, fsck and shutdown hooks.
HOOKS="base udev autodetect modconf block keyboard keymap consolefont plymouth resume filesystems"

# COMPRESSION
# Use this to compress the initramfs image. By default, zstd compression
# is used. Use 'cat' to create an uncompressed image.
#COMPRESSION="zstd"
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()

mkinitcpio.conf.pacnew:

# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES=(usbhid xhci_hcd)
MODULES=()

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=()

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
FILES=()

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No RAID, lvm2, or encrypted root is needed.
#    HOOKS=(base)
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS=(base udev autodetect modconf block filesystems fsck)
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev modconf block filesystems fsck)
#
##   This setup assembles a mdadm array with an encrypted root file system.
##   Note: See 'mkinitcpio -H mdadm_udev' for more information on RAID devices.
#    HOOKS=(base udev modconf keyboard keymap consolefont block mdadm_udev encrypt filesystems fsck)
#
##   This setup loads an lvm2 volume group.
#    HOOKS=(base udev modconf block lvm2 filesystems fsck)
#
##   This will create a systemd based initramfs which loads an encrypted root filesystem.
#    HOOKS=(base systemd autodetect modconf kms keyboard sd-vconsole sd-encrypt block filesystems fsck)
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr and fsck hooks.
HOOKS=(base udev autodetect microcode modconf kms keyboard keymap consolefont block filesystems fsck)

# COMPRESSION
# Use this to compress the initramfs image. By default, zstd compression
# is used. Use 'cat' to create an uncompressed image.
#COMPRESSION="zstd"
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()

# MODULES_DECOMPRESS
# Decompress kernel modules during initramfs creation.
# Enable to speedup boot process, disable to save RAM
# during early userspace. Switch (yes/no).
#MODULES_DECOMPRESS="yes"

garuda-inxi

System:
Kernel: 6.7.8-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
clocksource: tsc avail: hpet,acpi_pm
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=bb56b6c6-cca3-4ece-83fc-02bd3975f545 rw rootflags=subvol=@
quiet rd.udev.log_priority=3 vt.global_cursor_default=0
resume=UUID=6244d32d-2c70-477c-af93-53438cff4ad5 loglevel=3 ibt=off
Desktop: KDE Plasma v: 5.27.10 tk: Qt v: 5.15.12 info: frameworks
v: 5.115.0 wm: kwin_x11 vt: 2 dm: SDDM Distro: Garuda base: Arch Linux
Machine:
Type: Desktop Mobo: Micro-Star model: MEG Z490I UNIFY (MS-7C77) v: 1.2
serial: <superuser required> part-nu: B926.C uuid: <superuser required>
UEFI: American Megatrends v: C.40 date: 07/22/2020
CPU:
Info: model: Intel Core i7-10700K bits: 64 type: MT MCP arch: Comet Lake
gen: core 10 level: v3 note: check built: 2020 process: Intel 14nm family: 6
model-id: 0xA5 (165) stepping: 5 microcode: 0xF8
Topology: cpus: 1x cores: 8 tpc: 2 threads: 16 smt: enabled cache:
L1: 512 KiB desc: d-8x32 KiB; i-8x32 KiB L2: 2 MiB desc: 8x256 KiB
L3: 16 MiB desc: 1x16 MiB
Speed (MHz): avg: 800 min/max: 800/5100 scaling: driver: intel_pstate
governor: performance cores: 1: 800 2: 800 3: 800 4: 800 5: 800 6: 800
7: 800 8: 800 9: 800 10: 800 11: 800 12: 800 13: 800 14: 800 15: 800
16: 800 bogomips: 121596
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Vulnerabilities: <filter>
Graphics:
Device-1: Intel CometLake-S GT2 [UHD Graphics 630] vendor: Micro-Star MSI
driver: i915 v: kernel arch: Gen-9.5 process: Intel 14nm built: 2016-20
ports: active: none empty: DP-1, DP-2, HDMI-A-1, HDMI-A-2, HDMI-A-3
bus-ID: 00:02.0 chip-ID: 8086:9bc5 class-ID: 0380
Device-2: NVIDIA TU104 [GeForce RTX 2070 SUPER] vendor: Micro-Star MSI
driver: nvidia v: 550.54.14 alternate: nouveau,nvidia_drm non-free: 545.xx+
status: current (as of 2024-02; EOL~2026-12-xx) arch: Turing code: TUxxx
process: TSMC 12nm FF built: 2018-2022 pcie: gen: 3 speed: 8 GT/s
lanes: 16 ports: active: none off: DP-3 empty: DP-4,DP-5,HDMI-A-4
bus-ID: 01:00.0 chip-ID: 10de:1e84 class-ID: 0300
Display: x11 server: X.Org v: 21.1.11 with: Xwayland v: 23.2.4
compositor: kwin_x11 driver: X: loaded: modesetting,nvidia unloaded: nouveau
alternate: fbdev,intel,nv,vesa dri: iris gpu: nvidia,nvidia-nvswitch
display-ID: :0 screens: 1
Screen-1: 0 s-res: 2560x1080 s-dpi: 92 s-size: 707x301mm (27.83x11.85")
s-diag: 768mm (30.25")
Monitor-1: DP-3 mapped: DP-0 note: disabled model: MSI MAG301CR
built: 2020 res: 2560x1080 hz: 200 dpi: 94 gamma: 1.2
size: 690x291mm (27.17x11.46") diag: 762mm (30") modes: max: 2560x1080
min: 640x480
API: EGL v: 1.5 hw: drv: intel iris drv: nvidia platforms: device: 0
drv: nvidia device: 1 drv: iris device: 3 drv: swrast surfaceless:
drv: nvidia x11: drv: nvidia inactive: gbm,wayland,device-2
API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 550.54.14
glx-v: 1.4 direct-render: yes renderer: NVIDIA GeForce RTX 2070
SUPER/PCIe/SSE2 memory: 7.81 GiB
API: Vulkan v: 1.3.276 layers: 14 device: 0 type: discrete-gpu name: NVIDIA
GeForce RTX 2070 SUPER driver: nvidia v: 550.54.14 device-ID: 10de:1e84
surfaces: xcb,xlib device: 1 type: integrated-gpu name: Intel UHD
Graphics 630 (CML GT2) driver: mesa intel v: 24.0.2-arch1.1
device-ID: 8086:9bc5 surfaces: xcb,xlib device: 2 type: cpu name: llvmpipe
(LLVM 16.0.6 256 bits) driver: mesa llvmpipe v: 24.0.2-arch1.1 (LLVM
16.0.6) device-ID: 10005:0000 surfaces: xcb,xlib
Audio:
Device-1: Intel Comet Lake PCH cAVS vendor: Micro-Star MSI
driver: snd_hda_intel v: kernel alternate: snd_soc_skl,snd_sof_pci_intel_cnl
bus-ID: 00:1f.3 chip-ID: 8086:06c8 class-ID: 0403
Device-2: NVIDIA TU104 HD Audio vendor: Micro-Star MSI
driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
bus-ID: 01:00.1 chip-ID: 10de:10f8 class-ID: 0403
API: ALSA v: k6.7.8-zen1-1-zen status: kernel-api with: aoss
type: oss-emulator tools: N/A
Server-1: sndiod v: N/A status: off tools: aucat,midicat,sndioctl
Server-2: PipeWire v: 1.0.3 status: active with: 1: pipewire-pulse
status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
Device-1: Intel Comet Lake PCH CNVi WiFi driver: iwlwifi v: kernel
bus-ID: 00:14.3 chip-ID: 8086:06f0 class-ID: 0280
IF: wlo1 state: up mac: <filter>
Device-2: Realtek RTL8125 2.5GbE vendor: Micro-Star MSI driver: r8169
v: kernel pcie: gen: 2 speed: 5 GT/s lanes: 1 port: 3000 bus-ID: 3b:00.0
chip-ID: 10ec:8125 class-ID: 0200
IF: enp59s0 state: down mac: <filter>
Info: services: NetworkManager, smbd, systemd-timesyncd, wpa_supplicant
Bluetooth:
Device-1: Intel AX201 Bluetooth driver: btusb v: 0.8 type: USB rev: 2.0
speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-14:8 chip-ID: 8087:0026
class-ID: e001
Report: btmgmt ID: hci0 rfk-id: 1 state: down bt-service: enabled,running
rfk-block: hardware: no software: yes address: <filter> bt-v: 5.2 lmp-v: 11
status: discoverable: no pairing: no
Drives:
Local Storage: total: 953.87 GiB used: 522.87 GiB (54.8%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Western Digital model: PC SN730
SDBPNTY-1T00-1032 size: 953.87 GiB block-size: physical: 512 B
logical: 512 B speed: 31.6 Gb/s lanes: 4 tech: SSD serial: <filter>
fw-rev: 11111000 temp: 41.9 C scheme: GPT
Partition:
ID-1: / raw-size: 919.26 GiB size: 919.26 GiB (100.00%)
used: 522.87 GiB (56.9%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
used: 580 KiB (0.2%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
ID-3: /home raw-size: 919.26 GiB size: 919.26 GiB (100.00%)
used: 522.87 GiB (56.9%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
ID-4: /var/log raw-size: 919.26 GiB size: 919.26 GiB (100.00%)
used: 522.87 GiB (56.9%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
ID-5: /var/tmp raw-size: 919.26 GiB size: 919.26 GiB (100.00%)
used: 522.87 GiB (56.9%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) zswap: no
ID-1: swap-1 type: zram size: 31.18 GiB used: 14.5 MiB (0.0%)
priority: 100 comp: zstd avail: lzo,lzo-rle,lz4,lz4hc,842 max-streams: 16
dev: /dev/zram0
ID-2: swap-2 type: partition size: 34.3 GiB used: 0 KiB (0.0%)
priority: -2 dev: /dev/nvme0n1p3 maj-min: 259:3
Sensors:
System Temperatures: cpu: 32.0 C pch: 60.0 C mobo: N/A gpu: nvidia
temp: 32 C
Fan Speeds (rpm): N/A gpu: nvidia fan: 24%
Info:
Memory: total: 32 GiB available: 31.18 GiB used: 6.48 GiB (20.8%)
Processes: 381 Power: uptime: 3h 31m states: freeze,mem,disk suspend: deep
avail: s2idle wakeups: 0 hibernate: platform avail: shutdown, reboot,
suspend, test_resume image: 12.43 GiB services: org_kde_powerdevil,upowerd
Init: systemd v: 255 default: graphical tool: systemctl
Packages: pm: pacman pkgs: 2223 libs: 609 tools: octopi,paru Compilers:
clang: 16.0.6 gcc: 13.2.1 Shell: garuda-inxi default: fish v: 3.7.0
running-in: konsole inxi: 3.3.33
Garuda (2.6.23-1):
System install date:     2023-05-16
Last full system update: 2024-03-03
Is partially upgraded:   No
Relevant software:       snapper NetworkManager mkinitcpio nvidia-dkms
Windows dual boot:       No/Undetected
Failed units:

In general, it is appropriate to diff and apply changes, e.g
sudo -E meld /etc/mkinitcpio.conf{.pacnew,}
if you were to copy the .pacnew over the “real” file, you’d lose all modifications done there, in this case MODULES and HOOKS. (which may well result in an unbootable or malfunctioning system when it comes to mkinicpio)
Note that, while the "string with spaces" syntax is still supported, it’s better to start using the array syntax (replacing the quotes with ( and ) )

I see. I can definitely make the change from double-quotes to array syntax no problem.
I’m still unsure about Modules & Hooks though.
Since the current config for Modules is

MODULES=(crc32c-intel intel_agp i915 amdgpu radeon nouveau)

versus the .pacnew with MODULES=(), I’m assuming I should probably stick with the current config on that. Although maybe it’s safe to remove the “amdgpu radeon” part since the system contains neither? Also thinking I should remove “nouveau” (and maybe replace with something else) since I’m using the proprietary nvidia driver?

But Hooks is the real puzzler to me.
mkinitcpio.conf.pacnew:

HOOKS=(base udev autodetect microcode modconf kms keyboard keymap consolefont block filesystems fsck)

mkinitcpio.conf:

HOOKS="base udev autodetect modconf block keyboard keymap consolefont plymouth resume filesystems"

Do I need “microcode” “kms” or “fsck” from the .pacnew? Should I remove “plymouth” from my current config? I feel like I heard that plymouth isn’t used anymore, but maybe I’m confused.

Edit: accidentally labeled the original conf as the pacnew, fixed now.

Yes, keep the current value.
The new file is not installed over the existing one because it’s a generic example to be customized (by you, the distro, or both).

I don’t have all the answers, in general “don’t fix it if it ain’t broken”.
Though it should be safe to remove unused ones, they’re likely there so it works for everyone and keeps working in case you replace the video card (bad surprise if you do and not update accordingly).

Note also, Garuda now uses dracut rather than mkinitcpio, that is somewhat faster and needs less manual configuration, it detects what modules are actually necessary.
I’m still on mkinitcpio because lazyness, I’m not sure of details.
(to be continued)

I gotcha. I appreciate the input even if it isn’t The One True Answer ™.

I’ll wait and see if anyone else has any additional advice before I pull the trigger on changing mkinitcpio.conf or running garuda-update.

I actually tried updating last night and royally borked my system – slow boot lingering on the console messages, logging in with Wayland gives the old “blank black screen with only a mouse cursor and no functionality”, painfully slow switching between TTYs with the CTRL-ALT-F keys, no way to logout or reboot (yes even on other TTYs) except for mashing the power button – all stuff that sounds like Nvidia/Wayland troubles from the jump.

Maybe running garuda-update with my (outdated?) mkinitcpio.conf in conjunction with the KDE6 update is causing some of my issues?

No matter, I rolled back to the snapshot before updating and the system is good now. I can hold off on updating if need be. That seems to be the general consensus among Nvidia users at the moment.

1 Like

I don’t think the mkinitcpio is at fault here, you are correct this is nvidia snafu.
Except the HOOKS and MODULES, all the new changes in .pacnew are just comments.

1 Like

A few things changed with mkinitcpio recently, see the related announcement here:

https://archlinux.org/news/mkinitcpio-hook-migration-and-early-microcode/

The main thing to be aware of is microcode will now be bundled with the initramfs image and has moved to being a hook in mkinitcpio.conf, instead of being a flag or boot parameter.

In the modules array, you can list out modules you want loaded first. The most typical reason to do this would be to load your GPU stuff as early as possible. That’s why those modules are listed in there by default. It is definitely safe to take out the ones you don’t want or are not relevant for your setup.

You should get the microcode hook added due to the new change with how microcode will be handled by mkinitcpio.

kms you would add if you want to enable early KMS, which is a way of setting up your video card during the boot process instead of after. This is usually done either to address GPU-related issues, or because certain settings or features depend on it being set. If you want to set up early KMS with an Nvidia card, you may need some kernel parameters in addition to setting the hook. https://wiki.archlinux.org/title/NVIDIA#Early_loading If you aren’t sure if you need it or not, you can probably skip it.

fsck is needed for running fsck at boot, which is recommended for all filesystems except Btrfs, so you can skip this one. Btrfs uses a different utility for this, see here: fsck.btrfs(8) — Arch manual pages

Traditional filesystems need to run their respective fsck utility in case the filesystem was not unmounted cleanly and the log needs to be replayed before mount. This is not needed for BTRFS.

Yes, you can remove this hook. Plymouth was removed with a hotfix a while back. It is pretty unusual for a package to be forcefully removed like that, but at the time it was causing a lot of issues including causing many systems to fail to boot.

A lot of folks did not have any issues with Plymouth, and you should feel free to bring it back in if you want to, but if you’re not interested in doing that you will not need this hook.

After you are done editing mkinitcpio.conf, go ahead and regenerate the initramfs against your new configuration.

sudo mkinitcpio -P
4 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.