NVIDIA 驱动程序安装:“检测到安装 NVIDIA 驱动程序的替代方法。”

NVIDIA 驱动程序安装:“检测到安装 NVIDIA 驱动程序的替代方法。”

我正在尝试从 nvidia 提供的“.run”文件为我的 GTX1060 安装最新的 nvidia 驱动程序。

 sudo bash NVIDIA-Linux-x86_64-450.80.02.run 

返回一个错误,告诉我检测到了安装 NVIDIA 驱动程序的替代方法,但我不知道该替代方法是什么。

注意:我不擅长使用 Linux。我运行的是 kubuntu 20.04,是从 kubuntu 18.10 升级而来的。当我运行 18.10 时,我安装了最新的驱动程序和 CUDA。

运行时我没有看到任何安装的 nvidia 包

dpkg -l | grep nvidia

但 modinfo 显示我正在运行 440.100 nvidia 驱动程序。

modinfo nvidia
filename:       /lib/modules/5.4.0-52-generic/updates/dkms/nvidia.ko
alias:          char-major-195-*
version:        440.100
supported:      external
license:        NVIDIA
srcversion:     79812FEC91C545B3F516DF2
alias:          pci:v000010DEd*sv*sd*bc03sc02i00*
alias:          pci:v000010DEd*sv*sd*bc03sc00i00*
depends:        ipmi_msghandler
retpoline:      Y
name:           nvidia
vermagic:       5.4.0-52-generic SMP mod_unload 
sig_id:         PKCS#7
signer:         ryzen Secure Boot Module Signature key
sig_key:        06:8D:79:52:D7:64:F5:CB:29:28:CA:9C:9B:38:4C:E1:23:5E:06:62
sig_hashalgo:   sha512
signature:      B5:01:BC:BD:8B:3C:30:0F:EA:21:0F:CA:9F:78:65:AC:32:D4:2A:55:
                E2:20:45:B5:FB:2D:10:86:FF:2B:56:47:C9:3C:05:B6:5A:73:DF:A6:
                A3:5C:52:9D:05:9F:47:F1:17:13:87:09:06:F7:EE:41:A2:DA:9F:E7:
                F3:78:38:92:70:5A:13:B1:96:44:EC:D0:EC:C0:23:CC:05:94:9C:8D:
                48:01:94:59:36:6E:D5:D0:F4:F0:44:2B:F6:AA:41:9F:52:BC:D9:4F:
                EC:EE:2D:F0:5C:8D:33:79:F8:84:F7:B9:C1:9E:DA:2B:A2:7F:05:80:
                1E:D0:2F:72:26:9D:D4:03:3F:02:0A:EC:08:24:53:83:60:ED:C9:14:
                5A:A0:2E:08:D3:D3:3D:46:B8:EC:27:66:E4:51:74:47:AA:64:68:C7:
                EC:F4:CE:5B:DC:29:A2:5B:56:F1:60:4B:49:04:A7:5C:11:B2:8E:14:
                A5:D4:D5:1B:C0:F5:0E:EF:19:D8:28:28:D3:E4:30:7C:E0:5D:C1:F5:
                05:D8:A9:62:68:FF:C4:B7:BF:1D:16:17:4A:40:93:97:8B:E4:96:AF:
                F6:15:04:D5:54:45:9C:30:29:97:E5:3C:73:AF:B9:F5:B5:01:86:3C:
                E5:EE:4E:09:E7:5D:87:C8:6F:39:49:82:FE:F2:38:B7
parm:           NvSwitchRegDwords:NvSwitch regkey (charp)
parm:           NVreg_Mobile:int
parm:           NVreg_ResmanDebugLevel:int
parm:           NVreg_RmLogonRC:int
parm:           NVreg_ModifyDeviceFiles:int
parm:           NVreg_DeviceFileUID:int
parm:           NVreg_DeviceFileGID:int
parm:           NVreg_DeviceFileMode:int
parm:           NVreg_InitializeSystemMemoryAllocations:int
parm:           NVreg_UsePageAttributeTable:int
parm:           NVreg_MapRegistersEarly:int
parm:           NVreg_RegisterForACPIEvents:int
parm:           NVreg_EnablePCIeGen3:int
parm:           NVreg_EnableMSI:int
parm:           NVreg_TCEBypassMode:int
parm:           NVreg_EnableStreamMemOPs:int
parm:           NVreg_EnableBacklightHandler:int
parm:           NVreg_RestrictProfilingToAdminUsers:int
parm:           NVreg_PreserveVideoMemoryAllocations:int
parm:           NVreg_DynamicPowerManagement:int
parm:           NVreg_EnableUserNUMAManagement:int
parm:           NVreg_MemoryPoolSize:int
parm:           NVreg_KMallocHeapMaxSize:int
parm:           NVreg_VMallocHeapMaxSize:int
parm:           NVreg_IgnoreMMIOCheck:int
parm:           NVreg_NvLinkDisable:int
parm:           NVreg_RegisterPCIDriver:int
parm:           NVreg_RegistryDwords:charp
parm:           NVreg_RegistryDwordsPerDevice:charp
parm:           NVreg_RmMsg:charp
parm:           NVreg_GpuBlacklist:charp
parm:           NVreg_TemporaryFilePath:charp
parm:           NVreg_AssignGpus:charp

这是我运行后收到的确切警告屏幕

 sudo bash NVIDIA-Linux-x86_64-450.80.02.run 

    NVIDIA Accelerated Graphics Driver for Linux-x86_64 (450.80.02)

 
  An alternate method of installing the NVIDIA driver was detected. (This is usually a package provided by your distributor.) A driver installed via that method may integrate better with your system than a driver installed by nvidia-installer.

  Please review the message provided by the maintainer of this alternate installation method and decide how to proceed:

                                                                                                       Continue installation                                                                                            Abort installation    

错误:由于存在或存在备用驱动程序安装,安装被取消。请参阅 /var/log/nvidia-installer.log 了解更多详细信息。

日志文件中确实没有太多内容:

cat /var/log/nvidia-installer.log

nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Sun Nov  1 20:32:12 2020
installer version: 450.80.02

PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin

nvidia-installer command line:
    ./nvidia-installer

Using: nvidia-installer ncurses v6 user interface
-> Detected 16 CPUs online; setting concurrency level to 16.
-> Installing NVIDIA driver version 450.80.02.
-> An alternate method of installing the NVIDIA driver was detected. (This is usually a package provided by your distributor.) A driver installed via that method may integrate better with your system than a driver installed by nvidia-installer.

Please review the message provided by the maintainer of this alternate installation method and decide how to proceed:

The NVIDIA driver provided by Ubuntu can be installed by launching the "Software & Updates" application, and by selecting the NVIDIA driver from the "Additional Drivers" tab.


(Answer: Abort installation)
ERROR: The installation was canceled due to the availability or presence of an alternate driver installation. Please see /var/log/nvidia-installer.log for more details.

答案1

跑步

ubuntu-drivers devices

显示一堆可用的驱动程序:

== /sys/devices/pci0000:00/0000:00:03.1/0000:1c:00.0 ==
modalias : pci:v000010DEd00001C03sv00003842sd00006161bc03sc00i00
vendor   : NVIDIA Corporation
model    : GP106 [GeForce GTX 1060 6GB]
driver   : nvidia-driver-435 - distro non-free
driver   : nvidia-driver-440-server - distro non-free
driver   : nvidia-driver-455 - third-party free recommended
driver   : nvidia-driver-418-server - distro non-free
driver   : nvidia-driver-450-server - distro non-free
driver   : nvidia-driver-390 - distro non-free
driver   : nvidia-driver-450 - distro non-free
driver   : xserver-xorg-video-nouveau - distro free builtin

所以我只需使用 apt install 即可安装我喜欢的那个。

sudo apt install nvidia-driver-450

modinfo nvidia 现在显示最新版本:

modinfo nvidia
filename:       /lib/modules/5.4.0-52-generic/updates/dkms/nvidia.ko
alias:          char-major-195-*
version:        450.80.02
supported:      external
license:        NVIDIA

相关内容