如何诊断或排除 Nvidia 驱动程序问题?

如何诊断或排除 Nvidia 驱动程序问题?

我正在运行 Ubuntu 22.04,但出现了死机,这在 Windows 上不会发生。鼠标停止移动,PC 完全没有响应。ALT + Print Screen + REISUB 也不起作用。

我还有一个问题,只在 Ubuntu 中出现 - 显示器闪烁。唯一能解决这个问题的方法是关闭 Nvidia 驱动程序中的抖动,但这会降低图像质量,对我来说太难了。

归根结底,我认为我的 Nvidia 驱动程序有问题。当我用笔记本电脑写这篇文章时,我重启了电脑,输入密码后电脑又死机了。

是否有任何错误日志可供我查看以开始诊断这个问题?

这是上次崩溃的系统日志:

Feb 21 14:13:32 PC anacron[1011]: Job `cron.daily' started
Feb 21 14:13:32 PC anacron[3111]: Updated timestamp for job `cron.daily' to 2023-02-21
Feb 21 14:13:32 PC systemd[1]: Starting Download data for packages that failed at package install time...
Feb 21 14:13:32 PC cracklib: no dictionary update necessary.
Feb 21 14:13:32 PC systemd[1]: update-notifier-download.service: Deactivated successfully.
Feb 21 14:13:32 PC systemd[1]: Finished Download data for packages that failed at package install time.
Feb 21 14:13:32 PC anacron[1011]: Job `cron.daily' terminated
Feb 21 14:13:32 PC anacron[1011]: Normal exit (1 job run)
Feb 21 14:13:32 PC systemd[1]: anacron.service: Deactivated successfully.
Feb 21 14:13:36 PC /usr/libexec/gdm-x-session[1209]: (EE) event3  - Logitech G305: client bug: event processing lagging behind by 21ms, your system is too slow
Feb 21 14:13:36 PC dbus-daemon[1017]: [system] Activating via systemd: service name='org.freedesktop.timedate1' unit='dbus-org.freedesktop.timedate1.service' requested by ':1.72' (uid=0 pid=1032 comm="/usr/lib/snapd/snapd " label="unconfined")
Feb 21 14:13:36 PC systemd[1]: Starting Time & Date Service...
Feb 21 14:13:36 PC dbus-daemon[1017]: [system] Successfully activated service 'org.freedesktop.timedate1'
Feb 21 14:13:36 PC systemd[1]: Started Time & Date Service.
Feb 21 14:13:36 PC snapd[1032]: storehelpers.go:769: cannot refresh: snap has no updates available: "bare", "core20", "firefox", "gnome-3-38-2004", "gtk-common-themes", "snap-store", "snapd", "snapd-desktop-integration"
Feb 21 14:13:36 PC snapd[1032]: autorefresh.go:551: auto-refresh: all snaps are up-to-date
Feb 21 14:13:37 PC wpa_supplicant[1039]: wlp7s0: Reject scan trigger since one is already pending
Feb 21 14:13:52 PC /usr/libexec/gdm-x-session[1209]: (EE) event3  - Logitech G305: client bug: event processing lagging behind by 22ms, your system is too slow
Feb 21 14:14:06 PC systemd[1]: systemd-timedated.service: Deactivated successfully.
Feb 21 14:15:57 PC kernel: [  452.771543] gnome-terminal-[2919]: segfault at 55a58b494276 ip 00007f7fb74dc740 sp 00007fffb6f59e88 error 4 in libgobject-2.0.so.0.7200.4[7f7fb74b2000+33000]
Feb 21 14:15:57 PC kernel: [  452.771557] Code: ff fc 03 00 00 77 33 48 c1 ef 02 48 8d 05 18 5a 02 00 48 8b 3c f8 48 81 fe fc 03 00 00 76 28 48 83 e6 fc 31 c0 48 85 ff 74 33 <f6> 47 16 04 74 05 48 85 f6 75 2d 31 c0 c3 66 90 48 83 e7 fc 48 81
Feb 21 14:15:58 PC systemd[1]: Starting Process error reports when automatic reporting is enabled...
Feb 21 14:15:58 PC systemd[1]: Started crash report submission.
Feb 21 14:15:58 PC whoopsie[3179]: [14:15:58] Using lock path: /var/lock/whoopsie/lock
Feb 21 14:15:58 PC systemd[1]: whoopsie.service: Deactivated successfully.
Feb 21 14:15:58 PC whoopsie-upload-all[3178]: ERROR: whoopsie.path is not enabled
Feb 21 14:15:58 PC systemd[1]: apport-autoreport.service: Main process exited, code=exited, status=1/FAILURE
Feb 21 14:15:58 PC systemd[1]: apport-autoreport.service: Failed with result 'exit-code'.
Feb 21 14:15:58 PC systemd[1]: Failed to start Process error reports when automatic reporting is enabled.
Feb 21 14:15:59 PC systemd[1]: Starting Process error reports when automatic reporting is enabled...
Feb 21 14:15:59 PC systemd[1]: Started crash report submission.
Feb 21 14:15:59 PC systemd[1179]: gnome-terminal-server.service: Main process exited, code=dumped, status=11/SEGV
Feb 21 14:15:59 PC systemd[1179]: gnome-terminal-server.service: Failed with result 'core-dump'.
Feb 21 14:15:59 PC systemd[1179]: gnome-terminal-server.service: Consumed 6.072s CPU time.
Feb 21 14:15:59 PC systemd[1179]: vte-spawn-1a2e3a34-8b41-4731-8f27-fc5911ac6ad8.scope: Consumed 1.195s CPU time.
Feb 21 14:15:59 PC whoopsie[3186]: [14:15:59] Using lock path: /var/lock/whoopsie/lock
Feb 21 14:15:59 PC systemd[1]: whoopsie.service: Deactivated successfully.
Feb 21 14:15:59 PC whoopsie-upload-all[3185]: ERROR: whoopsie.path is not enabled
Feb 21 14:15:59 PC systemd[1]: apport-autoreport.service: Main process exited, code=exited, status=1/FAILURE
Feb 21 14:15:59 PC systemd[1]: apport-autoreport.service: Failed with result 'exit-code'.
Feb 21 14:15:59 PC systemd[1]: Failed to start Process error reports when automatic reporting is enabled.
Feb 21 14:16:01 PC systemd[1179]: Started Application launched by gnome-shell.
Feb 21 14:16:01 PC dbus-daemon[1212]: [session uid=1000 pid=1212] Activating via systemd: service name='org.gnome.Terminal' unit='gnome-terminal-server.service' requested by ':1.102' (uid=1000 pid=3195 comm="/usr/bin/gnome-terminal.real " label="unconfined")
Feb 21 14:16:01 PC systemd[1179]: Starting GNOME Terminal Server...
Feb 21 14:16:01 PC dbus-daemon[1212]: [session uid=1000 pid=1212] Successfully activated service 'org.gnome.Terminal'
Feb 21 14:16:01 PC systemd[1179]: Started GNOME Terminal Server.
Feb 21 14:16:01 PC systemd[1179]: Started VTE child process 3218 launched by gnome-terminal-server process 3198.
Feb 21 14:16:56 PC gnome-shell[1500]: Can't update stage views actor <unnamed>[<MetaWindowGroup>:0x5583ef6bc340] is on because it needs an allocation.
Feb 21 14:16:56 PC gnome-shell[1500]: Can't update stage views actor <unnamed>[<MetaWindowActorX11>:0x5583f186ef40] is on because it needs an allocation.
Feb 21 14:16:56 PC gnome-shell[1500]: Can't update stage views actor <unnamed>[<MetaSurfaceActorX11>:0x5583f1872da0] is on because it needs an allocation.

答案1

我注意到,只有当我让 PC 处于闲置状态时(没有播放音乐,也不移动鼠标),它才会冻结。我在 Google 上搜索了“ubuntu 闲置时冻结”,结果如下:

内核中有一个错误,会导致 ryzen cpu 在进入某个 c 状态(电源模式)时冻结。通常,当计算机闲置了一段时间,内核试图将 cpu 置于低功耗模式时,就会发生这种情况,只有重置才能再次唤醒 cpu。

来源:https://www.reddit.com/r/linuxquestions/comments/qlbss5/ubuntu_2004_freezes_when_left_idle_for_a_while/

我从 BIOS 禁用了 C-State,到目前为止没有出现任何冻结。我安装了最新的 Ubuntu 版本,但我不知道为什么这个错误仍然存​​在。

相关内容