自从我在笔记本电脑(华硕 Zephyrus-G-GU502DU-GA502DU)上安装了 Ubuntu 后,我就遇到了 nvidia 驱动程序问题。我无法查看 GPU 是否真的在使用,因为 nvidia-smi 从未列出进程。
这是 nvidia-smi 的输出:
nvidia-smi
Thu Oct 24 18:54:39 2019
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 435.21 Driver Version: 435.21 CUDA Version: 10.1 |
|-------------------------------+----------------------+----------------------+
| 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 166... Off | 00000000:01:00.0 Off | N/A |
| N/A 47C P0 3W / N/A | 0MiB / 5944MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
这是 nvidia-settings 的输出:
nvidia-settings
ERROR: Unable to load info from any available system
(nvidia-settings:8935): GLib-GObject-CRITICAL **: 19:44:58.765: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
** Message: 19:44:58.768: PRIME: No offloading required. Abort
** Message: 19:44:58.768: PRIME: is it supported? no
还有一些其他有用的(可能)信息:
lsmod | grep nouveau
lsmod | grep nvidia
nvidia_uvm 913408 0
nvidia_drm 49152 0
nvidia_modeset 1122304 1 nvidia_drm
nvidia 19517440 8 nvidia_uvm,nvidia_modeset
drm_kms_helper 184320 2 amdgpu,nvidia_drm
drm 491520 11 gpu*_sched,drm_kms_helper,amdgpu,nvidia_drm,ttm
ipmi_msghandler 102400 2 ipmi_devintf,nvidia
i2c_nvidia_gpu 16384 0
glxgears
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
622 frames in 5.0 seconds = 124.292 FPS
600 frames in 5.0 seconds = 119.951 FPS
600 frames in 5.0 seconds = 119.955 FPS
dpkg -l | grep -i nvidia
ii libnvidia-cfg1-435:amd64 435.21-0ubuntu2 amd64 NVIDIA binary OpenGL/GLX configuration library
ii libnvidia-common-435 435.21-0ubuntu2 all Shared files used by the NVIDIA libraries
rc libnvidia-compute-430:amd64 430.50-0ubuntu0.19.04.1~gpu0 amd64 NVIDIA libcompute package
ii libnvidia-compute-435:amd64 435.21-0ubuntu2 amd64 NVIDIA libcompute package
ii libnvidia-compute-435:i386 435.21-0ubuntu2 i386 NVIDIA libcompute package
rc libnvidia-compute-440:amd64 440.26-0ubuntu0~gpu19.04.2 amd64 NVIDIA libcompute package
ii libnvidia-decode-435:amd64 435.21-0ubuntu2 amd64 NVIDIA Video Decoding runtime libraries
ii libnvidia-decode-435:i386 435.21-0ubuntu2 i386 NVIDIA Video Decoding runtime libraries
ii libnvidia-encode-435:amd64 435.21-0ubuntu2 amd64 NVENC Video Encoding runtime library
ii libnvidia-encode-435:i386 435.21-0ubuntu2 i386 NVENC Video Encoding runtime library
ii libnvidia-fbc1-435:amd64 435.21-0ubuntu2 amd64 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-fbc1-435:i386 435.21-0ubuntu2 i386 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-gl-435:amd64 435.21-0ubuntu2 amd64 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii libnvidia-gl-435:i386 435.21-0ubuntu2 i386 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii libnvidia-ifr1-435:amd64 435.21-0ubuntu2 amd64 NVIDIA OpenGL-based Inband Frame Readback runtime library
ii libnvidia-ifr1-435:i386 435.21-0ubuntu2 i386 NVIDIA OpenGL-based Inband Frame Readback runtime library
ii nvidia-compute-utils-435 435.21-0ubuntu2 amd64 NVIDIA compute utilities
ii nvidia-dkms-435 435.21-0ubuntu2 amd64 NVIDIA DKMS package
ii nvidia-driver-435 435.21-0ubuntu2 amd64 NVIDIA driver metapackage
ii nvidia-kernel-common-435 435.21-0ubuntu2 amd64 Shared files used with the kernel module
ii nvidia-kernel-source-435 435.21-0ubuntu2 amd64 NVIDIA kernel source package
ii nvidia-prime 0.8.13 all Tools to enable NVIDIA's Prime
ii nvidia-settings 440.26-0ubuntu0~gpu19.10.1 amd64 Tool for configuring the NVIDIA graphics driver
ii nvidia-utils-435 435.21-0ubuntu2 amd64 NVIDIA driver support binaries
ii screen-resolution-extra 0.18 all Extension for the nvidia-settings control panel
ii xserver-xorg-video-nvidia-435 435.21-0ubuntu2 amd64 NVIDIA binary Xorg driver
dmesg -l err
[ 0.313637] pci 0000:00:00.2: AMD-Vi: Unable to write to IOMMU perf counter.
[ 0.334622] tpm_crb MSFT0101:00: can't request region for resource [mem 0xbcbe8000-0xbcbebfff]
[ 2.446321] Error: Driver 'rtl8821ce' is already registered, aborting...
[ 4.144178] nvidia-gpu 0000:01:00.3: i2c timeout error e0000040
[ 5.144512] ucsi_ccg 2-0008: i2c_transfer failed -110
[ 5.144517] ucsi_ccg 2-0008: ucsi_ccg_init failed - -110
一些说明:
- 电池耗电非常快。它从来没有坚持超过 3 个小时。通常它坚持的时间少于 3 个小时。
- 一直都是这样。我试过 Ubuntu 18.04、19.04,现在试的是 19.10。
- 需要一些时间来打开/关闭休眠状态。
答案1
我理解你的感受,老兄。我有同样的笔记本电脑,也遇到了同样的问题,要找到适用于 AMD/NVIDIA 组合的开箱即用的解决方案还需要一段时间。不要失去希望。:-)
与此同时,对我有帮助的是从这里安装最新的 AMD 驱动程序:https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers
sudo add-apt-repository ppa:oibaf/graphics-drivers
sudo apt update && sudo apt upgrade
重启后,你会发现只使用了 AMD Radeon Vega 10 显卡,这将有助于减少电池消耗。不过,Ubuntu 19.10 感觉有点慢,这就是我暂时切换到 Ubuntu MATE 的原因。一旦 Ubuntu(或 Manjaro)提供适当的驱动程序,我就会切换并在这里更新你。
希望这对你有点帮助。