Missing Thunderbolt Driver When Tested Against `amd_s2idel.py`

Hi all,

I recently noticed my framework AMD has been consuming a lot of battery during suspend, specifically, 22% over 11 hours last night. Which is around 1.3w of power consumption during suspend.

I have tested against amd_s2idel.py, and it informs me that I lack thunderbolt driver, and recommended my to enable config_usb4 in the kernel. But I am not sure how to do that.

Personally, I use secureblue, and there are several kernel modifications they did, but I don’t see anything related to config_usb4. I was wondering if anyone can provide some insight on this issue.


Selected log from amd_s2idel.py:

2024-02-05 18:42:12,211 INFO:	Debugging script for s2idle on AMD systems
2024-02-05 18:42:12,212 INFO:	πŸ’» Framework Laptop 13 (AMD Ryzen 7040Series) (Laptop) running BIOS 3.3 (03.03) released 10/17/2023 and EC unknown
2024-02-05 18:42:12,212 INFO:	🐧 Fedora Linux 39.20240205.0 (Silverblue)
2024-02-05 18:42:12,212 INFO:	🐧 Kernel 6.6.14-200.fc39.x86_64
2024-02-05 18:42:12,214 DEBUG:	BAT1 charge level is 2076000 Β΅Ah
2024-02-05 18:42:12,214 INFO:	πŸ”‹ Battery BAT1 ( ) is operating at 96.19% of design
2024-02-05 18:42:12,214 INFO:	Checking prerequisites for s2idle
2024-02-05 18:42:12,214 INFO:	βœ… Logs are provided via systemd
2024-02-05 18:42:12,214 INFO:	βœ… AMD Ryzen 5 7640U w/ Radeon 760M Graphics (family 19 model 74)
2024-02-05 18:42:12,214 INFO:	βœ… LPS0 _DSM enabled
2024-02-05 18:42:12,400 INFO:	βœ… ACPI FADT supports Low-power S0 idle
2024-02-05 18:42:12,400 DEBUG:	/sys/module/gpiolib_acpi/parameters/ignore_wake is not configured
2024-02-05 18:42:12,400 DEBUG:	/sys/module/gpiolib_acpi/parameters/ignore_interrupt is not configured
2024-02-05 18:42:12,401 DEBUG:	/proc/cmdline: init_on_alloc=1 init_on_free=1 slab_nomerge page_alloc.shuffle=1 randomize_kstack_offset=on vsyscall=none debugfs=off lockdown=confidentiality random.trust_cpu=off random.trust_bootloader=off iommu=force intel_iommu=on amd_iommu=force_isolation iommu.passthrough=0 iommu.strict=1 pti=on module.sig_enforce=1 amdgpu.sg_display=0 rtc_cmos.use_acpi_alarm=1
2024-02-05 18:42:12,402 DEBUG:	LOGIND: no configuration changes
2024-02-05 18:42:12,402 INFO:	βœ… HSMP driver `amd_hsmp` not detected (blocked: False)
2024-02-05 18:42:12,406 INFO:	βœ… PMC driver `amd_pmc` loaded (Program 0 Firmware 76.70.0)
2024-02-05 18:42:12,415 ERROR:	❌ USB4 driver `thunderbolt` missing
2024-02-05 18:42:12,420 INFO:	βœ… GPU driver `amdgpu` available
2024-02-05 18:42:12,606 INFO:	βœ… System is configured for s2idle
2024-02-05 18:42:12,690 INFO:	βœ… NVME Sandisk Corp WD Black SN770 / PC SN740 256GB / PC SN560 (DRAM-less) NVMe SSD is configured for s2idle in BIOS
2024-02-05 18:42:12,694 INFO:	βœ… GPIO driver `pinctrl_amd` available
2024-02-05 18:42:12,694 DEBUG:	Unable to capture /sys/kernel/debug/gpio
2024-02-05 18:42:12,878 DEBUG:	Lockdown: none integrity [confidentiality]
2024-02-05 18:42:12,885 DEBUG:	PCI devices
2024-02-05 18:42:12,885 DEBUG:	| 0000:00:00.0 : Advanced Micro Devices, Inc. [AMD] Host bridge [1022:14e8]
2024-02-05 18:42:12,885 DEBUG:	| 0000:00:00.2 : Advanced Micro Devices, Inc. [AMD] IOMMU [1022:14e9]
2024-02-05 18:42:12,885 DEBUG:	| 0000:00:01.0 : Advanced Micro Devices, Inc. [AMD] Host bridge [1022:14ea]
2024-02-05 18:42:12,885 DEBUG:	| 0000:00:02.0 : Advanced Micro Devices, Inc. [AMD] Host bridge [1022:14ea]
2024-02-05 18:42:12,886 DEBUG:	| 0000:00:02.2 : Advanced Micro Devices, Inc. [AMD] PCI bridge [1022:14ee] : \_SB_.PCI0.GPP6
2024-02-05 18:42:12,886 DEBUG:	β”œβ”€ 0000:01:00.0 : MEDIATEK Corp. Network controller [14c3:0616] : \_SB_.PCI0.GPP6.WLAN
2024-02-05 18:42:12,886 DEBUG:	| 0000:00:02.4 : Advanced Micro Devices, Inc. [AMD] PCI bridge [1022:14ee] : \_SB_.PCI0.GPP8
2024-02-05 18:42:12,886 DEBUG:	β”œβ”€ 0000:02:00.0 : Sandisk Corp Non-Volatile memory controller [15b7:5017] : \_SB_.PCI0.GPP8.NVME
2024-02-05 18:42:12,886 DEBUG:	| 0000:00:03.0 : Advanced Micro Devices, Inc. [AMD] Host bridge [1022:14ea]
2024-02-05 18:42:12,886 DEBUG:	| 0000:00:03.1 : Advanced Micro Devices, Inc. [AMD] PCI bridge [1022:14ef] : \_SB_.PCI0.GP11
2024-02-05 18:42:12,886 DEBUG:	| 0000:00:04.0 : Advanced Micro Devices, Inc. [AMD] Host bridge [1022:14ea]
2024-02-05 18:42:12,887 DEBUG:	| 0000:00:04.1 : Advanced Micro Devices, Inc. [AMD] PCI bridge [1022:14ef] : \_SB_.PCI0.GP12
2024-02-05 18:42:12,887 DEBUG:	| 0000:00:08.0 : Advanced Micro Devices, Inc. [AMD] Host bridge [1022:14ea]
2024-02-05 18:42:12,887 DEBUG:	| 0000:00:08.1 : Advanced Micro Devices, Inc. [AMD] PCI bridge [1022:14eb] : \_SB_.PCI0.GP17
2024-02-05 18:42:12,887 DEBUG:	β”œβ”€ 0000:c1:00.0 : Advanced Micro Devices, Inc. [AMD/ATI] VGA compatible controller [1002:15bf] : \_SB_.PCI0.GP17.VGA_
2024-02-05 18:42:12,887 DEBUG:	β”œβ”€ 0000:c1:00.1 : Advanced Micro Devices, Inc. [AMD/ATI] Audio device [1002:1640] : \_SB_.PCI0.GP17.HDAU
2024-02-05 18:42:12,887 DEBUG:	β”œβ”€ 0000:c1:00.2 : Advanced Micro Devices, Inc. [AMD] Encryption controller [1022:15c7] : \_SB_.PCI0.GP17.PSP_
2024-02-05 18:42:12,888 DEBUG:	β”œβ”€ 0000:c1:00.3 : Advanced Micro Devices, Inc. [AMD] USB controller [1022:15b9] : \_SB_.PCI0.GP17.XHC0
2024-02-05 18:42:12,888 DEBUG:	β”œβ”€ 0000:c1:00.4 : Advanced Micro Devices, Inc. [AMD] USB controller [1022:15ba] : \_SB_.PCI0.GP17.XHC1
2024-02-05 18:42:12,888 DEBUG:	β”œβ”€ 0000:c1:00.5 : Advanced Micro Devices, Inc. [AMD] Multimedia controller [1022:15e2] : \_SB_.PCI0.GP17.ACP_
2024-02-05 18:42:12,888 DEBUG:	β”œβ”€ 0000:c1:00.6 : Advanced Micro Devices, Inc. [AMD] Audio device [1022:15e3] : \_SB_.PCI0.GP17.AZAL
2024-02-05 18:42:12,888 DEBUG:	| 0000:00:08.2 : Advanced Micro Devices, Inc. [AMD] PCI bridge [1022:14eb] : \_SB_.PCI0.GP18
2024-02-05 18:42:12,888 DEBUG:	β”œβ”€ 0000:c2:00.0 : Advanced Micro Devices, Inc. [AMD]  [1022:14ec]
2024-02-05 18:42:12,889 DEBUG:	β”œβ”€ 0000:c2:00.1 : Advanced Micro Devices, Inc. [AMD] Signal processing controller [1022:1502] : \_SB_.PCI0.GP18.IPU_
2024-02-05 18:42:12,889 DEBUG:	| 0000:00:08.3 : Advanced Micro Devices, Inc. [AMD] PCI bridge [1022:14eb] : \_SB_.PCI0.GP19
2024-02-05 18:42:12,889 DEBUG:	β”œβ”€ 0000:c3:00.0 : Advanced Micro Devices, Inc. [AMD]  [1022:14ec] : \_SB_.PCI0.GP19.XHC2
2024-02-05 18:42:12,889 DEBUG:	β”œβ”€ 0000:c3:00.3 : Advanced Micro Devices, Inc. [AMD] USB controller [1022:15c0] : \_SB_.PCI0.GP19.XHC3
2024-02-05 18:42:12,889 DEBUG:	β”œβ”€ 0000:c3:00.4 : Advanced Micro Devices, Inc. [AMD] USB controller [1022:15c1] : \_SB_.PCI0.GP19.XHC4
2024-02-05 18:42:12,889 DEBUG:	β”œβ”€ 0000:c3:00.5 : Advanced Micro Devices, Inc. [AMD] USB controller [1022:1668] : \_SB_.PCI0.GP19.NHI0
2024-02-05 18:42:12,890 DEBUG:	β”œβ”€ 0000:c3:00.6 : Advanced Micro Devices, Inc. [AMD] USB controller [1022:1669] : \_SB_.PCI0.GP19.NHI1
2024-02-05 18:42:12,890 DEBUG:	| 0000:00:14.0 : Advanced Micro Devices, Inc. [AMD] SMBus [1022:790b] : \_SB_.PCI0.SMBS
2024-02-05 18:42:12,890 DEBUG:	| 0000:00:14.3 : Advanced Micro Devices, Inc. [AMD] ISA bridge [1022:790e] : \_SB_.PCI0.LPC0
2024-02-05 18:42:12,890 DEBUG:	| 0000:00:18.0 : Advanced Micro Devices, Inc. [AMD] Host bridge [1022:14f0]
2024-02-05 18:42:12,890 DEBUG:	| 0000:00:18.1 : Advanced Micro Devices, Inc. [AMD] Host bridge [1022:14f1]
2024-02-05 18:42:12,890 DEBUG:	| 0000:00:18.2 : Advanced Micro Devices, Inc. [AMD] Host bridge [1022:14f2]
2024-02-05 18:42:12,890 DEBUG:	| 0000:00:18.3 : Advanced Micro Devices, Inc. [AMD] Host bridge [1022:14f3]
2024-02-05 18:42:12,890 DEBUG:	| 0000:00:18.4 : Advanced Micro Devices, Inc. [AMD] Host bridge [1022:14f4]
2024-02-05 18:42:12,891 DEBUG:	| 0000:00:18.5 : Advanced Micro Devices, Inc. [AMD] Host bridge [1022:14f5]
2024-02-05 18:42:12,891 DEBUG:	| 0000:00:18.6 : Advanced Micro Devices, Inc. [AMD] Host bridge [1022:14f6]
2024-02-05 18:42:12,891 DEBUG:	└─0000:00:18.7 : Advanced Micro Devices, Inc. [AMD] Host bridge [1022:14f7]
2024-02-05 18:42:12,903 DEBUG:	I2C HID devices
2024-02-05 18:42:12,904 DEBUG:	| "FRMW0004:00 32AC:0006 Wireless Radio Control" [FRMW0004] : \_SB_.I2CA.ECSH
2024-02-05 18:42:12,904 DEBUG:	| "FRMW0004:00 32AC:0006 Consumer Control" [FRMW0004] : \_SB_.I2CA.ECSH
2024-02-05 18:42:12,904 DEBUG:	| "PIXA3854:00 093A:0274 Mouse" [PIXA3854] : \_SB_.I2CD.TPAD
2024-02-05 18:42:12,904 DEBUG:	└─"PIXA3854:00 093A:0274 Touchpad" [PIXA3854] : \_SB_.I2CD.TPAD
2024-02-05 18:42:12,932 DEBUG:	Wakeup sources:
2024-02-05 18:42:12,932 DEBUG:	|  [/sys/devices/platform/USBC000:00/power_supply/ucsi-source-psy-USBC000:001/wakeup47]: enabled
2024-02-05 18:42:12,932 DEBUG:	|  [/sys/devices/platform/USBC000:00/power_supply/ucsi-source-psy-USBC000:002/wakeup48]: enabled
2024-02-05 18:42:12,932 DEBUG:	|  [/sys/devices/platform/USBC000:00/power_supply/ucsi-source-psy-USBC000:003/wakeup49]: enabled
2024-02-05 18:42:12,932 DEBUG:	|  [/sys/devices/platform/USBC000:00/power_supply/ucsi-source-psy-USBC000:004/wakeup50]: enabled
2024-02-05 18:42:12,932 DEBUG:	| ACPI Battery [PNP0C0A:00]: enabled
2024-02-05 18:42:12,932 DEBUG:	| ACPI Lid Switch [PNP0C0D:00]: enabled
2024-02-05 18:42:12,932 DEBUG:	| ACPI Mains [ACPI0003:00]: enabled
2024-02-05 18:42:12,932 DEBUG:	| ACPI Power Button [PNP0C0C:00]: enabled
2024-02-05 18:42:12,932 DEBUG:	| AT Translated Set 2 keyboard [serio0]: enabled
2024-02-05 18:42:12,932 DEBUG:	| Advanced Micro Devices, Inc. [AMD] PCI bridge [0000:00:02.2]: enabled
2024-02-05 18:42:12,932 DEBUG:	| Advanced Micro Devices, Inc. [AMD] PCI bridge [0000:00:03.1]: enabled
2024-02-05 18:42:12,932 DEBUG:	| Advanced Micro Devices, Inc. [AMD] PCI bridge [0000:00:04.1]: enabled
2024-02-05 18:42:12,932 DEBUG:	| Advanced Micro Devices, Inc. [AMD] USB controller [0000:c1:00.3]: enabled
2024-02-05 18:42:12,932 DEBUG:	| Advanced Micro Devices, Inc. [AMD] USB controller [0000:c1:00.4]: enabled
2024-02-05 18:42:12,932 DEBUG:	| Advanced Micro Devices, Inc. [AMD] USB controller [0000:c3:00.3]: enabled
2024-02-05 18:42:12,932 DEBUG:	| Advanced Micro Devices, Inc. [AMD] USB controller [0000:c3:00.4]: enabled
2024-02-05 18:42:12,932 DEBUG:	| PIXA3854:00 093A:0274 Mouse [i2c-PIXA3854:00]: enabled
2024-02-05 18:42:12,932 DEBUG:	| Plug-n-play Real Time Clock [00:01]: enabled
2024-02-05 18:42:12,933 DEBUG:	└─Real Time Clock alarm timer [rtc0]: enabled

Selected Kernel Parameter:

init_on_alloc=1 init_on_free=1 slab_nomerge 
page_alloc.shuffle=1 randomize_kstack_offset=on 
vsyscall=none debugfs=off lockdown=confidentiality random.trust_cpu=off 
random.trust_bootloader=off iommu=force intel_iommu=on 
amd_iommu=force_isolation iommu.passthrough=0 iommu.strict=1 
pti=on module.sig_enforce=1 mitigations=auto,nosmt amdgpu.sg_display=0 
rtc_cmos.use_acpi_alarm=1

The power drain happens without rtc_cmos.use_acpi_alarm=1 parameter, and the amd_s2idel.py test is done without debugfs=off parameter.

You need the thunderbolt kernel module. You should file a bug with them to either compile it or stop blocking it.

Thank you! @Mario_Limonciello apparently remove the block of thunderbolt module in blacklist.conf fixed the issue. And it won’t be overwritten by update, even on an immutable distro.

1 Like