Ubuntu 18.04.3 中未检测到 Nvidia GTX 1650

Ubuntu 18.04.3 中未检测到 Nvidia GTX 1650

我最近买了这台机器:华硕 TUF FX505DT - AMD Ryzen 5 3550H 搭配 GTX 1650 4GB。它预装了 Windows 10。GTX 1650 显卡在 Windows 中运行正常。在我清理 SSD、在 BIOS 中禁用安全启动并安装 Ubuntu 18.04.3 后,显卡无法识别。

我添加了graphics-drivers/ppa,清除了所有现有的 NVIDIA 软件包,安装了nvidia-driver-430(也尝试了 435),但仍然不起作用。我还ppa:xorg-edgers/ppa使用以下命令进行了安装:

sudo add-apt-repository ppa:xorg-edgers/ppa

这是安装驱动程序之前附加驱动程序显示的内容:

安装前需附加驱动程序

安装驱动程序后,附加驱动程序显示的内容如下:

安装后附加驱动程序

这是关于有关机器的信息:

关于机器

产品型号显示为未知在附加驱动程序设置中。产品型号只是 NVIDIA lshw -C display

shivakumaar@techpack-tuf:~$ sudo lshw -C display
[sudo] password for shivakumaar: 
  *-display                 
       description: VGA compatible controller
       product: NVIDIA Corporation
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: irq:67 memory:f6000000-f6ffffff memory:c0000000-cfffffff memory:d0000000-d1ffffff ioport:f000(size=128) memory:f7000000-f707ffff
  *-display
       description: VGA compatible controller
       product: Picasso
       vendor: Advanced Micro Devices, Inc. [AMD/ATI]
       physical id: 0
       bus info: pci@0000:05:00.0
       version: c2
       width: 64 bits
       clock: 33MHz
       capabilities: pm pciexpress msi msix vga_controller bus_master cap_list
       configuration: driver=amdgpu latency=0
       resources: irq:65 memory:e0000000-efffffff memory:f0000000-f01fffff ioport:c000(size=256) memory:f7500000-f757ffff
shivakumaar@techpack-tuf:~$ sudo nvidia-xconfig

WARNING: Unable to locate/open X configuration file.

Package xorg-server was not found in the pkg-config search path.
Perhaps you should add the directory containing `xorg-server.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xorg-server' found
New X configuration file written to '/etc/X11/xorg.conf'

shivakumaar@techpack-tuf:~$ nvidia-detector
none
shivakumaar@techpack-tuf:~$ nvidia-settings

ERROR: Unable to load info from any available system


(nvidia-settings:2313): GLib-GObject-CRITICAL **: 13:01:50.443: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
** Message: 13:01:50.448: PRIME: No offloading required. Abort
** Message: 13:01:50.448: PRIME: is it supported? no

nvida x 控制器设置

shivakumaar@techpack-tuf:~$ nvidia-smi
Sat Sep 28 13:02:14 2019       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 435.21       Driver Version: 435.21       CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 1650    Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   42C    P8     2W /  N/A |      0MiB /  3911MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

shivakumaar@techpack-tuf:~$ nvidia-debugdump --list
Found 1 NVIDIA devices
    Device ID:              0
    Device name:            GeForce GTX 1650
    GPU internal ID:        GPU-ba92a04a-ae32-bc09-62df-9fe847ba81ca

安装驱动程序后,如果我重新启动并尝试登录 Ubuntu (Xorg),它会在登录屏幕冻结或立即注销。但 Ubuntu (Wayland) 登录工作正常。但即使安装了所有驱动程序,Wayland 中的屏幕仍会不断闪烁。

答案1

从发帖人的评论到详细的修复;

不要添加图形驱动程序 ppa,如果添加了,请删除包括 ppa 在内的所有内容。

打开附加驱动程序从菜单中选择专有测试的驱动程序并重新启动。

然后通过以下命令创建目录并将文件复制到其中:

    sudo mkdir /etc/X11/xorg.conf.d
    sudo cp /usr/share/X11/xorg.conf.d/10-nvidia.conf /etc/X11/xorg.conf.d

然后添加Option "PrimaryGPU" "Yes"OutputClass以下文件

sudo vim /etc/X11/xorg.conf.d/10-nvidia.conf

最后看起来应该是这样的:

Section "OutputClass"
    Option "PrimaryGPU" "Yes"    
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "AllowEmptyInitialConfiguration"
    ModulePath "/usr/lib/x86_64-linux-gnu/nvidia/xorg"
EndSection

然后重启。重启后,尝试nvidia-smi命令看看是否有效。

我让 gtx1660ti 与该解决方案配合良好。

相关内容