Nvidia 無法在 Xorg 上的 Ubuntu 17.10 上運行

Nvidia 無法在 Xorg 上的 Ubuntu 17.10 上運行

我有一台配備混合顯示卡的 Dell Mobile Precision 5510,包括 Intel HD Graphics 530 晶片和 Nvidia Quadro M1000M。

我想切換到 Nvidia 晶片以在 SteamOS 上運行一些遊戲,但無法運行。

戴爾優惠本指南,即:

sudo apt-get purge libvdpau-va-gl1 bumblebee* nvidia*
sudo apt-get install nvidia-387 nvidia-settings nvidia-prime
sudo reboot

然後

nvidia-settings

或者

sudo prime-select nvidia

或者

sudo prime-switch nvidia

並重新啟動,但這些都不適合我。

當我嘗試時nvidia-settings

ERROR: Error querying enabled displays on GPU 0 (Missing Extension).

ERROR: Error querying connected displays on GPU 0 (Missing Extension).

** Message: PRIME: No offloading required. Abort
** Message: PRIME: is it supported? no

ERROR: nvidia-settings could not find the registry key file. This file 
should have been installed along with this driver at
/usr/share/nvidia/nvidia-application-profiles-key-documentation. 
The application profiles will continue to work, but values cannot be
prepopulated or validated, and will not be listed in the help text.
Please see the README for possible values and descriptions.

當我嘗試時sudo-prime-switch nvidia

/etc/modprobe.d is not a file
/etc/modprobe.d is not a file
/etc/modprobe.d is not a file
/etc/modprobe.d is not a file
/etc/modprobe.d is not a file
Error: can't open /lib/modules/4.13.0-16-lowlatency/updates/dkms
Error: can't open /lib/modules/4.13.0-16-lowlatency/updates/dkms
Error: can't open /lib/modules/4.13.0-16-lowlatency/updates/dkms
update-alternatives: error: no alternatives for x86_64-linux-gnu_gfxcore_conf

如果我嘗試sudo prime-select nvidia

Info: the current GL alternatives in use are: ['mesa', 'mesa']
Info: the current EGL alternatives in use are: ['mesa-egl', 'nvidia-387']
Info: selecting nvidia-387 for the nvidia profile
update-alternatives: using /usr/lib/nvidia-387/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf (x86_64-linux-gnu_gl_conf) in manual mode
update-alternatives: using /usr/lib/nvidia-387/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf (x86_64-linux-gnu_egl_conf) in manual mode
update-alternatives: using /usr/lib/nvidia-387/alt_ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_GL.conf (i386-linux-gnu_gl_conf) in manual mode

最後一個似乎很有希望,如果我sudo prime-select query稍後嘗試,我會得到:

nvidia

偉大的。除非我重新啟動,否則它會返回英特爾,就好像什麼都沒發生一樣。或者如果我nvidia-settings稍後嘗試,也會出現相同的錯誤。

我已經完全禁用了安全啟動。

如果我透過輸入開啟其他驅動程序,software-properties-gtk --open-tab=4所選選項設定為:

Using NVIDIA binary driver - version 387.22 from nvidia-387 (open source)

很多類似的問題,但沒有一個提供超出我上面嘗試過的解決方案。

我正在啟動 Ubuntu Xorg。當我運行“nvidia-settings”時,程式運行時顯示上述錯誤訊息,但我沒有看到任何切換卡的選項(沒有“PRIME 配置文件”選項)。

有任何想法嗎?

答案1

我的 nvidia-387 驅動程式也遇到相同的問題。它一直有效,直到系統更新。

對我有用的唯一方法是使用較舊的驅動程式:nvidia-384

root@sebapc:/home/sebastian# dpkg -l | grep -i -e nvidia
ii  bbswitch-dkms                              0.8-4ubuntu1                                amd64        Interface for toggling the power on NVIDIA Optimus video cards
ii  cuda-nvtx-9-1                              9.1.85-1                                    amd64        NVIDIA Tools Extension
ii  libcuda1-384                               384.111-0ubuntu1                            amd64        NVIDIA CUDA runtime library
ii  nvidia-384                                 384.111-0ubuntu1                            amd64        NVIDIA binary driver - version 384.111
rc  nvidia-387                                 387.26-0ubuntu1                             amd64        NVIDIA binary driver - version 387.26
ii  nvidia-modprobe                            387.26-0ubuntu1                             amd64        Load the NVIDIA kernel driver and create device files
ii  nvidia-opencl-icd-384                      384.111-0ubuntu1                            amd64        NVIDIA OpenCL ICD
rc  nvidia-opencl-icd-387                      387.26-0ubuntu1                             amd64        NVIDIA OpenCL ICD
ii  nvidia-prime                               0.8.5                                       amd64        Tools to enable NVIDIA's Prime
ii  nvidia-settings                            387.26-0ubuntu1                             amd64        Tool for configuring the NVIDIA graphics driver

唯一的問題是該驅動程式與 CUDA 9.1 不相容

* 更新 *

問題是(就我而言)核心。
安裝驅動程式時,我在 DKMS 編譯期間遇到錯誤,編譯產生的日誌位於 /var/lib/dkms/nvidia-387/387.26/build/make.log

您可以嘗試為目前運行的核心編譯DKMS

sudo dpkg-reconfigure nvidia-387

看看是否有錯誤

我解決了從舊核心啟動的問題4.13.0-21-通用而不是最新的4.13.0-25-通用

這是我的系統詳細信息

圖形處理器:

root@sebapc:/home/sebastian# lspci | grep -i nvidia
01:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 940MX] (rev a2)

作業系統版本:

root@sebapc:/home/sebastian# uname -a
Linux sebapc 4.13.0-21-generic #24-Ubuntu SMP Mon Dec 18 17:29:16 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

答案2

不確定這是否適用於您的情況,但就在今天,我在配備混合 GPU(Windows 7 作業系統)的 Dell Inspiron 15 上遇到了類似的問題,在 BIOS 升級後我無法加載 nVidia 驅動程式。原來BIOS升級後必須清除CMOS。一旦我這樣做了,就會檢測到 nVidia 卡並加載驅動程式。我想您可能已經檢查過是否檢測到 nVidia 卡,但請考慮分享我的經驗,以防萬一您沒有檢測到。

相關內容