Skip to main content

System Optimizations

Here I will count some basic system optimizations

Disable hibernation

Personal preference but also fine to do. Only needs to run one command.

sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

Disable Watchdog

Watchod is a feature that's mosly only usefull on a server and nost so much on a server, disabling it can lead to a small system speedup.

There are a couple version's off watchdog and here I will focus on the normal and hardware one for amd cpu's

nmi_watchdog

This is the regular one, easy to disable all you need to do is add line nmi_watchdog=0 to you kernel cmd line like with grub.

amd sp5100_tco

This is a hardware one specific to amd, to disable it create a file /etc/modprobe.d/sp5100_tco.conf and set this line in it blacklist sp5100_tco and reboot.

Disable wifi power save

This is the NetworkManager specific way.

Create a file /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf with this config and reboot

[connection]
wifi.powersave = 2

Have ssd? Enable fstrim

Fstrim makes sure your ssd in top shape, so we making it run daily.

sudo mkdir -v /etc/systemd/system/fstrim.timer.d
sudo touch /etc/systemd/system/fstrim.timer.d/override.conf
sudo nano /etc/systemd/system/fstrim.timer.d/override.conf
# add this
[Timer]
OnCalendar=
OnCalendar=daily
# enable fstrim timer and restart your pc
sudo systemctl enable --now fstrim.timer

Enable zram

Zram is compressed ram that's usefull especially when you are limited on ram.

# just in case add zswap.enabled=0 in grub config cmdline
sudo pacman -S zram-generator --needed
# echo this
echo '[zram0]
zram-size = ram / 2' | sudo tee /etc/systemd/zram-generator.conf
# load and start the new devices
sudo systemctl daemon-reload
sudo systemctl start /dev/zram0

# check with swapon or zramctl