You are not logged in.

#1 2016-05-05 23:31:17

Aquignis
Member
Registered: 2016-05-05
Posts: 8

Bad CPU frequency scaling on Thinkpad T540p - Heat problems

Hello everyone,

I have been trying to get Arch Linux running correctly on my T540p without success so far.
The issue is that the CPU keeps on overheating and then throttles itself. It is an Intel i7-4710MQ model. I also have a NVIDIA GT730M in the laptop.
I haven't met this issue on Windows during the few months I've had the computer.

I've spent a lot of time on this and worked with other people too, here's what came up: the CPU is constantly running at maximum clock speed, which generates more heat and thus triggers throttling. It also makes it use a lot more power, which drastically reduces battery life (from 6 to 2 hours).

SpeedStep is properly set in the BIOS, and the BIOS itself is up to date.
I have tried different Linux distributions (Debian, Ubuntu LTS, Arch Linux). I've set up thermald, enabled the microcode updates, used intel_pstate, read the whole Archwiki page and basically tried all of it. Even using more "manual" modes such as acpi-cpufreq with "ondemand" doesn't help.
The only thing that helped was manually setting the frequency to a low value, which increased the autonomy at the cost of performance.

I would appreciate any help.
Thanks for reading !

(cross-posted from Lenovo's forum)

Last edited by Aquignis (2016-05-11 13:45:59)

Offline

#2 2016-05-06 01:22:04

Arup
Member
From: Earth
Registered: 2014-02-20
Posts: 95

Re: Bad CPU frequency scaling on Thinkpad T540p - Heat problems

This issue has been affecting all Haswell due to config_MHz set to 300 in Arch kernel, Ubuntu and Debian uses 250 and so does SUSE and therefore you don't have this issue. The new kernel 4.6 supposedly has a fix for this and I wait for that as well. My Haswell is always at max in Arch whereas it scales down in Ubuntu. Have you installed TLP btw?

Last edited by Arup (2016-05-06 01:24:47)

Offline

#3 2016-05-06 01:46:02

Arup
Member
From: Earth
Registered: 2014-02-20
Posts: 95

Re: Bad CPU frequency scaling on Thinkpad T540p - Heat problems

Your heat issue has nothing to do with CPU, its your nvidia card thats running full time. In Arch you can turn it off by using Bumblebee https://wiki.archlinux.org/index.php/NVIDIA_Optimus take a look here. In Ubuntu you can install nvidia driver and then shut it off using nvidia-prime in Ubuntu.

Offline

#4 2016-05-06 13:16:38

Aquignis
Member
Registered: 2016-05-05
Posts: 8

Re: Bad CPU frequency scaling on Thinkpad T540p - Heat problems

I firstly thought that the main problem was with the NVIDIA card, but when I manually set the CPU frequency to 800 MHz, temperatures drop to around 40 °C instead of the 80 °C to 90 °C that I usually get with the CPU staying between 2.4 GHz and 3.5 GHz (when doing nothing on the laptop). It also increased the battery life a lot.
Besides, GPU temperature is always around 40 °C. Can 40 °C on the GPU cause the heat problems I encounter with the CPU ?

I installed TLP by following https://wiki.archlinux.org/index.php/TLP. I have not done any configuration yet (as it is not always needed). The frequency and temperature problems remain.

I tried to install Bumblebee with https://wiki.archlinux.org/index.php/Bu … stallation, but when I arrived at the "Usage" section, the optirun commands returned the following error:

$ optirun glxgears -info
[ERROR]Cannot access secondary GPU - error: [XORG] (EE) Failed to load module "nouveau" (module does not exist, 0)

[ERROR]Aborting because fallback start is disabled.

It may be due to the fact that I have no Xorg configuration file in /etc/X11/ or /etc/X11/xorg.conf.d (except for the keyboard). The problem is that the wiki clearly explains that automatic configuration is not possible with the last version of Xorg-server. Build that file manually is a little bit complicated, isn't it ?

Last edited by Aquignis (2016-05-06 13:24:01)

Offline

#5 2016-05-06 13:52:54

Arup
Member
From: Earth
Registered: 2014-02-20
Posts: 95

Re: Bad CPU frequency scaling on Thinkpad T540p - Heat problems

Try disabling intel pstate in grub as that will switch it on to the classic CPU frequency driver. This will keep your CPU frequency down at idle.

Offline

#6 2016-05-06 15:01:52

Aquignis
Member
Registered: 2016-05-05
Posts: 8

Re: Bad CPU frequency scaling on Thinkpad T540p - Heat problems

It helped to decrease temperatures to 60-65 °C and the frequency is now around 1.9 GHz when the laptop is idling. Battery life has increased to 04 hours when the laptop is fully charged. Maybe the always-on graphic card is the remaining problem ?

I edited /etc/bumblebee/bumblebee.conf to force

Driver=nvidia

which was previously to

Driver=

and uncommented the line

BusID "PCI:01:00:0"

in /etc/bumblebee/xorg.conf.nvidia.
But I still have en error:

$ optirun glxgears
[ERROR]Cannot access secondary GPU - error: Could not load GPU driver

[ERROR]Aborting because fallback start is disabled

and cannot launch nvidia-settings as it is still asking me for Xorg configuration file. modprobe returns:

$ modprobe nvidia
modprobe: ERROR: could not insert 'nvidia': No such device

Last edited by Aquignis (2016-05-06 15:11:15)

Offline

#7 2016-05-06 15:57:20

Arup
Member
From: Earth
Registered: 2014-02-20
Posts: 95

Re: Bad CPU frequency scaling on Thinkpad T540p - Heat problems

Remove Bumblebee and use Nvidia driver to shut down the card via nvidia-settings. I have Arch on my ASUS X53C that has a nvidia card and I get same battery life as Windows and same temps.

Offline

#8 2016-05-07 11:49:56

Aquignis
Member
Registered: 2016-05-05
Posts: 8

Re: Bad CPU frequency scaling on Thinkpad T540p - Heat problems

I succeeded to have a proper installation of the NVIDIA driver (or, at least, I think so...). But what option of nvidia-settings allows to disable the card ? I took a look in every menu of it and did not see any clear option that allows to turn off the card.

Offline

#9 2016-05-07 13:54:31

Arup
Member
From: Earth
Registered: 2014-02-20
Posts: 95

Re: Bad CPU frequency scaling on Thinkpad T540p - Heat problems

Please follow the wiki, the nvidia-prime is developed by Canonical.

Offline

#10 2016-05-07 18:32:06

Aquignis
Member
Registered: 2016-05-05
Posts: 8

Re: Bad CPU frequency scaling on Thinkpad T540p - Heat problems

I've successfully disabled the card with Bumblebee and bbswitch. I had to use a "hack" to avoid a problem directly linked to ThinkPad laptops when using bbswitch (see this): setting acpi_osi=Linux using GRUB configuration.

The power consumption is at 20 W when idling instead of 25 - 30 W with the NVIDIA card activated by a "optirun glxgears".

The problem is that my CPU temperature is still around 60 °C, even with this new setting and intel_pstate disabled. This is not a normal behaviour. Battery life is around 04 h 15 min, but it should definitely be more when doing nothing on the computer...

Last edited by Aquignis (2016-05-07 22:53:37)

Offline

#11 2016-05-08 02:32:20

Arup
Member
From: Earth
Registered: 2014-02-20
Posts: 95

Re: Bad CPU frequency scaling on Thinkpad T540p - Heat problems

Aquignis wrote:

I've successfully disabled the card with Bumblebee and bbswitch. I had to use a "hack" to avoid a problem directly linked to ThinkPad laptops when using bbswitch (see this): setting acpi_osi=Linux using GRUB configuration.

The power consumption is at 20 W when idling instead of 25 - 30 W with the NVIDIA card activated by a "optirun glxgears".

The problem is that my CPU temperature is still around 60 °C, even with this new setting and intel_pstate disabled. This is not a normal behaviour. Battery life is around 04 h 15 min, but it should definitely be more when doing nothing on the computer...


If your GPU is turned off then there are background processes that are preventing your CPU from going to sleep. Can you check with i7z and post the results here? Also have you checked for any rogue processes?

Offline

#12 2016-05-08 22:43:16

Aquignis
Member
Registered: 2016-05-05
Posts: 8

Re: Bad CPU frequency scaling on Thinkpad T540p - Heat problems

I'm almost sure that the GPU is turned off:

$ cat /proc/acpi/bbswitch 
0000:01:00.0 OFF
$ lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
01:00.0 VGA compatible controller: NVIDIA Corporation GK208M [GeForce GT 730M] (rev ff)

Here are the resultats when running the i7z command: first part and second part. A single session of my web browser and one terminal were opened.

I've runned top and pc aux and thus have seen that only one process where consuming 65 % of the CPU power: "[kworker/0:2]"

$ ps aux | grep kworker/0:2
root       199 65.5  0.0      0     0 ?        R    mai08  28:35 [kworker/0:2]

The rest is at very close to 0 %, except the web browser which is at 7 %.

Offline

#13 2016-05-09 00:45:59

Arup
Member
From: Earth
Registered: 2014-02-20
Posts: 95

Re: Bad CPU frequency scaling on Thinkpad T540p - Heat problems

Can you run Ubuntu or any other distro like Open SUSE to see if this issue persists. Out of my two ThinkPad x220, one had a dried out thermal paste and heated considerably more than the other. Both run Arch so don't rule out hardware issue but your laptop is fairly new so this shouldn't be the issue.

Offline

#14 2016-05-13 09:21:53

Aquignis
Member
Registered: 2016-05-05
Posts: 8

Re: Bad CPU frequency scaling on Thinkpad T540p - Heat problems

I installed Ubuntu 16.04 and the problems remain (I did not turn off the NVIDIA card and did not disable intel_pstate): CPU frequency at 2.5 GHz when idling, temperatures around 80 °C. Do you want me to disable intel_pstate and turn off the card again ?

Last edited by Aquignis (2016-05-13 09:23:15)

Offline

#15 2016-05-13 17:03:36

Arup
Member
From: Earth
Registered: 2014-02-20
Posts: 95

Re: Bad CPU frequency scaling on Thinkpad T540p - Heat problems

Aquignis wrote:

I installed Ubuntu 16.04 and the problems remain (I did not turn off the NVIDIA card and did not disable intel_pstate): CPU frequency at 2.5 GHz when idling, temperatures around 80 °C. Do you want me to disable intel_pstate and turn off the card again ?


CPU scaling is working in Ubuntu 16.04 and SUSE Tumbleweed with intel_pstate in both cases cores on my i7 Haswell scale up and down as per load and idle. Also in Ubuntu install the nvidia drivers via the hardware drivers applet and then turn off nvidia in nvidia-settings and monitor temp.

Last edited by Arup (2016-05-13 17:04:35)

Offline

#16 2016-05-14 08:32:46

Arup
Member
From: Earth
Registered: 2014-02-20
Posts: 95

Re: Bad CPU frequency scaling on Thinkpad T540p - Heat problems

Also try out Arch LTS kernel thats set with Config Hz=100 that should help with your CPU scaling issues.

Offline

#17 2016-05-14 17:21:57

Aquignis
Member
Registered: 2016-05-05
Posts: 8

Re: Bad CPU frequency scaling on Thinkpad T540p - Heat problems

Turning off the NVIDIA card under Ubuntu does not seem to change anything. Are you sure that CPU scaling is working in this distribution ? The frequencies that I observe are not normal (in fact not better than under Arch when intel_pstate is not disabled)...

Last edited by Aquignis (2016-05-14 17:23:36)

Offline

#18 2016-05-14 18:21:41

Arup
Member
From: Earth
Registered: 2014-02-20
Posts: 95

Re: Bad CPU frequency scaling on Thinkpad T540p - Heat problems

The frequency scales down under Ubuntu with my i7 Haswell and Skylake, but in Arch they both stay at full speed. However temps are maintained as in Arch the CPUs spend more time under C7 state. However there still is a difference of three degrees at idle between Ubuntu and Arch.

Offline

Board footer

Powered by FluxBB