Locale (US English with GB numbers)
$ cat /etc/locale.conf
LANG=en_US.UTF-8
LC_TIME=en_GB.UTF-8
LC_PAPER=en_GB.UTF-8
LC_MEASUREMENT=en_GB.UTF-8
Console settings with Caps Lock layout switch
$ cat /etc/vconsole.conf
KEYMAP=ruwin_cplk-UTF-8
FONT=ter-v32b
CONSOLEMAP=
TIMEZONE=America/New_York
HARDWARECLOCK=UTC
USECOLOR=yes
Limits
$ cat /etc/sysctl.d/90-user.conf
fs.file-max=524288
fs.inotify.max_user_watches=524288
vm.max_map_count=262144
vm.swappiness=1
$ cat /etc/security/limits.conf
# https://wiki.archlinux.org/index.php/Limits.conf
* soft core 0 # Prevent corefiles from being generated by default.
* hard core unlimited # Allow corefiles to be temporarily enabled.
* hard nice -19 # Prevent non-root users from running a process at minimal niceness.
root hard nice -20 # Allows root to run a process at minimal niceness to fix the system when unresponsive.
* soft priority 0 # Set the default priority to neutral niceness.
* soft nproc 4096
* hard nproc 8192 # Prevent fork-bombs from taking out the system.
root hard nproc 65536 # Prevent root from not being able to launch enough processes
* soft nofile 1048576
* hard nofile 1048576
Time synchronization
$ pacman -S ntp
$ systemctl enable ntpdate.service
SSD
Enable periodical trim (once a week by default)
$ systemctl enable fstrim.timer
NetworkManager
Disable checking connectivity
$ cat /etc/NetworkManager/conf.d/20-connectivity.conf
[connectivity]
enabled=false
ACPI
$ systemctl enable acpid
Avahi (Zero-configuration networking, zeroconf)
In file /etc/nsswitch.conf edit line
hosts: files mymachines myhostname mdns4_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns
$ systemctl enable avahi-daemon.service
Disable mDNS in systemd-resolverd if Avahi enabled
In file /etc/systemd/resolved.conf
MulticastDNS=no
Pacman. Color output
In file /etc/pacman.conf uncoment line Color
Pacman. Utilize all cores on compression
In file /etc/makepkg.conf edit next lines
COMPRESSGZ=(pigz -c -f -n)
COMPRESSBZ2=(pbzip2 -c -f)
COMPRESSXZ=(xz -c -z - --threads=0)
COMPRESSZST=(zstd -c -z -q - --threads=0)
Balance load between CPU
$ pacman -S irqbalance
$ systemctl enable irqbalance.service
Disable kernel audit messages
Add kernel parameter audit=0
Improve boot speed
Add kernel parameter random.trust_cpu=on
Enable lz4 compression for kernel
In file /etc/mkinitcpio.conf set paramter COMPRESSION="lz4"
Disable rtkit log spam
systemctl edit rtkit-daemon.service
[Service]
LogLevelMax=warning
systemctl restart rtkit-daemon
Disable log messages ACPI group/action undefined
$ cat /etc/acpi/events/buttons
event=^button/(up|right|down|left)
action=<drop>
$ cat /etc/acpi/events/jack
event=^jack/(lineout|videoout)
action=<drop>
Disable CPU exploit mitigations
kernel parameter mitigations=off
check if mitigations disable grep . /sys/devices/system/cpu/vulnerabilities/*
Enable I2C
$ cat /etc/modules-load.d/i2c.conf
i2c_dev
to check if it works use i2cdetect -l
as root