System lag and slow boot times in Linux Mint often originate from unnecessary services, bloated startup applications, and outdated swap settings. Addressing these issues with targeted performance tweaks can lead to a significantly 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 captures pages before they hit disk swap, compressing them in memory to reduce disk I/O. Open a terminal and edit the GRUB configuration:
sudo xed /etc/default/grubLocate the line starting with GRUB_CMDLINE_LINUX_DEFAULT=. For systems with 4GB of 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/modulesAppend zsmalloc on a new line at the end, save, and close. Update initramfs:
sudo update-initramfs -uk allReboot your system. After rebooting, check if zswap is active:
sudo dmesg | grep zswapStep 2: Lower Swappiness to Reduce Disk Swap Usage.
Setting a value of 30 is optimal for desktops. Set it with:
echo "vm.swappiness=30" | sudo tee /etc/sysctl.d/7-swappiness.confReboot and confirm the new setting:
cat /proc/sys/vm/swappinessStreamline Startup and Background Services
Step 1: Disable Unnecessary Startup Applications.
Access the Startup Applications tool from the menu (Menu > Preferences > Startup Applications for Cinnamon/MATE, or search for “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 share files locally)
Only disable items you are certain are unnecessary, as disabling the wrong service can lead to issues.
Step 2: Use systemd-analyze blame to Identify Slow-Booting Services.
Disable any non-essential services with:
sudo systemctl disable servicenameReplace servicename with the actual service you wish to disable. Be careful; disabling critical services can prevent your system from booting properly.
Turn Off Visual Effects and Use Lightweight Desktop Environments
Step 1: Disable Visual Effects.
For Cinnamon, go to Menu > Preferences > Effects and disable all effects. In MATE, adjust settings in Desktop Settings > Windows, setting the Window Manager to Marco + Compton for a lightweight experience. For Xfce, switch to Xfwm4 + Compton through Settings > Window Manager.
Step 2: Switch to a Lightweight Desktop Environment.
If you have older hardware, consider installing LXDE or Xfce:
sudo apt-get install lxdeOr for Xfce:
sudo apt-get install xfce4Log out and select your new environment at the login screen.
Clean Up Unneeded Software and Junk Files
Step 1: Remove Unused Packages and Applications.
Free up disk space and memory by uninstalling unnecessary applications via the Software Manager or through the terminal:
dpkg --listRemove a package with:
sudo apt remove packagenameStep 2: Use System Cleaning Tools like Stacer.
Install Stacer:
sudo apt install stacerLaunch Stacer and utilize the System Cleaner module to clear package caches, logs, and temporary files. Always review files before deletion to prevent losing important data.
Optimize SSD Performance
Step 1: Enable Periodic TRIM for SSDs.
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.confAdd:
[Timer]
2OnCalendar=dailySave and close. This schedules TRIM to run daily.
Step 2: Mount SSD Partitions with noatime and commit=600 Options.
Edit /etc/fstab:
UUID=xxxx / ext4 errors=remount-ro,noatime,commit=600 0 1Replace xxxx with your actual UUID. Save and reboot.
Manage Power and Wireless Settings
Step 1: Disable WiFi Power Management.
Improving wireless speed can be essential, especially for laptops. Check the current state:
iwconfigTurn it off if it’s on:
sudo sed -i 's/3/2/' /etc/NetworkManager/conf.d/default-wifi-powersave-on.confReboot and confirm WiFi Power Management is off.
Step 2: Enable Tx AMPDU for Intel Wireless Chipsets.
If the iwlwifi module is loaded, enable AMPDU:
echo "options iwlwifi 11n_disable=8" | sudo tee /etc/modprobe.d/iwlwifi-speed.confReboot to apply the change.
Refine Web Browser and Application Settings
Step 1: Limit Browser Add-ons and Extensions.
Too many extensions can slow down browsers like Firefox and Chrome. Remove the ones you don’t actively use.
Step 2: Reduce Firefox Disk Writes and Memory Usage.
Open about:config in Firefox and adjust:
- Set
browser.sessionstore.intervalto150000000. - Set
browser.cache.disk.enabletofalseandbrowser.cache.memory.capacityto524288(512 MB) or1048576(1 GB) if you have sufficient RAM.
Restart Firefox for the changes to take effect.
Remove Unused System Services and Features
Step 1: Remove mlocate Package.
If you don’t use system-wide file search, this background process can drain resources:
sudo apt-get purge mlocate locateStep 2: Turn Off the Firewall Log.
If you never check it, disable it to save disk space:
sudo ufw logging offTo re-enable:
sudo ufw logging lowAdjust System for Heavy RAM Systems
Step 1: Mount /tmp as a tmpfs (RAM Disk).
For systems with 16GB RAM or more, this increases access speed and reduces disk writes:
sudo cp -v /usr/share/systemd/tmp.mount /etc/systemd/system/
sudo systemctl enable tmp.mountReboot and check status with:
systemctl status tmp.mountLimit the maximum RAM usage for /tmp by editing /etc/systemd/system/tmp.mount to set size=2G or another value.
Set CPU to Performance Mode (When Needed)
Step 1: Install cpupower-gui.
For tasks needing maximum CPU speed, install it:
sudo apt-get install cpupower-guiLaunch and set the scaling governor to performance. Note that this increases power consumption and heat output.
Clean Up and Maintain Your System
Step 1: Regular Cleaning and Maintenance.
Regularly remove unused packages, clean logs, and empty the trash using:
sudo apt autoremove
sudo apt cleanStep 2: Use Timeshift or Similar Backup Tools.
Create system snapshots before major changes to allow easy rollback if necessary.
Applying these targeted tweaks and maintenance steps will enhance Linux Mint’s performance, reduce system lag, and offer a more enjoyable desktop experience on both modern and older hardware. Regular optimization ensures your system runs at its best.
And if you'd like to go a step further in supporting us, you can treat us to a virtual coffee ☕️. Thank you for your support ❤️!
We do not support or promote any form of piracy, copyright infringement, or illegal use of software, video content, or digital resources.
Any mention of third-party sites, tools, or platforms is purely for informational purposes. It is the responsibility of each reader to comply with the laws in their country, as well as the terms of use of the services mentioned.
We strongly encourage the use of legal, open-source, or official solutions in a responsible manner.


Comments