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

    FP4 idle battery use varies a lot depending on 2G, 3G or 4G setting. Why?

    Scheduled Pinned Locked Moved Unsolved Support
    15 Posts 2 Posters 539 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.
      • lduboeufL Offline
        lduboeuf @janmv
        last edited by

        @janmv i don't know well that part, but that is the layer between Android and Ofono.

        1 Reply Last reply Reply Quote 0
        • lduboeufL Offline
          lduboeuf @janmv
          last edited by lduboeuf

          @janmv i've ask the team. Apparently FastDormancy is handled natively under ofono

          lduboeufL 1 Reply Last reply Reply Quote 0
          • lduboeufL Offline
            lduboeuf @lduboeuf
            last edited by

            said in FP4 idle battery use varies a lot depending on 2G, 3G or 4G setting. Why?:

            @janmv i've ask the team. Apparently FastDormancy is handled natively under ofono

            the componebt itself is called ofono-binder-plugin

            1 Reply Last reply Reply Quote 0
            • J Offline
              janmv
              last edited by

              Thanks. I'll check there if I can find why FastDormancy does not seem to be implemented.

              1 Reply Last reply Reply Quote 0
              • J Offline
                janmv
                last edited by

                It appears that the RIL-modem-software has no implementation of setting fast dormancy.

                The FP4 has five plugins installed in folder /usr/lib/aarch64-linux-gnu/ofono-sailfish/plugins:

                -rw-r--r-- 1 root root  19176 Aug 23  2023 apndbplugin.so
                -rw-r--r-- 1 root root 367264 Oct  7  2024 binderplugin.so
                -rw-r--r-- 1 root root  70592 Sep 25  2024 mtkbinderpluginext.so
                -rw-r--r-- 1 root root   6096 Nov 19  2023 rilbinderplugin.so
                -rw-r--r-- 1 root root 320424 Aug 23  2023 rilplugin.so
                

                The packaging information in gitlab/ubports/development/core/packaging says that sources of binderplugin, rilbinderplugin and rilplugin are available at mer-hybris at github. (I suppose the other two plugins are not related to setting fast dormancy.)

                An ofono plugin initializes driver methods when it is registered. Radio settings are initialized in this struct (defined in sailfishos/ofono/.../ofono/include/radio-settings.h):

                struct ofono_radio_settings_driver {
                   (...)
                   void (*query_fast_dormancy)(...)
                   void (*set_fast_dormancy)(...)
                   (...)
                }
                

                In the mer-hybris binderplugin this structure is initialized (ofono-binder-plugin/src/binder_radio_settings.c line 234):

                binder_radio_settings_init() {
                   ofono_radio_settings_driver_register(&binder_radio_settings_driver);
                }
                

                but binder_radio_settings_driver does not provide fast dormancy methods (line 224). It only sets:

                static const struct ofono_radio_settings_driver binder_radio_settings_driver = {
                	.name                 = BINDER_DRIVER,
                	.probe                = binder_radio_settings_probe,
                	.remove               = binder_radio_settings_remove,
                	.query_rat_mode       = binder_radio_settings_query_rat_mode,
                	.set_rat_mode         = binder_radio_settings_set_rat_mode,
                	.query_available_rats = binder_radio_settings_query_available_rats
                };
                

                As a result, radio_set_property_handler() in ofono/src/radio-settings.c (line 658) returns "Not implemented":

                if (rs->driver->set_fast_dormancy == NULL)
                	return __ofono_error_not_implemented(msg);
                

                There are other repositories on github with the same code, but none of them provide fast dormancy methods.

                Now what could be next? Of course I could be overlooking things. Is my conclusion right (RIL modem software does not implement fast dormancy)? If so, is it worth fixing? I'd say yes, as the difference in battery usage is large and 2G/3G are being phased out. And if it is worth fixing, then where? The ofono-binder-plugin repository is active. Would this be the place to ask? @lduboeuf can I have your advice once more?

                lduboeufL 1 Reply Last reply Reply Quote 1
                • lduboeufL Offline
                  lduboeuf @janmv
                  last edited by

                  @janmv
                  sorry, i don't know the full story.
                  Some say that that modern drivers implement it directly, so not needed on upper stack.

                  Maybe could be something to ask for next Q&A or directly in repository has you said.

                  1 Reply Last reply Reply Quote 0
                  • J Offline
                    janmv
                    last edited by

                    @lduboeuf I'll formulate a question for next Q&A-session. There is probably more to know and to consider than just a driver which could be implemented more completely.
                    I can still bring up the issue in the ofono-binder-plugin repository later.
                    Thanks!

                    lduboeufL 2 Replies Last reply Reply Quote 1
                    • lduboeufL Offline
                      lduboeuf @janmv
                      last edited by

                      @janmv said in FP4 idle battery use varies a lot depending on 2G, 3G or 4G setting. Why?:

                      @lduboeuf I'll formulate a question for next Q&A-session. There is probably more to know and to consider than just a driver which could be implemented more completely.
                      I can still bring up the issue in the ofono-binder-plugin repository later.
                      Thanks!

                      thanks for working on it 🙂

                      1 Reply Last reply Reply Quote 0
                      • lduboeufL Offline
                        lduboeuf @janmv
                        last edited by

                        @janmv

                        on core dev Telegram channel,
                        There is ongoing discussion about the FastDormancy thing. It appears something is not correctly working, you can follow here:

                        https://t.me/ubports_devel/94429

                        J 1 Reply Last reply Reply Quote 0
                        • J Offline
                          janmv @lduboeuf
                          last edited by

                          @lduboeuf Thank you Lionel. I was already following the discussion in the UT-FP4 Telegram group on the same topic, but I was not aware of this one in Core Dev. Same contributors 😉

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