我有:
- 笔记本电脑: 华硕 K95
- 操作系统: Ubuntu 18.04
- 专用 GPU: 英伟达 GeForce GT 635M
- 集成 GPU:英特尔® 高清显卡 4000 (IVB GT2)
您可能已经猜到我的问题是无法从英特尔显卡切换到 nvidia。我已安装并使用 nvidia-driver-390(在“软件和更新”->“附加驱动程序”中检查)。
➜ ~ sudo ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00000DE3sv00001043sd000010CCbc03sc00i00
vendor : NVIDIA Corporation
model : GF108M [GeForce GT 635M]
driver : nvidia-driver-390 - distro non-free recommended
driver : nvidia-340 - distro non-free
driver : nvidia-304 - third-party free
driver : xserver-xorg-video-nouveau - distro free builtin
➜ ~ lspci -k | grep -A 2 -i "VGA"
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
Subsystem: ASUSTeK Computer Inc. 3rd Gen Core processor Graphics Controller
Kernel driver in use: i915
--
01:00.0 VGA compatible controller: NVIDIA Corporation GF108M [GeForce GT 635M] (rev a1)
Subsystem: ASUSTeK Computer Inc. GF108M [GeForce GT 635M]
Kernel driver in use: nvidia
➜ ~ prime-select query
nvidia
但系统似乎仍在使用英特尔显卡(在“设置”->“关于”中检查)。我还遇到了以下问题:
➜ ~ nvidia-settings
ERROR: Unable to find display on any available system
应该承认,nvidia x 服务器设置的 PRIME 配置文件中只有 2 个项目:NVIDIA(选定)和 Intel。没有其他项目或菜单子项目。
(nvidia-settings:18439): GLib-GObject-CRITICAL **: 22:56:09.612: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
** Message: 22:56:09.616: PRIME: Requires offloading
** Message: 22:56:09.616: PRIME: is it supported? yes
** Message: 22:56:09.662: PRIME: Usage: /usr/bin/prime-select nvidia|intel|query
** Message: 22:56:09.662: PRIME: on-demand mode: "0"
** Message: 22:56:09.663: PRIME: is "on-demand" mode supported? no
顺便说一句,我现在正在使用 wayland 环境,因为 Xorg 无法在已安装的 nvidia 驱动程序下启动 - 每次我尝试登录系统时,都会将我推回到登录对话框,但它可以与 xserver-xorg-video-nouveau 一起使用(当然,还有英特尔 gpu)。简要查看 nano /var/log/Xorg.0.log 返回:
[ 22.800] (II) Module fb: vendor="X.Org Foundation"
[ 22.801] compiled for 1.19.6, module version = 1.0.0
[ 22.801] ABI class: X.Org ANSI C Emulation, version 0.4
[ 22.801] (EE) Screen(s) found, but none have a usable configuration.
[ 22.801] (EE)
Fatal server error:
[ 22.801] (EE) no screens found(EE)
[ 22.801] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[ 22.801] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 22.801] (EE)
[ 22.818] (EE) Server terminated with error (1). Closing log file.
我尝试安装 bumblebee,但它在使用 Xorg 登录后不久就导致图形环境完全冻结。我不得不清除它。请帮助使用 Nvidia!
更新:
➜ ~ glxinfo | grep OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 4000 (IVB GT2)
OpenGL core profile version string: 4.2 (Core Profile) Mesa 20.0.8
OpenGL core profile shading language version string: 4.20
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 20.0.8
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 20.0.8
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
OpenGL ES profile extensions:
答案1
您可能需要遵循以下步骤这里
答案2
sudo apt install xserver-xorg-video-nvidia-495
并运行:
sudo nvidia-xconfig
自动配置你的 X 配置文件。
答案3
经过一番犹豫,我决定为 Windows 安装适合此显卡的驱动程序。但我失败了。所以我可以断言,主要问题是我的显卡……坏了。