Ubuntu 22.04 仅启动到 tty

Ubuntu 22.04 仅启动到 tty

我有一台装有较旧 amd 显卡的 Ubuntu 22.04 机器(详情见下文)。作为背景介绍,它在 Linux Mint 上运行了一年半。在硬盘损坏后出现了一些问题,几个月前我将其切换到了 Ubuntu。

上次它正确启动是在 3 或 4 天前,我记得我在玩一些游戏时在后台运行了更新。然后我关机并在几天后尝试重新启动它。现在我无法启动到 ubuntu 桌面。它启动时会进入一个带有闪烁光标的屏幕,我可以使用 Ctrl+Alt+F2 进入 TTY。我也可以通过 SSH 进入它。

我做了一些查找并尝试了几种解决方案。我尝试使用 startx 手动启动 Xorg,但没有成功。我还尝试在 grub 配置上使用 nomodeset 来启动它,但结果却出现了错误。我尝试重新安装 ubuntu-desktop。我还尝试在之前的内核下启动,但似乎遇到了同样的问题。我查看了 xorg 日志,但似乎只找到了上次进入时的日志以及我尝试手动启动的日志。我在最新版本的 Ubuntu 上找不到任何类似的东西。我继续尝试运行任何 ubuntu 更新,看看是否有任何补丁修复了它。

我认为这可能是内核和 GPU 驱动程序之间的问题,但这只是我读到的线索,表明较新的内核和 amdgpu 驱动程序可能存在问题。

多年来,我一直使用各种 Linux 发行版,但并不是专家。我的知识和谷歌搜索能力已经所剩无几。所以任何帮助我都会很感激。我刚刚按照我想要的方式设置了这个安装,并且运行得很好,所以我真的不想重新安装,尤其是因为除了 GUI 之外,操作系统似乎可以正常工作。

机器详细信息:

OS: Ubuntu 22.04.1 LTS x86_64
Host: B450 AORUS PRO WIFI
Kernel: 5.15.0-58-generic
Packages: 2444 (dpkg), 8 (flatpak), 14 (snap)
Shell: bash 5.1.16
Resolution: 2560x1440
Terminal: /dev/pts/0
CPU: AMD Ryzen 5 2600X (12) @ 3.600GHz
GPU: AMD ATI Radeon RX 470/480/570/570X/580/580X/590
Memory: 560MiB / 15943MiB

07:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] [1002:67df] (rev e7) (prog-if 00 [VGA controller])
        Subsystem: Micro-Star International Co., Ltd. [MSI] Radeon RX 580 Armor 4G OC [1462:3418]
        Flags: bus master, fast devsel, latency 0, IRQ 111, IOMMU group 15
        Memory at e0000000 (64-bit, prefetchable) [size=256M]
        Memory at f0000000 (64-bit, prefetchable) [size=2M]
        I/O ports at e000 [size=256]
        Memory at fce00000 (32-bit, non-prefetchable) [size=256K]
        Expansion ROM at 000c0000 [disabled] [size=128K]
        Capabilities: [48] Vendor Specific Information: Len=08 <?>
        Capabilities: [50] Power Management version 3
        Capabilities: [58] Express Legacy Endpoint, MSI 00
        Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>

/var/log/Xorg.0.log:

[ 25822.811]
X.Org X Server 1.21.1.3
X Protocol Version 11, Revision 0
[ 25822.812] Current Operating System: Linux chuck 5.15.0-58-generic #64-Ubuntu SMP Thu Jan 5 11:43:13 UTC 2023 x86_64
[ 25822.812] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.15.0-58-generic root=UUID=c1bcafb2-ca43-4924-be48-4962bf748b97 ro quiet splash vt.handoff=7
[ 25822.812] xorg-server 2:21.1.3-2ubuntu2.5 (For technical support please see http://www.ubuntu.com/support)
[ 25822.812] Current version of pixman: 0.40.0
[ 25822.812]    Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[ 25822.812] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 25822.812] (==) Log file: "/var/log/Xorg.0.log", Time: Sat Jan 14 16:43:18 2023
[ 25822.812] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 25822.812] (==) No Layout section.  Using the first Screen section.
[ 25822.812] (==) No screen section available. Using defaults.
[ 25822.812] (**) |-->Screen "Default Screen Section" (0)
[ 25822.812] (**) |   |-->Monitor "<default monitor>"
[ 25822.812] (==) No monitor specified for screen "Default Screen Section".
        Using a default monitor configuration.
[ 25822.812] (==) Automatically adding devices
[ 25822.812] (==) Automatically enabling devices
[ 25822.812] (==) Automatically adding GPU devices
[ 25822.812] (==) Automatically binding GPU devices
[ 25822.812] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 25822.812] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[ 25822.812]    Entry deleted from font path.
[ 25822.812] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[ 25822.812]    Entry deleted from font path.
[ 25822.812] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[ 25822.812]    Entry deleted from font path.
[ 25822.812] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[ 25822.812]    Entry deleted from font path.
[ 25822.812] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[ 25822.813]    Entry deleted from font path.
[ 25822.813] (==) FontPath set to:
        /usr/share/fonts/X11/misc,
        /usr/share/fonts/X11/Type1,
        built-ins
[ 25822.813] (==) ModulePath set to "/usr/lib/xorg/modules"
[ 25822.813] (II) The server relies on udev to provide the list of input devices.
        If no devices become available, reconfigure udev or disable AutoAddDevices.
[ 25822.813] (II) Loader magic: 0x557e780b7020
[ 25822.813] (II) Module ABI versions:
[ 25822.813]    X.Org ANSI C Emulation: 0.4
[ 25822.813]    X.Org Video Driver: 25.2
[ 25822.813]    X.Org XInput driver : 24.4
[ 25822.813]    X.Org Server Extension : 10.0
[ 25822.813] (--) using VT number 2

[ 25822.813] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[ 25822.814] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 25822.814] (II) Platform probe for /sys/devices/pci0000:00/0000:00:03.1/0000:07:00.0/drm/card0
[ 25822.830] (--) PCI:*(7@0:0:0) 1002:67df:1462:3418 rev 231, Mem @ 0xe0000000/268435456, 0xf0000000/2097152, 0xfce00000/262144, I/O @ 0x0000e000/256, BIOS @ 0x????????/131072
[ 25822.830] (II) LoadModule: "glx"
[ 25822.830] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 25822.831] (II) Module glx: vendor="X.Org Foundation"
[ 25822.831]    compiled for 1.21.1.3, module version = 1.0.0
[ 25822.831]    ABI class: X.Org Server Extension, version 10.0
[ 25822.831] (II) Applying OutputClass "AMDgpu" to /dev/dri/card0
[ 25822.831]    loading driver: amdgpu
[ 25822.831] (==) Matched amdgpu as autoconfigured driver 0
[ 25822.831] (==) Matched ati as autoconfigured driver 1
[ 25822.831] (==) Matched modesetting as autoconfigured driver 2
[ 25822.831] (==) Matched fbdev as autoconfigured driver 3
[ 25822.831] (==) Matched vesa as autoconfigured driver 4
[ 25822.831] (==) Assigned the driver to the xf86ConfigLayout
[ 25822.831] (II) LoadModule: "amdgpu"
[ 25822.831] (II) Loading /usr/lib/xorg/modules/drivers/amdgpu_drv.so
[ 25822.833] (II) Module amdgpu: vendor="X.Org Foundation"
[ 25822.833]    compiled for 1.21.1.3, module version = 22.0.0
[ 25822.833]    Module class: X.Org Video Driver
[ 25822.833]    ABI class: X.Org Video Driver, version 25.2
[ 25822.833] (II) LoadModule: "ati"
[ 25822.833] (II) Loading /usr/lib/xorg/modules/drivers/ati_drv.so
[ 25822.833] (II) Module ati: vendor="X.Org Foundation"
[ 25822.833]    compiled for 1.21.1.3, module version = 19.1.0
[ 25822.833]    Module class: X.Org Video Driver
[ 25822.833]    ABI class: X.Org Video Driver, version 25.2
[ 25822.841] (II) LoadModule: "modesetting"
[ 25822.841] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[ 25822.841] (II) Module modesetting: vendor="X.Org Foundation"
[ 25822.841]    compiled for 1.21.1.3, module version = 1.21.1
[ 25822.841]    Module class: X.Org Video Driver
[ 25822.841]    ABI class: X.Org Video Driver, version 25.2
[ 25822.841] (II) LoadModule: "fbdev"
[ 25822.841] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[ 25822.841] (II) Module fbdev: vendor="X.Org Foundation"
[ 25822.841]    compiled for 1.21.1.3, module version = 0.5.0
[ 25822.841]    Module class: X.Org Video Driver
[ 25822.841]    ABI class: X.Org Video Driver, version 25.2
[ 25822.841] (II) LoadModule: "vesa"
[ 25822.841] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so
[ 25822.841] (II) Module vesa: vendor="X.Org Foundation"
[ 25822.841]    compiled for 1.21.1.3, module version = 2.5.0
[ 25822.841]    Module class: X.Org Video Driver
[ 25822.841]    ABI class: X.Org Video Driver, version 25.2
[ 25822.841] (II) AMDGPU: Driver for AMD Radeon:
        All GPUs supported by the amdgpu kernel driver
[ 25822.841] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 25822.841] (II) FBDEV: driver for framebuffer: fbdev
[ 25822.841] (II) VESA: driver for VESA chipsets: vesa
[ 25822.868] (WW) Falling back to old probe method for modesetting
[ 25822.868] (WW) Falling back to old probe method for fbdev
[ 25822.868] (II) Loading sub module "fbdevhw"
[ 25822.868] (II) LoadModule: "fbdevhw"
[ 25822.868] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[ 25822.868] (II) Module fbdevhw: vendor="X.Org Foundation"
[ 25822.868]    compiled for 1.21.1.3, module version = 0.0.2
[ 25822.868]    ABI class: X.Org Video Driver, version 25.2
[ 25822.868] (II) AMDGPU(0): Creating default Display subsection in Screen section
        "Default Screen Section" for depth/fbbpp 24/32
[ 25822.868] (==) AMDGPU(0): Depth 24, (--) framebuffer bpp 32
[ 25822.868] (II) AMDGPU(0): Pixel depth = 24 bits stored in 4 bytes (32 bpp pixmaps)
[ 25822.868] (==) AMDGPU(0): Default visual is TrueColor
[ 25822.868] (==) AMDGPU(0): RGB weight 888
[ 25822.868] (II) AMDGPU(0): Using 8 bits per RGB (8 bit DAC)
[ 25822.868] (--) AMDGPU(0): Chipset: "AMD Radeon RX 580 Series" (ChipID = 0x67df)
[ 25822.868] (II) Loading sub module "fb"
[ 25822.868] (II) LoadModule: "fb"
[ 25822.868] (II) Module "fb" already built-in
[ 25822.869] (II) Loading sub module "dri2"
[ 25822.869] (II) LoadModule: "dri2"
[ 25822.869] (II) Module "dri2" already built-in
[ 25822.889] (EE)
[ 25822.889] (EE) Backtrace:
[ 25822.890] (EE) 0: /usr/lib/xorg/Xorg (OsLookupColor+0x139) [0x557e78028719]
[ 25822.890] (EE) 1: /lib/x86_64-linux-gnu/libc.so.6 (__sigaction+0x50) [0x7f2378ae6520]
[ 25822.891] (EE) 2: ? (?+0x0) [0x7ffe44a54138]
[ 25822.891] (EE)
[ 25822.891] (EE) Segmentation fault at address 0x7ffe44a54138
[ 25822.891] (EE)
Fatal server error:
[ 25822.891] (EE) Caught signal 11 (Segmentation fault). Server aborting
[ 25822.891] (EE)
[ 25822.891] (EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
[ 25822.891] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 25822.891] (EE)
[ 25822.926] (EE) Server terminated with error (1). Closing log file.

答案1

我能够重新进入 GUI。我不知道这是否是最好的解决方案,但它让我回到了可以登录和评估的地方。这也证实了我对它与驱动程序相关的怀疑。

我点击了回答关于 AMD 显卡驱动程序,你可以直接从 AMD 安装它们(我猜这些可能是专有驱动程序)。我最终找到了AMD 支持页面我可以选择我的显卡,然后下载一个 .deb 包进行安装。我使用 scp 将其复制到受影响的机器上,然后使用 dpkg 进行安装。

安装.deb 包后,我运行了amdgpu-install实际执行安装的脚本。amdgpu-install 文档

运行该程序后,我重新启动了计算机,然后登录界面出现了。所以我猜它现在正在工作,并且与图形驱动程序与某些东西发生冲突有关。

相关内容