Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Power off not working after upgrade drm-61-kmod-6.1.69_2 -> drm-61-kmod-6.1.92 #304

Open
jalvermark opened this issue Jun 5, 2024 · 8 comments
Labels
amdgpu amdgpu related problems bug Something isn't working

Comments

@jalvermark
Copy link

Describe the bug
My laptop does not power off when issuing "poweroff" or "shutdown -p now" when amdgpu.ko from drm-61-kmod-6.1.92 is loaded.
It worked before with drm-61-kmod-6.1.69_2

FreeBSD version
15.0-CURRENT FreeBSD 15.0-CURRENT #32 main-n270598-41dfea24eec2-dirty: Wed Jun 5 09:52:45 CEST 2024 root@bob:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG amd64 1500019 1500019

PCI Info

pciconf -lv

hostb0@pci0:0:0:0: class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x14e8 subvendor=0x17aa subdevice=0x50d0
vendor = 'Advanced Micro Devices, Inc. [AMD]'
class = bridge
subclass = HOST-PCI
none0@pci0:0:0:2: class=0x080600 rev=0x00 hdr=0x00 vendor=0x1022 device=0x14e9 subvendor=0x17aa subdevice=0x50d0
vendor = 'Advanced Micro Devices, Inc. [AMD]'
class = base peripheral
subclass = IOMMU
hostb1@pci0:0:1:0: class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x14ea subvendor=0x0000 subdevice=0x0000
vendor = 'Advanced Micro Devices, Inc. [AMD]'
class = bridge
subclass = HOST-PCI
hostb2@pci0:0:2:0: class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x14ea subvendor=0x0000 subdevice=0x0000
vendor = 'Advanced Micro Devices, Inc. [AMD]'
class = bridge
subclass = HOST-PCI
pcib1@pci0:0:2:2: class=0x060400 rev=0x00 hdr=0x01 vendor=0x1022 device=0x14ee subvendor=0x17aa subdevice=0x50d0
vendor = 'Advanced Micro Devices, Inc. [AMD]'
class = bridge
subclass = PCI-PCI
pcib2@pci0:0:2:4: class=0x060400 rev=0x00 hdr=0x01 vendor=0x1022 device=0x14ee subvendor=0x17aa subdevice=0x50d0
vendor = 'Advanced Micro Devices, Inc. [AMD]'
class = bridge
subclass = PCI-PCI
hostb3@pci0:0:3:0: class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x14ea subvendor=0x0000 subdevice=0x0000
vendor = 'Advanced Micro Devices, Inc. [AMD]'
class = bridge
subclass = HOST-PCI
pcib3@pci0:0:3:1: class=0x060400 rev=0x00 hdr=0x01 vendor=0x1022 device=0x14ef subvendor=0x1022 subdevice=0x1453
vendor = 'Advanced Micro Devices, Inc. [AMD]'
device = 'Family 19h USB4/Thunderbolt PCIe tunnel'
class = bridge
subclass = PCI-PCI
none1@pci0:0:3:2: class=0x000000 rev=0x00 hdr=0x00 vendor=0x0000 device=0x0000 subvendor=0x0000 subdevice=0x0000
class = old
subclass = non-VGA display device
none2@pci0:0:3:3: class=0x000000 rev=0x00 hdr=0x00 vendor=0x0000 device=0x0000 subvendor=0x0000 subdevice=0x0000
class = old
subclass = non-VGA display device
none3@pci0:0:3:4: class=0x000000 rev=0x00 hdr=0x00 vendor=0x0000 device=0x0000 subvendor=0x0000 subdevice=0x0000
class = old
subclass = non-VGA display device
hostb4@pci0:0:4:0: class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x14ea subvendor=0x0000 subdevice=0x0000
vendor = 'Advanced Micro Devices, Inc. [AMD]'
class = bridge
subclass = HOST-PCI
pcib4@pci0:0:4:1: class=0x060400 rev=0x00 hdr=0x01 vendor=0x1022 device=0x14ef subvendor=0x1022 subdevice=0x1453
vendor = 'Advanced Micro Devices, Inc. [AMD]'
device = 'Family 19h USB4/Thunderbolt PCIe tunnel'
class = bridge
subclass = PCI-PCI
hostb5@pci0:0:8:0: class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x14ea subvendor=0x0000 subdevice=0x0000
vendor = 'Advanced Micro Devices, Inc. [AMD]'
class = bridge
subclass = HOST-PCI
pcib5@pci0:0:8:1: class=0x060400 rev=0x00 hdr=0x01 vendor=0x1022 device=0x14eb subvendor=0x17aa subdevice=0x50d0
vendor = 'Advanced Micro Devices, Inc. [AMD]'
class = bridge
subclass = PCI-PCI
pcib6@pci0:0:8:2: class=0x060400 rev=0x00 hdr=0x01 vendor=0x1022 device=0x14eb subvendor=0x17aa subdevice=0x50d0
vendor = 'Advanced Micro Devices, Inc. [AMD]'
class = bridge
subclass = PCI-PCI
pcib7@pci0:0:8:3: class=0x060400 rev=0x00 hdr=0x01 vendor=0x1022 device=0x14eb subvendor=0x17aa subdevice=0x50d0
vendor = 'Advanced Micro Devices, Inc. [AMD]'
class = bridge
subclass = PCI-PCI
intsmb0@pci0:0:20:0: class=0x0c0500 rev=0x71 hdr=0x00 vendor=0x1022 device=0x790b subvendor=0x17aa subdevice=0x50d0
vendor = 'Advanced Micro Devices, Inc. [AMD]'
device = 'FCH SMBus Controller'
class = serial bus
subclass = SMBus
none4@pci0:0:20:3: class=0x060100 rev=0x51 hdr=0x00 vendor=0x1022 device=0x790e subvendor=0x17aa subdevice=0x50d0
vendor = 'Advanced Micro Devices, Inc. [AMD]'
device = 'FCH LPC Bridge'
class = bridge
subclass = PCI-ISA
hostb6@pci0:0:24:0: class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x14f0 subvendor=0x0000 subdevice=0x0000
vendor = 'Advanced Micro Devices, Inc. [AMD]'
class = bridge
subclass = HOST-PCI
hostb7@pci0:0:24:1: class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x14f1 subvendor=0x0000 subdevice=0x0000
vendor = 'Advanced Micro Devices, Inc. [AMD]'
class = bridge
subclass = HOST-PCI
hostb8@pci0:0:24:2: class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x14f2 subvendor=0x0000 subdevice=0x0000
vendor = 'Advanced Micro Devices, Inc. [AMD]'
class = bridge
subclass = HOST-PCI
hostb9@pci0:0:24:3: class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x14f3 subvendor=0x0000 subdevice=0x0000
vendor = 'Advanced Micro Devices, Inc. [AMD]'
class = bridge
subclass = HOST-PCI
hostb10@pci0:0:24:4: class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x14f4 subvendor=0x0000 subdevice=0x0000
vendor = 'Advanced Micro Devices, Inc. [AMD]'
class = bridge
subclass = HOST-PCI
hostb11@pci0:0:24:5: class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x14f5 subvendor=0x0000 subdevice=0x0000
vendor = 'Advanced Micro Devices, Inc. [AMD]'
class = bridge
subclass = HOST-PCI
hostb12@pci0:0:24:6: class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x14f6 subvendor=0x0000 subdevice=0x0000
vendor = 'Advanced Micro Devices, Inc. [AMD]'
class = bridge
subclass = HOST-PCI
hostb13@pci0:0:24:7: class=0x060000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x14f7 subvendor=0x0000 subdevice=0x0000
vendor = 'Advanced Micro Devices, Inc. [AMD]'
class = bridge
subclass = HOST-PCI
none5@pci0:1:0:0: class=0x028000 rev=0x01 hdr=0x00 vendor=0x17cb device=0x1103 subvendor=0x17aa subdevice=0x9309
vendor = 'Qualcomm Technologies, Inc'
device = 'QCNFA765 Wireless Network Adapter'
class = network
nvme0@pci0:2:0:0: class=0x010802 rev=0x01 hdr=0x00 vendor=0x1e0f device=0x0010 subvendor=0x1e0f subdevice=0x0001
vendor = 'KIOXIA Corporation'
device = 'NVMe SSD Controller XG8'
class = mass storage
subclass = NVM
vgapci0@pci0:195:0:0: class=0x030000 rev=0xdd hdr=0x00 vendor=0x1002 device=0x15bf subvendor=0x17aa subdevice=0x50d0
vendor = 'Advanced Micro Devices, Inc. [AMD/ATI]'
device = 'Phoenix1'
class = display
subclass = VGA
hdac0@pci0:195:0:1: class=0x040300 rev=0x00 hdr=0x00 vendor=0x1002 device=0x1640 subvendor=0x17aa subdevice=0x50d0
vendor = 'Advanced Micro Devices, Inc. [AMD/ATI]'
device = 'Rembrandt Radeon High Definition Audio Controller'
class = multimedia
subclass = HDA
none6@pci0:195:0:2: class=0x108000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x15c7 subvendor=0x17aa subdevice=0x50d0
vendor = 'Advanced Micro Devices, Inc. [AMD]'
device = 'Family 19h (Model 74h) CCP/PSP 3.0 Device'
class = encrypt/decrypt
xhci0@pci0:195:0:3: class=0x0c0330 rev=0x00 hdr=0x00 vendor=0x1022 device=0x15b9 subvendor=0x17aa subdevice=0x50d0
vendor = 'Advanced Micro Devices, Inc. [AMD]'
class = serial bus
subclass = USB
xhci1@pci0:195:0:4: class=0x0c0330 rev=0x00 hdr=0x00 vendor=0x1022 device=0x15ba subvendor=0x17aa subdevice=0x50d0
vendor = 'Advanced Micro Devices, Inc. [AMD]'
class = serial bus
subclass = USB
none7@pci0:195:0:5: class=0x048000 rev=0x63 hdr=0x00 vendor=0x1022 device=0x15e2 subvendor=0x17aa subdevice=0x50d0
vendor = 'Advanced Micro Devices, Inc. [AMD]'
device = 'ACP/ACP3X/ACP6x Audio Coprocessor'
class = multimedia
hdac1@pci0:195:0:6: class=0x040300 rev=0x00 hdr=0x00 vendor=0x1022 device=0x15e3 subvendor=0x17aa subdevice=0x50d0
vendor = 'Advanced Micro Devices, Inc. [AMD]'
device = 'Family 17h/19h HD Audio Controller'
class = multimedia
subclass = HDA
none8@pci0:196:0:0: class=0x130000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x14ec subvendor=0x17aa subdevice=0x50d0
vendor = 'Advanced Micro Devices, Inc. [AMD]'
class = non-essential instrumentation
none9@pci0:196:0:1: class=0x118000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x1502 subvendor=0x17aa subdevice=0x50d0
vendor = 'Advanced Micro Devices, Inc. [AMD]'
device = 'AMD IPU Device'
class = dasp
none10@pci0:197:0:0: class=0x130000 rev=0x00 hdr=0x00 vendor=0x1022 device=0x14ec subvendor=0x17aa subdevice=0x50d0
vendor = 'Advanced Micro Devices, Inc. [AMD]'
class = non-essential instrumentation
xhci2@pci0:197:0:3: class=0x0c0330 rev=0x00 hdr=0x00 vendor=0x1022 device=0x15c0 subvendor=0x17aa subdevice=0x50d0
vendor = 'Advanced Micro Devices, Inc. [AMD]'
class = serial bus
subclass = USB
xhci3@pci0:197:0:4: class=0x0c0330 rev=0x00 hdr=0x00 vendor=0x1022 device=0x15c1 subvendor=0x17aa subdevice=0x50d0
vendor = 'Advanced Micro Devices, Inc. [AMD]'
class = serial bus
subclass = USB
none11@pci0:197:0:5: class=0x0c0340 rev=0x00 hdr=0x00 vendor=0x1022 device=0x1668 subvendor=0x17aa subdevice=0x50d0
vendor = 'Advanced Micro Devices, Inc. [AMD]'
device = 'Pink Sardine USB4/Thunderbolt NHI controller'
class = serial bus
subclass = USB
none12@pci0:197:0:6: class=0x0c0340 rev=0x00 hdr=0x00 vendor=0x1022 device=0x1669 subvendor=0x17aa subdevice=0x50d0
vendor = 'Advanced Micro Devices, Inc. [AMD]'
device = 'Pink Sardine USB4/Thunderbolt NHI controller'
class = serial bus
subclass = USB

DRM KMOD version
drm-61-kmod 6.1.92

To Reproduce
Steps to reproduce the behavior:
Run "poweroff" or "shutdown -p now" while amdgpu.ko from drm-61-kmod 6.1.92 is loaded.

Screenshots
N/A

Additional context
Add any other context about the problem here.

@evadot evadot added bug Something isn't working amdgpu amdgpu related problems labels Jun 5, 2024
@evadot
Copy link
Contributor

evadot commented Jun 5, 2024

No problems here on my side, can you git bisect the 6.1-lts branch ?
Thanks.

@jalvermark
Copy link
Author

Bisecting points to this commit:
commit 2aaea5d (HEAD)
Author: Mario Limonciello [email protected]
Date: Thu May 2 13:32:17 2024 -0500

dm/amd/pm: Fix problems with reboot/shutdown for some SMU 13.0.4/13.0.11 use

rs

[ Upstream commit cd94d1b182d2986378550c9087571991bfee01d4 ]

Limit the workaround introduced by commit 31729e8c21ec ("drm/amd/pm: fixes
a random hang in S4 for SMU v13.0.4/11") to only run in the s4 path.

Cc: Tim Huang <[email protected]>
Fixes: 31729e8c21ec ("drm/amd/pm: fixes a random hang in S4 for SMU v13.0.4/11")
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3351
Signed-off-by: Mario Limonciello <[email protected]>
Acked-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>

diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c
index 21b374d121..5de3196131 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c
@@ -222,7 +222,7 @@ static int smu_v13_0_4_system_features_control(struct smu_context *smu, bool en)
struct amdgpu_device *adev = smu->adev;
int ret = 0;

  •   if (!en && !adev->in_s0ix) {
    
  •   if (!en && adev->in_s4) {
              /* Adds a GFX reset as workaround just before sending the
               * MP1_UNLOAD message to prevent GC/RLC/PMFW from entering
               * an invalid state.
    

@evadot
Copy link
Contributor

evadot commented Jun 6, 2024

So the supposed fix for the problem you're seeing is actually the bad commit ???

@jalvermark
Copy link
Author

Yes, it seems strange, but if i revert 2aaea5d it works as expected.

@bsdcode
Copy link

bsdcode commented Jul 6, 2024

I can confirm:

My minipc EliteMini UM780 XTX from Minisforum uses AMD Radeom 780M graphics (probably the same as @jalvermark because of device = Phoenix1 from pciconf -lv). I'm using FreeBSD 14.1-RELEASE-p2 with packages from the latest repository and I compiled the drm-61-kmod port from the main branch of the ports tree. The system hangs after poweroff and has to be shutdown via the power button on the minipc.

Reverting 2aaea5d fixes this issue.

@wulf7
Copy link
Contributor

wulf7 commented Jul 11, 2024

Probably fixed in Linux 7da44257e64d

@jalvermark
Copy link
Author

Probably fixed in Linux 7da44257e64d

I couldn't find that.

I did find torvalds/linux@267cace

I tested it and it works.

@bsdcode
Copy link

bsdcode commented Jul 18, 2024

I did find torvalds/linux@267cace

I tested it and it works.

I also tested this and I can confirm that it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
amdgpu amdgpu related problems bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants