Ubuntu 24.04 上专用的 AMD 7900XT 没有 GPU 输出

Ubuntu 24.04 上专用的 AMD 7900XT 没有 GPU 输出

编辑:答案在下面的评论部分。

我有一台基本上有 2 个 GPU 的 PC。一个专用 GPU(AMD 7900 XT),一个集成 GPU(AMD Ryzen 7 7800X3D)。集成 GPU 运行完美。我遇到的问题是无法使用专用 GPU。我已经尝试更改主板中的 BIOS 设置以禁用集成显卡,但没有成功。结果仍然是黑屏。

我想要的是:使用我的专用 AMD 7900 XT 作为输出,而不是我的集成 AMD Ryzen 7 7800X3D。

这是输出xrandr --listproviders

Providers: number : 0

这是输出inxi -Fxxxrz

System:
  Kernel: 6.8.0-31-generic arch: x86_64 bits: 64 compiler: gcc v: 13.2.0
    clocksource: tsc
  Desktop: GNOME v: 46.0 tk: GTK v: 3.24.41 wm: gnome-shell
    tools: gsd-screensaver-proxy dm: GDM3 v: 46.0 Distro: Ubuntu 24.04 LTS
    (Noble Numbat)
Machine:
  Type: Desktop System: ASUS product: N/A v: N/A serial: <superuser required>
  Mobo: ASUSTeK model: TUF GAMING B650-PLUS WIFI v: Rev 1.xx
    serial: <superuser required> part-nu: SKU uuid: <superuser required>
    UEFI: American Megatrends v: 1811 date: 10/07/2023
Battery:
  Device-1: hidpp_battery_0 model: Logitech Wireless Mouse MX Master 2S
    serial: <filter> charge: 55% (should be ignored) rechargeable: yes
    status: discharging
  Device-2: wacom_battery_0 model: Wacom Intuos BT S serial: N/A
    charge: 100% status: discharging
CPU:
  Info: 8-core model: AMD Ryzen 7 7800X3D bits: 64 type: MT MCP smt: enabled
    arch: Zen 4 rev: 2 cache: L1: 512 KiB L2: 8 MiB L3: 96 MiB
  Speed (MHz): avg: 802 high: 3666 min/max: 400/5050 cores: 1: 400 2: 400
    3: 400 4: 400 5: 3666 6: 400 7: 400 8: 400 9: 400 10: 400 11: 400 12: 400
    13: 400 14: 400 15: 3575 16: 400 bogomips: 134390
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
  Device-1: AMD Navi 31 [Radeon RX 7900 XT/7900 XTX/7900M] vendor: ASRock
    driver: N/A arch: RDNA-3 pcie: speed: 16 GT/s lanes: 16 bus-ID: 03:00.0
    chip-ID: 1002:744c class-ID: 0300
  Device-2: AMD Raphael vendor: ASUSTeK driver: amdgpu v: kernel
    arch: RDNA-2 pcie: speed: 16 GT/s lanes: 16 ports: active: HDMI-A-1
    empty: DP-1,Writeback-1 bus-ID: 0e:00.0 chip-ID: 1002:164e class-ID: 0300
    temp: 37.0 C
  Device-3: Logitech StreamCam
    driver: hid-generic,snd-usb-audio,usbhid,uvcvideo type: USB rev: 3.2
    speed: 5 Gb/s lanes: 1 bus-ID: 2-1:2 chip-ID: 046d:0893 class-ID: 0300
    serial: <filter>
  Display: wayland server: X.org v: 1.21.1.11 with: Xwayland v: 23.2.6
    compositor: gnome-shell driver: X: loaded: radeon
    unloaded: fbdev,modesetting,vesa gpu: amdgpu display-ID: 0
  Monitor-1: HDMI-A-1 model: Samsung S24E650 serial: <filter> res: 1920x1080
    dpi: 94 size: 521x293mm (20.51x11.54") diag: 598mm (23.5") modes:
    max: 1920x1080 min: 720x400
  API: EGL v: 1.5 hw: drv: amd radeonsi platforms: device: 0 drv: radeonsi
    device: 1 drv: swrast surfaceless: drv: radeonsi wayland: drv: radeonsi x11:
    drv: radeonsi inactive: gbm
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 24.0.5-1ubuntu1
    glx-v: 1.4 direct-render: yes renderer: AMD Radeon Graphics (radeonsi
    raphael_mendocino LLVM 17.0.6 DRM 3.57 6.8.0-31-generic)
    device-ID: 1002:164e display-ID: :0.0
Audio:
  Device-1: AMD Navi 31 HDMI/DP Audio driver: snd_hda_intel v: kernel pcie:
    speed: 16 GT/s lanes: 16 bus-ID: 03:00.1 chip-ID: 1002:ab30 class-ID: 0403
  Device-2: AMD Rembrandt Radeon High Definition Audio vendor: ASUSTeK
    driver: snd_hda_intel v: kernel pcie: speed: 16 GT/s lanes: 16
    bus-ID: 0e:00.1 chip-ID: 1002:1640 class-ID: 0403
  Device-3: AMD Family 17h/19h HD Audio vendor: ASUSTeK
    driver: snd_hda_intel v: kernel pcie: speed: 16 GT/s lanes: 16
    bus-ID: 0e:00.6 chip-ID: 1022:15e3 class-ID: 0403
  Device-4: Logitech StreamCam
    driver: hid-generic,snd-usb-audio,usbhid,uvcvideo type: USB rev: 3.2
    speed: 5 Gb/s lanes: 1 bus-ID: 2-1:2 chip-ID: 046d:0893 class-ID: 0300
    serial: <filter>
  Device-5: Elgato Systems GmbH Wave:3 driver: snd-usb-audio type: USB
    rev: 2.0 speed: 12 Mb/s lanes: 1 bus-ID: 3-2:2 chip-ID: 0fd9:0070
    class-ID: fe01 serial: <filter>
  API: ALSA v: k6.8.0-31-generic status: kernel-api
  Server-1: PipeWire v: 1.0.5 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
Network:
  Device-1: Realtek RTL8125 2.5GbE vendor: ASUSTeK driver: r8169 v: kernel
    pcie: speed: 5 GT/s lanes: 1 port: d000 bus-ID: 0a:00.0 chip-ID: 10ec:8125
    class-ID: 0200
  IF: eno1 state: down mac: <filter>
  Device-2: Realtek RTL8852BE PCIe 802.11ax Wireless Network
    vendor: AzureWave driver: rtw89_8852be v: kernel pcie: speed: 2.5 GT/s
    lanes: 1 port: c000 bus-ID: 0b:00.0 chip-ID: 10ec:b852 class-ID: 0280
  IF: wlp11s0 state: up mac: <filter>
Bluetooth:
  Device-1: IMC Networks Bluetooth Radio driver: btusb v: 0.8 type: USB
    rev: 1.0 speed: 12 Mb/s lanes: 1 bus-ID: 1-5:3 chip-ID: 13d3:3571
    class-ID: e001 serial: <filter>
  Report: hciconfig ID: hci0 rfk-id: 0 state: up address: <filter> bt-v: 5.3
    lmp-v: 12 sub-v: b20f hci-v: 12 rev: dbc6 class-ID: 6c0104
Drives:
  Local Storage: total: 3.64 TiB used: 14.64 GiB (0.4%)
  ID-1: /dev/nvme0n1 vendor: Corsair model: MP600 CORE XT size: 3.64 TiB
    speed: 63.2 Gb/s lanes: 4 tech: SSD serial: <filter> fw-rev: ELFMC1.0
    temp: 31.9 C scheme: GPT
Partition:
  ID-1: / size: 1.88 TiB used: 14.61 GiB (0.8%) fs: ext4 dev: /dev/nvme0n1p5
  ID-2: /boot/efi size: 96 MiB used: 32.5 MiB (33.9%) fs: vfat
    dev: /dev/nvme0n1p1
Swap:
  ID-1: swap-1 type: file size: 8 GiB used: 0 KiB (0.0%) priority: -2
    file: /swap.img
Sensors:
  System Temperatures: cpu: 40.9 C mobo: N/A gpu: amdgpu temp: 37.0 C
  Fan Speeds (rpm): N/A
Repos:
  Packages: 1784 pm: dpkg pkgs: 1772 pm: snap pkgs: 12
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/ubuntu-esm-apps.sources
    1: deb https://esm.ubuntu.com/apps/ubuntu noble-apps-security main
  Active apt repos in: /etc/apt/sources.list.d/ubuntu-esm-infra.sources
    1: deb https://esm.ubuntu.com/infra/ubuntu noble-infra-security main
  Active apt repos in: /etc/apt/sources.list.d/ubuntu.sources
    1: deb http://ch.archive.ubuntu.com/ubuntu/ noble noble-updates noble-backports main restricted universe multiverse
    2: deb http://security.ubuntu.com/ubuntu/ noble-security main restricted universe multiverse
Info:
  Memory: total: 64 GiB available: 62.02 GiB used: 4.47 GiB (7.2%)
  Processes: 364 Power: uptime: 39m states: freeze,mem,disk suspend: deep
    wakeups: 0 hibernate: platform Init: systemd v: 255 target: graphical (5)
    default: graphical
  Compilers: N/A Shell: Bash v: 5.2.21 running-in: gnome-terminal
    inxi: 3.3.34

这是输出glxinfo -B

name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: AMD (0x1002)
    Device: AMD Radeon Graphics (radeonsi, raphael_mendocino, LLVM 17.0.6, DRM 3.57, 6.8.0-31-generic) (0x164e)
    Version: 24.0.5
    Accelerated: yes
    Video memory: 512MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 4.6
    Max compat profile version: 4.6
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
Memory info (GL_ATI_meminfo):
    VBO free memory - total: 98 MB, largest block: 98 MB
    VBO free aux. memory - total: 31467 MB, largest block: 31467 MB
    Texture free memory - total: 98 MB, largest block: 98 MB
    Texture free aux. memory - total: 31467 MB, largest block: 31467 MB
    Renderbuffer free memory - total: 98 MB, largest block: 98 MB
    Renderbuffer free aux. memory - total: 31467 MB, largest block: 31467 MB
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 512 MB
    Total available memory: 32263 MB
    Currently available dedicated video memory: 98 MB
OpenGL vendor string: AMD
OpenGL renderer string: AMD Radeon Graphics (radeonsi, raphael_mendocino, LLVM 17.0.6, DRM 3.57, 6.8.0-31-generic)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 24.0.5-1ubuntu1
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6 (Compatibility Profile) Mesa 24.0.5-1ubuntu1
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 24.0.5-1ubuntu1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

这是输出sudo lshw -c video

  *-display                 
       description: VGA compatible controller
       product: Navi 31 [Radeon RX 7900 XT/7900 XTX/7900M]
       vendor: Advanced Micro Devices, Inc. [AMD/ATI]
       physical id: 0
       bus info: pci@0000:03:00.0
       logical name: /dev/fb0
       version: cc
       width: 64 bits
       clock: 33MHz
       capabilities: pm pciexpress msi vga_controller cap_list fb
       configuration: depth=32 latency=0 mode=1920x1080 visual=truecolor xres=1920 yres=1080
       resources: iomemory:f00-eff iomemory:f80-f7f ioport:f000(size=256) memory:fcb00000-fcbfffff memory:fcc00000-fcc1ffff
  *-display
       description: VGA compatible controller
       product: Raphael
       vendor: Advanced Micro Devices, Inc. [AMD/ATI]
       physical id: 0
       bus info: pci@0000:0e:00.0
       logical name: /dev/fb0
       version: cb
       width: 64 bits
       clock: 33MHz
       capabilities: pm pciexpress msi msix vga_controller bus_master cap_list fb
       configuration: depth=32 driver=amdgpu latency=0 resolution=1920,1080
       resources: irq:79 memory:80000000-8fffffff memory:90000000-901fffff ioport:e000(size=256) memory:fc600000-fc67ffff

这是输出sudo dmesg | grep amdgpu

[    4.931840] [drm] amdgpu kernel modesetting enabled.
[    4.931858] amdgpu: vga_switcheroo: detected switching method \_SB_.PCI0.GP17.VGA_.ATPX handle
[    4.932039] amdgpu: ATPX version 1, functions 0x00000000
[    4.943564] amdgpu: Virtual CRAT table created for CPU
[    4.943576] amdgpu: Topology: Add CPU node
[    4.943673] amdgpu 0000:03:00.0: enabling device (0006 -> 0007)
[    4.948115] amdgpu 0000:03:00.0: amdgpu: Fetched VBIOS from VFCT
[    4.948119] amdgpu: ATOM BIOS: 113-D70401-103
[    4.956060] amdgpu 0000:03:00.0: amdgpu: CP RS64 enable
[    4.961590] amdgpu 0000:03:00.0: [drm:jpeg_v4_0_early_init [amdgpu]] JPEG decode is enabled in VM mode
[    4.963136] amdgpu 0000:03:00.0: amdgpu: Trusted Memory Zone (TMZ) feature not supported
[    4.963160] amdgpu 0000:03:00.0: amdgpu: MEM ECC is not presented.
[    4.963162] amdgpu 0000:03:00.0: amdgpu: SRAM ECC is not presented.
[    4.963203] amdgpu 0000:03:00.0: amdgpu: VRAM: 20464M 0x0000008000000000 - 0x00000084FEFFFFFF (20464M used)
[    4.963204] amdgpu 0000:03:00.0: amdgpu: GART: 512M 0x00007FFF00000000 - 0x00007FFF1FFFFFFF
[    4.963218] Modules linked in: binfmt_misc nls_iso8859_1 snd_hda_codec_realtek amdgpu(+) intel_rapl_msr intel_rapl_common snd_hda_codec_generic snd_hda_codec_hdmi snd_hda_intel snd_intel_dspcfg snd_intel_sdw_acpi snd_usb_audio snd_hda_codec snd_hda_core snd_usbmidi_lib snd_ump snd_hwdep edac_mce_amd rtw89_8852be rtw89_8852b snd_pcm kvm_amd rtw89_pci snd_seq_midi rtw89_core snd_seq_midi_event amdxcp kvm snd_rawmidi drm_exec uvcvideo gpu_sched irqbypass drm_buddy videobuf2_vmalloc crct10dif_pclmul drm_suballoc_helper uvc polyval_clmulni snd_seq videobuf2_memops drm_ttm_helper btusb polyval_generic mac80211 ghash_clmulni_intel videobuf2_v4l2 ttm sha256_ssse3 btrtl snd_seq_device sha1_ssse3 snd_timer btintel videodev aesni_intel drm_display_helper btbcm btmtk eeepc_wmi asus_nb_wmi mfd_aaeon crypto_simd bluetooth cryptd asus_wmi cec videobuf2_common snd ledtrig_audio sparse_keymap rc_core cfg80211 rapl ecdh_generic platform_profile wmi_bmof mc ccp i2c_piix4 k10temp i2c_algo_bit soundcore libarc4 ecc input_leds joydev
[    4.963346]  amdgpu_bo_init+0xbe/0x110 [amdgpu]
[    4.963514]  gmc_v11_0_sw_init+0x217/0x2a0 [amdgpu]
[    4.963674]  ? nbio_v4_3_enable_doorbell_aperture+0x5a/0x190 [amdgpu]
[    4.963822]  amdgpu_device_ip_init+0xeb/0x860 [amdgpu]
[    4.963972]  amdgpu_device_init+0x99f/0x1150 [amdgpu]
[    4.964115]  amdgpu_driver_load_kms+0x1a/0x1c0 [amdgpu]
[    4.964272]  amdgpu_pci_probe+0x1c1/0x600 [amdgpu]
[    4.964461]  ? __pfx_amdgpu_init+0x10/0x10 [amdgpu]
[    4.964605]  amdgpu_init+0x69/0xff0 [amdgpu]
[    4.964824] [drm:amdgpu_bo_init [amdgpu]] *ERROR* Unable to set WC memtype for the aperture base
[    4.964972] [drm:amdgpu_device_ip_init [amdgpu]] *ERROR* sw_init of IP block <gmc_v11_0> failed -22
[    4.965132] amdgpu 0000:03:00.0: amdgpu: amdgpu_device_ip_init failed
[    4.965134] amdgpu 0000:03:00.0: amdgpu: Fatal error during GPU init
[    4.965136] amdgpu 0000:03:00.0: amdgpu: amdgpu: finishing device.
[    4.965470] amdgpu: probe of 0000:03:00.0 failed with error -22
[    4.965863] amdgpu 0000:0e:00.0: enabling device (0006 -> 0007)
[    4.967563] amdgpu 0000:0e:00.0: amdgpu: Fetched VBIOS from VFCT
[    4.967565] amdgpu: ATOM BIOS: 102-RAPHAEL-008
[    4.997618] amdgpu 0000:0e:00.0: vgaarb: deactivate vga console
[    4.997621] amdgpu 0000:0e:00.0: amdgpu: Trusted Memory Zone (TMZ) feature disabled as experimental (default)
[    4.997649] amdgpu 0000:0e:00.0: amdgpu: VRAM: 512M 0x000000F400000000 - 0x000000F41FFFFFFF (512M used)
[    4.997651] amdgpu 0000:0e:00.0: amdgpu: GART: 1024M 0x0000000000000000 - 0x000000003FFFFFFF
[    4.997719] [drm] amdgpu: 512M of VRAM memory ready
[    4.997721] [drm] amdgpu: 31751M of GTT memory ready.
[    4.998464] amdgpu 0000:0e:00.0: amdgpu: Will use PSP to load VCN firmware
[    5.088398] amdgpu 0000:0e:00.0: amdgpu: RAS: optional ras ta ucode is not available
[    5.094241] amdgpu 0000:0e:00.0: amdgpu: RAP: optional rap ta ucode is not available
[    5.094244] amdgpu 0000:0e:00.0: amdgpu: SECUREDISPLAY: securedisplay ta ucode is not available
[    5.095419] amdgpu 0000:0e:00.0: amdgpu: SMU is initialized successfully!
[    5.096673] snd_hda_intel 0000:0e:00.1: bound 0000:0e:00.0 (ops amdgpu_dm_audio_component_bind_ops [amdgpu])
[    5.135951] amdgpu: HMM registered 512MB device memory
[    5.136901] kfd kfd: amdgpu: Allocated 3969056 bytes on gart
[    5.136913] kfd kfd: amdgpu: Total number of KFD nodes to be created: 1
[    5.137195] amdgpu: Virtual CRAT table created for GPU
[    5.137318] amdgpu: Topology: Add dGPU node [0x164e:0x1002]
[    5.137321] kfd kfd: amdgpu: added device 1002:164e
[    5.137332] amdgpu 0000:0e:00.0: amdgpu: SE 1, SH per SE 1, CU per SH 2, active_cu_number 2
[    5.137337] amdgpu 0000:0e:00.0: amdgpu: ring gfx_0.0.0 uses VM inv eng 0 on hub 0
[    5.137339] amdgpu 0000:0e:00.0: amdgpu: ring comp_1.0.0 uses VM inv eng 1 on hub 0
[    5.137341] amdgpu 0000:0e:00.0: amdgpu: ring comp_1.1.0 uses VM inv eng 4 on hub 0
[    5.137342] amdgpu 0000:0e:00.0: amdgpu: ring comp_1.2.0 uses VM inv eng 5 on hub 0
[    5.137344] amdgpu 0000:0e:00.0: amdgpu: ring comp_1.3.0 uses VM inv eng 6 on hub 0
[    5.137346] amdgpu 0000:0e:00.0: amdgpu: ring comp_1.0.1 uses VM inv eng 7 on hub 0
[    5.137347] amdgpu 0000:0e:00.0: amdgpu: ring comp_1.1.1 uses VM inv eng 8 on hub 0
[    5.137349] amdgpu 0000:0e:00.0: amdgpu: ring comp_1.2.1 uses VM inv eng 9 on hub 0
[    5.137351] amdgpu 0000:0e:00.0: amdgpu: ring comp_1.3.1 uses VM inv eng 10 on hub 0
[    5.137352] amdgpu 0000:0e:00.0: amdgpu: ring kiq_0.2.1.0 uses VM inv eng 11 on hub 0
[    5.137354] amdgpu 0000:0e:00.0: amdgpu: ring sdma0 uses VM inv eng 12 on hub 0
[    5.137356] amdgpu 0000:0e:00.0: amdgpu: ring vcn_dec_0 uses VM inv eng 0 on hub 8
[    5.137357] amdgpu 0000:0e:00.0: amdgpu: ring vcn_enc_0.0 uses VM inv eng 1 on hub 8
[    5.137359] amdgpu 0000:0e:00.0: amdgpu: ring vcn_enc_0.1 uses VM inv eng 4 on hub 8
[    5.137361] amdgpu 0000:0e:00.0: amdgpu: ring jpeg_dec uses VM inv eng 5 on hub 8
[    5.138175] [drm] Initialized amdgpu 3.57.0 20150101 for 0000:0e:00.0 on minor 1
[    5.143561] fbcon: amdgpudrmfb (fb0) is primary device
[    5.143565] amdgpu 0000:0e:00.0: [drm] fb0: amdgpudrmfb frame buffer device
[    5.390576] amdgpu 0000:0e:00.0: [drm] REG_WAIT timeout 1us * 100000 tries - optc31_disable_crtc line:136

对我来说最引人注目的是上述输出中的这一部分:

[    4.965132] amdgpu 0000:03:00.0: amdgpu: amdgpu_device_ip_init failed
[    4.965134] amdgpu 0000:03:00.0: amdgpu: Fatal error during GPU init
[    4.965136] amdgpu 0000:03:00.0: amdgpu: amdgpu: finishing device.
[    4.965470] amdgpu: probe of 0000:03:00.0 failed with error -22

不确定这是否意味着专用 GPU 没有加载或其他什么。

我已看到以下有关如何获取 AMD 7900XT 显卡的指南:https://forums.linuxmint.com/viewtopic.php?t=370633#AMD-7900

我没有遵循该指南,因为我使用的是较新的版本,其中内核大于6.0(它是6.8.0-31)并且 Mesa(至少在集成 GPU 上)大于22.0(它是24.0.5)。

我真的需要安装最新的固件吗?这里update-initramfs并按照指南中的解释进行操作?

答案1

解决方案是在 BIOS 设置中关闭可调整大小的 BAR(我有一块华硕主板)。

相关内容