System lag and slow boot times often trace back to unnecessary services, bloated startup applications, and outdated swap settings in Linux Mint. Addressing these bottlenecks with targeted performance tweaks results in noticeably faster system response and a more efficient computing experience.
Optimize System Memory Usage and Swap
Step 1: Activate zswap for compressed swap in RAM. This kernel feature intercepts pages before they hit disk swap, compressing them in memory and reducing disk I/O. Open a terminal and edit the GRUB configuration:
sudo xed /etc/default/grub
Find the line starting with GRUB_CMDLINE_LINUX_DEFAULT=
. For systems with 4GB RAM or less, use:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash zswap.enabled=1 zswap.max_pool_percent=40 zswap.zpool=zsmalloc zswap.compressor=lz4"
For systems with more than 4GB RAM, omit the zswap.max_pool_percent
parameter to use the default 20%:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash zswap.enabled=1 zswap.zpool=zsmalloc zswap.compressor=lz4"
Save and close the file. Then update GRUB and add the required module to initramfs:
sudo update-grub
sudo xed /etc/initramfs-tools/modules
Add zsmalloc
on a new line at the end, save, and close. Update initramfs:
sudo update-initramfs -uk all
Reboot your system. After reboot, verify zswap is active:
sudo dmesg | grep zswap
Step 2: Lower swappiness to reduce disk swap usage. A value of 30 is optimal for desktops. Set it with:
echo "vm.swappiness=30" | sudo tee /etc/sysctl.d/7-swappiness.conf
Reboot and confirm the new setting:
cat /proc/sys/vm/swappiness
Streamline Startup and Background Services
Step 1: Disable unnecessary startup applications. Open the Startup Applications tool from the menu (Menu > Preferences > Startup Applications
for Cinnamon/MATE, or search “Session and Startup” in Xfce).
Uncheck services you do not need. Consider disabling:
- System Reports
- mintwelcome
- Support for NVIDIA Prime (if you lack an NVIDIA GPU)
- Warpinator (if you do not use local file sharing)
Only disable items you are certain are unnecessary. Disabling the wrong service can prevent hardware or software from functioning correctly.
Step 2: Use systemd-analyze blame
to identify slow-booting services. Disable any non-essential services with:
sudo systemctl disable servicename
Replace servicename
with the actual service you wish to disable. Be cautious—disabling critical system services can prevent your system from booting properly.
Turn Off Visual Effects and Use Lightweight Desktop Environments
Step 1: Disable visual effects. For Cinnamon, open Menu > Preferences > Effects
and turn off all effects. In MATE, go to Desktop Settings > Windows
and set Window Manager
to Marco + Compton
for a lightweight experience.
For Xfce, switch to Xfwm4 + Compton
via Settings > Window Manager
. Disabling all compositing maximizes speed but may cause screen tearing.
Step 2: Switch to a lightweight desktop environment if you use older hardware. Install LXDE or Xfce with:
sudo apt-get install lxde
Or for Xfce:
sudo apt-get install xfce4
Log out and select your new environment at the login screen.
Clean Up Unneeded Software and Junk Files
Step 1: Remove unused packages and applications to free up disk space and memory. Open the Software Manager, sort installed applications by size, and uninstall those you do not use. Alternatively, list all installed packages in the terminal:
dpkg --list
Remove a package with:
sudo apt remove packagename
Step 2: Use system cleaning tools like Stacer to automate junk file removal. Install Stacer:
sudo apt install stacer
Launch Stacer and use the System Cleaner module to clear package caches, logs, and temporary files. Review files before deletion to avoid removing anything important.
Optimize SSD Performance
Step 1: Enable periodic TRIM for SSDs to maintain write speed and lifespan. Create an override for the systemd fstrim timer:
sudo mkdir -pv /etc/systemd/system/fstrim.timer.d
sudo nano /etc/systemd/system/fstrim.timer.d/override.conf
Add:
[Timer]
OnCalendar=
OnCalendar=daily
Save and close. This schedules TRIM to run daily, keeping your SSD in optimal condition.
Step 2: Mount SSD partitions with noatime
and commit=600
options to reduce unnecessary writes. Edit /etc/fstab
and update your root partition line:
UUID=xxxx / ext4 errors=remount-ro,noatime,commit=600 0 1
Replace xxxx
with your actual partition UUID. Save and reboot.
Manage Power and Wireless Settings
Step 1: Disable WiFi power management to improve wireless speed and reliability, especially on laptops. Check the current state:
iwconfig
If Power Management is on
, turn it off:
sudo sed -i 's/3/2/' /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
Reboot and confirm with iwconfig
that Power Management is now off
.
Step 2: For Intel wireless chipsets, enable Tx AMPDU to boost data throughput. Check if the iwlwifi
module is loaded:
lsmod | grep iwlwifi
If present, enable AMPDU:
echo "options iwlwifi 11n_disable=8" | sudo tee /etc/modprobe.d/iwlwifi-speed.conf
Reboot to apply the change.
Refine Web Browser and Application Settings
Step 1: Limit browser add-ons and extensions. Too many extensions slow down Firefox and Chrome. Remove those you do not actively use.
Step 2: Reduce Firefox disk writes and memory usage. Open about:config
in Firefox and adjust the following:
- Set
browser.sessionstore.interval
to150000000
to minimize session save frequency. - Set
browser.cache.disk.enable
tofalse
andbrowser.cache.memory.capacity
to524288
(512 MB) or1048576
(1 GB) if you have ample RAM, moving cache to memory.
Restart Firefox for changes to take effect.
Remove Unused System Services and Features
Step 1: Remove the mlocate
package if you do not use system-wide file search. This background process can drain resources on low-powered hardware:
sudo apt-get purge mlocate locate
Step 2: Turn off the firewall log if you never check it, to save disk space and reduce background activity:
sudo ufw logging off
To re-enable logging if needed:
sudo ufw logging low
Adjust System for Heavy RAM Systems
Step 1: If your system has 16GB RAM or more, mount /tmp
as a tmpfs (RAM disk) to speed up temporary file access and reduce disk writes. Copy the template for systemd:
sudo cp -v /usr/share/systemd/tmp.mount /etc/systemd/system/
sudo systemctl enable tmp.mount
Reboot, then check status with:
systemctl status tmp.mount
To limit the maximum RAM usage for /tmp
, edit /etc/systemd/system/tmp.mount
and set size=2G
or another value.
Set CPU to Performance Mode (When Needed)
Step 1: For tasks requiring maximum CPU speed, such as gaming or compiling, install and use cpupower-gui
:
sudo apt-get install cpupower-gui
Launch the application and set the scaling governor to performance
. Be aware this increases power consumption and heat output, so revert to powersave
or schedutil
for everyday use.
Clean Up and Maintain Your System
Step 1: Regularly remove unused packages, clean up system logs, and empty trash. Automate this with sudo apt autoremove
and sudo apt clean
.
Step 2: Use Timeshift or a similar backup tool to create system snapshots before making major changes. This allows easy rollback if a tweak causes instability.
Applying these targeted tweaks and maintenance steps will accelerate Linux Mint, reduce system lag, and provide a more responsive desktop on both modern and older hardware. Regularly revisiting these optimizations keeps your system running at its best.
Member discussion