Skip to content

gessen/arch-notes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

ArchLinux notes

Base system installation

Wipe disk

wipefs --all /dev/nvme1n1
sgdisk -Zo /dev/nvme1n1

btrfs subvolumes

Mount the root btrfs volume:

mount /dev/nvme1n1p2 /mnt

Create subvolume for root, home and var:

btrfs subvolume create /mnt/@
btrfs subvolume create /mnt/@home
btrfs subvolume create /mnt/@var

Finally, 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/efi

Base packages

Install the below list of packages with pacstrap -K to /mnt:

  • amd-ucode or intel-ucode
  • base
  • base-devel
  • btrfs-progs
  • helix
  • linux
  • linux-firmware
  • man-db
  • man-pages
  • networkmanager
  • refind

Bootmanager (rEFInd)

Install rEFInd boot manager:

refind-install

Edit rEFInd configuration file to change default settings. e.g. default boot choice

helix /efi/EFI/refind/refind.conf

Edit 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"

Customisation

git clone https://github.com/dheishman/refind-dreary /tmp/refind-dreary
/tmp/refind-dreary/install.sh highres /efi/EFI/refind

Base system configuration

Network with Wi-Fi

systemctl enable NetworkManager

Time and date configuration

systemctl enable systemd-timesync
timedatectl set-ntp true
hwclock --systohc

Periodic TRIM for SSD

systemctl enable fstrim.timer

Sensors

pacman -S lm_sensors
sensors-detect

Graphical environment

AMD drivers

Enable multilib repository:

sed -zi 's|#\[multilib\]\n#Include|[multilib]\nInclude|g' /etc/pacman.conf

Install AMD drivers:

pacman -S \
  mesa \
  vulkan-icd-loader \
  vulkan-radeon \
  lib32-mesa \
  lib32-vulkan-icd-loader \
  lib32-vulkan-radeon \
;

NVidia drivers

Enable multilib repository:

sed -zi 's|#\[multilib\]\n#Include|[multilib]\nInclude|g' /etc/pacman.conf

Install 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.conf

Remove kms from HOOKS array in /etc/mkinitcpio.conf:

sed -zi 's|kms ||g' /etc/mkinitcpio.conf
mkinitcpio -P

Set VA-API driver to nvidia:

echo LIBVA_DRIVER_NAME=nvidia >> /etc/environment

KDE Plasma 6

Install and enable bare Desktop Environment:

paru -S \
  phonon-qt6-mpv \
  plasma-desktop \
  plasma-login-manager \
  plasma-nm \
  plasma-pa \
  xorg-server \
;
systemctl enable plasmalogin

General utilities

pacman -S \
  android-udev \
  exfat-utils \
  ntfs-3g \
;

KDE applications

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 \
;

Jpn

paru -S \
  anki-bin \
  fcitx5 \
  fctix5-breeze \
  fctix5-configtool \
  fctix5-gtk \
  fctix5-mozc \
  fctix5-qt \
  noto-fonts-cjk \
;

Gaming

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

About

Private notes on how to configure base arch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors