• 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
60 Posts 11 Posters 4.4k 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.
    • E Offline
      Eric H @uxes
      last edited by 8 Jan 2025, 08:56

      @uxes It was just an idea.
      Sorry for the inconvenience.

      1 Reply Last reply Reply Quote 0
      • U Offline
        uxes
        last edited by 8 Jan 2025, 09:32

        Another reboot helped, now indicator works, we can mark miatoll as working, just needed two reboot not just one

        1 Reply Last reply Reply Quote 1
        • E Offline
          Eric H @Eric H
          last edited by 8 Jan 2025, 10:29

          @Eric-H said in Resurrection of Indicator Upower:

          /bin/sh: 1: cannot create /sys/class/power_supply/battery/charging_enabled: Permission denied

          @paulcarroty I'm currently experimenting a udev rules :

          # Set charging permissions so indicator-upower can access it
          ACTION=="add|change", SUBSYSTEM=="power_supply", KERNEL=="battery", RUN+="/bin/chmod 0666 /sys/class/power_supply/%k/charging_enabled"
          

          It seems to work. I will confirm later.

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

            🎉 New release arrived, thx to all contributors.

            www.kremlingram.org

            E 1 Reply Last reply 17 Jan 2025, 16:15 Reply Quote 2
            • E Offline
              Eric H @paulcarroty
              last edited by Eric H 17 Jan 2025, 16:15

              @paulcarroty
              I can see on github that v0.5 has been released.
              But only v0.4 seems to be available on the open store.

              P A 2 Replies Last reply 17 Jan 2025, 17:41 Reply Quote 0
              • P Offline
                paulcarroty @Eric H
                last edited by 17 Jan 2025, 17:41

                @Eric-H probably the store review still in progress.

                www.kremlingram.org

                E 1 Reply Last reply 17 Jan 2025, 18:17 Reply Quote 1
                • E Offline
                  Eric H @paulcarroty
                  last edited by 17 Jan 2025, 18:17

                  @paulcarroty
                  Ok.
                  Thanks for your work.

                  1 Reply Last reply Reply Quote 0
                  • A Offline
                    AppLee @Eric H
                    last edited by 18 Jan 2025, 11:55

                    Hi @Eric-H

                    Here is an explanation:
                    09d5ac03-86e8-4756-8f62-a5cdf4123b46-Screenshot_20250118_125401.png

                    E 1 Reply Last reply 19 Jan 2025, 13:06 Reply Quote 1
                    • E Offline
                      Eric H @AppLee
                      last edited by Eric H 19 Jan 2025, 13:06

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

                      U P 2 Replies Last reply 19 Jan 2025, 14:17 Reply Quote 0
                      • U Offline
                        uxes @Eric H
                        last edited by 19 Jan 2025, 14:17

                        @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
                        • P Offline
                          paulcarroty @Eric H
                          last edited by 21 Jan 2025, 08:19

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

                          www.kremlingram.org

                          E 1 Reply Last reply 21 Jan 2025, 08:30 Reply Quote 0
                          • E Offline
                            Eric H @paulcarroty
                            last edited by 21 Jan 2025, 08:30

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

                            E 1 Reply Last reply 23 Jan 2025, 08:23 Reply Quote 0
                            • E Offline
                              Eric H @Eric H
                              last edited by 23 Jan 2025, 08:23

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

                              E 1 Reply Last reply 24 Jan 2025, 19:31 Reply Quote 0
                              • E Offline
                                Eric H @Eric H
                                last edited by Eric H 24 Jan 2025, 19:31

                                @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

                                E 1 Reply Last reply 4 Feb 2025, 15:01 Reply Quote 0
                                • M Offline
                                  mihael
                                  last edited by 27 Jan 2025, 10:13

                                  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
                                  • 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
                                            • First post
                                              Last post