s2idle - Tuxedo Pulse 14 Gen 3 (Ryzen 7840HS) randomly wakes up from sleep and enters a resume/suspend loop draining battery
Brief summary of the problem
Hello,
I have issues with the sleep mode (s2idle) that drains battery.
The problem I see is reflected in Reddit thread https://www.reddit.com/r/tuxedocomputers/comments/18qjzfu/s3_sleep_on_pulse_14_gen_3/
Basically the s2idle sleep mode works fine for some time, usually a few hours. But at some point, the laptop wakes up by itself, and goes back to sleep after 30s. And then it wakes up again after 30s and goes back to sleep.
This suspend/resume cycle drains the battery at a very high rate, much higher than the ~ 0.5W/h of the s2idle.
I tried numerous fixes which I documented here: https://docs.google.com/spreadsheets/d/139nDxVRaH2HFFqwc0BS97IOs34Q5NM9lpeG0-7WkCuk/edit#gid=0 None of them worked
- Setting kernel parameter: rtc_cmos.use_acpi_alarm=1
- Disabling: /sys/bus/i2c/devices/i2c-PNP0C50:00/power/wakeup
- Not logging in after a fresh boot (never starting a user session)
- I'm pretty sure I also tried with WiFi and Bluetooth off, but I haven't noted this one down, so maybe I'm wrong here.
- Tried this in 3 different locations: at home (flat), and in 2 different houses, so I don't think it could be an external wireless device sending a wakeup signal as the only wireless common denominator was my phone.
- I tried with 0 devices connected to the laptop (no bluetooth connected devices, wireless mouse/keyboard/ear pods, no audio jack, no USB-C/A connected and no SD-card).
But in all those scenario, the problem stayed the same. Note that all those tests were done without the power adapter plugged in.
Another user reported on Reddit (https://www.reddit.com/r/tuxedocomputers/comments/18qjzfu/comment/khi87ln/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button) that when the laptop wakes up, the acpitz-acpi-0 sensor temperature is +105.0°C.
I checked and I have exactly the same behavior. That sensor temperature is always +105.0°C when the system wakes up on its own. Even weirder, the temperature is still stuck at +105.0°C a few hours after the resume (and usage of the laptop). Only a reboot fixes the issue so that the sensor provide real readings again.
tuxedo-isa-0000
Adapter: ISA adapter
cpu0: 1285 RPM (min = 0 RPM, max = 5000 RPM)
cpu1: 1764 RPM (min = 0 RPM, max = 5000 RPM)
cpu0: +36.0°C
amdgpu-pci-0300
Adapter: PCI adapter
vddgfx: 894.00 mV
vddnb: 839.00 mV
edge: +32.0°C
PPT: 8.02 W
BAT0-acpi-0
Adapter: ACPI interface
in0: 12.15 V
curr1: 0.00 A
iwlwifi_1-virtual-0
Adapter: Virtual device
temp1: +25.0°C
k10temp-pci-00c3
Adapter: PCI adapter
Tctl: +36.2°C
nvme-pci-0100
Adapter: PCI adapter
Composite: +30.9°C (low = -273.1°C, high = +81.8°C)
(crit = +84.8°C)
Sensor 1: +30.9°C (low = -273.1°C, high = +65261.8°C)
Sensor 2: +31.9°C (low = -273.1°C, high = +65261.8°C)
acpitz-acpi-0
Adapter: ACPI interface
temp1: +105.0°C (crit = +110.0°C)
Note that if I put the laptop to sleep and wake it up manually, with keyboard inputs for example, then the sensor reading is normal (in the 30 to 40°C range).
I looked at some other issues like #2855, but it seems to be different as this laptop does not have a WWAN card.
Hardware description
The laptop is a Tuxedo Pulse 14 Gen 3 (AMD Ryzen 7 7840HS) https://www.tuxedocomputers.com/en/TUXEDO-Pulse-14-Gen3
I configured it with the following options:
- 2 TB Samsung 990 PRO (NVMe PCIe 4.0)
- Intel Wi-Fi 6E AX210
I attached s2idle_report, dmesg and journalctl logs of a sleep test I ran with the https://gitlab.freedesktop.org/drm/amd/-/blob/master/scripts/amd_s2idle.py script.
I used the Ubuntu kernel 6.5.0-17-generic for this test to ease investigations as the Tuxedo kernel appeared to be tainted due to an out-of-tree module load. Kernel parameter rtc_cmos.use_acpi_alarm=1 was set for this test.
I ran the script with an expected sleep duration of 100000 seconds. When I checked in the morning, it did wake up before the expected date.
The wake up that was earlier than expected indicated:
2024-02-19 05:46:34,879 INFO: ○ Suspend count: 1
2024-02-19 05:46:34,879 INFO: ○ Hardware sleep cycle count: 1
2024-02-19 05:46:34,879 INFO: ○ GPIOs active: ['0']
2024-02-19 05:46:34,879 INFO: ○ Wakeups triggered from IRQs: [7]
2024-02-19 05:46:34,879 DEBUG: Used Microsoft uPEP GUID in LPS0 _DSM
2024-02-19 05:46:34,879 INFO: ○ Woke up from IRQ 7 (IR-IO-APIC 7-fasteoi pinctrl_amd)
2024-02-19 05:46:34,880 INFO: ○ gpe0B increased from 4 to 8
From what I understand, GPIO 0 is linked to
2024-02-18 21:05:25,828 DEBUG: Case (Zero)
2024-02-18 21:05:25,828 DEBUG: {
2024-02-18 21:05:25,828 DEBUG: M000 (0x3900)
2024-02-18 21:05:25,828 DEBUG: M460 (" Notify (\\_SB.PWRB, 0x80)\n", Zero, Zero, Zero, Zero, Zero, Zero)
2024-02-18 21:05:25,828 DEBUG: Notify (\_SB.PWRB, 0x80) // Status Change
2024-02-18 21:05:25,828 DEBUG: }
But some previous tests I did also showed GPIO 58:
2024-02-18 21:05:25,829 DEBUG: Case (0x3A)
2024-02-18 21:05:25,829 DEBUG: {
2024-02-18 21:05:25,829 DEBUG: M000 (0x393A)
2024-02-18 21:05:25,829 DEBUG: M460 (" Notify (\\_SB.PCI0.GP17.XHC0, 0x02)\n", Zero, Zero, Zero, Zero, Zero, Zero)
2024-02-18 21:05:25,829 DEBUG: Notify (\_SB.PCI0.GP17.XHC0, 0x02) // Device Wake
2024-02-18 21:05:25,829 DEBUG: }
System information
- Ubuntu 23.10
- Tuxedo drivers installed
I can reproduce the issue with both the tuxedo kernel (6.5.0-10022-tuxedo #26 SMP PREEMPT_DYNAMIC
) and the stock Ubuntu kernel (6.5.0-17-generic #17-Ubuntu SMP PREEMPT_DYNAMIC
).
I'm using iwd as the network manager instead of wpa_supplicant, but I had the same issue when still using wpa_supplicant.
How to reproduce the issue
Boot, (log in the user session or not, it doesn't matter), close the laptop lid and wait.