Index | Thread | Search

From:
Jason McIntyre <jmc@kerhand.co.uk>
Subject:
Re: S0ix suspend
To:
tech@openbsd.org
Date:
Sun, 18 Aug 2024 06:55:14 +0100

Download raw body.

Thread
  • Jason McIntyre:

    S0ix suspend

  • Matthias Schmidt:

    S0ix suspend

  • On Sat, Aug 17, 2024 at 10:00:28PM -0600, Theo de Raadt wrote:
    > amd64 snapshots contain a 2 line diff which enable S0ix suspend by default
    > on many laptops.
    > 
    
    kettenis' latest amdgpu fixes were the missing bit that finally got S0
    suspend/resume working on my laptop.
    
    on this machine, opening the lid resumes almost instantly:
    
    acpi0: S3 unavailable, using S0
    wskbd1: disconnecting from wsdisplay0
    wskbd1 detached
    ukbd0 detached
    uhidev0 detached
    fido0 detached
    uhidev1 detached
    ugen0 detached
    uhub0 detached
    ugen1 detached
    uhub1 detached
    xhci0: save state timeout
    xhci1: save state timeout
    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
    wakeups: 1 1
    wakeup event: GPE 0x3
    uhidev0 at uhub0 port 1 configuration 1 interface 0 "Yubico YubiKey OTP+FIDO+CCID" rev 2.00/5.71 addr 2
    uhidev0: iclass 3/1
    ukbd0 at uhidev0: 8 variable keys, 6 key codes
    wskbd1 at ukbd0 mux 1
    wskbd1: connecting to wsdisplay0
    uhidev1 at uhub0 port 1 configuration 1 interface 1 "Yubico YubiKey OTP+FIDO+CCID" rev 2.00/5.71 addr 2
    uhidev1: iclass 3/0
    fido0 at uhidev1: input=64, output=64, feature=0
    ugen0 at uhub0 port 1 configuration 1 "Yubico YubiKey OTP+FIDO+CCID" rev 2.00/5.71 addr 2
    ugen1 at uhub1 port 3 "Intel Bluetooth" rev 2.01/0.01 addr 2
    
    i test suspended the machine for 5 hours. that was with
    tmux/mutt/X/fvmw3/firefox running. reported battery state reduces
    by 12%. as someone who has never had a working suspend, i'd be
    interested to know how that compares to regular S3 suspend.
    
    similarly, reported cpu sensor (ksmn) showed 29C after resume. that
    compares to about 38C when the laptop sits idle. again, i'd be
    interested to know how that compares.
    
    everything just works! it's very neat.
    
    jmc
    
    OpenBSD 7.6-beta (GENERIC.MP) #82: Sun Aug 18 06:29:31 BST 2024
        jmc@manila.kerhand.co.uk:/usr/src/sys/arch/amd64/compile/GENERIC.MP
    real mem = 7894605824 (7528MB)
    avail mem = 7632113664 (7278MB)
    random: good seed from bootblocks
    mpath0 at root
    scsibus0 at mpath0: 256 targets
    mainbus0 at root
    bios0 at mainbus0: SMBIOS rev. 3.2 @ 0xca706000 (77 entries)
    bios0: vendor Dell Inc. version "1.16.0" date 02/06/2024
    bios0: Dell Inc. Inspiron 5505
    efi0 at bios0: UEFI 2.7
    efi0: Dell Inc. rev 0x11000
    acpi0 at bios0: ACPI 5.0Undefined scope: \\_SB_.PCI0.LPC0.EC0_
    
    acpi0: sleep states S0ix S4 S5
    acpi0: tables DSDT FACP UEFI SSDT IVRS SSDT SSDT TPM2 MSDM ASF! BOOT HPET APIC MCFG SLIC SSDT WSMT VFCT SSDT SSDT CRAT CDIT SSDT SSDT SSDT SSDT SSDT FPDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT BGRT
    acpi0: wakeup devices GP17(S4)
    acpitimer0 at acpi0: 3579545 Hz, 32 bits
    acpihpet0 at acpi0: 14318180 Hz
    acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
    cpu0 at mainbus0: apid 0 (boot processor)
    cpu0: AMD Ryzen 7 4700U with Radeon Graphics, 2000.00 MHz, 17-60-01, patch 08600106
    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=76d8320b<SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND>
    cpu0: cpuid 6 eax=4<ARAT> ecx=1<EFFFREQ>
    cpu0: cpuid 7.0 ebx=219c91a9<FSGSBASE,BMI1,AVX2,SMEP,BMI2,PQM,RDSEED,ADX,SMAP,CLFLUSHOPT,CLWB,SHA> ecx=400004<UMIP>
    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=90cf757<IBPB,IBRS,STIBP,IBRS_PREF,IBRS_SM,SSBD>
    cpu0: cpuid 8000001F eax=1000f<SME,SEV,PFLUSH_MSR,SEVES,VTE> ecx=e edx=1
    cpu0: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 512KB 64b/line 8-way L2 cache, 4MB 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 4700U with Radeon Graphics, 2000.00 MHz, 17-60-01, patch 08600106
    cpu1: smt 0, core 1, package 0
    cpu2 at mainbus0: apid 2 (application processor)
    cpu2: AMD Ryzen 7 4700U with Radeon Graphics, 2000.00 MHz, 17-60-01, patch 08600106
    cpu2: smt 0, core 2, package 0
    cpu3 at mainbus0: apid 3 (application processor)
    cpu3: AMD Ryzen 7 4700U with Radeon Graphics, 2000.00 MHz, 17-60-01, patch 08600106
    cpu3: smt 0, core 3, package 0
    cpu4 at mainbus0: apid 4 (application processor)
    cpu4: AMD Ryzen 7 4700U with Radeon Graphics, 2000.00 MHz, 17-60-01, patch 08600106
    cpu4: smt 0, core 4, package 0
    cpu5 at mainbus0: apid 5 (application processor)
    cpu5: AMD Ryzen 7 4700U with Radeon Graphics, 2000.00 MHz, 17-60-01, patch 08600106
    cpu5: smt 0, core 5, package 0
    cpu6 at mainbus0: apid 6 (application processor)
    cpu6: AMD Ryzen 7 4700U with Radeon Graphics, 2000.00 MHz, 17-60-01, patch 08600106
    cpu6: smt 0, core 6, package 0
    cpu7 at mainbus0: apid 7 (application processor)
    cpu7: AMD Ryzen 7 4700U with Radeon Graphics, 2000.00 MHz, 17-60-01, patch 08600106
    cpu7: smt 0, core 7, package 0
    ioapic0 at mainbus0: apid 33 pa 0xfec00000, version 21, 24 pins, can't remap
    ioapic1 at mainbus0: apid 34 pa 0xfec01000, version 21, 32 pins, can't remap
    acpimcfg0 at acpi0
    acpimcfg0: addr 0xf8000000, bus 0-63
    acpiprt0 at acpi0: bus 0 (PCI0)
    acpiprt1 at acpi0: bus -1 (GPP0)
    acpiprt2 at acpi0: bus 1 (GPP1)
    acpiprt3 at acpi0: bus -1 (GPP2)
    acpiprt4 at acpi0: bus -1 (GPP3)
    acpiprt5 at acpi0: bus 2 (GPP4)
    acpiprt6 at acpi0: bus -1 (GPP5)
    acpiprt7 at acpi0: bus -1 (GPP6)
    acpiprt8 at acpi0: bus 3 (GP17)
    acpiprt9 at acpi0: bus -1 (GP18)
    acpiprt10 at acpi0: bus -1 (GP19)
    acpiec0 at acpi0
    acpiec0: Not running on HW-Reduced ACPI type 134
    "ACPI0010" 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
    acpibtn0 at acpi0: PWRB
    acpipci0 at acpi0 PCI0: 0x00000010 0x00000011 0x00000000
    acpicmos0 at acpi0
    acpiac0 at acpi0: AC unit online
    acpibat0 at acpi0: BAT0 model "DELL 9077G06" serial   714 type LIP oem "SMP-ATL3.56"
    acpibtn1 at acpi0: LID_
    acpibtn2 at acpi0: SBTN
    "PNP0C14" at acpi0 not configured
    "DELLABCE" at acpi0 not configured
    amdgpio0 at acpi0 GPIO uid 0 addr 0xfed81500/0x400 irq 7, 184 pins
    dwiic0 at acpi0 I2CD addr 0xfedc5000/0x1000 irq 6
    iic0 at dwiic0
    ihidev0 at iic0 addr 0x2c (polling), vendor 0x4f3 product 0x3147, DELL0A1E
    ihidev0: 92 report ids
    imt0 at ihidev0: clickpad, 5 contacts
    wsmouse0 at imt0 mux 0
    ims0 at ihidev0 reportid 1: 2 buttons
    wsmouse1 at ims0 mux 0
    hid at ihidev0 reportid 5 not configured
    hid at ihidev0 reportid 6 not configured
    hid at ihidev0 reportid 7 not configured
    hid at ihidev0 reportid 11 not configured
    hid at ihidev0 reportid 12 not configured
    hid at ihidev0 reportid 13 not configured
    ims1 at ihidev0 reportid 14: 0 buttons
    wsmouse2 at ims1 mux 0
    hid at ihidev0 reportid 92 not configured
    tpm0 at acpi0 TPM2: unsupported TPM2 start method 2
    "ACPI000E" at acpi0 not configured
    "AMD0005" at acpi0 not configured
    "USBC000" at acpi0 not configured
    acpipwrres0 at acpi0: WRST
    acpipwrres1 at acpi0: P0U0, resource for XHC0
    acpipwrres2 at acpi0: P3U0, resource for XHC0
    acpipwrres3 at acpi0: P0U1, resource for XHC1
    acpipwrres4 at acpi0: P3U1, resource for XHC1
    acpipwrres5 at acpi0: P0S0, resource for SATA
    acpipwrres6 at acpi0: P3S0, resource for SATA
    acpipwrres7 at acpi0: P0S1, resource for SAT1
    acpipwrres8 at acpi0: P3S1, resource for SAT1
    acpitz0 at acpi0: critical temperature is 115 degC
    acpivideo0 at acpi0: VGA_
    acpivout0 at acpivideo0: LCD_
    cpu0: 2000 MHz: speeds: 2000 1700 1400 MHz
    pci0 at mainbus0 bus 0
    ksmn0 at pci0 dev 0 function 0 "AMD 17h/6xh Root Complex" rev 0x00
    "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
    nvme0 at pci1 dev 0 function 0 "SSSTC CL1" rev 0x03: msix, NVMe 1.3
    nvme0: CL1-3D256-Q11 NVMe SSSTC 256GB, firmware 22301116, serial TW0TN2CC9DH0006409IV
    scsibus1 at nvme0: 2 targets, initiator 0
    sd0 at scsibus1 targ 1 lun 0: <NVMe, CL1-3D256-Q11 NV, 2230>
    sd0: 244198MB, 512 bytes/sector, 500118192 sectors
    pchb1 at pci0 dev 2 function 0 "AMD 17h/6xh Host" rev 0x00
    ppb1 at pci0 dev 2 function 2 "AMD 17h/6xh PCIE" rev 0x00: msi
    pci2 at ppb1 bus 2
    iwx0 at pci2 dev 0 function 0 "Intel Wi-Fi 6 AX200" rev 0x1a, msix
    pchb2 at pci0 dev 8 function 0 "AMD 17h/6xh Host" rev 0x00
    ppb2 at pci0 dev 8 function 1 "AMD 17h/6xh PCIE" rev 0x00
    pci3 at ppb2 bus 3
    amdgpu0 at pci3 dev 0 function 0 "ATI Renoir" rev 0xc2
    drm0 at amdgpu0
    amdgpu0: msi
    azalia0 at pci3 dev 0 function 1 "ATI Renoir HD Audio" rev 0x00: msi
    azalia0: no supported codecs
    ccp0 at pci3 dev 0 function 2 "AMD 17h/1xh Crypto" rev 0x00: msix: RNG
    xhci0 at pci3 dev 0 function 3 "AMD 17h/6xh xHCI" rev 0x00: msix, 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 pci3 dev 0 function 4 "AMD 17h/6xh 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
    "AMD 17h/1xh I2S Audio" rev 0x01 at pci3 dev 0 function 5 not configured
    azalia1 at pci3 dev 0 function 6 "AMD 17h/1xh HD Audio" rev 0x00: msi
    azalia1: codecs: Realtek ALC3204
    audio0 at azalia1
    piixpm0 at pci0 dev 20 function 0 "AMD FCH SMBus" rev 0x51: SMI
    iic1 at piixpm0
    spdmem0 at iic1 addr 0x50: 8GB DDR4 SDRAM PC4-25600 SO-DIMM
    iic2 at piixpm0
    pcib0 at pci0 dev 20 function 3 "AMD FCH LPC" rev 0x51
    pchb3 at pci0 dev 24 function 0 "AMD 17h/6xh Data Fabric" rev 0x00
    pchb4 at pci0 dev 24 function 1 "AMD 17h/6xh Data Fabric" rev 0x00
    pchb5 at pci0 dev 24 function 2 "AMD 17h/6xh Data Fabric" rev 0x00
    pchb6 at pci0 dev 24 function 3 "AMD 17h/6xh Data Fabric" rev 0x00
    pchb7 at pci0 dev 24 function 4 "AMD 17h/6xh Data Fabric" rev 0x00
    pchb8 at pci0 dev 24 function 5 "AMD 17h/6xh Data Fabric" rev 0x00
    pchb9 at pci0 dev 24 function 6 "AMD 17h/6xh Data Fabric" rev 0x00
    pchb10 at pci0 dev 24 function 7 "AMD 17h/6xh 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
    pms0 at pckbc0 (aux slot)
    wsmouse3 at pms0 mux 0
    pms0: Elantech Clickpad, version 4, firmware 0x5f1001
    pcppi0 at isa0 port 0x61
    spkr0 at pcppi0
    vmm0 at mainbus0: SVM/RVI
    efifb at mainbus0 not configured
    uhidev0 at uhub0 port 1 configuration 1 interface 0 "Yubico YubiKey OTP+FIDO+CCID" rev 2.00/5.71 addr 2
    uhidev0: iclass 3/1
    ukbd0 at uhidev0: 8 variable keys, 6 key codes
    wskbd1 at ukbd0 mux 1
    uhidev1 at uhub0 port 1 configuration 1 interface 1 "Yubico YubiKey OTP+FIDO+CCID" rev 2.00/5.71 addr 2
    uhidev1: iclass 3/0
    fido0 at uhidev1: input=64, output=64, feature=0
    ugen0 at uhub0 port 1 configuration 1 "Yubico YubiKey OTP+FIDO+CCID" rev 2.00/5.71 addr 2
    ugen1 at uhub1 port 3 "Intel Bluetooth" rev 2.01/0.01 addr 2
    vscsi0 at root
    scsibus2 at vscsi0: 256 targets
    softraid0 at root
    scsibus3 at softraid0: 256 targets
    root on sd0a (b5f9127b755c9494.a) swap on sd0b dump on sd0b
    iwx0: hw rev 0x340, fw 77.a20fb07d.0, address 8c:c6:81:42:ff:4a
    amdgpu0: RENOIR GC 9.3.0 7 CU rev 0x00
    amdgpu0: 1920x1080, 32bpp
    wsdisplay0 at amdgpu0 mux 1: console (std, vt100 emulation), using wskbd0
    wskbd1: connecting to wsdisplay0
    wsdisplay0: screen 1-5 added (std, vt100 emulation)
    
    
    
  • Jason McIntyre:

    S0ix suspend

  • Matthias Schmidt:

    S0ix suspend