increased power usage after upgrade from kinetic to lunar

Bug #2025040 reported by brett hassall
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Hi

I have just upgrade and power usage is double or more under lunar. Kernel version went from 5.19.0-43 to 6.2.0-20.

Running powertop, I see that C8 is being used with 5.19 but 6.2 does not go to a higher power saving state than C3.

I tried the Ubuntu kernel from jammy ie 5.15.0-73. It also uses C8.

I have also tried the 5.15.108 & 5.10.17 mainline kernels. Both of these do not go to higher power saving state than C3.

All these tests have been run on the same partition ie. only the kernel version has changed.

Laptop is a HP 15s-fq4011TU 11th Gen Intel with Tiger Lake Iris Xe graphics.

So it seems to me:
1) Ubuntu has applied a patch to the mainline kernel that improves power saving in 5.15 and 5.19
2) This patch either hasn't been applied to 6.2 or no longer works.

Could you pls let me know what other info you need or what I could look at next?

Thanks

Tags: lunar
Paul White (paulw2u)
affects: ubuntu → linux (Ubuntu)
summary: - increased power usage after upgrade from kinectic to lunar
+ increased power usage after upgrade from kinetic to lunar
tags: added: lunar
Revision history for this message
Executenor (nicktelindert) wrote :

I can also confirm this one also on a HP 15s-fq4xxx series laptop
I tested this on the kinetic kernel 5.19.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
brett hassall (brett-hassall) wrote :

The laptop has Realtek RTL8822CE 802.11ac PCIe Wireless Network Adapter. I notice that when I use rfkill to block the wlan, that package state c8 is being used. When I rfkill unblock, the best state achieved is once again c3. Kernel version is 6.2.0-26.

So the problem could be the Realtek driver.

Revision history for this message
brett hassall (brett-hassall) wrote :

kernel bisects have revealed that prior to 5.19.0-10.10, c3 is the best power save level achieved and post 5.19.0-12.12, c8 is achieved.

Inspecting the commits between -10.10 & -12.12 indicates that 3 commits are relevant:
UBUNTU: SAUCE: vmd: fixup bridge ASPM by driver name instead
UBUNTU: SAUCE: PCI/ASPM: Enable LTR for endpoints behind VMD
UBUNTU: SAUCE: PCI/ASPM: Enable ASPM for links under VMD domain.

These 3 commits are also applied to 5.15 and 6.2.

So it seems that these patches do not completely explain the observed behaviour.

Revision history for this message
brett hassall (brett-hassall) wrote :

Further to the comment above about the Realtek wifi, I tried using an old D-Link GWL-G122 USB wifi (uses rt73usb driver) while the built-in wifi was blocked. It worked ok and the laptop could achieve package c8 while pinging via the usb wifi.

So, the kernel can work with wifi and achieve package c8 as you would expect. I'm still suspicious of the Realtek driver.

Revision history for this message
brett hassall (brett-hassall) wrote :

I tried the 6.4.0-1.1 kernel and it achieves package c8.

But, the power usage by the Realtek driver has greatly increased under 6.4. Using "top" with each kernel booted for a similar amount of time, 6.2 has cpu usage for irq/154-rtw88_pci of 0:02:92 whilst under 6.4 cpu usage for irq/155-rtw88_pci was 0:24:10.

Revision history for this message
brett hassall (brett-hassall) wrote :

I tried booting with various mainline kernels and determined that the power usage increase was introduced between 6.4-rc5 and 6.4-rc6. Inspection of the rc6 changelog indicated that this commit was a good chance:
mantic git repo 3918dd0177ee ("wifi: rtw88: correct PS calculation for SUPPORTS_DYNAMIC_PS", 2023-05-27).

So, I created a patch from this commit and applied to lunar git repo. For the patch to apply successfully I also had to apply in the order below:
f0e741e4ddbc ("wifi: rtw88: add bitmap for dynamic port settings", 2023-04-14)
ccf73f6e69c0 ("wifi: rtw88: add port switch for AP mode", 2023-04-14)

Building and booting the kernel worked. Kernel 6.2 now achieves package c8 and also exhibits the same CPU increase in top for irq/154-rtw88. I have only been using the laptop to type up this comment and in that time top shows 0:15:59 cpu time. CPU% is toggling between 0.7% & 1.0%. This seems high when compared to and intel wifi on another laptop.

Is there any interest in applying these commits to hwe-6.2 for jammy ?

Or should I close the bug and create another for the cpu usage ?

Revision history for this message
brett hassall (brett-hassall) wrote (last edit ):

lunar only has a few months to go but enabling hwe-6.2 to achieve package c8 would benefit LTS users.

affects: linux (Ubuntu) → linux-hwe-6.2 (Ubuntu)
Revision history for this message
brett hassall (brett-hassall) wrote (last edit ):

upstream bug raised regarding CPU increase for irq/154-rtw88 - https://bugzilla.kernel.org/show_bug.cgi?id=217828

Revision history for this message
brett hassall (brett-hassall) wrote :

I see that commit "wifi: rtw88: correct PS calculation for SUPPORTS_DYNAMIC_PS" has been picked up in the update to upstream stable 6.1.34 and is in the master-next branch of the lunar git repo. i'll test when the next kernel is built.

affects: linux-hwe-6.2 (Ubuntu) → linux (Ubuntu)
Changed in linux (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
brett hassall (brett-hassall) wrote :

Confirm that 6.2.0-34.34 can reach package C8

Revision history for this message
brett hassall (brett-hassall) wrote :

6.2.0-34.34 has been released

Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.