P-state not working in kernel 4.13

Bug #1743269 reported by Eduardo Rudas on 2018-01-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Medium
Joseph Salisbury
Artful
Medium
Joseph Salisbury
Bionic
Medium
Joseph Salisbury

Bug Description

== SRU Justification ==
Commits b29c6ef7bb12 and 7d5905dc14a8 fix a regression in Artful. They
were both added to mainline in v4.15-rc1 and fix the following two commits:
b29c6ef7bb12 Fixes: 4815d3c56d1e (cpufreq: x86: Make scaling_cur_freq behave more as expected)
7d5905dc14a8 Fixes: 890da9cf0983 (Revert "x86: do not use cpufreq_quick_get() for /proc/cpuinfo "cpu MHz"")
According to the bug report, P-state is not working in Artful, but it was working
in Zesty. This bug is happening on a Lenovo Thinkpad X230 with an Intel Core i5-3210M CPU.
The bug reporter is using CPU scaling to improve battery life.

== Fixes ==
b29c6ef7bb12 ("x86 / CPU: Avoid unnecessary IPIs in arch_freq_get_on_cpu()")
7d5905dc14a8 ("x86 / CPU: Always show current CPU frequency in /proc/cpuinfo")

== Regression Potential ==
Low. The two commit fix a current regression and have had additiona upstream reviews
from being send to stable.

## Original Bug Description ##
I have a Lenovo Thinkpad X230 with an Intel Core i5-3210M CPU. I'm using Xubuntu 17.10 (Description: Ubuntu 17.10, Release: 17.10). I use tlp 1.0-1~artful in order to improve battery performance, particularly enabling the Intel P-state performance scaling. In Xubuntu 17.04 it worked flawlessly, but when I upgraded to 17.10 the processor doesn't scale anymore. I ran all the updates and it's not working. I also did a clean install using another hard drive and the problem persist.

I searched the tlp forums and similar problems pointed to a kernel bug, so I'm filing this report.

I tested different mainline kernels in order to see what kernel version is causing the problem:

Up to mainline kernel 4.12.14 generic, P-state scaling is OK
Kernel 4.13 generic up to kernel 4.14.12 generic, P-state scaling is not working
Kernel 4.14.13 generic up to 4.15 rc7 generic, P-state scaling is OK

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: linux-image-4.13.0-25-generic 4.13.0-25.29
ProcVersionSignature: Ubuntu 4.13.0-25.29-generic 4.13.13
Uname: Linux 4.13.0-25-generic x86_64
ApportVersion: 2.20.7-0ubuntu3.7
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: eduar 1686 F.... pulseaudio
CurrentDesktop: XFCE
Date: Sun Jan 14 18:46:27 2018
HibernationDevice: RESUME=UUID=ec172c41-ddb8-4d67-8249-390aa1bb6331
InstallationDate: Installed on 2017-02-07 (341 days ago)
InstallationMedia: Xubuntu 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719)
MachineType: LENOVO 232032U
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.13.0-25-generic root=UUID=a5c459a3-f6c9-40cd-a648-e7b8b28a2ee6 ro radeon.dpm=1 quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-4.13.0-25-generic N/A
 linux-backports-modules-4.13.0-25-generic N/A
 linux-firmware 1.169.1
SourcePackage: linux
UpgradeStatus: Upgraded to artful on 2018-01-13 (1 days ago)
dmi.bios.date: 09/25/2017
dmi.bios.vendor: LENOVO
dmi.bios.version: G2ETB0WW (2.70 )
dmi.board.asset.tag: Not Available
dmi.board.name: 232032U
dmi.board.vendor: LENOVO
dmi.board.version: NO DPK
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvrG2ETB0WW(2.70):bd09/25/2017:svnLENOVO:pn232032U:pvrThinkPadX230:rvnLENOVO:rn232032U:rvrNODPK:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.family: ThinkPad X230
dmi.product.name: 232032U
dmi.product.version: ThinkPad X230
dmi.sys.vendor: LENOVO

Eduardo Rudas (eduardorudas) wrote :

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Joseph Salisbury (jsalisbury) wrote :

We can perform a "Reverse" kernel bisect to identify the commit that fixes this bug in mainline. We first need to identify the last kernel version that had the bug and the first kernel that did no.

Can you test the following two kernels:
v4.14-rc1: http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.14-rc1/
v4.15-rc1: http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.15-rc1/

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
tags: added: needs-bisect
Eduardo Rudas (eduardorudas) wrote :

Tested:

v4.14-rc1: had the bug
v4.15-rc1: did not had the bug

Just as an additional information, I did some tests and the last kernel version that had the bug was 4.14.12 and the first that did not was 4.14.13.

Changed in linux (Ubuntu Artful):
importance: Undecided → Medium
status: New → Triaged
Changed in linux (Ubuntu Artful):
status: Triaged → In Progress
Changed in linux (Ubuntu Bionic):
status: Triaged → In Progress
Changed in linux (Ubuntu Artful):
assignee: nobody → Joseph Salisbury (jsalisbury)
Changed in linux (Ubuntu Bionic):
assignee: nobody → Joseph Salisbury (jsalisbury)
Joseph Salisbury (jsalisbury) wrote :

I built a test kernel with two commits 7d5905dc14a and b29c6ef7bb. The test kernel can be downloaded from:
http://kernel.ubuntu.com/~jsalisbury/lp1743269

Can you test this kernel and see if it resolves this bug?

Note, to test this kernel, you need to install both the linux-image and linux-image-extra .deb packages.

Thanks in advance!

Eduardo Rudas (eduardorudas) wrote :

You welcome! I'm happy to help!

Tested, it resolves the bug. Thanks!!! You're the best!

Just to be sure it was the right testing kernel, the output of uname -a:

4.13.0-25-generic #29~lp1743269TwoCommits SMP Wed Jan 17 17:15:20 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Joseph Salisbury (jsalisbury) wrote :

Thanks again for testing. I'll submit an SRU request to have these two commits included in the Ubuntu kernel.

Eduardo Rudas (eduardorudas) wrote :

Excellent! Hope the commits are included soon in the coming updates.
Thanks!

Joseph Salisbury (jsalisbury) wrote :
description: updated
Seth Forshee (sforshee) on 2018-01-19
Changed in linux (Ubuntu Bionic):
status: In Progress → Fix Committed
Changed in linux (Ubuntu Artful):
status: In Progress → Fix Committed
Stefan Bader (smb) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-artful' to 'verification-done-artful'. If the problem still exists, change the tag 'verification-needed-artful' to 'verification-failed-artful'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-artful
Eduardo Rudas (eduardorudas) wrote :

I have tested the kernel in -proposed and the problem is solved.

~$ uname -a
Linux Anonymlus-0FD42 4.13.0-38-generic #43-Ubuntu SMP Wed Mar 14 15:20:44 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

tags: added: verification-done-artful
removed: verification-needed-artful
Launchpad Janitor (janitor) wrote :
Download full text (18.9 KiB)

This bug was fixed in the package linux - 4.13.0-38.43

---------------
linux (4.13.0-38.43) artful; urgency=medium

  * linux: 4.13.0-38.43 -proposed tracker (LP: #1755762)

  * Servers going OOM after updating kernel from 4.10 to 4.13 (LP: #1748408)
    - i40e: Fix memory leak related filter programming status
    - i40e: Add programming descriptors to cleaned_count

  * [SRU] Lenovo E41 Mic mute hotkey is not responding (LP: #1753347)
    - platform/x86: ideapad-laptop: Increase timeout to wait for EC answer

  * fails to dump with latest kpti fixes (LP: #1750021)
    - kdump: write correct address of mem_section into vmcoreinfo

  * headset mic can't be detected on two Dell machines (LP: #1748807)
    - ALSA: hda/realtek - Support headset mode for ALC215/ALC285/ALC289
    - ALSA: hda - Fix headset mic detection problem for two Dell machines
    - ALSA: hda - Fix a wrong FIXUP for alc289 on Dell machines

  * CIFS SMB2/SMB3 does not work for domain based DFS (LP: #1747572)
    - CIFS: make IPC a regular tcon
    - CIFS: use tcon_ipc instead of use_ipc parameter of SMB2_ioctl
    - CIFS: dump IPC tcon in debug proc file

  * i2c-thunderx: erroneous error message "unhandled state: 0" (LP: #1754076)
    - i2c: octeon: Prevent error message on bus error

  * hisi_sas: Add disk LED support (LP: #1752695)
    - scsi: hisi_sas: directly attached disk LED feature for v2 hw

  * EDAC, sb_edac: Backport 1 patch to Ubuntu 17.10 (Fix missing DIMM sysfs
    entries with KNL SNC2/SNC4 mode) (LP: #1743856)
    - EDAC, sb_edac: Fix missing DIMM sysfs entries with KNL SNC2/SNC4 mode

  * [regression] Colour banding and artefacts appear system-wide on an Asus
    Zenbook UX303LA with Intel HD 4400 graphics (LP: #1749420)
    - drm/edid: Add 6 bpc quirk for CPT panel in Asus UX303LA

  * DVB Card with SAA7146 chipset not working (LP: #1742316)
    - vmalloc: fix __GFP_HIGHMEM usage for vmalloc_32 on 32b systems

  * [Asus UX360UA] battery status in unity-panel is not changing when battery is
    being charged (LP: #1661876) // AC adapter status not detected on Asus
    ZenBook UX410UAK (LP: #1745032)
    - ACPI / battery: Add quirk for Asus UX360UA and UX410UAK

  * ASUS UX305LA - Battery state not detected correctly (LP: #1482390)
    - ACPI / battery: Add quirk for Asus GL502VSK and UX305LA

  * support thunderx2 vendor pmu events (LP: #1747523)
    - perf pmu: Extract function to get JSON alias map
    - perf pmu: Pass pmu as a parameter to get_cpuid_str()
    - perf tools arm64: Add support for get_cpuid_str function.
    - perf pmu: Add helper function is_pmu_core to detect PMU CORE devices
    - perf vendor events arm64: Add ThunderX2 implementation defined pmu core
      events
    - perf pmu: Add check for valid cpuid in perf_pmu__find_map()

  * lpfc.ko module doesn't work (LP: #1746970)
    - scsi: lpfc: Fix loop mode target discovery

  * Ubuntu 17.10 crashes on vmalloc.c (LP: #1739498)
    - powerpc/mm/book3s64: Make KERN_IO_START a variable
    - powerpc/mm/slb: Move comment next to the code it's referring to
    - powerpc/mm/hash64: Make vmalloc 56T on hash

  * ethtool -p fails to light NIC LED on HiSilicon D05 systems (LP: #1748567)
    - net...

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

Other bug subscribers