freebsd / drm-kmod

drm driver for FreeBSD
158 stars 68 forks source link

GNOME extremely laggy (basically unusable) on amdgpu unless AccelMethod is None #115

Closed neelchauhan closed 6 months ago

neelchauhan commented 3 years ago

Describe the bug

Certain apps like GNOME and Wine 3D extremely laggy (basically unusable) on amdgpu unless AccelMethod is None in xorg.conf. In short, GNOME takes a while to load when it shouldn't.

FreeBSD version

FreeBSD envy.neelc.org 14.0-CURRENT FreeBSD 14.0-CURRENT #0 main-n249422-e51aabf8cbb: Thu Sep 16 07:54:14 UTC 2021     root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64

PCI Info

hostb0@pci0:0:0:0:    class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x1630 subvendor=0x103c subdevice=0x876e
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = 'Renoir/Cezanne Root Complex'
    class      = bridge
    subclass   = HOST-PCI
none0@pci0:0:0:2:    class=0x080600 rev=0x00 hdr=0x00 vendor=0x1022 device=0x1631 subvendor=0x103c subdevice=0x876e
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = 'Renoir/Cezanne IOMMU'
    class      = base peripheral
    subclass   = IOMMU
hostb1@pci0:0:1:0:    class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x1632 subvendor=0x0000 subdevice=0x0000
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = 'Renoir PCIe Dummy Host Bridge'
    class      = bridge
    subclass   = HOST-PCI
pcib1@pci0:0:1:3:    class=0x060400 rev=0x00 hdr=0x01 vendor=0x1022 device=0x1634 subvendor=0x1022 subdevice=0x1453
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = 'Renoir/Cezanne PCIe GPP Bridge'
    class      = bridge
    subclass   = PCI-PCI
hostb2@pci0:0:2:0:    class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x1632 subvendor=0x0000 subdevice=0x0000
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = 'Renoir PCIe Dummy Host Bridge'
    class      = bridge
    subclass   = HOST-PCI
pcib2@pci0:0:2:1:    class=0x060400 rev=0x00 hdr=0x01 vendor=0x1022 device=0x1634 subvendor=0x1022 subdevice=0x1453
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = 'Renoir/Cezanne PCIe GPP Bridge'
    class      = bridge
    subclass   = PCI-PCI
pcib3@pci0:0:2:3:    class=0x060400 rev=0x00 hdr=0x01 vendor=0x1022 device=0x1634 subvendor=0x1022 subdevice=0x1453
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = 'Renoir/Cezanne PCIe GPP Bridge'
    class      = bridge
    subclass   = PCI-PCI
hostb3@pci0:0:8:0:    class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x1632 subvendor=0x0000 subdevice=0x0000
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = 'Renoir PCIe Dummy Host Bridge'
    class      = bridge
    subclass   = HOST-PCI
pcib4@pci0:0:8:1:    class=0x060400 rev=0x00 hdr=0x01 vendor=0x1022 device=0x1635 subvendor=0x1022 subdevice=0x1635
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = 'Renoir Internal PCIe GPP Bridge to Bus'
    class      = bridge
    subclass   = PCI-PCI
intsmb0@pci0:0:20:0:    class=0x0c0500 rev=0x51 hdr=0x00 vendor=0x1022 device=0x790b subvendor=0x103c subdevice=0x876e
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = 'FCH SMBus Controller'
    class      = serial bus
    subclass   = SMBus
isab0@pci0:0:20:3:    class=0x060100 rev=0x51 hdr=0x00 vendor=0x1022 device=0x790e subvendor=0x103c subdevice=0x876e
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = 'FCH LPC Bridge'
    class      = bridge
    subclass   = PCI-ISA
hostb4@pci0:0:24:0:    class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x1448 subvendor=0x0000 subdevice=0x0000
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = 'Renoir Device 24: Function 0'
    class      = bridge
    subclass   = HOST-PCI
hostb5@pci0:0:24:1:    class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x1449 subvendor=0x0000 subdevice=0x0000
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = 'Renoir Device 24: Function 1'
    class      = bridge
    subclass   = HOST-PCI
hostb6@pci0:0:24:2:    class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x144a subvendor=0x0000 subdevice=0x0000
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = 'Renoir Device 24: Function 2'
    class      = bridge
    subclass   = HOST-PCI
hostb7@pci0:0:24:3:    class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x144b subvendor=0x0000 subdevice=0x0000
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = 'Renoir Device 24: Function 3'
    class      = bridge
    subclass   = HOST-PCI
hostb8@pci0:0:24:4:    class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x144c subvendor=0x0000 subdevice=0x0000
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = 'Renoir Device 24: Function 4'
    class      = bridge
    subclass   = HOST-PCI
hostb9@pci0:0:24:5:    class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x144d subvendor=0x0000 subdevice=0x0000
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = 'Renoir Device 24: Function 5'
    class      = bridge
    subclass   = HOST-PCI
hostb10@pci0:0:24:6:    class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x144e subvendor=0x0000 subdevice=0x0000
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = 'Renoir Device 24: Function 6'
    class      = bridge
    subclass   = HOST-PCI
hostb11@pci0:0:24:7:    class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x144f subvendor=0x0000 subdevice=0x0000
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = 'Renoir Device 24: Function 7'
    class      = bridge
    subclass   = HOST-PCI
none1@pci0:1:0:0:    class=0x028000 rev=0x1a hdr=0x00 vendor=0x8086 device=0x2723 subvendor=0x8086 subdevice=0x0084
    vendor     = 'Intel Corporation'
    device     = 'Wi-Fi 6 AX200'
    class      = network
rtsx0@pci0:2:0:0:    class=0xff0000 rev=0x01 hdr=0x00 vendor=0x10ec device=0x522a subvendor=0x103c subdevice=0x876e
    vendor     = 'Realtek Semiconductor Co., Ltd.'
    device     = 'RTS522A PCI Express Card Reader'
nvme0@pci0:3:0:0:    class=0x010802 rev=0x00 hdr=0x00 vendor=0x15b7 device=0x5006 subvendor=0x15b7 subdevice=0x5006
    vendor     = 'Sandisk Corp'
    device     = 'WD Black SN750 / PC SN730 NVMe SSD'
    class      = mass storage
    subclass   = NVM
vgapci0@pci0:4:0:0:    class=0x030000 rev=0xc2 hdr=0x00 vendor=0x1002 device=0x1636 subvendor=0x103c subdevice=0x876e
    vendor     = 'Advanced Micro Devices, Inc. [AMD/ATI]'
    device     = 'Renoir'
    class      = display
    subclass   = VGA
hdac0@pci0:4:0:1:    class=0x040300 rev=0x00 hdr=0x00 vendor=0x1002 device=0x1637 subvendor=0x103c subdevice=0x876e
    vendor     = 'Advanced Micro Devices, Inc. [AMD/ATI]'
    device     = 'Renoir Radeon High Definition Audio Controller'
    class      = multimedia
    subclass   = HDA
none2@pci0:4:0:2:    class=0x108000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x15df subvendor=0x103c subdevice=0x876e
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = 'Family 17h (Models 10h-1fh) Platform Security Processor'
    class      = encrypt/decrypt
xhci0@pci0:4:0:3:    class=0x0c0330 rev=0x00 hdr=0x00 vendor=0x1022 device=0x1639 subvendor=0x103c subdevice=0x876e
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = 'Renoir/Cezanne USB 3.1'
    class      = serial bus
    subclass   = USB
xhci1@pci0:4:0:4:    class=0x0c0330 rev=0x00 hdr=0x00 vendor=0x1022 device=0x1639 subvendor=0x103c subdevice=0x876e
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = 'Renoir/Cezanne USB 3.1'
    class      = serial bus
    subclass   = USB
none3@pci0:4:0:5:    class=0x048000 rev=0x01 hdr=0x00 vendor=0x1022 device=0x15e2 subvendor=0x103c subdevice=0x876e
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = 'Raven/Raven2/FireFlight/Renoir Audio Processor'
    class      = multimedia
hdac1@pci0:4:0:6:    class=0x040300 rev=0x00 hdr=0x00 vendor=0x1022 device=0x15e3 subvendor=0x103c subdevice=0x876e
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = 'Family 17h (Models 10h-1fh) HD Audio Controller'
    class      = multimedia
    subclass   = HDA
none4@pci0:4:0:7:    class=0x118000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x15e4 subvendor=0x103c subdevice=0x876e
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = 'Raven/Raven2/Renoir Sensor Fusion Hub'
    class      = dasp

DRM KMOD version

drm-devel-kmod 5.5.19.g20210909

This also happens on drm-kmod 5.4 and 5.6-wip, on both HP and Gateway laptops.

To Reproduce

Take an amdgpu-based PC, and install GNOME. You need to use gnome-shell in .xinitrc or .xsession as gdm isn't working correctly as of now.

You will see extreme lag where GNOME is unusable. Other desktops like KDE5/KF5 and XFCE4 work fine.

Screenshots

N/A

Additional context

I am using a HP Envy 13-ay0021nr. This also happened on a Gateway laptop using amdgpu (forgot which model).

This also happens on OpenBSD, but does not happen on Fedora (I believe 34).

evadot commented 3 years ago

Is that when using xf86-video-amdgpu ? Could you test mesa-devel too, that could be mesa-related.

evadot commented 3 years ago

This could also be something like https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=251836 where we don't support some stuff and mesa fallback to llvmpipe.

evadot commented 2 years ago

Is it still happening with latest drm-kmod ? Also you could test https://reviews.freebsd.org/D35269

grahamperrin commented 2 years ago

Also, FreeBSD bug 257810 – x11/gnome3(-lite) & x11/gdm lags significantly on amdgpu (possible duplicate of 253746).

evadot commented 6 months ago

Closing as no news from OP.