A lightweight utility to enable or disable NVIDIA GPU drivers on demand. Reduce noise, save power, and take full control of your GPU resources.
- Enable or disable NVIDIA GPU drivers on demand
- Reduce noise and power consumption when GPU is idle
- Simple aliases for fast control:
nvidia-onandnvidia-off - Clean and lightweight, pure shell scripts (Bash/Zsh compatible)
- Tested on Ubuntu Desktop and Server editions
- No reboot required to toggle drivers
This tool is for users who need fine-grained control over their NVIDIA GPU drivers, especially to reduce noise and save power when the GPU is idle.
You may benefit from this tool if you:
- Use turbine-cooled NVIDIA GPUs (e.g., RTX 3090 blower style) that run loud even when idle
- Want to reduce fan noise and lower power consumption when not using the GPU
- Run AI workloads or GPU-intensive tasks only at specific times, and want to disable the GPU driver during idle periods
- Prefer to manually control when your GPU drivers are loaded or unloaded, without rebooting
- Have a multi-GPU setup and want to selectively disable specific cards (advanced users)
- ✅ Ubuntu 20.04 / 22.04 / 24.04 LTS Desktop & Server
- ✅ Debian 11 / 12 (partial support, requires manual initramfs updates)
- ❌ Not compatible with Arch, Fedora, or other non-Debian-based distros
(may require manual adaptation of
initramfscommands)
-
Clone the repository:
git clone https://github.com/arniezhu/nvidia-gpu-toggle.git cd nvidia-gpu-toggle -
Run the installer:
chmod +x install.sh && ./install.sh
This will:
- Copy toggle scripts to
~/.local/nvidia-gpu-toggle/ - Create
/etc/modprobe.d/blacklist-nvidia.confto prevent auto-loading drivers - Add aliases (
nvidia-on/nvidia-off) to your shell config (.bashrc/.zshrc)
To completely remove the NVIDIA GPU Toggle Controller from your system, run:
chmod +x uninstall.sh && ./uninstall.shThis will:
- Remove all toggle scripts from
~/.local/nvidia-gpu-toggle/ - Delete all modprobe configs (
blacklist-nvidia.conf/nvidia-block.conf) - Clean aliases (
nvidia-on/nvidia-off) from your shell config (.bashrc/.zshrc)
Run the following commands to control your GPU drivers:
nvidia-on # Enable NVIDIA drivers
nvidia-off # Disable NVIDIA driversnvidia-onloads the NVIDIA driver modules and removes them from the blacklistnvidia-offunloads the NVIDIA driver modules and adds them to the blacklist to prevent auto-loading on boot- If aliases are missing, run:
source ~/.bashrcorsource ~/.zshrc
- Do NOT run
install.shwith sudo or as root! - The script automatically uses
sudofor privileged operations (writing blacklist config, updating initramfs, etc.) - Disabling the NVIDIA driver will prevent the GUI from working if no other GPU is present
- Tested with NVIDIA RTX 3090, 3080, and other cards (blower/turbine coolers benefit the most)
- For best results, run
nvidia-offvia SSH or from a separate TTY (e.g. Ctrl+Alt+F3)