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

Resurrection of Indicator Upower

Scheduled Pinned Locked Moved App Development
upowerpowerindicator
61 Posts 11 Posters 5.0k Views 3 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.
    • E Offline
      Eric H @Eric H
      last edited by Eric H 2 Apr 2025, 15:01 4 Feb 2025, 15:01

      @paulcarroty
      A merge request has been proposed on surya, but another (global) solution is suggested in the comments :
      https://gitlab.com/ubports/porting/community-ports/android10/xiaomi-poco-x3/xiaomi-surya/-/merge_requests/20

      1 Reply Last reply Reply Quote 0
      • P Offline
        paulcarroty
        last edited by 16 Feb 2025, 18:14

        Ahoy, there's battery_charging_enabled support in the latest builds and I need beta testers to check the limiting battery's charge.

        You need to apply new udev rule from README and install the latest build from Github Actions.

        www.kremlingram.org

        E 3 Replies Last reply 17 Feb 2025, 10:27 Reply Quote 2
        • E Offline
          Eric H @paulcarroty
          last edited by 17 Feb 2025, 10:27

          @paulcarroty said in Resurrection of Indicator Upower:

          Ahoy, there's battery_charging_enabled support in the latest builds and I need beta testers to check the limiting battery's charge.

          You need to apply new udev rule from README and install the latest build from Github Actions.

          Thanks !
          I installed latest build from Github Actions.

          Notice that, on surya, default permissions are :

          • -rwxrwxrwx 1 system system 4096 févr. 17 11:15 battery_charging_enabled
          • -rw-r--r-- 1 system system 4096 févr. 17 11:15 charging_enabled

          I leave them untouched for the first tests
          Let me know if you need tests with different permissions

          1 Reply Last reply Reply Quote 0
          • E Offline
            Eric H @paulcarroty
            last edited by Eric H 17 Feb 2025, 14:25

            @paulcarroty said in Resurrection of Indicator Upower:

            I need beta testers to check the limiting battery's charge.

            Test 1:

            • when charge is less than 85%, device charges :

              tail /sys/class/power_supply/battery/{battery_,}charging_enabled
              ==> /sys/class/power_supply/battery/battery_charging_enabled <==
              1
              
              ==> /sys/class/power_supply/battery/charging_enabled <==
              1
              
            • when charge is more than 85%, device doesn't charge (and doesn't seem to discharge until unplugged)

              tail /sys/class/power_supply/battery/{battery_,}charging_enabled
              ==> /sys/class/power_supply/battery/battery_charging_enabled <==
              0
              
              ==> /sys/class/power_supply/battery/charging_enabled <==
              1
              

              (when unplugging, the values in the two files return to 1)

            1 Reply Last reply Reply Quote 0
            • E Offline
              Eric H @paulcarroty
              last edited by Eric H 17 Feb 2025, 16:35

              @paulcarroty

              Test 2 (with udev rules) : same results as test 1

              I applied udev rules from README :

              phablet@ubuntu-phablet:~$ ls -al /sys/class/power_supply/battery/{battery_,}charging_enabled
              -rw-rw-r-- 1 phablet system 4096 févr. 17 17:28 /sys/class/power_supply/battery/battery_charging_enabled
              -rw-rw-r-- 1 phablet system 4096 févr. 17 17:06 /sys/class/power_supply/battery/charging_enabled
              
              • when charge is less than 85%, device charges :
                tail /sys/class/power_supply/battery/{battery_,}charging_enabled
                ==> /sys/class/power_supply/battery/battery_charging_enabled <==
                1
                
                ==> /sys/class/power_supply/battery/charging_enabled <==
                1
                
              • when charge is more than 85%, device doesn't charge (and doesn't seem to discharge until unplugged) :
                tail /sys/class/power_supply/battery/{battery_,}charging_enabled
                ==> /sys/class/power_supply/battery/battery_charging_enabled <==
                0
                
                ==> /sys/class/power_supply/battery/charging_enabled <==
                1
                

              (when unplugging, the values in the two files return to 1)

              P 1 Reply Last reply 18 Feb 2025, 17:08 Reply Quote 0
              • P Offline
                paulcarroty @Eric H
                last edited by 18 Feb 2025, 17:08

                @Eric-H great job.

                www.kremlingram.org

                1 Reply Last reply Reply Quote 0
                • P Offline
                  paulcarroty
                  last edited by 22 Feb 2025, 18:02

                  🎇 New release with many fixes.

                  www.kremlingram.org

                  1 Reply Last reply Reply Quote 1
                  • P Offline
                    paulcarroty
                    last edited by paulcarroty 13 Apr 2025, 06:49

                    Yo, power monitoring and fast charging detection are now supported and I need beta testers (again!) to check how well it works.

                    You need to install the latest build from Github Actions and start charging your device. If something is wrong - submit your power.txt.

                    www.kremlingram.org

                    E 1 Reply Last reply 14 Apr 2025, 00:50 Reply Quote 0
                    • E Offline
                      Eric H @paulcarroty
                      last edited by 14 Apr 2025, 00:50

                      @paulcarroty
                      I installed latest build, and the app no longer starts.

                      https://dpaste.com/6CTBE25DB

                      P 1 Reply Last reply 14 Apr 2025, 06:30 Reply Quote 0
                      • P Offline
                        paulcarroty @Eric H
                        last edited by 14 Apr 2025, 06:30

                        @Eric-H fixed.

                        www.kremlingram.org

                        E 1 Reply Last reply 14 Apr 2025, 11:48 Reply Quote 0
                        • E Offline
                          Eric H @paulcarroty
                          last edited by 14 Apr 2025, 11:48

                          @paulcarroty
                          Reinstalled.
                          Does not work on surya.

                          https://dpaste.com/G66MBRASC

                          1 Reply Last reply Reply Quote 0
                          • E Offline
                            Eric H
                            last edited by Eric H 14 Apr 2025, 13:40

                            About this error :
                            ValueError: could not convert string to float: '3,65353'

                            Maybe it is a localization error (french) : there is a comma instead of a point

                            P 1 Reply Last reply 14 Apr 2025, 18:55 Reply Quote 0
                            • P Offline
                              paulcarroty @Eric H
                              last edited by 14 Apr 2025, 18:55

                              @Eric-H yeah, upower depends on current locale. Fixed by enforcing 🇺🇸

                              www.kremlingram.org

                              E 1 Reply Last reply 14 Apr 2025, 19:08 Reply Quote 0
                              • E Offline
                                Eric H @paulcarroty
                                last edited by 14 Apr 2025, 19:08

                                @paulcarroty
                                Reinstalled. It seems to work fine.
                                Do you need specific tests ?

                                P 1 Reply Last reply 15 Apr 2025, 05:54 Reply Quote 0
                                • P Offline
                                  paulcarroty @Eric H
                                  last edited by 15 Apr 2025, 05:54

                                  @Eric-H test fast charging if you have the hardware for.

                                  www.kremlingram.org

                                  E 1 Reply Last reply 17 Apr 2025, 21:48 Reply Quote 0
                                  • E Offline
                                    Eric H @paulcarroty
                                    last edited by 17 Apr 2025, 21:48

                                    @paulcarroty
                                    Sorry, I couldn't do the test before today...

                                    So I used the Xiaomi charger supplied with the phone (which fully charges in less than half an hour) with the latest version (0.7) of uPower, but it seems that fast charging is not detected and there's nothing related in the logs.

                                    P 1 Reply Last reply 22 Apr 2025, 07:01 Reply Quote 0
                                    • P Offline
                                      paulcarroty @Eric H
                                      last edited by 22 Apr 2025, 07:01

                                      Eric-H Attach the power.txt file when the battery is being charged and has less than 50% capacity.

                                      www.kremlingram.org

                                      E 2 Replies Last reply 21 days ago Reply Quote 0
                                      • E Offline
                                        Eric H @paulcarroty
                                        last edited by 21 days ago

                                        @paulcarroty
                                        I tried to generate the power.txt file but there is an error on stderr :

                                        cat: '/sys/devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pm6150@0:qcom,qpnp-smb5/power_supply/main/health': Invalid argument
                                        

                                        The health files exists and is world readable :

                                        phablet@ubuntu-phablet:~/tmp$ ls -al /sys/devices/platform/soc/c440000.qcom\,spmi/spmi-0/spmi0-00/c440000.qcom\,spmi\:qcom\,pm6150@0\:qcom\,qpnp-smb5/power_supply/main/health 
                                        -r--r--r-- 1 system system 4096 mai    6 06:21 /sys/devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pm6150@0:qcom,qpnp-smb5/power_supply/main/health
                                        

                                        The error persists even if I try to

                                        • add double quotes,
                                        • add simple quotes
                                        • replace cat with tail
                                        1 Reply Last reply Reply Quote 0
                                        • E Offline
                                          Eric H @paulcarroty
                                          last edited by 20 days ago

                                          @paulcarroty
                                          For some unknown reason, today the message on stderr did not appear.

                                          So here is the power.txt file for surya attached.
                                          or see at https://dpaste.org/hCcZO

                                          I can see POWER_SUPPLY_CHARGE_TYPE=Fast in udev battery info, so it seems to be a fast charge.
                                          What should Indicator Upower display ?

                                          P 1 Reply Last reply 17 days ago Reply Quote 0
                                          • P Offline
                                            paulcarroty @Eric H
                                            last edited by 17 days ago

                                            @Eric-H said in Resurrection of Indicator Upower:

                                            I can see POWER_SUPPLY_CHARGE_TYPE=Fast in udev battery info, so it seems to be a fast charge.

                                            No, I got Fast with low-end 7W charger too. My guess it's POWER_SUPPLY_FASTCHARGE_MODE=1. My device has POWER_SUPPLY_HI_POWER.

                                            How much power can your charger deliver? POWER_SUPPLY_POWER_NOW=39764516 looks realistic for 45W.

                                            I also tried to find the Fast Charging voltage (9..12V) on BMS and failed, so you can try it too. Probably not being monitored by software. And all of this is very device-specific.

                                            www.kremlingram.org

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