在同一台机器上安装(并加载)amdgpu 和 nvidia 驱动程序

在同一台机器上安装(并加载)amdgpu 和 nvidia 驱动程序

我有一块主板,最多可安装 19 个显卡,目前我安装了 4 个 nvidia 和 2 个 amd 卡。我可以让 nvidia 卡正常运行,但无法加载 amdgpu 驱动程序,甚至无法判断它们是否安装正确。我正在运行 Ubuntu 20.04.2、5.4.0-42-generic 内核。按照我在另一个线程上找到的说明,我卸载了 nvidia 驱动程序,获取了 Radeon 20.45 安装程序,并使用以下命令运行它:

./amdgpu-install --opencl=legacy,pal --headless --no-dkms

然后我重新启动,再次安装了 nvidia 驱动程序,运行了 xorg 生成命令:

sudo nvidia-xconfig -a --cool-bits=28 --allow-empty-initial-configuration

然后再次重新启动。主板有一个实用程序,可在启动时显示哪些 pcie 插槽正在使用中,并且它们都显示绿色(无错误)。当我运行以下命令时,我可以看到所有卡lspci

01:00.0 VGA compatible controller: NVIDIA Corporation GK208B [GeForce GT 710] (rev a1)
08:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] (rev cf)
0a:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] (rev cf)
0c:00.0 VGA compatible controller: NVIDIA Corporation TU116 [GeForce GTX 1660 SUPER] (rev a1)
0d:00.0 VGA compatible controller: NVIDIA Corporation TU116 [GeForce GTX 1660] (rev a1)
0e:00.0 VGA compatible controller: NVIDIA Corporation TU116 [GeForce GTX 1660 SUPER] (rev a1)
0f:00.0 VGA compatible controller: NVIDIA Corporation TU116 [GeForce GTX 1660 SUPER] (rev a1)

我注意到 nvidia-xconfig 没有将 amd 卡添加到 xorg.conf,因此我自己手动添加了它们:

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 460.73.01

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    Screen      1  "Screen1" RightOf "Screen0"
    Screen      2  "Screen2" RightOf "Screen1"
    Screen      3  "Screen3" RightOf "Screen2"
    Screen      4  "Screen4" RightOf "Screen3"
    Screen      5  "Screen5" RightOf "Screen4"
    Screen      6  "Screen6" RightOf "Screen5"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor2"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor3"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor4"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor5"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor6"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GT 710"
    BusID          "PCI:1:0:0"
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 1660 SUPER"
    BusID          "PCI:12:0:0"
EndSection

Section "Device"
    Identifier     "Device2"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 1660"
    BusID          "PCI:13:0:0"
EndSection

Section "Device"
    Identifier     "Device3"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 1660 SUPER"
    BusID          "PCI:14:0:0"
EndSection

Section "Device"
    Identifier     "Device4"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 1660 SUPER"
    BusID          "PCI:15:0:0"
EndSection

Section "Device"
    Identifier     "Device5"
    Driver         "amdgpu"
    VendorName     "Advanced Micro Devices, Inc. [AMD/ATI]"
    BoardName      "RX480 4GB"
    BusID          "PCI:8:0:0"
EndSection

Section "Device"
    Identifier     "Device6"
    Driver         "amdgpu"
    VendorName     "Advanced Micro Devices, Inc. [AMD/ATI]"
    BoardName      "RX480 4GB"
    BusID          "PCI:10:0:0"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
#    Option         "AllowEmptyInitialConfiguration" "True"
    Option         "Coolbits" "28"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
#    Option         "AllowEmptyInitialConfiguration" "True"
    Option         "Coolbits" "28"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen2"
    Device         "Device2"
    Monitor        "Monitor2"
    DefaultDepth    24
#    Option         "AllowEmptyInitialConfiguration" "True"
    Option         "Coolbits" "28"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen3"
    Device         "Device3"
    Monitor        "Monitor3"
    DefaultDepth    24
#    Option         "AllowEmptyInitialConfiguration" "True"
    Option         "Coolbits" "28"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen4"
    Device         "Device4"
    Monitor        "Monitor4"
    DefaultDepth    24
#    Option         "AllowEmptyInitialConfiguration" "True"
    Option         "Coolbits" "28"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen5"
    Device         "Device5"
    Monitor        "Monitor5"
EndSection

Section "Screen"
    Identifier     "Screen6"
    Device         "Device6"
    Monitor        "Monitor6"
EndSection

但当我检查时,sudo lshw -C video它仍然说这些展示品是“无人认领的”:

  *-display UNCLAIMED
       description: VGA compatible controller
       product: Ellesmere [Radeon RX 470/480/570/570X/580/580X/590]
       vendor: Advanced Micro Devices, Inc. [AMD/ATI]
       physical id: 0
       bus info: pci@0000:08:00.0
       version: cf
       width: 64 bits
       clock: 33MHz
       capabilities: pm pciexpress msi vga_controller bus_master cap_list
       configuration: latency=0
       resources: iomemory:2f0-2ef iomemory:2f0-2ef memory:2f60000000-2f6fffffff memory:2f70000000-2f701fffff ioport:9000(size=256) memory:f7300000-f733ffff memory:f7340000-f735ffff
  *-display UNCLAIMED
       description: VGA compatible controller
       product: Ellesmere [Radeon RX 470/480/570/570X/580/580X/590]
       vendor: Advanced Micro Devices, Inc. [AMD/ATI]
       physical id: 0
       bus info: pci@0000:0a:00.0
       version: cf
       width: 64 bits
       clock: 33MHz
       capabilities: pm pciexpress msi vga_controller bus_master cap_list
       configuration: latency=0
       resources: iomemory:2f0-2ef iomemory:2f0-2ef memory:2f40000000-2f4fffffff memory:2f50000000-2f501fffff ioport:8000(size=256) memory:f7200000-f723ffff memory:f7240000-f725ffff

我检查了一下,在 modprobe.d 中没有看到任何驱动程序黑名单,并且 nomodeset 在我的启动选项中没有打开。不知道还能尝试什么。

相关内容