(EE) 找不到屏幕(EE) Whyle 尝试在使用 bhyve 模拟的 Debian 11 上启用 nvidia 驱动程序

(EE) 找不到屏幕(EE) Whyle 尝试在使用 bhyve 模拟的 Debian 11 上启用 nvidia 驱动程序

我正在尝试在 Debian 11 中启用 NVIDIA 驱动程序,我已在 FreeBSD 13r 上使用 bhyve 模拟该驱动程序。这是我使用 FreeBSD 中的 ssh 登录 Debian 时遇到的错误:

root@marietto:~# startx


X.Org X Server 1.20.11
X Protocol Version 11, Revision 0
Build Operating System: linux Debian
Current Operating System: Linux marietto 5.10.0-8-amd64 #1 SMP Debian 5.10.46-4 (2021-08-03) x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.10.0-8-amd64 root=UUID=c25a24a3-12f2-4653-a275-9f43924d6c3b ro quiet
Build Date: 13 April 2021  04:07:31PM
xorg-server 2:1.20.11-1 (https://www.debian.org/support) 
Current version of pixman: 0.40.0
    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sun Sep  5 15:48:08 2021
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(EE) 
Fatal server error:
(EE) no screens found(EE) 
(EE) 
Please consult the The X.Org Foundation support 
     at http://wiki.x.org
 for help. 
(EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
(EE) 
(EE) Server terminated with error (1). Closing log file.
^Cxinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: unexpected signal 2

这就是 lspci 所说的:

root@marietto:~# lspci

00:00.0 Host bridge: Network Appliance Corporation Device 1275
00:01.0 SCSI storage controller: Red Hat, Inc. Virtio block device
00:02.0 VGA compatible controller: NVIDIA Corporation TU102 [GeForce RTX 2080 Ti] (rev a1)
00:02.1 Audio device: NVIDIA Corporation TU102 High Definition Audio Controller (rev a1)
00:02.2 USB controller: NVIDIA Corporation TU102 USB 3.1 Host Controller (rev a1)
00:02.3 Serial bus controller [0c80]: NVIDIA Corporation TU102 USB Type-C UCSI Controller (rev a1)
00:06.0 Ethernet controller: Red Hat, Inc. Virtio network device
00:1e.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller
00:1f.0 ISA bridge: Intel Corporation Z390 Chipset LPC/eSPI Controller (rev 10)

如您所见,nvidia 显卡已从 FreeBSD 正确传递到 Debian 11。

我想要评估的是问题的原因。如果属于 bhyve 或 debian 11/Xorg/ 或图形驱动程序的错误配置。无论如何,debian 11 能够正确检测显卡:

root@marietto:~# nvidia-detect

Detected NVIDIA GPUs:
00:02.0 VGA compatible controller [0300]: NVIDIA Corporation TU102 [GeForce RTX 2080 Ti] [10de:1e04] (rev a1)

Checking card:  NVIDIA Corporation TU102 [GeForce RTX 2080 Ti] (rev a1)
Your card is supported by the default drivers.
Your card is also supported by the Tesla 460 drivers series.
Your card is also supported by the Tesla 450 drivers series.
Your card is also supported by the Tesla 418 drivers series.
It is recommended to install the nvidia-driver package.

但 :

root@marietto:~# nvidia-smi
No devices were found

我做了什么才能得到这个输出?我已经遵循了这个指南:

https://wiki.debian.org/NvidiaGraphicsDrivers#Tesla_Drivers

所以,我做了以下事情:

root@marietto:~# install nvidia-driver
root@marietto:~# nvidia-xconfig

它创建了一个像这样的 xorg.conf 文件:

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


Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    Screen      1  "Screen0 (1)" RightOf "Screen0"
    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 "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:0:2:0"
    Screen          0
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen0 (1)"
    Device         "Device0 (1)"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

还有什么 ?就问吧。我真的很想在安装了 bhyve 的 debian 11 操作系统中使用我的 nvidia 显卡。考虑到如果我使用 nouveau 驱动程序它会起作用。是的,如果我使用 nouveau 驱动程序,连接到显卡 HDMI 端口的显示器会打开,但如果我使用 nvidia 驱动程序则不会。 (我什至尝试过使用专有的 nvidia 驱动程序)

消息:

[   14.697445] NVRM: GPU 0000:00:02.0: RmInitAdapter failed! (0x24:0x65:1248)

[    1.948773] nvidia: loading out-of-tree module taints kernel.
[    1.948781] nvidia: module license 'NVIDIA' taints kernel.
[    1.956323] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[    1.967795] nvidia-nvlink: Nvlink Core is being initialized, major device number 248
[    1.968329] nvidia 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=io+mem
[    2.112279] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  460.91.03  Fri Jul  2 05:43:38 UTC 2021
[    2.123865] audit: type=1400 audit(1630855752.267:7): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe" pid=383 comm="apparmor_parser"
[    2.123868] audit: type=1400 audit(1630855752.267:8): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe//kmod" pid=383 comm="apparmor_parser"
[    2.204737] [drm] [nvidia-drm] [GPU ID 0x00000002] Loading driver
[    2.204739] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:00:02.0 on minor 0

[    0.847082] pci 0000:00:02.0: vgaarb: setting as boot VGA device
[    0.847082] pci 0000:00:02.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none
[    1.968329] nvidia 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=io+mem

相关内容