Bug 1854502

Summary: Noticeably Increased CPU temperature
Product: [Fedora] Fedora Reporter: aria.aghazade
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 32CC: acaringi, airlied, bskeggs, hdegoede, ichavero, itamar, jarodwilson, jeremy, jglisse, john.j5live, jonathan, josef, kernel-maint, lgoncalv, linville, masami256, mchehab, mjg59, steved
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-15 10:37:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Requested stats screenshots, kernel-5.6 and kernel-5.7
none
Requested stats screenshots, kernel-5.6 and kernel-5.7 On Battery
none
powertop idle states and tunables none

Description aria.aghazade 2020-07-07 15:23:38 UTC
First things first, I'm running Fedora 32 with latest packages on intel 6700hq.
With latest kernel-5.7, cpu temperatures are noticeably higher.
Using kernel-5.6 my idle cpu temperature is around 35-40°C, but with kernel-5.7 its around 50-55. Htop and KDE System Monitor don't show anything using cpu and idle cpu usage on both kernels is 0-2%.

I first noticed this issue on kernel-5.7.6-201.fc32.x86_64, and it is also there with kernel-5.7.7-200.fc32.x86_64.

Booting with kernel-5.6.19-300.fc32.x86_64 fixes the issue.


Are you running any modules that not shipped with directly Fedora's kernel? No.

Comment 1 Hans de Goede 2020-07-09 12:19:10 UTC
OK, lets try to figure out what is going on here, please do:

sudo dnf install kernel-tools powertop
 
And then on battery when idle, take a maximized
terminal and run:

sudo powertop

Then let is sit for say 2 minutes for things to stabilize and then take a screenshot. Then switch to the idle-stats tab with the tab key, take another screenshot, followed
by switching to the frequency stats tab and take another screenshot.

Exit powertop and run:

sudo turbostat

Let it sit for say 30 seconds for things to stabilize and then take a screenshot.



Do all of this both with the cool runnning kernel and with the new hot running kernel, clearly label the screenshots to make it clear which one is which one, put them all in a tarbal and attach them here.

Then we will see from there. One more question, does your laptop have a discrete GPU next to the Intel GPU embedded in the CPU? E.g. a nvidia GPU?

Comment 2 aria.aghazade 2020-07-09 22:34:34 UTC
Created attachment 1700496 [details]
Requested stats screenshots, kernel-5.6 and kernel-5.7

Comment 3 aria.aghazade 2020-07-09 22:55:02 UTC
Created attachment 1700497 [details]
Requested stats screenshots, kernel-5.6 and kernel-5.7 On Battery

Comment 4 aria.aghazade 2020-07-09 23:05:33 UTC
(In reply to Hans de Goede from comment #1)
> 
> ... on battery when idle ...
> 
> 
> does your laptop have a discrete GPU next to the Intel GPU embedded in the CPU? E.g. a nvidia GPU?

I attached stats running on battery and AC (I know some values are wrong on AC, but I posted just in case)

Yes my laptop has Nvidia 960m, I'm using Nvidia's proprietary driver from here: https://copr.fedorainfracloud.org/coprs/chenxiaolong/bumblebee/

On both kernels running "cat /proc/acpi/bbswitch" returns "0000:01:00.0 OFF"

Comment 5 Hans de Goede 2020-07-10 08:20:20 UTC
Thank you, it seems that your total system is using twice the amount of power (16W vs 8W) with 5.7 that indeed is not good.

Can you also run the following command on both kernels and let me know the output on both kernels? :

cat /sys/bus/cpu/devices/cpu0/cpufreq/scaling_governor /sys/bus/cpu/devices/cpu0/cpufreq/energy_performance_preference /sys/devices/system/cpu/intel_pstate/status

Comment 6 Hans de Goede 2020-07-10 08:25:50 UTC
Unrelated to this, powertop shows that even with the 5.6 kernel your CPU package never reaches PC-states higher then 3, we really want to see PC-8 or higher here.

In powertop in the "Tunables" tab, can you see if there are any "Bad" USB devices which powertop thinks need to be tuned and then hit enter on them to Tune them (all USB devices listed), then go back to the "Idle stats" tab, wait 1 minute and see of you hit PC8 or higher after this?   This should help you save some power / run cooler even on 5.6.

Comment 7 aria.aghazade 2020-07-10 10:19:02 UTC
Created attachment 1700563 [details]
powertop idle states and tunables

(In reply to Hans de Goede from comment #5)
> Thank you,
> Can you also run the following command on both kernels and let me know the
> output on both kernels? :
> 
> cat /sys/bus/cpu/devices/cpu0/cpufreq/scaling_governor
> /sys/bus/cpu/devices/cpu0/cpufreq/energy_performance_preference
> /sys/devices/system/cpu/intel_pstate/status
No problem!
On both kernels results are same. (I use tlp to automatically change energy performance preference)
on AC:      powersave balance_performance active
on Battery: powersave balance_power       active


(In reply to Hans de Goede from comment #6)
> Unrelated to this, powertop shows that even with the 5.6 kernel your CPU
> package never reaches PC-states higher then 3, we really want to see PC-8 or
> higher here.
> 
> In powertop in the "Tunables" tab, can you see if there are any "Bad" USB
> devices which powertop thinks need to be tuned and then hit enter on them to
> Tune them (all USB devices listed), then go back to the "Idle stats" tab,
> wait 1 minute and see of you hit PC8 or higher after this?   This should
> help you save some power / run cooler even on 5.6.

I removed every USB device, there is no "bad" USB in powertop, but my laptop still doesn't reach PC-state higher than 3, interesting. 
I don't know if its related or not but I also use this script to undervolt cpu:
https://github.com/georgewhewell/undervolt

Comment 8 aria.aghazade 2020-07-15 09:56:19 UTC
It seems like this issue is fixed with kernel-5.7.8
Powertop now reports around 8W and cpu is running cooler

Comment 9 Hans de Goede 2020-07-15 10:37:10 UTC
(In reply to aria.aghazade from comment #8)
> It seems like this issue is fixed with kernel-5.7.8
> Powertop now reports around 8W and cpu is running cooler

Ok, thank you for letting us know.

Lets close this bug then.