This is a collection of the tweaks and modification I've made to my Arch Linux installation over the months. These may be applicable to other distros, but please check first before doing anything. I also included Arch Wiki references for all the procedures I mentioned. My recommendation is not to blindly follow this gist but to always check with the Arch Linux wiki first. Things move fast and by the time you're reading this my gist may be out of date. Lastly, the golden rule: never execute a command you don't understand.
## Yay!
I use `yay` as my AUR helper. You can install it from the AUR:
These commands assume your Windows partition is mounted at /windows as they've been copied verbatim from the Arch Wiki. If you don't dual boot or don't mount your Windows partition to /windows, just replace `/windows/Windows/Fonts/*` with wherever location you copied that folder to.
## Improving I/O performance
### Using the BFQ scheduler
Arch Wiki reference: https://wiki.archlinux.org/index.php/Improving_performance#Changing_I/O_scheduler
Linux notoriously gets very slow with I/O intensive operations such as moving a lot of files at once and swapping. **If** you have a **spinning hard drive or a not-so-fast SSD**, the BFQ scheduler can help improve system responsiveness during I/O intensive operations. I still use a SATA SSD for lack of a faster connector on my laptop and I have perceived significantly better overall performance by using the BFQ I/O scheduler. If your boot disk is a fast NVme SSD it's generally not the best idea to use the `bfq` scheduler for it, but since the I/O scheduler is set per-disk, it might be a good idea to use it for any spinning hard disk permanently connected to the computer (e.g. a secondary disk to store games and movies).
To set the BFQ scheduler, you need to specify some `udev` rules to tell Linux what scheduler to use on what kind of disks. For example, you could use the `mq-deadline` scheduler on your NVme drives and the `bfq` scheduler on your SSDs. I decided to set my rules in such a way that no scheduler is used for NVme SSDs, but `bfq` is used for everything else. To do this, create the file `/etc/udev/rules.d/60-ioschedulers.rules` and fill it in as below:
Arch Wiki reference: https://wiki.archlinux.org/index.php/Ext4#Improving_performance
### Improving laptop battery life with TLP and powertop
Arch Wiki reference: https://wiki.archlinux.org/index.php/TLP https://wiki.archlinux.org/index.php/Powertop
Linux distros tend to deplete laptops' batteries quite quickly, which can be detrimental to some. `tlp` is a set-and-forget, auto-tuning option for laptops that I have found to work very well (albeit it comes with drawbacks, such as a perceived decrease in performance). Setting it up on Arch Linux is pretty straightforward:
```shell
pacman -S tlp
systemctl enable tlp.service --now
```
`powertop` is a powerful commandline program to keep track of battery consumption. It also allows the user to quickly alter some system settings that have an impact on battery life. You can use it to make a quick tuning:
Arch Wiki reference: https://wiki.archlinux.org/index.php/Microcode https://en.wikipedia.org/wiki/Intel_Microcode
## Using the modesetting driver
Arch Wiki reference: https://wiki.archlinux.org/index.php/Kernel_mode_setting#Early_KMS_start
## Enabling Early KMS
Arch Wiki reference: https://wiki.archlinux.org/index.php/Kernel_mode_setting#Early_KMS_start https://wiki.archlinux.org/index.php/Mkinitcpio#Image_creation_and_activation
I decided to start kernel modesetting during the initramfs stage. To do this, you can just add the `i915` or `amdgpu` module to `/etc/mkinitcpio.conf` like this:
```shell
MODULES=(i915)
# or
MODULES=(amdgpu)
```
And then
```shell
mkinitcpio -p linux
```
Finally, reboot.
### Setting up VA-API
Arch Wiki reference: https://wiki.archlinux.org/index.php/Hardware_video_acceleration https://wiki.archlinux.org/index.php/Chromium#Hardware_video_acceleration
## Setting up touchpad gestures
Arch Wiki reference: https://wiki.archlinux.org/index.php/Libinput