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

    Call for testing: power indicator (esp. if it works for you now!)

    Scheduled Pinned Locked Moved OS
    21 Posts 7 Posters 3.5k Views 2 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.
      • klhK Offline
        klh
        last edited by klh

        Hello!

        I created a fix for indicator-power that should make it better at recognizing the real battery. If you would like to test this and are on the devel channel, run these commands on your device:

        sudo ubports-qa install indicator-power 60
        

        and

        restart indicator-power
        

        (or reboot your device).

        To test simply unplug the device, observe the battery indicator, plug it back in and check again. Longer-term testing would be good too, to check if the battery level goes down as it should.

        Let me know your device, and:

        • if it worked for you before and now something is wrong (no charging indicator, always empty battery, etc)
        • if it didn't work before and now it works (shows charging, proper battery level)
        • if nothing changed

        by posting here or in the PR (https://github.com/ubports/indicator-power/pull/60)

        Thanks!

        Keep in mind that this can behave weirdly if it breaks, have a backup / don't do it on your daily driver unless you know how to fix a potentially broken system.

        ? 1 Reply Last reply Reply Quote 1
        • N Offline
          nero355
          last edited by

          Could this improve the Battery Level reading on my BQ E5 HD too ?!

          Some examples :

          • Fully charged phone that is only stand-By for many days will stay around 100% to 95% and then when the battery is almost empty it will shoot to 5% then 1% and then Power Off...
          • Full Charged Phone that is used on a regular basis and for example left at 70% or 20% or so and not used anymore does the same when the battery is almost empty : Shoot to 5% then to 1% and then Power Off...

          So basically :

          • When you use the phone the battery status changes pretty much reliably 🙂
          • When the phone is only stand-by the battery status is not reliable at all! 😞

          My phones :

          • BQ Aquaris E5 HD Ubuntu Phone Edition - Ubuntu Touch 16.04 LTS
          • ZUK Z2 Pro - ZUI Android 8.x
          • Xiaomi Mi 9T - Jolla SailFish 3.4.x Community Build

          P.S. : I am NOT a developer! ;)

          klhK 1 Reply Last reply Reply Quote 0
          • klhK Offline
            klh @nero355
            last edited by

            @nero355 It highly depends on the batteries reported by your kernel - if you could run upower -d on your device and post the output I could tell you more (although the issue this is attempting to fix is apparently due to the newer kernels, I think the BQ E5 HD runs an older one).

            KenedaK N 2 Replies Last reply Reply Quote 0
            • ? Offline
              A Former User @klh
              last edited by A Former User

              @klh
              All good so far on Cosmo Communicator and Pinephone.
              No change in behaviour.

              1 Reply Last reply Reply Quote 1
              • KenedaK Offline
                Keneda @klh
                last edited by

                @klh how can i copy/paste from terminal to provide results for MX4 ?

                2015-2023 : Meizu MX4 ☠️⚰️✝️
                2023-2024 : Nexus 5 ☠️⚰️✝️
                2024-***** : FPOS Fairphone 5 waiting UT for freedom 😉
                🇲🇫🇬🇧

                klhK Mario.CHM 2 Replies Last reply Reply Quote 0
                • klhK Offline
                  klh @Keneda
                  last edited by

                  @keneda I usually just run adb shell COMMAND > ~/somefilename or adb shell COMMAND | xclip -sel clip so I have the results on my PC. If you mean the device terminal, it's the same but without adb shell of course.

                  1 Reply Last reply Reply Quote 0
                  • N Offline
                    nero355 @klh
                    last edited by

                    @klh said in Call for testing: power indicator (esp. if it works for you now!):

                    @nero355 It highly depends on the batteries reported by your kernel - if you could run upower -d on your device and post the output I could tell you more (although the issue this is attempting to fix is apparently due to the newer kernels, I think the BQ E5 HD runs an older one).

                    It's telling me the following :

                    phablet@ubuntu-phablet:~$ upower -d
                    Device: /org/freedesktop/UPower/devices/line_power_ac
                      native-path:          ac
                      power supply:         yes
                      updated:              Sun 21 Nov 2021 01:26:13 AM CET (316435 seconds ago)
                      has history:          no
                      has statistics:       no
                      line-power
                        warning-level:       none
                        online:              no
                        icon-name:          'ac-adapter-symbolic'
                    
                    Device: /org/freedesktop/UPower/devices/battery_battery
                      native-path:          battery
                      power supply:         yes
                      updated:              Wed 24 Nov 2021 05:20:04 PM CET (4 seconds ago)
                      has history:          yes
                      has statistics:       yes
                      battery
                        present:             yes
                        rechargeable:        yes
                        state:               charging
                        warning-level:       none
                        energy:              0 Wh
                        energy-empty:        0 Wh
                        energy-full:         0 Wh
                        energy-full-design:  0 Wh
                        energy-rate:         0 W
                        voltage:             4.056 V
                        percentage:          94%
                        temperature:         21 degrees C
                        capacity:            100%
                        technology:          lithium-ion
                        icon-name:          'battery-full-charging-symbolic'
                    
                    Device: /org/freedesktop/UPower/devices/line_power_usb
                      native-path:          usb
                      power supply:         yes
                      updated:              Wed 24 Nov 2021 05:19:21 PM CET (47 seconds ago)
                      has history:          no
                      has statistics:       no
                      line-power
                        warning-level:       none
                        online:              yes
                        icon-name:          'ac-adapter-symbolic'
                    
                    Device: /org/freedesktop/UPower/devices/line_power_wireless
                      native-path:          wireless
                      power supply:         yes
                      updated:              Sun 21 Nov 2021 01:26:13 AM CET (316435 seconds ago)
                      has history:          no
                      has statistics:       no
                      line-power
                        warning-level:       none
                        online:              no
                        icon-name:          'ac-adapter-symbolic'
                    
                    Device: /org/freedesktop/UPower/devices/DisplayDevice
                      power supply:         yes
                      updated:              Wed 24 Nov 2021 05:19:21 PM CET (47 seconds ago)
                      has history:          no
                      has statistics:       no
                      battery
                        present:             yes
                        state:               charging
                        warning-level:       none
                        energy:              0 Wh
                        energy-full:         0 Wh
                        energy-rate:         0 W
                        percentage:          94%
                        icon-name:          'battery-full-charging-symbolic'
                    
                    Daemon:
                      daemon-version:  0.99.4
                      on-battery:      no
                      lid-is-closed:   no
                      lid-is-present:  no
                      critical-action: PowerOff
                    phablet@ubuntu-phablet:~$ 
                    

                    And this is my Kernel :

                    phablet@ubuntu-phablet:~$ uname -a
                    Linux ubuntu-phablet 3.4.67 #1 SMP PREEMPT Mon Jun 6 14:03:15 UTC 2016 b75400e armv7l armv7l armv7l GNU/Linux
                    phablet@ubuntu-phablet:~$ 
                    

                    🙂

                    My phones :

                    • BQ Aquaris E5 HD Ubuntu Phone Edition - Ubuntu Touch 16.04 LTS
                    • ZUK Z2 Pro - ZUI Android 8.x
                    • Xiaomi Mi 9T - Jolla SailFish 3.4.x Community Build

                    P.S. : I am NOT a developer! ;)

                    klhK 1 Reply Last reply Reply Quote 0
                    • klhK Offline
                      klh @nero355
                      last edited by

                      @nero355 Seeing as you only have one battery with a defined technology I'd say this will work for you (not 100% sure as the list may be changing once you unplug).

                      N 3 Replies Last reply Reply Quote 1
                      • N Offline
                        nero355 @klh
                        last edited by nero355

                        @klh
                        Sounds good! 🙂

                        I will try to test this during the next week or so and let you know the result! 😉

                        My phones :

                        • BQ Aquaris E5 HD Ubuntu Phone Edition - Ubuntu Touch 16.04 LTS
                        • ZUK Z2 Pro - ZUI Android 8.x
                        • Xiaomi Mi 9T - Jolla SailFish 3.4.x Community Build

                        P.S. : I am NOT a developer! ;)

                        1 Reply Last reply Reply Quote 1
                        • klhK Offline
                          klh
                          last edited by

                          Tested on a Galaxy Note 4 (910F) and it also solves the issue.

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

                            @keneda Hi, Working with the terminal:
                            Just press your finger on the screen (without moving) about 2 seconds, then select <select> from the menu, highlight the desired text with your finger and select <exit selection mode> at the bottom of the screen, now, back again, select <copy> in the menue.
                            Switch app and paste in the selected app (for example ForumWebApp, MorphBroserApp, EditorApp, or whatever).
                            That's it.

                            Greetings Mario :winking_face:

                            📱 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: 🇬🇧 🇹🇭

                            ? KenedaK 2 Replies Last reply Reply Quote 1
                            • ? Offline
                              A Former User @Mario.CH
                              last edited by

                              So I also installed the Uopower thing today on my Xiaomi Redmi Note 9. Very interesting in the terminal, the battery is detected. I have posted a picture in the Xiaomi group. Will test this solution once longer. So far it runs well but is that normal that it takes a while until the battery turns green? About up to 40 seconds after plugging in.

                              1 Reply Last reply Reply Quote 0
                              • KenedaK Offline
                                Keneda @Mario.CH
                                last edited by

                                @mario-ch THX !

                                Device: /org/freedesktop/UPower/devices/line_power_ac
                                  native-path:          ac
                                  power supply:         yes
                                  updated:              dim. 19 déc. 2021 22:50:02 CET (38973 seconds ago)
                                  has history:          no
                                  has statistics:       no
                                  line-power
                                    warning-level:       none
                                    online:              no
                                    icon-name:          'ac-adapter-symbolic'
                                
                                Device: /org/freedesktop/UPower/devices/battery_battery
                                  native-path:          battery
                                  vendor:               SONY
                                  power supply:         yes
                                  updated:              lun. 20 déc. 2021 09:39:07 CET (28 seconds ago)
                                  has history:          yes
                                  has statistics:       yes
                                  battery
                                    present:             yes
                                    rechargeable:        yes
                                    state:               discharging
                                    warning-level:       none
                                    energy:              0 Wh
                                    energy-empty:        0 Wh
                                    energy-full:         0 Wh
                                    energy-full-design:  0 Wh
                                    energy-rate:         0 W
                                    voltage:             3,858 V
                                    percentage:          76%
                                    temperature:         21 degrees C
                                    capacity:            100%
                                    technology:          lithium-ion
                                    icon-name:          'battery-full-symbolic'
                                
                                Device: /org/freedesktop/UPower/devices/line_power_usb
                                  native-path:          usb
                                  power supply:         yes
                                  updated:              ven. 17 déc. 2021 05:17:55 CET (274900 seconds ago)
                                  has history:          no
                                  has statistics:       no
                                  line-power
                                    warning-level:       none
                                    online:              no
                                    icon-name:          'ac-adapter-symbolic'
                                
                                Device: /org/freedesktop/UPower/devices/DisplayDevice
                                  power supply:         yes
                                  updated:              lun. 20 déc. 2021 09:14:44 CET (1491 seconds ago)
                                  has history:          no
                                  has statistics:       no
                                  battery
                                    present:             yes
                                    state:               discharging
                                    warning-level:       none
                                    energy:              0 Wh
                                    energy-full:         0 Wh
                                    energy-rate:         0 W
                                    percentage:          76%
                                    icon-name:          'battery-full-symbolic'
                                
                                Daemon:
                                  daemon-version:  0.99.4
                                  on-battery:      yes
                                  lid-is-closed:   no
                                  lid-is-present:  yes
                                  critical-action: PowerOff
                                

                                2015-2023 : Meizu MX4 ☠️⚰️✝️
                                2023-2024 : Nexus 5 ☠️⚰️✝️
                                2024-***** : FPOS Fairphone 5 waiting UT for freedom 😉
                                🇲🇫🇬🇧

                                klhK 1 Reply Last reply Reply Quote 0
                                • klhK Offline
                                  klh @Keneda
                                  last edited by klh

                                  @keneda Looking at this the patch shouldn't change anything since you only have one battery anyway - would be nice to know if it doesn't break anything though 😛

                                  Also, lid-is-present: yes is... interesting.

                                  KenedaK U 2 Replies Last reply Reply Quote 0
                                  • KenedaK Offline
                                    Keneda @klh
                                    last edited by Keneda

                                    @klh said in Call for testing: power indicator (esp. if it works for you now!):

                                    Also, lid-is-present: yes is... interesting.

                                    Why ? I'm total noob so don't know what that line says.

                                    +Sorry i did not understand that was for device with more than one battery.

                                    2015-2023 : Meizu MX4 ☠️⚰️✝️
                                    2023-2024 : Nexus 5 ☠️⚰️✝️
                                    2024-***** : FPOS Fairphone 5 waiting UT for freedom 😉
                                    🇲🇫🇬🇧

                                    klhK 1 Reply Last reply Reply Quote 0
                                    • U Offline
                                      UniSuperBox @klh
                                      last edited by

                                      @klh

                                      lid-is-present: yes is... interesting.

                                      Many phones have a hall effect sensor that's set as a lid in the kernel. This allows book-like cases to embed a small magnet to shut off the device screen when they are closed.

                                      1 Reply Last reply Reply Quote 1
                                      • klhK Offline
                                        klh @Keneda
                                        last edited by klh

                                        @keneda Not with more than one physical battery, with more than one battery reported by upower - this causes issues with the indicator. Still would love to see if it breaks anything for you 🙂

                                        @UniSuperBox Oh that's cool, good to know.

                                        1 Reply Last reply Reply Quote 0
                                        • N Offline
                                          nero355 @klh
                                          last edited by

                                          @klh said in Call for testing: power indicator (esp. if it works for you now!):

                                          @nero355 Seeing as you only have one battery with a defined technology I'd say this will work for you (not 100% sure as the list may be changing once you unplug).

                                          Just so you know : I did not forget about you but I have just been busy with too much stuff the last few weeks! 😉

                                          I have switched to the right branch today and will do some testing during the next 2 weeks! 🙂

                                          @klh said in Call for testing: power indicator (esp. if it works for you now!):

                                          @keneda Looking at this the patch shouldn't change anything since you only have one battery anyway - would be nice to know if it doesn't break anything though 😛

                                          Also, lid-is-present: yes is... interesting.

                                          @keneda said in Call for testing: power indicator (esp. if it works for you now!):

                                          @klh said in Call for testing: power indicator (esp. if it works for you now!):

                                          Why ? I'm total noob so don't know what that line says.

                                          @unisuperbox said in Call for testing: power indicator (esp. if it works for you now!):

                                          Many phones have a hall effect sensor that's set as a lid in the kernel. This allows book-like cases to embed a small magnet to shut off the device screen when they are closed.

                                          You can test it very easily if you hold a magnet near the phone in the right area : It will react as the lid of the case has been closed! 😄

                                          I am guessing you will get something like this when you activate it : https://shopee.ph/redmi-note-9-s-smart-mirror-flip-case-for-xiaomi-redmi-note-9-pro-max-9s-redmy-note9s-phone-cases-redmi9-readmi-note9-s-stand-cover-casing-i.60314136.3636360348
                                          (Scroll to the picture with the clock shown on the phone!)

                                          😉

                                          My phones :

                                          • BQ Aquaris E5 HD Ubuntu Phone Edition - Ubuntu Touch 16.04 LTS
                                          • ZUK Z2 Pro - ZUI Android 8.x
                                          • Xiaomi Mi 9T - Jolla SailFish 3.4.x Community Build

                                          P.S. : I am NOT a developer! ;)

                                          ? 1 Reply Last reply Reply Quote 0
                                          • ? Offline
                                            A Former User @nero355
                                            last edited by

                                            Hi guys this Upower application is a stroke of luck at least on Merlin 🙂 I've tested it for a while now and it works great, no more empty battery on full charge in the display. Many thanks to you that you have written the commands to install it in the forum. Here again to all happy holidays and best wishes for the new year.

                                            1 Reply Last reply Reply Quote 2
                                            • N Offline
                                              nero355 @klh
                                              last edited by

                                              @klh said in Call for testing: power indicator (esp. if it works for you now!):

                                              @nero355 Seeing as you only have one battery with a defined technology I'd say this will work for you (not 100% sure as the list may be changing once you unplug).

                                              Sorry to say this but... no improvement on my BQ phone... 😕

                                              The behaviour is pretty much the same as before!

                                              Luckily the battery is still good so it's not a big deal but it would be cool if someone knows how to fix the batterystatus reading one day 🙂

                                              My phones :

                                              • BQ Aquaris E5 HD Ubuntu Phone Edition - Ubuntu Touch 16.04 LTS
                                              • ZUK Z2 Pro - ZUI Android 8.x
                                              • Xiaomi Mi 9T - Jolla SailFish 3.4.x Community Build

                                              P.S. : I am NOT a developer! ;)

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