wipefs --all /dev/nvme1n1
sgdisk -Zo /dev/nvme1n1Mount the root btrfs volume:
mount /dev/nvme1n1p2 /mntCreate subvolume for root, home and var:
btrfs subvolume create /mnt/@
btrfs subvolume create /mnt/@home
btrfs subvolume create /mnt/@varFinally, mount them:
umount /mnt
mount -o noatime,compress=zstd,subvol=@ /dev/nvme1n1p2 /mnt
mkdir /mnt/{efi,home,var}
mount -o noatime,compress=zstd,subvol=@home /dev/nvme1n1p2 /mnt/home
mount -o noatime,compress=zstd,subvol=@var /dev/nvme1n1p2 /mnt/var
mount /dev/nvme1n1p1 /mnt/efiInstall the below list of packages with pacstrap -K to /mnt:
amd-ucodeorintel-ucodebasebase-develbtrfs-progshelixlinuxlinux-firmwareman-dbman-pagesnetworkmanagerrefind
Install rEFInd boot manager:
refind-installEdit rEFInd configuration file to change default settings. e.g. default boot choice
helix /efi/EFI/refind/refind.confEdit ArchLinux rEFInd configuration (assuming /dev/nvme1n1p2 contains rootfs):
helix /boot/refind_linux.conf
"Boot with standard options" "root=UUID=$(blkid -o value -s UUID /dev/nvme1n1p2) rw rootflags=subvol=@ initrd=@\boot\initramfs-linux.img amd_pstate=guided"
"Boot with fallback options" "root=UUID=$(blkid -o value -s UUID /dev/nvme1n1p2) rw rootflags=subvol=@ initrd=@\boot\initramfs-linux-fallback.img"git clone https://github.com/dheishman/refind-dreary /tmp/refind-dreary
/tmp/refind-dreary/install.sh highres /efi/EFI/refindsystemctl enable NetworkManagersystemctl enable systemd-timesync
timedatectl set-ntp true
hwclock --systohcsystemctl enable fstrim.timerpacman -S lm_sensors
sensors-detectEnable multilib repository:
sed -zi 's|#\[multilib\]\n#Include|[multilib]\nInclude|g' /etc/pacman.confInstall AMD drivers:
pacman -S \
mesa \
vulkan-icd-loader \
vulkan-radeon \
lib32-mesa \
lib32-vulkan-icd-loader \
lib32-vulkan-radeon \
;Enable multilib repository:
sed -zi 's|#\[multilib\]\n#Include|[multilib]\nInclude|g' /etc/pacman.confInstall NVidia drivers:
pacman -S \
libva-nvidia-driver \
nvidia \
nvidia-settings \
nvidia-utils \
vulkan-icd-loader \
lib32-nvidia-utils \
lib32-vulkan-icd-loader \
;Enable DRM by adding nvidia-drm.modeset=1 to kernel parameters:
helix /boot/refind_linux.confRemove kms from HOOKS array in /etc/mkinitcpio.conf:
sed -zi 's|kms ||g' /etc/mkinitcpio.conf
mkinitcpio -PSet VA-API driver to nvidia:
echo LIBVA_DRIVER_NAME=nvidia >> /etc/environmentInstall and enable bare Desktop Environment:
paru -S \
phonon-qt6-mpv \
plasma-desktop \
plasma-login-manager \
plasma-nm \
plasma-pa \
xorg-server \
;
systemctl enable plasmaloginpacman -S \
android-udev \
exfat-utils \
ntfs-3g \
;pacman -S \
ark \
dolphin \
dolphin-plugins \
gwenview \
kate \
kcalc \
kde-gtk-config \
kdeplasma-addons \
kgamma \
kinfocenter \
konsole \
kscreen \
kwallet-pam \
okular \
spectacle \
sweeper \
;
pacman -S --asdeps \
breeze-gtk \
ffmpegthumbs \
kdegraphics-thumbnailers \
kio-admin \
xdg-desktop-portal \
xdg-desktop-portal-kde \
;paru -S \
anki-bin \
fcitx5 \
fctix5-breeze \
fctix5-configtool \
fctix5-gtk \
fctix5-mozc \
fctix5-qt \
noto-fonts-cjk \
;paru -S \
gamemode \
gamescope \
lib32-gamemode \
lutris \
lutris-wine-meta \
steam \
vulkan-tools \
;usermod -aG gamemode <user>
usermod -aG games <user>cat /etc/tmpfiles.d/gaming.conf # Path Mode UID GID Age Argument # default value as of linux 6.6 w /proc/sys/vm/compaction_proactiveness - - - - 0 # 20 w /proc/sys/vm/watermark_boost_factor - - - - 1 # 15000 w /proc/sys/vm/min_free_kbytes - - - - 1048576 # 67584 w /proc/sys/vm/watermark_scale_factor - - - - 500 # 10 w /proc/sys/vm/swappiness - - - - 10 # 60 w /proc/sys/vm/max_map_count - - - - 2147483642 # 65530 w /sys/kernel/mm/lru_gen/enabled - - - - 5 # 7 w /proc/sys/vm/zone_reclaim_mode - - - - 0 # 0 w /sys/kernel/mm/transparent_hugepage/enabled - - - - madvise # always w /sys/kernel/mm/transparent_hugepage/shmem_enabled - - - - advise # never w /sys/kernel/mm/transparent_hugepage/defrag - - - - never # madvise w /proc/sys/vm/page_lock_unfairness - - - - 1 # 5 w /proc/sys/kernel/sched_child_runs_first - - - - 0 # 0 w /proc/sys/kernel/sched_autogroup_enabled - - - - 1 # 1 w /proc/sys/kernel/sched_cfs_bandwidth_slice_us - - - - 3000 # 5000 w /sys/kernel/debug/sched/base_slice_ns - - - - 3000000 # 3000000 w /sys/kernel/debug/sched/migration_cost_ns - - - - 500000 # 500000 w /sys/kernel/debug/sched/nr_migrate - - - - 8 # 32