Page 1 of 4 123 ... LastLast
Results 1 to 10 of 35

Thread: 14.04.2 & intel_pstate.

  1. #1
    Join Date
    Jun 2007
    Beans
    16,485

    14.04.2 & intel_pstate.

    The utopic lts kernel seems to use intel_pstate here by default. Unlike 15.04 though it appears to always be set to 'performance' & never goes to 'powersave'
    Code:
    cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
    performance
    performance
    performance
    performance
    performance
    performance
    performance
    performance
    
    cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq
    2400000
    2400187
    2400093
    2394468
    2397281
    2400000
    2400093
    2401125
    i7z reports basically the same..

    Edit: what /etc/init.d/ondemand should be

    Code:
    #! /bin/sh
    ### BEGIN INIT INFO
    # Provides:          ondemand
    # Required-Start:    $remote_fs $all
    # Required-Stop:
    # Default-Start:     2 3 4 5
    # Default-Stop:
    # Short-Description: Set the CPU Frequency Scaling governor to "ondemand"
    ### END INIT INFO
    
    # Don't run if we're going to start an Android LXC container:
    [ ! -f /etc/init/lxc-android-config.conf ] || exit 0
    
    PATH=/sbin:/usr/sbin:/bin:/usr/bin
    
    . /lib/init/vars.sh
    . /lib/lsb/init-functions
    
    AVAILABLE="/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors"
    
    case "$1" in
        start)
        	start-stop-daemon --start --background --exec /etc/init.d/ondemand -- background
            ;;
        background)
    	sleep 60 # probably enough time for desktop login
    
    	[ -f $AVAILABLE ] || exit 0
    	read governors < $AVAILABLE
    	case $governors in
    		*interactive*)
    			GOVERNOR="interactive"
    			break
    			;;
    		*ondemand*)
    			GOVERNOR="ondemand"
    			break
    			;;
    		*powersave*)
    			GOVERNOR="powersave"
    			break
    			;;
    		*)
    			exit 0
    			;;
    	esac
    
    	for CPUFREQ in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
    	do
    		[ -f $CPUFREQ ] || continue
    		echo -n $GOVERNOR > $CPUFREQ
    	done
    	;;
        restart|reload|force-reload)
            echo "Error: argument '$1' not supported" >&2
            exit 3
            ;;
        stop)
            ;;
        *)
            echo "Usage: $0 start|stop" >&2
            exit 3
            ;;
    esac
    Last edited by mc4man; June 7th, 2015 at 03:08 PM. Reason: copy of proper /etc/init.d/ondemand

  2. #2
    Join Date
    Mar 2006
    Location
    Williams Lake
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: 14.04.2 & intel_pstate

    I running an Intel Atom N270 on my netbook, it is set to ondemand, and varying frequencies:

    Code:
    Linux redstone 3.18.0-13-generic #14-Ubuntu SMP Fri Feb 6 09:56:10 UTC 2015 i686 i686 i686 GNU/Linux
    Code:
    cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
    ondemand
    ondemand
    Code:
    cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq
    800000
    1600000

  3. #3
    Join Date
    Feb 2011
    Location
    Coquitlam, B.C. Canada
    Beans
    2,481
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: 14.04.2 & intel_pstate

    cariboo907: your output doesn't look right for the intel_pstate driver. The numbers are too perfect. The acpi cpufreq driver lists the desired frequecy (target pstate, actually) whereas the intel_pstate driver lists actual frequency, albeit and average over the last sample window. You can check via:
    Code:
    doug@s15:~/temp$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_driver
    intel_pstate
    intel_pstate
    intel_pstate
    intel_pstate
    intel_pstate
    intel_pstate
    intel_pstate
    intel_pstate
    Additionally, I don't think the Atom N270 is supported by the intel_pstate driver, and therefore the driver would fall to acpi cpufreq.

    Edit: The more glaring indicator is that the intel_pstate driver doesn't have "ondemand" mode.

    mcm4man: It should switch after about a minute to powersave mode. I do not have a test setup for this scenario to try myself. Is there still a file /etc/init.d/ondemand? That is where the switch is done, at least it was. That file was fixed sometime ago to deal with the case where there is no "ondemand" mode.

    Edit 2: I usually get iso images from the testing tracker, but the 14.04.2 http link get a 404 response just now. I'll try again later. I was thinking to make a VM and poke around.
    Last edited by Doug S; February 14th, 2015 at 07:00 AM. Reason: added stuff
    Any follow-up information on your issue would be appreciated. Please have the courtesy to report back.

  4. #4
    Join Date
    Jun 2007
    Beans
    16,485

    Re: 14.04.2 & intel_pstate

    Quote Originally Posted by Doug S View Post

    mcm4man: It should switch after about a minute to powersave mode. I do not have a test setup for this scenario to try myself. Is there still a file /etc/init.d/ondemand? That is where the switch is done, at least it was. That file was fixed sometime ago to deal with the case where there is no "ondemand" mode.

    Edit 2: I usually get iso images from the testing tracker, but the 14.04.2 http link get a 404 response just now. I'll try again later. I was thinking to make a VM and poke around.
    The lts kernel is available in proposed, as far as images they seemed to have stopped at around Feb. 3

    So currently in both cases the ondemand script is wrong for pstate as no mention of 'powersave'
    Adding this then gets powersave after the min.
    Code:
    --- /etc/init.d/ondemand	2014-03-12 21:33:14.000000000 -0400
    +++ /etc/init.d/ondemand	2014-11-10 11:22:37.000000000 -0500
    @@ -36,6 +36,10 @@
     			GOVERNOR="ondemand"
     			break
     			;;
    +		*powersave*)
    +			GOVERNOR="powersave"
    +			break
    +			;;
     		*)
     			exit 0
     			;;
    Maybe 14.04.2 gets a new ondemand script?, though don't see how that may work in a 14.04.1 > install lts-utopic kernel scenario

  5. #5
    Join Date
    Apr 2007
    Location
    Denmark
    Beans
    2,948
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: 14.04.2 & intel_pstate

    Kubuntu
    ringi@ringi-Lenovo-Ideapad-Flex-15:~$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
    powersave
    powersave
    powersave
    powersave
    ringi@ringi-Lenovo-Ideapad-Flex-15:~$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq
    1700000
    1699933
    1700000
    1700000
    ringi@ringi-Lenovo-Ideapad-Flex-15:~$

    Code:
    ~ VinDSL Unity Debug Script 12.12.06 (vindsl.com) ~
    Current Date/Time: Sat Feb 14 12:52:35 CET 2015
    Distro Release: Ubuntu Vivid Vervet (development branch)
    Kernel Release: Linux 3.18.0-13-generic
    Gnome Release: Window manager warning: Locale not understood by C library, internationalization will not work
    GNOME Shell 3.14.3
    Unity Release: unity 7.3.1
    
    OpenGL vendor string:   Intel Open Source Technology Center
    OpenGL renderer string: Mesa DRI Intel(R) Haswell Mobile x86/MMX/SSE2
    OpenGL version string:  3.0 Mesa 10.4.2
    
    Not software rendered:    yes
    Not blacklisted:          yes
    GLX fbconfig:             yes
    GLX texture from pixmap:  yes
    GL npot or rect textures: yes
    GL vertex program:        yes
    GL fragment program:      yes
    GL vertex buffer object:  yes
    GL framebuffer object:    yes
    GL version is 1.4+:       yes
    
    Unity 3D supported:       yes
    
    Package: mesa-utils
    Status: install ok installed
    Priority: optional
    Section: x11
    Installed-Size: 123
    Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
    Architecture: i386
    Source: mesa-demos
    Version: 8.2.0-1build1
    Replaces: xbase-clients (<< 6.8.2-38)
    Depends: libc6 (>= 2.4), libgl1-mesa-glx | libgl1, libx11-6
    Description: Miscellaneous Mesa GL utilities
     This package provides several basic GL utilities built by Mesa, including
     glxinfo and glxgears.
    Original-Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
    Homepage: http://mesa3d.org/
    
    Xserver Xorg Core Branch:
      Installed: 2:1.16.2.901-1ubuntu3
    
    Tree Map of PCI Devices:
    -[0000:00]-+-00.0  Intel Corporation Haswell-ULT DRAM Controller
               +-02.0  Intel Corporation Haswell-ULT Integrated Graphics Controller
               +-03.0  Intel Corporation Haswell-ULT HD Audio Controller
               +-14.0  Intel Corporation 8 Series USB xHCI HC
               +-16.0  Intel Corporation 8 Series HECI #0
               +-1b.0  Intel Corporation 8 Series HD Audio Controller
               +-1c.0-[01]----00.0  Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller
               +-1c.2-[02]----00.0  Qualcomm Atheros AR9485 Wireless Network Adapter
               +-1d.0  Intel Corporation 8 Series USB EHCI #1
               +-1f.0  Intel Corporation 8 Series LPC Controller
               +-1f.2  Intel Corporation 8 Series SATA Controller 1 [AHCI mode]
               \-1f.3  Intel Corporation 8 Series SMBus Controller

  6. #6
    Join Date
    Jun 2007
    Beans
    16,485

    Re: 14.04.2 & intel_pstate

    Quote Originally Posted by Ringi View Post
    Kubuntu

    Distro Release: Ubuntu Vivid Vervet (development branch)
    Kernel Release: Linux 3.18.0-13-generic
    Nothing to do with 14.04.2 ??

  7. #7
    Join Date
    Apr 2007
    Location
    Denmark
    Beans
    2,948
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: 14.04.2 & intel_pstate

    Sorry, here is 14.10

    Code:
    ringi@ringi-Lenovo-Ideapad-Flex-15:~$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
    powersave
    powersave
    powersave
    powersave
    ringi@ringi-Lenovo-Ideapad-Flex-15:~$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq
    856109
    899804
    899937
    800195
    ringi@ringi-Lenovo-Ideapad-Flex-15:~$ 
    
    
    
    Current Date/Time: Sat Feb 14 12:40:17 UTC 2015
    Distro Release: Ubuntu 14.10
    Kernel Release: Linux 3.16.0-30-generic
    
    OpenGL vendor string:   Intel Open Source Technology Center
    OpenGL renderer string: Mesa DRI Intel(R) Haswell Mobile 
    OpenGL version string:  3.0 Mesa 10.3.2
    
    Not software rendered:    yes
    Not blacklisted:          yes
    GLX fbconfig:             yes
    GLX texture from pixmap:  yes
    GL npot or rect textures: yes
    GL vertex program:        yes
    GL fragment program:      yes
    GL vertex buffer object:  yes
    GL framebuffer object:    yes
    GL version is 1.4+:       yes
    
    Peppermint support:       yes
    
    dpkg-query: package 'mesa-utils' is not installed and no information is available
    Use dpkg --info (= dpkg-deb --info) to examine archive files,
    and dpkg --contents (= dpkg-deb --contents) to list their contents.
    
    Package: mesa-common-dev
    dpkg-query: package 'mesa-common-dev' is not installed and no information is available
    Use dpkg --info (= dpkg-deb --info) to examine archive files,
    and dpkg --contents (= dpkg-deb --contents) to list their contents.
    
    Package: xserver-xorg-core
      Installed: 2:1.16.0-1ubuntu1.2
    
    Package: xserver-common
      Installed: 2:1.16.0-1ubuntu1.2
    
    Package: xserver-xephyr
      Installed: 2:1.16.0-1ubuntu1.2
    
    Tree Map of PCI Devices:
    -[0000:00]-+-00.0  Intel Corporation Haswell-ULT DRAM Controller
               +-02.0  Intel Corporation Haswell-ULT Integrated Graphics Controller
               +-03.0  Intel Corporation Haswell-ULT HD Audio Controller
               +-14.0  Intel Corporation 8 Series USB xHCI HC
               +-16.0  Intel Corporation 8 Series HECI #0
               +-1b.0  Intel Corporation 8 Series HD Audio Controller
               +-1c.0-[01]----00.0  Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller
               +-1c.2-[02]----00.0  Qualcomm Atheros AR9485 Wireless Network Adapter
               +-1d.0  Intel Corporation 8 Series USB EHCI #1
               +-1f.0  Intel Corporation 8 Series LPC Controller
               +-1f.2  Intel Corporation 8 Series SATA Controller 1 [AHCI mode]
               \-1f.3  Intel Corporation 8 Series SMBus Controller
    Code:
    ringi@ringi-Lenovo-Ideapad-Flex-15:~$ cat /etc/init.d/ondemand
    #! /bin/sh
    ### BEGIN INIT INFO
    # Provides:          ondemand
    # Required-Start:    $remote_fs $all
    # Required-Stop:
    # Default-Start:     2 3 4 5
    # Default-Stop:
    # Short-Description: Set the CPU Frequency Scaling governor to "ondemand"
    ### END INIT INFO
    
    # Don't run if we're going to start an Android LXC container:
    [ ! -f /etc/init/lxc-android-config.conf ] || exit 0
    
    PATH=/sbin:/usr/sbin:/bin:/usr/bin
    
    . /lib/init/vars.sh
    . /lib/lsb/init-functions
    
    AVAILABLE="/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors"
    
    case "$1" in
        start)
            start-stop-daemon --start --background --exec /etc/init.d/ondemand -- background
            ;;
        background)
            sleep 60 # probably enough time for desktop login
    
            [ -f $AVAILABLE ] || exit 0
            read governors < $AVAILABLE
            case $governors in
                    *interactive*)
                            GOVERNOR="interactive"
                            break
                            ;;
                    *ondemand*)
                            GOVERNOR="ondemand"
                            break
                            ;;
                    *powersave*)
                            GOVERNOR="powersave"
                            break
                            ;;
                    *)
                            exit 0
                            ;;
            esac
    
            for CPUFREQ in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
            do
                    [ -f $CPUFREQ ] || continue
                    echo -n $GOVERNOR > $CPUFREQ
            done
            ;;
        restart|reload|force-reload)
            echo "Error: argument '$1' not supported" >&2
            exit 3
            ;;
        stop)
            ;;
        *)
            echo "Usage: $0 start|stop" >&2
            exit 3
            ;;
    esac
    ringi@ringi-Lenovo-Ideapad-Flex-15:~$
    Last edited by xc3RnbFO8P; February 14th, 2015 at 01:56 PM.

  8. #8
    Join Date
    Feb 2011
    Location
    Coquitlam, B.C. Canada
    Beans
    2,481
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: 14.04.2 & intel_pstate

    Good catch on the issue in 14.04.2.
    Quote Originally Posted by mc4man View Post
    The lts kernel is available in proposed, as far as images they seemed to have stopped at around Feb. 3
    Yes, and there doesn't seem to be a server version at all. Doesn't matter now.
    Quote Originally Posted by mc4man View Post
    Maybe 14.04.2 gets a new ondemand script?, though don't see how that may work in a 14.04.1 > install lts-utopic kernel scenario
    This seems to be some regression, as the script was fixed for intel_pstate only having "powersave" mode a long time ago. Much longer ago than the date of 2014.11.10 on your diff.
    Any follow-up information on your issue would be appreciated. Please have the courtesy to report back.

  9. #9
    Join Date
    Feb 2011
    Location
    Coquitlam, B.C. Canada
    Beans
    2,481
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: 14.04.2 & intel_pstate

    I found another bug report and set yours to duplicate. So far, I cannot find the revision history that would explain why I have the correct ondemand file on my 14.04.1 server (with a date of June 12), but it is now regressed. I have been looking at various master branches in launchpad.

    References:
    https://code.launchpad.net/ubuntu/+source/sysvinit
    http://bazaar.launchpad.net/~ubuntu-...nit.d/ondemand

    Edit: Now I am guessing there was not a regression. It seems that I edited /etc/init.d/ondemand myself on 2014.06.12, and kept an original version as ondemand.original. Recall that at the time, and maybe even still (on 14.04 and 14.04.1), the intel_pstate driver was disabled by default. I forced it to be enabled.
    Last edited by Doug S; February 14th, 2015 at 06:19 PM.
    Any follow-up information on your issue would be appreciated. Please have the courtesy to report back.

  10. #10
    Join Date
    Feb 2011
    Location
    Coquitlam, B.C. Canada
    Beans
    2,481
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: 14.04.2 & intel_pstate

    Quote Originally Posted by mc4man View Post
    The utopic lts kernel seems to use intel_pstate here by default.
    For a default 14.04.2 does it use the intel_pstate driver or the acpi cpufreq driver?
    Any follow-up information on your issue would be appreciated. Please have the courtesy to report back.

Page 1 of 4 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •