我有一台配备 nvidia GTX 1050 的 dell xps 15 9560,在内核 5.1.x 下的 Xorg 上使用 gnome 在 ubuntu 18.04 上尝试运行 nvidia 驱动程序 430(ubuntu-drivers 推荐的驱动程序)时遇到了问题。
我已经尝试过执行sudo apt purge nvidia-*
、重新启动并安装它,通过sudo apt install nvidia-driver-430
或sudo ubuntu-drivers install
,重新启动时,“设置”>“关于”面板一直说我正在使用英特尔 HD 630 显卡,而且 nvidia-smi 指出没有 nvidia 显卡正在运行或没有安装 nvidia 驱动程序。
我有以下 grub 命令:
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_rev_override=1 nouveau.modeset=0 nouveau.runpm=0 noresume intel_pstate=skylake_hwp"
grep -rnw /lib/modprobe.d/ -e "nvidia"
给出了以下结果:
/lib/modprobe.d/nvidia-kms.conf:1:# This file was generated by nvidia-prime
/lib/modprobe.d/nvidia-kms.conf:3:options nvidia-drm modeset=1
/lib/modprobe.d/blacklist-nvidia.conf:2:# This file was generated by nvidia-prime
/lib/modprobe.d/blacklist-nvidia.conf:3:blacklist nvidia
/lib/modprobe.d/blacklist-nvidia.conf:4:blacklist nvidia-drm
/lib/modprobe.d/blacklist-nvidia.conf:5:blacklist nvidia-modeset
/lib/modprobe.d/blacklist-nvidia.conf:6:alias nvidia off
/lib/modprobe.d/blacklist-nvidia.conf:7:alias nvidia-drm off
/lib/modprobe.d/blacklist-nvidia.conf:8:alias nvidia-modeset off
使用内核 5.0 和 nvidia 驱动程序 418 我没有遇到任何问题,但尝试返回到 5.0 时它停止工作(我可以启动,但 ubuntu 没有检测到任何 nvidia 正在运行)。
我没什么办法了(除了重新安装整个操作系统),所以我希望有人能帮助我诊断出发生了什么变化并让它再次工作......
谢谢!
更新 1:根据要求,以下是输出:
mokutil --sb-state
SecureBoot disabled
test -d /sys/firmware/efi && echo efi || echo "Legacy(bios)"
efi
echo $XDG_SESSION_TYPE
x11
dkms status
nvidia, 418.56, 5.0.12-050012-generic, x86_64: installed
sudo lshw -c video
*-display UNCLAIMED
description: 3D controller
product: GP107M [GeForce GTX 1050 Mobile]
vendor: NVIDIA Corporation
physical id: 0
bus info: pci@0000:01:00.0
version: a1
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list
configuration: latency=0
resources: memory:ec000000-ecffffff memory:c0000000-cfffffff memory:d0000000-d1ffffff ioport:e000(size=128) memory:ed000000-ed07ffff
*-display
description: VGA compatible controller
product: Intel Corporation
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 04
width: 64 bits
clock: 33MHz
capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:132 memory:eb000000-ebffffff memory:80000000-8fffffff ioport:f000(size=64) memory:c0000-dffff
lsmod | grep nvidia
(返回空)
lspci -knn | grep -A 3 -E "(VGA|3D|Display)"
00:02.0 VGA compatible controller [0300]: Intel Corporation Device [8086:591b] (rev 04)
Subsystem: Dell Device [1028:07be]
Kernel driver in use: i915
Kernel modules: i915
--
01:00.0 3D controller [0302]: NVIDIA Corporation GP107M [GeForce GTX 1050 Mobile] [10de:1c8d] (rev a1)
Subsystem: Dell GP107M [GeForce GTX 1050 Mobile] [1028:07be]
Kernel modules: nvidiafb, nouveau
02:00.0 Network controller [0280]: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter [168c:003e] (rev 32)
另外,prime-select query
返回nvidia
。
谢谢!
更新 2:根据@Marmayogi 的建议,/lib/modprobe.d/blacklist-nvidia.conf
包含以下内容:
# Do not modify
# This file was generated by nvidia-prime
blacklist nvidia
blacklist nvidia-drm
blacklist nvidia-modeset
alias nvidia off
alias nvidia-drm off
alias nvidia-modeset off
更新 3:根据要求,命令的结果是:
dkms status
nvidia, 430.09, 5.0.0-050000-generic, x86_64: installed
nvidia, 430.09, 5.1.3-050103-generic, x86_64: installed
uname -r
5.1.3-050103-generic
ls -al /etc/boot
ls: cannot access '/etc/boot': No such file or directory
dpkg -l *nvidia* | grep ii
ii libnvidia-cfg1-430:amd64 430.09-0ubuntu0~gpu18.04.1 amd64 NVIDIA binary OpenGL/GLX configuration library
ii libnvidia-common-418 418.56-0ubuntu0~gpu18.04.1 all Shared files used by the NVIDIA libraries
ii libnvidia-common-430 430.09-0ubuntu0~gpu18.04.1 all Shared files used by the NVIDIA libraries
ii libnvidia-compute-430:amd64 430.09-0ubuntu0~gpu18.04.1 amd64 NVIDIA libcompute package
ii libnvidia-compute-430:i386 430.09-0ubuntu0~gpu18.04.1 i386 NVIDIA libcompute package
ii libnvidia-decode-430:amd64 430.09-0ubuntu0~gpu18.04.1 amd64 NVIDIA Video Decoding runtime libraries
ii libnvidia-decode-430:i386 430.09-0ubuntu0~gpu18.04.1 i386 NVIDIA Video Decoding runtime libraries
ii libnvidia-encode-430:amd64 430.09-0ubuntu0~gpu18.04.1 amd64 NVENC Video Encoding runtime library
ii libnvidia-encode-430:i386 430.09-0ubuntu0~gpu18.04.1 i386 NVENC Video Encoding runtime library
ii libnvidia-fbc1-430:amd64 430.09-0ubuntu0~gpu18.04.1 amd64 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-fbc1-430:i386 430.09-0ubuntu0~gpu18.04.1 i386 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-gl-430:amd64 430.09-0ubuntu0~gpu18.04.1 amd64 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii libnvidia-gl-430:i386 430.09-0ubuntu0~gpu18.04.1 i386 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii libnvidia-ifr1-430:amd64 430.09-0ubuntu0~gpu18.04.1 amd64 NVIDIA OpenGL-based Inband Frame Readback runtime library
ii libnvidia-ifr1-430:i386 430.09-0ubuntu0~gpu18.04.1 i386 NVIDIA OpenGL-based Inband Frame Readback runtime library
ii nvidia-compute-utils-430 430.09-0ubuntu0~gpu18.04.1 amd64 NVIDIA compute utilities
ii nvidia-dkms-430 430.09-0ubuntu0~gpu18.04.1 amd64 NVIDIA DKMS package
ii nvidia-driver-430 430.09-0ubuntu0~gpu18.04.1 amd64 NVIDIA driver metapackage
ii nvidia-kernel-common-430 430.09-0ubuntu0~gpu18.04.1 amd64 Shared files used with the kernel module
ii nvidia-kernel-source-430 430.09-0ubuntu0~gpu18.04.1 amd64 NVIDIA kernel source package
ii nvidia-prime 0.8.8.2 all Tools to enable NVIDIA's Prime
ii nvidia-settings 418.56-0ubuntu0~gpu18.04.1 amd64 Tool for configuring the NVIDIA graphics driver
ii nvidia-utils-430 430.09-0ubuntu0~gpu18.04.1 amd64 NVIDIA driver support binaries
ii xserver-xorg-video-nvidia-430 430.09-0ubuntu0~gpu18.04.1 amd64 NVIDIA binary Xorg driver
ls -al ~/.local/share/gnome-shell/extensions
total 12
drwxrwxr-x 3 quimere quimere 4096 ene 22 08:02 .
drwx------ 3 quimere quimere 4096 may 18 23:46 ..
drwxrwxr-x 3 quimere quimere 4096 ene 22 08:02 [email protected]