我的 Ubuntu 图形用户界面 (GUI) 显示不正确。我该如何修复?

我的 Ubuntu 图形用户界面 (GUI) 显示不正确。我该如何修复?

发生了什么: 我使用以下方式安装了 adb 和 putty:$apt install adb$sudo apt install Putty。然后,我启动了 Putty,然后发现 Putty 的配置 GUI 没有显示任何内容。重启后,我的 Ubuntu 的 GUI 无法正常显示内容。Ubuntu 的所有 GUI 都被黑色块包围(如图所示。)有些 GUI 甚至不显示任何文字。此外,当我切换到我的输入法(搜狗输入法)时,它会崩溃。

系统环境(使用$uname -a): Linux jim 5.15.0-69-通用#76~20.04.1-Ubuntu SMP 星期一 3 月 20 日 15:54:19 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

我尝试过以下方法来修复该问题(但没有效果):

  1. 卸载 Putty(不能解决问题)
  2. 使用以下命令重新安装 Ubuntu 桌面(不能解决问题):
$sudo apt-get install ubuntu-gnome-desktop
$sudo apt-get install --reinstall ubuntu-gnome-desktop

日志: 日志

cat /var/log/apt/history.log问题发生前安装 2 个东西(adb 和 Putty)时的日志:

Start-Date: 2023-04-18  10:15:02
Commandline: apt install adb
Requested-By: jim (1000)
Install: android-libbase:amd64 (1:8.1.0+r23-5ubuntu2, automatic), android-liblog:amd64 (1:8.1.0+r23-5ubuntu2, automatic), android-libcutils:amd64 (1:8.1.0+r23-5ubuntu2, automatic), adb:amd64 (1:8.1.0+r23-5ubuntu2), android-sdk-platform-tools-common:amd64 (27.0.0+12, automatic), android-libcrypto-utils:amd64 (1:8.1.0+r23-5ubuntu2, automatic), android-libboringssl:amd64 (8.1.0+r23-2build1, automatic), android-libadb:amd64 (1:8.1.0+r23-5ubuntu2, automatic)
End-Date: 2023-04-18  10:15:11

Start-Date: 2023-04-18  10:36:01
Commandline: apt-get install putty
Requested-By: jim (1000)
Install: putty:amd64 (0.73-2), putty-tools:amd64 (0.73-2, automatic)
End-Date: 2023-04-18  10:36:08

cat /var/log/apt/term.log问题发生前安装 2 个东西(adb 和 Putty)时的日志:

Log started: 2023-04-18  10:15:02
Selecting previously unselected package android-liblog.
(Reading database ... 255993 files and directories currently installed.)
Preparing to unpack .../0-android-liblog_1%3a8.1.0+r23-5ubuntu2_amd64.deb ...
Unpacking android-liblog (1:8.1.0+r23-5ubuntu2) ...
Selecting previously unselected package android-libbase.
Preparing to unpack .../1-android-libbase_1%3a8.1.0+r23-5ubuntu2_amd64.deb ...
Unpacking android-libbase (1:8.1.0+r23-5ubuntu2) ...
Selecting previously unselected package android-libboringssl.
Preparing to unpack .../2-android-libboringssl_8.1.0+r23-2build1_amd64.deb ...
Unpacking android-libboringssl (8.1.0+r23-2build1) ...
Selecting previously unselected package android-libcrypto-utils.
Preparing to unpack .../3-android-libcrypto-utils_1%3a8.1.0+r23-5ubuntu2_amd64.deb ...
Unpacking android-libcrypto-utils (1:8.1.0+r23-5ubuntu2) ...
Selecting previously unselected package android-libcutils.
Preparing to unpack .../4-android-libcutils_1%3a8.1.0+r23-5ubuntu2_amd64.deb ...
Unpacking android-libcutils (1:8.1.0+r23-5ubuntu2) ...
Selecting previously unselected package android-libadb.
Preparing to unpack .../5-android-libadb_1%3a8.1.0+r23-5ubuntu2_amd64.deb ...
Unpacking android-libadb (1:8.1.0+r23-5ubuntu2) ...
Selecting previously unselected package adb.
Preparing to unpack .../6-adb_1%3a8.1.0+r23-5ubuntu2_amd64.deb ...
Unpacking adb (1:8.1.0+r23-5ubuntu2) ...
Selecting previously unselected package android-sdk-platform-tools-common.
Preparing to unpack .../7-android-sdk-platform-tools-common_27.0.0+12_all.deb ...
Unpacking android-sdk-platform-tools-common (27.0.0+12) ...
Setting up android-sdk-platform-tools-common (27.0.0+12) ...
Setting up android-liblog (1:8.1.0+r23-5ubuntu2) ...
Setting up android-libboringssl (8.1.0+r23-2build1) ...
Setting up android-libcrypto-utils (1:8.1.0+r23-5ubuntu2) ...
Setting up android-libbase (1:8.1.0+r23-5ubuntu2) ...
Setting up android-libcutils (1:8.1.0+r23-5ubuntu2) ...
Setting up android-libadb (1:8.1.0+r23-5ubuntu2) ...
Setting up adb (1:8.1.0+r23-5ubuntu2) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...
Log ended: 2023-04-18  10:15:11

Log started: 2023-04-18  10:36:01
Selecting previously unselected package putty-tools.
(Reading database ... 256048 files and directories currently installed.)
Preparing to unpack .../putty-tools_0.73-2_amd64.deb ...
Unpacking putty-tools (0.73-2) ...
Selecting previously unselected package putty.
Preparing to unpack .../putty_0.73-2_amd64.deb ...
Unpacking putty (0.73-2) ...
Setting up putty-tools (0.73-2) ...
Setting up putty (0.73-2) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
Log ended: 2023-04-18  10:36:08

我想知道是什么原因导致了这个问题?我该如何修复它?

答案1

这些软件包的安装似乎没有什么问题。它们应该不会影响图形。

我以前遇到过类似的问题,关闭“窗口合成”设置并更改主题解决了该问题(这是使用 Xfce 窗口管理器)。

但最终,问题在于安装了错误的图形驱动程序。您可以使用以下命令找到您的显卡:

lspci | grep VGA

如果您使用的是 Nvidia,那么您可以查看是否安装了正确的软件包来与您的显卡配合使用。您可以通过此页面nvidia-driver-xxx找到驱动程序:xxxhttps://www.nvidia.com/Download/index.aspx

相关内容