NVIDIA 驱动程序无法在 Ubuntu 18.04 上运行

NVIDIA 驱动程序无法在 Ubuntu 18.04 上运行

在 Ubuntu 18.04 下,我尝试使用以下方法安装 Nvidia 推荐的驱动程序

$ sudo apt-get purge nvidia*
$ sudo add-apt-repository ppa:graphics-drivers/ppa
$ sudo apt-get install nvidia-418

我重新启动了,当我尝试运行nvidia-settings以检查一切是否正常时,我得到了

$ nvidia-settings
ERROR: Unable to find display on any available system


(nvidia-settings:24546): GLib-GObject-CRITICAL **: 17:26:26.552: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
** Message: 17:26:26.554: PRIME: Requires offloading
** Message: 17:26:26.554: PRIME: is it supported? yes

我也尝试了以前的版本(415、410、390),但遇到了同样的问题。

这是我的设置:

~$ lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
01:00.0 VGA compatible controller: NVIDIA Corporation GK208GLM [Quadro K610M] (rev a1)

谁知道发生了什么事?

谢谢 !

编辑:这是命令的输出:

~$ mokutil --sb-state
SecureBoot disabled
Platform is in Setup Mode
~$ ls /sys/firmware/efi/
config_table  fw_platform_size  runtime      systab
efivars       fw_vendor         runtime-map  vars
~$ sudo lshw -c video
  *-display                 
       description: VGA compatible controller
       produit: GK208GLM [Quadro K610M]
       fabriquant: NVIDIA Corporation
       identifiant matériel: 0
       information bus: pci@0000:01:00.0
       version: a1
       bits: 64 bits
       horloge: 33MHz
       fonctionnalités: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0
       ressources: irq:37 mémoire:cd000000-cdffffff mémoire:50000000-5fffffff mémoire:60000000-61ffffff portE/S:5000(taille=128) mémoire:ce000000-ce07ffff
  *-display
       description: VGA compatible controller
       produit: 4th Gen Core Processor Integrated Graphics Controller
       fabriquant: Intel Corporation
       identifiant matériel: 2
       information bus: pci@0000:00:02.0
       version: 06
       bits: 64 bits
       horloge: 33MHz
       fonctionnalités: msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       ressources: irq:36 mémoire:ce400000-ce7fffff mémoire:a0000000-afffffff portE/S:6000(taille=64) mémoire:c0000-dffff

~$ dkms status
nvidia, 418.56, 4.15.0-48-generic, x86_64: installed

~$ lsmod | grep nvidia
nvidia_uvm            798720  0
nvidia_drm             45056  2
nvidia_modeset       1085440  1 nvidia_drm
nvidia              17600512  47 nvidia_uvm,nvidia_modeset
drm_kms_helper        167936  2 nvidia_drm,i915
ipmi_msghandler        53248  2 ipmi_devintf,nvidia
drm                   401408  29 drm_kms_helper,nvidia_drm,i915

编辑:

$ echo $XDG_SESSION_TYPE
wayland

$ env | grep -i wayland
DESKTOP_SESSION=ubuntu-wayland
WAYLAND_DISPLAY=wayland-0
XDG_SESSION_TYPE=wayland
XDG_DATA_DIRS=/usr/share/ubuntu-wayland:/usr/local/share:/usr/share:/var/lib/snapd/desktop
XDG_SESSION_DESKTOP=ubuntu-wayland
GDMSESSION=ubuntu-wayland
XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu-wayland:/etc/xdg

答案1

正如@Marmayogi 指出的那样,我的问题是我正在运行 Wayland 显示服务器。

我不得不用 重新配置 Xorg 显示服务器sudo dpkg-reconfigure xserver-xorg,重新启动并切换到它。现在 NVIDIA 驱动程序 418 可以正常工作。

相关内容