尽管有主要选择输出,NVIDIA 驱动程序仍被禁用

尽管有主要选择输出,NVIDIA 驱动程序仍被禁用

昨天我注意到一些针对 nvidia 的软件更新,一切就这么开始了。软件更新程序没有给出任何错误,但几个小时后,当我尝试打开 CS:GO 时,帧率只有 40 fps,这与平常相差甚远。正如我所怀疑的那样,nvidia 卡被禁用了。从那时起,我几乎尝试了所有方法,下面是一些图像和命令输出:

设置>>关于

$ prime-select query
nvidia

$ dkms status
bcmwl, 6.30.223.271+bdcom, 5.3.0-40-generic, x86_64: installed (WARNING! Diff between built and installed module!)
nvidia, 440.64, 5.3.0-40-generic, x86_64: installed

$ lspci -k | grep -A 2 -E "(VGA|3D)"
00:02.0 VGA compatible controller: Intel Corporation Device 3e9b
    Subsystem: Micro-Star International Co., Ltd. [MSI] Device 127e
    Kernel driver in use: i915
--
01:00.0 3D controller: NVIDIA Corporation Device 1f91 (rev a1)
    Subsystem: Micro-Star International Co., Ltd. [MSI] Device 127e
    Kernel driver in use: nvidia

$ echo $XDG_SESSION_TYPE  
x11

$ lsmod | grep nvidia 
nvidia_uvm            942080  0
nvidia_drm             49152  0
nvidia_modeset       1114112  1 nvidia_drm
nvidia              20426752  2 nvidia_uvm,nvidia_modeset
drm_kms_helper        180224  2 nvidia_drm,i915
drm                   491520  17 drm_kms_helper,nvidia_drm,i915
ipmi_msghandler       102400  2 ipmi_devintf,nvidia

$ dpkg -l | grep nvidia
ii  libnvidia-cfg1-440:amd64                   440.64-0ubuntu0~0.18.04.1                          amd64        NVIDIA binary OpenGL/GLX configuration library
ii  libnvidia-common-440                       440.64-0ubuntu0~0.18.04.1                          all          Shared files used by the NVIDIA libraries
ii  libnvidia-compute-440:amd64                440.64-0ubuntu0~0.18.04.1                          amd64        NVIDIA libcompute package
ii  libnvidia-compute-440:i386                 440.64-0ubuntu0~0.18.04.1                          i386         NVIDIA libcompute package
ii  libnvidia-decode-440:amd64                 440.64-0ubuntu0~0.18.04.1                          amd64        NVIDIA Video Decoding runtime libraries
ii  libnvidia-decode-440:i386                  440.64-0ubuntu0~0.18.04.1                          i386         NVIDIA Video Decoding runtime libraries
ii  libnvidia-encode-440:amd64                 440.64-0ubuntu0~0.18.04.1                          amd64        NVENC Video Encoding runtime library
ii  libnvidia-encode-440:i386                  440.64-0ubuntu0~0.18.04.1                          i386         NVENC Video Encoding runtime library
ii  libnvidia-fbc1-440:amd64                   440.64-0ubuntu0~0.18.04.1                          amd64        NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-fbc1-440:i386                    440.64-0ubuntu0~0.18.04.1                          i386         NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-gl-440:amd64                     440.64-0ubuntu0~0.18.04.1                          amd64        NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-gl-440:i386                      440.64-0ubuntu0~0.18.04.1                          i386         NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-ifr1-440:amd64                   440.64-0ubuntu0~0.18.04.1                          amd64        NVIDIA OpenGL-based Inband Frame Readback runtime library
ii  libnvidia-ifr1-440:i386                    440.64-0ubuntu0~0.18.04.1                          i386         NVIDIA OpenGL-based Inband Frame Readback runtime library
ii  nvidia-compute-utils-440                   440.64-0ubuntu0~0.18.04.1                          amd64        NVIDIA compute utilities
ii  nvidia-dkms-440                            440.64-0ubuntu0~0.18.04.1                          amd64        NVIDIA DKMS package
ii  nvidia-driver-440                          440.64-0ubuntu0~0.18.04.1                          amd64        NVIDIA driver metapackage
ii  nvidia-kernel-common-440                   440.64-0ubuntu0~0.18.04.1                          amd64        Shared files used with the kernel module
ii  nvidia-kernel-source-440                   440.64-0ubuntu0~0.18.04.1                          amd64        NVIDIA kernel source package
ii  nvidia-prime                               0.8.8.2                                            all          Tools to enable NVIDIAs Prime
ii  nvidia-settings                            440.44-0ubuntu0.18.04.1                            amd64        Tool for configuring the NVIDIA graphics driver
ii  nvidia-utils-440                           440.64-0ubuntu0~0.18.04.1                          amd64        NVIDIA driver support binaries
ii  xserver-xorg-video-nvidia-440              440.64-0ubuntu0~0.18.04.1                          amd64        NVIDIA binary Xorg driver

$ nvidia-smi  
Sun Mar  8 12:16:19 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.64       Driver Version: 440.64       CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| 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 165...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   40C    P0     5W /  N/A |      0MiB /  3911MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

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

$ mokutil --sb-state
SecureBoot disabled

$ glxinfo | grep OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2) 
OpenGL core profile version string: 4.5 (Core Profile) Mesa 19.2.8
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 19.2.8
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 19.2.8
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

我还注意到,每当我运行prime-select intel/nvidia,我都会得到这个输出:

Failed to enable/disable unit: Unit file nvidia-fallback.service does not exist.

除了重新安装 Ubuntu 之外,我不知道还能做什么,所以如果能得到任何帮助,我将不胜感激。如果您需要更多信息,请告诉我。

编辑:感谢您的帮助,但最终我厌倦了驱动程序无法正常工作,所以我刚刚安装了 Ubuntu 19.10。有趣的是,上次我遇到了一些驱动程序无法正常工作的问题,但现在它们开箱即用。

答案1

尝试

sudo apt purge nvidia*

(在没有与 nvidia* 匹配的文件的目录中执行此操作,您希望 apt 删除与 nvidia 相关的所有内容)

并通过附加硬件向导重新安装 nvidia 驱动程序。

缺少的后备服务将导致 prime-select 停止工作。

相关内容