Get Rewarded! We will reward you with up to €50 credit on your account for every tutorial that you write and we publish!

Enabling the MIG mode on a GPU server

profile picture
Author
Hetzner Online
Published
2026-05-28
Time to read
5 minutes reading time

Introduction

This tutorial explains how to enable Multi-instance GPU (MIG). It follows the prerequisites in the official MIG documentation.

Prerequisites

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:
    sudo apt-get update
    sudo apt-get -y install cuda-toolkit-13-2
    sudo apt-get install -y nvidia-open
    reboot
    Note that the installation can take several minutes.

  • After reboot, verify that everything was installed as expected:
    nvidia-smi --query-gpu=driver_version --format=csv,noheader
    You should see the driver version.
    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:
    scp NVIDIA-Display-Mode-Selector-Tool-1.72.0-July25.zip user@<ip_address>:~/
    ssh user@<ip_address>
    You should find the ZIP file in your home directory.

  • On the server, move the ZIP file into a new directory and unzip it:
    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.zip
    In the unzipped directory, you should find a file called displaymodeselector. 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 displaymodeselector executable and check the version to verify it works
    chmod +x displaymodeselector
    sudo ./displaymodeselector --version
    In the output, you should get something like NVIDIA 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
    nvidia-smi -i 0 --query-gpu=pci.bus_id,mig.mode.current --format=csv
    In the output, it might say [N/A].

  • Set the display mode to "compute" and reboot
    sudo ./displaymodeselector --gpumode compute --auto
    sudo poweroff
    Wait 5 minutes before starting the server again.

  • After reboot, verify the new display mode:
    nvidia-smi -i 0 --query-gpu=pci.bus_id,mig.mode.current --format=csv
    In the output, it should now say Disabled.

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:
    nvidia-smi -i 0 -mig 1
    The output should say Enabled MIG Mode.

  • Check GPU status, kernel version, and GPU vBIOS version:
    nvidia-smi
    uname -r
    nvidia-smi --query-gpu=vbios_version --format=csv
    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.

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:

License: MIT
Want to contribute?

Get Rewarded: Get up to €50 in credit! Be a part of the community and contribute. Do it for the money. Do it for the bragging rights. And do it to teach others!

Report Issue

Discover our

GPU Server

Get €20/$20 free credit!

Valid until: 31 December 2026 Valid for: 3 months and only for new customers
Find out more
Want to contribute?

Get Rewarded: Get up to €50 credit on your account for every tutorial you write and we publish!

Find out more