Switch to Zen kernel on Arch Linux
Current setup:
- Arch Linux
- Nvidia proprietary driver
- Syslinux bootloader
Switch to Zen kernel
Install Zen kernel
pacman -S linux-zen linux-zen-headers nvidia-dkms
Edit bootloader (I use syslinux btw)
/boot/efi/EFI/syslinux/syslinux.cfg LABEL arch_zen
MENU LABEL Arch Linux ZEN
- LINUX ../vmlinuz-linux
+ LINUX ../vmlinuz-linux-zen
# https://wiki.archlinux.org/title/NVIDIA#DRM_kernel_mode_setting
APPEND ... nvidia_drm.modeset=1 nvidia_drm.fbdev=1
- INITRD ../initramfs-linux.img
+ INITRD ../initramfs-linux-zen.img
From arch docs: To avoid the possibility of forgetting to update initramfs after an NVIDIA driver upgrade, you may want to use a pacman hook:
Edit pacman hook
/etc/pacman.d/hooks/nvidia.hook [Trigger]
- Target=nvidia
+ Target=nvidia-dkms
- Target=linux
+ Target=linux-zen
Note that the
nvidia
package is replaced withnvidia-dkms
package.
Ensure nvidia modules are loaded early
/etc/mkinitcpio.conf # https://wiki.archlinux.org/title/NVIDIA#Early_loading
MODULES=(... nvidia nvidia_modeset nvidia_uvm nvidia_drm)
Rebuild initramfs
mkinitcpio -p linux-zen
Uninstall the old kernel
pacman -R linux linux-headers
Note: pacman create a etc/mkinitcpio.d/linux.preset.pacsave file
EFI Update
In both cases you may want to update your EFI files. See Automatically update EFI files after kernel update.