UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    [How-to] Changing default CPU governor.

    Scheduled Pinned Locked Moved Support
    governorcpubatteryhowto
    13 Posts 7 Posters 7.8k Views 5 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • HendriXXXH Offline
        HendriXXX @guru
        last edited by

        @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.

        1 Reply Last reply Reply Quote 2
        • mymikeM Offline
          mymike
          last edited by

          @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...

          HendriXXXH 1 Reply Last reply Reply Quote 1
          • arubislanderA Offline
            arubislander
            last edited by

            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.

            🇦🇼 🇳🇱 🇺🇸 🇪🇸
            Happily running Ubuntu Touch
            Google Pixel 3a (20.04 DEV)
            JingPad (24.04 preview)
            Meizu Pro 5 (16.04 DEV)

            HendriXXXH LakotaubpL 2 Replies Last reply Reply Quote 0
            • HendriXXXH Offline
              HendriXXX @mymike
              last edited by

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

              1 Reply Last reply Reply Quote 0
              • HendriXXXH Offline
                HendriXXX @arubislander
                last edited by

                @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.

                1 Reply Last reply Reply Quote 0
                • mihaelM Offline
                  mihael
                  last edited by

                  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?

                  HendriXXXH 1 Reply Last reply Reply Quote 0
                  • HendriXXXH Offline
                    HendriXXX @mihael
                    last edited by

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

                    Do you have conservative option listed?

                    1 Reply Last reply Reply Quote 0
                    • LakotaubpL Offline
                      Lakotaubp @arubislander
                      last edited by Lakotaubp

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

                      1 Reply Last reply Reply Quote 0
                      • Vehi_MVV Offline
                        Vehi_MV
                        last edited by Vehi_MV

                        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

                        1 Reply Last reply Reply Quote 0
                        • mihaelM Offline
                          mihael
                          last edited by

                          @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
                          
                          HendriXXXH 1 Reply Last reply Reply Quote 0
                          • HendriXXXH Offline
                            HendriXXX @mihael
                            last edited by

                            @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.

                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post