[How-to] Changing default CPU governor.



  • @guru said in [How-to] Changing default CPU governor.:

    @hendrixxx said in [How-to] Changing default CPU governor.:

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

    My BQ E4.5 says:

    phablet@ubuntu-phablet-bq:~$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
    hotplug

    Oh, so there is differences between devices. Never heard of hotplug governor before, but this explain what it is..

    Hotplug Governor:
    The Hotplug governor performs very similarly to the OnDemand governor, with the added benefit of being more precise about how it steps down through the kernel's frequency table as the governor measures the user's CPU load. However, the Hotplug governor's defining feature is its ability to turn unused CPU cores off during periods of low CPU utilization. This is known as "hotplugging."

    Seems like cool feature if it really works like that.

    "scaling_available_governors" shows which are available in kernel.



  • @hendrixxx said in [How-to] Changing default CPU governor.:

    It would be cool if we could change these settings straight from setting menu.

    Yeah, it would be very cool. I think reporting an issue on github will help developer as may they forgot by only reading here... if you want I can report the issue for you, if you prefer...



  • I was very happy to find this post. I have been looking for ways to reduce battery usage on my Meizu Pro 5. So I was eager to try the things mentioned here.
    Sadly:

    $ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors
    interactive
    

    So only interactive is available on my kernel.

    But nonetheless, thank you very much for the post. It serves to remind us that there is a real Linux kernel underneath the lovely UTouch interface.



  • @mymike feel free to report github issue if you want. Thanks!



  • @arubislander said in [How-to] Changing default CPU governor.:

    I was very happy to find this post. I have been looking for ways to reduce battery usage on my Meizu Pro 5. So I was eager to try the things mentioned here.
    Sadly:

    $ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors
    interactive
    

    So only interactive is available on my kernel.

    But nonetheless, thank you very much for the post. It serves to remind us that there is a real Linux kernel underneath the lovely UTouch interface.

    Thanks! I am not developer but I like to tweak Linux everywhere possible. Just trying different things all to time.. 🙂
    I think it should be possible to add conservative governor in M5pro kernel just by enabling it and compile. I will check today what gov options my N4 has.



  • When I try echo conservative > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor it says "bash: echo: write error: Invalid argument".

    I'm on turbo, vivid. Could anyone help me with this?



  • @mihael what does "$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors" says?

    Do you have conservative option listed?



  • @arubislander Same on the mx4 interactive only if thats of any help to anyone.



  • Just for info.
    On BQ E4.5 available governors are:
    -userspace
    -powersave
    -hotplug (default)
    -performance

    I allso found a thread explaining governors on xda-developers:
    https://forum.xda-developers.com/showthread.php?t=1736168



  • @HendriXXX I have interactive:

    phablet@ubuntu-phablet:~$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors
    interactive 
    interactive 
    interactive 
    interactive 
    

    I tried with powersave and I get the same result:

    root@ubuntu-phablet:/home/phablet# echo powersave > /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
    bash: echo: write error: Invalid argument
    


  • @mihael Ok. For some reason other governors aren't compiled in to the kernel then.
    I just checked my N4 and it has all governor options in kernel.