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
    62 Posts 11 Posters 14.6k 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.
      • Eric HE Offline
        Eric H @AppLee
        last edited by Eric H

        @paulcarroty
        I tested the 0.5 release on surya and I can confirm that it works as expected.

        Regarding the udev rule, it works perfectly with permissions 0666.
        But if I try 0664, it no longer works…
        What is the group of the /sys/class/power_supply/battery/charging_enabled file on other devices?

        • Ubuntu Touch for Xiaomi POCO X3 NFC Telegram group
        • Ubuntu Touch installation guide for Xiaomi POCO X3 NFC / X3
        U paulcarrotyP 2 Replies Last reply Reply Quote 0
        • U Offline
          uxes @Eric H
          last edited by

          @Eric-H
          miatoll

          -rwxrwxrwx 1 system system 4,0K led 19 12:40 /sys/class/power_supply/battery/charging_enabled

          1 Reply Last reply Reply Quote 1
          • paulcarrotyP Offline
            paulcarroty @Eric H
            last edited by

            @Eric-H try the next rule with 0664:

            ACTION=="add|change", SUBSYSTEM=="power_supply", KERNEL=="battery", RUN+="/bin/chmod 0664 /sys/class/power_supply/%k/charging_enabled", RUN+="/bin/chown phablet /sys/class/power_supply/%k/charging_enabled"  
            
            

            https://www.kremlingram.org/en

            Eric HE 1 Reply Last reply Reply Quote 0
            • Eric HE Offline
              Eric H @paulcarroty
              last edited by

              @paulcarroty
              I think it's indeed the right approach.
              I will confirm today that it works.

              • Ubuntu Touch for Xiaomi POCO X3 NFC Telegram group
              • Ubuntu Touch installation guide for Xiaomi POCO X3 NFC / X3
              Eric HE 1 Reply Last reply Reply Quote 0
              • Eric HE Offline
                Eric H @Eric H
                last edited by

                @paulcarroty
                The udev rule is working properly:
                -rw-rw-r-- 1 phablet system 4096 janv. 23 09:08 /sys/class/power_supply/battery/charging_enabled
                And the content of charging_enabled goes well from 1 to 0 when the charge exceeds 85%.

                But, despite this, the device continues to charge beyond 85 % !

                (I believe that, on surya and karna, we must have to write in another file.
                I will try with `/sys/class/power_supply/battery/battery_charging_enabled )

                • Ubuntu Touch for Xiaomi POCO X3 NFC Telegram group
                • Ubuntu Touch installation guide for Xiaomi POCO X3 NFC / X3
                Eric HE 1 Reply Last reply Reply Quote 0
                • Eric HE Offline
                  Eric H @Eric H
                  last edited by Eric H

                  @paulcarroty
                  According to https://android.stackexchange.com/questions/200032/difference-between-system-files-charging-enabled-vs-battery-charging-enabled battery-charging-enabled has a different behavior than charging-enabled.
                  So I will just make a MR to add the above udev rule in surya and karna.
                  Thanks for your work

                  • Ubuntu Touch for Xiaomi POCO X3 NFC Telegram group
                  • Ubuntu Touch installation guide for Xiaomi POCO X3 NFC / X3
                  Eric HE 1 Reply Last reply Reply Quote 0
                  • mihaelM Offline
                    mihael
                    last edited by

                    On my N100 I don't have /sys/class/power_supply/battery/charging_enabled but instead I have /sys/class/power_supply/battery/battery_charging_enabled

                    1 Reply Last reply Reply Quote 0
                    • Eric HE Offline
                      Eric H @Eric H
                      last edited by Eric H

                      @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

                      • Ubuntu Touch for Xiaomi POCO X3 NFC Telegram group
                      • Ubuntu Touch installation guide for Xiaomi POCO X3 NFC / X3
                      1 Reply Last reply Reply Quote 0
                      • paulcarrotyP Offline
                        paulcarroty
                        last edited by

                        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.

                        https://www.kremlingram.org/en

                        Eric HE 3 Replies Last reply Reply Quote 2
                        • Eric HE Offline
                          Eric H @paulcarroty
                          last edited by

                          @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

                          • Ubuntu Touch for Xiaomi POCO X3 NFC Telegram group
                          • Ubuntu Touch installation guide for Xiaomi POCO X3 NFC / X3
                          1 Reply Last reply Reply Quote 0
                          • Eric HE Offline
                            Eric H @paulcarroty
                            last edited by Eric H

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

                            • Ubuntu Touch for Xiaomi POCO X3 NFC Telegram group
                            • Ubuntu Touch installation guide for Xiaomi POCO X3 NFC / X3
                            1 Reply Last reply Reply Quote 0
                            • Eric HE Offline
                              Eric H @paulcarroty
                              last edited by Eric H

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

                              • Ubuntu Touch for Xiaomi POCO X3 NFC Telegram group
                              • Ubuntu Touch installation guide for Xiaomi POCO X3 NFC / X3
                              paulcarrotyP 1 Reply Last reply Reply Quote 0
                              • paulcarrotyP Offline
                                paulcarroty @Eric H
                                last edited by

                                @Eric-H great job.

                                https://www.kremlingram.org/en

                                1 Reply Last reply Reply Quote 0
                                • paulcarrotyP Offline
                                  paulcarroty
                                  last edited by

                                  🎇 New release with many fixes.

                                  https://www.kremlingram.org/en

                                  1 Reply Last reply Reply Quote 1
                                  • paulcarrotyP Offline
                                    paulcarroty
                                    last edited by paulcarroty

                                    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.

                                    https://www.kremlingram.org/en

                                    Eric HE 1 Reply Last reply Reply Quote 0
                                    • Eric HE Offline
                                      Eric H @paulcarroty
                                      last edited by

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

                                      https://dpaste.com/6CTBE25DB

                                      • Ubuntu Touch for Xiaomi POCO X3 NFC Telegram group
                                      • Ubuntu Touch installation guide for Xiaomi POCO X3 NFC / X3
                                      paulcarrotyP 1 Reply Last reply Reply Quote 0
                                      • paulcarrotyP Offline
                                        paulcarroty @Eric H
                                        last edited by

                                        @Eric-H fixed.

                                        https://www.kremlingram.org/en

                                        Eric HE 1 Reply Last reply Reply Quote 0
                                        • Eric HE Offline
                                          Eric H @paulcarroty
                                          last edited by

                                          @paulcarroty
                                          Reinstalled.
                                          Does not work on surya.

                                          https://dpaste.com/G66MBRASC

                                          • Ubuntu Touch for Xiaomi POCO X3 NFC Telegram group
                                          • Ubuntu Touch installation guide for Xiaomi POCO X3 NFC / X3
                                          1 Reply Last reply Reply Quote 0
                                          • Eric HE Offline
                                            Eric H
                                            last edited by Eric H

                                            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

                                            • Ubuntu Touch for Xiaomi POCO X3 NFC Telegram group
                                            • Ubuntu Touch installation guide for Xiaomi POCO X3 NFC / X3
                                            paulcarrotyP 1 Reply Last reply Reply Quote 0
                                            • paulcarrotyP Offline
                                              paulcarroty @Eric H
                                              last edited by

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

                                              https://www.kremlingram.org/en

                                              Eric HE 1 Reply Last reply Reply Quote 0

                                              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                              With your input, this post could be even better 💗

                                              Register Login
                                              • First post
                                                Last post