cpufreq: intel_pstate: Clear HWP desired on suspend/shutdown and offline

Bug #1950584 reported by Colin Ian King
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Committed
Medium
Unassigned
Hirsute
Fix Released
Medium
Philip Cox
Impish
Fix Released
Medium
Philip Cox

Bug Description

[Impact]

"Commit a365ab6b9dfb ("cpufreq: intel_pstate: Implement the
 ->adjust_perf() callback") caused intel_pstate to use nonzero HWP
 desired values in certain usage scenarios, but it did not prevent
 them from being leaked into the confugirations in which HWP desired
 is expected to be 0"

I believe I'm seeing this issue on my laptop during suspend/resume. The upstream fix is:

[Fix]

commit dbea75fe18f60e364de6d994fc938a24ba249d81
Author: Rafael J. Wysocki <email address hidden>
Date: Wed Nov 3 19:43:47 2021 +0100

    cpufreq: intel_pstate: Clear HWP desired on suspend/shutdown and offline
---
ProblemType: Bug
ApportVersion: 2.20.11-0ubuntu73
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: cking 2316 F.... pulseaudio
 /dev/snd/pcmC1D0c: cking 2316 F...m pulseaudio
 /dev/snd/controlC0: cking 2316 F.... pulseaudio
 /dev/snd/pcmC0D0p: cking 2316 F...m pulseaudio
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
DistroRelease: Ubuntu 22.04
InstallationDate: Installed on 2021-06-07 (156 days ago)
InstallationMedia: Ubuntu 21.10 "Impish Indri" - Alpha amd64 (20210607)
MachineType: LENOVO 20L5CTO1WW
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
Package: linux (not installed)
ProcFB: 0 i915drmfb
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-5.13.0-20-generic root=/dev/mapper/vgubuntu-root ro quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 5.13.0-20.20-generic 5.13.14
RelatedPackageVersions:
 linux-restricted-modules-5.13.0-20-generic N/A
 linux-backports-modules-5.13.0-20-generic N/A
 linux-firmware 1.202
Tags: jammy
Uname: Linux 5.13.0-20-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip libvirt lpadmin lxd plugdev sambashare sudo vboxusers
_MarkForUpload: True
dmi.bios.date: 01/11/2020
dmi.bios.release: 1.30
dmi.bios.vendor: LENOVO
dmi.bios.version: N24ET55W (1.30 )
dmi.board.asset.tag: Not Available
dmi.board.name: 20L5CTO1WW
dmi.board.vendor: LENOVO
dmi.board.version: SDK0J40709 WIN
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: None
dmi.ec.firmware.release: 1.20
dmi.modalias: dmi:bvnLENOVO:bvrN24ET55W(1.30):bd01/11/2020:br1.30:efr1.20:svnLENOVO:pn20L5CTO1WW:pvrThinkPadT480:skuLENOVO_MT_20L5_BU_Think_FM_ThinkPadT480:rvnLENOVO:rn20L5CTO1WW:rvrSDK0J40709WIN:cvnLENOVO:ct10:cvrNone:
dmi.product.family: ThinkPad T480
dmi.product.name: 20L5CTO1WW
dmi.product.sku: LENOVO_MT_20L5_BU_Think_FM_ThinkPad T480
dmi.product.version: ThinkPad T480
dmi.sys.vendor: LENOVO

CVE References

Changed in linux (Ubuntu):
importance: Undecided → High
importance: High → Medium
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1950584

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Colin Ian King (colin-king) wrote : AlsaInfo.txt

apport information

tags: added: apport-collected jammy
description: updated
Revision history for this message
Colin Ian King (colin-king) wrote : CRDA.txt

apport information

Revision history for this message
Colin Ian King (colin-king) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Colin Ian King (colin-king) wrote : IwConfig.txt

apport information

Revision history for this message
Colin Ian King (colin-king) wrote : Lspci.txt

apport information

Revision history for this message
Colin Ian King (colin-king) wrote : Lspci-vt.txt

apport information

Revision history for this message
Colin Ian King (colin-king) wrote : Lsusb.txt

apport information

Revision history for this message
Colin Ian King (colin-king) wrote : Lsusb-t.txt

apport information

Revision history for this message
Colin Ian King (colin-king) wrote : Lsusb-v.txt

apport information

Revision history for this message
Colin Ian King (colin-king) wrote : PaInfo.txt

apport information

Revision history for this message
Colin Ian King (colin-king) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Colin Ian King (colin-king) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Colin Ian King (colin-king) wrote : ProcEnviron.txt

apport information

Revision history for this message
Colin Ian King (colin-king) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Colin Ian King (colin-king) wrote : ProcModules.txt

apport information

Revision history for this message
Colin Ian King (colin-king) wrote : PulseList.txt

apport information

Revision history for this message
Colin Ian King (colin-king) wrote : RfKill.txt

apport information

Revision history for this message
Colin Ian King (colin-king) wrote : UdevDb.txt

apport information

Revision history for this message
Colin Ian King (colin-king) wrote : WifiSyslog.txt

apport information

Revision history for this message
Colin Ian King (colin-king) wrote : acpidump.txt

apport information

Stefan Bader (smb)
Changed in linux (Ubuntu):
status: Incomplete → Triaged
Stefan Bader (smb)
Changed in linux (Ubuntu Hirsute):
importance: Undecided → Medium
Changed in linux (Ubuntu Impish):
importance: Undecided → Medium
Philip Cox (philcox)
Changed in linux (Ubuntu):
assignee: nobody → Philip Cox (philcox)
Revision history for this message
Colin Ian King (colin-king) wrote :

Thanks for picking this up, much appreciated! :-)

Philip Cox (philcox)
Changed in linux (Ubuntu):
assignee: Philip Cox (philcox) → nobody
Changed in linux (Ubuntu Hirsute):
assignee: nobody → Philip Cox (philcox)
Changed in linux (Ubuntu Impish):
assignee: nobody → Philip Cox (philcox)
Philip Cox (philcox)
description: updated
Changed in linux (Ubuntu Hirsute):
status: New → In Progress
Changed in linux (Ubuntu Impish):
status: New → In Progress
Stefan Bader (smb)
Changed in linux (Ubuntu Impish):
status: In Progress → Fix Committed
Changed in linux (Ubuntu Hirsute):
status: In Progress → Fix Committed
Revision history for this message
Colin Ian King (colin-king) wrote :

Thanks! :-)

Philip Cox (philcox)
Changed in linux (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux/5.13.0-23.23 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-impish' to 'verification-done-impish'. If the problem still exists, change the tag 'verification-needed-impish' to 'verification-failed-impish'.

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-impish
tags: added: verification-needed-hirsute
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux/5.11.0-42.46 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-hirsute' to 'verification-done-hirsute'. If the problem still exists, change the tag 'verification-needed-hirsute' to 'verification-failed-hirsute'.

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!

Revision history for this message
Stefan Bader (smb) wrote :

@Colin, how about some verification? ;-)

Revision history for this message
Colin Ian King (colin-king) wrote (last edit ):

My old work laptop is kinda old junk now, I installed Fedora on it for some other testing. I'll try and get this tested in the next few days, but I need get Ubuntu onto it first.

Revision history for this message
Colin Ian King (colin-king) wrote :

Verified this on the Impish kernel on my laptop with ~40 minutes of testing. Looks OK to me, no regressions noted.

tags: added: verification-done-impish
removed: verification-needed-impish
Revision history for this message
Kelsey Steele (kelsey-steele) wrote :

Thank you for verifying, Colin! :)

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (32.7 KiB)

This bug was fixed in the package linux - 5.11.0-44.48

---------------
linux (5.11.0-44.48) hirsute; urgency=medium

  * hirsute/linux: 5.11.0-44.48 -proposed tracker (LP: #1954388)

  * Add F81966 watchdog support (LP: #1949063)
    - SAUCE: watchdog: f71808e_wdt: Add F81966 support

linux (5.11.0-42.46) hirsute; urgency=medium

  * hirsute/linux: 5.11.0-42.46 -proposed tracker (LP: #1952278)

  * Packaging resync (LP: #1786013)
    - [Packaging] resync update-dkms-versions helper
    - debian/dkms-versions -- update from kernel-versions (main/2021.11.29)

  * CVE-2021-4002
    - hugetlbfs: flush TLBs correctly after huge_pmd_unshare

  * CVE-2021-43267
    - tipc: fix size validations for the MSG_CRYPTO type

  * Hirsute update: upstream stable patchset 2021-11-24 (LP: #1952136)
    - ext4: check and update i_disksize properly
    - ext4: correct the error path of ext4_write_inline_data_end()
    - ASoC: Intel: sof_sdw: tag SoundWire BEs as non-atomic
    - HID: apple: Fix logical maximum and usage maximum of Magic Keyboard JIS
    - netfilter: ip6_tables: zero-initialize fragment offset
    - HID: wacom: Add new Intuos BT (CTL-4100WL/CTL-6100WL) device IDs
    - ASoC: SOF: loader: release_firmware() on load failure to avoid batching
    - netfilter: nf_nat_masquerade: make async masq_inet6_event handling generic
    - netfilter: nf_nat_masquerade: defer conntrack walk to work queue
    - mac80211: Drop frames from invalid MAC address in ad-hoc mode
    - m68k: Handle arrivals of multiple signals correctly
    - hwmon: (ltc2947) Properly handle errors when looking for the external clock
    - net: prevent user from passing illegal stab size
    - mac80211: check return value of rhashtable_init
    - vboxfs: fix broken legacy mount signature checking
    - net: sun: SUNVNET_COMMON should depend on INET
    - drm/amdgpu: fix gart.bo pin_count leak
    - scsi: ses: Fix unsigned comparison with less than zero
    - scsi: virtio_scsi: Fix spelling mistake "Unsupport" -> "Unsupported"
    - perf/core: fix userpage->time_enabled of inactive events
    - sched: Always inline is_percpu_thread()
    - hwmon: (pmbus/ibm-cffps) max_power_out swap changes
    - ALSA: usb-audio: Unify mixer resume and reset_resume procedure
    - pinctrl: qcom: sc7280: Add PM suspend callbacks
    - io_uring: kill fasync
    - ALSA: usb-audio: Add quirk for VF0770
    - ALSA: pcm: Workaround for a wrong offset in SYNC_PTR compat ioctl
    - ALSA: seq: Fix a potential UAF by wrong private_free call order
    - ALSA: hda/realtek: Enable 4-speaker output for Dell Precision 5560 laptop
    - ALSA: hda - Enable headphone mic on Dell Latitude laptops with ALC3254
    - ALSA: hda/realtek: Complete partial device name to avoid ambiguity
    - ALSA: hda/realtek: Add quirk for Clevo X170KM-G
    - ALSA: hda/realtek - ALC236 headset MIC recording issue
    - ALSA: hda/realtek: Add quirk for TongFang PHxTxX1
    - ALSA: hda/realtek: Fix the mic type detection issue for ASUS G551JW
    - nds32/ftrace: Fix Error: invalid operands (*UND* and *UND* sections) for `^'
    - s390: fix strrchr() implementation
    - clk: socfpga: agilex: fix duplicate s2f_user0_clk
    - csky: don't let si...

Changed in linux (Ubuntu Hirsute):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (39.5 KiB)

This bug was fixed in the package linux - 5.13.0-23.23

---------------
linux (5.13.0-23.23) impish; urgency=medium

  * impish/linux: 5.13.0-23.23 -proposed tracker (LP: #1952263)

  * Packaging resync (LP: #1786013)
    - [Packaging] resync update-dkms-versions helper
    - debian/dkms-versions -- update from kernel-versions (main/2021.11.29)

  * CVE-2021-4002
    - hugetlbfs: flush TLBs correctly after huge_pmd_unshare

  * [SRU][I/OEM-5.13/OEM-5.14] Add MAC passthrough support for more Lenovo docks
    (LP: #1951767)
    - net: usb: r8152: Add MAC passthrough support for more Lenovo Docks

  * Fix non-working e1000e device after resume (LP: #1951861)
    - SAUCE: Revert "e1000e: Additional PHY power saving in S0ix"
    - SAUCE: Revert "e1000e: Add polling mechanism to indicate CSME DPG exit"
    - SAUCE: Revert "e1000e: Add handshake with the CSME to support S0ix"

  * CVE-2021-43267
    - tipc: fix size validations for the MSG_CRYPTO type

  * Impish update: upstream stable patchset 2021-11-22 (LP: #1951880)
    - ext4: check and update i_disksize properly
    - ext4: correct the error path of ext4_write_inline_data_end()
    - ASoC: Intel: sof_sdw: tag SoundWire BEs as non-atomic
    - HID: apple: Fix logical maximum and usage maximum of Magic Keyboard JIS
    - netfilter: ip6_tables: zero-initialize fragment offset
    - HID: wacom: Add new Intuos BT (CTL-4100WL/CTL-6100WL) device IDs
    - ASoC: SOF: loader: release_firmware() on load failure to avoid batching
    - netfilter: nf_nat_masquerade: make async masq_inet6_event handling generic
    - netfilter: nf_nat_masquerade: defer conntrack walk to work queue
    - mac80211: Drop frames from invalid MAC address in ad-hoc mode
    - m68k: Handle arrivals of multiple signals correctly
    - hwmon: (ltc2947) Properly handle errors when looking for the external clock
    - net: prevent user from passing illegal stab size
    - mac80211: check return value of rhashtable_init
    - vboxfs: fix broken legacy mount signature checking
    - net: sun: SUNVNET_COMMON should depend on INET
    - drm/amdgpu: fix gart.bo pin_count leak
    - scsi: ses: Fix unsigned comparison with less than zero
    - scsi: virtio_scsi: Fix spelling mistake "Unsupport" -> "Unsupported"
    - perf/core: fix userpage->time_enabled of inactive events
    - sched: Always inline is_percpu_thread()
    - hwmon: (pmbus/ibm-cffps) max_power_out swap changes
    - ALSA: usb-audio: Unify mixer resume and reset_resume procedure
    - KVM: arm64: nvhe: Fix missing FORCE for hyp-reloc.S build rule
    - pinctrl: qcom: sc7280: Add PM suspend callbacks
    - net: bgmac-platform: handle mac-address deferral
    - scsi: qla2xxx: Fix excessive messages during device logout
    - io_uring: kill fasync
    - upstream stable to v5.10.74, v5.14.13
    - ALSA: usb-audio: Add quirk for VF0770
    - ALSA: pcm: Workaround for a wrong offset in SYNC_PTR compat ioctl
    - ALSA: seq: Fix a potential UAF by wrong private_free call order
    - ALSA: hda/realtek: Enable 4-speaker output for Dell Precision 5560 laptop
    - ALSA: hda - Enable headphone mic on Dell Latitude laptops with ALC3254
    - ALSA: hda/realtek: Complete partial device nam...

Changed in linux (Ubuntu Impish):
status: Fix Committed → Fix Released
Timo Aaltonen (tjaalton)
tags: added: verification-done
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-intel-5.13/5.13.0-1009.9 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-focal' to 'verification-done-focal'. If the problem still exists, change the tag 'verification-needed-focal' to 'verification-failed-focal'.

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-focal
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.