Closed manland closed 3 years ago
Hey @manland, mtkfusionrild
is the Android vendor RIL implementation (some info here) used by the Volla Phone's Mediatek chipset, and as far as I know that CPU usage is normal (keep in mind it's 16% of a single core total and not 16% of all 8 cores, you can visualize this better by installing and using htop
instead).
@NotKit could perhaps tell better, but I'm pretty much certain we aren't allowed to share the source code either for this daemon from the vendor BSP.
Update: An issue has been identified in a RIL related library by natur, a fix may be issued at a later time after it has been tested more extensively by us.
I'm figuring out how to deploy this fix to Ubuntu Touch
The fix will be available in devel channel in 4-8 hours.
Amazing :tada:
Just to be able to understand, can you share some links/repo/code please?
Ok, sure.
As you know, on Ubuntu Touch we use Android blobs. MTK ril daemon (which is responsible for SIM connection) is a part of Android blob.
MTK ril daemon is responsible for not only taking API calls from Ubuntu Touch, but for configuring hardware as well.
There are multiple threads inside this process. I debugged 3 of them.
First one is the VoLTE thread, which waits for VoLTE clients (not present on Ubuntu Touch). The second thread is waiting for the first one to be fully initialized (VoLTE client to be connected). The third one tries to send data to the second thread.
The issue is, that there is no VoLTE client (application, which will configure VoLTE feature) in Ubuntu Touch. All 3 threads are sleeping for 200 microseconds. However, it means that 5000 times per second each thread is waken up. On Linux, it means, that this thread, which is woken up, gets very high priority in CPU scheduler. It means that waking up so many time (3 * 5000 times per second) causes huge CPU usage.
What is a solution?
I decided to imlement #2 solution.
Solution number 2 is in proprietary Android blob - I can't share it.
Thank you very much for all this details.
And thank you (I have spying on your activity) to show me how android proprietary blob work with open source project. You have the code and publish only the compilation.
No problems.
The fix is present in devel channel - 326 is the first version, which includes the fix. @manland , could you please confirm, that bug is fixed?
@natur-produkt yes I confirm, after a week-end of use, no more mtkfusionrild!
Thank you very much :tada: :rocket:
Is this fix portable to UBPorts on Cosmo Communicator? Running latest devel (805) shows the same behavior for mtkfusionrild -l libmtk-ril.so: two instances of the process each, consuming ~8% CPU. This has the effect of constantly draining the battery.
Details about installed OS version Dev channel (before qt5.12 upgrade)
Describe the bug mtkfusionrild always use between 15% and 20% cpu. What is it purpose? Where is code to look at it? Is it normal?
Steps to reproduce the bug (The following is an example:)
Screenshot
Additional context Use my volla as main driver so I have sim inserted and wifi always on. But even in fly mode mtkfusiond run.