从 18.04 升级到 20.04 并使用其安装程序卸载 amdgpu-pro 后,我再也无法获得桌面环境。启动时,它会进入带有光标的黑屏并停留在那里。如果我按下 cntrl-alt-f2,我会得到一个 shell,然后我就可以登录了。
当我执行 startx 时,它会出现错误,以下是 xorg 日志:
$ cat .local/share/xorg/Xorg.0.log
[ 1099.264]
X.Org X Server 1.20.8
X Protocol Version 11, Revision 0
[ 1099.275] Build Operating System: Linux 4.4.0-177-generic x86_64 Ubuntu
[ 1099.277] Current Operating System: Linux ubuntu20 5.4.0-29-generic #33-Ubuntu SMP Wed Apr 29 14:32:27 UTC 2020 x86_64
[ 1099.278] Kernel command line: BOOT_IMAGE=/vmlinuz-5.4.0-29-generic root=UUID=799a4e09-9f5e-4ce7-b573-a15c04e6034e ro quiet splash
[ 1099.282] Build Date: 06 April 2020 09:39:29AM
[ 1099.284] xorg-server 2:1.20.8-2ubuntu2 (For technical support please see http://www.ubuntu.com/support)
[ 1099.286] Current version of pixman: 0.38.4
....
[ 1099.336] (EE) AIGLX error: dlopen of /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so failed (libsensors.so.4: cannot open shared object file: No such file or directory)
[ 1099.336] (EE) AIGLX error: unable to load driver swrast
[ 1099.336] (EE) GLX: could not load software renderer
[ 1099.336] (II) GLX: no usable GL providers found for screen 0
[ 1099.336] (II) Initializing extension XFree86-VidModeExtension
[ 1099.336] (II) Initializing extension XFree86-DGA
[ 1099.336] (II) Initializing extension XFree86-DRI
[ 1099.336] (II) Initializing extension DRI2
[ 1099.336] (II) AMDGPU(0): Setting screen physical size to 508 x 285
[ 1099.340] (EE)
[ 1099.340] (EE) Backtrace:
[ 1099.340] (EE) 0: /usr/lib/xorg/Xorg (OsLookupColor+0x13c) [0x563d637bedec]
[ 1099.340] (EE) 1: /lib/x86_64-linux-gnu/libpthread.so.0 (funlockfile+0x60) [0x7f8957ba541f]
[ 1099.340] (EE) 2: /lib/x86_64-linux-gnu/libc.so.6 (gsignal+0xcb) [0x7f89579e218b]
[ 1099.341] (EE) 3: /lib/x86_64-linux-gnu/libc.so.6 (abort+0x12b) [0x7f89579c1859]
[ 1099.341] (EE) unw_get_proc_name failed: no unwind info found [-10]
[ 1099.341] (EE) 4: /lib/x86_64-linux-gnu/libc.so.6 (?+0x0) [0x7f89579c171a]
[ 1099.341] (EE) 5: /lib/x86_64-linux-gnu/libc.so.6 (__assert_fail+0x46) [0x7f89579d2f36]
[ 1099.341] (EE) unw_get_proc_name failed: no unwind info found [-10]
[ 1099.341] (EE) 6: /usr/lib/xorg/modules/drivers/amdgpu_drv.so (?+0x0) [0x7f89571662d0]
[ 1099.341] (EE) unw_get_proc_name failed: no unwind info found [-10]
[ 1099.341] (EE) 7: /usr/lib/xorg/modules/drivers/amdgpu_drv.so (?+0x0) [0x7f89571664d0]
[ 1099.341] (EE) unw_get_proc_name failed: no unwind info found [-10]
[ 1099.341] (EE) 8: /usr/lib/xorg/modules/drivers/amdgpu_drv.so (?+0x0) [0x7f8957174750]
[ 1099.341] (EE) unw_get_proc_name failed: no unwind info found [-10]
[ 1099.341] (EE) 9: /usr/lib/xorg/modules/drivers/amdgpu_drv.so (?+0x0) [0x7f8957177630]
[ 1099.341] (EE) 10: /usr/lib/xorg/Xorg (MapWindow+0x20c) [0x563d6368a0bc]
[ 1099.341] (EE) 11: /usr/lib/xorg/Xorg (InitFonts+0x355) [0x563d63661f75]
[ 1099.341] (EE) 12: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xf3) [0x7f89579c30b3]
[ 1099.341] (EE) 13: /usr/lib/xorg/Xorg (_start+0x2e) [0x563d6364ba3e]
[ 1099.341] (EE)
[ 1099.341] (EE)
Fatal server error:
[ 1099.341] (EE) Caught signal 6 (Aborted). Server aborting
[ 1099.341] (EE)
[ 1099.341] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[ 1099.341] (EE) Please also check the log file at "/home/ubuntu/.local/share/xorg/Xorg.0.log" for additional information.
[ 1099.341] (EE)
[ 1099.353] (EE) Server terminated with error (1). Closing log file.
到目前为止我尝试过的事情:
sudo apt update && sudo apt upgrade -y
sudo apt install --reinstall xserver-xorg-video-radeon
sudo usermod -aG video ubuntu
$ dmesg | grep amd
[ 0.000000] Linux version 5.4.0-29-generic (buildd@lgw01-amd64-035) (gcc version 9.3.0 (Ubuntu 9.3.0-10ubuntu2)) #33-Ubuntu SMP Wed Apr 29 14:32:27 UTC 2020 (Ubuntu 5.4.0-29.33-generic 5.4.30)
[ 4.601167] [drm] amdgpu kernel modesetting enabled.
[ 4.601318] amdgpu 0000:01:00.0: remove_conflicting_pci_framebuffers: bar 0: 0xe0000000 -> 0xefffffff
[ 4.601318] amdgpu 0000:01:00.0: remove_conflicting_pci_framebuffers: bar 2: 0xf0000000 -> 0xf01fffff
[ 4.601319] amdgpu 0000:01:00.0: remove_conflicting_pci_framebuffers: bar 5: 0xf7e00000 -> 0xf7e3ffff
[ 4.601320] amdgpu 0000:01:00.0: vgaarb: deactivate vga console
[ 4.604295] amdgpu 0000:01:00.0: No more image in the PCI ROM
[ 4.604351] amdgpu 0000:01:00.0: VRAM: 8192M 0x000000F400000000 - 0x000000F5FFFFFFFF (8192M used)
[ 4.604352] amdgpu 0000:01:00.0: GART: 256M 0x000000FF00000000 - 0x000000FF0FFFFFFF
[ 4.604398] [drm] amdgpu: 8192M of VRAM memory ready
[ 4.604399] [drm] amdgpu: 8192M of GTT memory ready.
[ 4.605944] amdgpu: [powerplay] hwmgr_sw_init smu backed is polaris10_smu
[ 4.826564] fbcon: amdgpudrmfb (fb0) is primary device
[ 4.864650] amdgpu 0000:01:00.0: fb0: amdgpudrmfb frame buffer device
[ 4.880243] [drm] Initialized amdgpu 3.35.0 20150101 for 0000:01:00.0 on minor 0
[ 8.112991] snd_hda_intel 0000:01:00.1: bound 0000:01:00.0 (ops amdgpu_dm_audio_component_bind_ops [amdgpu])
$ sudo lshw -c video
*-display
description: VGA compatible controller
product: Ellesmere [Radeon RX 470/480/570/570X/580/580X/590]
vendor: Advanced Micro Devices, Inc. [AMD/ATI]
physical id: 0
bus info: pci@0000:01:00.0
version: ef
width: 64 bits
clock: 33MHz
capabilities: pm pciexpress msi vga_controller bus_master cap_list rom
configuration: driver=amdgpu latency=0
resources: irq:134 memory:e0000000-efffffff memory:f0000000-f01fffff ioport:e000(size=256) memory:f7e00000-f7e3ffff memory:c0000-dffff
答案1
你有
[ 1099.336] (EE) AIGLX 错误:/usr/lib/x86_64-linux-gnu/dri/swrast_dri.so 的 dlopen 失败(libsensors.so.4:无法打开共享对象文件:没有此文件或目录)
在错误中,尝试解决它之前
sudo apt install apt-file
sudo apt-file update
apt-file search swrast_dri.so
sudo apt install ilibgl1-mesa-dri
reboot
你已经更新了所有内容了吗?你有最新的内核 5.x 内核吗?