Skip to contentSkip to conversation

Abnormal battery drain with kernel 6.5 (Ryzen 5500u)

DISCUSSION Bagas Sanjaya 4 participants 5 messages Sep 1, 2023 – Nov 2, 2023 Regressions

lore
Share & tools
lore
#0 lore raw

Hi,

I notice a regression report on Bugzilla [1] that have been already handled there. Quoting from it:

Quoted 9 lines

After switching from 6.4.x kernel to 6.5 I experienced an abnormal battery drain since my laptop is actually never idle. I accepted default CPUfreq to schedutil and AMD Processor P-State mode is 3 (active).

I expected a different behaviour, but am I missing something?
In my boot configuration I had "amd_pstate.shared_mem=1" and tried to remove this switch, but did not affect my power consuption.

Is there something changed from 6.4.x to 6.5 that requires a different configuration to get an optimal power consumption?

Thanks a lot for your attention

See Bugzilla for the full thread.

Anyway, I'm adding it to regzbot:

#regzbot introduced: v6.4..v6.5 https://bugzilla.kernel.org/show_bug.cgi?id=217853

Thanks.

Signature · 1 line
An old man doll... just what I always wanted! - Clara
#1 lore raw
Quoted 13 lines · Bagas Sanjaya

Hi,

I notice a regression report on Bugzilla [1] that have been already handled there. Quoting from it:

Quoted 8 lines

After switching from 6.4.x kernel to 6.5 I experienced an abnormal battery drain since my laptop is actually never idle. I accepted default CPUfreq to schedutil and AMD Processor P-State mode is 3 (active).

I expected a different behaviour, but am I missing something?
In my boot configuration I had "amd_pstate.shared_mem=1" and tried to remove this switch, but did not affect my power consuption.

Is there something changed from 6.4.x to 6.5 that requires a different configuration to get an optimal power consumption?

Quoted 8 lines
Quoted 1 line

Thanks a lot for your attention

See Bugzilla for the full thread.

Anyway, I'm adding it to regzbot:

#regzbot introduced: v6.4..v6.5 https://bugzilla.kernel.org/show_bug.cgi?id=217853

+ Meng Li/Perry,

May we know which CPU type are you using? Try "lscpu"?

Thanks,
Ray

#2 lore raw

Hi, my CPU is AMD Ryzen 5500u.
Thanks a lot

Michele

---
Architecture:                       x86_64
CPU op-mode(s):                     32-bit, 64-bit
Byte Order:                         Little Endian
Address sizes:                      48 bits physical, 48 bits virtual CPU(s):                             12
On-line CPU(s) list:                0-11
Thread(s) per core:                 2
Core(s) per socket:                 6
Socket(s):                          1
NUMA node(s):                       1
Vendor ID:                          AuthenticAMD
CPU family:                         23
Model:                              104
Model name:                         AMD Ryzen 5 5500U with Radeon Graphics Stepping:                           1
Frequency boost:                    enabled
CPU MHz:                            975.888
CPU max MHz:                        4056,0000
CPU min MHz:                        400,0000
BogoMIPS:                           4191.99
Virtualization:                     AMD-V
L1d cache:                          192 KiB
L1i cache:                          192 KiB
L2 cache:                           3 MiB
L3 cache:                           8 MiB
NUMA node0 CPU(s):                  0-11
Vulnerability Gather data sampling: Not affected
Vulnerability Itlb multihit:        Not affected
Vulnerability L1tf:                 Not affected
Vulnerability Mds:                  Not affected
Vulnerability Meltdown:             Not affected
Vulnerability Mmio stale data:      Not affected
Vulnerability Retbleed:             Mitigation; untrained return thunk; SMT enab led with STIBP protection Vulnerability Spec rstack overflow: Mitigation; safe RET Vulnerability Spec store bypass:    Mitigation; Speculative Store Bypass disable d via prctl
Vulnerability Spectre v1:           Mitigation; usercopy/swapgs barriers and __u ser pointer sanitization Vulnerability Spectre v2:           Mitigation; Retpolines, IBPB conditional, ST IBP always-on, RSB filling, PBRSB-eIBRS Not affected
Vulnerability Srbds:                Not affected
Vulnerability Tsx async abort:      Not affected
Flags:                              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe 1gb rdtscp lm constant_tsc rep_good nopl non stop_tsc cpuid extd_apicid aperfmperf rapl p ni pclmulqdq monitor ssse3 fma cx16 sse4_1 s se4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy a bm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_ nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l 3 hw_pstate ssbd mba ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 cqm rdt_a rdse ed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 cqm_llc cqm_occup_llc cqm_mbm _total cqm_mbm_local clzero irperf xsaveerpt r rdpru wbnoinvd cppc arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v _vmsave_vmload vgif v_spec_ctrl umip rdpid o verflow_recov succor smca

Il venerdì 8 settembre 2023 alle ore 06:41:42 CEST, Huang Rui <[email protected]> ha scritto:

Quoted 13 lines · Bagas Sanjaya

Hi,

I notice a regression report on Bugzilla [1] that have been already handled there. Quoting from it:

Quoted 8 lines

After switching from 6.4.x kernel to 6.5 I experienced an abnormal battery drain since my laptop is actually never idle. I accepted default CPUfreq to schedutil and AMD Processor P-State mode is 3 (active).

I expected a different behaviour, but am I missing something?
In my boot configuration I had "amd_pstate.shared_mem=1" and tried to remove this switch, but did not affect my power consuption.

Is there something changed from 6.4.x to 6.5 that requires a different configuration to get an optimal power consumption?

Quoted 8 lines
Quoted 1 line

Thanks a lot for your attention

See Bugzilla for the full thread.

Anyway, I'm adding it to regzbot:

#regzbot introduced: v6.4..v6.5 https://bugzilla.kernel.org/show_bug.cgi?id=217853

+ Meng Li/Perry,

May we know which CPU type are you using? Try "lscpu"?

Thanks,

Ray

#3 lore raw
In reply to Huang Rui
Quoted 18 lines · Huang Rui
Quoted 17 lines · Bagas Sanjaya

Hi,

I notice a regression report on Bugzilla [1] that have been already handled there. Quoting from it:

Quoted 9 lines

After switching from 6.4.x kernel to 6.5 I experienced an abnormal battery drain since my laptop is actually never idle. I accepted default CPUfreq to schedutil and AMD Processor P-State mode is 3 (active).

I expected a different behaviour, but am I missing something?
In my boot configuration I had "amd_pstate.shared_mem=1" and tried to remove this switch, but did not affect my power consuption.

Is there something changed from 6.4.x to 6.5 that requires a different configuration to get an optimal power consumption?

Thanks a lot for your attention

See Bugzilla for the full thread.

Quoted 9 lines
Quoted 4 lines

Anyway, I'm adding it to regzbot:

#regzbot introduced: v6.4..v6.5 https://bugzilla.kernel.org/show_bug.cgi?id=217853

+ Meng Li/Perry,

May we know which CPU type are you using? Try "lscpu"?

Sorry for the replying just now.

The reporter (on Bugzilla) had bisected to commit c8afaa1b0f8bc9 ("locking:
remove spin_lock_prefetch"). Telling regzbot:

#regzbot introduced: c8afaa1b0f8bc9
#regzbot title: spin_lock_prefetch() removal causes abnormal battery drain on Ryzen 5500u

Thanks.

Signature · 1 line
An old man doll... just what I always wanted! - Clara
#4 lore raw
Quoted 35 lines · Bagas Sanjaya
Quoted 25 lines · Huang Rui
Quoted 24 lines · Bagas Sanjaya

Hi,

I notice a regression report on Bugzilla [1] that have been already handled
there. Quoting from it:

Quoted 5 lines

After switching from 6.4.x kernel to 6.5 I experienced an abnormal battery drain since my laptop is actually never idle.
I accepted default CPUfreq to schedutil and AMD Processor P-State mode is 3 (active).

Quoted 8 lines

I expected a different behaviour, but am I missing something? In my boot configuration I had "amd_pstate.shared_mem=1" and tried to remove this switch, but did not affect my power consuption.

Is there something changed from 6.4.x to 6.5 that requires a different configuration to get an optimal power consumption?

Thanks a lot for your attention

See Bugzilla for the full thread.

Anyway, I'm adding it to regzbot:

Quoted 8 lines
Quoted 3 lines

#regzbot introduced: v6.4..v6.5
https://bugzilla.kernel.org/show_bug.cgi?id=217853

+ Meng Li/Perry,

May we know which CPU type are you using? Try "lscpu"?

Quoted 9 lines

Sorry for the replying just now.

The reporter (on Bugzilla) had bisected to commit c8afaa1b0f8bc9 ("locking:
remove spin_lock_prefetch"). Telling regzbot:

#regzbot introduced: c8afaa1b0f8bc9
#regzbot title: spin_lock_prefetch() removal causes abnormal battery drain on Ryzen 5500u

This particular commit is highly unlikely to be causing anything of the sort.

Looking at the bz I suspect the reporter did not follow through with bisection, to quote:

Quoted 2 lines

Tried to bisect following docs and I had just this output:
[c8afaa1b0f8bc93d013ab2ea6b9649958af3f1d3] locking: remove spin_lock_prefetch

But that's what one gets when bisection is still in progress.

Final message, should one go through with everything and this commit indeed was the culprit, would start with this:

Quoted 1 line

c8afaa1b0f8bc93d013ab2ea6b9649958af3f1d3 is the first bad commit

Perhaps you could help the reporter through building the kernel and picking good/bad status. I don't know how easily visible the issue is.

Signature · 1 line
Mateusz Guzik <mjguzik gmail.com>