6

I just installed Ubuntu on my Lenovo y50 laptop and have a turbo boost issue.

I'm trying to install a program called Gromacs with cmake.

But whenever I try to install it, the CPU ramps up to full turbo with all 4 cores. This makes my CPU go up to 100°C according to i7z- This never happens in Windows, usually it is locked at 2.4 Ghz when 4 cores are active. Is there any way to underclock my CPU?

8
  • Are you unable to use the version in the Ubuntu repositories? sudo apt-get install gromacs Welcome to askubuntu!
    – chili555
    Feb 20, 2015 at 2:15
  • which cpu frequency driver are you using? Post the output for "cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_driver" the answer depends on which driver. Feb 20, 2015 at 2:18
  • 1
    Try install indicator-cpufreq and change your clock speed/scaling driver from there.
    – user371765
    Feb 20, 2015 at 2:53
  • 1
    @ethanbmnz I installed it but if I understand this right it seams my CPU only supports two governor settings: Powersave and Performance,I was hoping for something more flexible where I can fine tune it. In windows, I run my computer with a dynamic voltage offset of -70 mV and can safely run single core at 3.1 Ghz and 4 cores at 2.7 Ghz. Is there any way to do that in Ubuntu?
    – Karan
    Feb 20, 2015 at 3:26
  • 1
    Just a question: is the laptop misbehaving? Maybe it's just ok. Compiling is a big CPU intensive task; just wait for it to finish. Another option is installing TLP: linrunner.de/en/tlp/docs/…
    – Rmano
    Feb 20, 2015 at 8:44

2 Answers 2

7

When the cpu frequency driver is intel_pstate, then turbo can be disabled with this command:

echo "1" | sudo tee /sys/devices/system/cpu/intel_pstate/no_turbo

Disabling turbo will limit the maximum CPU clock frequency to the non turbo number. For example, and for my computer that means 3.4 GHz verses the turbo enabled max of 3.8 GHz.

To check if your system is using the intel_pstate driver use this command:

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_driver

If you find you want to turn down the maximum clock frequency some more try, for example, this command:

echo "90" | sudo tee /sys/devices/system/cpu/intel_pstate/max_perf_pct

Meaning, set the maximum CPU clock frequency that can be used to 90 percent of the default maximum. Note that the exact percentage reduction will either be rounded or truncated to a nearby pstate (an integer 100 Mhz multiplier).

Normally the driver should run in powersave mode, which is not the same as powersave mode for the acpi cpufreq driver. It is actually more similar to ondemand mode. Check via:

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

and change via a script such as this, run as sudo:

#! /bin/bash
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
for file in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do echo "powersave" > $file; done
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
7
  • Thank you! The first code worked great for disabling turbo boost! The second line you wrote, what do you mean by turn the frequency down some more? Is it set at some value corresponding to "90"? If i run the second line, how would I then reverse it if I wanted a higher frequency at some point?
    – Karan
    Feb 21, 2015 at 12:19
  • Disabling turbo will limit the maximum CPU clock frequency to the non turbo number. For my processor that means 3.4 Giga Hertz verses the turbo enabled max of 3.8 Giga Hertz. By turn down more, I meant less than 3.4 Giga Hertz. Setting it to 90 percent would mean the pstate integer value nearest to 0.9 X 34, or 31 or 3.1 Giga Hertz (Note: I'm not sure if it rounds or truncates). To restore just put 100 back in that location and turn turbo on again by putting 0 back into the previously mentioned location. I'll edit my answer with this content shortly. Feb 21, 2015 at 15:17
  • Ooh I see now! it was a percentage!! Thanks to your second line I managed to work around disabling the turbo boost by bringing the max frequency to a lower percentage. Thank you so much!!
    – Karan
    Feb 21, 2015 at 20:19
  • I noticed these settings are reseted every time i start the computer! Is there any way to make it default, I find that if I dont turn down the CPU manually at every start, the computer will just shut down if I open something like Matlab.
    – Karan
    Feb 26, 2015 at 0:19
  • No. You would have to make a script and get it to run at startup. I didn't look, but there must be answers for how to do that herein. It sounds as though your laptop is overheating. Have you ever cleaned the fans and cooling fins in your laptop? Feb 26, 2015 at 3:33
1

Okey, so I have found the optimal solution for my problem. On the Lenovo y50 there seams to be some kind of thermal problem on Ubuntu 14.10.

I can only speculate but I believe this is due to having both the Nvidia card and intelHD running at the same time causing overheating.

You can disable the eGPU by going into the Y50 bios. I find this will improve the battery life a bit. But it sucks to have to turn off hardware you have already paid for.

By installing TLP I managed to run my laptop at 3 Ghz with temps below 75 deg C!

See this link:

http://www.webupd8.org/2013/04/improve-power-usage-battery-life-in.html

The parts i found relevant for Y50 where:

sudo add-apt-repository ppa:linrunner/tlp

sudo apt-get update

sudo apt-get install tlp tlp-rdw

sudo apt-get install gksu

Then

gksudo gedit /etc/default/tlp

Then in the text file I just removed the hash tags and set these values on the following lines:

CPU_MIN_PERF_ON_AC=0

CPU_MAX_PERF_ON_AC=90

CPU_MIN_PERF_ON_BAT=0

CPU_MAX_PERF_ON_BAT=90

CPU_BOOST_ON_AC=1

CPU_BOOST_ON_BAT=1

And put hash tags on all the lines with Radeon settings since my card is Nvidia.

The computer runs much cooler and you don't need to manually set anything on start up.

Every time after you edit something in that text file, use this command to apply those changes instead of rebooting.

sudo tlp start

Another possible profile would be

CPU_MIN_PERF_ON_AC=90

CPU_MAX_PERF_ON_AC=90

CPU_MIN_PERF_ON_BAT=90

CPU_MAX_PERF_ON_BAT=90

Locking the CPU at a pretty good freq. These values are in percentages.

If you are okey with the CPU going up to 90 deg C you can also try this profile

CPU_MIN_PERF_ON_AC=90

CPU_MAX_PERF_ON_AC=100

CPU_MIN_PERF_ON_BAT=90

CPU_MAX_PERF_ON_BAT=100

You can also try this option

Minimize number of used CPU cores/hyper-threads under light load conditions

SCHED_POWERSAVE_ON_AC=1

SCHED_POWERSAVE_ON_BAT=1

Good luck!

3
  • You don't really gain anything by locking the CPU at 90 percent, as the response time of the driver to load change is pretty good anyhow and the processor itself can backoff the frequency under very very light loads. I still think thermald is your better option, because it only limits CPU frequency when it has to due to high temperature. Feb 27, 2015 at 22:41
  • Could you elaborate what you meant with the response time of the driver to load change making the CPU lock pointless? I tried using thermald, but just running thermald, my computer dies everytime i open Matlab. I checked the CPU temp with i7z and got very high CPU temps right before shut down.
    – Karan
    Feb 28, 2015 at 0:06
  • Thermald: O.K. point taken. I have heard of others having troubles with it also. In theory, it should be the way to go, but in practice it seems to be a different story. Setting min=max: Typically, the driver will get to max fast enough under heavy load that it shouldn't matter. Now, some programs (ffmpeg, for example) do multithreading in an odd way, and so it does make a difference in that case. Feb 28, 2015 at 0:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .