Introduction
This tutorial explains how to enable Multi-instance GPU (MIG). It follows the prerequisites in the official MIG documentation.
Prerequisites
- A server with:
- Ubuntu 24.04
- A GPU that supports MIG (see official list)
- Access to the root user or a user with sudo permissions
- An account with NVIDIA for the NVIDIA Display Mode Selector Tool
Step 1 - Install prerequisites
You can use the official configurator to check which commands are required on your system to download the NVIDIA CUDA Toolkit and install the local repository.
Following explains the commands required on Ubuntu 24.04 with x86_64 and deb (local).
- Update the system and install Linux Kernel headers
sudo apt update sudo apt install linux-headers-generic
- Download and set up the APT pinning file and the CUDA repository
wget -O cuda.pin https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-ubuntu2404.pin wget -O cuda.deb https://developer.download.nvidia.com/compute/cuda/13.2.1/local_installers/cuda-repo-ubuntu2404-13-2-local_13.2.1-595.58.03-1_amd64.deb sudo mv cuda.pin /etc/apt/preferences.d/cuda-repository-pin-600 sudo cp /var/cuda-repo-ubuntu2404-13-2-local/cuda-*-keyring.gpg /usr/share/keyrings/ sudo dpkg -i cuda.deb
- Install the NVIDIA CUDA Toolkit and the NVIDIA Driver open kernel module flavor:
Note that the installation can take several minutes.
sudo apt-get update sudo apt-get -y install cuda-toolkit-13-2 sudo apt-get install -y nvidia-open reboot
- After reboot, verify that everything was installed as expected:
You should see the driver version.
nvidia-smi --query-gpu=driver_version --format=csv,noheader
If the command fails, the driver may not be loaded correctly.
Step 2 - Set up the NVIDIA Display Mode Selector Tool
Before you continue, you need to download the Display Mode Selector Tool file from NVIDIA. This requires an account. For more information, see the official NVIDIA documentation.
Once the ZIP file is downloaded (e.g. NVIDIA-Display-Mode-Selector-Tool-1.72.0-July25.zip), copy it to your server and unzip it as explained below.
- If the ZIP file is on your local machine, run this command to copy it to the server, then connect to the server:
You should find the ZIP file in your home directory.
scp NVIDIA-Display-Mode-Selector-Tool-1.72.0-July25.zip user@<ip_address>:~/ ssh user@<ip_address>
- On the server, move the ZIP file into a new directory and unzip it:
In the unzipped directory, you should find a file called
mkdir ~/displaymodeselector && cd ~/displaymodeselector mv ~/NVIDIA-Display-Mode-Selector-Tool-1.72.0-July25.zip ~/displaymodeselector unzip NVIDIA-Display-Mode-Selector-Tool-1.72.0-July25.zipdisplaymodeselector. For convenience, you can move the file directly into~/displaymodeselector.cp "NVIDIA Display Mode Selector Tool - 1.72.0-July25/linux/x64/displaymodeselector" .
- Your directory should look similar to this now:
holu@example:~/displaymodeselector$ ls -al -rw-rw-r-- displaymodeselector drwxrwxr-x __MACOSX drwx------ 'NVIDIA Display Mode Selector Tool - 1.72.0-July25' -rwxrwxr-x NVIDIA-Display-Mode-Selector-Tool-1.72.0-July25.zip
- Make
displaymodeselectorexecutable and check the version to verify it worksIn the output, you should get something likechmod +x displaymodeselector sudo ./displaymodeselector --versionNVIDIA Display Mode Selector Utility (Version #.##.#).
Step 3 - Change the GPU mode
MIG requires the display mode to be set to compute.
- Check current display mode
In the output, it might say
nvidia-smi -i 0 --query-gpu=pci.bus_id,mig.mode.current --format=csv[N/A].
- Set the display mode to "compute" and reboot
Wait 5 minutes before starting the server again.
sudo ./displaymodeselector --gpumode compute --auto sudo poweroff
- After reboot, verify the new display mode:
In the output, it should now say
nvidia-smi -i 0 --query-gpu=pci.bus_id,mig.mode.current --format=csvDisabled.
Step 4 - Enable MIG
Now that the prerequisites are met, you can enable Multi-Instance GPU (MIG).
- Check GPU status before the change:
nvidia-smi
- Enable MIG:
The output should say
nvidia-smi -i 0 -mig 1Enabled MIG Mode.
- Check GPU status, kernel version, and GPU vBIOS version:
In the output, you should see MIG devices. If you have a RTX PRO 6000 Blackwell GPU, compare your vBIOS version with the minimum vBIOS version mentioned in the NVIDIA documentation.
nvidia-smi uname -r nvidia-smi --query-gpu=vbios_version --format=csv
Conclusion
Multi-Instance GPU (MIG) should now be enabled on your system and you can start creating and managing GPU instances as explained in the official documentation: