Arch Linux
Some arch linux tips and tricks, also error fixes for people with specific hardware.
Optimizing makepkg.conf
if you are using aur and see that compiling some software is low here is how to speed it up, and also optimize compiled a bit more for you system.
/etc/makepkg.conf
Replace in CFLAGS and CXXFLAGS to native
-march=x86-64 -mtune=generic
to -march=native
Speed up build times
Find the line MAKEFLAGS
and set it to MAKEFLAGS="-j$(nproc)"
Speed up compression of packages
Find the line COMPRESSZST
and set it to COMPRESSZST=(zstd -1 -c -z -q -)
How to setup efi stub
get uuid of the root partition, also set the correct disk and partition in the commands and replace with current uuid of your root partition.
Make sure to change your cmdline parameters as you need them.
# Linux zen kernel
sudo efibootmgr --create --disk /dev/nvme0n1 --part 1 --label "Arch Linux" --loader /vmlinuz-linux-zen --unicode 'root=UUID="b3e4dcc5-be66-43e6-a66c-42c5d4a25e73" rootfstype=btrfs rootflags=subvolid=256 quiet loglevel=3 systemd.show_status=auto rd.udev.log_level=3 vt.global_cursor_default=0 nmi_watchdog=0 zswap.enabled=0 nvidia-drm.modeset=1 rcutree.rcu_idle_gp_delay=1 rw initrd=\amd-ucode.img initrd=\initramfs-linux-zen.img'
# linux lts kernel
sudo efibootmgr --create --disk /dev/nvme0n1 --part 1 --label "Arch Linux Lts" --loader /vmlinuz-linux-lts --unicode 'root=UUID="b3e4dcc5-be66-43e6-a66c-42c5d4a25e73" rootfstype=btrfs rootflags=subvolid=256 quiet loglevel=3 systemd.show_status=auto rd.udev.log_level=3 vt.global_cursor_default=0 nmi_watchdog=0 zswap.enabled=0 nvidia-drm.modeset=1 rcutree.rcu_idle_gp_delay=1 rw initrd=\amd-ucode.img initrd=\initramfs-linux-lts.img'
# linux zen kernel with debug
sudo efibootmgr --create --disk /dev/nvme0n1 --part 1 --label "Arch Linux Debug" --loader /vmlinuz-linux-zen --unicode 'root=UUID="b3e4dcc5-be66-43e6-a66c-42c5d4a25e73" rootfstype=btrfs rootflags=subvolid=256 nmi_watchdog=0 zswap.enabled=0 nvidia-drm.modeset=1 rcutree.rcu_idle_gp_delay=1 rw initrd=\amd-ucode.img initrd=\initramfs-linux-zen.img'