A smart Ubuntu script to help keep your system cool and optimize memory usage.
It monitors CPU temperature, downclocks CPU and limits NVIDIA GPU if needed, drops caches, and resets zram.
This might lower your performance… The script uses CPU downclocking, GPU power limiting, and cache dropping. These actions help cooling but may temporarily reduce system performance, especially during tasks like gaming, rendering, or compiling.
- Monitor CPU temperature and usage
- Downclock CPU & limit NVIDIA GPU when hot
- Clear memory caches (pagecache, dentries, inodes)
- Reset zram swap if available
- Detect heavy applications (Chrome, VSCode, Docker Desktop)
- Ubuntu (tested on Ubuntu 24.04.3 LTS)
lm-sensorsfor CPU temperature readingscpupowerfor CPU frequency management- NVIDIA drivers for GPU power control (optional)
Clone the repository:
git clone https://github.com/tharinfernando/ubuntu-cpu-gpu-ram-cooler.git
cd ubuntu-cpu-gpu-ram-cooler
chmod +x ubuntu-cpu-gpu-ram-cooler.shsudo ./ubuntu-cpu-gpu-ram-cooler.shThe script will automatically:
- Check CPU temperature and usage
- Downclock CPU & limit GPU if too hot
- Drop caches and reset zram
- Warn if heavy apps are running
Requires sudo to adjust CPU/GPU settings and clear caches
Adjust CPU downclock or GPU power limit directly in the script if needed