Bug 217754 - System becomes hot when put to sleep
Summary: System becomes hot when put to sleep
Status: RESOLVED CODE_FIX
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Sleep-Wake (show other bugs)
Hardware: AMD Linux
: P3 high
Assignee: acpi_power-sleep-wake
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-03 05:47 UTC by Shubhra Prakash Nandi
Modified: 2023-08-25 19:06 UTC (History)
3 users (show)

See Also:
Kernel Version: 6.1.40 / 6.4.5
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Kernel log before and after sleep for version 6.1.39 (5.00 KB, text/plain)
2023-08-06 10:45 UTC, Shubhra Prakash Nandi
Details
Kernel log before and after sleep for version 6.1.40 (5.00 KB, text/plain)
2023-08-06 10:46 UTC, Shubhra Prakash Nandi
Details
Kernel 6.1.40 log messages from boot till first s2idle sleep (31.33 KB, text/plain)
2023-08-12 11:37 UTC, Shubhra Prakash Nandi
Details
Kernel 6.1.39 log messages from boot till first s2idle sleep (31.91 KB, text/plain)
2023-08-12 12:01 UTC, Shubhra Prakash Nandi
Details
amd_s2idle.py debug log for kernel 6.1.39 (40.96 KB, text/plain)
2023-08-12 12:20 UTC, Shubhra Prakash Nandi
Details
amd_s2idle.py debug log for kernel 6.1.40 (27.30 KB, text/plain)
2023-08-12 12:20 UTC, Shubhra Prakash Nandi
Details
amd_s2idle.py debug log for kernel 6.1.40 (50.69 KB, text/plain)
2023-08-12 20:07 UTC, Shubhra Prakash Nandi
Details
amd_s2idle.py debug log for kernel 6.1.39 (64.36 KB, text/plain)
2023-08-12 20:30 UTC, Shubhra Prakash Nandi
Details
amd_s2idle.py debug log for kernel 6.1.39 (308.06 KB, text/plain)
2023-08-12 21:10 UTC, Shubhra Prakash Nandi
Details
amd_s2idle.py debug log for kernel 6.1.40 (283.48 KB, text/plain)
2023-08-12 21:20 UTC, Shubhra Prakash Nandi
Details
ACPI dump of Dell Inspiron 14 5425 (947.56 KB, text/plain)
2023-08-15 07:43 UTC, Shubhra Prakash Nandi
Details
potential patch (v1) (2.72 KB, patch)
2023-08-17 17:40 UTC, Mario Limonciello (AMD)
Details | Diff
6.1.40 patch 01 (1.27 KB, patch)
2023-08-17 18:23 UTC, Shubhra Prakash Nandi
Details | Diff
6.1.40 working patch (1.27 KB, patch)
2023-08-19 06:31 UTC, Shubhra Prakash Nandi
Details | Diff

Description Shubhra Prakash Nandi 2023-08-03 05:47:51 UTC
I have a Dell Inspiron 14 5425 laptop with hardware specified below. Up till kernel version 6.1.39 the system can sleep and resume correctly but with kernel version 6.1.40 it heats up when put to sleep and drains battery very quickly. It seems CPU cannot suspend though the system can resume correctly and functions correctly after that. I believe many GPIO and pinctrl patches/fixes for the AMD platform beginning 6.1.40 and 6.4.5 has caused this issue. There is no error in logs and sleep/resume log messages in both 6.1.39 and 6.1.40 are the same. Only s2idle sleep mode is available on my system.

-- CPU
AMD Ryzen 5 5625U with Radeon Graphics

-- PCI
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Root Complex
	Subsystem: Dell Renoir Root Complex
	Flags: fast devsel

00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Renoir IOMMU
	Subsystem: Dell Renoir IOMMU
	Flags: bus master, fast devsel, latency 0, IRQ -2147483648
	Capabilities: <access denied>

00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
	Flags: fast devsel, IOMMU group 0

00:01.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe GPP Bridge (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0, IRQ 34, IOMMU group 1
	Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
	I/O behind bridge: 00002000-00002fff [size=4K]
	Memory behind bridge: d0600000-d07fffff [size=2M]
	Prefetchable memory behind bridge: 0000000450200000-00000004503fffff [size=2M]
	Capabilities: <access denied>
	Kernel driver in use: pcieport

00:01.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe GPP Bridge (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0, IRQ 35, IOMMU group 2
	Bus: primary=00, secondary=02, subordinate=02, sec-latency=0
	I/O behind bridge: [disabled]
	Memory behind bridge: d0500000-d05fffff [size=1M]
	Prefetchable memory behind bridge: [disabled]
	Capabilities: <access denied>
	Kernel driver in use: pcieport

00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
	Flags: fast devsel, IOMMU group 3

00:02.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe GPP Bridge (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0, IRQ 36, IOMMU group 4
	Bus: primary=00, secondary=03, subordinate=03, sec-latency=0
	I/O behind bridge: [disabled]
	Memory behind bridge: [disabled]
	Prefetchable memory behind bridge: 000000fcf0200000-000000fcf03fffff [size=2M]
	Capabilities: <access denied>
	Kernel driver in use: pcieport

00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
	Flags: fast devsel, IOMMU group 5

00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir Internal PCIe GPP Bridge to Bus (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0, IRQ 37, IOMMU group 6
	Bus: primary=00, secondary=04, subordinate=04, sec-latency=0
	I/O behind bridge: 00001000-00001fff [size=4K]
	Memory behind bridge: d0100000-d04fffff [size=4M]
	Prefetchable memory behind bridge: 000000fce0000000-000000fcf01fffff [size=258M]
	Capabilities: <access denied>
	Kernel driver in use: pcieport

00:08.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir Internal PCIe GPP Bridge to Bus (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0, IRQ 38, IOMMU group 7
	Bus: primary=00, secondary=05, subordinate=05, sec-latency=0
	I/O behind bridge: [disabled]
	Memory behind bridge: d0000000-d00fffff [size=1M]
	Prefetchable memory behind bridge: [disabled]
	Capabilities: <access denied>
	Kernel driver in use: pcieport

00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 51)
	Subsystem: Dell FCH SMBus Controller
	Flags: 66MHz, medium devsel, IOMMU group 8
	Kernel driver in use: piix4_smbus
	Kernel modules: i2c_piix4, sp5100_tco

00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51)
	Subsystem: Dell FCH LPC Bridge
	Flags: bus master, 66MHz, medium devsel, latency 0, IOMMU group 8

00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 166a
	Flags: fast devsel, IOMMU group 9

00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 166b
	Flags: fast devsel, IOMMU group 9

00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 166c
	Flags: fast devsel, IOMMU group 9

00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 166d
	Flags: fast devsel, IOMMU group 9
	Kernel driver in use: k10temp
	Kernel modules: k10temp

00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 166e
	Flags: fast devsel, IOMMU group 9

00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 166f
	Flags: fast devsel, IOMMU group 9

00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 1670
	Flags: fast devsel, IOMMU group 9

00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 1671
	Flags: fast devsel, IOMMU group 9

02:00.0 Non-Volatile memory controller: KIOXIA Corporation Device 000c (prog-if 02 [NVM Express])
	Subsystem: KIOXIA Corporation Device 0001
	Flags: bus master, fast devsel, latency 0, IRQ 58, NUMA node 0, IOMMU group 10
	Memory at d0500000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: <access denied>
	Kernel driver in use: nvme
	Kernel modules: nvme

03:00.0 Network controller: MEDIATEK Corp. Device 7961
	Subsystem: Foxconn International, Inc. Device e0b7
	Flags: bus master, fast devsel, latency 0, IRQ 85, IOMMU group 11
	Memory at fcf0200000 (64-bit, prefetchable) [size=1M]
	Memory at fcf0300000 (64-bit, prefetchable) [size=16K]
	Memory at fcf0304000 (64-bit, prefetchable) [size=4K]
	Capabilities: <access denied>
	Kernel driver in use: mt7921e
	Kernel modules: mt7921e

04:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Device 15e7 (rev c2) (prog-if 00 [VGA controller])
	Subsystem: Dell Device 0b46
	Flags: bus master, fast devsel, latency 0, IRQ 49, IOMMU group 12
	Memory at fce0000000 (64-bit, prefetchable) [size=256M]
	Memory at fcf0000000 (64-bit, prefetchable) [size=2M]
	I/O ports at 1000 [size=256]
	Memory at d0400000 (32-bit, non-prefetchable) [size=512K]
	Capabilities: <access denied>
	Kernel driver in use: amdgpu
	Kernel modules: amdgpu

04:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Device 1637
	Subsystem: Dell Device 0b46
	Flags: bus master, fast devsel, latency 0, IRQ 83, IOMMU group 13
	Memory at d04c8000 (32-bit, non-prefetchable) [size=16K]
	Capabilities: <access denied>
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel

04:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) Platform Security Processor
	Subsystem: Dell Family 17h (Models 10h-1fh) Platform Security Processor
	Flags: bus master, fast devsel, latency 0, IRQ 77, IOMMU group 14
	Memory at d0300000 (32-bit, non-prefetchable) [size=1M]
	Memory at d04cc000 (32-bit, non-prefetchable) [size=8K]
	Capabilities: <access denied>
	Kernel driver in use: ccp
	Kernel modules: ccp

04:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Renoir USB 3.1 (prog-if 30 [XHCI])
	Subsystem: Dell Renoir USB 3.1
	Flags: fast devsel, IRQ 40, IOMMU group 15
	Memory at d0100000 (64-bit, non-prefetchable) [size=1M]
	Capabilities: <access denied>
	Kernel driver in use: xhci_hcd
	Kernel modules: xhci_pci

04:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Renoir USB 3.1 (prog-if 30 [XHCI])
	Subsystem: Dell Renoir USB 3.1
	Flags: bus master, fast devsel, latency 0, IRQ 49, IOMMU group 16
	Memory at d0200000 (64-bit, non-prefetchable) [size=1M]
	Capabilities: <access denied>
	Kernel driver in use: xhci_hcd
	Kernel modules: xhci_pci

04:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD] Raven/Raven2/FireFlight/Renoir Audio Processor (rev 01)
	Subsystem: Dell Raven/Raven2/FireFlight/Renoir Audio Processor
	Flags: bus master, fast devsel, latency 0, IRQ 81, IOMMU group 17
	Memory at d0480000 (32-bit, non-prefetchable) [size=256K]
	Capabilities: <access denied>
	Kernel driver in use: snd_rn_pci_acp3x
	Kernel modules: snd_pci_acp3x, snd_rn_pci_acp3x, snd_pci_acp5x, snd_pci_acp6x

04:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) HD Audio Controller
	Subsystem: Dell Family 17h (Models 10h-1fh) HD Audio Controller
	Flags: bus master, fast devsel, latency 0, IRQ 59, IOMMU group 18
	Memory at d04c0000 (32-bit, non-prefetchable) [size=32K]
	Capabilities: <access denied>
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel

05:00.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 81) (prog-if 01 [AHCI 1.0])
	Flags: bus master, fast devsel, latency 0, IRQ 255, IOMMU group 19
	Memory at d0001000 (32-bit, non-prefetchable) [size=2K]
	Capabilities: <access denied>
	Kernel modules: ahci

05:00.1 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 81) (prog-if 01 [AHCI 1.0])
	Flags: bus master, fast devsel, latency 0, IRQ 255, IOMMU group 20
	Memory at d0000000 (32-bit, non-prefetchable) [size=2K]
	Capabilities: <access denied>
	Kernel modules: ahci

-- USB
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 0489:e0c8 Foxconn / Hon Hai Wireless_Device
Bus 003 Device 004: ID 17ef:608d Lenovo Optical Mouse
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 0c45:6739 Microdia Integrated_Webcam_FHD
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Comment 1 Bagas Sanjaya 2023-08-03 14:15:18 UTC
(In reply to Shubhra Prakash Nandi from comment #0)
> I have a Dell Inspiron 14 5425 laptop with hardware specified below. Up till
> kernel version 6.1.39 the system can sleep and resume correctly but with
> kernel version 6.1.40 it heats up when put to sleep and drains battery very
> quickly. It seems CPU cannot suspend though the system can resume correctly
> and functions correctly after that. I believe many GPIO and pinctrl
> patches/fixes for the AMD platform beginning 6.1.40 and 6.4.5 has caused
> this issue. There is no error in logs and sleep/resume log messages in both
> 6.1.39 and 6.1.40 are the same. Only s2idle sleep mode is available on my
> system.
> 
> -- CPU
> AMD Ryzen 5 5625U with Radeon Graphics
> 
> -- PCI
> 00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Root Complex
>       Subsystem: Dell Renoir Root Complex
>       Flags: fast devsel
> 
> 00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Renoir IOMMU
>       Subsystem: Dell Renoir IOMMU
>       Flags: bus master, fast devsel, latency 0, IRQ -2147483648
>       Capabilities: <access denied>
> 
> 00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy
> Host Bridge
>       Flags: fast devsel, IOMMU group 0
> 
> 00:01.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe GPP
> Bridge (prog-if 00 [Normal decode])
>       Flags: bus master, fast devsel, latency 0, IRQ 34, IOMMU group 1
>       Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
>       I/O behind bridge: 00002000-00002fff [size=4K]
>       Memory behind bridge: d0600000-d07fffff [size=2M]
>       Prefetchable memory behind bridge: 0000000450200000-00000004503fffff
> [size=2M]
>       Capabilities: <access denied>
>       Kernel driver in use: pcieport
> 
> 00:01.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe GPP
> Bridge (prog-if 00 [Normal decode])
>       Flags: bus master, fast devsel, latency 0, IRQ 35, IOMMU group 2
>       Bus: primary=00, secondary=02, subordinate=02, sec-latency=0
>       I/O behind bridge: [disabled]
>       Memory behind bridge: d0500000-d05fffff [size=1M]
>       Prefetchable memory behind bridge: [disabled]
>       Capabilities: <access denied>
>       Kernel driver in use: pcieport
> 
> 00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy
> Host Bridge
>       Flags: fast devsel, IOMMU group 3
> 
> 00:02.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe GPP
> Bridge (prog-if 00 [Normal decode])
>       Flags: bus master, fast devsel, latency 0, IRQ 36, IOMMU group 4
>       Bus: primary=00, secondary=03, subordinate=03, sec-latency=0
>       I/O behind bridge: [disabled]
>       Memory behind bridge: [disabled]
>       Prefetchable memory behind bridge: 000000fcf0200000-000000fcf03fffff
> [size=2M]
>       Capabilities: <access denied>
>       Kernel driver in use: pcieport
> 
> 00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy
> Host Bridge
>       Flags: fast devsel, IOMMU group 5
> 
> 00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir Internal PCIe
> GPP Bridge to Bus (prog-if 00 [Normal decode])
>       Flags: bus master, fast devsel, latency 0, IRQ 37, IOMMU group 6
>       Bus: primary=00, secondary=04, subordinate=04, sec-latency=0
>       I/O behind bridge: 00001000-00001fff [size=4K]
>       Memory behind bridge: d0100000-d04fffff [size=4M]
>       Prefetchable memory behind bridge: 000000fce0000000-000000fcf01fffff
> [size=258M]
>       Capabilities: <access denied>
>       Kernel driver in use: pcieport
> 
> 00:08.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir Internal PCIe
> GPP Bridge to Bus (prog-if 00 [Normal decode])
>       Flags: bus master, fast devsel, latency 0, IRQ 38, IOMMU group 7
>       Bus: primary=00, secondary=05, subordinate=05, sec-latency=0
>       I/O behind bridge: [disabled]
>       Memory behind bridge: d0000000-d00fffff [size=1M]
>       Prefetchable memory behind bridge: [disabled]
>       Capabilities: <access denied>
>       Kernel driver in use: pcieport
> 
> 00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev
> 51)
>       Subsystem: Dell FCH SMBus Controller
>       Flags: 66MHz, medium devsel, IOMMU group 8
>       Kernel driver in use: piix4_smbus
>       Kernel modules: i2c_piix4, sp5100_tco
> 
> 00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev
> 51)
>       Subsystem: Dell FCH LPC Bridge
>       Flags: bus master, 66MHz, medium devsel, latency 0, IOMMU group 8
> 
> 00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 166a
>       Flags: fast devsel, IOMMU group 9
> 
> 00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 166b
>       Flags: fast devsel, IOMMU group 9
> 
> 00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 166c
>       Flags: fast devsel, IOMMU group 9
> 
> 00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 166d
>       Flags: fast devsel, IOMMU group 9
>       Kernel driver in use: k10temp
>       Kernel modules: k10temp
> 
> 00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 166e
>       Flags: fast devsel, IOMMU group 9
> 
> 00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 166f
>       Flags: fast devsel, IOMMU group 9
> 
> 00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 1670
>       Flags: fast devsel, IOMMU group 9
> 
> 00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 1671
>       Flags: fast devsel, IOMMU group 9
> 
> 02:00.0 Non-Volatile memory controller: KIOXIA Corporation Device 000c
> (prog-if 02 [NVM Express])
>       Subsystem: KIOXIA Corporation Device 0001
>       Flags: bus master, fast devsel, latency 0, IRQ 58, NUMA node 0, IOMMU
> group
> 10
>       Memory at d0500000 (64-bit, non-prefetchable) [size=16K]
>       Capabilities: <access denied>
>       Kernel driver in use: nvme
>       Kernel modules: nvme
> 
> 03:00.0 Network controller: MEDIATEK Corp. Device 7961
>       Subsystem: Foxconn International, Inc. Device e0b7
>       Flags: bus master, fast devsel, latency 0, IRQ 85, IOMMU group 11
>       Memory at fcf0200000 (64-bit, prefetchable) [size=1M]
>       Memory at fcf0300000 (64-bit, prefetchable) [size=16K]
>       Memory at fcf0304000 (64-bit, prefetchable) [size=4K]
>       Capabilities: <access denied>
>       Kernel driver in use: mt7921e
>       Kernel modules: mt7921e
> 
> 04:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI]
> Device 15e7 (rev c2) (prog-if 00 [VGA controller])
>       Subsystem: Dell Device 0b46
>       Flags: bus master, fast devsel, latency 0, IRQ 49, IOMMU group 12
>       Memory at fce0000000 (64-bit, prefetchable) [size=256M]
>       Memory at fcf0000000 (64-bit, prefetchable) [size=2M]
>       I/O ports at 1000 [size=256]
>       Memory at d0400000 (32-bit, non-prefetchable) [size=512K]
>       Capabilities: <access denied>
>       Kernel driver in use: amdgpu
>       Kernel modules: amdgpu
> 
> 04:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Device 1637
>       Subsystem: Dell Device 0b46
>       Flags: bus master, fast devsel, latency 0, IRQ 83, IOMMU group 13
>       Memory at d04c8000 (32-bit, non-prefetchable) [size=16K]
>       Capabilities: <access denied>
>       Kernel driver in use: snd_hda_intel
>       Kernel modules: snd_hda_intel
> 
> 04:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Family 17h
> (Models 10h-1fh) Platform Security Processor
>       Subsystem: Dell Family 17h (Models 10h-1fh) Platform Security Processor
>       Flags: bus master, fast devsel, latency 0, IRQ 77, IOMMU group 14
>       Memory at d0300000 (32-bit, non-prefetchable) [size=1M]
>       Memory at d04cc000 (32-bit, non-prefetchable) [size=8K]
>       Capabilities: <access denied>
>       Kernel driver in use: ccp
>       Kernel modules: ccp
> 
> 04:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Renoir USB 3.1
> (prog-if 30 [XHCI])
>       Subsystem: Dell Renoir USB 3.1
>       Flags: fast devsel, IRQ 40, IOMMU group 15
>       Memory at d0100000 (64-bit, non-prefetchable) [size=1M]
>       Capabilities: <access denied>
>       Kernel driver in use: xhci_hcd
>       Kernel modules: xhci_pci
> 
> 04:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Renoir USB 3.1
> (prog-if 30 [XHCI])
>       Subsystem: Dell Renoir USB 3.1
>       Flags: bus master, fast devsel, latency 0, IRQ 49, IOMMU group 16
>       Memory at d0200000 (64-bit, non-prefetchable) [size=1M]
>       Capabilities: <access denied>
>       Kernel driver in use: xhci_hcd
>       Kernel modules: xhci_pci
> 
> 04:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD]
> Raven/Raven2/FireFlight/Renoir Audio Processor (rev 01)
>       Subsystem: Dell Raven/Raven2/FireFlight/Renoir Audio Processor
>       Flags: bus master, fast devsel, latency 0, IRQ 81, IOMMU group 17
>       Memory at d0480000 (32-bit, non-prefetchable) [size=256K]
>       Capabilities: <access denied>
>       Kernel driver in use: snd_rn_pci_acp3x
>       Kernel modules: snd_pci_acp3x, snd_rn_pci_acp3x, snd_pci_acp5x,
> snd_pci_acp6x
> 
> 04:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h (Models
> 10h-1fh) HD Audio Controller
>       Subsystem: Dell Family 17h (Models 10h-1fh) HD Audio Controller
>       Flags: bus master, fast devsel, latency 0, IRQ 59, IOMMU group 18
>       Memory at d04c0000 (32-bit, non-prefetchable) [size=32K]
>       Capabilities: <access denied>
>       Kernel driver in use: snd_hda_intel
>       Kernel modules: snd_hda_intel
> 
> 05:00.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA
> Controller [AHCI mode] (rev 81) (prog-if 01 [AHCI 1.0])
>       Flags: bus master, fast devsel, latency 0, IRQ 255, IOMMU group 19
>       Memory at d0001000 (32-bit, non-prefetchable) [size=2K]
>       Capabilities: <access denied>
>       Kernel modules: ahci
> 
> 05:00.1 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA
> Controller [AHCI mode] (rev 81) (prog-if 01 [AHCI 1.0])
>       Flags: bus master, fast devsel, latency 0, IRQ 255, IOMMU group 20
>       Memory at d0000000 (32-bit, non-prefetchable) [size=2K]
>       Capabilities: <access denied>
>       Kernel modules: ahci
> 
> -- USB
> Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
> Bus 003 Device 003: ID 0489:e0c8 Foxconn / Hon Hai Wireless_Device
> Bus 003 Device 004: ID 17ef:608d Lenovo Optical Mouse
> Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
> Bus 001 Device 002: ID 0c45:6739 Microdia Integrated_Webcam_FHD
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Can you do bisection between v6.1.39 and v6.1.40?
Comment 2 The Linux kernel's regression tracker (Thorsten Leemhuis) 2023-08-03 16:32:34 UTC
The output from dmesg for both 6.1.39 and 6.1.40 after a short suspend period right after booting would be really helpful.
Comment 3 The Linux kernel's regression tracker (Thorsten Leemhuis) 2023-08-03 16:37:09 UTC
Ohh, might also be worth trying 6.1.43, there were a few AMD Radeon related fixes recently
Comment 4 Shubhra Prakash Nandi 2023-08-03 17:46:20 UTC
Will try 6.1.43 and get back.
Comment 5 Shubhra Prakash Nandi 2023-08-03 18:14:30 UTC
I though get the below message during boot in 6.1.40 but not in 6.1.39.

amd_gpio AMDI0030:00: Invalid config param 0001
Comment 6 Shubhra Prakash Nandi 2023-08-06 09:00:26 UTC
Kernel version 6.1.43 also does not solve this issue.
Comment 7 Shubhra Prakash Nandi 2023-08-06 10:45:42 UTC
Created attachment 304785 [details]
Kernel log before and after sleep for version 6.1.39
Comment 8 Shubhra Prakash Nandi 2023-08-06 10:46:37 UTC
Created attachment 304786 [details]
Kernel log before and after sleep for version 6.1.40
Comment 9 The Linux kernel's regression tracker (Thorsten Leemhuis) 2023-08-07 09:44:43 UTC
(In reply to Shubhra Prakash Nandi from comment #8)
> Created attachment 304786 [details]
> Kernel log before and after sleep for version 6.1.40

Sorry, those are not helpful, we need complete kernel logs from right up the start of the system. Please try again; if something empties the dmesg buffer, try "journalctl -b 0 -t kernel" (again: after freshly booting each of the kernels and suspending once)
Comment 10 Mario Limonciello (AMD) 2023-08-11 20:48:26 UTC
> amd_gpio AMDI0030:00: Invalid config param 0001

This message is harmless.

> Kernel version 6.1.43 also does not solve this issue.

Can you please run this script on both 6.1.39 and 6.1.40?
https://gitlab.freedesktop.org/drm/amd/-/blob/master/scripts/amd_s2idle.py
Set a sleep cycle for at least 60s.

Share the log it creates for each attempt.

> Can you do bisection between v6.1.39 and v6.1.40?

If the debug logs from that script don't show anything, this is the next step I agree.
Comment 11 Shubhra Prakash Nandi 2023-08-12 11:37:16 UTC
Created attachment 304833 [details]
Kernel 6.1.40 log messages from boot till first s2idle sleep
Comment 12 Shubhra Prakash Nandi 2023-08-12 12:01:24 UTC
Created attachment 304834 [details]
Kernel 6.1.39 log messages from boot till first s2idle sleep
Comment 13 Shubhra Prakash Nandi 2023-08-12 12:20:26 UTC
Created attachment 304835 [details]
amd_s2idle.py debug log for kernel 6.1.39
Comment 14 Shubhra Prakash Nandi 2023-08-12 12:20:50 UTC
Created attachment 304836 [details]
amd_s2idle.py debug log for kernel 6.1.40
Comment 15 Mario Limonciello (AMD) 2023-08-12 12:58:47 UTC
> amd_s2idle.py debug log for kernel 6.1.39
> amd_s2idle.py debug log for kernel 6.1.40

Where's the rest of the report?  
- It stops at GPIO.
- It's missing ACPI _AEI debugging.
- There is a lot of stuff it captures and turns on debugging for.

I need a full report to look at your issue.
Comment 16 Shubhra Prakash Nandi 2023-08-12 13:25:26 UTC
I am getting the below error while executing amd_s2idle.py script. I have kernel lockdown disabled in config since I need hibernate to work in secure boot mode. The kernel builds are from stock sources with my custom config. They are not distro provided. I have not applied any custom patches to the kernel code.

Traceback (most recent call last):
  File "/home/shubhra/tmp/debug/scripts/./amd_s2idle.py", line 1985, in <module>
    test = app.prerequisites()
  File "/home/shubhra/tmp/debug/scripts/./amd_s2idle.py", line 1531, in prerequisites
    if not check():
  File "/home/shubhra/tmp/debug/scripts/./amd_s2idle.py", line 1540, in check_lockdown
    lockdown = read_file(fn)
  File "/home/shubhra/tmp/debug/scripts/./amd_s2idle.py", line 64, in read_file
    with open(fn, "r") as r:
FileNotFoundError: [Errno 2] No such file or directory: '/sys/kernel/security/lockdown'
Comment 17 Shubhra Prakash Nandi 2023-08-12 13:29:21 UTC
I ran with below parameters but still got the above error.

amd_s2idle.py --duration 60 --force

I think amd_s2idle.py needs to fixed to continue if kernel lockdown is disabled and for other customizable kernel configs.
Comment 18 Mario Limonciello (AMD) 2023-08-12 18:41:13 UTC
> I think amd_s2idle.py needs to fixed to continue if kernel lockdown is
> disabled and for other customizable kernel configs.

Sure; I have no opposition to making the script more flexible.  I've just pushed a change that makes the lockdown check optional.  Please pull and try it again.
Comment 19 Shubhra Prakash Nandi 2023-08-12 20:07:10 UTC
Created attachment 304838 [details]
amd_s2idle.py debug log for kernel 6.1.40

Ran updated script. I did get some error messages now as well as given below so not sure if it collected all debug data.

Traceback (most recent call last):
  File "/home/shubhra/tmp/debug/scripts/./amd_s2idle.py", line 1994, in <module>
    app.test_suspend(duration=duration, wait=wait, count=count)
  File "/home/shubhra/tmp/debug/scripts/./amd_s2idle.py", line 1837, in test_suspend
    self.analyze_results()
  File "/home/shubhra/tmp/debug/scripts/./amd_s2idle.py", line 1771, in analyze_results
    check()
  File "/home/shubhra/tmp/debug/scripts/./amd_s2idle.py", line 1660, in analyze_kernel_log
    self.kernel_log.seek(self.last_suspend)
  File "/home/shubhra/tmp/debug/scripts/./amd_s2idle.py", line 476, in seek
    result = subprocess.run(cmd, check=True, capture_output=True)
  File "/usr/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['dmesg', '-t', '-k', '--time-format=iso', '--since=2023-08-13T01:32:43']' returned non-zero exit status 1.
Comment 20 Mario Limonciello (AMD) 2023-08-12 20:27:47 UTC
No; it's still missing the debug data I'm looking for.  What version of util-linux package do you have?
Does your 'dmesg' command miss support for those arguments?  What happens when you manually try to run that command?
Comment 21 Shubhra Prakash Nandi 2023-08-12 20:30:15 UTC
Created attachment 304839 [details]
amd_s2idle.py debug log for kernel 6.1.39

Ran with updated amd_s2idle.py script. Got the same script errors as in for kernel version 6.1.40.
Comment 22 Mario Limonciello (AMD) 2023-08-12 20:33:53 UTC
> What version of util-linux package do you have?

Is your dmesg provided by busybox perhaps instead of util-linux?  If so; let me add a different fallback mode that ignores the arguments for busybox.
Comment 23 Shubhra Prakash Nandi 2023-08-12 20:34:49 UTC
I have util-linux package version 2.36.1-8+deb11u1 installed.

When I run dmesg manually with the arguments, I get the below error.

dmesg: unrecognized option '--since=2023-08-13T01:32:43'
Comment 24 Shubhra Prakash Nandi 2023-08-12 20:37:33 UTC
My dmesg does not have --since option.
Comment 25 Mario Limonciello (AMD) 2023-08-12 20:45:26 UTC
OK, I pushed a new change that makes that optional too.
Comment 26 Shubhra Prakash Nandi 2023-08-12 21:10:34 UTC
Created attachment 304840 [details]
amd_s2idle.py debug log for kernel 6.1.39

The script did not throw any errors this time. I ran 2 s2idle cycles.
Comment 27 Shubhra Prakash Nandi 2023-08-12 21:20:57 UTC
Created attachment 304841 [details]
amd_s2idle.py debug log for kernel 6.1.40

The script ran without errors this time, I ran 2 s2idle cycles.
Comment 28 Mario Limonciello (AMD) 2023-08-12 23:56:49 UTC
Thanks.  In both cases you're getting to the deepest sleep state.

One thing I notice comparing your logs is that with 6.1.40 GPIO 9 is "now" programmed as an S0i3 wake source.

Is it possible that this "getting hot" is only happening when the lid is closed, potentially from pressure onto the touchpad in a bag or something?  If so; then when it happens maybe it's triggering a wakeup and your software environment isn't configured to go back to sleep.

To confirm this hypothesis; my suggestion is to do as follows:
1. Manually turn on /sys/power/pm_debug_messages
2. Monitor for the behavior and look for the wakeup source, it will be documented in dmesg with pm_debug_messages enabled.

If it's GPIO 9, then you can experiment with turning off the wakeup source with the sysfs power/wakeup file for your touchpad.
Comment 29 Shubhra Prakash Nandi 2023-08-13 07:03:47 UTC
I am getting the below debug messages with PM debugging on. This is with laptop lid open, so issue is with general sleep and not due to a lid close. The system did heat up with lid open and suspended using power button.

Aug 13 12:23:44 [debug] kernel:[   81.062993] PM: suspend-to-idle
Aug 13 12:23:44 [debug] kernel:[  169.746101] Timekeeping suspended for 88.169 seconds
Aug 13 12:23:44 [debug] kernel:[  169.746149] PM: Triggering wakeup from IRQ 9
Aug 13 12:23:44 [debug] kernel:[  169.746227] ACPI: EC: ACPI EC GPE status set
Aug 13 12:23:44 [debug] kernel:[  169.746248] ACPI: EC: ACPI EC GPE dispatched
Aug 13 12:23:44 [debug] kernel:[  169.803890] ACPI: EC: ACPI EC work flushed
Aug 13 12:23:44 [debug] kernel:[  169.806384] ACPI: PM: Rearming ACPI SCI for wakeup
Aug 13 12:23:44 [debug] kernel:[  169.806404] PM: Triggering wakeup from IRQ 9
Aug 13 12:23:44 [debug] kernel:[  169.806442] ACPI: EC: ACPI EC GPE status set
Aug 13 12:23:44 [debug] kernel:[  169.806451] ACPI: PM: Rearming ACPI SCI for wakeup
Aug 13 12:23:44 [debug] kernel:[  170.377089] Timekeeping suspended for 0.939 seconds
Aug 13 12:23:44 [debug] kernel:[  170.377137] PM: Triggering wakeup from IRQ 9
Aug 13 12:23:44 [debug] kernel:[  170.377203] ACPI: EC: ACPI EC GPE status set
Aug 13 12:23:44 [debug] kernel:[  170.377229] ACPI: EC: ACPI EC GPE dispatched
Aug 13 12:23:44 [debug] kernel:[  170.434423] ACPI: EC: ACPI EC work flushed
Aug 13 12:23:44 [debug] kernel:[  170.436933] ACPI: PM: Rearming ACPI SCI for wakeup
Aug 13 12:23:44 [debug] kernel:[  170.436947] PM: Triggering wakeup from IRQ 9
Aug 13 12:23:44 [debug] kernel:[  170.436988] ACPI: EC: ACPI EC GPE status set
Aug 13 12:23:44 [debug] kernel:[  170.437004] ACPI: PM: Rearming ACPI SCI for wakeup
Aug 13 12:23:44 [debug] kernel:[  171.009036] Timekeeping suspended for 0.939 seconds
Aug 13 12:23:44 [debug] kernel:[  171.009084] PM: Triggering wakeup from IRQ 9
Aug 13 12:23:44 [debug] kernel:[  171.009159] ACPI: EC: ACPI EC GPE status set
Aug 13 12:23:44 [debug] kernel:[  171.009184] ACPI: EC: ACPI EC GPE dispatched
Aug 13 12:23:44 [debug] kernel:[  171.067285] ACPI: EC: ACPI EC work flushed
Aug 13 12:23:44 [debug] kernel:[  171.069797] ACPI: PM: Rearming ACPI SCI for wakeup
Aug 13 12:23:44 [debug] kernel:[  171.069819] PM: Triggering wakeup from IRQ 9
Aug 13 12:23:44 [debug] kernel:[  171.069852] ACPI: EC: ACPI EC GPE status set
Aug 13 12:23:44 [debug] kernel:[  171.069862] ACPI: PM: Rearming ACPI SCI for wakeup
Aug 13 12:23:44 [debug] kernel:[  171.640894] PM: Triggering wakeup from IRQ 9
Aug 13 12:23:44 [debug] kernel:[  171.640974] ACPI: EC: ACPI EC GPE status set
Aug 13 12:23:44 [debug] kernel:[  171.640997] ACPI: EC: ACPI EC GPE dispatched
Aug 13 12:23:44 [debug] kernel:[  171.697180] ACPI: EC: ACPI EC work flushed
Aug 13 12:23:44 [debug] kernel:[  171.699702] ACPI: PM: Rearming ACPI SCI for wakeup
Comment 30 Shubhra Prakash Nandi 2023-08-13 07:59:36 UTC
Most of my wakeup sources including touchpad are disabled before sleep is triggered as shown below.

/sys/bus/acpi/devices/PNP0C0A:00/power/wakeup:enabled
/sys/bus/acpi/devices/PNP0C0C:00/power/wakeup:enabled
/sys/bus/acpi/devices/PNP0C0D:00/power/wakeup:enabled
/sys/bus/acpi/devices/PNP0C0E:00/power/wakeup:enabled
/sys/bus/i2c/devices/i2c-DLL0B46:01/power/wakeup:disabled
/sys/bus/pci/devices/0000:00:01.1/power/wakeup:disabled
/sys/bus/pci/devices/0000:00:01.2/power/wakeup:disabled
/sys/bus/pci/devices/0000:00:02.2/power/wakeup:disabled
/sys/bus/pci/devices/0000:00:08.1/power/wakeup:disabled
/sys/bus/pci/devices/0000:00:08.2/power/wakeup:disabled
/sys/bus/pci/devices/0000:03:00.0/power/wakeup:disabled
/sys/bus/pci/devices/0000:04:00.0/power/wakeup:disabled
/sys/bus/pci/devices/0000:04:00.1/power/wakeup:disabled
/sys/bus/pci/devices/0000:04:00.3/power/wakeup:disabled
/sys/bus/pci/devices/0000:04:00.4/power/wakeup:disabled
/sys/bus/pci/devices/0000:04:00.5/power/wakeup:disabled
/sys/bus/pci/devices/0000:04:00.6/power/wakeup:disabled
/sys/bus/platform/devices/alarmtimer.0.auto/power/wakeup:enabled
/sys/bus/pnp/devices/00:01/power/wakeup:enabled
/sys/bus/serio/devices/serio0/power/wakeup:disabled
/sys/bus/serio/devices/serio1/power/wakeup:disabled
/sys/bus/usb/devices/3-2/power/wakeup:disabled
/sys/bus/usb/devices/3-3/power/wakeup:disabled
/sys/bus/usb/devices/usb1/power/wakeup:disabled
/sys/bus/usb/devices/usb2/power/wakeup:disabled
/sys/bus/usb/devices/usb3/power/wakeup:disabled
/sys/bus/usb/devices/usb4/power/wakeup:disabled
Comment 31 Mario Limonciello (AMD) 2023-08-14 16:14:00 UTC
OK so that does confirm that you're getting an interrupt firing while asleep and it's waking the system continuously.  I have a strong suspicion it's caused by the stable backport of this specific commit:

https://github.com/torvalds/linux/commit/635a750d958e158e17af0f524bedc484b27fbb93

This commit fixes an interrupt storm reported on another system, so it's surprising that it causes a problem on yours.  But I think this may have caused the GPIO for the touchpad (which is used for "attention") to be programmed as and s0i3 wake source and cause that wake storm.

1. Can you please add your acpidump for your system?  I need to look at _CRS for the touchpad and confirm that's intended behavior from the firmware or not.  I'll cross reference some of my reference hardware as well as I've not encountered this myself.

2. To confirm my suspicion could you make a local change to turn off the code caused by that and instead document what's happening?  basically this local patch:

diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c
index 20bd97a603d9c..55907c82822d5 100644
--- a/drivers/pinctrl/pinctrl-amd.c
+++ b/drivers/pinctrl/pinctrl-amd.c
@@ -775,6 +775,9 @@ static int amd_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin,
                arg = pinconf_to_config_argument(configs[i]);
                pin_reg = readl(gpio_dev->base + pin*4);

+               dev_info(&gpio_dev->pdev->dev, "set config pin %d to %04x\n", pin, param);
+               continue;
+
                switch (param) {
                case PIN_CONFIG_INPUT_DEBOUNCE:
                        ret = amd_gpio_set_debounce(gpio_dev, pin, arg);

Please also report if this avoids the issue on your side.
Comment 32 Shubhra Prakash Nandi 2023-08-15 07:43:23 UTC
Created attachment 304852 [details]
ACPI dump of Dell Inspiron 14 5425
Comment 33 Shubhra Prakash Nandi 2023-08-15 13:29:36 UTC
I think something is being programmed in 6.1.40 which is causing these unwanted wakeups because in 6.1.39 there are no wakeups with same ACPI code (system firmware/BIOS being the same for both kernel versions). The so the hardware cannot behave differently between kernel versions without kernel interfering with it. Probably the programming of the GPIO pin (as a wakeup source) in question is not required for my system.
Comment 34 Mario Limonciello (AMD) 2023-08-15 14:47:27 UTC
OK so your firmware does advertise it as "ExclusiveAndWake":

>                    GpioInt (Level, ActiveLow, ExclusiveAndWake, PullNone,
>                    0x0000,
>                        "\\_SB.GPIO", 0x00, ResourceConsumer, ,
>                        )
>                        {   // Pin list
>                            0x0009
>                        }

AFAICT Windows and Linux *should* both be treating this as a wake source with this firmware declaration.
https://learn.microsoft.com/en-us/windows-hardware/drivers/bringup/device-power-management#wake-capable-interrupts-_crs

6.1.39 configures it as *not* an S0i3 wake source:
> 2023-08-13 02:33:36,578 DEBUG:        #9      int + (😛)| active-↓| level-⚡|
> S0i3  ∅| S3  ∅| S4/S5  ∅| pull-↑ ∅ (  )| pull-↓ ∅| input  ↑| debounce   ∅ (🕑
> 0us)|  0x51b00

6.1.40 configures it as an S0i3 wake source:
2023-08-13 02:43:06,823 DEBUG:	gpio	  int|active|trigger|S0i3| S3|S4/S5| Z|wake|pull|  orient|       debounce|reg
2023-08-13 02:43:06,823 DEBUG:	#9	   😛|     ↓|  level|  ⏰|   |     |  |    |    |input  ↑|               |0x53b00

Can you please try the patch I suggested in comment #31 and share your experience and an updated s2idle report?

Also, can you please try the latest 6.4.y or 6.5-rc6?  I have a suspicion that we might be missing some other patches in 6.1.y and it's contributing to this issue.

Specifically this series: https://lore.kernel.org/all/20220929093200.v6.1.Id4b4bdfe06e2caf2d5a3c9dd4a9b1080c38b539c@changeid/

----
BTW FWIW I double checked this on an AMD reference platform with 6.5-rc5.  The touchpad is connected to GPIO 8 on this platform and configured as an S0i3 wake source (same as yours).

>                GpioInt (Level, ActiveLow, ExclusiveAndWake, PullUp, 0x0000,
>                    "\\_SB.GPIO", 0x00, ResourceConsumer, ,
>                    )
>                    {   // Pin list
>                        0x0008
>                    }

gpio      int|active|trigger|S0i3| S3|S4/S5| Z|wake|pull|  orient|       debounce|reg
#8         😛|     ↓|  level|  ⏰| ⏰|   ⏰|⏰|    |  ↑ |input  ↑|               |0x815fb00

I did confirm it stays in suspend and waking from the touchpad works on this kernel.
Comment 35 Mario Limonciello (AMD) 2023-08-15 15:07:05 UTC
> I have a suspicion that we might be missing some other patches in 6.1.y and
> it's contributing to this issue.
> Specifically this series: 
>
> https://lore.kernel.org/all/20220929093200.v6.1.Id4b4bdfe06e2caf2d5a3c9dd4a9b1080c38b539c@changeid/

I've backported the missing patches to this branch.  In addition to above asks, please let me know if this helps.

https://gitlab.freedesktop.org/superm1/linux/-/tree/mlimonci/kbz-217754
Comment 36 Shubhra Prakash Nandi 2023-08-15 15:35:36 UTC
I did try 6.4.5 and it had the same issue. I will try the code base with your consolidated patches.
Comment 37 Mario Limonciello (AMD) 2023-08-15 15:43:33 UTC
> I did try 6.4.5 and it had the same issue. I will try the code base with your
> consolidated patches.

OK, those patches are in 6.4 already, so it's unlikely they alone solve the issue in 6.1.y.  But in 6.4.y please try again to set:

/sys/bus/i2c/devices/i2c-DLL0B46:01/power/wakeup:disabled
Comment 38 Shubhra Prakash Nandi 2023-08-15 16:27:36 UTC
I did, but it did not help.

Can the below be of some help?

/sys/module/gpiolib_acpi/parameters/ignore_interrupt
/sys/module/gpiolib_acpi/parameters/ignore_wake
Comment 39 Mario Limonciello (AMD) 2023-08-15 16:28:30 UTC
Yes, ignore_wake is the next avenue, but I was hoping we didn't have to go there in case we have a fundamental problem.  That's why I'm looking for all those other things I asked for.
Comment 40 Shubhra Prakash Nandi 2023-08-15 17:36:25 UTC
One thing is strange though even if I disable wakeup from touchpad/keyboard in 6.1.39 I do manage to wake up the system using these devices.
Comment 41 Mario Limonciello (AMD) 2023-08-15 18:05:41 UTC
In that case, can you please bisect 6.1.39 to 6.1.40?  I want to make sure it really is that commit that I suspected that caused it.
Comment 42 Shubhra Prakash Nandi 2023-08-15 18:21:17 UTC
The system has stopped heating up in s2idle with the below in 6.1.40. I will check if battery drain is still there in s2idle now.

/sys/module/gpiolib_acpi/parameters/ignore_interrupt:AMDI0030:00@09,AMDI0030:00@07
/sys/module/gpiolib_acpi/parameters/ignore_wake:AMDI0030:00@09,AMDI0030:00@07
Comment 44 Shubhra Prakash Nandi 2023-08-15 18:50:01 UTC
These are all the commits as part of 6.1.40.

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/?id=v6.1.40&id2=v6.1.39&dt=2
Comment 45 Mario Limonciello (AMD) 2023-08-15 18:50:30 UTC
>
> /sys/module/gpiolib_acpi/parameters/ignore_interrupt:AMDI0030:00@09,AMDI0030:00@07
> /sys/module/gpiolib_acpi/parameters/ignore_wake:AMDI0030:00@09,AMDI0030:00@07

This is probably too much.  You don't want to be touching GPIO 7, it should just be GPIO 9.  Also you probably only need to ignore wake not interrupt.

> I am not sure if this is what you need as part of bisect.

I want to know specifically which commit caused it from 6.1.40.  Once I know the commit I can walk the related code to understand why.

https://www.kernel.org/doc/html/latest/admin-guide/bug-bisect.html has a great overview for it.
Comment 46 Shubhra Prakash Nandi 2023-08-15 19:00:39 UTC
Ignoring wake didn't help, so I added ignore interrupt. Well I will try and bisect and report back.
Comment 47 Mario Limonciello (AMD) 2023-08-17 01:40:24 UTC
> Ignoring wake didn't help, so I added ignore interrupt

Didn't this break your touchpad working in I2C mode?  It might have fallen back to PS/2 mode, but it shouldn't be working as well in this mode.

The reason that ignore_wake didn't work is that you don't put the controller in, but rather the device.  It's a bit confusing.

So I think what you should be using for ignore_wake: "DLL0B46:01@9"

> Well I will try and bisect and report back.

If you're sure it's caused by the pinctrl changes you can speed up your bisect by just focusing on that directory.  Additionally my patch mentioned in comment 31 would clear up if it's the commit I suspected.
Comment 48 Shubhra Prakash Nandi 2023-08-17 08:38:22 UTC
Yes I am just focusing on drivers/pinctrl/pinctrl-amd.c/h I think I will be able to apply the commits incrementally from 6.1.39 to 6.1.40 by 20th Aug. It could also be possible that the wake storm is caused by something else and not by pinctrl even though pinctrl could be programming the GPIO pin 9 in 6.1.40.
Comment 49 Mario Limonciello (AMD) 2023-08-17 17:40:19 UTC
Created attachment 304880 [details]
potential patch (v1)

I think I understand what's going on.  It seems to me that the boot firmware had programmed the touchpad GPIO as an s0i3 wake source, but the kernel hasn't.

This means that even though the kernel doesn't touch those bits in the GPIO register they remain enabled.  I've got a potential patch.  Can you please give this a try?
Comment 50 Shubhra Prakash Nandi 2023-08-17 18:19:22 UTC
Sure, in fact I had tried the same patch (bringing back function amd_gpio_irq_init) and it's call and it did help if remember correctly but I was not sure if that alone as enough.
Comment 51 Mario Limonciello (AMD) 2023-08-17 18:20:48 UTC
OK thanks, glad it's likely the right direction.  Once I've got an ack from you it works I'll post it to the mailing list.
Comment 52 Shubhra Prakash Nandi 2023-08-17 18:23:15 UTC
Created attachment 304881 [details]
6.1.40 patch 01
Comment 53 Mario Limonciello (AMD) 2023-08-17 18:24:30 UTC
Yours is similar to mine, but I'm intentionally only touching the wake related bits, not the interrupt related ones.
Comment 54 Shubhra Prakash Nandi 2023-08-17 18:25:30 UTC
Ok will patch and report back.
Comment 55 Shubhra Prakash Nandi 2023-08-17 19:07:09 UTC
-- Sleep log with your patch. But now system is waking up on it's own at a random time (without me waking it up). Incessant wake ups are not there any longer.

Aug 18 00:27:27 shubhra-pc [info] kernel:[  365.157814] wlp3s0: deauthenticating from 0e:e0:dc:16:bf:74 by local choice (Reason: 3=DEAUTH_LEAVING)
Aug 18 00:27:32 shubhra-pc [info] kernel:[  370.142663] PM: suspend entry (s2idle)
Aug 18 00:30:28 shubhra-pc [info] kernel:[  370.145079] Filesystems sync: 0.002 seconds
Aug 18 00:30:28 shubhra-pc [debug] kernel:[  370.145085] PM: Preparing system for sleep (s2idle)
Aug 18 00:30:28 shubhra-pc [info] kernel:[  370.145674] Freezing user space processes
Aug 18 00:30:28 shubhra-pc [info] kernel:[  370.147409] Freezing user space processes completed (elapsed 0.001 seconds)
Aug 18 00:30:28 shubhra-pc [info] kernel:[  370.147414] OOM killer disabled.
Aug 18 00:30:28 shubhra-pc [info] kernel:[  370.147415] Freezing remaining freezable tasks
Aug 18 00:30:28 shubhra-pc [info] kernel:[  370.148555] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
Aug 18 00:30:28 shubhra-pc [debug] kernel:[  370.148557] PM: Suspending system (s2idle)
Aug 18 00:30:28 shubhra-pc [info] kernel:[  370.148559] printk: Suspending console(s) (use no_console_suspend to debug)
Aug 18 00:30:28 shubhra-pc [warning] kernel:[  370.166926] queueing ieee80211 work while going to suspend
Aug 18 00:30:28 shubhra-pc [debug] kernel:[  370.365411] PM: suspend of devices complete after 216.750 msecs
Aug 18 00:30:28 shubhra-pc [debug] kernel:[  370.365425] PM: start suspend of devices complete after 216.955 msecs
Aug 18 00:30:28 shubhra-pc [debug] kernel:[  370.366281] PM: late suspend of devices complete after 0.852 msecs
Aug 18 00:30:28 shubhra-pc [info] kernel:[  370.366612] ACPI: EC: interrupt blocked
Aug 18 00:30:28 shubhra-pc [debug] kernel:[  370.394003] PM: noirq suspend of devices complete after 27.632 msecs
Aug 18 00:30:28 shubhra-pc [info] kernel:[  370.394013] ACPI: \_SB_.PCI0.GPP1.NVME: LPI: Constraint not met; min power state:D3hot current power state:D0
Aug 18 00:30:28 shubhra-pc [debug] kernel:[  370.425411] PM: suspend-to-idle
Aug 18 00:30:28 shubhra-pc [debug] kernel:[  545.046396] Timekeeping suspended for 174.561 seconds
Aug 18 00:30:28 shubhra-pc [debug] kernel:[  545.046440] PM: Triggering wakeup from IRQ 9
Aug 18 00:30:28 shubhra-pc [debug] kernel:[  545.046449] PM: Triggering wakeup from IRQ 7
Aug 18 00:30:28 shubhra-pc [debug] kernel:[  545.046528] ACPI: EC: ACPI EC GPE status set
Aug 18 00:30:28 shubhra-pc [debug] kernel:[  545.046555] ACPI: EC: ACPI EC GPE dispatched
Aug 18 00:30:28 shubhra-pc [debug] kernel:[  545.105449] ACPI: EC: ACPI EC work flushed
Aug 18 00:30:28 shubhra-pc [debug] kernel:[  545.108137] ACPI: PM: Wakeup after ACPI Notify sync
Aug 18 00:30:28 shubhra-pc [debug] kernel:[  545.108142] PM: resume from suspend-to-idle
Aug 18 00:30:28 shubhra-pc [info] kernel:[  545.166035] ACPI: EC: interrupt unblocked
Aug 18 00:30:28 shubhra-pc [debug] kernel:[  545.252460] PM: noirq resume of devices complete after 86.748 msecs
Aug 18 00:30:28 shubhra-pc [debug] kernel:[  545.253030] PM: early resume of devices complete after 0.473 msecs
Aug 18 00:30:28 shubhra-pc [info] kernel:[  545.255026] [drm] PCIE GART of 1024M enabled.
Aug 18 00:30:28 shubhra-pc [info] kernel:[  545.255033] [drm] PTB located at 0x000000F41FC00000
Aug 18 00:30:28 shubhra-pc [info] kernel:[  545.255056] amdgpu 0000:04:00.0: amdgpu: SMU is resuming...
Aug 18 00:30:28 shubhra-pc [info] kernel:[  545.256832] amdgpu 0000:04:00.0: amdgpu: dpm has been disabled
Aug 18 00:30:28 shubhra-pc [info] kernel:[  545.257887] amdgpu 0000:04:00.0: amdgpu: SMU is resumed successfully!
Aug 18 00:30:28 shubhra-pc [info] kernel:[  545.263100] [drm] VCN decode and encode initialized successfully(under DPG Mode).
Aug 18 00:30:28 shubhra-pc [info] kernel:[  545.263653] [drm] JPEG decode initialized successfully.
Aug 18 00:30:28 shubhra-pc [info] kernel:[  545.263899] amdgpu 0000:04:00.0: amdgpu: ring gfx uses VM inv eng 0 on hub 0
Aug 18 00:30:28 shubhra-pc [info] kernel:[  545.263902] amdgpu 0000:04:00.0: amdgpu: ring comp_1.0.0 uses VM inv eng 1 on hub 0
Aug 18 00:30:28 shubhra-pc [info] kernel:[  545.263904] amdgpu 0000:04:00.0: amdgpu: ring comp_1.1.0 uses VM inv eng 4 on hub 0
Aug 18 00:30:28 shubhra-pc [info] kernel:[  545.263906] amdgpu 0000:04:00.0: amdgpu: ring comp_1.2.0 uses VM inv eng 5 on hub 0
Aug 18 00:30:28 shubhra-pc [info] kernel:[  545.263908] amdgpu 0000:04:00.0: amdgpu: ring comp_1.3.0 uses VM inv eng 6 on hub 0
Aug 18 00:30:28 shubhra-pc [info] kernel:[  545.263909] amdgpu 0000:04:00.0: amdgpu: ring comp_1.0.1 uses VM inv eng 7 on hub 0
Aug 18 00:30:28 shubhra-pc [info] kernel:[  545.263910] amdgpu 0000:04:00.0: amdgpu: ring comp_1.1.1 uses VM inv eng 8 on hub 0
Aug 18 00:30:28 shubhra-pc [info] kernel:[  545.263911] amdgpu 0000:04:00.0: amdgpu: ring comp_1.2.1 uses VM inv eng 9 on hub 0
Aug 18 00:30:28 shubhra-pc [info] kernel:[  545.263913] amdgpu 0000:04:00.0: amdgpu: ring comp_1.3.1 uses VM inv eng 10 on hub 0
Aug 18 00:30:28 shubhra-pc [info] kernel:[  545.263915] amdgpu 0000:04:00.0: amdgpu: ring kiq_2.1.0 uses VM inv eng 11 on hub 0
Aug 18 00:30:28 shubhra-pc [info] kernel:[  545.263916] amdgpu 0000:04:00.0: amdgpu: ring sdma0 uses VM inv eng 0 on hub 1
Aug 18 00:30:28 shubhra-pc [info] kernel:[  545.263918] amdgpu 0000:04:00.0: amdgpu: ring vcn_dec uses VM inv eng 1 on hub 1
Aug 18 00:30:28 shubhra-pc [info] kernel:[  545.263919] amdgpu 0000:04:00.0: amdgpu: ring vcn_enc0 uses VM inv eng 4 on hub 1
Aug 18 00:30:28 shubhra-pc [info] kernel:[  545.263921] amdgpu 0000:04:00.0: amdgpu: ring vcn_enc1 uses VM inv eng 5 on hub 1
Aug 18 00:30:28 shubhra-pc [info] kernel:[  545.263922] amdgpu 0000:04:00.0: amdgpu: ring jpeg_dec uses VM inv eng 6 on hub 1
Aug 18 00:30:28 shubhra-pc [info] kernel:[  545.265540] nvme nvme0: 16/0/0 default/read/poll queues
Aug 18 00:30:28 shubhra-pc [info] kernel:[  545.555850] usb 3-3: reset high-speed USB device number 3 using xhci_hcd
Aug 18 00:30:28 shubhra-pc [info] kernel:[  546.029823] usb 3-2: reset low-speed USB device number 2 using xhci_hcd
Aug 18 00:30:28 shubhra-pc [debug] kernel:[  546.535165] PM: resume of devices complete after 1282.674 msecs
Aug 18 00:30:28 shubhra-pc [debug] kernel:[  546.535691] PM: Finishing wakeup.
Aug 18 00:30:28 shubhra-pc [info] kernel:[  546.535926] OOM killer enabled.
Aug 18 00:30:28 shubhra-pc [info] kernel:[  546.535927] Restarting tasks ... done.
Aug 18 00:30:28 shubhra-pc [notice] kernel:[  546.538450] random: crng reseeded on system resumption
Aug 18 00:30:28 shubhra-pc [info] kernel:[  546.676769] Bluetooth: hci0: Device setup in 137481 usecs
Aug 18 00:30:28 shubhra-pc [warning] kernel:[  546.676778] Bluetooth: hci0: HCI Enhanced Setup Synchronous Connection command is advertised, but not supported.
Aug 18 00:30:28 shubhra-pc [info] kernel:[  546.694601] PM: suspend exit
Aug 18 00:30:28 shubhra-pc [info] kernel:[  546.750288] Bluetooth: MGMT ver 1.22
Aug 18 00:30:33 shubhra-pc [info] kernel:[  551.903838] wlp3s0: authenticate with 0e:e0:dc:16:bf:74
Aug 18 00:30:33 shubhra-pc [info] kernel:[  551.936712] wlp3s0: send auth to 0e:e0:dc:16:bf:74 (try 1/3)
Aug 18 00:30:33 shubhra-pc [info] kernel:[  551.993988] wlp3s0: authenticated
Aug 18 00:30:33 shubhra-pc [info] kernel:[  552.001887] wlp3s0: associate with 0e:e0:dc:16:bf:74 (try 1/3)
Aug 18 00:30:33 shubhra-pc [info] kernel:[  552.012735] wlp3s0: RX AssocResp from 0e:e0:dc:16:bf:74 (capab=0x1431 status=0 aid=6)
Aug 18 00:30:33 shubhra-pc [info] kernel:[  552.040230] wlp3s0: associated
Aug 18 00:30:34 shubhra-pc [info] kernel:[  552.225520] IPv6: ADDRCONF(NETDEV_CHANGE): wlp3s0: link becomes ready


-- Sysfs wakeup config for touchpad and keyboard
/sys/bus/i2c/devices/i2c-DLL0B46:01/power/wakeup:disabled
Comment 56 Mario Limonciello (AMD) 2023-08-17 19:09:33 UTC
> But now system is waking up on it's own at a random time (without me waking
> it up). 
> Incessant wake ups are not there any longer.

Can you please share /sys/kernel/debug/gpio with the patch in place?  It might need a full revert (which is effectively what your patch is) but I want to quantify it against how it was programmed to make sure it's not a different issue.

> Aug 18 00:30:28 shubhra-pc [debug] kernel:[  545.046440] PM: Triggering
> wakeup from IRQ 9
> Aug 18 00:30:28 shubhra-pc [debug] kernel:[  545.046449] PM: Triggering
> wakeup from IRQ 7

There is a dynamic debug statement for pinctrl-amd that shows the GPIO that's active.  Can you turn it on?
Comment 57 Shubhra Prakash Nandi 2023-08-17 19:31:24 UTC
-- Output of /sys/kernel/debug/gpio before any sleep.


gpiochip0: GPIOs 768-1023, parent: platform/AMDI0030:00, AMDI0030:00:
WAKE_INT_MASTER_REG: 0xff000000
GPIO bank0
gpio	  int|active|trigger|S0i3| S3|S4/S5| Z|wake|pull|  orient|       debounce|reg
#0	   😛|     ↑|   edge|  ⏰| ⏰|     |  |    |    |input  ↑|b (🕑 046875us)|0x578e3
#1	    ∅|      |       |    |   |     |  |    |  ↑ |input  ↑|               |0x150000
#2	   😛|     ↓|   edge|  ⏰| ⏰|     |  |    |    |input  ↑|               |0x57a00
#3	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#4	    ∅|      |       |    |   |     |  |    |    |output ↑|               |0xc50000
#5	    ∅|      |       |    |   |     |  |    |    |output ↓|               |0x840000
#6	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#7	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#8	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#9	   😛|     ↓|  level|    |   |     |  |    |    |input  ↑|               |0x51b00
#10	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#11	    ∅|      |       |    |   |     |  |    |    |output ↓|               |0x840000
#12	    ∅|      |       |    |   |     |  |    |    |output ↑|               |0xc50000
#13	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#14	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#15	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#16	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#17	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#18	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#19	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#20	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#21	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#22	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#23	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#24	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x40000
#25	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#26	    ∅|      |       |    |   |     |  |    |    |output ↑|               |0xc50000
#27	    ∅|      |       |    |   |     |  |    |    |output ↓|               |0x840000
#28	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#29	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x40000
#30	    ∅|      |       |    |   |     |  |    |    |output ↓|               |0x840000
#31	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#32	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#33	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#34	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#35	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#36	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#37	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#38	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#39	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#40	    ∅|      |       |    |   |     |  |    |    |output ↑|               |0xc50000
#41	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#42	    ∅|      |       |    |   |     |  |    |    |output ↑|               |0xc50000
#43	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#44	   😛|     ↑|   edge|  ⏰| ⏰|     |  |    |    |input  ↓|               |0x7800
#45	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#46	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#47	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#48	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#49	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x10000
#50	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#51	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#52	   😷|     ↑|  level|    |   |     |  |    |    |input  ↓|               |0x900
#53	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#54	   😛|     ↓|   edge|  ⏰| ⏰|     |  |    |    |input  ↓|               |0x7a00
#55	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#56	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#57	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#58	   😛|     ↑|  level|  ⏰| ⏰|     |  |    |    |input  ↓|               |0x7900
#59	   😛|     ↑|  level|  ⏰| ⏰|     |  |    |    |input  ↓|               |0x7900
#60	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#61	   😛|     ↑|  level|  ⏰| ⏰|     |  |    |    |input  ↓|               |0x7900
#62	   😛|     ↑|  level|  ⏰| ⏰|     |  |    |    |input  ↓|               |0x7900
GPIO bank1
gpio	  int|active|trigger|S0i3| S3|S4/S5| Z|wake|pull|  orient|       debounce|reg
#64	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#65	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#66	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#67	    ∅|      |       |    |   |     |  |    |    |output ↓|               |0x840000
#68	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#69	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#70	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#71	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#72	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#73	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#74	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#75	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#76	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#77	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#78	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#79	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#80	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#81	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#82	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#83	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#84	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#85	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x40000
#86	    ∅|      |       |    |   |     |  |    |    |output ↓|               |0x840000
#87	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x40000
#88	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x40000
#89	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#90	    ∅|      |       |    |   |     |  |    |    |output ↓|               |0x840000
#91	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x40000
#92	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#93	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#94	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#95	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#96	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#97	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#98	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#99	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#100	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#101	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#102	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#103	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#104	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#105	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#106	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#107	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#108	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#109	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#110	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#111	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#112	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#113	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#114	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#115	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#116	    ∅|      |       |    |   |     |  |    |    |output ↓|               |0x840000
#117	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#118	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#119	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#120	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x40000
#121	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#122	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#123	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#124	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#125	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#126	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#127	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
GPIO bank2
gpio	  int|active|trigger|S0i3| S3|S4/S5| Z|wake|pull|  orient|       debounce|reg
#128	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#129	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#130	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#131	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#132	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#133	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#134	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#135	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#136	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#137	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#138	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#139	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#140	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#141	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#142	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#143	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#144	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x40000
#145	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#146	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#147	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x40000
#148	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x40000
#149	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#150	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#151	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#152	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#153	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#154	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#155	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#156	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#157	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#158	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#159	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#160	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#161	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#162	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#163	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#164	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#165	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#166	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#167	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#168	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#169	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#170	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#171	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#172	   😷|     ↑|  level|    |   |     |  |    |    |input  ↓|               |0x900
#173	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#174	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#175	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x10000
#176	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#177	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#178	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#179	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#180	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#181	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#182	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x10000
#183	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x10000
GPIO bank3
gpio	  int|active|trigger|S0i3| S3|S4/S5| Z|wake|pull|  orient|       debounce|reg
#192	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#193	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#194	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#195	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#196	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#197	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#198	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#199	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#200	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#201	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#202	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#203	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#204	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#205	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#206	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#207	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#208	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#209	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#210	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#211	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#212	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#213	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#214	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#215	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#216	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#217	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#218	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#219	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#220	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#221	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#222	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#223	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
Comment 58 Shubhra Prakash Nandi 2023-08-17 19:34:11 UTC
-- Output of /sys/kernel/debug/gpio after first sleep.


gpiochip0: GPIOs 768-1023, parent: platform/AMDI0030:00, AMDI0030:00:
WAKE_INT_MASTER_REG: 0xff000000
GPIO bank0
gpio	  int|active|trigger|S0i3| S3|S4/S5| Z|wake|pull|  orient|       debounce|reg
#0	   😛|     ↑|   edge|  ⏰| ⏰|     |  |    |    |input  ↑|b (🕑 046875us)|0x578e3
#1	    ∅|      |       |    |   |     |  |    |  ↑ |input  ↑|               |0x150000
#2	   😛|     ↓|   edge|  ⏰| ⏰|     |  |    |    |input  ↑|               |0x57a00
#3	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#4	    ∅|      |       |    |   |     |  |    |    |output ↑|               |0xc50000
#5	    ∅|      |       |    |   |     |  |    |    |output ↓|               |0x840000
#6	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#7	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#8	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#9	   😛|     ↓|  level|    |   |     |  |    |    |input  ↑|               |0x51b00
#10	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#11	    ∅|      |       |    |   |     |  |    |    |output ↓|               |0x840000
#12	    ∅|      |       |    |   |     |  |    |    |output ↑|               |0xc50000
#13	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#14	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#15	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#16	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#17	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#18	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#19	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#20	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#21	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#22	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#23	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#24	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x40000
#25	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#26	    ∅|      |       |    |   |     |  |    |    |output ↑|               |0xc50000
#27	    ∅|      |       |    |   |     |  |    |    |output ↓|               |0x840000
#28	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#29	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x40000
#30	    ∅|      |       |    |   |     |  |    |    |output ↓|               |0x840000
#31	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#32	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#33	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#34	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#35	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#36	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#37	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#38	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#39	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#40	    ∅|      |       |    |   |     |  |    |    |output ↑|               |0xc50000
#41	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#42	    ∅|      |       |    |   |     |  |    |    |output ↑|               |0xc50000
#43	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#44	   😛|     ↑|   edge|  ⏰| ⏰|     |  |    |    |input  ↓|               |0x7800
#45	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#46	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#47	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#48	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#49	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x10000
#50	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#51	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#52	   😷|     ↑|  level|    |   |     |  |    |    |input  ↓|               |0x900
#53	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#54	   😛|     ↓|   edge|  ⏰| ⏰|     |  |    |    |input  ↓|               |0x7a00
#55	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#56	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#57	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#58	   😛|     ↑|  level|  ⏰| ⏰|     |  |    |    |input  ↓|               |0x7900
#59	   😛|     ↑|  level|  ⏰| ⏰|     |  |    |    |input  ↓|               |0x7900
#60	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#61	   😛|     ↑|  level|  ⏰| ⏰|     |  |    |    |input  ↓|               |0x7900
#62	   😛|     ↑|  level|  ⏰| ⏰|     |  |    |    |input  ↓|               |0x7900
GPIO bank1
gpio	  int|active|trigger|S0i3| S3|S4/S5| Z|wake|pull|  orient|       debounce|reg
#64	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#65	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#66	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#67	    ∅|      |       |    |   |     |  |    |  ↓ |input  ↓|               |0x240000
#68	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#69	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#70	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#71	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#72	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#73	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#74	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x40000
#75	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x40000
#76	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#77	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#78	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#79	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#80	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#81	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#82	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#83	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#84	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#85	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x40000
#86	    ∅|      |       |    |   |     |  |    |    |output ↓|               |0x840000
#87	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#88	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x40000
#89	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#90	    ∅|      |       |    |   |     |  |    |    |output ↓|               |0x840000
#91	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x40000
#92	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x40000
#93	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#94	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#95	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#96	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#97	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#98	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#99	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#100	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#101	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#102	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#103	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#104	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#105	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#106	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#107	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#108	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#109	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#110	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#111	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#112	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#113	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#114	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#115	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x40000
#116	    ∅|      |       |    |   |     |  |    |    |output ↓|               |0x840000
#117	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#118	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#119	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#120	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x40000
#121	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#122	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#123	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#124	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#125	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#126	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#127	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
GPIO bank2
gpio	  int|active|trigger|S0i3| S3|S4/S5| Z|wake|pull|  orient|       debounce|reg
#128	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#129	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#130	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#131	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#132	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#133	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#134	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#135	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#136	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#137	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#138	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#139	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#140	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x10000
#141	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#142	    ∅|      |       |    |   |     |  |    |  ↓ |input  ↑|               |0x250000
#143	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#144	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x40000
#145	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#146	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#147	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x40000
#148	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x40000
#149	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#150	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#151	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#152	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#153	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#154	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#155	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#156	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#157	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#158	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#159	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#160	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#161	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#162	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#163	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#164	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#165	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#166	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#167	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#168	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#169	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#170	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#171	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#172	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#173	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#174	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#175	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x10000
#176	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#177	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#178	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#179	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#180	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#181	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#182	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x10000
#183	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x10000
GPIO bank3
gpio	  int|active|trigger|S0i3| S3|S4/S5| Z|wake|pull|  orient|       debounce|reg
#192	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#193	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#194	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#195	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#196	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#197	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#198	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#199	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#200	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#201	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#202	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#203	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#204	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#205	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#206	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#207	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#208	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#209	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#210	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#211	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#212	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#213	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#214	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#215	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#216	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#217	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#218	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#219	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#220	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#221	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#222	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#223	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
Comment 59 Mario Limonciello (AMD) 2023-08-17 19:38:17 UTC
OK.. GPIO 52 (0x34) is different between 6.1.39 and with my patch in place.  This isn't documented in _AEI at all for any specific device.

So if that's the reason you woke up (dynamic debug can confirm it), then we do need a full revert for that commit.
Comment 60 Shubhra Prakash Nandi 2023-08-17 19:41:08 UTC
You mean I turn this function on using kernel config CONFIG_DEBUG_FS - amd_gpio_dbg_show ?
Comment 61 Mario Limonciello (AMD) 2023-08-17 19:43:55 UTC
There's a line in mainline kernel:

				pm_pr_dbg("GPIO %d is active: 0x%x",
					  irqnr + i, regval);

You can turn it on following https://www.kernel.org/doc/html/next/admin-guide/dynamic-debug-howto.html either on kernel command line or /sys/kernel/debug/dynamic_debug/control.
Comment 62 Shubhra Prakash Nandi 2023-08-17 20:05:13 UTC
One thing to note though is my laptop palm rest is metallic so I am not sure if when plugged in some static electricity is causing the wakeup since sometimes when I touch the palm rest the laptop wakes up! I will test with battery alone and report back.

I was able to turn on dynamic debug for pinctrl-amd module.
Comment 63 Shubhra Prakash Nandi 2023-08-17 20:15:27 UTC
Ok I checked purely on battery the wake up is random. Below is the log when suspended using power button

Aug 18 01:37:46 shubhra-pc [debug] kernel:[   74.404335] amd_gpio AMDI0030:00: GPIO 0 is active: 0x100578e3
Aug 18 01:37:47 shubhra-pc [info] kernel:[   74.822858] wlp3s0: deauthenticating from 0e:e0:dc:16:bf:74 by local choice (Reason: 3=DEAUTH_LEAVING)
Aug 18 01:37:52 shubhra-pc [info] kernel:[   80.115479] PM: suspend entry (s2idle)
Aug 18 01:37:52 shubhra-pc [info] kernel:[   80.118154] Filesystems sync: 0.002 seconds
Aug 18 01:39:50 shubhra-pc [info] kernel:[   80.119118] Freezing user space processes
Aug 18 01:39:50 shubhra-pc [info] kernel:[   80.121025] Freezing user space processes completed (elapsed 0.001 seconds)
Aug 18 01:39:50 shubhra-pc [info] kernel:[   80.121030] OOM killer disabled.
Aug 18 01:39:50 shubhra-pc [info] kernel:[   80.121031] Freezing remaining freezable tasks
Aug 18 01:39:50 shubhra-pc [info] kernel:[   80.122179] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
Aug 18 01:39:50 shubhra-pc [info] kernel:[   80.122182] printk: Suspending console(s) (use no_console_suspend to debug)
Aug 18 01:39:50 shubhra-pc [warning] kernel:[   80.142840] queueing ieee80211 work while going to suspend
Aug 18 01:39:50 shubhra-pc [info] kernel:[   80.160352] atkbd serio0: Disabling IRQ1 wakeup source to avoid platform firmware bug
Aug 18 01:39:50 shubhra-pc [info] kernel:[   80.382535] ACPI: EC: interrupt blocked
Aug 18 01:39:50 shubhra-pc [info] kernel:[  196.988260] ACPI: EC: interrupt unblocked
Aug 18 01:39:50 shubhra-pc [debug] kernel:[  197.074834] amd_gpio AMDI0030:00: GPIO 0 is active: 0x300578e3
Aug 18 01:39:50 shubhra-pc [debug] kernel:[  197.075465] amd_gpio AMDI0030:00: GPIO 9 is active: 0x10041b00
Aug 18 01:39:50 shubhra-pc [err] kernel:[  197.076158] i2c_hid_acpi i2c-DLL0B46:01: i2c_hid_get_input: incomplete report (14/65280)
Aug 18 01:39:50 shubhra-pc [info] kernel:[  197.076913] [drm] PCIE GART of 1024M enabled.
Aug 18 01:39:50 shubhra-pc [info] kernel:[  197.076920] [drm] PTB located at 0x000000F41FC00000
Aug 18 01:39:50 shubhra-pc [info] kernel:[  197.076944] amdgpu 0000:04:00.0: amdgpu: SMU is resuming...
Aug 18 01:39:50 shubhra-pc [info] kernel:[  197.078509] amdgpu 0000:04:00.0: amdgpu: dpm has been disabled
Aug 18 01:39:50 shubhra-pc [info] kernel:[  197.079573] amdgpu 0000:04:00.0: amdgpu: SMU is resumed successfully!
Aug 18 01:39:50 shubhra-pc [info] kernel:[  197.085183] [drm] VCN decode and encode initialized successfully(under DPG Mode).
Aug 18 01:39:50 shubhra-pc [info] kernel:[  197.085413] [drm] JPEG decode initialized successfully.
Aug 18 01:39:50 shubhra-pc [info] kernel:[  197.085687] amdgpu 0000:04:00.0: amdgpu: ring gfx uses VM inv eng 0 on hub 0
Aug 18 01:39:50 shubhra-pc [info] kernel:[  197.085691] amdgpu 0000:04:00.0: amdgpu: ring comp_1.0.0 uses VM inv eng 1 on hub 0
Aug 18 01:39:50 shubhra-pc [info] kernel:[  197.085693] amdgpu 0000:04:00.0: amdgpu: ring comp_1.1.0 uses VM inv eng 4 on hub 0
Aug 18 01:39:50 shubhra-pc [info] kernel:[  197.085695] amdgpu 0000:04:00.0: amdgpu: ring comp_1.2.0 uses VM inv eng 5 on hub 0
Aug 18 01:39:50 shubhra-pc [info] kernel:[  197.085696] amdgpu 0000:04:00.0: amdgpu: ring comp_1.3.0 uses VM inv eng 6 on hub 0
Aug 18 01:39:50 shubhra-pc [info] kernel:[  197.085698] amdgpu 0000:04:00.0: amdgpu: ring comp_1.0.1 uses VM inv eng 7 on hub 0
Aug 18 01:39:50 shubhra-pc [info] kernel:[  197.085699] amdgpu 0000:04:00.0: amdgpu: ring comp_1.1.1 uses VM inv eng 8 on hub 0
Aug 18 01:39:50 shubhra-pc [info] kernel:[  197.085701] amdgpu 0000:04:00.0: amdgpu: ring comp_1.2.1 uses VM inv eng 9 on hub 0
Aug 18 01:39:50 shubhra-pc [info] kernel:[  197.085702] amdgpu 0000:04:00.0: amdgpu: ring comp_1.3.1 uses VM inv eng 10 on hub 0
Aug 18 01:39:50 shubhra-pc [info] kernel:[  197.085704] amdgpu 0000:04:00.0: amdgpu: ring kiq_2.1.0 uses VM inv eng 11 on hub 0
Aug 18 01:39:50 shubhra-pc [info] kernel:[  197.085705] amdgpu 0000:04:00.0: amdgpu: ring sdma0 uses VM inv eng 0 on hub 1
Aug 18 01:39:50 shubhra-pc [info] kernel:[  197.085708] amdgpu 0000:04:00.0: amdgpu: ring vcn_dec uses VM inv eng 1 on hub 1
Aug 18 01:39:50 shubhra-pc [info] kernel:[  197.085709] amdgpu 0000:04:00.0: amdgpu: ring vcn_enc0 uses VM inv eng 4 on hub 1
Aug 18 01:39:50 shubhra-pc [info] kernel:[  197.085711] amdgpu 0000:04:00.0: amdgpu: ring vcn_enc1 uses VM inv eng 5 on hub 1
Aug 18 01:39:50 shubhra-pc [info] kernel:[  197.085712] amdgpu 0000:04:00.0: amdgpu: ring jpeg_dec uses VM inv eng 6 on hub 1
Aug 18 01:39:50 shubhra-pc [info] kernel:[  197.086814] nvme nvme0: 16/0/0 default/read/poll queues
Aug 18 01:39:50 shubhra-pc [info] kernel:[  198.358655] OOM killer enabled.
Aug 18 01:39:50 shubhra-pc [info] kernel:[  198.358661] Restarting tasks ... done.
Aug 18 01:39:50 shubhra-pc [notice] kernel:[  198.361053] random: crng reseeded on system resumption
Aug 18 01:39:50 shubhra-pc [info] kernel:[  198.507434] PM: suspend exit
Aug 18 01:39:56 shubhra-pc [info] kernel:[  203.920893] wlp3s0: authenticate with 0e:e0:dc:16:bf:74
Aug 18 01:39:56 shubhra-pc [info] kernel:[  203.953368] wlp3s0: send auth to 0e:e0:dc:16:bf:74 (try 1/3)
Aug 18 01:39:56 shubhra-pc [info] kernel:[  204.010526] wlp3s0: authenticated
Aug 18 01:39:56 shubhra-pc [info] kernel:[  204.017056] wlp3s0: associate with 0e:e0:dc:16:bf:74 (try 1/3)
Aug 18 01:39:56 shubhra-pc [info] kernel:[  204.028919] wlp3s0: RX AssocResp from 0e:e0:dc:16:bf:74 (capab=0x1431 status=0 aid=15)
Aug 18 01:39:56 shubhra-pc [info] kernel:[  204.056678] wlp3s0: associated
Aug 18 01:39:56 shubhra-pc [info] kernel:[  204.240138] IPv6: ADDRCONF(NETDEV_CHANGE): wlp3s0: link becomes ready
Comment 64 Shubhra Prakash Nandi 2023-08-17 20:16:12 UTC
Below is the log when suspended using lid close.


Aug 18 01:40:57 shubhra-pc [info] kernel:[  265.998444] wlp3s0: deauthenticating from 0e:e0:dc:16:bf:74 by local choice (Reason: 3=DEAUTH_LEAVING)
Aug 18 01:43:06 shubhra-pc [info] kernel:[  269.599498] PM: suspend entry (s2idle)
Aug 18 01:43:06 shubhra-pc [info] kernel:[  269.602273] Filesystems sync: 0.002 seconds
Aug 18 01:43:06 shubhra-pc [info] kernel:[  269.603122] Freezing user space processes
Aug 18 01:43:06 shubhra-pc [info] kernel:[  269.605005] Freezing user space processes completed (elapsed 0.001 seconds)
Aug 18 01:43:06 shubhra-pc [info] kernel:[  269.605009] OOM killer disabled.
Aug 18 01:43:06 shubhra-pc [info] kernel:[  269.605011] Freezing remaining freezable tasks
Aug 18 01:43:06 shubhra-pc [info] kernel:[  269.606142] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
Aug 18 01:43:06 shubhra-pc [info] kernel:[  269.606145] printk: Suspending console(s) (use no_console_suspend to debug)
Aug 18 01:43:06 shubhra-pc [warning] kernel:[  269.628690] queueing ieee80211 work while going to suspend
Aug 18 01:43:06 shubhra-pc [info] kernel:[  269.868394] ACPI: EC: interrupt blocked
Aug 18 01:43:06 shubhra-pc [info] kernel:[  392.964453] ACPI: EC: interrupt unblocked
Aug 18 01:43:06 shubhra-pc [debug] kernel:[  393.051109] amd_gpio AMDI0030:00: GPIO 0 is active: 0x300578e3
Aug 18 01:43:06 shubhra-pc [debug] kernel:[  393.051674] amd_gpio AMDI0030:00: GPIO 9 is active: 0x10041b00
Aug 18 01:43:06 shubhra-pc [err] kernel:[  393.052362] i2c_hid_acpi i2c-DLL0B46:01: i2c_hid_get_input: incomplete report (14/65280)
Aug 18 01:43:06 shubhra-pc [info] kernel:[  393.053171] [drm] PCIE GART of 1024M enabled.
Aug 18 01:43:06 shubhra-pc [info] kernel:[  393.053175] [drm] PTB located at 0x000000F41FC00000
Aug 18 01:43:06 shubhra-pc [info] kernel:[  393.053197] amdgpu 0000:04:00.0: amdgpu: SMU is resuming...
Aug 18 01:43:06 shubhra-pc [info] kernel:[  393.054744] amdgpu 0000:04:00.0: amdgpu: dpm has been disabled
Aug 18 01:43:06 shubhra-pc [info] kernel:[  393.055786] amdgpu 0000:04:00.0: amdgpu: SMU is resumed successfully!
Aug 18 01:43:06 shubhra-pc [info] kernel:[  393.061439] [drm] VCN decode and encode initialized successfully(under DPG Mode).
Aug 18 01:43:06 shubhra-pc [info] kernel:[  393.061638] [drm] JPEG decode initialized successfully.
Aug 18 01:43:06 shubhra-pc [info] kernel:[  393.061904] amdgpu 0000:04:00.0: amdgpu: ring gfx uses VM inv eng 0 on hub 0
Aug 18 01:43:06 shubhra-pc [info] kernel:[  393.061907] amdgpu 0000:04:00.0: amdgpu: ring comp_1.0.0 uses VM inv eng 1 on hub 0
Aug 18 01:43:06 shubhra-pc [info] kernel:[  393.061910] amdgpu 0000:04:00.0: amdgpu: ring comp_1.1.0 uses VM inv eng 4 on hub 0
Aug 18 01:43:06 shubhra-pc [info] kernel:[  393.061912] amdgpu 0000:04:00.0: amdgpu: ring comp_1.2.0 uses VM inv eng 5 on hub 0
Aug 18 01:43:06 shubhra-pc [info] kernel:[  393.061913] amdgpu 0000:04:00.0: amdgpu: ring comp_1.3.0 uses VM inv eng 6 on hub 0
Aug 18 01:43:06 shubhra-pc [info] kernel:[  393.061915] amdgpu 0000:04:00.0: amdgpu: ring comp_1.0.1 uses VM inv eng 7 on hub 0
Aug 18 01:43:06 shubhra-pc [info] kernel:[  393.061917] amdgpu 0000:04:00.0: amdgpu: ring comp_1.1.1 uses VM inv eng 8 on hub 0
Aug 18 01:43:06 shubhra-pc [info] kernel:[  393.061918] amdgpu 0000:04:00.0: amdgpu: ring comp_1.2.1 uses VM inv eng 9 on hub 0
Aug 18 01:43:06 shubhra-pc [info] kernel:[  393.061920] amdgpu 0000:04:00.0: amdgpu: ring comp_1.3.1 uses VM inv eng 10 on hub 0
Aug 18 01:43:06 shubhra-pc [info] kernel:[  393.061921] amdgpu 0000:04:00.0: amdgpu: ring kiq_2.1.0 uses VM inv eng 11 on hub 0
Aug 18 01:43:06 shubhra-pc [info] kernel:[  393.061923] amdgpu 0000:04:00.0: amdgpu: ring sdma0 uses VM inv eng 0 on hub 1
Aug 18 01:43:06 shubhra-pc [info] kernel:[  393.061924] amdgpu 0000:04:00.0: amdgpu: ring vcn_dec uses VM inv eng 1 on hub 1
Aug 18 01:43:06 shubhra-pc [info] kernel:[  393.061926] amdgpu 0000:04:00.0: amdgpu: ring vcn_enc0 uses VM inv eng 4 on hub 1
Aug 18 01:43:06 shubhra-pc [info] kernel:[  393.061927] amdgpu 0000:04:00.0: amdgpu: ring vcn_enc1 uses VM inv eng 5 on hub 1
Aug 18 01:43:06 shubhra-pc [info] kernel:[  393.061928] amdgpu 0000:04:00.0: amdgpu: ring jpeg_dec uses VM inv eng 6 on hub 1
Aug 18 01:43:06 shubhra-pc [info] kernel:[  393.062740] nvme nvme0: 16/0/0 default/read/poll queues
Aug 18 01:43:06 shubhra-pc [info] kernel:[  394.404909] OOM killer enabled.
Aug 18 01:43:06 shubhra-pc [info] kernel:[  394.404915] Restarting tasks ... done.
Aug 18 01:43:06 shubhra-pc [notice] kernel:[  394.407181] random: crng reseeded on system resumption
Aug 18 01:43:06 shubhra-pc [info] kernel:[  394.563788] PM: suspend exit
Aug 18 01:43:12 shubhra-pc [info] kernel:[  399.986373] wlp3s0: authenticate with 0e:e0:dc:16:bf:74
Aug 18 01:43:12 shubhra-pc [info] kernel:[  400.019036] wlp3s0: send auth to 0e:e0:dc:16:bf:74 (try 1/3)
Aug 18 01:43:12 shubhra-pc [info] kernel:[  400.077052] wlp3s0: authenticated
Aug 18 01:43:12 shubhra-pc [info] kernel:[  400.083473] wlp3s0: associate with 0e:e0:dc:16:bf:74 (try 1/3)
Aug 18 01:43:12 shubhra-pc [info] kernel:[  400.095159] wlp3s0: RX AssocResp from 0e:e0:dc:16:bf:74 (capab=0x1431 status=0 aid=16)
Aug 18 01:43:12 shubhra-pc [info] kernel:[  400.122952] wlp3s0: associated
Aug 18 01:43:12 shubhra-pc [info] kernel:[  400.316949] IPv6: ADDRCONF(NETDEV_CHANGE): wlp3s0: link becomes ready
Comment 65 Shubhra Prakash Nandi 2023-08-17 20:25:30 UTC
This is from 6.1.39

Aug 18 01:52:02 shubhra-pc [debug] kernel:[   55.731448] amd_gpio AMDI0030:00: GPIO 0 is active: 0x100578e3
Aug 18 01:52:03 shubhra-pc [info] kernel:[   56.071075] wlp3s0: deauthenticating from 0e:e0:dc:16:bf:74 by local choice (Reason: 3=DEAUTH_LEAVING)
Aug 18 01:53:52 shubhra-pc [info] kernel:[   60.951765] PM: suspend entry (s2idle)
Aug 18 01:53:52 shubhra-pc [info] kernel:[   60.956999] Filesystems sync: 0.005 seconds
Aug 18 01:53:52 shubhra-pc [info] kernel:[   60.957648] Freezing user space processes
Aug 18 01:53:52 shubhra-pc [info] kernel:[   60.959421] Freezing user space processes completed (elapsed 0.001 seconds)
Aug 18 01:53:52 shubhra-pc [info] kernel:[   60.959425] OOM killer disabled.
Aug 18 01:53:52 shubhra-pc [info] kernel:[   60.959427] Freezing remaining freezable tasks
Aug 18 01:53:52 shubhra-pc [info] kernel:[   60.960315] Freezing remaining freezable tasks completed (elapsed 0.000 seconds)
Aug 18 01:53:52 shubhra-pc [info] kernel:[   60.960318] printk: Suspending console(s) (use no_console_suspend to debug)
Aug 18 01:53:52 shubhra-pc [warning] kernel:[   60.982648] queueing ieee80211 work while going to suspend
Aug 18 01:53:52 shubhra-pc [info] kernel:[   61.000337] atkbd serio0: Disabling IRQ1 wakeup source to avoid platform firmware bug
Aug 18 01:53:52 shubhra-pc [info] kernel:[   61.272479] ACPI: EC: interrupt blocked
Aug 18 01:53:52 shubhra-pc [info] kernel:[  164.021900] ACPI: EC: interrupt unblocked
Aug 18 01:53:52 shubhra-pc [debug] kernel:[  164.107765] amd_gpio AMDI0030:00: GPIO 0 is active: 0x300578e3
Aug 18 01:53:52 shubhra-pc [info] kernel:[  164.109798] [drm] PCIE GART of 1024M enabled.
Aug 18 01:53:52 shubhra-pc [info] kernel:[  164.109805] [drm] PTB located at 0x000000F41FC00000
Aug 18 01:53:52 shubhra-pc [info] kernel:[  164.109828] amdgpu 0000:04:00.0: amdgpu: SMU is resuming...
Aug 18 01:53:52 shubhra-pc [info] kernel:[  164.111438] amdgpu 0000:04:00.0: amdgpu: dpm has been disabled
Aug 18 01:53:52 shubhra-pc [info] kernel:[  164.112531] amdgpu 0000:04:00.0: amdgpu: SMU is resumed successfully!
Aug 18 01:53:52 shubhra-pc [info] kernel:[  164.117832] [drm] VCN decode and encode initialized successfully(under DPG Mode).
Aug 18 01:53:52 shubhra-pc [info] kernel:[  164.118339] [drm] JPEG decode initialized successfully.
Aug 18 01:53:52 shubhra-pc [info] kernel:[  164.118568] amdgpu 0000:04:00.0: amdgpu: ring gfx uses VM inv eng 0 on hub 0
Aug 18 01:53:52 shubhra-pc [info] kernel:[  164.118571] amdgpu 0000:04:00.0: amdgpu: ring comp_1.0.0 uses VM inv eng 1 on hub 0
Aug 18 01:53:52 shubhra-pc [info] kernel:[  164.118573] amdgpu 0000:04:00.0: amdgpu: ring comp_1.1.0 uses VM inv eng 4 on hub 0
Aug 18 01:53:52 shubhra-pc [info] kernel:[  164.118574] amdgpu 0000:04:00.0: amdgpu: ring comp_1.2.0 uses VM inv eng 5 on hub 0
Aug 18 01:53:52 shubhra-pc [info] kernel:[  164.118576] amdgpu 0000:04:00.0: amdgpu: ring comp_1.3.0 uses VM inv eng 6 on hub 0
Aug 18 01:53:52 shubhra-pc [info] kernel:[  164.118577] amdgpu 0000:04:00.0: amdgpu: ring comp_1.0.1 uses VM inv eng 7 on hub 0
Aug 18 01:53:52 shubhra-pc [info] kernel:[  164.118578] amdgpu 0000:04:00.0: amdgpu: ring comp_1.1.1 uses VM inv eng 8 on hub 0
Aug 18 01:53:52 shubhra-pc [info] kernel:[  164.118580] amdgpu 0000:04:00.0: amdgpu: ring comp_1.2.1 uses VM inv eng 9 on hub 0
Aug 18 01:53:52 shubhra-pc [info] kernel:[  164.118581] amdgpu 0000:04:00.0: amdgpu: ring comp_1.3.1 uses VM inv eng 10 on hub 0
Aug 18 01:53:52 shubhra-pc [info] kernel:[  164.118583] amdgpu 0000:04:00.0: amdgpu: ring kiq_2.1.0 uses VM inv eng 11 on hub 0
Aug 18 01:53:52 shubhra-pc [info] kernel:[  164.118584] amdgpu 0000:04:00.0: amdgpu: ring sdma0 uses VM inv eng 0 on hub 1
Aug 18 01:53:52 shubhra-pc [info] kernel:[  164.118586] amdgpu 0000:04:00.0: amdgpu: ring vcn_dec uses VM inv eng 1 on hub 1
Aug 18 01:53:52 shubhra-pc [info] kernel:[  164.118587] amdgpu 0000:04:00.0: amdgpu: ring vcn_enc0 uses VM inv eng 4 on hub 1
Aug 18 01:53:52 shubhra-pc [info] kernel:[  164.118588] amdgpu 0000:04:00.0: amdgpu: ring vcn_enc1 uses VM inv eng 5 on hub 1
Aug 18 01:53:52 shubhra-pc [info] kernel:[  164.118589] amdgpu 0000:04:00.0: amdgpu: ring jpeg_dec uses VM inv eng 6 on hub 1
Aug 18 01:53:52 shubhra-pc [info] kernel:[  164.120133] nvme nvme0: 16/0/0 default/read/poll queues
Aug 18 01:53:52 shubhra-pc [info] kernel:[  165.382248] OOM killer enabled.
Aug 18 01:53:52 shubhra-pc [info] kernel:[  165.382254] Restarting tasks ... done.
Aug 18 01:53:52 shubhra-pc [notice] kernel:[  165.384575] random: crng reseeded on system resumption
Aug 18 01:53:52 shubhra-pc [info] kernel:[  165.531084] PM: suspend exit
Aug 18 01:53:57 shubhra-pc [info] kernel:[  170.721370] wlp3s0: authenticate with 0e:e0:dc:16:bf:74
Aug 18 01:53:57 shubhra-pc [info] kernel:[  170.753971] wlp3s0: send auth to 0e:e0:dc:16:bf:74 (try 1/3)
Aug 18 01:53:57 shubhra-pc [info] kernel:[  170.803094] wlp3s0: authenticated
Aug 18 01:53:57 shubhra-pc [info] kernel:[  170.810950] wlp3s0: associate with 0e:e0:dc:16:bf:74 (try 1/3)
Aug 18 01:53:57 shubhra-pc [info] kernel:[  170.821581] wlp3s0: RX AssocResp from 0e:e0:dc:16:bf:74 (capab=0x1431 status=0 aid=19)
Aug 18 01:53:57 shubhra-pc [info] kernel:[  170.849377] wlp3s0: associated
Aug 18 01:53:58 shubhra-pc [info] kernel:[  171.014179] IPv6: ADDRCONF(NETDEV_CHANGE): wlp3s0: link becomes ready
Comment 66 Shubhra Prakash Nandi 2023-08-17 20:27:43 UTC
I think you are right, pins 9 is left active on 6.1.40 but not on 6.1.39
Comment 67 Shubhra Prakash Nandi 2023-08-17 20:52:06 UTC
I tried the full patch and pin 9 remains active there too. So something else is needed along with this patch.

Aug 18 02:16:26 shubhra-pc [debug] kernel:[  110.090437] amd_gpio AMDI0030:00: GPIO 0 is active: 0x100578e3
Aug 18 02:16:26 shubhra-pc [info] kernel:[  110.445824] wlp3s0: deauthenticating from 0e:e0:dc:16:bf:74 by local choice (Reason: 3=DEAUTH_LEAVING)
Aug 18 02:19:02 shubhra-pc [info] kernel:[  114.527458] PM: suspend entry (s2idle)
Aug 18 02:19:02 shubhra-pc [info] kernel:[  114.529552] Filesystems sync: 0.002 seconds
Aug 18 02:19:02 shubhra-pc [info] kernel:[  114.530068] Freezing user space processes
Aug 18 02:19:02 shubhra-pc [info] kernel:[  114.531761] Freezing user space processes completed (elapsed 0.001 seconds)
Aug 18 02:19:02 shubhra-pc [info] kernel:[  114.531764] OOM killer disabled.
Aug 18 02:19:02 shubhra-pc [info] kernel:[  114.531765] Freezing remaining freezable tasks
Aug 18 02:19:02 shubhra-pc [info] kernel:[  114.532886] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
Aug 18 02:19:02 shubhra-pc [info] kernel:[  114.532889] printk: Suspending console(s) (use no_console_suspend to debug)
Aug 18 02:19:02 shubhra-pc [warning] kernel:[  114.556634] queueing ieee80211 work while going to suspend
Aug 18 02:19:02 shubhra-pc [info] kernel:[  114.574406] atkbd serio0: Disabling IRQ1 wakeup source to avoid platform firmware bug
Aug 18 02:19:02 shubhra-pc [info] kernel:[  114.826523] ACPI: EC: interrupt blocked
Aug 18 02:19:02 shubhra-pc [info] kernel:[  264.624925] ACPI: EC: interrupt unblocked
Aug 18 02:19:02 shubhra-pc [debug] kernel:[  264.711315] amd_gpio AMDI0030:00: GPIO 0 is active: 0x300578e3
Aug 18 02:19:02 shubhra-pc [debug] kernel:[  264.712006] amd_gpio AMDI0030:00: GPIO 9 is active: 0x10041b00
Aug 18 02:19:02 shubhra-pc [err] kernel:[  264.712689] i2c_hid_acpi i2c-DLL0B46:01: i2c_hid_get_input: incomplete report (14/65280)
Aug 18 02:19:02 shubhra-pc [info] kernel:[  264.713430] [drm] PCIE GART of 1024M enabled.
Aug 18 02:19:02 shubhra-pc [info] kernel:[  264.713437] [drm] PTB located at 0x000000F41FC00000
Aug 18 02:19:02 shubhra-pc [info] kernel:[  264.713460] amdgpu 0000:04:00.0: amdgpu: SMU is resuming...
Aug 18 02:19:02 shubhra-pc [info] kernel:[  264.714442] amdgpu 0000:04:00.0: amdgpu: dpm has been disabled
Aug 18 02:19:02 shubhra-pc [info] kernel:[  264.715261] amdgpu 0000:04:00.0: amdgpu: SMU is resumed successfully!
Aug 18 02:19:02 shubhra-pc [info] kernel:[  264.720585] [drm] VCN decode and encode initialized successfully(under DPG Mode).
Aug 18 02:19:02 shubhra-pc [info] kernel:[  264.721082] [drm] JPEG decode initialized successfully.
Aug 18 02:19:02 shubhra-pc [info] kernel:[  264.721364] amdgpu 0000:04:00.0: amdgpu: ring gfx uses VM inv eng 0 on hub 0
Aug 18 02:19:02 shubhra-pc [info] kernel:[  264.721368] amdgpu 0000:04:00.0: amdgpu: ring comp_1.0.0 uses VM inv eng 1 on hub 0
Aug 18 02:19:02 shubhra-pc [info] kernel:[  264.721370] amdgpu 0000:04:00.0: amdgpu: ring comp_1.1.0 uses VM inv eng 4 on hub 0
Aug 18 02:19:02 shubhra-pc [info] kernel:[  264.721372] amdgpu 0000:04:00.0: amdgpu: ring comp_1.2.0 uses VM inv eng 5 on hub 0
Aug 18 02:19:02 shubhra-pc [info] kernel:[  264.721373] amdgpu 0000:04:00.0: amdgpu: ring comp_1.3.0 uses VM inv eng 6 on hub 0
Aug 18 02:19:02 shubhra-pc [info] kernel:[  264.721374] amdgpu 0000:04:00.0: amdgpu: ring comp_1.0.1 uses VM inv eng 7 on hub 0
Aug 18 02:19:02 shubhra-pc [info] kernel:[  264.721376] amdgpu 0000:04:00.0: amdgpu: ring comp_1.1.1 uses VM inv eng 8 on hub 0
Aug 18 02:19:02 shubhra-pc [info] kernel:[  264.721377] amdgpu 0000:04:00.0: amdgpu: ring comp_1.2.1 uses VM inv eng 9 on hub 0
Aug 18 02:19:02 shubhra-pc [info] kernel:[  264.721378] amdgpu 0000:04:00.0: amdgpu: ring comp_1.3.1 uses VM inv eng 10 on hub 0
Aug 18 02:19:02 shubhra-pc [info] kernel:[  264.721380] amdgpu 0000:04:00.0: amdgpu: ring kiq_2.1.0 uses VM inv eng 11 on hub 0
Aug 18 02:19:02 shubhra-pc [info] kernel:[  264.721381] amdgpu 0000:04:00.0: amdgpu: ring sdma0 uses VM inv eng 0 on hub 1
Aug 18 02:19:02 shubhra-pc [info] kernel:[  264.721382] amdgpu 0000:04:00.0: amdgpu: ring vcn_dec uses VM inv eng 1 on hub 1
Aug 18 02:19:02 shubhra-pc [info] kernel:[  264.721383] amdgpu 0000:04:00.0: amdgpu: ring vcn_enc0 uses VM inv eng 4 on hub 1
Aug 18 02:19:02 shubhra-pc [info] kernel:[  264.721384] amdgpu 0000:04:00.0: amdgpu: ring vcn_enc1 uses VM inv eng 5 on hub 1
Aug 18 02:19:02 shubhra-pc [info] kernel:[  264.721385] amdgpu 0000:04:00.0: amdgpu: ring jpeg_dec uses VM inv eng 6 on hub 1
Aug 18 02:19:02 shubhra-pc [info] kernel:[  264.723329] nvme nvme0: 16/0/0 default/read/poll queues
Aug 18 02:19:02 shubhra-pc [info] kernel:[  265.984506] OOM killer enabled.
Aug 18 02:19:02 shubhra-pc [info] kernel:[  265.984510] Restarting tasks ... done.
Aug 18 02:19:02 shubhra-pc [notice] kernel:[  265.986759] random: crng reseeded on system resumption
Aug 18 02:19:02 shubhra-pc [info] kernel:[  266.103567] PM: suspend exit
Aug 18 02:19:07 shubhra-pc [info] kernel:[  271.272464] wlp3s0: authenticate with 0e:e0:dc:16:bf:74
Aug 18 02:19:07 shubhra-pc [info] kernel:[  271.305031] wlp3s0: send auth to 0e:e0:dc:16:bf:74 (try 1/3)
Aug 18 02:19:07 shubhra-pc [info] kernel:[  271.349786] wlp3s0: authenticated
Aug 18 02:19:07 shubhra-pc [info] kernel:[  271.361048] wlp3s0: associate with 0e:e0:dc:16:bf:74 (try 1/3)
Aug 18 02:19:07 shubhra-pc [info] kernel:[  271.371183] wlp3s0: RX AssocResp from 0e:e0:dc:16:bf:74 (capab=0x1431 status=0 aid=21)
Aug 18 02:19:07 shubhra-pc [info] kernel:[  271.399293] wlp3s0: associated
Aug 18 02:19:08 shubhra-pc [info] kernel:[  271.624152] IPv6: ADDRCONF(NETDEV_CHANGE): wlp3s0: link becomes ready
Comment 68 Shubhra Prakash Nandi 2023-08-17 21:27:01 UTC
Also found that behavior of 6.1.40 with the full patch is similar to 6.4.4 if this help narrow down further.
Comment 69 Shubhra Prakash Nandi 2023-08-17 21:31:57 UTC
Log from 6.4.4

Aug 18 02:59:33 shubhra-pc [debug] kernel:[  106.825686] amd_gpio AMDI0030:00: GPIO 0 is active: 0x100578e3
Aug 18 02:59:34 shubhra-pc [info] kernel:[  107.075793] wlp3s0: deauthenticating from 0e:e0:dc:16:bf:74 by local choice (Reason: 3=DEAUTH_LEAVING)
Aug 18 02:59:37 shubhra-pc [info] kernel:[  110.432746] PM: suspend entry (s2idle)
Aug 18 03:00:11 shubhra-pc [info] kernel:[  110.434687] Filesystems sync: 0.001 seconds
Aug 18 03:00:11 shubhra-pc [debug] kernel:[  110.434690] PM: Preparing system for sleep (s2idle)
Aug 18 03:00:11 shubhra-pc [info] kernel:[  110.438432] Freezing user space processes
Aug 18 03:00:11 shubhra-pc [info] kernel:[  110.440028] Freezing user space processes completed (elapsed 0.001 seconds)
Aug 18 03:00:11 shubhra-pc [info] kernel:[  110.440031] OOM killer disabled.
Aug 18 03:00:11 shubhra-pc [info] kernel:[  110.440032] Freezing remaining freezable tasks
Aug 18 03:00:11 shubhra-pc [info] kernel:[  110.441128] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
Aug 18 03:00:11 shubhra-pc [debug] kernel:[  110.441130] PM: Suspending system (s2idle)
Aug 18 03:00:11 shubhra-pc [info] kernel:[  110.441132] printk: Suspending console(s) (use no_console_suspend to debug)
Aug 18 03:00:11 shubhra-pc [warning] kernel:[  110.452912] queueing ieee80211 work while going to suspend
Aug 18 03:00:11 shubhra-pc [info] kernel:[  110.484564] atkbd serio0: Disabling IRQ1 wakeup source to avoid platform firmware bug
Aug 18 03:00:11 shubhra-pc [debug] kernel:[  110.567368] PM: suspend of devices complete after 126.169 msecs
Aug 18 03:00:11 shubhra-pc [debug] kernel:[  110.567378] PM: start suspend of devices complete after 126.334 msecs
Aug 18 03:00:11 shubhra-pc [debug] kernel:[  110.567992] PM: late suspend of devices complete after 0.611 msecs
Aug 18 03:00:11 shubhra-pc [info] kernel:[  110.568223] ACPI: EC: interrupt blocked
Aug 18 03:00:11 shubhra-pc [debug] kernel:[  110.623038] PM: noirq suspend of devices complete after 55.000 msecs
Aug 18 03:00:11 shubhra-pc [info] kernel:[  110.623047] ACPI: \_SB_.PLTF.C000: LPI: Device not power manageable
Aug 18 03:00:11 shubhra-pc [info] kernel:[  110.623053] ACPI: \_SB_.PLTF.C001: LPI: Device not power manageable
Aug 18 03:00:11 shubhra-pc [info] kernel:[  110.623055] ACPI: \_SB_.PLTF.C002: LPI: Device not power manageable
Aug 18 03:00:11 shubhra-pc [info] kernel:[  110.623059] ACPI: \_SB_.PLTF.C003: LPI: Device not power manageable
Aug 18 03:00:11 shubhra-pc [info] kernel:[  110.623061] ACPI: \_SB_.PLTF.C004: LPI: Device not power manageable
Aug 18 03:00:11 shubhra-pc [info] kernel:[  110.623066] ACPI: \_SB_.PLTF.C005: LPI: Device not power manageable
Aug 18 03:00:11 shubhra-pc [info] kernel:[  110.623068] ACPI: \_SB_.PLTF.C006: LPI: Device not power manageable
Aug 18 03:00:11 shubhra-pc [info] kernel:[  110.623073] ACPI: \_SB_.PLTF.C007: LPI: Device not power manageable
Aug 18 03:00:11 shubhra-pc [info] kernel:[  110.623075] ACPI: \_SB_.PLTF.C008: LPI: Device not power manageable
Aug 18 03:00:11 shubhra-pc [info] kernel:[  110.623077] ACPI: \_SB_.PLTF.C009: LPI: Device not power manageable
Aug 18 03:00:11 shubhra-pc [info] kernel:[  110.623079] ACPI: \_SB_.PLTF.C00A: LPI: Device not power manageable
Aug 18 03:00:11 shubhra-pc [info] kernel:[  110.623080] ACPI: \_SB_.PLTF.C00B: LPI: Device not power manageable
Aug 18 03:00:11 shubhra-pc [info] kernel:[  110.623083] ACPI: \_SB_.PLTF.C00C: LPI: Device not power manageable
Aug 18 03:00:11 shubhra-pc [info] kernel:[  110.623084] ACPI: \_SB_.PLTF.C00D: LPI: Device not power manageable
Aug 18 03:00:11 shubhra-pc [info] kernel:[  110.623086] ACPI: \_SB_.PLTF.C00E: LPI: Device not power manageable
Aug 18 03:00:11 shubhra-pc [info] kernel:[  110.623087] ACPI: \_SB_.PLTF.C00F: LPI: Device not power manageable
Aug 18 03:00:11 shubhra-pc [info] kernel:[  110.623089] ACPI: \_SB_.PCI0.GPP1: LPI: Device not power manageable
Aug 18 03:00:11 shubhra-pc [info] kernel:[  110.623091] ACPI: \_SB_.PCI0.GPP3: LPI: Device not power manageable
Aug 18 03:00:11 shubhra-pc [info] kernel:[  110.623092] ACPI: \_SB_.PCI0.GPP4: LPI: Device not power manageable
Aug 18 03:00:11 shubhra-pc [info] kernel:[  110.623094] ACPI: \_SB_.PCI0.GPP6: LPI: Device not power manageable
Aug 18 03:00:11 shubhra-pc [info] kernel:[  110.623096] ACPI: \_SB_.PCI0.GPP1.NVME: LPI: Constraint not met; min power state:D3hot current power state:D0
Aug 18 03:00:11 shubhra-pc [info] kernel:[  110.623099] ACPI: \_SB_.PCI0.GPP3.RTL8: LPI: Device not power manageable
Aug 18 03:00:11 shubhra-pc [info] kernel:[  110.623101] ACPI: \_SB_.PCI0.GPP4.WLAN: LPI: Device not power manageable
Aug 18 03:00:11 shubhra-pc [info] kernel:[  110.623103] ACPI: \_SB_.PCI0.GP17.VGA_: LPI: Device not power manageable
Aug 18 03:00:11 shubhra-pc [info] kernel:[  110.623107] ACPI: \_SB_.PCI0.GP17.HDAU: LPI: Device not power manageable
Aug 18 03:00:11 shubhra-pc [info] kernel:[  110.623110] ACPI: \_SB_.I2CA.TPNL: LPI: Device not power manageable
Aug 18 03:00:11 shubhra-pc [debug] kernel:[  110.736451] PM: suspend-to-idle
Aug 18 03:00:11 shubhra-pc [debug] kernel:[  143.070680] Timekeeping suspended for 32.167 seconds
Aug 18 03:00:11 shubhra-pc [debug] kernel:[  143.070722] PM: Triggering wakeup from IRQ 9
Aug 18 03:00:11 shubhra-pc [debug] kernel:[  143.070726] PM: Triggering wakeup from IRQ 7
Aug 18 03:00:11 shubhra-pc [debug] kernel:[  143.070785] ACPI: EC: ACPI EC GPE status set
Aug 18 03:00:11 shubhra-pc [debug] kernel:[  143.070811] ACPI: EC: ACPI EC GPE dispatched
Aug 18 03:00:11 shubhra-pc [debug] kernel:[  143.128537] ACPI: EC: ACPI EC work flushed
Aug 18 03:00:11 shubhra-pc [debug] kernel:[  143.130569] ACPI: PM: Wakeup after ACPI Notify sync
Aug 18 03:00:11 shubhra-pc [debug] kernel:[  143.130571] PM: resume from suspend-to-idle
Aug 18 03:00:11 shubhra-pc [info] kernel:[  143.189074] ACPI: EC: interrupt unblocked
Aug 18 03:00:11 shubhra-pc [debug] kernel:[  143.275445] PM: noirq resume of devices complete after 86.712 msecs
Aug 18 03:00:11 shubhra-pc [debug] kernel:[  143.275476] amd_gpio AMDI0030:00: GPIO 0 is active: 0x300578e3
Aug 18 03:00:11 shubhra-pc [debug] kernel:[  143.275828] PM: early resume of devices complete after 0.296 msecs
Aug 18 03:00:11 shubhra-pc [debug] kernel:[  143.276101] amd_gpio AMDI0030:00: GPIO 9 is active: 0x10041b00
Aug 18 03:00:11 shubhra-pc [info] kernel:[  143.277460] [drm] PCIE GART of 1024M enabled.
Aug 18 03:00:11 shubhra-pc [info] kernel:[  143.277467] [drm] PTB located at 0x000000F41FC00000
Aug 18 03:00:11 shubhra-pc [info] kernel:[  143.277491] amdgpu 0000:04:00.0: amdgpu: SMU is resuming...
Aug 18 03:00:11 shubhra-pc [info] kernel:[  143.279183] amdgpu 0000:04:00.0: amdgpu: dpm has been disabled
Aug 18 03:00:11 shubhra-pc [info] kernel:[  143.280167] amdgpu 0000:04:00.0: amdgpu: SMU is resumed successfully!
Aug 18 03:00:11 shubhra-pc [info] kernel:[  143.285461] [drm] VCN decode and encode initialized successfully(under DPG Mode).
Aug 18 03:00:11 shubhra-pc [info] kernel:[  143.285796] [drm] JPEG decode initialized successfully.
Aug 18 03:00:11 shubhra-pc [info] kernel:[  143.286027] amdgpu 0000:04:00.0: amdgpu: ring gfx uses VM inv eng 0 on hub 0
Aug 18 03:00:11 shubhra-pc [info] kernel:[  143.286029] amdgpu 0000:04:00.0: amdgpu: ring gfx_low uses VM inv eng 1 on hub 0
Aug 18 03:00:11 shubhra-pc [info] kernel:[  143.286030] amdgpu 0000:04:00.0: amdgpu: ring gfx_high uses VM inv eng 4 on hub 0
Aug 18 03:00:11 shubhra-pc [info] kernel:[  143.286031] amdgpu 0000:04:00.0: amdgpu: ring comp_1.0.0 uses VM inv eng 5 on hub 0
Aug 18 03:00:11 shubhra-pc [info] kernel:[  143.286032] amdgpu 0000:04:00.0: amdgpu: ring comp_1.1.0 uses VM inv eng 6 on hub 0
Aug 18 03:00:11 shubhra-pc [info] kernel:[  143.286032] amdgpu 0000:04:00.0: amdgpu: ring comp_1.2.0 uses VM inv eng 7 on hub 0
Aug 18 03:00:11 shubhra-pc [info] kernel:[  143.286033] amdgpu 0000:04:00.0: amdgpu: ring comp_1.3.0 uses VM inv eng 8 on hub 0
Aug 18 03:00:11 shubhra-pc [info] kernel:[  143.286034] amdgpu 0000:04:00.0: amdgpu: ring comp_1.0.1 uses VM inv eng 9 on hub 0
Aug 18 03:00:11 shubhra-pc [info] kernel:[  143.286035] amdgpu 0000:04:00.0: amdgpu: ring comp_1.1.1 uses VM inv eng 10 on hub 0
Aug 18 03:00:11 shubhra-pc [info] kernel:[  143.286036] amdgpu 0000:04:00.0: amdgpu: ring comp_1.2.1 uses VM inv eng 11 on hub 0
Aug 18 03:00:11 shubhra-pc [info] kernel:[  143.286037] amdgpu 0000:04:00.0: amdgpu: ring comp_1.3.1 uses VM inv eng 12 on hub 0
Aug 18 03:00:11 shubhra-pc [info] kernel:[  143.286037] amdgpu 0000:04:00.0: amdgpu: ring kiq_2.1.0 uses VM inv eng 13 on hub 0
Aug 18 03:00:11 shubhra-pc [info] kernel:[  143.286038] amdgpu 0000:04:00.0: amdgpu: ring sdma0 uses VM inv eng 0 on hub 1
Aug 18 03:00:11 shubhra-pc [info] kernel:[  143.286039] amdgpu 0000:04:00.0: amdgpu: ring vcn_dec uses VM inv eng 1 on hub 1
Aug 18 03:00:11 shubhra-pc [info] kernel:[  143.286040] amdgpu 0000:04:00.0: amdgpu: ring vcn_enc0 uses VM inv eng 4 on hub 1
Aug 18 03:00:11 shubhra-pc [info] kernel:[  143.286041] amdgpu 0000:04:00.0: amdgpu: ring vcn_enc1 uses VM inv eng 5 on hub 1
Aug 18 03:00:11 shubhra-pc [info] kernel:[  143.286042] amdgpu 0000:04:00.0: amdgpu: ring jpeg_dec uses VM inv eng 6 on hub 1
Aug 18 03:00:11 shubhra-pc [info] kernel:[  143.287011] nvme nvme0: 16/0/0 default/read/poll queues
Aug 18 03:00:11 shubhra-pc [debug] kernel:[  144.548125] PM: resume of devices complete after 1273.195 msecs
Aug 18 03:00:11 shubhra-pc [debug] kernel:[  144.548493] PM: Finishing wakeup.
Aug 18 03:00:11 shubhra-pc [info] kernel:[  144.548685] OOM killer enabled.
Aug 18 03:00:11 shubhra-pc [info] kernel:[  144.548688] Restarting tasks ... done.
Aug 18 03:00:11 shubhra-pc [notice] kernel:[  144.550266] random: crng reseeded on system resumption
Aug 18 03:00:11 shubhra-pc [info] kernel:[  144.697702] PM: suspend exit
Aug 18 03:00:16 shubhra-pc [info] kernel:[  149.740210] wlp3s0: authenticate with 0e:e0:dc:16:bf:74
Aug 18 03:00:16 shubhra-pc [info] kernel:[  149.769904] wlp3s0: send auth to 0e:e0:dc:16:bf:74 (try 1/3)
Aug 18 03:00:16 shubhra-pc [info] kernel:[  149.825724] wlp3s0: authenticated
Aug 18 03:00:16 shubhra-pc [info] kernel:[  149.843783] wlp3s0: associate with 0e:e0:dc:16:bf:74 (try 1/3)
Aug 18 03:00:16 shubhra-pc [info] kernel:[  149.857711] wlp3s0: RX AssocResp from 0e:e0:dc:16:bf:74 (capab=0x1431 status=0 aid=1)
Aug 18 03:00:16 shubhra-pc [info] kernel:[  149.879643] wlp3s0: associated
Aug 18 03:00:16 shubhra-pc [info] kernel:[  150.037315] IPv6: ADDRCONF(NETDEV_CHANGE): wlp3s0: link becomes ready
Comment 70 Mario Limonciello (AMD) 2023-08-18 01:32:02 UTC
I'm tempted to say it sounds like a hardware problem.  But if you can reliably go back to 6.1.39 and stop getting the "random" wakeups from GPIO 9 I think this really does need a proper bisect to explain the difference.
Comment 71 Shubhra Prakash Nandi 2023-08-18 06:48:41 UTC
Ok will bisect and let me know.
Comment 72 Mario Limonciello (AMD) 2023-08-18 14:45:53 UTC
I got another report of a hot system and the touchpad GPIO pin is marked as a wake source after that patch.

As that patch definitely "improves" things I'm going to drop it to the mailing list, but please still bisect and if you find a second issue we can send out a second patch too.
Comment 73 Shubhra Prakash Nandi 2023-08-19 06:31:30 UTC
Created attachment 304907 [details]
6.1.40 working patch

This patch works for me, did not observe any heating up of the laptop during sleep and also battery drain in sleep was similar to kernel version 6.1.39/6.4.4 .
Comment 74 Shubhra Prakash Nandi 2023-08-19 06:32:24 UTC
I will test this patch upstream and see if there are any other issues.
Comment 75 Shubhra Prakash Nandi 2023-08-19 21:11:25 UTC
(In reply to Mario Limonciello (AMD) from comment #49)
> Created attachment 304880 [details]
> potential patch (v1)
> 
> I think I understand what's going on.  It seems to me that the boot firmware
> had programmed the touchpad GPIO as an s0i3 wake source, but the kernel
> hasn't.
> 
> This means that even though the kernel doesn't touch those bits in the GPIO
> register they remain enabled.  I've got a potential patch.  Can you please
> give this a try?

This patch does not prevent rearming of the pin in my system causing wakeups to happen.

Aug 20 02:27:45 shubhra-pc [debug] kernel:[  844.094915] PM: Triggering wakeup from IRQ 9
Aug 20 02:27:45 shubhra-pc [debug] kernel:[  844.095017] ACPI: EC: ACPI EC GPE status set
Aug 20 02:27:45 shubhra-pc [debug] kernel:[  844.095041] ACPI: EC: ACPI EC GPE dispatched
Aug 20 02:27:45 shubhra-pc [debug] kernel:[  844.153821] ACPI: EC: ACPI EC work flushed
Aug 20 02:27:45 shubhra-pc [debug] kernel:[  844.157723] ACPI: PM: Rearming ACPI SCI for wakeup
Comment 76 Shubhra Prakash Nandi 2023-08-20 10:17:12 UTC
(In reply to Shubhra Prakash Nandi from comment #75)
> (In reply to Mario Limonciello (AMD) from comment #49)
> > Created attachment 304880 [details]
> > potential patch (v1)
> > 
> > I think I understand what's going on.  It seems to me that the boot
> firmware
> > had programmed the touchpad GPIO as an s0i3 wake source, but the kernel
> > hasn't.
> > 
> > This means that even though the kernel doesn't touch those bits in the GPIO
> > register they remain enabled.  I've got a potential patch.  Can you please
> > give this a try?
> 
> This patch does not prevent rearming of the pin in my system causing wakeups
> to happen.
> 
> Aug 20 02:27:45 shubhra-pc [debug] kernel:[  844.094915] PM: Triggering
> wakeup from IRQ 9
> Aug 20 02:27:45 shubhra-pc [debug] kernel:[  844.095017] ACPI: EC: ACPI EC
> GPE status set
> Aug 20 02:27:45 shubhra-pc [debug] kernel:[  844.095041] ACPI: EC: ACPI EC
> GPE dispatched
> Aug 20 02:27:45 shubhra-pc [debug] kernel:[  844.153821] ACPI: EC: ACPI EC
> work flushed
> Aug 20 02:27:45 shubhra-pc [debug] kernel:[  844.157723] ACPI: PM: Rearming
> ACPI SCI for wakeup

The log is not dissimilar to one with my patch though in this case laptop is heating up. So we need to set the interrupt bits as well.
Comment 77 Mario Limonciello (AMD) 2023-08-20 11:43:36 UTC
Did you have dynamic debug turned on?  No pin shows up as active?
Comment 78 Shubhra Prakash Nandi 2023-08-20 13:02:20 UTC
Pins did show up as active similar to what my patch produced but the laptop was heating up when interrupt masking was disabled. I think both wake and interrupt masking is required for the pins to fix this issue at least in my case.
Comment 79 Shubhra Prakash Nandi 2023-08-20 13:43:06 UTC
This is the output with the patch with only wake up bit masking

-- Output of /sys/kernel/debug/gpio

gpiochip0: GPIOs 512-767, parent: platform/AMDI0030:00, AMDI0030:00:
WAKE_INT_MASTER_REG: 0xff000000
GPIO bank0
gpio	  int|active|trigger|S0i3| S3|S4/S5| Z|wake|pull|  orient|       debounce|reg
#0	   😛|     ↑|   edge|  ⏰| ⏰|     |  |    |    |input  ↑|b (🕑 046875us)|0x578e3
#1	    ∅|      |       |    |   |     |  |    |  ↑ |input  ↑|               |0x150000
#2	   😛|     ↓|   edge|  ⏰| ⏰|     |  |    |    |input  ↑|               |0x57a00
#3	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#4	    ∅|      |       |    |   |     |  |    |    |output ↑|               |0xc50000
#5	    ∅|      |       |    |   |     |  |    |    |output ↓|               |0x840000
#6	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#7	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x40000
#8	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x40000
#9	   😛|     ↓|  level|    |   |     |  |    |    |input  ↑|               |0x51b00
#10	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#11	    ∅|      |       |    |   |     |  |    |    |output ↓|               |0x840000
#12	    ∅|      |       |    |   |     |  |    |    |output ↑|               |0xc50000
#13	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#14	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#15	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#16	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#17	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#18	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#19	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#20	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#21	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#22	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#23	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#24	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x40000
#25	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#26	    ∅|      |       |    |   |     |  |    |    |output ↑|               |0xc50000
#27	    ∅|      |       |    |   |     |  |    |    |output ↓|               |0x840000
#28	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#29	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x40000
#30	    ∅|      |       |    |   |     |  |    |    |output ↓|               |0x840000
#31	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#32	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#33	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#34	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#35	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#36	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#37	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#38	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#39	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#40	    ∅|      |       |    |   |     |  |    |    |output ↑|               |0xc50000
#41	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#42	    ∅|      |       |    |   |     |  |    |    |output ↑|               |0xc50000
#43	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#44	   😛|     ↑|   edge|  ⏰| ⏰|     |  |    |    |input  ↓|               |0x7800
#45	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#46	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#47	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#48	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#49	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x10000
#50	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#51	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#52	   😷|     ↑|  level|    |   |     |  |    |    |input  ↓|               |0x900
#53	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#54	   😛|     ↓|   edge|  ⏰| ⏰|     |  |    |    |input  ↓|               |0x7a00
#55	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#56	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#57	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#58	   😛|     ↑|  level|  ⏰| ⏰|     |  |    |    |input  ↓|               |0x7900
#59	   😛|     ↑|  level|  ⏰| ⏰|     |  |    |    |input  ↓|               |0x7900
#60	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#61	   😛|     ↑|  level|  ⏰| ⏰|     |  |    |    |input  ↓|               |0x7900
#62	   😛|     ↑|  level|  ⏰| ⏰|     |  |    |    |input  ↓|               |0x7900
GPIO bank1
gpio	  int|active|trigger|S0i3| S3|S4/S5| Z|wake|pull|  orient|       debounce|reg
#64	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#65	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#66	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#67	    ∅|      |       |    |   |     |  |    |    |output ↓|               |0x840000
#68	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#69	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#70	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#71	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#72	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#73	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#74	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x40000
#75	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#76	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#77	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#78	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#79	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#80	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#81	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#82	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#83	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#84	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#85	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x40000
#86	    ∅|      |       |    |   |     |  |    |    |output ↓|               |0x840000
#87	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#88	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x40000
#89	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#90	    ∅|      |       |    |   |     |  |    |    |output ↓|               |0x840000
#91	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x40000
#92	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#93	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#94	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#95	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#96	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#97	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#98	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#99	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#100	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#101	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#102	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#103	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#104	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#105	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#106	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#107	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#108	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#109	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#110	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#111	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#112	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#113	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#114	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#115	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#116	    ∅|      |       |    |   |     |  |    |    |output ↓|               |0x840000
#117	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#118	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#119	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#120	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x40000
#121	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#122	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#123	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#124	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#125	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#126	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#127	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
GPIO bank2
gpio	  int|active|trigger|S0i3| S3|S4/S5| Z|wake|pull|  orient|       debounce|reg
#128	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#129	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#130	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#131	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#132	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#133	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#134	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#135	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#136	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#137	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#138	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#139	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#140	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#141	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#142	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#143	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#144	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x40000
#145	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#146	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x50000
#147	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x40000
#148	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x40000
#149	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#150	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#151	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#152	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#153	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#154	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#155	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#156	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#157	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#158	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#159	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#160	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#161	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#162	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#163	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#164	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#165	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#166	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#167	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#168	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#169	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#170	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#171	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#172	   😷|     ↑|  level|    |   |     |  |    |    |input  ↓|               |0x900
#173	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#174	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#175	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x10000
#176	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#177	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#178	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#179	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#180	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#181	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#182	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x10000
#183	    ∅|      |       |    |   |     |  |    |    |input  ↑|               |0x10000
GPIO bank3
gpio	  int|active|trigger|S0i3| S3|S4/S5| Z|wake|pull|  orient|       debounce|reg
#192	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#193	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#194	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#195	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#196	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#197	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#198	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#199	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#200	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#201	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#202	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#203	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#204	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#205	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#206	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#207	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#208	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#209	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#210	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#211	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#212	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#213	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#214	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#215	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#216	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#217	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#218	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#219	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#220	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#221	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#222	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0
#223	    ∅|      |       |    |   |     |  |    |    |input  ↓|               |0x0


-- Kernel debug log

Aug 20 18:59:41 shubhra-pc [debug] kernel:[ 1021.520398] amd_gpio AMDI0030:00: GPIO 0 is active: 0x100578e3
Aug 20 18:59:41 shubhra-pc [info] kernel:[ 1021.674358] wlp3s0: deauthenticating from 0e:e0:dc:16:bf:74 by local choice (Reason: 3=DEAUTH_LEAVING)
Aug 20 18:59:45 shubhra-pc [info] kernel:[ 1024.994754] PM: suspend entry (s2idle)
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1024.997544] Filesystems sync: 0.002 seconds
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1024.997548] PM: Preparing system for sleep (s2idle)
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1025.001443] Freezing user space processes
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1025.003267] Freezing user space processes completed (elapsed 0.001 seconds)
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1025.003271] OOM killer disabled.
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1025.003272] Freezing remaining freezable tasks
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1025.004465] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1025.004468] PM: Suspending system (s2idle)
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1025.004471] printk: Suspending console(s) (use no_console_suspend to debug)
Aug 20 19:08:30 shubhra-pc [warning] kernel:[ 1025.016662] queueing ieee80211 work while going to suspend
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1025.075723] PM: suspend of devices complete after 70.909 msecs
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1025.075732] PM: start suspend of devices complete after 71.206 msecs
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1025.076554] PM: late suspend of devices complete after 0.816 msecs
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1025.076975] ACPI: EC: interrupt blocked
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1025.104192] PM: noirq suspend of devices complete after 27.531 msecs
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1025.104207] ACPI: \_SB_.PCI0.GPP1.NVME: LPI: Constraint not met; min power state:D3hot current power state:D0
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1025.127440] PM: suspend-to-idle
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1325.529251] Timekeeping suspended for 299.598 seconds
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1325.529306] PM: Triggering wakeup from IRQ 9
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1325.529385] ACPI: EC: ACPI EC GPE status set
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1325.529417] ACPI: EC: ACPI EC GPE dispatched
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1325.588354] ACPI: EC: ACPI EC work flushed
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1325.592571] ACPI: PM: Rearming ACPI SCI for wakeup
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1325.592600] PM: Triggering wakeup from IRQ 9
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1325.612692] ACPI: EC: ACPI EC GPE status set
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1325.612709] ACPI: PM: Rearming ACPI SCI for wakeup
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1342.371669] Timekeeping suspended for 16.896 seconds
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1342.371735] PM: Triggering wakeup from IRQ 9
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1342.371816] ACPI: EC: ACPI EC GPE status set
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1342.371846] ACPI: EC: ACPI EC GPE dispatched
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1342.426991] ACPI: EC: ACPI EC work flushed
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1342.431206] ACPI: PM: Rearming ACPI SCI for wakeup
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1342.431230] PM: Triggering wakeup from IRQ 9
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1342.451329] ACPI: EC: ACPI EC GPE status set
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1342.451346] ACPI: PM: Rearming ACPI SCI for wakeup
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1359.216090] Timekeeping suspended for 16.899 seconds
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1359.216139] PM: Triggering wakeup from IRQ 9
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1359.216235] ACPI: EC: ACPI EC GPE status set
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1359.216257] ACPI: EC: ACPI EC GPE dispatched
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1359.271388] ACPI: EC: ACPI EC work flushed
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1359.275577] ACPI: PM: Rearming ACPI SCI for wakeup
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1376.058339] Timekeeping suspended for 16.920 seconds
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1376.058388] PM: Triggering wakeup from IRQ 9
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1376.058472] ACPI: EC: ACPI EC GPE status set
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1376.058502] ACPI: EC: ACPI EC GPE dispatched
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1376.114334] ACPI: EC: ACPI EC work flushed
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1376.118096] ACPI: PM: Rearming ACPI SCI for wakeup
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1392.900856] Timekeeping suspended for 16.919 seconds
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1392.900906] PM: Triggering wakeup from IRQ 9
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1392.901003] ACPI: EC: ACPI EC GPE status set
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1392.901030] ACPI: EC: ACPI EC GPE dispatched
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1392.956577] ACPI: EC: ACPI EC work flushed
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1392.960554] ACPI: PM: Rearming ACPI SCI for wakeup
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1392.960576] PM: Triggering wakeup from IRQ 9
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1392.980676] ACPI: EC: ACPI EC GPE status set
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1392.980693] ACPI: PM: Rearming ACPI SCI for wakeup
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1409.742999] Timekeeping suspended for 16.899 seconds
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1409.743047] PM: Triggering wakeup from IRQ 9
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1409.743124] ACPI: EC: ACPI EC GPE status set
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1409.743155] ACPI: EC: ACPI EC GPE dispatched
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1409.798197] ACPI: EC: ACPI EC work flushed
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1409.802104] ACPI: PM: Rearming ACPI SCI for wakeup
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1409.802126] PM: Triggering wakeup from IRQ 9
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1409.822227] ACPI: EC: ACPI EC GPE status set
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1409.822244] ACPI: PM: Rearming ACPI SCI for wakeup
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1426.586359] Timekeeping suspended for 16.900 seconds
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1426.586422] PM: Triggering wakeup from IRQ 9
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1426.586498] ACPI: EC: ACPI EC GPE status set
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1426.586529] ACPI: EC: ACPI EC GPE dispatched
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1426.642284] ACPI: EC: ACPI EC work flushed
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1426.646271] ACPI: PM: Rearming ACPI SCI for wakeup
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1426.646293] PM: Triggering wakeup from IRQ 9
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1426.666395] ACPI: EC: ACPI EC GPE status set
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1426.666412] ACPI: PM: Rearming ACPI SCI for wakeup
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1443.428142] Timekeeping suspended for 15.899 seconds
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1443.428190] PM: Triggering wakeup from IRQ 9
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1443.428265] ACPI: EC: ACPI EC GPE status set
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1443.428300] ACPI: EC: ACPI EC GPE dispatched
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1443.483175] ACPI: EC: ACPI EC work flushed
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1443.487089] ACPI: PM: Rearming ACPI SCI for wakeup
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1443.487111] PM: Triggering wakeup from IRQ 9
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1443.507212] ACPI: EC: ACPI EC GPE status set
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1443.507228] ACPI: PM: Rearming ACPI SCI for wakeup
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1460.271321] Timekeeping suspended for 16.900 seconds
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1460.271371] PM: Triggering wakeup from IRQ 9
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1460.271447] ACPI: EC: ACPI EC GPE status set
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1460.271479] ACPI: EC: ACPI EC GPE dispatched
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1460.326971] ACPI: EC: ACPI EC work flushed
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1460.330928] ACPI: PM: Rearming ACPI SCI for wakeup
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1460.330950] PM: Triggering wakeup from IRQ 9
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1460.351050] ACPI: EC: ACPI EC GPE status set
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1460.351068] ACPI: PM: Rearming ACPI SCI for wakeup
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1477.113340] Timekeeping suspended for 16.899 seconds
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1477.113390] PM: Triggering wakeup from IRQ 9
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1477.113495] ACPI: EC: ACPI EC GPE status set
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1477.113525] ACPI: EC: ACPI EC GPE dispatched
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1477.168859] ACPI: EC: ACPI EC work flushed
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1477.172961] ACPI: PM: Rearming ACPI SCI for wakeup
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1493.955096] Timekeeping suspended for 16.919 seconds
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1493.955144] PM: Triggering wakeup from IRQ 9
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1493.955238] ACPI: EC: ACPI EC GPE status set
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1493.955264] ACPI: EC: ACPI EC GPE dispatched
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1494.011020] ACPI: EC: ACPI EC work flushed
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1494.014989] ACPI: PM: Rearming ACPI SCI for wakeup
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1494.015013] PM: Triggering wakeup from IRQ 9
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1494.035112] ACPI: EC: ACPI EC GPE status set
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1494.035129] ACPI: PM: Rearming ACPI SCI for wakeup
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1510.797535] Timekeeping suspended for 16.899 seconds
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1510.797582] PM: Triggering wakeup from IRQ 9
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1510.797681] ACPI: EC: ACPI EC GPE status set
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1510.797711] ACPI: EC: ACPI EC GPE dispatched
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1510.852788] ACPI: EC: ACPI EC work flushed
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1510.856694] ACPI: PM: Rearming ACPI SCI for wakeup
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1510.856717] PM: Triggering wakeup from IRQ 9
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1510.876818] ACPI: EC: ACPI EC GPE status set
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1510.876835] ACPI: PM: Rearming ACPI SCI for wakeup
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1527.640943] Timekeeping suspended for 16.900 seconds
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1527.640997] PM: Triggering wakeup from IRQ 9
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1527.641078] ACPI: EC: ACPI EC GPE status set
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1527.641106] ACPI: EC: ACPI EC GPE dispatched
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1527.696525] ACPI: EC: ACPI EC work flushed
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1527.700637] ACPI: PM: Rearming ACPI SCI for wakeup
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1527.700659] PM: Triggering wakeup from IRQ 9
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1527.720759] ACPI: EC: ACPI EC GPE status set
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1527.720776] ACPI: PM: Rearming ACPI SCI for wakeup
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1544.483149] Timekeeping suspended for 15.899 seconds
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1544.483208] PM: Triggering wakeup from IRQ 9
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1544.483283] ACPI: EC: ACPI EC GPE status set
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1544.483308] ACPI: EC: ACPI EC GPE dispatched
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1544.538388] ACPI: EC: ACPI EC work flushed
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1544.542508] ACPI: PM: Rearming ACPI SCI for wakeup
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1549.126063] Timekeeping suspended for 4.920 seconds
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1549.126131] PM: Triggering wakeup from IRQ 9
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1549.126143] PM: Triggering wakeup from IRQ 7
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1549.126219] ACPI: EC: ACPI EC GPE status set
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1549.126245] ACPI: EC: ACPI EC GPE dispatched
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1549.181849] ACPI: EC: ACPI EC work flushed
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1549.185880] ACPI: PM: Wakeup after ACPI Notify sync
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1549.185883] PM: resume from suspend-to-idle
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1549.242404] ACPI: EC: interrupt unblocked
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1549.329175] PM: noirq resume of devices complete after 86.972 msecs
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1549.329211] amd_gpio AMDI0030:00: GPIO 0 is active: 0x300578e3
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1549.329894] PM: early resume of devices complete after 0.607 msecs
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1549.330199] amd_gpio AMDI0030:00: GPIO 9 is active: 0x10041b00
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1549.331588] [drm] PCIE GART of 1024M enabled.
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1549.331593] [drm] PTB located at 0x000000F41FC00000
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1549.331615] amdgpu 0000:04:00.0: amdgpu: SMU is resuming...
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1549.333293] amdgpu 0000:04:00.0: amdgpu: dpm has been disabled
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1549.334357] amdgpu 0000:04:00.0: amdgpu: SMU is resumed successfully!
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1549.339626] [drm] VCN decode and encode initialized successfully(under DPG Mode).
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1549.339678] [drm] JPEG decode initialized successfully.
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1549.339871] amdgpu 0000:04:00.0: amdgpu: ring gfx uses VM inv eng 0 on hub 0
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1549.339873] amdgpu 0000:04:00.0: amdgpu: ring gfx_low uses VM inv eng 1 on hub 0
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1549.339876] amdgpu 0000:04:00.0: amdgpu: ring gfx_high uses VM inv eng 4 on hub 0
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1549.339877] amdgpu 0000:04:00.0: amdgpu: ring comp_1.0.0 uses VM inv eng 5 on hub 0
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1549.339879] amdgpu 0000:04:00.0: amdgpu: ring comp_1.1.0 uses VM inv eng 6 on hub 0
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1549.339881] amdgpu 0000:04:00.0: amdgpu: ring comp_1.2.0 uses VM inv eng 7 on hub 0
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1549.339883] amdgpu 0000:04:00.0: amdgpu: ring comp_1.3.0 uses VM inv eng 8 on hub 0
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1549.339885] amdgpu 0000:04:00.0: amdgpu: ring comp_1.0.1 uses VM inv eng 9 on hub 0
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1549.339886] amdgpu 0000:04:00.0: amdgpu: ring comp_1.1.1 uses VM inv eng 10 on hub 0
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1549.339888] amdgpu 0000:04:00.0: amdgpu: ring comp_1.2.1 uses VM inv eng 11 on hub 0
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1549.339890] amdgpu 0000:04:00.0: amdgpu: ring comp_1.3.1 uses VM inv eng 12 on hub 0
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1549.339892] amdgpu 0000:04:00.0: amdgpu: ring kiq_2.1.0 uses VM inv eng 13 on hub 0
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1549.339894] amdgpu 0000:04:00.0: amdgpu: ring sdma0 uses VM inv eng 0 on hub 1
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1549.339896] amdgpu 0000:04:00.0: amdgpu: ring vcn_dec uses VM inv eng 1 on hub 1
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1549.339897] amdgpu 0000:04:00.0: amdgpu: ring vcn_enc0 uses VM inv eng 4 on hub 1
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1549.339899] amdgpu 0000:04:00.0: amdgpu: ring vcn_enc1 uses VM inv eng 5 on hub 1
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1549.339901] amdgpu 0000:04:00.0: amdgpu: ring jpeg_dec uses VM inv eng 6 on hub 1
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1549.342272] nvme nvme0: 16/0/0 default/read/poll queues
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1550.603015] PM: resume of devices complete after 1272.210 msecs
Aug 20 19:08:30 shubhra-pc [debug] kernel:[ 1550.603567] PM: Finishing wakeup.
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1550.603801] OOM killer enabled.
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1550.603804] Restarting tasks ... done.
Aug 20 19:08:30 shubhra-pc [notice] kernel:[ 1550.606298] random: crng reseeded on system resumption
Aug 20 19:08:30 shubhra-pc [info] kernel:[ 1550.723085] PM: suspend exit
Aug 20 19:08:47 shubhra-pc [info] kernel:[ 1568.023188] wlp3s0: authenticate with 0e:e0:dc:16:bf:74
Aug 20 19:08:47 shubhra-pc [info] kernel:[ 1568.053524] wlp3s0: send auth to 0e:e0:dc:16:bf:74 (try 1/3)
Aug 20 19:08:47 shubhra-pc [info] kernel:[ 1568.110082] wlp3s0: authenticated
Aug 20 19:08:47 shubhra-pc [info] kernel:[ 1568.111971] wlp3s0: associate with 0e:e0:dc:16:bf:74 (try 1/3)
Aug 20 19:08:47 shubhra-pc [info] kernel:[ 1568.128748] wlp3s0: RX AssocResp from 0e:e0:dc:16:bf:74 (capab=0x1431 status=0 aid=8)
Aug 20 19:08:48 shubhra-pc [info] kernel:[ 1568.151836] wlp3s0: associated
Aug 20 19:08:48 shubhra-pc [info] kernel:[ 1568.325279] IPv6: ADDRCONF(NETDEV_CHANGE): wlp3s0: link becomes ready
Comment 80 Shubhra Prakash Nandi 2023-08-21 09:01:35 UTC
(In reply to Mario Limonciello (AMD) from comment #49)
> Created attachment 304880 [details]
> potential patch (v1)
> 
> I think I understand what's going on.  It seems to me that the boot firmware
> had programmed the touchpad GPIO as an s0i3 wake source, but the kernel
> hasn't.
> 
> This means that even though the kernel doesn't touch those bits in the GPIO
> register they remain enabled.  I've got a potential patch.  Can you please
> give this a try?

I did test this patch much more thoroughly and can confirm that the system heating and heavy battery drain issue during sleep is not observed with this patch as well.

In case I observe any issues with this patch in the future which is not observed with interrupt mask also applied, I will report back.
Comment 81 Shubhra Prakash Nandi 2023-08-21 09:02:56 UTC
No other commits are required to reverted for my system to function correctly.
Comment 82 Shubhra Prakash Nandi 2023-08-21 10:00:42 UTC
Just to be clear I applied the above patch on kernel version 6.4.11.
Comment 83 Mario Limonciello (AMD) 2023-08-21 12:35:54 UTC
Thanks, the subsystem maintainer has queued it up.  I expect it will be merged for 6.6-rc1.
Comment 84 Shubhra Prakash Nandi 2023-08-25 09:06:54 UTC
Strangely enough after disabling wakeup via GPIO pins for the touchpad with below kernel command line parameters I can still wakeup the system using touchpad. I have possibly masked all GPIO pins which were marked a wakeup capable for the touchpad controller. This though has disabled wakeups when LID is closed.

gpiolib_acpi.ignore_wake=DLL0B46:01@0,DLL0B46:01@2,DLL0B46:01@44,DLL0B46:01@54,DLL0B46:01@58,DLL0B46:01@59,DLL0B46:01@61,DLL0B46:01@62

Wakeup sources are disabled for both keyboard and touchpad

/sys/bus/i2c/devices/i2c-DLL0B46:01/power/wakeup:disabled
/sys/bus/serio/devices/serio0/power/wakeup:disabled
/sys/bus/serio/devices/serio1/power/wakeup:disabled

Does s2idle prevent disabling of few wakeup sources?
Comment 85 Mario Limonciello (AMD) 2023-08-25 17:22:07 UTC
> Strangely enough after disabling wakeup via GPIO pins for the touchpad with
> below kernel command line parameters I can still wakeup the system using
> touchpad. 
> Does s2idle prevent disabling of few wakeup sources?

GPIO pins can mirror to some GPEs, but this is configurable by the platform firmware.  That's why if you've seen me commenting in other issues with spurious wakeups I've suggested to ignore both a GPIO and GPE.  Can you see if any GPEs are incrementing when this wakeup happens?  You can snapshot all the GPEs in /sys/firmware/acpi/interrupts before/after suspend and compare.  If you see anything besides your EC incrementing that might be why.
Comment 86 Shubhra Prakash Nandi 2023-08-25 18:03:27 UTC
No remain to be the same.

error
ff_gbl_lock
ff_pmtimer
ff_pwr_btn
ff_rt_clk
ff_slp_btn
gpe00
gpe01
gpe02
gpe03
gpe04
gpe05
gpe06
gpe07
gpe08
gpe09
gpe0A
gpe0B
gpe0C
gpe0D
gpe0E
gpe0F
gpe10
gpe11
gpe12
gpe13
gpe14
gpe15
gpe16
gpe17
gpe18
gpe19
gpe1A
gpe1B
gpe1C
gpe1D
gpe1E
gpe1F
gpe_all
sci
sci_not
Comment 87 Mario Limonciello (AMD) 2023-08-25 18:05:00 UTC
You need to look at the *values* of those GPEs.  Something like this:

# grep -v /sys/firmware/acpi/interrupts > before.txt
# systemctl suspend
# grep -v /sys/firmware/acpi/interrupts > after.txt
# diff -u before.txt after.txt
Comment 88 Shubhra Prakash Nandi 2023-08-25 18:09:10 UTC
Ok, I got this

--- before.txt	2023-08-25 23:36:32.997384018 +0530
+++ after.txt	2023-08-25 23:37:22.412759264 +0530
@@ -1,7 +1,7 @@
 /sys/firmware/acpi/interrupts/gpe1F:       0         invalid      unmasked
 /sys/firmware/acpi/interrupts/gpe13:       0         invalid      unmasked
 /sys/firmware/acpi/interrupts/gpe0F:       0         invalid      unmasked
-/sys/firmware/acpi/interrupts/gpe03:     159  EN     enabled      unmasked
+/sys/firmware/acpi/interrupts/gpe03:     162  EN     enabled      unmasked
 /sys/firmware/acpi/interrupts/gpe1D:       0         invalid      unmasked
 /sys/firmware/acpi/interrupts/ff_pwr_btn:       0  EN     invalid      unmasked
 /sys/firmware/acpi/interrupts/gpe11:       0         invalid      unmasked
@@ -15,7 +15,7 @@
 /sys/firmware/acpi/interrupts/gpe08:       0         disabled     unmasked
 /sys/firmware/acpi/interrupts/error:       0
 /sys/firmware/acpi/interrupts/gpe16:       0         invalid      unmasked
-/sys/firmware/acpi/interrupts/sci:     159
+/sys/firmware/acpi/interrupts/sci:     162
 /sys/firmware/acpi/interrupts/gpe06:       0         invalid      unmasked
 /sys/firmware/acpi/interrupts/gpe14:       0         invalid      unmasked
 /sys/firmware/acpi/interrupts/gpe04:       0         invalid      unmasked
@@ -27,8 +27,8 @@
 /sys/firmware/acpi/interrupts/gpe10:       0         invalid      unmasked
 /sys/firmware/acpi/interrupts/gpe0C:       0         invalid      unmasked
 /sys/firmware/acpi/interrupts/gpe00:       0         invalid      unmasked
-/sys/firmware/acpi/interrupts/gpe_all:     159
-/sys/firmware/acpi/interrupts/gpe19:       0         disabled     unmasked
+/sys/firmware/acpi/interrupts/gpe_all:     162
+/sys/firmware/acpi/interrupts/gpe19:       0  EN     enabled      unmasked
 /sys/firmware/acpi/interrupts/gpe1A:       0         invalid      unmasked
 /sys/firmware/acpi/interrupts/gpe09:       0         invalid      unmasked
 /sys/firmware/acpi/interrupts/gpe0A:       0         invalid      unmasked
Comment 89 Mario Limonciello (AMD) 2023-08-25 18:12:54 UTC
> ACPI: EC: GPE=0x3

From your earlier logs GPE 3 is your EC.

So you can experiment with `acpi_mask_gpe=0x19` to see if that's the reason.
Comment 90 Shubhra Prakash Nandi 2023-08-25 18:17:35 UTC
I did experiment with acpi.ec_no_wakeup earlier, it did not gave any errors with s2idle but with hibernation it gave kernel errors related to IRQ 1 so I abandoned it possibly due to the below kernel log. I will try this kernel parameter and report back.

atkbd serio0: Disabling IRQ1 wakeup source to avoid platform firmware bug
Comment 91 Shubhra Prakash Nandi 2023-08-25 18:39:32 UTC
Ok with kernel parameter acpi_mask_gpe=0x19 below is what I get with touchpad wakeup enabled. So seems it is working. I will check with touchpad wake disabled and report back.

--- before.txt	2023-08-26 00:04:46.919999319 +0530
+++ after.txt	2023-08-26 00:05:50.929999709 +0530
@@ -28,7 +28,7 @@
 /sys/firmware/acpi/interrupts/gpe0C:       0         invalid      unmasked
 /sys/firmware/acpi/interrupts/gpe00:       0         invalid      unmasked
 /sys/firmware/acpi/interrupts/gpe_all:       2
-/sys/firmware/acpi/interrupts/gpe19:       0         disabled     masked  
+/sys/firmware/acpi/interrupts/gpe19:       0         enabled      masked  
 /sys/firmware/acpi/interrupts/gpe1A:       0         invalid      unmasked
 /sys/firmware/acpi/interrupts/gpe09:       0         invalid      unmasked
 /sys/firmware/acpi/interrupts/gpe0A:       0         invalid      unmasked
Comment 92 Shubhra Prakash Nandi 2023-08-25 18:47:24 UTC
(In reply to Shubhra Prakash Nandi from comment #91)
> Ok with kernel parameter acpi_mask_gpe=0x19 below is what I get with
> touchpad wakeup enabled. So seems it is working. I will check with touchpad
> wake disabled and report back.
> 
> --- before.txt        2023-08-26 00:04:46.919999319 +0530
> +++ after.txt 2023-08-26 00:05:50.929999709 +0530
> @@ -28,7 +28,7 @@
>  /sys/firmware/acpi/interrupts/gpe0C:       0         invalid      unmasked
>  /sys/firmware/acpi/interrupts/gpe00:       0         invalid      unmasked
>  /sys/firmware/acpi/interrupts/gpe_all:       2
> -/sys/firmware/acpi/interrupts/gpe19:       0         disabled     masked  
> +/sys/firmware/acpi/interrupts/gpe19:       0         enabled      masked  
>  /sys/firmware/acpi/interrupts/gpe1A:       0         invalid      unmasked
>  /sys/firmware/acpi/interrupts/gpe09:       0         invalid      unmasked
>  /sys/firmware/acpi/interrupts/gpe0A:       0         invalid      unmasked

Sorry my bad my touchpad wakeup was disabled in this case, but I can still wakeup the laptop using it. I did remove gpiolib_acpi.ignore_wake parameter during this, do you want me to put it back?
Comment 93 Mario Limonciello (AMD) 2023-08-25 18:50:11 UTC
> atkbd serio0: Disabling IRQ1 wakeup source to avoid platform firmware bug

Oh I forgot your platform is caught up in this.  That could actually be the reason for the odd behavior.  It's fixed only by a platform firwmare update.
Comment 94 Mario Limonciello (AMD) 2023-08-25 18:52:40 UTC
Given the original issue reported is fixed in Linus' tree I'm going to close this issue.

https://github.com/torvalds/linux/commit/6bc3462a0f5ecaa376a0b3d76dafc55796799e17

I don't believe there is anything we can do about the odd behavior for wakeup sources from the kernel side, it needs a platform firmware update.  You can read more about the history for it here:

https://github.com/torvalds/linux/commit/8e60615e8932167057b363c11a7835da7f007106
Comment 95 Shubhra Prakash Nandi 2023-08-25 19:06:18 UTC
Ok sure, thanks for resolving the original issue and for your inputs on other odd behaviors of my system.

Note You need to log in before you can comment on or make changes to this bug.