CentOS Installing NVIDIA Drivers and NVIDIA CUDA Toolkit - Disabling Nouveau Driver

Before installing the NVIDIA driver and NVIDIA CUDA toolkit, you need to disable the Nouveau driver.
If you don't have the file on your CentOS system /etc/modprobe.d/blacklist.conf, you can manually create and disable the Nouveau driver by following these steps:

  1. Open a terminal or connect to the CentOS server via SSH. Check whether Nouveau is turned on:

    # lsmod | grep nouveau
     nouveau              1940454  1
     mxm_wmi                13021  1 nouveau
     video                  24538  1 nouveau
     wmi                    21636  2 mxm_wmi,nouveau
     i2c_algo_bit           13413  2 radeon,nouveau
     drm_kms_helper        186531  2 radeon,nouveau
     ttm                   100769  2 radeon,nouveau
     drm                   468454  7 ttm,drm_kms_helper,radeon,nouveau
    
  2. Create a new Nouveau disabled profile:
    Run the following command to create a new profile:

    sudo vi /etc/modprobe.d/nouveau-blacklist.conf
    
  3. In the editor, add the following to disable the Nouveau driver:

    blacklist nouveau
    options nouveau modeset=0
    
  4. Save and close the file.
    In the vi editor, press Esc, then Enter :wq, then Enter to save and close the file.

  5. Generate initramfs:
    Run the following command to regenerate the initramfs image:

    sudo dracut --force
    
  6. Restart the system:
    Run the following command to restart the CentOS server:

    sudo reboot
    

After the system restarts, the Nouveau driver will be disabled. You can lsmod | grep nouveauverify whether Nouveau has been successfully disabled by running the command, if no output is displayed, it means Nouveau has been disabled.

Please note that the file name created here nouveau-blacklist.confis not /etc/modprobe.d/blacklist.conf. The file may have a different name on some CentOS versions, but the key is to make sure you /etc/modprobe.d/create a .conffile ending in the directory and add something to disable the Nouveau driver.

Hope this helps you disable Nouveau driver!

Guess you like

Origin blog.csdn.net/holyvslin/article/details/132142777