Hacking the Web


Project maintained by Hosted on GitHub Pages — Theme by mattgraham

Optimizing Kubuntu 24.04 LTS desktop

Some useful links for optimizing system performance
Arch
KDE
Ubuntu
Ubuntu Desktop optimization

My Setup - Dell Optiplex 7050 Intel Core 5-Skylake CPU OC’d to 4Ghz, Intel GPU, 16GB RAM, nvme SSD - 500GB, 4TB HDD, 10Mib Internet

Some settings are specific for my system setup, use at own risk!

system


Pre Install Setup

Create partitions for each drive before the install process

Install as usual after creating partitions.
Reboot

Before making changes to your system run this, then again when finished
Check system log for errors or issues
free -m
sudo hdparm -t --direct /dev/nvme0n1p2
systemd-analyze critical-chain
systemd-analyze --user blame

fstab

The fstab file configures the mounted drives/partitions Obtain UUID for each drive/partiton on system.

lsblk -f
/etc/fstab
Root   UUID="" /               ext4    defaults,noatime,auto_da_alloc,inode_readahead_blks=64,errors=remount-ro 0  1
Data   UUID="" /home/Data      ext4    defaults,noatime,errors=remount-ro            0  2

EXT4 options

Enable fast_commit journal option speed up FS writes

sudo tune2fs -O fast_commit /dev/nvme0n1p2
sudo tune2fs -O fast_commit /dev/sdc1

Verify

sudo tune2fs -l /dev/nvme0n1p2 | grep features

Set Disk Label

sudo e2label /dev/nvme0n1p2 "SYSTEM"

Grub options

/etc/default/grub

mitigations=off loglevel=3

CPUFreqUtils Change CPU Governor and Frequencies

/etc/init.d/cpufrequtils

ENABLE="true"
GOVERNOR="performance"
MAX_SPEED="4000"
MIN_SPEED="1600"

Modprobe

/etc/modprobe.d
Audio /etc/modprobe.d/audio.conf

options snd_hda_intel power_save=0 power_save_controller=N

GPU /etc/modprobe.d/intel.conf

options i915 modeset=1 mitigations=off enable_fbc=0 enable_psr=0 enable_guc=-1

Disable evbug logging

Disable some uneeded system services

Disable ModemManager If you do not have a mobile broadband interface.

sudo systemctl disable ModemManager.service
sudo systemctl mask ModemManager.service

fwupd is a daemon allowing you to update some devices’ firmware, including UEFI for several machines.
Remove fwupd from boot

sudo systemctl disable fwupd.service
sudo systemctl mask fwupd.service

GPU-Manager is software that creates a xorg.conf for you. So running this in every boot is just overkill. You only need to run this if you change your GPU.

sudo systemctl disable gpu-manager.service
sudo systemctl mask gpu-manager.service

Apt-daily-upgrade solves long boot up time with apt-daily-upgrade.

sudo systemctl disable apt-daily.service
sudo systemctl disable apt-daily.timer
sudo systemctl mask apt-daily.timer
sudo systemctl disable apt-daily-upgrade.timer
sudo systemctl disable apt-daily-upgrade.service
sudo systemctl mask apt-daily-upgrade.service


Logical Volume Manager (LVM) is a device mapper framework that provides logical volume management.
Disable LVM

sudo systemctl disable lvm2-monitor.service
sudo systemctl mask lvm2-monitor.service


Disable Wait for Network online service, slows down boot

sudo systemctl disable NetworkManager-wait-online.service
sudo systemctl mask NetworkManager-wait-online.service

journald logging

Set fsck check interval

To automatically switch audio device to newly connected devices, create this file:

Optimize network MTU

The ping command will let you know if the packet was sent as more than one fragment with multiple header data attached.

ping -s 1472 -c1 espn.com

Retest changing packet size until 0% packet loss

Sysctl Settings

Arch
Github
Ubuntu
Some useful sysctl settings place in /etc/sysctl.conf

kernel.sysrq=0
fs.file-max = 209708
net.ipv4.tcp_fastopen=3
net.core.default_qdisc=cake
net.ipv4.tcp_congestion_control=bbr
net.ipv4.tcp_window_scaling = 1
vm.swappiness = 30
vm.dirty_ratio = 30
vm.dirty_background_ratio = 5
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_syn_retries = 2
net.ipv4.tcp_synack_retries = 2
net.ipv4.tcp_max_syn_backlog = 4096
net.ipv4.ip_forward = 0
net.ipv4.route.flush = 1
net.ipv6.route.flush = 1

Remove snapd

snap list
sudo systemctl disable snapd.service
sudo systemctl disable snapd.socket
sudo systemctl disable snapd.seeded.service
sudo snap remove firefox
sudo snap remove snap-store
sudo snap remove gtk-common-themes
sudo snap remove gnome-3-38-2004
sudo snap remove core18
sudo snap remove snapd-desktop-integration
sudo rm -rf /var/cache/snapd/
sudo apt autoremove --purge snapd
rm -rf ~/snap

KDE Plasma Fixes

Install Firefox PPA

systemd-boot

xanmod kernel

Customizing KDE Plasma Desktop