You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

Ubuntu 22.04双系统下CUDA 12.1安装失败,求解决方案及版本选择建议

Ubuntu 22.04双系统下CUDA 12.1安装失败,求解决方案及版本选择建议

各位大佬好,我在Ubuntu 22.04双系统下安装CUDA 12.1时失败了,现在有点懵,想请教下是不是应该换CUDA 11.x版本试试?另外也求个可行的解决方案,先把我的情况说清楚:

最新安装错误详情

我用runfile安装CUDA 12.1.1时直接失败了,命令和日志如下:

nyck33@nyck33-IdeaPad-Gaming-3-15ACH6:~/Downloads$ sudo sh cuda_12.1.1_530.30.02_linux.run
Installation failed. See log at /var/log/cuda-installer.log for details.

nyck33@nyck33-IdeaPad-Gaming-3-15ACH6:~/Downloads$ cat /var/log/cuda-installer.log
[INFO]: Driver not installed.
[INFO]: Checking compiler version...
[INFO]: gcc location: /usr/bin/gcc
[INFO]: gcc version: gcc version 11.3.0 (Ubuntu 11.3.0-1ubuntu1~22.04)
[INFO]: Initializing menu
[INFO]: nvidia-fs.setKOVersion(2.15.3)
[INFO]: Setup complete
[INFO]: Installing: Driver
[INFO]: Installing: 530.30.02
[INFO]: Executing NVIDIA-Linux-x86_64-530.30.02.run --ui=none --no-questions --accept-license --disable-nouveau --no-cc-version-check --install-libglvnd  2>&1
[INFO]: Finished with code: 256
[ERROR]: Install of driver component failed. Consult the driver log at /var/log/nvidia-installer.log for more details.
[ERROR]: Install of 530.30.02 failed, quitting

当前系统状态

我已经清理了所有NVIDIA相关的包(应该是干净的):

nyck33@nyck33-IdeaPad-Gaming-3-15ACH6:~/Downloads$ dpkg -l | grep nvidia
# 无输出

之前的安装尝试

我试过官网提供的本地.deb包和.run文件两种安装方式,都是按照官网指引操作的。

系统硬件/软件信息

  • 显卡:双显卡,核显是AMD Cezanne,独显是NVIDIA GeForce GTX 1650 Mobile / Max-Q
    nyck33@nyck33-IdeaPad-Gaming-3-15ACH6:~$ lspci | grep -e VGA
    06:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne [Radeon Vega Series / Radeon Vega Mobile Series] (rev c6)
    
    nyck33@nyck33-IdeaPad-Gaming-3-15ACH6:~$ lspci | grep -i nvidia
    01:00.0 3D controller: NVIDIA Corporation TU117M [GeForce GTX 1650 Mobile / Max-Q] (rev a1)
    
  • GCC版本:11.3.0
    nyck33@nyck33-IdeaPad-Gaming-3-15ACH6:~/Downloads$ gcc --version
    gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
    Copyright (C) 2021 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
  • 内核版本:5.19.0-1009-nvidia-lowlatency
    nyck33@nyck33-IdeaPad-Gaming-3-15ACH6:~/Downloads$ uname -r
    5.19.0-1009-nvidia-lowlatency
    
  • 系统推荐的NVIDIA驱动:
    nyck33@nyck33-IdeaPad-Gaming-3-15ACH6:~/Downloads$ sudo ubuntu-drivers devices
    == /sys/devices/pci0000:00/0000:00:01.1/0000:01:00.0 ==
    modalias : pci:v000010DEd00001F9Dsv000017AAsd00003A5Dbc03sc02i00
    vendor   : NVIDIA Corporation
    model    : TU117M [GeForce GTX 1650 Mobile / Max-Q]
    driver   : nvidia-driver-530 - distro non-free
    driver   : nvidia-driver-510 - distro non-free
    driver   : nvidia-driver-470-server - distro non-free
    driver   : nvidia-driver-470 - distro non-free
    driver   : nvidia-driver-525 - distro non-free
    driver   : nvidia-driver-530-open - distro non-free recommended
    driver   : nvidia-driver-515-open - distro non-free
    driver   : nvidia-driver-515-server - distro non-free
    driver   : nvidia-driver-525-server - distro non-free
    driver   : nvidia-driver-515 - distro non-free
    driver   : nvidia-driver-525-open - distro non-free
    driver   : xserver-xorg-video-nouveau - distro free builtin
    
  • CUDA工具未安装:
    nyck33@nyck33-IdeaPad-Gaming-3-15ACH6:~/Downloads$ nvcc --version
    Command 'nvcc' not found, but can be installed with:
    sudo apt install nvidia-cuda-toolkit
    

额外遇到的问题

  1. 之前为了双显示器安装的DisplayLink驱动失效了,现在第二台显示器完全没反应,也没供电
  2. 关于禁用nouveau的教程看懵了:有的说先禁用nouveau再装NVIDIA驱动,有的说先装驱动再黑名单nouveau,到底哪个才是对的?
  3. lspci | grep -e nvidia命令查不到独显,但lspci | grep -i nvidia就能查到,这是为啥?
  4. 试过用GUI方式安装驱动,结果运行nvidia-smi显示No devices were found

我已经看过CUDA预安装指南了,但还是不知道下一步该咋弄,求各位大佬指点!

备注:内容来源于stack exchange,提问作者mLstudent33

火山引擎 最新活动