> From: Greg Steuck <gne...@openbsd.org>
> Date: Mon, 12 Aug 2024 18:46:51 -0700
> 
> Now that my BIOS update took away S3 I started playing with zzz'ing to
> S0. The first time it seems to be working: the display turns off and the
> usb device are powered off. The power button brings everything back up
> and seemingly functional. The second zzz turns off the display and
> nothing else seems to be happening, e.g. the ssh session is still
> functional. Power button no longer wakes this system up but I can reboot
> it over ssh.

Which means you can look at ps output and see where the acpi thread is
stuck?

A few other notes below...

> OpenBSD 7.6-beta (GENERIC.MP) #240: Sat Aug 10 10:03:01 MDT 2024
>     dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 33564442624 (32009MB)
> avail mem = 32523595776 (31016MB)
> random: good seed from bootblocks
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 3.3 @ 0xc67d5000 (71 entries)
> bios0: vendor American Megatrends Inc. version "4805" date 03/18/2024
> bios0: ASUS Pro WS X570-ACE
> efi0 at bios0: UEFI 2.7
> efi0: American Megatrends rev 0x50011
> acpi0 at bios0: ACPI 6.2
> acpi0: sleep states S0 S4 S5
> acpi0: tables DSDT FACP IVRS SSDT SSDT SSDT FIDT SSDT MCFG HPET SSDT FPDT 
> VFCT BGRT WPBT TPM2 SSDT CRAT CDIT SSDT SSDT SSDT WSMT APIC
> acpi0: wakeup devices GPP0(S4) X161(S4) GPP2(S4) X162(S4) GPP3(S4) GPP4(S4) 
> GPP5(S4) GP17(S4) XHC0(S4) XHC1(S4) GP18(S4) GPP1(S4)
> acpitimer0 at acpi0: 3579545 Hz, 32 bits
> acpimcfg0 at acpi0
> acpimcfg0: addr 0xf0000000, bus 0-127
> acpihpet0 at acpi0: 14318180 Hz
> acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: AMD Ryzen 7 5700G with Radeon Graphics, 3800.00 MHz, 19-50-00, patch 
> 0a50000f
> cpu0: cpuid 1 
> edx=178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT>
>  
> ecx=76f8320b<SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND>
> cpu0: cpuid 6 eax=4<ARAT> ecx=1<EFFFREQ>
> cpu0: cpuid 7.0 
> ebx=219c97a9<FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,PQM,RDSEED,ADX,SMAP,CLFLUSHOPT,CLWB,SHA>
>  ecx=40068c<UMIP,PKU> edx=10
> cpu0: cpuid d.1 eax=f<XSAVEOPT,XSAVEC,XGETBV1,XSAVES>
> cpu0: cpuid 80000001 edx=2fd3fbff<NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG> 
> ecx=75c237ff<LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TCE,TOPEXT,CPCTR,DBKP,PCTRL3,MWAITX>
> cpu0: cpuid 80000007 edx=6799<HWPSTATE,ITSC>
> cpu0: cpuid 80000008 
> ebx=191ef657<IBPB,IBRS,STIBP,STIBP_ALL,IBRS_PREF,IBRS_SM,SSBD>
> cpu0: cpuid 8000001F 
> eax=1780f<SME,SEV,PFLUSH_MSR,SEVES,REQ64BITHOST,RESTINJ,ALTINJ,DBGSTSW,VTE> 
> edx=1
> cpu0: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 512KB 
> 64b/line 8-way L2 cache, 16MB 64b/line 16-way L3 cache
> cpu0: smt 0, core 0, package 0
> mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
> cpu0: apic clock running at 100MHz
> cpu0: mwait min=64, max=64, C-substates=1.1, IBE
> cpu1 at mainbus0: apid 1 (application processor)
> cpu1: AMD Ryzen 7 5700G with Radeon Graphics, 3800.00 MHz, 19-50-00, patch 
> 0a50000f
> cpu1: smt 0, core 1, package 0
> cpu2 at mainbus0: apid 2 (application processor)
> cpu2: AMD Ryzen 7 5700G with Radeon Graphics, 3800.00 MHz, 19-50-00, patch 
> 0a50000f
> cpu2: smt 0, core 2, package 0
> cpu3 at mainbus0: apid 3 (application processor)
> cpu3: AMD Ryzen 7 5700G with Radeon Graphics, 3800.00 MHz, 19-50-00, patch 
> 0a50000f
> cpu3: smt 0, core 3, package 0
> cpu4 at mainbus0: apid 4 (application processor)
> cpu4: AMD Ryzen 7 5700G with Radeon Graphics, 3800.00 MHz, 19-50-00, patch 
> 0a50000f
> cpu4: smt 0, core 4, package 0
> cpu5 at mainbus0: apid 5 (application processor)
> cpu5: AMD Ryzen 7 5700G with Radeon Graphics, 3800.00 MHz, 19-50-00, patch 
> 0a50000f
> cpu5: smt 0, core 5, package 0
> cpu6 at mainbus0: apid 6 (application processor)
> cpu6: AMD Ryzen 7 5700G with Radeon Graphics, 3800.00 MHz, 19-50-00, patch 
> 0a50000f
> cpu6: smt 0, core 6, package 0
> cpu7 at mainbus0: apid 7 (application processor)
> cpu7: AMD Ryzen 7 5700G with Radeon Graphics, 3800.00 MHz, 19-50-00, patch 
> 0a50000f
> cpu7: smt 0, core 7, package 0
> ioapic0 at mainbus0: apid 9 pa 0xfec00000, version 21, 24 pins
> ioapic1 at mainbus0: apid 10 pa 0xfec01000, version 21, 32 pins
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpiprt1 at acpi0: bus -1 (GPP0)
> acpiprt2 at acpi0: bus -1 (GPP2)
> acpiprt3 at acpi0: bus 8 (GPP3)
> acpiprt4 at acpi0: bus -1 (GPP4)
> acpiprt5 at acpi0: bus -1 (GPP5)
> acpiprt6 at acpi0: bus -1 (GPP6)
> acpiprt7 at acpi0: bus -1 (GPP7)
> acpiprt8 at acpi0: bus -1 (GPP8)
> acpiprt9 at acpi0: bus -1 (GPP9)
> acpiprt10 at acpi0: bus 9 (GP17)
> acpiprt11 at acpi0: bus 10 (GP18)
> acpiprt12 at acpi0: bus 1 (GPP1)
> acpiec0 at acpi0
> acpipci0 at acpi0 PCI0: 0x00000010 0x00000011 0x00000000
> acpicmos0 at acpi0
> com0 at acpi0 UAR1 addr 0x3f8/0x8 irq 4: ns16550a, 16 byte fifo
> "PNP0C14" at acpi0 not configured
> acpibtn0 at acpi0: PWRB
> amdgpio0 at acpi0 GPIO uid 0 addr 0xfed81500/0x400 irq 7, 184 pins
> tpm0 at acpi0 TPM_: unsupported TPM2 start method 2
> "PNP0C14" at acpi0 not configured
> "PNP0C14" at acpi0 not configured
> "PNP0C14" at acpi0 not configured
> "PNP0C14" at acpi0 not configured
> acpicpu0 at acpi0: C3(0@350 io@0x415), C2(0@18 io@0x414), C1(0@1 mwait), PSS
> acpicpu1 at acpi0: C3(0@350 io@0x415), C2(0@18 io@0x414), C1(0@1 mwait), PSS
> acpicpu2 at acpi0: C3(0@350 io@0x415), C2(0@18 io@0x414), C1(0@1 mwait), PSS
> acpicpu3 at acpi0: C3(0@350 io@0x415), C2(0@18 io@0x414), C1(0@1 mwait), PSS
> acpicpu4 at acpi0: C3(0@350 io@0x415), C2(0@18 io@0x414), C1(0@1 mwait), PSS
> acpicpu5 at acpi0: C3(0@350 io@0x415), C2(0@18 io@0x414), C1(0@1 mwait), PSS
> acpicpu6 at acpi0: C3(0@350 io@0x415), C2(0@18 io@0x414), C1(0@1 mwait), PSS
> acpicpu7 at acpi0: C3(0@350 io@0x415), C2(0@18 io@0x414), C1(0@1 mwait), PSS
> acpivideo0 at acpi0: VGA_
> cpu0: 3800 MHz: speeds: 3800 1700 1400 MHz
> pci0 at mainbus0 bus 0
> ksmn0 at pci0 dev 0 function 0 "AMD 17h/6xh Root Complex" rev 0x00

This device is the equivalent of intelpmc(4) for AMD CPUs.  Linux does
some magic in there that I have't looked into yet, but amdgpu(4) has
some tentacles that reach into the PMC device.

> "AMD 17h/6xh IOMMU" rev 0x00 at pci0 dev 0 function 2 not configured
> pchb0 at pci0 dev 1 function 0 "AMD 17h/6xh Host" rev 0x00
> ppb0 at pci0 dev 1 function 2 "AMD 17h/6xh PCIE" rev 0x00: msi
> pci1 at ppb0 bus 1
> ppb1 at pci1 dev 0 function 0 "AMD 500 Series PCIE" rev 0x00
> pci2 at ppb1 bus 2
> ppb2 at pci2 dev 2 function 0 "AMD 500 Series PCIE" rev 0x00: msi
> pci3 at ppb2 bus 3
> nvme0 at pci3 dev 0 function 0 vendor "Phison", unknown product 0x5016 rev 
> 0x01: msix, NVMe 1.3
> nvme0: Sabrent SB-ROCKET-NVMe4-1TB, firmware RKT4B5.1, serial 
> scsibus1 at nvme0: 2 targets, initiator 0
> sd0 at scsibus1 targ 1 lun 0: <NVMe, Sabrent SB-ROCKE, RKT4>
> sd0: 953869MB, 512 bytes/sector, 1953525168 sectors
> ppb3 at pci2 dev 3 function 0 "AMD 500 Series PCIE" rev 0x00: msi
> pci4 at ppb3 bus 4
> em0 at pci4 dev 0 function 0 "Intel I211" rev 0x03: msi, address 
> ppb4 at pci2 dev 8 function 0 "AMD 500 Series PCIE" rev 0x00
> pci5 at ppb4 bus 5
> vendor "AMD", unknown product 0x1485 (class instrumentation unknown subclass 
> 0x00, rev 0x00) at pci5 dev 0 function 0 not configured
> xhci0 at pci5 dev 0 function 1 "AMD 17h xHCI" rev 0x00: msi, xHCI 1.10
> usb0 at xhci0: USB revision 3.0
> uhub0 at usb0 configuration 1 interface 0 "AMD xHCI root hub" rev 3.00/1.00 
> addr 1
> xhci1 at pci5 dev 0 function 3 "AMD 17h xHCI" rev 0x00: msix, xHCI 1.10
> usb1 at xhci1: USB revision 3.0
> uhub1 at usb1 configuration 1 interface 0 "AMD xHCI root hub" rev 3.00/1.00 
> addr 1
> ppb5 at pci2 dev 9 function 0 "AMD 500 Series PCIE" rev 0x00
> pci6 at ppb5 bus 6
> ahci0 at pci6 dev 0 function 0 "AMD FCH AHCI" rev 0x51: msi, AHCI 1.3.1
> scsibus2 at ahci0: 32 targets
> ppb6 at pci2 dev 10 function 0 "AMD 500 Series PCIE" rev 0x00
> pci7 at ppb6 bus 7
> ahci1 at pci7 dev 0 function 0 "AMD FCH AHCI" rev 0x51: msi, AHCI 1.3.1
> ahci1: port 0: 1.5Gb/s
> scsibus3 at ahci1: 32 targets
> cd0 at scsibus3 targ 0 lun 0: <TSSTcorp, CD/DVDW SH-S183L, SB01> removable
> pchb1 at pci0 dev 2 function 0 "AMD 17h/6xh Host" rev 0x00
> ppb7 at pci0 dev 2 function 1 "AMD 17h/6xh PCIE" rev 0x00: msi
> pci8 at ppb7 bus 8
> nvme1 at pci8 dev 0 function 0 vendor "Phison", unknown product 0x5013 rev 
> 0x01: msix, NVMe 1.3
> nvme1: SPCC M.2 PCIe SSD, firmware EDFMB0.5, serial
> scsibus4 at nvme1: 2 targets, initiator 0
> sd1 at scsibus4 targ 1 lun 0: <NVMe, SPCC M.2 PCIe SS, EDFM>
> sd1: 976762MB, 512 bytes/sector, 2000409264 sectors
> pchb2 at pci0 dev 8 function 0 "AMD 17h/6xh Host" rev 0x00
> ppb8 at pci0 dev 8 function 1 "AMD 17h/6xh PCIE" rev 0x00
> pci9 at ppb8 bus 9
> amdgpu0 at pci9 dev 0 function 0 "ATI Cezanne" rev 0xc8
> drm0 at amdgpu0
> amdgpu0: msi
> azalia0 at pci9 dev 0 function 1 "ATI Renoir HD Audio" rev 0x00: msi
> azalia0: no supported codecs
> ccp0 at pci9 dev 0 function 2 "AMD 17h/1xh Crypto" rev 0x00: msix: RNG
> xhci2 at pci9 dev 0 function 3 "AMD 17h/6xh xHCI" rev 0x00: msix, xHCI 1.10
> usb2 at xhci2: USB revision 3.0
> uhub2 at usb2 configuration 1 interface 0 "AMD xHCI root hub" rev 3.00/1.00 
> addr 1
> xhci3 at pci9 dev 0 function 4 "AMD 17h/6xh xHCI" rev 0x00: msix, xHCI 1.10
> usb3 at xhci3: USB revision 3.0
> uhub3 at usb3 configuration 1 interface 0 "AMD xHCI root hub" rev 3.00/1.00 
> addr 1
> azalia1 at pci9 dev 0 function 6 "AMD 17h/1xh HD Audio" rev 0x00: msi
> azalia1: codecs: Realtek ALC1220
> audio0 at azalia1
> ppb9 at pci0 dev 8 function 2 "AMD 17h/6xh PCIE" rev 0x00
> pci10 at ppb9 bus 10
> ahci2 at pci10 dev 0 function 0 "AMD FCH AHCI" rev 0x81: msi, AHCI 1.3.1
> scsibus5 at ahci2: 32 targets
> ahci3 at pci10 dev 0 function 1 "AMD FCH AHCI" rev 0x81: msi, AHCI 1.3.1
> scsibus6 at ahci3: 32 targets
> piixpm0 at pci0 dev 20 function 0 "AMD FCH SMBus" rev 0x51: SMI
> iic0 at piixpm0
> spdmem0 at iic0 addr 0x52: 16GB DDR4 SDRAM PC4-17000
> spdmem1 at iic0 addr 0x53: 16GB DDR4 SDRAM PC4-17000
> iic1 at piixpm0
> pcib0 at pci0 dev 20 function 3 "AMD FCH LPC" rev 0x51
> pchb3 at pci0 dev 24 function 0 "AMD 19h/5xh Data Fabric" rev 0x00
> pchb4 at pci0 dev 24 function 1 "AMD 19h/5xh Data Fabric" rev 0x00
> pchb5 at pci0 dev 24 function 2 "AMD 19h/5xh Data Fabric" rev 0x00
> pchb6 at pci0 dev 24 function 3 "AMD 19h/5xh Data Fabric" rev 0x00
> pchb7 at pci0 dev 24 function 4 "AMD 19h/5xh Data Fabric" rev 0x00
> pchb8 at pci0 dev 24 function 5 "AMD 19h/5xh Data Fabric" rev 0x00
> pchb9 at pci0 dev 24 function 6 "AMD 19h/5xh Data Fabric" rev 0x00
> pchb10 at pci0 dev 24 function 7 "AMD 19h/5xh Data Fabric" rev 0x00
> isa0 at pcib0
> isadma0 at isa0
> pckbc0 at isa0 port 0x60/5 irq 1 irq 12
> pckbd0 at pckbc0 (kbd slot)
> wskbd0 at pckbd0: console keyboard
> pcppi0 at isa0 port 0x61
> spkr0 at pcppi0
> vmm0 at mainbus0: SVM/RVI
> efifb at mainbus0 not configured
> uhub4 at uhub3 port 1 configuration 1 interface 0 "Texas Instruments product 
> 0x8442" rev 2.10/1.00 addr 2
> uhidev0 at uhub4 port 1 configuration 1 interface 0 "P.I. Engineering PC 
> Keyboard/Mouse to USB  Adapter" rev 1.10/3.10 addr 3
> uhidev0: iclass 3/1
> ukbd0 at uhidev0: 8 variable keys, 6 key codes
> wskbd1 at ukbd0 mux 1
> uhidev1 at uhub4 port 1 configuration 1 interface 1 "P.I. Engineering PC 
> Keyboard/Mouse to USB  Adapter" rev 1.10/3.10 addr 3
> uhidev1: iclass 3/1
> ums0 at uhidev1: 5 buttons, Z dir
> wsmouse0 at ums0 mux 0
> uhidev2 at uhub4 port 2 configuration 1 interface 0 "Microsoft Microsoft 
> 3-Button Mouse with IntelliEye(TM)" rev 1.10/3.00 addr 4
> uhidev2: iclass 3/1
> ums1 at uhidev2: 3 buttons, Z dir
> wsmouse1 at ums1 mux 0
> uhidev3 at uhub4 port 3 configuration 1 interface 0 "Yubico Yubico Gnubby 
> (gnubby1)" rev 2.00/0.97 addr 5
> uhidev3: iclass 3/0
> fido0 at uhidev3: input=64, output=64, feature=0
> uhidev4 at uhub4 port 5 configuration 1 interface 0 "Texas Instruments 
> product 0x82ff" rev 2.01/1.00 addr 6
> uhidev4: iclass 3/0
> uhid0 at uhidev4: input=255, output=255, feature=2
> vscsi0 at root
> scsibus7 at vscsi0: 256 targets
> softraid0 at root
> scsibus8 at softraid0: 256 targets
> root on sd1a (99862c5327411c06.a) swap on sd1b dump on sd1b
> WARNING: / was not properly unmounted
> amdgpu0: GREEN_SARDINE GC 9.3.0 8 CU rev 0x00
> amdgpu0: 3840x1600, 32bpp
> wsdisplay0 at amdgpu0 mux 1: console (std, vt100 emulation), using wskbd0
> wskbd1: connecting to wsdisplay0
> wsdisplay0: screen 1-5 added (std, vt100 emulation)
> 
> This is appended by the first zzz and wakeup:
> 
> > acpi0: S3 unavailable, using S0
> > uhub0 detached
> > uhub1 detached
> > uhub2 detached
> > wskbd1: disconnecting from wsdisplay0
> > wskbd1 detached
> > ukbd0 detached
> > uhidev0 detached
> > wsmouse0 detached
> > ums0 detached
> > uhidev1 detached
> > wsmouse1 detached
> > ums1 detached
> > uhidev2 detached
> > fido0 detached
> > uhidev3 detached
> > uhid0 detached
> > uhidev4 detached
> > uhub4 detached
> > uhub3 detached
> > xhci3: save state timeout

That needs to be investigated.  Somewhat strange that xhci2 doesn't
show this message.

> > uhub0 at usb0 configuration 1 interface 0 "AMD xHCI root hub" rev 3.00/1.00 
> > addr 1
> > uhub1 at usb1 configuration 1 interface 0 "AMD xHCI root hub" rev 3.00/1.00 
> > addr 1
> > uhub2 at usb2 configuration 1 interface 0 "AMD xHCI root hub" rev 3.00/1.00 
> > addr 1
> > uhub3 at usb3 configuration 1 interface 0 "AMD xHCI root hub" rev 3.00/1.00 
> > addr 1
> > last non-wakeup interrupt: irq176/azalia1
> > uhub4 at uhub3 port 1 configuration 1 interface 0 "Texas Instruments 
> > product 0x8442" rev 2.10/1.00 addr 2
> > uhidev0 at uhub4 port 1 configuration 1 interface 0 "P.I. Engineering PC 
> > Keyboard/Mouse to USB  Adapter" rev 1.10/3.10 addr 3
> > uhidev0: iclass 3/1
> > ukbd0 at uhidev0: 8 variable keys, 6 key codes
> > wskbd1 at ukbd0 mux 1
> > wskbd1: connecting to wsdisplay0
> > uhidev1 at uhub4 port 1 configuration 1 interface 1 "P.I. Engineering PC 
> > Keyboard/Mouse to USB  Adapter" rev 1.10/3.10 addr 3
> > uhidev1: iclass 3/1
> > ums0 at uhidev1: 5 buttons, Z dir
> > wsmouse0 at ums0 mux 0
> > uhidev2 at uhub4 port 2 configuration 1 interface 0 "Microsoft Microsoft 
> > 3-Button Mouse with IntelliEye(TM)" rev 1.10/3.00 addr 4
> > uhidev2: iclass 3/1
> > ums1 at uhidev2: 3 buttons, Z dir
> > wsmouse1 at ums1 mux 0
> > [drm] *ERROR* IB test failed on gfx_low (-60).

So amdgpu(4) is upset after resume.  It would not surprise me that
this is the reasone a 2nd suspend fails.

> > uhidev3 at uhub4 port 3 configuration 1 interface 0 "Yubico Yubico Gnubby 
> > (gnubby1)" rev 2.00/0.97 addr 5
> > uhidev3: iclass 3/0
> > fido0 at uhidev3: input=64, output=64, feature=0
> > uhidev4 at uhub4 port 5 configuration 1 interface 0 "Texas Instruments 
> > product 0x82ff" rev 2.01/1.00 addr 6
> > uhidev4: iclass 3/0
> > uhid0 at uhidev4: input=255, output=255, feature=2
> > [drm] *ERROR* IB test failed on gfx_high (-60).
> > [drm] *ERROR* ib ring test failed (-60).
> > wakeups: 1 1
> > wakeup event: PWRBTN
> 
> This is the second zzz:
> 
> > acpi0: S3 unavailable, using S0
> > uhub0 detached
> > uhub1 detached
> 
> 

Reply via email to