sysvinit: default cpufreq governor to powersave for intel-pstate driver

Bug #1314653 reported by Colin Ian King on 2014-04-30
50
This bug affects 4 people
Affects Status Importance Assigned to Milestone
sysvinit (Ubuntu)
High
Tim Gardner
Trusty
High
Stefan Bader
Utopic
High
Tim Gardner

Bug Description

When defaulting to the intel-pstate driver, there are only a couple of cpufreq governors available, none of which are handled in the /etc/init.d/ondemand script.

Since this driver is meant to be used for power saving, it seems wrong to leave the system in the kernel default configured "performance" governor after boot, so I think it is pertinent to set this to "powersave" if it is the only suitable non-power hungry governor available.

How to reproduce:

1. enable the intel_pstate driver on a recent Intel machine (Sandybridge or above)

edit /etc/default/grub, modify the following:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_pstate=enable"

and run:

sudo update-grub

and reboot.

2. login

3. wait at least 60 seconds for /etc/init.d/ondemand to complete

check out the default cpufreq governor, you will see it is still set to the boot default of "performance":

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

With the attached fix the system will boot into a less aggressive cpufreq governor.

Colin Ian King (colin-king) wrote :
Changed in sysvinit (Ubuntu):
importance: Undecided → High
Tim Gardner (timg-tpi) on 2014-04-30
Changed in sysvinit (Ubuntu Utopic):
assignee: nobody → Tim Gardner (timg-tpi)
status: New → In Progress

The attachment "95_ondemand_pstate.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Tim Gardner (timg-tpi) on 2014-04-30
Changed in sysvinit (Ubuntu Trusty):
assignee: nobody → Tim Gardner (timg-tpi)
status: New → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sysvinit - 2.88dsf-41ubuntu10

---------------
sysvinit (2.88dsf-41ubuntu10) utopic; urgency=medium

  * invoke-rc.d: Don't fail on masked services. (LP: #1312975)
 -- Martin Pitt <email address hidden> Mon, 12 May 2014 11:20:50 +0200

Changed in sysvinit (Ubuntu Utopic):
status: In Progress → Fix Released
Tim Gardner (timg-tpi) wrote :

Not gonna do this for Trusty

Changed in sysvinit (Ubuntu Trusty):
status: In Progress → Won't Fix
Doug Smythies (dsmythies) wrote :

Why are you not going to do this for Trusty? Many of us (well, O.K. me) have been forcing the use of the intel_pstate driver in 14.04 and 14.04.1. Now it is my understanding that the intel_pstate driver will be enabled by default in 14.04.2.

Doug McMahon (mc3man) wrote :

Intended or not the current lts-utopic kernel has intel_pstate enabled so the ondemand script should reflect that.

Doug McMahon (mc3man) on 2015-02-15
tags: added: 14.04.2 hwe
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1314653

tags: added: iso-testing
Doug Smythies (dsmythies) wrote :

I changed this from "won't fix" and set the importance to high. Why because it has to be fixed and should actually be critical.

Changed in sysvinit (Ubuntu Trusty):
status: Won't Fix → Confirmed
importance: Undecided → High
Doug McMahon (mc3man) on 2015-02-27
Changed in sysvinit (Ubuntu Trusty):
assignee: Tim Gardner (timg-tpi) → nobody
Doug McMahon (mc3man) wrote :

So now that no one is assigned to look at/fix how about getting someone who is free/active/concerned to do so?

Stefan Bader (smb) on 2015-03-13
Changed in sysvinit (Ubuntu Trusty):
assignee: nobody → Stefan Bader (smb)
Stefan Bader (smb) wrote :

Not sure why this was initially rejected. It sounds reasonable to have it now as there are (and will be HWE kernels with the intel_pstate drive).

SRU justification:

Impact: When using HWE kernels in Trusty one can be using the intel_pstate driver which will result in no other power saving governor than powersave available. Given the choices (or lack of them) it is better for power usage to fall back to that instead of keeping the performance governor active.

Fix: Apply the same change we have for Utopic and add the powersave governor as the last option to check and activate.

Testcase: See reproducer in description.

Hello Colin, or anyone else affected,

Accepted sysvinit into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/sysvinit/2.88dsf-41ubuntu6.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in sysvinit (Ubuntu Trusty):
status: Confirmed → Fix Committed
tags: added: verification-needed
Doug McMahon (mc3man) wrote :

Working as expected with initscripts (2.88dsf-41ubuntu6.1

tags: added: verification-done
removed: verification-needed
tags: added: trusty
removed: 14.04.2 hwe
Norbert-notz (norbert-notz) wrote :

Hi,

I just have installed Ubuntu 14.04.2 LTS on my HP laptop with Intel CORE i7 processor. CPU fan has been running at full speed most of the time. I found out that performance governor was set (by default) and CPU clock was always very high.

I fixed by editing /etc/default/cpufrequtils
ENABLE=true # default
GOVERNOR=powersave

No I have "powersave" mode after booting by default and quite CPU fan. Clock is now ~1.2 GHz when idling while it is automatically increased on higher load.

I just wanted to file a bug suggesting to set the governor to "powersave" by default and found this on.

According to the state of this bug report this should already be fixed. Is there a regression in Ubuntu 14.04.x Trusty Tahr?

It's "fix commited", not "fix released" for 14.04. At the moment the new
sysvinit packages are still in trusty -proposed (2.88dsf-41ubuntu6.1

On 03/17/2015 06:41 PM, Norbert-notz wrote:
> Hi,
>
> I just have installed Ubuntu 14.04.2 LTS on my HP laptop with Intel CORE
> i7 processor. CPU fan has been running at full speed most of the time. I
> found out that performance governor was set (by default) and CPU clock
> was always very high.
>
> I fixed by editing /etc/default/cpufrequtils
> ENABLE=true # default
> GOVERNOR=powersave
>
>
> No I have "powersave" mode after booting by default and quite CPU fan. Clock is now ~1.2 GHz when idling while it is automatically increased on higher load.
>
> I just wanted to file a bug suggesting to set the governor to
> "powersave" by default and found this on.
>
> According to the state of this bug report this should already be fixed.
> Is there a regression in Ubuntu 14.04.x Trusty Tahr?
>

Philipp Kern (pkern) wrote :

Package in -proposed looks good to me.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sysvinit - 2.88dsf-41ubuntu6.1

---------------
sysvinit (2.88dsf-41ubuntu6.1) trusty; urgency=low

  [Colin King]
  * debian/src/initscripts/etc/init.d/ondemand: Add powersave as a final
    resort powersaving governor. If intel_pstate is enabled (which is
    possible on the utopic-hwe kernel) this is the only one available
    (LP: #1314653)
 -- Stefan Bader <email address hidden> Fri, 13 Mar 2015 16:02:15 +0100

Changed in sysvinit (Ubuntu Trusty):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for sysvinit has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers