If your Ubuntu 22.04 system has become sluggish, takes ages to open apps, or freezes completely, this guide will help you diagnose and fix the most common causes. You’ll work through memory, disk, graphics, and system log checks, applying safe fixes that don’t require reinstalling. No special tools are needed—just a terminal and a few minutes.
What You’ll Need
- A user account with sudo privileges
- Access to a terminal (Ctrl+Alt+T)
- At least 10 minutes of uninterrupted time
- An internet connection for installing any missing packages
Step-by-Step
- Check system memory (RAM) usage. Run
free -hin the terminal. If theavailablecolumn is very low (under 500 MB) and theswapusage is high, your system is running out of memory. Close heavy applications or consider adding more RAM if this is a constant issue. - Inspect disk space and I/O. Run
df -hto see if the root partition (/) is near full (above 90%). A full disk causes severe slowdowns and freezes. If it’s full, remove old kernels (sudo apt autoremove), clear package cache (sudo apt clean), and move large files to external storage. - Check for high CPU usage. Run
toporhtop(install withsudo apt install htopif needed). Look for processes eating 100% CPU. Common culprits are background updates, GNOME Shell extensions, or a runaway browser. Kill the process withkill [PID]or restart the app. - Review system logs for errors. Run
journalctl -p 3 -xbto see critical errors since boot. Look for lines mentioningGPU,drm,thermal, oroom(out of memory). These can point to hardware or driver issues. - Update your system and drivers. Run
sudo apt update && sudo apt upgradeto install the latest kernel and driver fixes. For NVIDIA GPUs, check if the proprietary driver is installed viaubuntu-drivers devicesand install the recommended one withsudo ubuntu-drivers autoinstall. Reboot after. - Disable unnecessary startup applications. Open “Startup Applications” from the app menu and uncheck anything you don’t need at boot. Fewer background processes means less strain on your RAM and CPU.
- Adjust GNOME animations (if using default desktop). Run
gsettings set org.gnome.desktop.interface enable-animations falseto reduce GPU load. This can make the interface feel snappier on older hardware. - Check for overheating. Install
lm-sensors(sudo apt install lm-sensors) and runsensors. If CPU temperature is above 90°C, your system may be throttling. Clean dust from fans, ensure proper ventilation, and consider replacing thermal paste. - Test your disk for errors. Run
sudo badblocks -sv /dev/sda(replace/dev/sdawith your disk name fromlsblk). This can take hours, but it will reveal failing hardware. Also runsudo fsck -f /dev/sda1(your root partition) from a live USB if you suspect filesystem corruption. - Try a different desktop environment (optional). If GNOME is too heavy, install Xfce (
sudo apt install xubuntu-desktop) or LXQt. Log out and select the new session from the gear icon. This can drastically improve performance on low-spec machines.
Common Mistakes
- Killing system processes like
systemdorXorg—this will crash your session. Only kill processes you recognize as user apps. - Running
fsckon a mounted disk—this can cause data loss. Always unmount first or use a live USB. - Ignoring thermal throttling—overheating is a common cause of freezes, and simply adding more RAM won’t help.
- Disabling swap entirely—while it may seem good, it can cause out-of-memory crashes. Instead, lower swappiness (
sudo sysctl vm.swappiness=10).
Tips
- Use
systemd-analyze blameto see which services slow down boot. - Consider using a lightweight web browser like Falkon or Midori if Firefox/Chrome eat too much RAM.
- Regularly clean temporary files with
sudo apt cleanandsudo journalctl --vacuum-size=50M. - If you have an SSD, enable TRIM with
sudo systemctl enable fstrim.timerto maintain performance. - Create a swap file if you only have a swap partition:
sudo fallocate -l 2G /swapfile, then configure it.
Troubleshooting
If the system freezes completely and you can’t run commands, try the following:
- Use Magic SysRq keys: Press
Alt+SysRqfollowed byR E I S U B(with a few seconds between each) to safely reboot. This is a kernel-level emergency restart. - Boot into recovery mode: At the GRUB menu, select “Advanced options for Ubuntu” and choose the recovery kernel. Then select “root” to get a shell and run
fsckor check logs. - If the freeze happens only in GNOME: Try switching to a virtual terminal with
Ctrl+Alt+F3(or F2-F6). If that works, the issue is with the display server—restart it withsudo systemctl restart gdm. - If the problem persists after all steps: Test your RAM with
memtest86+(install withsudo apt install memtest86+and run at boot). Faulty RAM is a silent cause of random freezes.
Frequently Asked Questions
Why does my Ubuntu 22.04 freeze randomly?
Random freezes are often caused by overheating, failing RAM, or incompatible graphics drivers. Check your system logs with journalctl -p 3 -xb after a freeze to see the last messages before the crash.
Can I fix slowness without reinstalling?
Yes, most performance issues are fixable by cleaning up disk space, disabling startup apps, and updating drivers. Reinstalling is a last resort.
Is it safe to kill a process that uses high CPU?
Yes, but only if it’s a user application. Avoid killing system processes. Use htop to see the full command line and confirm it’s not a system service.
How do I check if my disk is failing?
Use sudo smartctl -a /dev/sda (install smartmontools) to see S.M.A.R.T. data. Look for Reallocated_Sector_Ct or Pending_Sector values above 0—these indicate failing hardware.
Will switching to a lighter desktop really help?
Yes, GNOME is resource-heavy. Xfce or LXQt use significantly less RAM and CPU, which can make a noticeable difference on older computers.
What is the best way to prevent future freezes?
Keep your system updated, monitor temperatures, maintain at least 10% free disk space, and avoid running too many heavy apps at once. Also consider upgrading RAM if you often run out.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- How to Move Data to a New Samsung Galaxy Phone
- Pixel C vs Surface Pro: Key Differences
- iPhone X vs iPhone: Key Differences Explained
- Chromebook Won’t Charge: How to Fix
- How to Delete Photos on Google Drive
- Firefox Bookmark Management Tips & Tricks