我有一台集成 Intel 4600 HD 图形控制器的台式机。昨天我安装了 AMD Radeon RX 560 显卡,它在 Windows 中运行完美。但是当我在 ubuntu 22.04 中启动时,我看到的是空白屏幕而不是登录屏幕。我尝试从 amd 网站安装 amd gpu 驱动程序,但这并没有改变任何东西。这是 Xorg 文件显示的内容:
[ 277.843] xorg-server 2:21.1.4-2ubuntu1.7~22.04.2 (For technical support please see http://www.ubuntu.com/support)
[ 277.843] Current version of pixman: 0.40.0
[ 277.843] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 277.843] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 277.843] (==) Log file: "/var/lib/gdm3/.local/share/xorg/Xorg.0.log", Time: Sun Nov 19 18:09:14 2023
[ 277.843] (==) Using config directory: "/etc/X11/xorg.conf.d"
[ 277.843] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 277.843] (==) No Layout section. Using the first Screen section.
[ 277.843] (==) No screen section available. Using defaults.
[ 277.843] (**) |-->Screen "Default Screen Section" (0)
[ 277.843] (**) | |-->Monitor "<default monitor>"
[ 277.843] (==) No device specified for screen "Default Screen Section".
Using the first device section listed.
[ 277.843] (**) | |-->Device "Intel Graphics"
[ 277.843] (==) No monitor specified for screen "Default Screen Section".
Using a default monitor configuration.
[ 277.843] (==) Automatically adding devices
[ 277.843] (==) Automatically enabling devices
[ 277.843] (==) Automatically adding GPU devices
[ 277.843] (==) Automatically binding GPU devices
[ 277.843] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 277.843] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[ 277.843] Entry deleted from font path.
[ 277.843] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[ 277.843] Entry deleted from font path.
[ 277.843] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[ 277.843] Entry deleted from font path.
[ 277.843] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[ 277.843] Entry deleted from font path.
[ 277.843] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[ 277.843] Entry deleted from font path.
[ 277.843] (==) FontPath set to:
/usr/share/fonts/X11/misc,
/usr/share/fonts/X11/Type1,
built-ins
[ 277.843] (**) ModulePath set to "/opt/amdgpu-pro/lib/xorg/modules,/opt/amdgpu/lib/xorg/modules,/usr/lib/xorg/modules"
[ 277.843] (II) The server relies on udev to provide the list of input devices.
If no devices become available, reconfigure udev or disable AutoAddDevices.
[ 277.843] (II) Loader magic: 0x564dddfd3020
[ 277.843] (II) Module ABI versions:
[ 277.843] X.Org ANSI C Emulation: 0.4
[ 277.843] X.Org Video Driver: 25.2
[ 277.843] X.Org XInput driver : 24.4
[ 277.843] X.Org Server Extension : 10.0
[ 277.844] (++) using VT number 1
[ 277.845] (II) systemd-logind: took control of session /org/freedesktop/login1/session/c7
[ 277.846] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 277.846] (II) Platform probe for /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0
[ 277.846] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 14 paused 0
[ 277.846] (II) xfree86: Adding drm device (/dev/dri/card1)
[ 277.846] (II) Platform probe for /sys/devices/pci0000:00/0000:00:02.0/drm/card1
[ 277.847] (II) systemd-logind: got fd for /dev/dri/card1 226:1 fd 15 paused 0
[ 277.848] (--) PCI: (0@0:2:0) 8086:0412:1458:d000 rev 6, Mem @ 0xf7800000/4194304, 0xd0000000/268435456, I/O @ 0x0000f000/64, BIOS @ 0x????????/131072
[ 277.848] (--) PCI:*(1@0:0:0) 1002:67ff:1043:05eb rev 193, Mem @ 0xe0000000/268435456, 0xf0000000/2097152, 0xf7e00000/262144, I/O @ 0x0000e000/256, BIOS @ 0x????????/131072
[ 277.848] (II) LoadModule: "glx"
[ 277.848] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 277.849] (II) Module glx: vendor="X.Org Foundation"
[ 277.849] compiled for 1.21.1.4, module version = 1.0.0
[ 277.849] ABI class: X.Org Server Extension, version 10.0
[ 277.849] (II) LoadModule: "intel"
[ 277.849] (II) Loading /usr/lib/xorg/modules/drivers/intel_drv.so
[ 277.849] (II) Module intel: vendor="X.Org Foundation"
[ 277.849] compiled for 1.21.1.3, module version = 2.99.917
[ 277.849] Module class: X.Org Video Driver
[ 277.849] ABI class: X.Org Video Driver, version 25.2
[ 277.849] (II) intel: Driver for Intel(R) Integrated Graphics Chipsets:
i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G,
915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM,
Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,
GM45, 4 Series, G45/G43, Q45/Q43, G41, B43
[ 277.849] (II) intel: Driver for Intel(R) HD Graphics
[ 277.849] (II) intel: Driver for Intel(R) Iris(TM) Graphics
[ 277.849] (II) intel: Driver for Intel(R) Iris(TM) Pro Graphics
[ 277.849] xf86EnableIO: failed to enable I/O ports 0000-03ff (Operation not permitted)
[ 277.849] (II) intel(G0): Using Kernel Mode Setting driver: i915, version 1.6.0 20201103
[ 277.849] (II) intel(G0): SNA compiled: xserver-xorg-video-intel 2:2.99.917+git20210115-1 (Timo Aaltonen <[email protected]>)
[ 277.849] (II) intel(G0): SNA compiled for use with valgrind
[ 277.872] (EE) No devices detected.
[ 277.872] (II) Applying OutputClass "AMDgpu" to /dev/dri/card0
[ 277.872] loading driver: amdgpu
[ 277.872] (II) Applying OutputClass "AMDgpu" to /dev/dri/card0
[ 277.872] loading driver: amdgpu
[ 277.872] (==) Matched amdgpu as autoconfigured driver 0
[ 277.872] (==) Matched ati as autoconfigured driver 1
[ 277.872] (==) Matched modesetting as autoconfigured driver 2
[ 277.872] (==) Matched fbdev as autoconfigured driver 3
[ 277.872] (==) Matched vesa as autoconfigured driver 4
[ 277.872] (==) Assigned the driver to the xf86ConfigLayout
[ 277.872] (II) LoadModule: "amdgpu"
[ 277.872] (II) Loading /opt/amdgpu/lib/xorg/modules/drivers/amdgpu_drv.so
[ 277.872] (II) Module amdgpu: vendor="X.Org Foundation"
[ 277.872] compiled for 1.21.1.4, module version = 22.0.0
[ 277.872] Module class: X.Org Video Driver
[ 277.872] ABI class: X.Org Video Driver, version 25.2
[ 277.872] (II) LoadModule: "ati"
[ 277.872] (II) Loading /usr/lib/xorg/modules/drivers/ati_drv.so
[ 277.872] (II) Module ati: vendor="X.Org Foundation"
[ 277.872] compiled for 1.21.1.3, module version = 19.1.0
[ 277.872] Module class: X.Org Video Driver
[ 277.872] ABI class: X.Org Video Driver, version 25.2
[ 277.872] (II) LoadModule: "modesetting"
[ 277.872] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[ 277.872] (II) Module modesetting: vendor="X.Org Foundation"
[ 277.872] compiled for 1.21.1.4, module version = 1.21.1
[ 277.872] Module class: X.Org Video Driver
[ 277.872] ABI class: X.Org Video Driver, version 25.2
[ 277.872] (II) LoadModule: "fbdev"
[ 277.872] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[ 277.873] (II) Module fbdev: vendor="X.Org Foundation"
[ 277.873] compiled for 1.21.1.3, module version = 0.5.0
[ 277.873] Module class: X.Org Video Driver
[ 277.873] ABI class: X.Org Video Driver, version 25.2
[ 277.873] (II) LoadModule: "vesa"
[ 277.873] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so
[ 277.873] (II) Module vesa: vendor="X.Org Foundation"
[ 277.873] compiled for 1.21.1.3, module version = 2.5.0
[ 277.873] Module class: X.Org Video Driver
[ 277.873] ABI class: X.Org Video Driver, version 25.2
[ 277.873] (II) intel: Driver for Intel(R) Integrated Graphics Chipsets:
i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G,
915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM,
Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,
GM45, 4 Series, G45/G43, Q45/Q43, G41, B43
[ 277.873] (II) intel: Driver for Intel(R) HD Graphics
[ 277.873] (II) intel: Driver for Intel(R) Iris(TM) Graphics
[ 277.873] (II) intel: Driver for Intel(R) Iris(TM) Pro Graphics
[ 277.873] (II) AMDGPU: Driver for AMD Radeon:
All GPUs supported by the amdgpu kernel driver
[ 277.873] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 277.873] (II) FBDEV: driver for framebuffer: fbdev
[ 277.873] (II) VESA: driver for VESA chipsets: vesa
[ 277.873] xf86EnableIO: failed to enable I/O ports 0000-03ff (Operation not permitted)
[ 277.873] (WW) Falling back to old probe method for modesetting
[ 277.873] (WW) Falling back to old probe method for fbdev
[ 277.873] (WW) Falling back to old probe method for modesetting
[ 277.873] (WW) Falling back to old probe method for fbdev
[ 277.873] (EE) No devices detected.
[ 277.873] (EE)
Fatal server error:
[ 277.873] (EE) no screens found(EE)
[ 277.873] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[ 277.873] (EE) Please also check the log file at "/var/lib/gdm3/.local/share/xorg/Xorg.0.log" for additional information.
[ 277.873] (EE)
[ 277.878] (EE) Server terminated with error (1). Closing log file.```
答案1
我通过在 /etc/X11/xorg.conf 目录中添加以下内容的 10-amdgpu.conf 文件解决了我的问题:
Section "Device"
Identifier "AMDGPU"
Driver "amdgpu"
Option "TripleBuffer" "true"
Option "TearFree" "true"
Option "DRI" "true"
EndSection