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

    Battery draining

    Scheduled Pinned Locked Moved Sony Xperia X (F5121 & F5122)
    44 Posts 13 Posters 9.0k Views 4 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.
      • c4pp4C Offline
        c4pp4
        last edited by c4pp4

        Recent changes of CPU governors related to suzu:

        Jan 22: https://github.com/fredldotme/device-kernel-loire/commit/2feb357a3e4a605b687cef3d3d6c572ae11cb9fc

        CPU_QUIET_GOVERNOR_RQBALANCE:
        This governor will scale the number of CPUs online depending on both CPU load and the number of runnable threads with careful but simple and precise calculations.


        Jan 27: https://github.com/fredldotme/device-kernel-loire/commit/043201b042c52ae2991687ca74d47817118b3969#diff-2dbceea1fcef57a75da14db7607967496ddc06b978457caeb06b37535dda7b0e

        CPU_FREQ_GOV_SCHEDUTIL:
        This governor makes decisions based on the utilization data provided by the scheduler. It sets the CPU frequency to be proportional to the utilization/capacity ratio coming from the scheduler. If the utilization is frequency-invariant, the new frequency is also proportional to the maximum available frequency. If that is not the case, it is proportional to the current frequency of the CPU. The frequency tipping point is at utilization/capacity equal to 80% in both cases.


        Maybe @fredldotme could bring back availability of previous default governor, I'm not sure if it was "interactive" or what. Then we can try to test it via command:

        echo "interactive" | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
        
        fredldotmeF 1 Reply Last reply Reply Quote 0
        • fredldotmeF Offline
          fredldotme @c4pp4
          last edited by

          I got mixed responses from the recent Xperia X work. Some say battery life has improved, now some claim it got worse. Generally those who got worse battery life had suspension prevention enabled in some apps.

          @c4pp4 I'm not sure that schedutil is at fault here. Also we need it as it sets CPU frequencies in a kthread context, which is required for some mutexes to work correctly and not drag down the system into a panic.

          You could try reverting this commit locally and see for yourself if it's due to the way the CPU is actually idling: https://github.com/fredldotme/device-kernel-loire/commit/84d9466cc10cc869b3a19086208cf4c6c59ef9b0

          IMPORTANT: You will lose the ability to get notifications on time.

          I'd rather suggest not using suspension prevention in UTTT as that's not a supported configuration for exactly this reason.

          c4pp4C 1 Reply Last reply Reply Quote 0
          • c4pp4C Offline
            c4pp4 @fredldotme
            last edited by c4pp4

            @fredldotme
            Can you describe how they are using the phone so the battery life has improved? I'm not using UTTT at all. Wi-Fi OFF. Data 3G ON. I have Dekko2 and TELEports installed. I'm using Morph and listening to the music. Anbox is off. That's all and I'm "happy" with 12 hours. Unfortunately I have no hardware to build the test at the moment.


            Idle test from full charge: Wi-Fi OFF, Data OFF, two active SIMS, display turned OFF all the time, after 12 hours it's on 80%. Is it OK?


            I'll take a notes about phone using (time and task) and try to compare it with battery usage graph and let you know.

            1 Reply Last reply Reply Quote 0
            • c4pp4C Offline
              c4pp4
              last edited by

              @fredldotme Stable channel OTA-16 and I've reinstalled all my apps for sure. It looks like Morph browser (and maybe some other apps?) is eating more battery power (javascript sites?). On the other hand I've noticed better system response. I think it's the result of the governor changes. Without using Morph too frequently it lasts quite a long in my case (cca 20h). I think it's a great work after all. I will be monitoring usage again and when I find out something new I'll place a note.

              fredldotmeF 1 Reply Last reply Reply Quote 0
              • fredldotmeF Offline
                fredldotme @c4pp4
                last edited by

                @c4pp4 cool šŸ‘

                1 Reply Last reply Reply Quote 0
                • Mario.CHM Offline
                  Mario.CH
                  last edited by

                  As I mentioned before, the more consumption of the battery, is not a serious problem for me. Because I think that if the changes made contribute to a more stable and secure system, that is more important to me. Thank you for your work and the 'commitment'. I wish you a happy Easter.

                  Translated with www.DeepL.com/Translator (free version)

                  šŸ“± Oneplus Nord N100 UT20.40 (OTA5); then Xperia X (since 2020) at last UT 20.04(OTA5), now out of service due to defective camera
                  šŸŽ When you realize you are riding a dead horse, get off!
                  My languages skill: šŸ‡ØšŸ‡­šŸ‡¦šŸ‡¹ šŸ‡©šŸ‡Ŗ, and only orally: šŸ‡¬šŸ‡§ šŸ‡¹šŸ‡­

                  1 Reply Last reply Reply Quote 0
                  • K Offline
                    kugiigi
                    last edited by

                    Lately, the more battery drain is more apparent on my Xperia X. The drain happens on idle. I get around 20% drain overnight with wifi turned off. I have Dekko and Ubsync though, so perhaps those have impact too.

                    c4pp4C 1 Reply Last reply Reply Quote 0
                    • c4pp4C Offline
                      c4pp4 @kugiigi
                      last edited by

                      @kugiigi Data on?

                      K 1 Reply Last reply Reply Quote 0
                      • fredldotmeF Offline
                        fredldotme
                        last edited by

                        Well Ubsync is a solution that inherently wakes up the device more often by nature. Can't have syncing without waste of battery life.

                        1 Reply Last reply Reply Quote 0
                        • K Offline
                          kugiigi @c4pp4
                          last edited by

                          @c4pp4 No, but there's a sim card.

                          @fredldotme Yeah that is true. I tried stopping the UBsync service but it's still the same. Maybe I'll try fully disabling syncing and trigger syncing manually šŸ™‚

                          fredldotmeF 1 Reply Last reply Reply Quote 0
                          • fredldotmeF Offline
                            fredldotme @kugiigi
                            last edited by

                            @kugiigi was that recent battery drain on devel? One of the reasons might have been nfcd looking for an NFC adapter every second. It's now not looking for an adaper anymore as it's been disabled for Android < 9 devices.

                            K 1 Reply Last reply Reply Quote 0
                            • K Offline
                              kugiigi @fredldotme
                              last edited by

                              @fredldotme No, I'm on stable. But thanks for the information.
                              The drain is still there. It's most likely UBsync's fault because it's the latest app I installed šŸ˜… I'll just try to uninstall it and go back to manual backing up to my NC šŸ˜„

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