I am using a R5 7640U Framework 13 on Fedora 40 with KDE. I recently observed this behavior when I was interested in what effect upgrading from Fedora 39 to 40 has on idle power.
Setup to observe the idle power:
Three usb-c card slotted Left Upper, Left Lower, Right Upper. One usb-a card slotted Right Lower
Brightness 0%, bluetooth off, WiFi on, camera and microphone physical switches off, nothing opening other than a kitty session running powerstat 3 6000 -d 1
Off of a fresh reboot, I am seeing 3.3w
After a suspend session, either triggered by closing the lid, hit “sleep” from application launcher, or python amd_s2idle.py, the idle power would be around 4w.
Running python amd_s2idle.py didn’t prompt me with anything that I haven’t fixed and the laptop is able to reach hardware sleep state consistently.
My kernel parameters look like GRUB_CMDLINE_LINUX="rhgb quiet rtc_cmos.use_acpi_alarm=1 iomem=relaxed amd_iommu=off amdgpu.abmlevel=1"
I was able to reproduce this issue consistently. Wondering if anyone else is facing this same issue? Or anyone can point me in the right direction to troubleshoot?
welcome to the community, I see that you’ve had upgraded from Fedora 39 to Fedora 40 KDE, can you check with clean fedora 40 live to see if you’re having same s2idle results as your installed system?
before suspend
powersave
spl:15000 fppt:30000 sppt:15000 sppt_apu_only:54000 stt_min:15000 stt[APU]:0 stt[HS2]: 0
balanced
spl:28000 fppt:35000 sppt:33000 sppt_apu_only:54000 stt_min:28000 stt[APU]:0 stt[HS2]: 0
after suspend
powersave
spl:15000 fppt:15000 (it is 15000 when i immediately run cat after switching profile, and went back to 30000 when i cat again) sppt:15000 sppt_apu_only:54000 stt_min:15000 stt[APU]:0 stt[HS2]: 0
balanced
spl:28000 fppt:35000 sppt:33000 sppt_apu_only:54000 stt_min:28000 stt[APU]:0 stt[HS2]: 0
I actually checked the powertop top consumers in troubleshooting a few days earlier and didn’t notice any meaningful differences.
I was able to reproduce it running fedora 40 live kde spin on a usb. Before suspend I am seeing 4.6w, after suspend triggered by running amd_s2idle.py, I am getting 5.2w. The discrepancy matches with my current installation. (Base value higher because of usb-a I presume). Should I try Gnome on this?
I also tried with having my laptop in balanced before going into suspend, cat the value, suspend and then cat again. the values are the same as well which is
I wasn’t thinking it was caused by USB A card, was just saying that having USB A card to test run Fedora 40 live would give me a higher idle power to do the subtraction. But the difference between before suspend and after is the same. But I redid the experiment anyway without USB A card, the results are consistent.
Another question would be about
If they’re identical try changing to power saver and back to balanced and see if that helps it.
Should this be identical before and after suspend? If not, why is that?
Checking /sys/class/backlight/amdgpu_bl1/brightness gave me 1, /sys/class/backlight/amdgpu_bl1/actual_brightness gave me 0 both before and after suspend. I am guessing powertop couldn’t really figure out where the extra power consumption comes from, so it adds to backlight? I don’t think the power estimates are accurate for display backlight under both cases though.
Yeah if the brightness really is identical between the two cases the display power consumption should be the same.
I do actually have another theory. Can you compare lspci -vv output before and after suspend? Does L1SS change for any device? If so; it’s pointing at a kernel driver or firmware bug for that device.
I don’t really know how to interpret this diff though. Also this time when I triggered suspend using amd_s2idle.py, the suspend went over the suspend cycle and I had to wake the laptop manually. Then I triggered suspend again, and it was back to normal.
Can you post both the files to a Github gist? There is definitely changes that I don’t expect there and I would suspect them to be the root cause but I need to better understand what they are.
Tested and I don’t think it worked. Before suspend would be now 4.1w and after would be 4.7w. Also it was first time building my kernel with patch, I think I did it right but not 100% sure, so please let me know if I did anything incorrectly. (Downloaded your patch, point to it in kernel.spec in patch section, and then followed the fedora guidelines on how to build and install).
Here are all the logs and diffs.