diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5bee6de --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +__pycache__ +/.vscode +/build diff --git a/LICENSE b/LICENSE index f288702..d627c15 100644 --- a/LICENSE +++ b/LICENSE @@ -1,674 +1,191 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2021-2022 Matt Yang + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/NOTICE b/NOTICE new file mode 100644 index 0000000..d69ae5d --- /dev/null +++ b/NOTICE @@ -0,0 +1,788 @@ +uperf + +THIRD-PARTY SOFTWARE NOTICES AND INFORMATION +Do Not Translate or Localize + +This project incorporates components from the projects listed below. The original copyright notices and the licenses under are set forth below. Reserves all rights not expressly granted herein, whether by implication, estoppel or otherwise. + +1. jpcre2/jpcre2 version 10.32.01 (https://github.com/jpcre2/jpcre2) +2. nlohmann/json version 3.10.4 (https://github.com/nlohmann/json) +3. PhilipHazel/pcre2 version 10.39 (https://github.com/PhilipHazel/pcre2) +4. eliaskosunen/scnlib version 0.4.0 (https://github.com/eliaskosunen/scnlib) +5. gabime/spdlog version 1.9.2 (https://github.com/gabime/spdlog) +6. osm0sis/android-busybox-ndk 1.31.1 (https://github.com/osm0sis/android-busybox-ndk) + +%% jpcre2/jpcre2 NOTICES AND INFORMATION BEGIN HERE +========================================= +JPCRE2 LICENCE +------------- + +JPCRE2 is a wrapper for PCRE2 library which supports regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. + +JPCRE2 is distributed under the terms of the "BSD" licence, as +specified below. The test source files (prefixed 'test' in their name) +are not copyrighted and are in the public domain. + +The basic library functions are written in C++ and are dependent upon the +original PCRE2 library. + +THE BASIC LIBRARY FUNCTIONS/CLASSES +----------------------------------- + +Written by: Md Jahidul Hamid +Email local part: jahidulhamid +Email domain: yahoo.com + + +Copyright (c) Md Jahidul Hamid. + + +THE "BSD" LICENCE +----------------- + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * The names of its contributors may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +Disclaimer: + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +End +========================================= +END OF jpcre2/jpcre2 NOTICES AND INFORMATION + +%% nlohmann/json NOTICES AND INFORMATION BEGIN HERE +========================================= +MIT License + +Copyright (c) 2013-2022 Niels Lohmann + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +========================================= +END OF nlohmann/json NOTICES AND INFORMATION + +%% PhilipHazel/pcre2 NOTICES AND INFORMATION BEGIN HERE +========================================= +PCRE2 LICENCE +------------- + +PCRE2 is a library of functions to support regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. + +Releases 10.00 and above of PCRE2 are distributed under the terms of the "BSD" +licence, as specified below, with one exemption for certain binary +redistributions. The documentation for PCRE2, supplied in the "doc" directory, +is distributed under the same terms as the software itself. The data in the +testdata directory is not copyrighted and is in the public domain. + +The basic library functions are written in C and are freestanding. Also +included in the distribution is a just-in-time compiler that can be used to +optimize pattern matching. This is an optional feature that can be omitted when +the library is built. + + +THE BASIC LIBRARY FUNCTIONS +--------------------------- + +Written by: Philip Hazel +Email local part: Philip.Hazel +Email domain: gmail.com + +Retired from University of Cambridge Computing Service, +Cambridge, England. + +Copyright (c) 1997-2021 University of Cambridge +All rights reserved. + + +PCRE2 JUST-IN-TIME COMPILATION SUPPORT +-------------------------------------- + +Written by: Zoltan Herczeg +Email local part: hzmester +Email domain: freemail.hu + +Copyright(c) 2010-2021 Zoltan Herczeg +All rights reserved. + + +STACK-LESS JUST-IN-TIME COMPILER +-------------------------------- + +Written by: Zoltan Herczeg +Email local part: hzmester +Email domain: freemail.hu + +Copyright(c) 2009-2021 Zoltan Herczeg +All rights reserved. + + +THE "BSD" LICENCE +----------------- + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notices, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notices, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of any + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + + +EXEMPTION FOR BINARY LIBRARY-LIKE PACKAGES +------------------------------------------ + +The second condition in the BSD licence (covering binary redistributions) does +not apply all the way down a chain of software. If binary package A includes +PCRE2, it must respect the condition, but if package B is software that +includes package A, the condition is not imposed on package B unless it uses +PCRE2 independently. + +End +========================================= +END OF PhilipHazel/pcre2 NOTICES AND INFORMATION + +%% eliaskosunen/scnlib NOTICES AND INFORMATION BEGIN HERE +========================================= + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +========================================= +END OF eliaskosunen/scnlib NOTICES AND INFORMATION + +%% gabime/spdlog NOTICES AND INFORMATION BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) 2016 Gabi Melman. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +-- NOTE: Third party dependency used by this software -- +This software depends on the fmt lib (MIT License), +and users must comply to its license: https://github.com/fmtlib/fmt/blob/master/LICENSE.rst +========================================= +END OF gabime/spdlog NOTICES AND INFORMATION + +%% osm0sis/android-busybox-ndk NOTICES AND INFORMATION BEGIN HERE +========================================= +--- A note on GPL versions + +BusyBox is distributed under version 2 of the General Public License (included +in its entirety, below). Version 2 is the only version of this license which +this version of BusyBox (or modified versions derived from this one) may be +distributed under. + +------------------------------------------------------------------------ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. +========================================= +END OF osm0sis/android-busybox-ndk NOTICES AND INFORMATION diff --git a/README.md b/README.md index b2458ac..8bcc78d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,3 @@ -# FeraVolt edit for FDE.AI - # Uperf 一个Android用户态性能控制器,实现大部分内核态升频功能,并支持更多情景识别。 @@ -13,9 +11,9 @@ - 监听cpuset分组更新操作,识别正在操作的APP发生切换 - 监听唤醒锁更新操作,识别屏幕是否熄灭 - 监听注入到Surfaceflinger的hook发送的通知,识别渲染开始、滞后、结束 -- 支持Android 6.0 - 10 -- 支持armeabi-v7a,arm64-v8a -- 支持Magisk方式一键安装,版本不低于18.0 +- 支持Android 6.0 - 12 +- 支持arm64-v8a +- 支持Magisk方式一键安装,版本不低于20.4+ - 不依赖于Magisk,可以手动方式安装 - 除非SfAnalysis注入失败,大多数情况SELinux可保持`enforcing` - 不依赖于任何Android应用层框架以及第三方内核 @@ -30,7 +28,7 @@ https://github.com/yc9559/uperf/releases ### Magisk方式 1. 下载后通过Magisk Manager刷入,Magisk版本不低于18.0 -2. 重启后查看`/sdcard/yc/uperf/log_uperf.txt`检查uperf是否正常自启动 +2. 重启后查看`/sdcard/Android/yc/uperf/uperf_log.txt`检查uperf是否正常自启动 ### 手动安装 @@ -42,17 +40,19 @@ https://github.com/yc9559/uperf/releases 6. 打开`/data/cache/injector.log`,检查sfanalysis注入是否成功 7. 如果关联自启动到第三方APP,设置在开机完成后执行`run_uperf.sh` 8. 如果关联自启动到系统启动脚本,插入`sh /data/uperf/initsvc_uperf.sh` -9. 重启后查看`/sdcard/yc/uperf/log_uperf.txt`检查uperf是否正常自启动 +9. 重启后查看`/sdcard/yc/uperf/uperf_log.txt`检查uperf是否正常自启动 ### 性能模式切换 #### 修改启动时的默认性能模式 -1. 打开`/sdcard/yc/uperf/panel_uperf.txt` -2. 修改`default_mode=balance`, 其中`balance`为开机后使用的默认性能模式,可选的模式有: +1. 打开`/sdcard/Android/yc/uperf/cur_powermode.txt` +2. 修改`auto`, 其中`auto`为开机后使用的默认性能模式,可选的模式有: + - `auto`根据正在使用的App进行动态响应 - `balance`均衡模式,比原厂略流畅的同时略省电 - `powersave`卡顿模式,保证基本流畅的同时尽可能降低功耗 - `performance`费电模式,保证费电的同时多一点流畅度 + - `fast`性能模式,相对于均衡模式更加激进 3. 重启 #### 启动完成后切换性能模式 @@ -61,7 +61,7 @@ https://github.com/yc9559/uperf/releases 执行`sh /data/powercfg.sh balance`,其中`balance`是想要切换到的性能模式名称。 方法2: -安装[微工具箱](https://www.coolapk.com/apk/com.omarea.vtools)为APP绑定对应的性能模式。 +安装[Scene](https://www.coolapk.com/apk/com.omarea.vtools)为APP绑定对应的性能模式。 ## 常见问题 @@ -119,14 +119,21 @@ A:此硬件平台没有预制的配置文件,可能需要自行适配。 ### 情景识别 +注:v3版本已经修改,此部分不适用 Uperf支持如下几种情景识别: - `None`,无Hint的常规状态 +- `Touch`,触摸到屏幕切换的Hint +- `Pressed`,长按时切换的的Hint - `Tap`,在刚触摸到屏幕切换的Hint - `Swipe`,在屏幕滑动一段距离后切换的Hint - `HeavyLoad`,在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap -- `AndroidAM`,在ActivityManager活跃时触发的Hint,例如无input事件的屏下指纹解锁 -- `Standby`,屏幕熄灭时的Hint,一般滞后20秒 -- `SfLag`,给Surfaceflinger的渲染提交出现滞后的Hint +- `SfLag`,给Surfaceflinger的渲染提交出现滞后切换的Hint +- `SfBoost`,Surfaceflinger的渲染提交需要加速切换的Hint +- `Standby`,屏幕熄灭时的Hint,一般滞后20秒(隐藏Hint) +- `SsAnim`,系统动画播放切换的Hint +- `WakeUp`,亮屏解锁切换的Hint + + #### 触摸信号识别 @@ -160,7 +167,7 @@ Sfanalysis是一个独立于Uperf的模块,注入到surfaceflinger进行修改 ![检测到渲染延迟立即拉升CPU频率](./media/sflag.png) -渲染提交滞后对应的Hint`SfLag`与重负载一样,有调用频率限制避免长时间拉升高频,相关参数暂时没有开放更改。`SfLag`使用可用次数缓冲池控制调用频率,每满400ms间隔可用次数+1,最大到20次。为了避免不必要的频率拉升,只允许从`Tap`、`Swipe`、`AndroidAM`转移到`SfLag`。SfAnalysis正常工作后在日志以如下方式体现: +渲染提交滞后对应的Hint`SfLag`与重负载一样,有调用频率限制避免长时间拉升高频,相关参数暂时没有开放更改。`SfLag`使用可用次数缓冲池控制调用频率,每满400ms间隔可用次数+1,最大到20次。为了避免不必要的频率拉升,只允许从`Tap`、`Swipe`、`Touch`、`Pressed`转移到`SfLag`。SfAnalysis正常工作后在日志以如下方式体现: ``` [13:03:36][I] SfAnalysis: Surfaceflinger analysis connected ``` @@ -552,4 +559,4 @@ UFS节能开关的`sysfs`节点路径为`/sys/devices/platform/soc/1d84000.ufshc 如果你实在愿意,下面是感谢云讨饭通道(备注写上你的ID和来源平台): -![](media/alipay-qr.png) +![](media/alipay-qr.png) \ No newline at end of file diff --git a/changelog.md b/changelog.md new file mode 100644 index 0000000..da9cd7b --- /dev/null +++ b/changelog.md @@ -0,0 +1,106 @@ +# 更新日志 + +## DEV 22.07.09 + +- 新增 sdm8g1+支持 +- 改进 任务放置 +- 改进 功耗估计准确度 + +## DEV 22.06.26 + +- 新增 移除`swjunk` +- 改进 功耗分配 +- 改进 任务放置 +- 修复 后台程序破音 + +## DEV 22.06.05 + +- 新增 更多兼容性CPU频率写入器 +- 新增 兼容性生成CPU频率表 +- 修复 微信小程序启动缓慢 +- 修复 前台程序破音 +- 修复 部分崩溃问题 +- 修复 部分高通平台息屏功耗过高,感谢@NepPoseidon + +## DEV 22.05.20 + +- 新增 开放配置文件自定义 +- 改进 CPU重负载调频稳定性 +- 改进 任务放置 +- 改进 顶层APP获取开销,感谢@nakixii +- 修复 perapp切换崩溃 +- 修复 部分潜在崩溃代码 +- 修复 CPU频率写入器失效 + +## DEV 22.05.09 + +- 回退 混合CPU调频 +- 改进 触摸响应 +- 改进 CPU负载滤波器 +- 修复 sdm82x部分场景CPU频率无法写入 +- 修复 Exynos 2200支持 + +## DEV 22.05.04 + +- 新增 混合CPU调频 +- 改进 Android 7.0兼容性 +- 修复 EPIC写入器自检错误 +- 修复 全面屏手势失效,感谢@NebulaLeep +- 暂时禁用SsAnalysis模块,由于降低了过渡动画流畅度 + +## DEV 22.04.30 + +- 改进 提高滑动操作跟手性 +- 改进 内核CPU调速器兼容性 +- 修复 部分设备全面屏手势失效 +- 修复 Pixel设备自动重启 +- 修复 任务调度器任务分类错误 +- 修复 游戏负载放置不稳定 +- 修复 游戏最小化破音 + +## DEV 22.04.23 + +- 增加 系统动画主动探针 +- 增加 CPU采样器负载预测 +- 增加 与系统用户态性能控制器协同调度 +- 增加 桌面启动器自动识别 +- 增加 适配谷歌tensor/天玑810 +- 改进 提高手势操作跟手性 +- 改进 减少SfAnalysis误报 +- 修复 识别上下文的任务调度器规则匹配错误 +- 修复 联发科PPM接口适配 +- 修复 破音问题 +- 修复 部分平台功耗模型 + +## DEV 22.04.09 + +- 增加大量平台初步适配 +- 改进Unity游戏和吃鸡游戏抖动 +- 改进弹幕2倍速视频流畅度 +- 更新部分平台功耗模型 +- 日志后缀名更换为txt + +## DEV 22.04.04 + +- 插件式软件架构 + - 使用C++重新开发 + - 功能模块解耦,易扩展 +- 感知能耗的CPU调频器 + - 用户态使能全平台统一体验 + - 单核高性能,多核高能效 + - 20-100hz基础采样率,快响应低开销 +- 识别上下文的任务调度器 + - UI放大核,非关键放小核 + - 全数据驱动,正则匹配 + - 花费50%开发时间调试的默认规则 +- 动态sysfs写入 + - 用户态性能控制器基石功能 + - 实现更加简约高效 +- SfAnalysis + - 预测掉帧并在发生前拉升CPU + - 改进的帧反馈以及模糊匹配 + - patch方式无需更改SELinux状态 + - 独立选装,但是强烈推荐 +- SsAnalysis + - 跟系统线程放置器斗智斗勇 + - 独立选装,但是强烈推荐 diff --git a/config/README.md b/config/README.md new file mode 100644 index 0000000..580fa83 --- /dev/null +++ b/config/README.md @@ -0,0 +1,376 @@ +# Uperf v3 配置文件说明 + +Uperf v3 使用插件化的软件结构设计,每个功能模块均可拥有独立的配置参数空间。 + +## meta/元信息 + +| 字段 | 类型 | 描述 | +| ------ | ------ | ------------------ | +| name | string | 配置文件的名称 | +| author | string | 配置文件的作者信息 | + +## modules/模块定义 + +功能模块的静态参数段,仅在模块实例化时读取一次,用于开关功能、定义模型参数等。 + +### switcher/动态配置切换器 + +根据关联的 native 层信号,跳转对应的 hint 状态切换,应用对应的动态参数,并持续指定时长。用户可定义多个性能配置,每个性能配置有各个 hint 的动态参数。动态参数的默认值定义在`/initials`,动态参数的动态值定义在`/presets`。如果在写入`/presets`定义了`powersave`和`balance`两个性能配置,那么`switchInode`文件允许写入`auto`、`powersave`和`balance`,其中`auto`表示启用`内置分APP性能配置切换器`。 + +注:由于是基础模块,此模块**不可关闭**。 + +内置分 APP 性能配置切换器的规则样例如下,包名按大小写敏感的全字匹配。行首为`*`表示默认规则,行首为`-`表示熄屏规则,**必须包含默认和熄屏规则**。 + +``` +# 分应用性能模式配置 +# Per-app dynamic power mode rule +# '-' means offscreen rule +# '*' means default rule + +com.miHoYo.Yuanshen fast +- balance +* balance +``` + +| 字段 | 类型 | 描述 | +| ------------ | ------ | ------------------------------ | +| switchInode | string | 监听手动切换性能模式的文件节点 | +| perapp | string | 内置分 APP 性能配置文件路径 | +| hintDuration | object | 每个 hint 的最长持续时间 | + +#### hintDuration/hint 最长持续时间 + +各个 hint 使用状态机完成跳转,状态转移图如下: + +```mermaid +stateDiagram-v2 + +[*] --> idle +idle --> touch: pressed touch / pressed button +idle --> switch: woke up screen +touch --> trigger: released touch / started scrolling +touch --> gesture: detected fullscreen gesture +touch --> switch: detected window animation +touch --> junk: detected junk +gesture --> switch: detected window animation +gesture --> junk: detected junk +junk --> touch: timeout / finished junk +trigger --> touch: timeout / not rendering +gesture --> touch: timeout / not rendering +switch --> touch: timeout / not rendering +touch --> idle: timeout / not rendering +``` + +| 字段 | 类型 | 描述 | +| ------- | ----- | -------------------------------------------------- | +| idle | float | (单位:秒)默认 | +| touch | float | (单位:秒)触摸屏幕/按下按键 | +| trigger | float | (单位:秒)点击操作离开屏幕/松开按键/滑动操作起始 | +| gesture | float | (单位:秒)全面屏手势 | +| switch | float | (单位:秒)应用切换动画/点亮屏幕 | +| junk | float | (单位:秒)touch/gesture 中 sfanalysis 检测到掉帧 | + +### atrace/数据打点 + +用于 uperf 程序调试。 + +| 字段 | 类型 | 描述 | +| ------ | ---- | ------------ | +| enable | bool | 启用数据打点 | + +### log/日志级别 + +用于 uperf 配置文件调试。 + +| 字段 | 类型 | 描述 | +| ----- | ------ | ----------------------------------------------------- | +| level | string | 日志级别,可用`err`、`warn`、`info`、`debug`、`trace` | + +### input/用户输入监听 + +监听用户触摸屏触摸操作、按键操作、鼠标操作。支持输入设备热插拔。 + +| 字段 | 类型 | 描述 | +| ---------------- | ----- | ------------------------------------------------ | +| enable | bool | 启用用户输入监听 | +| swipeThd | float | 单次触摸轨迹百分比长度超过该阈值,判定为滑动操作 | +| gestureThdX | float | 全面屏手势起始 X 轴百分比位置 | +| gestureThdY | float | 全面屏手势起始 Y 轴百分比位置 | +| gestureDelayTime | float | 暂不使用 | +| holdEnterTime | float | 暂不使用 | + +### sfanalysis/SurfaceFlinger 信号分析 + +接收 sfanalysis 模块在 SurfaceFlinger 内部的信号分析结果。检测到掉帧触发 hint,渲染结束提前结束 hint。 + +| 字段 | 类型 | 描述 | +| ------------------- | ----- | ------------------------------------------------ | +| enable | bool | 启用 SurfaceFlinger 信号分析 | +| renderIdleSlackTime | float | (单位:秒)渲染结束保持一段时间,判定为渲染结束 | + +### cpu/用户态 CPU 调频 + +基于能耗模型的用户态 CPU 调频器,使能 HMP/EAS 全平台统一体验。根据功耗模型计算每个频点的每瓦性能,选择最佳的频率限制。 + +| 字段 | 类型 | 描述 | +| ---------- | ------ | ------------------- | +| enable | bool | 启用用户态 CPU 调频 | +| powerModel | object | CPU 能耗模型 | + +#### powerModel/能耗模型 + +仅需一组实测数据即可完成标定。经验模型结合实测数据,保持模型精度并显著减少平台适配工作量。类型为对象列表,与 CPU 集群顺序一致。 + +注:**典型频点并非调频最大值**,大于典型频点的功耗使用模型外插计算。 + +| 字段 | 类型 | 描述 | +| ------------ | ----- | --------------------------------------------- | +| efficiency | int | 单核相对同频性能(以Cortex-A53@1.0Ghz为 100) | +| nr | int | 集群内核心数量 | +| typicalPower | float | (单位:瓦)单核典型功耗 | +| typicalFreq | float | (单位:千兆赫)单核典型频点 | +| sweetFreq | float | (单位:千兆赫)单核甜点交界频点 | +| plainFreq | float | (单位:千兆赫)单核线性交界频点 | +| freeFreq | float | (单位:千兆赫)单核最低功耗频点 | + +### sysfs/内核节点写入器 + +用户态性能控制器的核心功能,为不同场景设置不同的内核参数。此模块高度优化,写入目标值开销极低。 + +| 字段 | 类型 | 描述 | +| ------ | ------ | ------------------ | +| enable | bool | 启用内核节点写入器 | +| knob | object | 内核节点定义 | + +#### knob/内核节点定义 + +按键值对定义: + +- 键:内核节点名称 +- 值:内核节点文件路径 + +例子: + +```json +"cpusetTa": "/dev/cpuset/top-app/cpus" +``` + +### sched/识别上下文的任务调度器 + +在相同的能耗下,改进 QoS 提升用户感知的流畅度。正则匹配进程名和线程名,绑定到指定的 CPU 核心,并设置指定的调度优先级。此模块高度优化,进程扫描和动态规则应用开销极低。 + +识别上下文的任务调度器定义有如下场景: + +- `bg`:进程处于后台 +- `fg`:进程处于前台 +- `idle`:进程处于顶层可见,默认场景 +- `touch`:进程处于顶层可见,交互场景 +- `boost`:进程处于顶层可见,重负载场景 + +| 字段 | 类型 | 描述 | +| -------- | ------ | -------------------------- | +| enable | bool | 启用识别上下文的任务调度器 | +| cpumask | object | CPU 组定义 | +| affinity | object | CPU 亲和性类别定义 | +| prio | object | 调度优先级类别定义 | +| rules | object | 进程规则 | + +#### cpumask/CPU 组定义 + +按键值对定义: + +- 键:CPU 组名称 +- 值:此 CPU 组包含的 CPU 核心 id 列表 + +例子: + +```json +"perf": [4, 5, 6, 7] +``` + +#### affinity/CPU 亲和性类别定义 + +按键值对定义: + +- 键:CPU 亲和性类别名称 +- 值:每个场景绑定到的`cpumask` + +例子: + +```json +"coop": { + "bg": "eff", + "fg": "eff", + "idle": "norm", + "touch": "norm", + "boost": "norm" +} +``` + +#### prio/调度优先级类别定义 + +按键值对定义: + +- 键:调度优先级类别名称 +- 值:每个场景应用的调度优先级,值定义如下 + +| 数值 | 描述 | +| ------- | ------------------------------------------------------ | +| 0 | 跳过 SCHED 类别设置 | +| 1~98 | 设置线程调度类别为`SCHED_FIFO`,数值为实时静态优先级 | +| 100~139 | 设置线程调度类别为`SCHED_NORMAL`,数值为实时静态优先级 | +| -1 | 设置线程调度类别为`SCHED_NORMAL` | +| -2 | 设置线程调度类别为`SCHED_BATCH` | +| -3 | 设置线程调度类别为`SCHED_IDLE` | + +例子: + +```json +"high": { + "bg": -3, + "fg": 110, + "idle": 104, + "touch": 102, + "boost": 100 +} +``` + +#### rules/进程规则 + +类型为对象列表,与匹配优先级顺序一致。 + +注:正则匹配规则`/HOME_PACKAGE/`在内部会自动替换为当前系统启动器的包名。 + +| 字段 | 类型 | 描述 | +| ------ | ------ | -------------------------------------------- | +| name | string | 进程规则名 | +| regex | string | 进程名正则匹配规则,注意不要与 json 语法冲突 | +| pinned | bool | 始终作为`处于顶层可见的进程`应用规则 | +| rules | object | 此进程的线程规则 | + +##### rules/线程规则 + +类型为对象列表,与匹配优先级顺序一致。 + +注:正则匹配规则`/MAIN_THREAD/`在内部会自动替换为主线程线程名。 + +| 字段 | 类型 | 描述 | +| ---- | ------ | ----------------------------------------------------------------------- | +| k | string | 线程名正则匹配规则,注意不要与 json 语法冲突(abbr: keyword) | +| ac | string | 线程的 CPU 亲和性类别,需要在`affinity`预先定义(abbr: affinity class) | +| pc | string | 线程的调度优先级类别,需要在`prio`预先定义(abbr: priority class) | + +## initials/初始值 + +功能模块的动态参数段,模块初始化完成后可动态切换,用于调整阈值、模块行为倾向性等。在此段定义的值为该模块参数的默认值。 + +### cpu/用户态 CPU 调频 + +基于能耗模型的用户态 CPU 调频器工作流程如下,提供多个可调节参数: + +1. 从内核周期性采样 CPU 每个核心的负载 + - CPU 整体存在一定负载时,以`baseSampleTime`周期采样 CPU 频率,提高响应速度 + - CPU 整体进入空载时,以`baseSlackTime`周期采样 CPU 频率,减少轮询开销 +2. 计算每个集群的性能负载和性能需求 + - 如果 CPU 集群最大负载增加量大于`predictThd`,则性能需求计算使用预测的负载值 + - 根据性能负载计算性能需求,`demand = load + (1 - load) * (margin + burst)` + - 与`margin`不同,`burst`非零时即使当前负载较低也能计算到较大的性能需求 +3. 计算性能需求对应的工作频点 + - CPU 整体如果存在多个集群,它们共享整个`latencyTime`,表示从性能最低的集群的最低频到性能最高的集群的最高频率的最小延迟 + - 由于离散采样周期的存在,实测 CPU 整体升频最小延迟一般会大于设定的`latencyTime` + - 能耗代价越大的频点,升频到它的延迟也越大,且低于`sweetFreq`的频点没有额外的升频延迟 +4. 限制 CPU 整体的功耗 + - 类似于 Intel 处理器的 PL1 和 PL2 功耗限制,兼顾短期爆发性能需求和长期能效需求 + - 根据能耗模型和每个核心的负载,估计当前周期 CPU 整体的能耗值 + - 如果当前能耗大于`slowLimitPower`,能耗缓冲池余量减少 + - 如果当前能耗小于`slowLimitPower`,能耗缓冲池余量增加,并按照`fastLimitRecoverScale`缩放因子恢复,总量不超过`fastLimitCapacity` + - 限制 CPU 功耗根据能耗模型选择最优频率限制,在限定功耗下提供最佳整体性能 + - `burst`非零时忽略`fastLimitPower`和`slowLimitPower`限制 +5. 引导任务调度器放置任务 + - 启用`guideCap`后,根据能耗模型调节集群性能容量,引导 EAS 任务调度器把任务放置到能效最佳的集群 + - 启用`limitEfficiency`后,低性能集群最大频点能效值不高于高性能集群当前频点的能效值 +6. 写入目标 CPU 频率到内核 + - 高效的 CPU 频率写入器,用户态 CPU 调频整体周期运行耗时大约为 0.0005 秒 + +| 字段 | 类型 | 描述 | +| --------------------- | ----- | -------------------------------------------------------------------------------------------- | +| baseSampleTime | float | (单位:秒)(0.01~0.5)基础采样周期 | +| baseSlackTime | float | (单位:秒)(0.01~0.5)闲置采样周期,CPU 整体进入空载时生效 | +| latencyTime | float | (单位:秒)(0.0~10.0)CPU 整体升频最小延迟 | +| slowLimitPower | float | (单位:瓦)(0.05~999.0)CPU 长期功耗限制 | +| fastLimitPower | float | (单位:瓦)(0.05~999.0)CPU 短期功耗限制,能耗缓冲池消耗完毕后进入长期功耗限制 | +| fastLimitCapacity | float | (单位:瓦秒)(0.0~999.0)CPU 短期功耗限制容量,增加时重置余量为限制容量 | +| fastLimitRecoverScale | float | (0.1~10.0)CPU 短期功耗限制容量恢复缩放因子 | +| predictThd | float | (0.1~1.0)CPU 集群最大负载增加量大于该阈值,则集群调频使用预测的负载值,并忽略`latencyTime` | +| margin | float | (0.0~1.0)调频提供的性能余量 | +| burst | float | (0.0~1.0)调频提供的额外性能余量,非零时忽略`latencyTime`和功耗限制 | +| guideCap | bool | 启用引导 EAS 任务调度负载转移 | +| limitEfficiency | bool | 启用 CPU 整体能效限制 | + +### sysfs/内核节点写入器 + +按键值对定义: + +- 键:内核节点名称 +- 值:内核节点文件写入值,支持`string`和`int`类型 + +例子: + +```json +"cpusetTa": "0-7" +``` + +### sched/识别上下文的任务调度器 + +| 字段 | 类型 | 描述 | +| ----- | ------ | -------------------------------------------------------- | +| scene | string | 进程处于顶层可见的场景,合法值有`idle`, `touch`, `boost` | + +## presets/参数预设 + +功能模块的参数预设段,在这里定义不同的性能模式,如均衡模式、节能模式。 + +每组参数预设必须包含`*`, `idle`, `touch`, `trigger`, `gesture`, `junk`, `switch`,如下样例所示。参数预设中子配置名称定义同[动态配置切换器](#switcher/动态配置切换器),在状态跳转后应用对应模式的动态参数。其中`*`中的参数为该组参数预设的动态参数默认值。 + +```json +"balance": { + "*": { + }, + "idle": { + }, + "touch": { + }, + "trigger": { + }, + "gesture": { + }, + "junk": { + }, + "switch": { + } +} +``` + +为了提高参数预设的可读性,参数值采用`层叠样式表`的设计方式。以下示例展示参数值`cpu.baseSampleTime`的覆盖关系: + +1. 在`/initial/cpu`中定义`baseSampleTime`全局默认值为`0.01` +2. 在`/presets/balance/*`中定义`baseSampleTime`在该参数预设默认值为`0.02`,覆盖全局默认值`0.01` +3. 在`/presets/balance/idle`中定义`baseSampleTime`在`idle`场景值为`0.04`,覆盖该参数预设默认值`0.02` + +``` +"initials": { + "cpu": { + "baseSampleTime": 0.01, + } +}, +"presets": { + "balance": { + "*": { + "cpu.baseSampleTime": 0.02 + }, + "idle": { + "cpu.baseSampleTime": 0.04 + } + } +} +``` diff --git a/config/template.json b/config/template.json new file mode 100644 index 0000000..5f37be6 --- /dev/null +++ b/config/template.json @@ -0,0 +1,329 @@ +{ + "meta": { + "name": "platform[yy.mm.dd]", + "author": "author@community" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [] + }, + "sysfs": { + "enable": true, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [0, 1, 2, 3, 4, 5, 6, 7], + "c0": [0, 1, 2, 3], + "c1": [4, 5, 6], + "c2": [7] + }, + "affinity": { + "auto": { "bg": "", "fg": "", "idle": "", "touch": "", "boost": "" }, + "norm": { "bg": "", "fg": "all", "idle": "all", "touch": "all", "boost": "all" }, + "bg": { "bg": "", "fg": "c0", "idle": "c0", "touch": "c0", "boost": "c0" }, + "ui": { "bg": "", "fg": "all", "idle": "c1", "touch": "c1", "boost": "all" }, + "crit": { "bg": "", "fg": "all", "idle": "all", "touch": "c1", "boost": "c1" }, + "gtcoop": { "bg": "", "fg": "all", "idle": "all", "touch": "c1", "boost": "all" }, + "gtmain": { "bg": "", "fg": "all", "idle": "all", "touch": "c2", "boost": "all" } + }, + "prio": { + "auto": { "bg": 0, "fg": 0, "idle": 0, "touch": 0, "boost": 0 }, + "norm": { "bg": -1, "fg": -1, "idle": -1, "touch": -1, "boost": -1 }, + "bg": { "bg": -3, "fg": 139, "idle": 139, "touch": 139, "boost": 139 }, + "coop": { "bg": -3, "fg": 124, "idle": 122, "touch": 122, "boost": 130 }, + "ui": { "bg": -3, "fg": 120, "idle": 110, "touch": 98, "boost": 116 }, + "rtusr": { "bg": 98, "fg": 98, "idle": 97, "touch": 97, "boost": 98 }, + "rtsys": { "bg": 97, "fg": 97, "idle": 96, "touch": 96, "boost": 97 } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ + { "k": "/MAIN_THREAD/", "ac": "crit", "pc": "rtusr" }, + { "k": "^(RenderThread|GLThread)", "ac": "crit", "pc": "rtusr" }, + { "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", "ac": "bg", "pc": "rtusr" }, + { "k": ".", "ac": "auto", "pc": "auto" } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ + { "k": "/MAIN_THREAD/", "ac": "crit", "pc": "auto" }, + { "k": "^(app|RenderEngine)", "ac": "crit", "pc": "auto" }, + { "k": "^Binder:", "ac": "auto", "pc": "auto" }, + { "k": ".", "ac": "bg", "pc": "auto" } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ + { "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", "ac": "bg", "pc": "auto" }, + { "k": ".", "ac": "auto", "pc": "auto" } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [{ "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", "ac": "bg", "pc": "auto" }] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [{ "k": ".", "ac": "auto", "pc": "bg" }] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [{ "k": ".", "ac": "auto", "pc": "bg" }] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [{ "k": ".", "ac": "auto", "pc": "auto" }] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [{ "k": ".", "ac": "auto", "pc": "auto" }] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [{ "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", "ac": "bg", "pc": "auto" }] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ + { "k": "/MAIN_THREAD/", "ac": "ui", "pc": "ui" }, + { "k": "^(UnityMain|RenderThread |GameThread)", "ac": "gtmain", "pc": "auto" }, + { "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", "ac": "gtcoop", "pc": "auto" }, + { "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", "ac": "ui", "pc": "ui" }, + { "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", "ac": "norm", "pc": "norm" }, + { "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", "ac": "ui", "pc": "ui" }, + { "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", "ac": "bg", "pc": "auto" }, + { "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", "ac": "bg", "pc": "auto" }, + { "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", "ac": "bg", "pc": "rtusr" }, + { "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", "ac": "norm", "pc": "coop" }, + { "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", "ac": "norm", "pc": "coop" }, + { "k": ".", "ac": "norm", "pc": "norm" } + ] + } + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.3, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } +} diff --git a/magisk/LICENSE b/magisk/LICENSE new file mode 100644 index 0000000..d627c15 --- /dev/null +++ b/magisk/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2021-2022 Matt Yang + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/magisk/META-INF/com/google/android/update-binary b/magisk/META-INF/com/google/android/update-binary index 28b48e5..112eb28 100644 --- a/magisk/META-INF/com/google/android/update-binary +++ b/magisk/META-INF/com/google/android/update-binary @@ -1,33 +1,151 @@ #!/sbin/sh -################# -# Initialization -################# +TMPDIR=/dev/tmp +MOUNTPATH=/dev/magisk_img +# Default permissions umask 022 +# Initial cleanup +rm -rf $TMPDIR 2>/dev/null +mkdir -p $TMPDIR + # echo before loading util_functions ui_print() { echo "$1"; } require_new_magisk() { - ui_print "*******************************" - ui_print " Please install Magisk v20.4+! " - ui_print "*******************************" + ui_print "***********************************" + ui_print " Please install the latest Magisk! " + ui_print "***********************************" exit 1 } -######################### -# Load util_functions.sh -######################### +imageless_magisk() { + [ $MAGISK_VER_CODE -gt 18100 ] + return $? +} + +########################################################################################## +# Environment +########################################################################################## OUTFD=$2 ZIPFILE=$3 mount /data 2>/dev/null -[ -f /data/adb/magisk/util_functions.sh ] || require_new_magisk -. /data/adb/magisk/util_functions.sh -[ $MAGISK_VER_CODE -lt 20400 ] && require_new_magisk +# Load utility functions +if [ -f /data/adb/magisk/util_functions.sh ]; then + . /data/adb/magisk/util_functions.sh + NVBASE=/data/adb +else + require_new_magisk +fi + +# Preperation for flashable zips +setup_flashable + +# Mount partitions +mount_partitions + +# Detect version and architecture +api_level_arch_detect + +# Setup busybox and binaries +$BOOTMODE && boot_actions || recovery_actions + +########################################################################################## +# Preparation +########################################################################################## + +# Extract common files +unzip -oj "$ZIPFILE" module.prop install.sh uninstall.sh 'common/*' -d $TMPDIR >&2 + +[ ! -f $TMPDIR/install.sh ] && abort "! Unable to extract zip file!" +# Load install script +. $TMPDIR/install.sh + +if imageless_magisk; then + $BOOTMODE && MODDIRNAME=modules_update || MODDIRNAME=modules + MODULEROOT=$NVBASE/$MODDIRNAME +else + $BOOTMODE && IMGNAME=magisk_merge.img || IMGNAME=magisk.img + IMG=$NVBASE/$IMGNAME + request_zip_size_check "$ZIPFILE" + mount_magisk_img + MODULEROOT=$MOUNTPATH +fi + +MODID=`grep_prop id $TMPDIR/module.prop` +MODPATH=$MODULEROOT/$MODID + +print_modname + +ui_print "******************************" +ui_print "Powered by Magisk (@topjohnwu)" +ui_print "******************************" + +########################################################################################## +# Install +########################################################################################## + +# Create mod paths +rm -rf $MODPATH 2>/dev/null +mkdir -p $MODPATH + +on_install + +# Remove placeholder +rm -f $MODPATH/system/placeholder 2>/dev/null + +# Custom uninstaller +[ -f $TMPDIR/uninstall.sh ] && cp -af $TMPDIR/uninstall.sh $MODPATH/uninstall.sh + +# Auto Mount +if imageless_magisk; then + $SKIPMOUNT && touch $MODPATH/skip_mount +else + $SKIPMOUNT || touch $MODPATH/auto_mount +fi + +# prop files +$PROPFILE && cp -af $TMPDIR/system.prop $MODPATH/system.prop + +# Module info +cp -af $TMPDIR/module.prop $MODPATH/module.prop +if $BOOTMODE; then + # Update info for Magisk Manager + if imageless_magisk; then + mktouch $NVBASE/modules/$MODID/update + cp -af $TMPDIR/module.prop $NVBASE/modules/$MODID/module.prop + else + mktouch /sbin/.magisk/img/$MODID/update + cp -af $TMPDIR/module.prop /sbin/.magisk/img/$MODID/module.prop + fi +fi + +# post-fs-data mode scripts +$POSTFSDATA && cp -af $TMPDIR/post-fs-data.sh $MODPATH/post-fs-data.sh + +# service mode scripts +$LATESTARTSERVICE && cp -af $TMPDIR/service.sh $MODPATH/service.sh + +# Handle replace folders +for TARGET in $REPLACE; do + mktouch $MODPATH$TARGET/.replace +done + +ui_print "- Setting permissions" +set_permissions + +########################################################################################## +# Finalizing +########################################################################################## + +cd / +imageless_magisk || unmount_magisk_img +$BOOTMODE || recovery_cleanup +rm -rf $TMPDIR $MOUNTPATH -install_module +ui_print "- Done" exit 0 diff --git a/magisk/NOTICE b/magisk/NOTICE new file mode 100644 index 0000000..6546898 --- /dev/null +++ b/magisk/NOTICE @@ -0,0 +1,789 @@ +uperf +Adapted for FDE.AI by FeraVolt + +THIRD-PARTY SOFTWARE NOTICES AND INFORMATION +Do Not Translate or Localize + +This project incorporates components from the projects listed below. The original copyright notices and the licenses under are set forth below. Reserves all rights not expressly granted herein, whether by implication, estoppel or otherwise. + +1. jpcre2/jpcre2 version 10.32.01 (https://github.com/jpcre2/jpcre2) +2. nlohmann/json version 3.10.4 (https://github.com/nlohmann/json) +3. PhilipHazel/pcre2 version 10.39 (https://github.com/PhilipHazel/pcre2) +4. eliaskosunen/scnlib version 0.4.0 (https://github.com/eliaskosunen/scnlib) +5. gabime/spdlog version 1.9.2 (https://github.com/gabime/spdlog) +6. osm0sis/android-busybox-ndk 1.31.1 (https://github.com/osm0sis/android-busybox-ndk) + +%% jpcre2/jpcre2 NOTICES AND INFORMATION BEGIN HERE +========================================= +JPCRE2 LICENCE +------------- + +JPCRE2 is a wrapper for PCRE2 library which supports regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. + +JPCRE2 is distributed under the terms of the "BSD" licence, as +specified below. The test source files (prefixed 'test' in their name) +are not copyrighted and are in the public domain. + +The basic library functions are written in C++ and are dependent upon the +original PCRE2 library. + +THE BASIC LIBRARY FUNCTIONS/CLASSES +----------------------------------- + +Written by: Md Jahidul Hamid +Email local part: jahidulhamid +Email domain: yahoo.com + + +Copyright (c) Md Jahidul Hamid. + + +THE "BSD" LICENCE +----------------- + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * The names of its contributors may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +Disclaimer: + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +End +========================================= +END OF jpcre2/jpcre2 NOTICES AND INFORMATION + +%% nlohmann/json NOTICES AND INFORMATION BEGIN HERE +========================================= +MIT License + +Copyright (c) 2013-2022 Niels Lohmann + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +========================================= +END OF nlohmann/json NOTICES AND INFORMATION + +%% PhilipHazel/pcre2 NOTICES AND INFORMATION BEGIN HERE +========================================= +PCRE2 LICENCE +------------- + +PCRE2 is a library of functions to support regular expressions whose syntax +and semantics are as close as possible to those of the Perl 5 language. + +Releases 10.00 and above of PCRE2 are distributed under the terms of the "BSD" +licence, as specified below, with one exemption for certain binary +redistributions. The documentation for PCRE2, supplied in the "doc" directory, +is distributed under the same terms as the software itself. The data in the +testdata directory is not copyrighted and is in the public domain. + +The basic library functions are written in C and are freestanding. Also +included in the distribution is a just-in-time compiler that can be used to +optimize pattern matching. This is an optional feature that can be omitted when +the library is built. + + +THE BASIC LIBRARY FUNCTIONS +--------------------------- + +Written by: Philip Hazel +Email local part: Philip.Hazel +Email domain: gmail.com + +Retired from University of Cambridge Computing Service, +Cambridge, England. + +Copyright (c) 1997-2021 University of Cambridge +All rights reserved. + + +PCRE2 JUST-IN-TIME COMPILATION SUPPORT +-------------------------------------- + +Written by: Zoltan Herczeg +Email local part: hzmester +Email domain: freemail.hu + +Copyright(c) 2010-2021 Zoltan Herczeg +All rights reserved. + + +STACK-LESS JUST-IN-TIME COMPILER +-------------------------------- + +Written by: Zoltan Herczeg +Email local part: hzmester +Email domain: freemail.hu + +Copyright(c) 2009-2021 Zoltan Herczeg +All rights reserved. + + +THE "BSD" LICENCE +----------------- + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notices, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notices, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of any + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + + +EXEMPTION FOR BINARY LIBRARY-LIKE PACKAGES +------------------------------------------ + +The second condition in the BSD licence (covering binary redistributions) does +not apply all the way down a chain of software. If binary package A includes +PCRE2, it must respect the condition, but if package B is software that +includes package A, the condition is not imposed on package B unless it uses +PCRE2 independently. + +End +========================================= +END OF PhilipHazel/pcre2 NOTICES AND INFORMATION + +%% eliaskosunen/scnlib NOTICES AND INFORMATION BEGIN HERE +========================================= + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +========================================= +END OF eliaskosunen/scnlib NOTICES AND INFORMATION + +%% gabime/spdlog NOTICES AND INFORMATION BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) 2016 Gabi Melman. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +-- NOTE: Third party dependency used by this software -- +This software depends on the fmt lib (MIT License), +and users must comply to its license: https://github.com/fmtlib/fmt/blob/master/LICENSE.rst +========================================= +END OF gabime/spdlog NOTICES AND INFORMATION + +%% osm0sis/android-busybox-ndk NOTICES AND INFORMATION BEGIN HERE +========================================= +--- A note on GPL versions + +BusyBox is distributed under version 2 of the General Public License (included +in its entirety, below). Version 2 is the only version of this license which +this version of BusyBox (or modified versions derived from this one) may be +distributed under. + +------------------------------------------------------------------------ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. +========================================= +END OF osm0sis/android-busybox-ndk NOTICES AND INFORMATION diff --git a/magisk/bin/libsfanalysis.so b/magisk/bin/libsfanalysis.so deleted file mode 100644 index c2e97b0..0000000 Binary files a/magisk/bin/libsfanalysis.so and /dev/null differ diff --git a/magisk/bin/libsfanalysis.so8 b/magisk/bin/libsfanalysis.so8 deleted file mode 100644 index e528d77..0000000 Binary files a/magisk/bin/libsfanalysis.so8 and /dev/null differ diff --git a/magisk/bin/sfa_injector b/magisk/bin/sfa_injector deleted file mode 100644 index 06a95df..0000000 Binary files a/magisk/bin/sfa_injector and /dev/null differ diff --git a/magisk/bin/sfa_injector8 b/magisk/bin/sfa_injector8 deleted file mode 100644 index bff0cab..0000000 Binary files a/magisk/bin/sfa_injector8 and /dev/null differ diff --git a/magisk/bin/uperf b/magisk/bin/uperf index e103fd6..e23b785 100644 Binary files a/magisk/bin/uperf and b/magisk/bin/uperf differ diff --git a/magisk/bin/uperf8 b/magisk/bin/uperf8 deleted file mode 100644 index 1bc61bb..0000000 Binary files a/magisk/bin/uperf8 and /dev/null differ diff --git a/magisk/common/service.sh b/magisk/common/service.sh new file mode 100644 index 0000000..d83ce51 --- /dev/null +++ b/magisk/common/service.sh @@ -0,0 +1,19 @@ +#!/system/bin/sh +# +# Copyright (C) 2021-2022 Matt Yang +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +BASEDIR="$(dirname $(readlink -f "$0"))" +sh $BASEDIR/script/initsvc.sh diff --git a/magisk/config/e1080.json b/magisk/config/e1080.json index 86ab58d..180b811 100644 --- a/magisk/config/e1080.json +++ b/magisk/config/e1080.json @@ -1,524 +1,585 @@ { - "meta": { - "name": "e1080[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1600, - "idleLoad": 1200, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ + "meta": { + "name": "Exynos 1080[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 100, + "nr": 4, + "typicalPower": 0.42, + "typicalFreq": 2.0, + "sweetFreq": 1.4, + "plainFreq": 1.0, + "freeFreq": 0.6 + }, + { + "efficiency": 320, + "nr": 3, + "typicalPower": 2.3, + "typicalFreq": 2.6, + "sweetFreq": 1.7, + "plainFreq": 1.0, + "freeFreq": 0.7 + }, + { + "efficiency": 320, + "nr": 1, + "typicalPower": 2.86, + "typicalFreq": 2.8, + "sweetFreq": 2.0, + "plainFreq": 1.4, + "freeFreq": 0.8 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3 + ], + "c1": [ + 4, + 5, + 6 + ], + "c2": [ + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" + "k": ".", + "ac": "auto", + "pc": "bg" } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4, - 7 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 115, - 115, - 115, - 115, - 320, - 320, - 320, - 320 - ], - "knobs": [ + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ { - "name": "topBoost", - "path": "/dev/stune/top-app/schedtune.boost", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ { - "name": "heavyBoost", - "path": "/dev/stune/rt/schedtune.boost", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - }, + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, { - "name": "cpuFreqMin0", - "path": "/dev/cluster0_freq_min", - "note": "Samsung EPIC interfaces 集群0最小频率", - "type": "int", - "enable": true - }, + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, { - "name": "cpuFreqMax0", - "path": "/dev/cluster0_freq_max", - "note": "Samsung EPIC interfaces 集群0最大频率", - "type": "int", - "enable": true - }, + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, { - "name": "cpuFreqMin1", - "path": "/dev/cluster1_freq_min", - "note": "Samsung EPIC interfaces 集群1最小频率", - "type": "int", - "enable": true - }, + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, { - "name": "cpuFreqMax1", - "path": "/dev/cluster1_freq_max", - "note": "Samsung EPIC interfaces 集群1最大频率", - "type": "int", - "enable": true - }, + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, { - "name": "cpuFreqMin2", - "path": "/dev/cluster2_freq_min", - "note": "Samsung EPIC interfaces 集群2最小频率", - "type": "int", - "enable": true - }, + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, { - "name": "cpuFreqMax2", - "path": "/dev/cluster2_freq_max", - "note": "Samsung EPIC interfaces 集群2最大频率", - "type": "int", - "enable": true - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "0", - "cpuFreqMin0": "100000", - "cpuFreqMax0": "1600000", - "cpuFreqMin1": "500000", - "cpuFreqMax1": "1900000", - "cpuFreqMin2": "800000", - "cpuFreqMax2": "2600000" - }, - "active": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "1", - "cpuFreqMin0": "700000", - "cpuFreqMax0": "1700000", - "cpuFreqMin1": "1000000", - "cpuFreqMax1": "1900000", - "cpuFreqMin2": "1100000", - "cpuFreqMax2": "2600000" - }, - "interaction": { - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "1100000", - "cpuFreqMax0": "1700000", - "cpuFreqMin1": "1000000", - "cpuFreqMax1": "1500000", - "cpuFreqMin2": "1100000", - "cpuFreqMax2": "2200000" - }, - "pressed": { - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "1100000", - "cpuFreqMax0": "1700000", - "cpuFreqMin1": "1000000", - "cpuFreqMax1": "1700000", - "cpuFreqMin2": "1100000", - "cpuFreqMax2": "2200000" - }, - "heavyLoad": { - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "1100000", - "cpuFreqMax0": "2000000", - "cpuFreqMin1": "1300000", - "cpuFreqMax1": "1900000", - "cpuFreqMin2": "1600000", - "cpuFreqMax2": "2600000" - }, - "sfLag": { - "uxAffinity": "2", - "cpuFreqMin0": "1100000", - "cpuFreqMax0": "1700000", - "cpuFreqMin1": "1900000", - "cpuFreqMax1": "1900000", - "cpuFreqMin2": "1100000", - "cpuFreqMax2": "2200000" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2", - "cpuFreqMin0": "1100000", - "cpuFreqMax0": "2000000", - "cpuFreqMin1": "1700000", - "cpuFreqMax1": "1900000", - "cpuFreqMin2": "2600000", - "cpuFreqMax2": "2800000" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "0", - "cpuFreqMin0": "100000", - "cpuFreqMax0": "1400000", - "cpuFreqMin1": "500000", - "cpuFreqMax1": "1300000", - "cpuFreqMin2": "800000", - "cpuFreqMax2": "1700000" - }, - "active": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "1", - "cpuFreqMin0": "700000", - "cpuFreqMax0": "1600000", - "cpuFreqMin1": "500000", - "cpuFreqMax1": "1100000", - "cpuFreqMin2": "800000", - "cpuFreqMax2": "1400000" - }, - "interaction": { - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "700000", - "cpuFreqMax0": "1600000", - "cpuFreqMin1": "600000", - "cpuFreqMax1": "1000000", - "cpuFreqMin2": "800000", - "cpuFreqMax2": "1200000" - }, - "pressed": { - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "700000", - "cpuFreqMax0": "1800000", - "cpuFreqMin1": "600000", - "cpuFreqMax1": "1300000", - "cpuFreqMin2": "800000", - "cpuFreqMax2": "1700000" - }, - "heavyLoad": { - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "700000", - "cpuFreqMax0": "2000000", - "cpuFreqMin1": "800000", - "cpuFreqMax1": "1500000", - "cpuFreqMin2": "1000000", - "cpuFreqMax2": "1900000" - }, - "sfLag": { - "uxAffinity": "2", - "cpuFreqMin0": "700000", - "cpuFreqMax0": "1600000", - "cpuFreqMin1": "1500000", - "cpuFreqMax1": "1500000", - "cpuFreqMin2": "800000", - "cpuFreqMax2": "1200000" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2", - "cpuFreqMin0": "700000", - "cpuFreqMax0": "2000000", - "cpuFreqMin1": "1500000", - "cpuFreqMax1": "1900000", - "cpuFreqMin2": "1900000", - "cpuFreqMax2": "2400000" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "0", - "cpuFreqMin0": "400000", - "cpuFreqMax0": "2000000", - "cpuFreqMin1": "500000", - "cpuFreqMax1": "2600000", - "cpuFreqMin2": "800000", - "cpuFreqMax2": "2800000" - }, - "active": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "1", - "cpuFreqMin0": "900000", - "cpuFreqMax0": "2000000", - "cpuFreqMin1": "1000000", - "cpuFreqMax1": "2600000", - "cpuFreqMin2": "1200000", - "cpuFreqMax2": "2800000" - }, - "interaction": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "900000", - "cpuFreqMax0": "1800000", - "cpuFreqMin1": "1300000", - "cpuFreqMax1": "2100000", - "cpuFreqMin2": "1700000", - "cpuFreqMax2": "2600000" - }, - "pressed": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "900000", - "cpuFreqMax0": "1800000", - "cpuFreqMin1": "1900000", - "cpuFreqMax1": "1900000", - "cpuFreqMin2": "2400000", - "cpuFreqMax2": "2400000" - }, - "heavyLoad": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "1800000", - "cpuFreqMax0": "2000000", - "cpuFreqMin1": "1900000", - "cpuFreqMax1": "2600000", - "cpuFreqMin2": "2400000", - "cpuFreqMax2": "2800000" - }, - "sfLag": { - "uxAffinity": "2", - "cpuFreqMin0": "900000", - "cpuFreqMax0": "2000000", - "cpuFreqMin1": "2600000", - "cpuFreqMax1": "2600000", - "cpuFreqMin2": "2400000", - "cpuFreqMax2": "2800000" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "cpuFreqMin0": "900000", - "cpuFreqMax0": "2000000", - "cpuFreqMin1": "2600000", - "cpuFreqMax1": "2600000", - "cpuFreqMin2": "2800000", - "cpuFreqMax2": "2800000" - } + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" } + ] } - ] + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.3, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } } \ No newline at end of file diff --git a/magisk/config/e2100.json b/magisk/config/e2100.json index eba4e4b..d8152cb 100644 --- a/magisk/config/e2100.json +++ b/magisk/config/e2100.json @@ -1,524 +1,585 @@ { - "meta": { - "name": "e2100[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1600, - "idleLoad": 1200, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ + "meta": { + "name": "Exynos 2100[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 115, + "nr": 4, + "typicalPower": 0.53, + "typicalFreq": 2.2, + "sweetFreq": 1.4, + "plainFreq": 1.0, + "freeFreq": 0.6 + }, + { + "efficiency": 320, + "nr": 3, + "typicalPower": 2.47, + "typicalFreq": 2.8, + "sweetFreq": 1.7, + "plainFreq": 1.0, + "freeFreq": 0.7 + }, + { + "efficiency": 400, + "nr": 1, + "typicalPower": 3.2, + "typicalFreq": 2.9, + "sweetFreq": 1.9, + "plainFreq": 1.4, + "freeFreq": 0.8 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3 + ], + "c1": [ + 4, + 5, + 6 + ], + "c2": [ + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" + "k": ".", + "ac": "auto", + "pc": "bg" } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4, - 7 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 115, - 115, - 115, - 115, - 320, - 320, - 320, - 400 - ], - "knobs": [ + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ { - "name": "topBoost", - "path": "/dev/cpuctl/top-app/cpu.uclamp.min", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ { - "name": "heavyBoost", - "path": "/dev/cpuctl/rt/cpu.uclamp.min", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - }, + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, { - "name": "cpuFreqMin0", - "path": "/dev/cluster0_freq_min", - "note": "Samsung EPIC interfaces 集群0最小频率", - "type": "int", - "enable": true - }, + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, { - "name": "cpuFreqMax0", - "path": "/dev/cluster0_freq_max", - "note": "Samsung EPIC interfaces 集群0最大频率", - "type": "int", - "enable": true - }, + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, { - "name": "cpuFreqMin1", - "path": "/dev/cluster1_freq_min", - "note": "Samsung EPIC interfaces 集群1最小频率", - "type": "int", - "enable": true - }, + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, { - "name": "cpuFreqMax1", - "path": "/dev/cluster1_freq_max", - "note": "Samsung EPIC interfaces 集群1最大频率", - "type": "int", - "enable": true - }, + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, { - "name": "cpuFreqMin2", - "path": "/dev/cluster2_freq_min", - "note": "Samsung EPIC interfaces 集群2最小频率", - "type": "int", - "enable": true - }, + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, { - "name": "cpuFreqMax2", - "path": "/dev/cluster2_freq_max", - "note": "Samsung EPIC interfaces 集群2最大频率", - "type": "int", - "enable": true - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "0", - "cpuFreqMin0": "100000", - "cpuFreqMax0": "1600000", - "cpuFreqMin1": "500000", - "cpuFreqMax1": "1900000", - "cpuFreqMin2": "800000", - "cpuFreqMax2": "2400000" - }, - "active": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "1", - "cpuFreqMin0": "700000", - "cpuFreqMax0": "1700000", - "cpuFreqMin1": "1000000", - "cpuFreqMax1": "1900000", - "cpuFreqMin2": "1000000", - "cpuFreqMax2": "2400000" - }, - "interaction": { - "topBoost": "0", - "heavyBoost": "40", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "1100000", - "cpuFreqMax0": "1700000", - "cpuFreqMin1": "1000000", - "cpuFreqMax1": "1500000", - "cpuFreqMin2": "1000000", - "cpuFreqMax2": "2000000" - }, - "pressed": { - "topBoost": "0", - "heavyBoost": "40", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "1100000", - "cpuFreqMax0": "1700000", - "cpuFreqMin1": "1000000", - "cpuFreqMax1": "1700000", - "cpuFreqMin2": "1000000", - "cpuFreqMax2": "2000000" - }, - "heavyLoad": { - "topBoost": "0", - "heavyBoost": "40", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "1100000", - "cpuFreqMax0": "2200000", - "cpuFreqMin1": "1300000", - "cpuFreqMax1": "1900000", - "cpuFreqMin2": "1400000", - "cpuFreqMax2": "2400000" - }, - "sfLag": { - "uxAffinity": "2", - "cpuFreqMin0": "1100000", - "cpuFreqMax0": "1700000", - "cpuFreqMin1": "1900000", - "cpuFreqMax1": "1900000", - "cpuFreqMin2": "1000000", - "cpuFreqMax2": "2000000" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "40", - "uxAffinity": "2", - "cpuFreqMin0": "1100000", - "cpuFreqMax0": "2200000", - "cpuFreqMin1": "1700000", - "cpuFreqMax1": "1900000", - "cpuFreqMin2": "2400000", - "cpuFreqMax2": "2900000" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "0", - "cpuFreqMin0": "100000", - "cpuFreqMax0": "1400000", - "cpuFreqMin1": "500000", - "cpuFreqMax1": "1300000", - "cpuFreqMin2": "800000", - "cpuFreqMax2": "1500000" - }, - "active": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "1", - "cpuFreqMin0": "700000", - "cpuFreqMax0": "1600000", - "cpuFreqMin1": "500000", - "cpuFreqMax1": "1100000", - "cpuFreqMin2": "800000", - "cpuFreqMax2": "1300000" - }, - "interaction": { - "topBoost": "0", - "heavyBoost": "30", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "700000", - "cpuFreqMax0": "1600000", - "cpuFreqMin1": "600000", - "cpuFreqMax1": "1000000", - "cpuFreqMin2": "800000", - "cpuFreqMax2": "1100000" - }, - "pressed": { - "topBoost": "0", - "heavyBoost": "30", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "700000", - "cpuFreqMax0": "1800000", - "cpuFreqMin1": "600000", - "cpuFreqMax1": "1300000", - "cpuFreqMin2": "800000", - "cpuFreqMax2": "1500000" - }, - "heavyLoad": { - "topBoost": "0", - "heavyBoost": "30", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "700000", - "cpuFreqMax0": "2200000", - "cpuFreqMin1": "800000", - "cpuFreqMax1": "1500000", - "cpuFreqMin2": "900000", - "cpuFreqMax2": "1800000" - }, - "sfLag": { - "uxAffinity": "2", - "cpuFreqMin0": "700000", - "cpuFreqMax0": "1600000", - "cpuFreqMin1": "1500000", - "cpuFreqMax1": "1500000", - "cpuFreqMin2": "800000", - "cpuFreqMax2": "1100000" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "30", - "uxAffinity": "2", - "cpuFreqMin0": "700000", - "cpuFreqMax0": "2200000", - "cpuFreqMin1": "1500000", - "cpuFreqMax1": "1900000", - "cpuFreqMin2": "1800000", - "cpuFreqMax2": "2200000" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "0", - "cpuFreqMin0": "400000", - "cpuFreqMax0": "2200000", - "cpuFreqMin1": "500000", - "cpuFreqMax1": "2800000", - "cpuFreqMin2": "800000", - "cpuFreqMax2": "2900000" - }, - "active": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "1", - "cpuFreqMin0": "900000", - "cpuFreqMax0": "2200000", - "cpuFreqMin1": "1000000", - "cpuFreqMax1": "2800000", - "cpuFreqMin2": "1100000", - "cpuFreqMax2": "2900000" - }, - "interaction": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "900000", - "cpuFreqMax0": "1800000", - "cpuFreqMin1": "1300000", - "cpuFreqMax1": "2100000", - "cpuFreqMin2": "1500000", - "cpuFreqMax2": "2400000" - }, - "pressed": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "900000", - "cpuFreqMax0": "1800000", - "cpuFreqMin1": "1900000", - "cpuFreqMax1": "1900000", - "cpuFreqMin2": "2200000", - "cpuFreqMax2": "2200000" - }, - "heavyLoad": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "1800000", - "cpuFreqMax0": "2200000", - "cpuFreqMin1": "1900000", - "cpuFreqMax1": "2800000", - "cpuFreqMin2": "2200000", - "cpuFreqMax2": "2900000" - }, - "sfLag": { - "uxAffinity": "2", - "cpuFreqMin0": "900000", - "cpuFreqMax0": "2200000", - "cpuFreqMin1": "2800000", - "cpuFreqMax1": "2800000", - "cpuFreqMin2": "2200000", - "cpuFreqMax2": "2900000" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "cpuFreqMin0": "900000", - "cpuFreqMax0": "2200000", - "cpuFreqMin1": "2800000", - "cpuFreqMax1": "2800000", - "cpuFreqMin2": "2900000", - "cpuFreqMax2": "2900000" - } + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" } + ] } - ] + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.3, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } } \ No newline at end of file diff --git a/magisk/config/e2200.json b/magisk/config/e2200.json new file mode 100644 index 0000000..6d5bc1e --- /dev/null +++ b/magisk/config/e2200.json @@ -0,0 +1,585 @@ +{ + "meta": { + "name": "Exynos 2200[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 140, + "nr": 4, + "typicalPower": 0.61, + "typicalFreq": 1.8, + "sweetFreq": 1.2, + "plainFreq": 0.9, + "freeFreq": 0.5 + }, + { + "efficiency": 340, + "nr": 3, + "typicalPower": 2.36, + "typicalFreq": 2.5, + "sweetFreq": 1.7, + "plainFreq": 1.0, + "freeFreq": 0.7 + }, + { + "efficiency": 420, + "nr": 1, + "typicalPower": 3.78, + "typicalFreq": 2.8, + "sweetFreq": 2.0, + "plainFreq": 1.4, + "freeFreq": 0.8 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3 + ], + "c1": [ + 4, + 5, + 6 + ], + "c2": [ + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, + { + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, + { + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, + { + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, + { + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ + { + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ + { + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ + { + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, + { + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, + { + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, + { + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" + } + ] + } + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.3, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } +} \ No newline at end of file diff --git a/magisk/config/e7420.json b/magisk/config/e7420.json deleted file mode 100644 index 9bc8779..0000000 --- a/magisk/config/e7420.json +++ /dev/null @@ -1,486 +0,0 @@ -{ - "meta": { - "name": "e7420[21.07.25]", - "author": "yc@coolapk(powered by wipe-v2)", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1200, - "idleLoad": 800, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ - { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, - { - "hint": "Active", - "action": "normal", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, - { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, - { - "hint": "Pressed", - "action": "interaction", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, - { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, - { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, - { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, - { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, - { - "hint": "SfBoost", - "action": "sfLag", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, - { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, - { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" - } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 100, - 100, - 100, - 100, - 150, - 150, - 150, - 150 - ], - "knobs": [ - { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, - { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, - { - "name": "littleHidelay", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay", - "type": "string", - "enable": true, - "note": "小核的above_hispeed_delay" - }, - { - "name": "littleHifreq", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq", - "type": "string", - "enable": true, - "note": "小核的hispeed_freq" - }, - { - "name": "littleHiload", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load", - "type": "string", - "enable": true, - "note": "小核的go_hispeed_load" - }, - { - "name": "littleTgload", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads", - "type": "string", - "enable": true, - "note": "小核的target_loads" - }, - { - "name": "littleMinSample", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time", - "type": "string", - "enable": true, - "note": "小核的min_sample_time" - }, - { - "name": "littleHyst", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis", - "type": "string", - "enable": true, - "note": "小核的max_freq_hysteresis" - }, - { - "name": "bigHidelay", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay", - "type": "string", - "enable": true, - "note": "大核的above_hispeed_delay" - }, - { - "name": "bigHifreq", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq", - "type": "string", - "enable": true, - "note": "大核的hispeed_freq" - }, - { - "name": "bigHiload", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load", - "type": "string", - "enable": true, - "note": "大核的go_hispeed_load" - }, - { - "name": "bigTgload", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads", - "type": "string", - "enable": true, - "note": "大核的target_loads" - }, - { - "name": "bigMinSample", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time", - "type": "string", - "enable": true, - "note": "大核的min_sample_time" - }, - { - "name": "bigHyst", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/max_freq_hysteresis", - "type": "string", - "enable": true, - "note": "大核的max_freq_hysteresis" - }, - { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电(相对卡顿百分比 49.7% 相对续航 112.4%)", - "actions": { - "normal": { - "cpuFreqMax": "16,22", - "cpuFreqMin": "4,8", - "littleHidelay": "58000 1000000:38000 1100000:58000 1200000:38000 1400000:78000", - "littleHifreq": "900000", - "littleHiload": "46", - "littleTgload": "20 500000:37 600000:32 700000:25 800000:80 900000:26 1000000:44 1100000:16 1200000:72 1300000:94 1400000:81 1500000:69", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "78000 1100000:18000 1300000:78000 1700000:58000 1800000:78000", - "bigHifreq": "1000000", - "bigHiload": "47", - "bigTgload": "93 900000:97 1000000:31 1100000:96 1200000:60 1300000:93 1400000:98 1500000:97 1600000:95 1700000:53 1800000:98 1896000:97 2100000:98", - "bigMinSample": "18000", - "bigHyst": "18000", - "uxAffinity": "0" - }, - "interaction": { - "cpuFreqMax": "15,18", - "cpuFreqMin": "5,10", - "littleHidelay": "58000 1000000:38000 1100000:58000 1200000:38000 1400000:78000", - "littleHifreq": "900000", - "littleHiload": "46", - "littleTgload": "20 500000:37 600000:32 700000:25 800000:80 900000:26 1000000:44 1100000:16 1200000:72 1300000:94 1400000:81 1500000:69", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "78000 1100000:18000 1300000:78000 1700000:58000 1800000:78000", - "bigHifreq": "1000000", - "bigHiload": "47", - "bigTgload": "93 900000:97 1000000:31 1100000:96 1200000:60 1300000:93 1400000:98 1500000:97 1600000:95 1700000:53 1800000:98 1896000:97 2100000:98", - "bigMinSample": "18000", - "bigHyst": "18000", - "uxAffinity": "1" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "uxAffinity": "1" - }, - "sfLag": { - "cpuFreqMax": "15,19", - "cpuFreqMin": "12,18", - "uxAffinity": "1" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗(相对卡顿百分比 99.8% 相对续航 124.2%)", - "actions": { - "normal": { - "cpuFreqMax": "16,22", - "cpuFreqMin": "4,8", - "littleHidelay": "38000 700000:18000 800000:38000 900000:18000 1000000:38000 1100000:58000", - "littleHifreq": "500000", - "littleHiload": "31", - "littleTgload": "49 500000:55 600000:50 700000:52 800000:56 900000:41 1000000:18 1100000:64 1200000:73 1300000:91 1400000:78 1500000:54", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "78000 1100000:58000 1300000:78000 1600000:38000 1700000:78000", - "bigHifreq": "900000", - "bigHiload": "57", - "bigTgload": "85 900000:89 1000000:91 1100000:95 1200000:12 1300000:91 1400000:98 1500000:95 1600000:11 1700000:41 1800000:98 2000000:96 2100000:97", - "bigMinSample": "18000", - "bigHyst": "18000", - "uxAffinity": "0" - }, - "interaction": { - "cpuFreqMax": "14,18", - "cpuFreqMin": "5,10", - "littleHidelay": "38000 700000:18000 800000:38000 900000:18000 1000000:38000 1100000:58000", - "littleHifreq": "500000", - "littleHiload": "31", - "littleTgload": "49 500000:55 600000:50 700000:52 800000:56 900000:41 1000000:18 1100000:64 1200000:73 1300000:91 1400000:78 1500000:54", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "78000 1100000:58000 1300000:78000 1600000:38000 1700000:78000", - "bigHifreq": "900000", - "bigHiload": "57", - "bigTgload": "85 900000:89 1000000:91 1100000:95 1200000:12 1300000:91 1400000:98 1500000:95 1600000:11 1700000:41 1800000:98 2000000:96 2100000:97", - "bigMinSample": "18000", - "bigHyst": "18000", - "uxAffinity": "0" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "uxAffinity": "0" - }, - "sfLag": { - "cpuFreqMax": "14,18", - "cpuFreqMin": "12,15", - "uxAffinity": "1" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "16,22", - "cpuFreqMin": "4,8", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "uxAffinity": "3" - }, - "interaction": { - "cpuFreqMax": "13,19", - "cpuFreqMin": "12,18", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "uxAffinity": "3" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "uxAffinity": "3" - }, - "sfLag": { - "cpuFreqMax": "16,22", - "cpuFreqMin": "15,21", - "uxAffinity": "3" - } - } - } - ] -} \ No newline at end of file diff --git a/magisk/config/e8890.json b/magisk/config/e8890.json new file mode 100644 index 0000000..855a79a --- /dev/null +++ b/magisk/config/e8890.json @@ -0,0 +1,576 @@ +{ + "meta": { + "name": "Exynos 8890[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 100, + "nr": 4, + "typicalPower": 0.36, + "typicalFreq": 1.6, + "sweetFreq": 1.2, + "plainFreq": 0.9, + "freeFreq": 0.5 + }, + { + "efficiency": 160, + "nr": 4, + "typicalPower": 2.53, + "typicalFreq": 2.6, + "sweetFreq": 1.7, + "plainFreq": 1.0, + "freeFreq": 0.7 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3 + ], + "c1": [ + 4, + 5, + 6 + ], + "c2": [ + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, + { + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, + { + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, + { + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, + { + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ + { + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ + { + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ + { + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, + { + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, + { + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, + { + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" + } + ] + } + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.3, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } +} \ No newline at end of file diff --git a/magisk/config/e8890_eas.json b/magisk/config/e8890_eas.json deleted file mode 100644 index 3f4d08d..0000000 --- a/magisk/config/e8890_eas.json +++ /dev/null @@ -1,411 +0,0 @@ -{ - "meta": { - "name": "e8890-eas[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1240, - "idleLoad": 830, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ - { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, - { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, - { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, - { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, - { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, - { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, - { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, - { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, - { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, - { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, - { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" - } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 100, - 100, - 100, - 100, - 160, - 160, - 160, - 160 - ], - "knobs": [ - { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, - { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, - { - "name": "topBoost", - "path": "/dev/stune/top-app/schedtune.boost", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, - { - "name": "heavyBoost", - "path": "/dev/stune/rt/schedtune.boost", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, - { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, - { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "cpuFreqMax": "14,21", - "cpuFreqMin": "1,7", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "15,21", - "cpuFreqMin": "6,9", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "15,17", - "cpuFreqMin": "10,9", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "15,17", - "cpuFreqMin": "10,9", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "15,21", - "cpuFreqMin": "10,12", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "15,17", - "cpuFreqMin": "10,9", - "uxAffinity": "2" - }, - "sfBoost": { - "cpuFreqMax": "15,26", - "cpuFreqMin": "10,21", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "cpuFreqMax": "13,13", - "cpuFreqMin": "1,7", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "14,11", - "cpuFreqMin": "6,7", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "14,10", - "cpuFreqMin": "6,7", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "15,13", - "cpuFreqMin": "6,7", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "15,15", - "cpuFreqMin": "6,8", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "14,10", - "cpuFreqMin": "6,7", - "uxAffinity": "2" - }, - "sfBoost": { - "cpuFreqMax": "15,19", - "cpuFreqMin": "6,15", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "15,26", - "cpuFreqMin": "4,7", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "15,26", - "cpuFreqMin": "8,10", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "15,21", - "cpuFreqMin": "8,13", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "15,19", - "cpuFreqMin": "8,19", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "15,26", - "cpuFreqMin": "15,19", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "15,26", - "cpuFreqMin": "8,19", - "uxAffinity": "2" - }, - "sfBoost": { - "cpuFreqMax": "15,26", - "cpuFreqMin": "8,26", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2" - } - } - } - ] -} \ No newline at end of file diff --git a/magisk/config/e8890_hmp.json b/magisk/config/e8890_hmp.json deleted file mode 100644 index dcf2c57..0000000 --- a/magisk/config/e8890_hmp.json +++ /dev/null @@ -1,486 +0,0 @@ -{ - "meta": { - "name": "e8890[21.07.25]", - "author": "yc@coolapk(powered by wipe-v2)", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1240, - "idleLoad": 830, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ - { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, - { - "hint": "Active", - "action": "normal", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, - { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, - { - "hint": "Pressed", - "action": "interaction", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, - { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, - { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, - { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, - { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, - { - "hint": "SfBoost", - "action": "sfLag", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, - { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, - { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" - } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 100, - 100, - 100, - 100, - 160, - 160, - 160, - 160 - ], - "knobs": [ - { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, - { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, - { - "name": "littleHidelay", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay", - "type": "string", - "enable": true, - "note": "小核的above_hispeed_delay" - }, - { - "name": "littleHifreq", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq", - "type": "string", - "enable": true, - "note": "小核的hispeed_freq" - }, - { - "name": "littleHiload", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load", - "type": "string", - "enable": true, - "note": "小核的go_hispeed_load" - }, - { - "name": "littleTgload", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads", - "type": "string", - "enable": true, - "note": "小核的target_loads" - }, - { - "name": "littleMinSample", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time", - "type": "string", - "enable": true, - "note": "小核的min_sample_time" - }, - { - "name": "littleHyst", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis", - "type": "string", - "enable": true, - "note": "小核的max_freq_hysteresis" - }, - { - "name": "bigHidelay", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay", - "type": "string", - "enable": true, - "note": "大核的above_hispeed_delay" - }, - { - "name": "bigHifreq", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq", - "type": "string", - "enable": true, - "note": "大核的hispeed_freq" - }, - { - "name": "bigHiload", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load", - "type": "string", - "enable": true, - "note": "大核的go_hispeed_load" - }, - { - "name": "bigTgload", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads", - "type": "string", - "enable": true, - "note": "大核的target_loads" - }, - { - "name": "bigMinSample", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time", - "type": "string", - "enable": true, - "note": "大核的min_sample_time" - }, - { - "name": "bigHyst", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/max_freq_hysteresis", - "type": "string", - "enable": true, - "note": "大核的max_freq_hysteresis" - }, - { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电(相对卡顿百分比 50.0% 相对续航 121.6%)", - "actions": { - "normal": { - "cpuFreqMax": "16,27", - "cpuFreqMin": "4,7", - "littleHidelay": "38000", - "littleHifreq": "1378000", - "littleHiload": "43", - "littleTgload": "52 546000:48 754000:22 858000:56 962000:67 1066000:82 1170000:60 1274000:12 1378000:61 1482000:39 1586000:56", - "littleMinSample": "38000", - "littleHyst": "18000", - "bigHidelay": "78000 1040000:18000 1144000:78000 1248000:38000 1456000:18000 1560000:38000 1664000:18000 1768000:38000 1872000:78000 2496000:58000", - "bigHifreq": "832000", - "bigHiload": "71", - "bigTgload": "71 832000:14 936000:97 1040000:89 1144000:83 1248000:10 1352000:34 1456000:28 1560000:26 1664000:51 1768000:16 1872000:77 1976000:99 2080000:98 2184000:99 2496000:98 2600000:97", - "bigMinSample": "18000", - "bigHyst": "18000", - "uxAffinity": "0" - }, - "interaction": { - "cpuFreqMax": "16,19", - "cpuFreqMin": "5,10", - "littleHidelay": "38000", - "littleHifreq": "1378000", - "littleHiload": "43", - "littleTgload": "52 546000:48 754000:22 858000:56 962000:67 1066000:82 1170000:60 1274000:12 1378000:61 1482000:39 1586000:56", - "littleMinSample": "38000", - "littleHyst": "18000", - "bigHidelay": "78000 1040000:18000 1144000:78000 1248000:38000 1456000:18000 1560000:38000 1664000:18000 1768000:38000 1872000:78000 2496000:58000", - "bigHifreq": "832000", - "bigHiload": "71", - "bigTgload": "71 832000:14 936000:97 1040000:89 1144000:83 1248000:10 1352000:34 1456000:28 1560000:26 1664000:51 1768000:16 1872000:77 1976000:99 2080000:98 2184000:99 2496000:98 2600000:97", - "bigMinSample": "18000", - "bigHyst": "18000", - "uxAffinity": "1" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "uxAffinity": "1" - }, - "sfLag": { - "cpuFreqMax": "16,21", - "cpuFreqMin": "12,20", - "uxAffinity": "1" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗(相对卡顿百分比 99.4% 相对续航 133.8%)", - "actions": { - "normal": { - "cpuFreqMax": "16,27", - "cpuFreqMin": "4,7", - "littleHidelay": "58000 1274000:38000 1482000:78000", - "littleHifreq": "1066000", - "littleHiload": "71", - "littleTgload": "10 546000:43 754000:67 858000:53 962000:16 1066000:54 1170000:13 1274000:7 1378000:35 1482000:72 1586000:38", - "littleMinSample": "58000", - "littleHyst": "18000", - "bigHidelay": "78000 1040000:18000 1144000:58000 1248000:78000 1352000:38000 1456000:18000 1560000:38000 1664000:78000", - "bigHifreq": "832000", - "bigHiload": "74", - "bigTgload": "93 832000:67 936000:59 1040000:91 1144000:88 1248000:67 1352000:59 1456000:94 1560000:25 1664000:29 1768000:36 1872000:90 1976000:98 2080000:99 2496000:96 2600000:97", - "bigMinSample": "18000", - "bigHyst": "18000", - "uxAffinity": "0" - }, - "interaction": { - "cpuFreqMax": "16,19", - "cpuFreqMin": "4,8", - "littleHidelay": "58000 1274000:38000 1482000:78000", - "littleHifreq": "1066000", - "littleHiload": "71", - "littleTgload": "10 546000:43 754000:67 858000:53 962000:16 1066000:54 1170000:13 1274000:7 1378000:35 1482000:72 1586000:38", - "littleMinSample": "58000", - "littleHyst": "18000", - "bigHidelay": "78000 1040000:18000 1144000:58000 1248000:78000 1352000:38000 1456000:18000 1560000:38000 1664000:78000", - "bigHifreq": "832000", - "bigHiload": "74", - "bigTgload": "93 832000:67 936000:59 1040000:91 1144000:88 1248000:67 1352000:59 1456000:94 1560000:25 1664000:29 1768000:36 1872000:90 1976000:98 2080000:99 2496000:96 2600000:97", - "bigMinSample": "18000", - "bigHyst": "18000", - "uxAffinity": "0" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "uxAffinity": "0" - }, - "sfLag": { - "cpuFreqMax": "16,19", - "cpuFreqMin": "12,16", - "uxAffinity": "1" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "16,27", - "cpuFreqMin": "4,7", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "uxAffinity": "3" - }, - "interaction": { - "cpuFreqMax": "13,21", - "cpuFreqMin": "12,20", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "uxAffinity": "3" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "uxAffinity": "3" - }, - "sfLag": { - "cpuFreqMax": "16,27", - "cpuFreqMin": "15,26", - "uxAffinity": "3" - } - } - } - ] -} \ No newline at end of file diff --git a/magisk/config/e8895.json b/magisk/config/e8895.json new file mode 100644 index 0000000..1ac10f9 --- /dev/null +++ b/magisk/config/e8895.json @@ -0,0 +1,576 @@ +{ + "meta": { + "name": "Exynos 8895[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 100, + "nr": 4, + "typicalPower": 0.36, + "typicalFreq": 1.7, + "sweetFreq": 1.2, + "plainFreq": 0.9, + "freeFreq": 0.5 + }, + { + "efficiency": 170, + "nr": 4, + "typicalPower": 1.95, + "typicalFreq": 2.5, + "sweetFreq": 1.7, + "plainFreq": 1.0, + "freeFreq": 0.7 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3 + ], + "c1": [ + 4, + 5, + 6 + ], + "c2": [ + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, + { + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, + { + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, + { + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, + { + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ + { + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ + { + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ + { + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, + { + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, + { + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, + { + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" + } + ] + } + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.3, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } +} \ No newline at end of file diff --git a/magisk/config/e8895_eas.json b/magisk/config/e8895_eas.json deleted file mode 100644 index f4552a7..0000000 --- a/magisk/config/e8895_eas.json +++ /dev/null @@ -1,411 +0,0 @@ -{ - "meta": { - "name": "e8895-eas[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1290, - "idleLoad": 860, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ - { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, - { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, - { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, - { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, - { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, - { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, - { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, - { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, - { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, - { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, - { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" - } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 100, - 100, - 100, - 100, - 170, - 170, - 170, - 170 - ], - "knobs": [ - { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, - { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, - { - "name": "topBoost", - "path": "/dev/stune/top-app/schedtune.boost", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, - { - "name": "heavyBoost", - "path": "/dev/stune/rt/schedtune.boost", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, - { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, - { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "cpuFreqMax": "15,23", - "cpuFreqMin": "1,7", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "16,23", - "cpuFreqMin": "7,10", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "16,20", - "cpuFreqMin": "10,10", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "16,20", - "cpuFreqMin": "10,10", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "16,23", - "cpuFreqMin": "10,14", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "16,20", - "cpuFreqMin": "10,10", - "uxAffinity": "2" - }, - "sfBoost": { - "cpuFreqMax": "16,23", - "cpuFreqMin": "10,23", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "cpuFreqMax": "14,15", - "cpuFreqMin": "1,7", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "15,13", - "cpuFreqMin": "7,7", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "15,11", - "cpuFreqMin": "7,7", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "16,15", - "cpuFreqMin": "7,7", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "16,18", - "cpuFreqMin": "7,9", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "15,11", - "cpuFreqMin": "7,7", - "uxAffinity": "2" - }, - "sfBoost": { - "cpuFreqMax": "16,22", - "cpuFreqMin": "7,18", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "16,23", - "cpuFreqMin": "4,7", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "16,23", - "cpuFreqMin": "8,11", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "16,23", - "cpuFreqMin": "8,15", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "16,22", - "cpuFreqMin": "8,22", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "16,23", - "cpuFreqMin": "16,22", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "16,23", - "cpuFreqMin": "8,22", - "uxAffinity": "2" - }, - "sfBoost": { - "cpuFreqMax": "16,23", - "cpuFreqMin": "8,23", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2" - } - } - } - ] -} \ No newline at end of file diff --git a/magisk/config/e8895_hmp.json b/magisk/config/e8895_hmp.json deleted file mode 100644 index 869cf9c..0000000 --- a/magisk/config/e8895_hmp.json +++ /dev/null @@ -1,486 +0,0 @@ -{ - "meta": { - "name": "e8895-hmp[21.07.25]", - "author": "yc@coolapk(powered by wipe-v2)", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1290, - "idleLoad": 860, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ - { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, - { - "hint": "Active", - "action": "normal", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, - { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, - { - "hint": "Pressed", - "action": "interaction", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, - { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, - { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, - { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, - { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, - { - "hint": "SfBoost", - "action": "sfLag", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, - { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, - { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" - } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 100, - 100, - 100, - 100, - 170, - 170, - 170, - 170 - ], - "knobs": [ - { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, - { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, - { - "name": "littleHidelay", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay", - "type": "string", - "enable": true, - "note": "小核的above_hispeed_delay" - }, - { - "name": "littleHifreq", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq", - "type": "string", - "enable": true, - "note": "小核的hispeed_freq" - }, - { - "name": "littleHiload", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load", - "type": "string", - "enable": true, - "note": "小核的go_hispeed_load" - }, - { - "name": "littleTgload", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads", - "type": "string", - "enable": true, - "note": "小核的target_loads" - }, - { - "name": "littleMinSample", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time", - "type": "string", - "enable": true, - "note": "小核的min_sample_time" - }, - { - "name": "littleHyst", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis", - "type": "string", - "enable": true, - "note": "小核的max_freq_hysteresis" - }, - { - "name": "bigHidelay", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay", - "type": "string", - "enable": true, - "note": "大核的above_hispeed_delay" - }, - { - "name": "bigHifreq", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq", - "type": "string", - "enable": true, - "note": "大核的hispeed_freq" - }, - { - "name": "bigHiload", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load", - "type": "string", - "enable": true, - "note": "大核的go_hispeed_load" - }, - { - "name": "bigTgload", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads", - "type": "string", - "enable": true, - "note": "大核的target_loads" - }, - { - "name": "bigMinSample", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time", - "type": "string", - "enable": true, - "note": "大核的min_sample_time" - }, - { - "name": "bigHyst", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/max_freq_hysteresis", - "type": "string", - "enable": true, - "note": "大核的max_freq_hysteresis" - }, - { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电(相对卡顿百分比 50.0% 相对续航 105.6%)", - "actions": { - "normal": { - "cpuFreqMax": "17,24", - "cpuFreqMin": "4,7", - "littleHidelay": "38000 1456000:58000", - "littleHifreq": "1053000", - "littleHiload": "84", - "littleTgload": "75 598000:17 715000:36 832000:15 949000:45 1053000:51 1248000:22 1456000:26 1690000:81", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "78000 1170000:18000 1261000:38000 1469000:78000 1703000:38000 1807000:58000 1937000:38000 2002000:78000", - "bigHifreq": "858000", - "bigHiload": "51", - "bigTgload": "83 858000:89 962000:93 1066000:98 1170000:91 1261000:38 1469000:79 1703000:57 1807000:20 1937000:17 2002000:99", - "bigMinSample": "18000", - "bigHyst": "18000", - "uxAffinity": "0" - }, - "interaction": { - "cpuFreqMax": "17,21", - "cpuFreqMin": "5,11", - "littleHidelay": "38000 1456000:58000", - "littleHifreq": "1053000", - "littleHiload": "84", - "littleTgload": "75 598000:17 715000:36 832000:15 949000:45 1053000:51 1248000:22 1456000:26 1690000:81", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "78000 1170000:18000 1261000:38000 1469000:78000 1703000:38000 1807000:58000 1937000:38000 2002000:78000", - "bigHifreq": "858000", - "bigHiload": "51", - "bigTgload": "83 858000:89 962000:93 1066000:98 1170000:91 1261000:38 1469000:79 1703000:57 1807000:20 1937000:17 2002000:99", - "bigMinSample": "18000", - "bigHyst": "18000", - "uxAffinity": "1" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "uxAffinity": "1" - }, - "sfLag": { - "cpuFreqMax": "17,21", - "cpuFreqMin": "14,20", - "uxAffinity": "1" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗(相对卡顿百分比 99.8% 相对续航 118.4%)", - "actions": { - "normal": { - "cpuFreqMax": "17,24", - "cpuFreqMin": "4,7", - "littleHidelay": "38000", - "littleHifreq": "1456000", - "littleHiload": "80", - "littleTgload": "33 598000:27 715000:49 832000:23 949000:32 1053000:36 1248000:45 1456000:35 1690000:73", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "78000 962000:18000 1066000:78000 1170000:18000 1261000:58000 1469000:78000 1703000:18000 1807000:38000 2002000:78000", - "bigHifreq": "858000", - "bigHiload": "68", - "bigTgload": "97 858000:63 962000:86 1066000:91 1170000:13 1261000:86 1469000:97 1703000:45 1807000:44 1937000:57 2002000:99 2158000:98 2314000:99", - "bigMinSample": "18000", - "bigHyst": "18000", - "uxAffinity": "0" - }, - "interaction": { - "cpuFreqMax": "17,20", - "cpuFreqMin": "5,8", - "littleHidelay": "38000", - "littleHifreq": "1456000", - "littleHiload": "80", - "littleTgload": "33 598000:27 715000:49 832000:23 949000:32 1053000:36 1248000:45 1456000:35 1690000:73", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "78000 962000:18000 1066000:78000 1170000:18000 1261000:58000 1469000:78000 1703000:18000 1807000:38000 2002000:78000", - "bigHifreq": "858000", - "bigHiload": "68", - "bigTgload": "97 858000:63 962000:86 1066000:91 1170000:13 1261000:86 1469000:97 1703000:45 1807000:44 1937000:57 2002000:99 2158000:98 2314000:99", - "bigMinSample": "18000", - "bigHyst": "18000", - "uxAffinity": "0" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "uxAffinity": "0" - }, - "sfLag": { - "cpuFreqMax": "17,20", - "cpuFreqMin": "14,16", - "uxAffinity": "1" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "17,24", - "cpuFreqMin": "4,7", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "uxAffinity": "3" - }, - "interaction": { - "cpuFreqMax": "15,21", - "cpuFreqMin": "14,20", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "uxAffinity": "3" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "uxAffinity": "3" - }, - "sfLag": { - "cpuFreqMax": "17,24", - "cpuFreqMin": "16,23", - "uxAffinity": "3" - } - } - } - ] -} \ No newline at end of file diff --git a/magisk/config/e9810.json b/magisk/config/e9810.json index e8160cb..b6b5dd6 100644 --- a/magisk/config/e9810.json +++ b/magisk/config/e9810.json @@ -1,411 +1,576 @@ { - "meta": { - "name": "e9810[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1600, - "idleLoad": 1160, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ - { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, - { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, - { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, + "meta": { + "name": "Exynos 9810[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 100, + "nr": 4, + "typicalPower": 0.36, + "typicalFreq": 1.8, + "sweetFreq": 1.4, + "plainFreq": 1.0, + "freeFreq": 0.6 + }, + { + "efficiency": 250, + "nr": 4, + "typicalPower": 3.83, + "typicalFreq": 2.7, + "sweetFreq": 1.8, + "plainFreq": 1.0, + "freeFreq": 0.7 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3 + ], + "c1": [ + 4, + 5, + 6 + ], + "c2": [ + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" + "k": ".", + "ac": "bg", + "pc": "auto" } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 115, - 115, - 115, - 115, - 250, - 250, - 250, - 250 - ], - "knobs": [ + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ { - "name": "topBoost", - "path": "/dev/stune/top-app/schedtune.boost", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ { - "name": "heavyBoost", - "path": "/dev/stune/rt/schedtune.boost", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" + "k": ".", + "ac": "auto", + "pc": "auto" } - ] - }, - "powermodes": [ + ] + }, { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "cpuFreqMax": "15,25", - "cpuFreqMin": "1,8", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "16,25", - "cpuFreqMin": "7,10", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "16,21", - "cpuFreqMin": "10,10", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "16,21", - "cpuFreqMin": "10,10", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "19,25", - "cpuFreqMin": "10,15", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "16,21", - "cpuFreqMin": "10,10", - "uxAffinity": "2" - }, - "sfBoost": { - "cpuFreqMax": "19,25", - "cpuFreqMin": "10,25", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2" - } + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "auto" } - }, + ] + }, { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "cpuFreqMax": "14,16", - "cpuFreqMin": "1,8", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "15,14", - "cpuFreqMin": "7,8", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "15,12", - "cpuFreqMin": "7,8", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "17,16", - "cpuFreqMin": "7,8", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "19,18", - "cpuFreqMin": "7,9", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "15,12", - "cpuFreqMin": "7,8", - "uxAffinity": "2" - }, - "sfBoost": { - "cpuFreqMax": "19,23", - "cpuFreqMin": "7,18", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2" - } + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ + { + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" } - }, + ] + }, { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "19,25", - "cpuFreqMin": "4,8", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "19,25", - "cpuFreqMin": "8,12", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "17,25", - "cpuFreqMin": "8,16", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "17,23", - "cpuFreqMin": "8,23", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "19,25", - "cpuFreqMin": "17,23", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "19,25", - "cpuFreqMin": "8,23", - "uxAffinity": "2" - }, - "sfBoost": { - "cpuFreqMax": "19,25", - "cpuFreqMin": "8,25", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2" - } + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, + { + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, + { + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, + { + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" } + ] } - ] + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.3, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } } \ No newline at end of file diff --git a/magisk/config/e9820.json b/magisk/config/e9820.json index 9b32899..bd6290e 100644 --- a/magisk/config/e9820.json +++ b/magisk/config/e9820.json @@ -1,524 +1,585 @@ { - "meta": { - "name": "e9820/e9825[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1600, - "idleLoad": 1150, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ + "meta": { + "name": "Exynos 9820/9825[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 100, + "nr": 4, + "typicalPower": 0.36, + "typicalFreq": 1.9, + "sweetFreq": 1.4, + "plainFreq": 1.0, + "freeFreq": 0.6 + }, + { + "efficiency": 200, + "nr": 2, + "typicalPower": 1.16, + "typicalFreq": 2.3, + "sweetFreq": 1.7, + "plainFreq": 1.0, + "freeFreq": 0.7 + }, + { + "efficiency": 320, + "nr": 2, + "typicalPower": 2.99, + "typicalFreq": 2.7, + "sweetFreq": 2.0, + "plainFreq": 1.4, + "freeFreq": 0.8 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3 + ], + "c1": [ + 4, + 5 + ], + "c2": [ + 6, + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" + "k": ".", + "ac": "auto", + "pc": "bg" } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4, - 6 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 115, - 115, - 115, - 115, - 200, - 200, - 290, - 290 - ], - "knobs": [ + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ { - "name": "topBoost", - "path": "/dev/stune/top-app/schedtune.boost", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ { - "name": "heavyBoost", - "path": "/dev/stune/rt/schedtune.boost", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - }, + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, { - "name": "cpuFreqMin0", - "path": "/dev/cluster0_freq_min", - "note": "Samsung EPIC interfaces 集群0最小频率", - "type": "int", - "enable": true - }, + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, { - "name": "cpuFreqMax0", - "path": "/dev/cluster0_freq_max", - "note": "Samsung EPIC interfaces 集群0最大频率", - "type": "int", - "enable": true - }, + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, { - "name": "cpuFreqMin1", - "path": "/dev/cluster1_freq_min", - "note": "Samsung EPIC interfaces 集群1最小频率", - "type": "int", - "enable": true - }, + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, { - "name": "cpuFreqMax1", - "path": "/dev/cluster1_freq_max", - "note": "Samsung EPIC interfaces 集群1最大频率", - "type": "int", - "enable": true - }, + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, { - "name": "cpuFreqMin2", - "path": "/dev/cluster2_freq_min", - "note": "Samsung EPIC interfaces 集群2最小频率", - "type": "int", - "enable": true - }, + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, { - "name": "cpuFreqMax2", - "path": "/dev/cluster2_freq_max", - "note": "Samsung EPIC interfaces 集群2最大频率", - "type": "int", - "enable": true - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "0", - "cpuFreqMin0": "100000", - "cpuFreqMax0": "1600000", - "cpuFreqMin1": "500000", - "cpuFreqMax1": "2000000", - "cpuFreqMin2": "800000", - "cpuFreqMax2": "2500000" - }, - "active": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "1", - "cpuFreqMin0": "700000", - "cpuFreqMax0": "1700000", - "cpuFreqMin1": "1000000", - "cpuFreqMax1": "2000000", - "cpuFreqMin2": "1000000", - "cpuFreqMax2": "2500000" - }, - "interaction": { - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "1100000", - "cpuFreqMax0": "1700000", - "cpuFreqMin1": "1000000", - "cpuFreqMax1": "1600000", - "cpuFreqMin2": "1000000", - "cpuFreqMax2": "2100000" - }, - "pressed": { - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "1100000", - "cpuFreqMax0": "1700000", - "cpuFreqMin1": "1000000", - "cpuFreqMax1": "1800000", - "cpuFreqMin2": "1000000", - "cpuFreqMax2": "2100000" - }, - "heavyLoad": { - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "1100000", - "cpuFreqMax0": "1900000", - "cpuFreqMin1": "1400000", - "cpuFreqMax1": "2000000", - "cpuFreqMin2": "1500000", - "cpuFreqMax2": "2500000" - }, - "sfLag": { - "uxAffinity": "2", - "cpuFreqMin0": "1100000", - "cpuFreqMax0": "1700000", - "cpuFreqMin1": "2000000", - "cpuFreqMax1": "2000000", - "cpuFreqMin2": "1000000", - "cpuFreqMax2": "2100000" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2", - "cpuFreqMin0": "1100000", - "cpuFreqMax0": "1900000", - "cpuFreqMin1": "1800000", - "cpuFreqMax1": "2000000", - "cpuFreqMin2": "2500000", - "cpuFreqMax2": "2600000" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "0", - "cpuFreqMin0": "100000", - "cpuFreqMax0": "1400000", - "cpuFreqMin1": "500000", - "cpuFreqMax1": "1400000", - "cpuFreqMin2": "800000", - "cpuFreqMax2": "1600000" - }, - "active": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "1", - "cpuFreqMin0": "700000", - "cpuFreqMax0": "1600000", - "cpuFreqMin1": "500000", - "cpuFreqMax1": "1200000", - "cpuFreqMin2": "800000", - "cpuFreqMax2": "1400000" - }, - "interaction": { - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "700000", - "cpuFreqMax0": "1600000", - "cpuFreqMin1": "600000", - "cpuFreqMax1": "1000000", - "cpuFreqMin2": "800000", - "cpuFreqMax2": "1200000" - }, - "pressed": { - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "700000", - "cpuFreqMax0": "1800000", - "cpuFreqMin1": "600000", - "cpuFreqMax1": "1400000", - "cpuFreqMin2": "800000", - "cpuFreqMax2": "1600000" - }, - "heavyLoad": { - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "700000", - "cpuFreqMax0": "1900000", - "cpuFreqMin1": "800000", - "cpuFreqMax1": "1600000", - "cpuFreqMin2": "900000", - "cpuFreqMax2": "1800000" - }, - "sfLag": { - "uxAffinity": "2", - "cpuFreqMin0": "700000", - "cpuFreqMax0": "1600000", - "cpuFreqMin1": "1600000", - "cpuFreqMax1": "1600000", - "cpuFreqMin2": "800000", - "cpuFreqMax2": "1200000" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2", - "cpuFreqMin0": "700000", - "cpuFreqMax0": "1900000", - "cpuFreqMin1": "1600000", - "cpuFreqMax1": "2000000", - "cpuFreqMin2": "1800000", - "cpuFreqMax2": "2300000" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "0", - "cpuFreqMin0": "400000", - "cpuFreqMax0": "1900000", - "cpuFreqMin1": "500000", - "cpuFreqMax1": "2400000", - "cpuFreqMin2": "800000", - "cpuFreqMax2": "2600000" - }, - "active": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "1", - "cpuFreqMin0": "900000", - "cpuFreqMax0": "1900000", - "cpuFreqMin1": "1000000", - "cpuFreqMax1": "2400000", - "cpuFreqMin2": "1200000", - "cpuFreqMax2": "2600000" - }, - "interaction": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "900000", - "cpuFreqMax0": "1800000", - "cpuFreqMin1": "1400000", - "cpuFreqMax1": "2200000", - "cpuFreqMin2": "1600000", - "cpuFreqMax2": "2500000" - }, - "pressed": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "900000", - "cpuFreqMax0": "1800000", - "cpuFreqMin1": "2000000", - "cpuFreqMax1": "2000000", - "cpuFreqMin2": "2300000", - "cpuFreqMax2": "2300000" - }, - "heavyLoad": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "1800000", - "cpuFreqMax0": "1900000", - "cpuFreqMin1": "2000000", - "cpuFreqMax1": "2400000", - "cpuFreqMin2": "2300000", - "cpuFreqMax2": "2600000" - }, - "sfLag": { - "uxAffinity": "2", - "cpuFreqMin0": "900000", - "cpuFreqMax0": "1900000", - "cpuFreqMin1": "2400000", - "cpuFreqMax1": "2400000", - "cpuFreqMin2": "2300000", - "cpuFreqMax2": "2600000" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "cpuFreqMin0": "900000", - "cpuFreqMax0": "1900000", - "cpuFreqMin1": "2400000", - "cpuFreqMax1": "2400000", - "cpuFreqMin2": "2600000", - "cpuFreqMax2": "2600000" - } + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" } + ] } - ] + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.3, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } } \ No newline at end of file diff --git a/magisk/config/e990.json b/magisk/config/e990.json index 8d90df0..ffa512b 100644 --- a/magisk/config/e990.json +++ b/magisk/config/e990.json @@ -1,524 +1,585 @@ { - "meta": { - "name": "e990[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1600, - "idleLoad": 1200, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ + "meta": { + "name": "Exynos 990[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 100, + "nr": 4, + "typicalPower": 0.42, + "typicalFreq": 2.0, + "sweetFreq": 1.4, + "plainFreq": 1.0, + "freeFreq": 0.6 + }, + { + "efficiency": 250, + "nr": 2, + "typicalPower": 1.66, + "typicalFreq": 2.6, + "sweetFreq": 1.8, + "plainFreq": 1.0, + "freeFreq": 0.7 + }, + { + "efficiency": 320, + "nr": 2, + "typicalPower": 3.82, + "typicalFreq": 2.7, + "sweetFreq": 2.0, + "plainFreq": 1.4, + "freeFreq": 0.8 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3 + ], + "c1": [ + 4, + 5 + ], + "c2": [ + 6, + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" + "k": ".", + "ac": "auto", + "pc": "bg" } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4, - 6 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 115, - 115, - 115, - 115, - 250, - 250, - 320, - 320 - ], - "knobs": [ + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ { - "name": "topBoost", - "path": "/dev/stune/top-app/schedtune.boost", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ { - "name": "heavyBoost", - "path": "/dev/stune/rt/schedtune.boost", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - }, + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, { - "name": "cpuFreqMin0", - "path": "/dev/cluster0_freq_min", - "note": "Samsung EPIC interfaces 集群0最小频率", - "type": "int", - "enable": true - }, + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, { - "name": "cpuFreqMax0", - "path": "/dev/cluster0_freq_max", - "note": "Samsung EPIC interfaces 集群0最大频率", - "type": "int", - "enable": true - }, + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, { - "name": "cpuFreqMin1", - "path": "/dev/cluster1_freq_min", - "note": "Samsung EPIC interfaces 集群1最小频率", - "type": "int", - "enable": true - }, + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, { - "name": "cpuFreqMax1", - "path": "/dev/cluster1_freq_max", - "note": "Samsung EPIC interfaces 集群1最大频率", - "type": "int", - "enable": true - }, + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, { - "name": "cpuFreqMin2", - "path": "/dev/cluster2_freq_min", - "note": "Samsung EPIC interfaces 集群2最小频率", - "type": "int", - "enable": true - }, + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, { - "name": "cpuFreqMax2", - "path": "/dev/cluster2_freq_max", - "note": "Samsung EPIC interfaces 集群2最大频率", - "type": "int", - "enable": true - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "0", - "cpuFreqMin0": "100000", - "cpuFreqMax0": "1600000", - "cpuFreqMin1": "500000", - "cpuFreqMax1": "2000000", - "cpuFreqMin2": "800000", - "cpuFreqMax2": "2500000" - }, - "active": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "1", - "cpuFreqMin0": "700000", - "cpuFreqMax0": "1700000", - "cpuFreqMin1": "1000000", - "cpuFreqMax1": "2000000", - "cpuFreqMin2": "1000000", - "cpuFreqMax2": "2500000" - }, - "interaction": { - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "1100000", - "cpuFreqMax0": "1700000", - "cpuFreqMin1": "1000000", - "cpuFreqMax1": "1600000", - "cpuFreqMin2": "1000000", - "cpuFreqMax2": "2100000" - }, - "pressed": { - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "1100000", - "cpuFreqMax0": "1700000", - "cpuFreqMin1": "1000000", - "cpuFreqMax1": "1800000", - "cpuFreqMin2": "1000000", - "cpuFreqMax2": "2100000" - }, - "heavyLoad": { - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "1100000", - "cpuFreqMax0": "2000000", - "cpuFreqMin1": "1400000", - "cpuFreqMax1": "2000000", - "cpuFreqMin2": "1500000", - "cpuFreqMax2": "2500000" - }, - "sfLag": { - "uxAffinity": "2", - "cpuFreqMin0": "1100000", - "cpuFreqMax0": "1700000", - "cpuFreqMin1": "2000000", - "cpuFreqMax1": "2000000", - "cpuFreqMin2": "1000000", - "cpuFreqMax2": "2100000" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2", - "cpuFreqMin0": "1100000", - "cpuFreqMax0": "2000000", - "cpuFreqMin1": "1800000", - "cpuFreqMax1": "2000000", - "cpuFreqMin2": "2500000", - "cpuFreqMax2": "2700000" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "0", - "cpuFreqMin0": "100000", - "cpuFreqMax0": "1400000", - "cpuFreqMin1": "500000", - "cpuFreqMax1": "1400000", - "cpuFreqMin2": "800000", - "cpuFreqMax2": "1600000" - }, - "active": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "1", - "cpuFreqMin0": "700000", - "cpuFreqMax0": "1600000", - "cpuFreqMin1": "500000", - "cpuFreqMax1": "1200000", - "cpuFreqMin2": "800000", - "cpuFreqMax2": "1400000" - }, - "interaction": { - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "700000", - "cpuFreqMax0": "1600000", - "cpuFreqMin1": "600000", - "cpuFreqMax1": "1000000", - "cpuFreqMin2": "800000", - "cpuFreqMax2": "1200000" - }, - "pressed": { - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "700000", - "cpuFreqMax0": "1800000", - "cpuFreqMin1": "600000", - "cpuFreqMax1": "1400000", - "cpuFreqMin2": "800000", - "cpuFreqMax2": "1600000" - }, - "heavyLoad": { - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "700000", - "cpuFreqMax0": "2000000", - "cpuFreqMin1": "800000", - "cpuFreqMax1": "1600000", - "cpuFreqMin2": "900000", - "cpuFreqMax2": "1800000" - }, - "sfLag": { - "uxAffinity": "2", - "cpuFreqMin0": "700000", - "cpuFreqMax0": "1600000", - "cpuFreqMin1": "1600000", - "cpuFreqMax1": "1600000", - "cpuFreqMin2": "800000", - "cpuFreqMax2": "1200000" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2", - "cpuFreqMin0": "700000", - "cpuFreqMax0": "2000000", - "cpuFreqMin1": "1600000", - "cpuFreqMax1": "2000000", - "cpuFreqMin2": "1800000", - "cpuFreqMax2": "2300000" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "0", - "cpuFreqMin0": "400000", - "cpuFreqMax0": "2000000", - "cpuFreqMin1": "500000", - "cpuFreqMax1": "2500000", - "cpuFreqMin2": "800000", - "cpuFreqMax2": "2700000" - }, - "active": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "1", - "cpuFreqMin0": "900000", - "cpuFreqMax0": "2000000", - "cpuFreqMin1": "1000000", - "cpuFreqMax1": "2500000", - "cpuFreqMin2": "1200000", - "cpuFreqMax2": "2700000" - }, - "interaction": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "900000", - "cpuFreqMax0": "1800000", - "cpuFreqMin1": "1400000", - "cpuFreqMax1": "2200000", - "cpuFreqMin2": "1600000", - "cpuFreqMax2": "2500000" - }, - "pressed": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "900000", - "cpuFreqMax0": "1800000", - "cpuFreqMin1": "2000000", - "cpuFreqMax1": "2000000", - "cpuFreqMin2": "2300000", - "cpuFreqMax2": "2300000" - }, - "heavyLoad": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "dispFeature": "2", - "cpuFreqMin0": "1800000", - "cpuFreqMax0": "2000000", - "cpuFreqMin1": "2000000", - "cpuFreqMax1": "2500000", - "cpuFreqMin2": "2300000", - "cpuFreqMax2": "2700000" - }, - "sfLag": { - "uxAffinity": "2", - "cpuFreqMin0": "900000", - "cpuFreqMax0": "2000000", - "cpuFreqMin1": "2500000", - "cpuFreqMax1": "2500000", - "cpuFreqMin2": "2300000", - "cpuFreqMax2": "2700000" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "2", - "cpuFreqMin0": "900000", - "cpuFreqMax0": "2000000", - "cpuFreqMin1": "2500000", - "cpuFreqMax1": "2500000", - "cpuFreqMin2": "2700000", - "cpuFreqMax2": "2700000" - } + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" } + ] } - ] + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.3, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } } \ No newline at end of file diff --git a/magisk/config/gs101.json b/magisk/config/gs101.json new file mode 100644 index 0000000..017ef82 --- /dev/null +++ b/magisk/config/gs101.json @@ -0,0 +1,585 @@ +{ + "meta": { + "name": "Google Tensor[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 115, + "nr": 4, + "typicalPower": 0.62, + "typicalFreq": 1.8, + "sweetFreq": 1.4, + "plainFreq": 1.0, + "freeFreq": 0.6 + }, + { + "efficiency": 250, + "nr": 2, + "typicalPower": 1.19, + "typicalFreq": 2.2, + "sweetFreq": 1.7, + "plainFreq": 1.0, + "freeFreq": 0.7 + }, + { + "efficiency": 400, + "nr": 2, + "typicalPower": 3.15, + "typicalFreq": 2.8, + "sweetFreq": 1.9, + "plainFreq": 1.4, + "freeFreq": 0.8 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3 + ], + "c1": [ + 4, + 5 + ], + "c2": [ + 6, + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, + { + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, + { + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, + { + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, + { + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ + { + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ + { + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ + { + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, + { + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, + { + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, + { + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" + } + ] + } + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.7, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.7, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.7, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } +} \ No newline at end of file diff --git a/magisk/config/mtd1000.json b/magisk/config/mtd1000.json index 637538f..49e4adc 100644 --- a/magisk/config/mtd1000.json +++ b/magisk/config/mtd1000.json @@ -1,517 +1,576 @@ { - "meta": { - "name": "Dimensity 1000(mt6889)/1000+(mt6889z)[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1600, - "idleLoad": 1200, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ + "meta": { + "name": "Dimensity 1000(mt6889)/1000+(mt6889z)/1000L(mt6885)[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 100, + "nr": 4, + "typicalPower": 0.36, + "typicalFreq": 2.0, + "sweetFreq": 1.4, + "plainFreq": 1.0, + "freeFreq": 0.6 + }, + { + "efficiency": 300, + "nr": 4, + "typicalPower": 1.65, + "typicalFreq": 2.6, + "sweetFreq": 1.7, + "plainFreq": 1.0, + "freeFreq": 0.7 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3 + ], + "c1": [ + 4, + 5, + 6 + ], + "c2": [ + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 115, - 115, - 115, - 115, - 300, - 300, - 300, - 300 - ], - "knobs": [ + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ { - "name": "schedBoost", - "path": "/sys/devices/system/cpu/sched/sched_boost", - "type": "string", - "enable": true, - "note": "异构调度器全局任务放置boost,不考虑能耗代价" - }, + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ { - "name": "topBoost", - "path": "/dev/stune/top-app/schedtune.boost", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ { - "name": "heavyBoost", - "path": "/dev/stune/rt/schedtune.boost", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - }, + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ { - "name": "ppmPolicy", - "path": "/proc/ppm/policy_status", - "note": "MTK power policy子功能开关", - "type": "string", - "enable": true - }, + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, { - "name": "cpuFreqMin0", - "path": "/proc/ppm/policy/hard_userlimit_min_cpu_freq", - "note": "MTK power policy manager最小频率", - "type": "string", - "enable": true - }, + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, { - "name": "cpuFreqMax0", - "path": "/proc/ppm/policy/hard_userlimit_max_cpu_freq", - "note": "MTK power policy manager最大频率", - "type": "string", - "enable": true - }, + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, { - "name": "cpuFreqMin1", - "path": "/proc/ppm/policy/hard_userlimit_min_cpu_freq", - "note": "MTK power policy manager最小频率", - "type": "string", - "enable": true - }, + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, { - "name": "cpuFreqMax1", - "path": "/proc/ppm/policy/hard_userlimit_max_cpu_freq", - "note": "MTK power policy manager最大频率", - "type": "string", - "enable": true - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "0", - "cpuFreqMin0": "0 100000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 2600000", - "ppmPolicy": "4 1" - }, - "active": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "1", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1700000", - "cpuFreqMin1": "1 1100000", - "cpuFreqMax1": "1 2600000", - "ppmPolicy": "6 1" - }, - "interaction": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 1700000", - "cpuFreqMin1": "1 1100000", - "cpuFreqMax1": "1 2200000", - "ppmPolicy": "6 1" - }, - "pressed": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 1700000", - "cpuFreqMin1": "1 1100000", - "cpuFreqMax1": "1 2200000", - "ppmPolicy": "6 1" - }, - "heavyLoad": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 1600000", - "cpuFreqMax1": "1 2600000", - "ppmPolicy": "6 1" - }, - "sfLag": { - "uxAffinity": "1", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 1700000", - "cpuFreqMin1": "1 1100000", - "cpuFreqMax1": "1 2200000", - "ppmPolicy": "6 1" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 2600000", - "cpuFreqMax1": "1 2600000", - "ppmPolicy": "6 1" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "0", - "cpuFreqMin0": "0 100000", - "cpuFreqMax0": "0 1400000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1700000", - "ppmPolicy": "4 1" - }, - "active": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "1", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1400000", - "ppmPolicy": "6 1" - }, - "interaction": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1200000", - "ppmPolicy": "6 1" - }, - "pressed": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1800000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1700000", - "ppmPolicy": "6 1" - }, - "heavyLoad": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 1000000", - "cpuFreqMax1": "1 1900000", - "ppmPolicy": "6 1" - }, - "sfLag": { - "uxAffinity": "1", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1200000", - "ppmPolicy": "6 1" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 1900000", - "cpuFreqMax1": "1 2400000", - "ppmPolicy": "6 1" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "4", - "dispFeature": "0", - "cpuFreqMin0": "0 500000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 2600000", - "ppmPolicy": "4 1" - }, - "active": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "4", - "dispFeature": "1", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 1200000", - "cpuFreqMax1": "1 2600000", - "ppmPolicy": "6 1" - }, - "interaction": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 1800000", - "cpuFreqMin1": "1 1700000", - "cpuFreqMax1": "1 2600000", - "ppmPolicy": "6 1" - }, - "pressed": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 1800000", - "cpuFreqMin1": "1 2400000", - "cpuFreqMax1": "1 2400000", - "ppmPolicy": "6 1" - }, - "heavyLoad": { - "schedBoost": "1", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 1800000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 2400000", - "cpuFreqMax1": "1 2600000", - "ppmPolicy": "6 1" - }, - "sfLag": { - "uxAffinity": "3", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 2400000", - "cpuFreqMax1": "1 2600000", - "ppmPolicy": "6 1" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 2600000", - "cpuFreqMax1": "1 2600000", - "ppmPolicy": "6 1" - } + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, + { + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" } + ] } - ] + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.3, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } } \ No newline at end of file diff --git a/magisk/config/mtd1000l.json b/magisk/config/mtd1000l.json deleted file mode 100644 index 9814b23..0000000 --- a/magisk/config/mtd1000l.json +++ /dev/null @@ -1,517 +0,0 @@ -{ - "meta": { - "name": "Dimensity 1000L(mt6885)[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1600, - "idleLoad": 1200, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ - { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, - { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, - { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, - { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, - { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, - { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, - { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, - { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, - { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, - { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, - { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" - } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 115, - 115, - 115, - 115, - 300, - 300, - 300, - 300 - ], - "knobs": [ - { - "name": "schedBoost", - "path": "/sys/devices/system/cpu/sched/sched_boost", - "type": "string", - "enable": true, - "note": "异构调度器全局任务放置boost,不考虑能耗代价" - }, - { - "name": "topBoost", - "path": "/dev/stune/top-app/schedtune.boost", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, - { - "name": "heavyBoost", - "path": "/dev/stune/rt/schedtune.boost", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, - { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, - { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - }, - { - "name": "ppmPolicy", - "path": "/proc/ppm/policy_status", - "note": "MTK power policy子功能开关", - "type": "string", - "enable": true - }, - { - "name": "cpuFreqMin0", - "path": "/proc/ppm/policy/hard_userlimit_min_cpu_freq", - "note": "MTK power policy manager最小频率", - "type": "string", - "enable": true - }, - { - "name": "cpuFreqMax0", - "path": "/proc/ppm/policy/hard_userlimit_max_cpu_freq", - "note": "MTK power policy manager最大频率", - "type": "string", - "enable": true - }, - { - "name": "cpuFreqMin1", - "path": "/proc/ppm/policy/hard_userlimit_min_cpu_freq", - "note": "MTK power policy manager最小频率", - "type": "string", - "enable": true - }, - { - "name": "cpuFreqMax1", - "path": "/proc/ppm/policy/hard_userlimit_max_cpu_freq", - "note": "MTK power policy manager最大频率", - "type": "string", - "enable": true - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "0", - "cpuFreqMin0": "0 100000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 2200000", - "ppmPolicy": "4 1" - }, - "active": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "1", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1700000", - "cpuFreqMin1": "1 1100000", - "cpuFreqMax1": "1 2200000", - "ppmPolicy": "6 1" - }, - "interaction": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 1700000", - "cpuFreqMin1": "1 1100000", - "cpuFreqMax1": "1 2200000", - "ppmPolicy": "6 1" - }, - "pressed": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 1700000", - "cpuFreqMin1": "1 1100000", - "cpuFreqMax1": "1 2200000", - "ppmPolicy": "6 1" - }, - "heavyLoad": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 1600000", - "cpuFreqMax1": "1 2200000", - "ppmPolicy": "6 1" - }, - "sfLag": { - "uxAffinity": "1", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 1700000", - "cpuFreqMin1": "1 1100000", - "cpuFreqMax1": "1 2200000", - "ppmPolicy": "6 1" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 2200000", - "cpuFreqMax1": "1 2200000", - "ppmPolicy": "6 1" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "0", - "cpuFreqMin0": "0 100000", - "cpuFreqMax0": "0 1400000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1700000", - "ppmPolicy": "4 1" - }, - "active": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "1", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1400000", - "ppmPolicy": "6 1" - }, - "interaction": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1200000", - "ppmPolicy": "6 1" - }, - "pressed": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1800000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1700000", - "ppmPolicy": "6 1" - }, - "heavyLoad": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 1000000", - "cpuFreqMax1": "1 1900000", - "ppmPolicy": "6 1" - }, - "sfLag": { - "uxAffinity": "1", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1200000", - "ppmPolicy": "6 1" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 1900000", - "cpuFreqMax1": "1 2200000", - "ppmPolicy": "6 1" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "4", - "dispFeature": "0", - "cpuFreqMin0": "0 500000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 2200000", - "ppmPolicy": "4 1" - }, - "active": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "4", - "dispFeature": "1", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 1200000", - "cpuFreqMax1": "1 2200000", - "ppmPolicy": "6 1" - }, - "interaction": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 1800000", - "cpuFreqMin1": "1 1700000", - "cpuFreqMax1": "1 2200000", - "ppmPolicy": "6 1" - }, - "pressed": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 1800000", - "cpuFreqMin1": "1 2200000", - "cpuFreqMax1": "1 2200000", - "ppmPolicy": "6 1" - }, - "heavyLoad": { - "schedBoost": "1", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 1800000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 2200000", - "cpuFreqMax1": "1 2200000", - "ppmPolicy": "6 1" - }, - "sfLag": { - "uxAffinity": "3", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 2200000", - "cpuFreqMax1": "1 2200000", - "ppmPolicy": "6 1" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 2200000", - "cpuFreqMax1": "1 2200000", - "ppmPolicy": "6 1" - } - } - } - ] -} \ No newline at end of file diff --git a/magisk/config/mtd1100.json b/magisk/config/mtd1100.json deleted file mode 100644 index b2db432..0000000 --- a/magisk/config/mtd1100.json +++ /dev/null @@ -1,517 +0,0 @@ -{ - "meta": { - "name": "Dimensity 1100(mt6891z)[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1600, - "idleLoad": 1200, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ - { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, - { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, - { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, - { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, - { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, - { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, - { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, - { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, - { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, - { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, - { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" - } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 115, - 115, - 115, - 115, - 320, - 320, - 320, - 320 - ], - "knobs": [ - { - "name": "schedBoost", - "path": "/sys/devices/system/cpu/sched/sched_boost", - "type": "string", - "enable": true, - "note": "异构调度器全局任务放置boost,不考虑能耗代价" - }, - { - "name": "topBoost", - "path": "/dev/stune/top-app/schedtune.boost", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, - { - "name": "heavyBoost", - "path": "/dev/stune/rt/schedtune.boost", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, - { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, - { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - }, - { - "name": "ppmPolicy", - "path": "/proc/ppm/policy_status", - "note": "MTK power policy子功能开关", - "type": "string", - "enable": true - }, - { - "name": "cpuFreqMin0", - "path": "/proc/ppm/policy/hard_userlimit_min_cpu_freq", - "note": "MTK power policy manager最小频率", - "type": "string", - "enable": true - }, - { - "name": "cpuFreqMax0", - "path": "/proc/ppm/policy/hard_userlimit_max_cpu_freq", - "note": "MTK power policy manager最大频率", - "type": "string", - "enable": true - }, - { - "name": "cpuFreqMin1", - "path": "/proc/ppm/policy/hard_userlimit_min_cpu_freq", - "note": "MTK power policy manager最小频率", - "type": "string", - "enable": true - }, - { - "name": "cpuFreqMax1", - "path": "/proc/ppm/policy/hard_userlimit_max_cpu_freq", - "note": "MTK power policy manager最大频率", - "type": "string", - "enable": true - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "0", - "cpuFreqMin0": "0 100000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 2600000", - "ppmPolicy": "4 1" - }, - "active": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "1", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1700000", - "cpuFreqMin1": "1 1100000", - "cpuFreqMax1": "1 2600000", - "ppmPolicy": "6 1" - }, - "interaction": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 1700000", - "cpuFreqMin1": "1 1100000", - "cpuFreqMax1": "1 2200000", - "ppmPolicy": "6 1" - }, - "pressed": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 1700000", - "cpuFreqMin1": "1 1100000", - "cpuFreqMax1": "1 2200000", - "ppmPolicy": "6 1" - }, - "heavyLoad": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 1600000", - "cpuFreqMax1": "1 2600000", - "ppmPolicy": "6 1" - }, - "sfLag": { - "uxAffinity": "1", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 1700000", - "cpuFreqMin1": "1 1100000", - "cpuFreqMax1": "1 2200000", - "ppmPolicy": "6 1" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 2600000", - "cpuFreqMax1": "1 2600000", - "ppmPolicy": "6 1" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "0", - "cpuFreqMin0": "0 100000", - "cpuFreqMax0": "0 1400000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1800000", - "ppmPolicy": "4 1" - }, - "active": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "1", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1500000", - "ppmPolicy": "6 1" - }, - "interaction": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 800000", - "cpuFreqMax1": "1 1200000", - "ppmPolicy": "6 1" - }, - "pressed": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1800000", - "cpuFreqMin1": "1 800000", - "cpuFreqMax1": "1 1800000", - "ppmPolicy": "6 1" - }, - "heavyLoad": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 1000000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - }, - "sfLag": { - "uxAffinity": "1", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 800000", - "cpuFreqMax1": "1 1200000", - "ppmPolicy": "6 1" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 2000000", - "cpuFreqMax1": "1 2500000", - "ppmPolicy": "6 1" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "4", - "dispFeature": "0", - "cpuFreqMin0": "0 500000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 2600000", - "ppmPolicy": "4 1" - }, - "active": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "4", - "dispFeature": "1", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 1200000", - "cpuFreqMax1": "1 2600000", - "ppmPolicy": "6 1" - }, - "interaction": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 1800000", - "cpuFreqMin1": "1 1800000", - "cpuFreqMax1": "1 2600000", - "ppmPolicy": "6 1" - }, - "pressed": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 1800000", - "cpuFreqMin1": "1 2500000", - "cpuFreqMax1": "1 2500000", - "ppmPolicy": "6 1" - }, - "heavyLoad": { - "schedBoost": "1", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 1800000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 2500000", - "cpuFreqMax1": "1 2600000", - "ppmPolicy": "6 1" - }, - "sfLag": { - "uxAffinity": "3", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 2500000", - "cpuFreqMax1": "1 2600000", - "ppmPolicy": "6 1" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 2600000", - "cpuFreqMax1": "1 2600000", - "ppmPolicy": "6 1" - } - } - } - ] -} \ No newline at end of file diff --git a/magisk/config/mtd1200.json b/magisk/config/mtd1200.json index 0992abf..f2d408c 100644 --- a/magisk/config/mtd1200.json +++ b/magisk/config/mtd1200.json @@ -1,574 +1,585 @@ { - "meta": { - "name": "Dimensity 1200(mt6893)[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1600, - "idleLoad": 1200, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ + "meta": { + "name": "Dimensity 1200(mt6893)/1100(mt6891z)[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 100, + "nr": 4, + "typicalPower": 0.36, + "typicalFreq": 2.0, + "sweetFreq": 1.4, + "plainFreq": 1.0, + "freeFreq": 0.6 + }, + { + "efficiency": 320, + "nr": 3, + "typicalPower": 1.39, + "typicalFreq": 2.6, + "sweetFreq": 1.7, + "plainFreq": 1.0, + "freeFreq": 0.7 + }, + { + "efficiency": 320, + "nr": 1, + "typicalPower": 2.24, + "typicalFreq": 3.0, + "sweetFreq": 2.1, + "plainFreq": 1.4, + "freeFreq": 0.8 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3 + ], + "c1": [ + 4, + 5, + 6 + ], + "c2": [ + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4, - 7 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 115, - 115, - 115, - 115, - 320, - 320, - 320, - 320 - ], - "knobs": [ + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ { - "name": "schedBoost", - "path": "/sys/devices/system/cpu/sched/sched_boost", - "type": "string", - "enable": true, - "note": "异构调度器全局任务放置boost,不考虑能耗代价" - }, + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ { - "name": "topBoost", - "path": "/dev/stune/top-app/schedtune.boost", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ { - "name": "heavyBoost", - "path": "/dev/stune/rt/schedtune.boost", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - }, + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, { - "name": "ppmPolicy", - "path": "/proc/ppm/policy_status", - "note": "MTK power policy子功能开关", - "type": "string", - "enable": true - }, + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, { - "name": "cpuFreqMin0", - "path": "/proc/ppm/policy/hard_userlimit_min_cpu_freq", - "note": "MTK power policy manager最小频率", - "type": "string", - "enable": true - }, + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, { - "name": "cpuFreqMax0", - "path": "/proc/ppm/policy/hard_userlimit_max_cpu_freq", - "note": "MTK power policy manager最大频率", - "type": "string", - "enable": true - }, + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, { - "name": "cpuFreqMin1", - "path": "/proc/ppm/policy/hard_userlimit_min_cpu_freq", - "note": "MTK power policy manager最小频率", - "type": "string", - "enable": true - }, + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, { - "name": "cpuFreqMax1", - "path": "/proc/ppm/policy/hard_userlimit_max_cpu_freq", - "note": "MTK power policy manager最大频率", - "type": "string", - "enable": true - }, + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, { - "name": "cpuFreqMin2", - "path": "/proc/ppm/policy/hard_userlimit_min_cpu_freq", - "note": "MTK power policy manager最小频率", - "type": "string", - "enable": true - }, + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, { - "name": "cpuFreqMax2", - "path": "/proc/ppm/policy/hard_userlimit_max_cpu_freq", - "note": "MTK power policy manager最大频率", - "type": "string", - "enable": true - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "0", - "cpuFreqMin0": "0 100000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 2000000", - "cpuFreqMin2": "2 700000", - "cpuFreqMax2": "2 2800000", - "ppmPolicy": "4 1" - }, - "active": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "1", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1700000", - "cpuFreqMin1": "1 1000000", - "cpuFreqMax1": "1 2000000", - "cpuFreqMin2": "2 1100000", - "cpuFreqMax2": "2 2800000", - "ppmPolicy": "6 1" - }, - "interaction": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 1700000", - "cpuFreqMin1": "1 1000000", - "cpuFreqMax1": "1 1600000", - "cpuFreqMin2": "2 1100000", - "cpuFreqMax2": "2 2200000", - "ppmPolicy": "6 1" - }, - "pressed": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 1700000", - "cpuFreqMin1": "1 1000000", - "cpuFreqMax1": "1 1800000", - "cpuFreqMin2": "2 1100000", - "cpuFreqMax2": "2 2200000", - "ppmPolicy": "6 1" - }, - "heavyLoad": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 1400000", - "cpuFreqMax1": "1 2000000", - "cpuFreqMin2": "2 1600000", - "cpuFreqMax2": "2 2800000", - "ppmPolicy": "6 1" - }, - "sfLag": { - "uxAffinity": "1", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 1700000", - "cpuFreqMin1": "1 2000000", - "cpuFreqMax1": "1 2000000", - "cpuFreqMin2": "2 1100000", - "cpuFreqMax2": "2 2200000", - "ppmPolicy": "6 1" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 1800000", - "cpuFreqMax1": "1 2000000", - "cpuFreqMin2": "2 2800000", - "cpuFreqMax2": "2 3000000", - "ppmPolicy": "6 1" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "0", - "cpuFreqMin0": "0 100000", - "cpuFreqMax0": "0 1400000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1400000", - "cpuFreqMin2": "2 700000", - "cpuFreqMax2": "2 1800000", - "ppmPolicy": "4 1" - }, - "active": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "1", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1200000", - "cpuFreqMin2": "2 700000", - "cpuFreqMax2": "2 1500000", - "ppmPolicy": "6 1" - }, - "interaction": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1000000", - "cpuFreqMin2": "2 800000", - "cpuFreqMax2": "2 1200000", - "ppmPolicy": "6 1" - }, - "pressed": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1800000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1400000", - "cpuFreqMin2": "2 800000", - "cpuFreqMax2": "2 1800000", - "ppmPolicy": "6 1" - }, - "heavyLoad": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 800000", - "cpuFreqMax1": "1 1600000", - "cpuFreqMin2": "2 1000000", - "cpuFreqMax2": "2 2000000", - "ppmPolicy": "6 1" - }, - "sfLag": { - "uxAffinity": "1", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 1600000", - "cpuFreqMax1": "1 1600000", - "cpuFreqMin2": "2 800000", - "cpuFreqMax2": "2 1200000", - "ppmPolicy": "6 1" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 1600000", - "cpuFreqMax1": "1 2000000", - "cpuFreqMin2": "2 2000000", - "cpuFreqMax2": "2 2500000", - "ppmPolicy": "6 1" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "4", - "dispFeature": "0", - "cpuFreqMin0": "0 500000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 2600000", - "cpuFreqMin2": "2 700000", - "cpuFreqMax2": "2 3000000", - "ppmPolicy": "4 1" - }, - "active": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "4", - "dispFeature": "1", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 1000000", - "cpuFreqMax1": "1 2600000", - "cpuFreqMin2": "2 1200000", - "cpuFreqMax2": "2 3000000", - "ppmPolicy": "6 1" - }, - "interaction": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 1800000", - "cpuFreqMin1": "1 1400000", - "cpuFreqMax1": "1 2200000", - "cpuFreqMin2": "2 1800000", - "cpuFreqMax2": "2 2800000", - "ppmPolicy": "6 1" - }, - "pressed": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 1800000", - "cpuFreqMin1": "1 2000000", - "cpuFreqMax1": "1 2000000", - "cpuFreqMin2": "2 2500000", - "cpuFreqMax2": "2 2500000", - "ppmPolicy": "6 1" - }, - "heavyLoad": { - "schedBoost": "1", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 1800000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 2000000", - "cpuFreqMax1": "1 2600000", - "cpuFreqMin2": "2 2500000", - "cpuFreqMax2": "2 3000000", - "ppmPolicy": "6 1" - }, - "sfLag": { - "uxAffinity": "3", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 2600000", - "cpuFreqMax1": "1 2600000", - "cpuFreqMin2": "2 2500000", - "cpuFreqMax2": "2 3000000", - "ppmPolicy": "6 1" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 2600000", - "cpuFreqMax1": "1 2600000", - "cpuFreqMin2": "2 3000000", - "cpuFreqMax2": "2 3000000", - "ppmPolicy": "6 1" - } + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" } + ] } - ] + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.3, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } } \ No newline at end of file diff --git a/magisk/config/mtd720.json b/magisk/config/mtd720.json index de8e5c3..84fea17 100644 --- a/magisk/config/mtd720.json +++ b/magisk/config/mtd720.json @@ -1,517 +1,578 @@ { - "meta": { - "name": "Dimensity 720(mt6853)[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1420, - "idleLoad": 950, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ + "meta": { + "name": "Dimensity 700(mt6833)/720(mt6853)/810(mt6833v)[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 100, + "nr": 6, + "typicalPower": 0.36, + "typicalFreq": 2.0, + "sweetFreq": 1.4, + "plainFreq": 1.0, + "freeFreq": 0.6 + }, + { + "efficiency": 250, + "nr": 2, + "typicalPower": 1.0, + "typicalFreq": 2.0, + "sweetFreq": 1.6, + "plainFreq": 1.0, + "freeFreq": 0.7 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3, + 4, + 5 + ], + "c1": [ + 6, + 7 + ], + "c2": [ + 6, + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 6 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 115, - 115, - 115, - 115, - 115, - 115, - 250, - 250 - ], - "knobs": [ + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ { - "name": "schedBoost", - "path": "/sys/devices/system/cpu/sched/sched_boost", - "type": "string", - "enable": true, - "note": "异构调度器全局任务放置boost,不考虑能耗代价" - }, + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ { - "name": "topBoost", - "path": "/dev/stune/top-app/schedtune.boost", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ { - "name": "heavyBoost", - "path": "/dev/stune/rt/schedtune.boost", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - }, + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ { - "name": "ppmPolicy", - "path": "/proc/ppm/policy_status", - "note": "MTK power policy子功能开关", - "type": "string", - "enable": true - }, + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, { - "name": "cpuFreqMin0", - "path": "/proc/ppm/policy/hard_userlimit_min_cpu_freq", - "note": "MTK power policy manager最小频率", - "type": "string", - "enable": true - }, + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, { - "name": "cpuFreqMax0", - "path": "/proc/ppm/policy/hard_userlimit_max_cpu_freq", - "note": "MTK power policy manager最大频率", - "type": "string", - "enable": true - }, + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, { - "name": "cpuFreqMin1", - "path": "/proc/ppm/policy/hard_userlimit_min_cpu_freq", - "note": "MTK power policy manager最小频率", - "type": "string", - "enable": true - }, + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, { - "name": "cpuFreqMax1", - "path": "/proc/ppm/policy/hard_userlimit_max_cpu_freq", - "note": "MTK power policy manager最大频率", - "type": "string", - "enable": true - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "0", - "cpuFreqMin0": "0 100000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "4 1" - }, - "active": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "1", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1700000", - "cpuFreqMin1": "1 1000000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - }, - "interaction": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 1700000", - "cpuFreqMin1": "1 1000000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - }, - "pressed": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 1700000", - "cpuFreqMin1": "1 1000000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - }, - "heavyLoad": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 1500000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - }, - "sfLag": { - "uxAffinity": "1", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 1700000", - "cpuFreqMin1": "1 1000000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 2000000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "0", - "cpuFreqMin0": "0 100000", - "cpuFreqMax0": "0 1400000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1600000", - "ppmPolicy": "4 1" - }, - "active": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "1", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1400000", - "ppmPolicy": "6 1" - }, - "interaction": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1200000", - "ppmPolicy": "6 1" - }, - "pressed": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1800000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1600000", - "ppmPolicy": "6 1" - }, - "heavyLoad": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 900000", - "cpuFreqMax1": "1 1800000", - "ppmPolicy": "6 1" - }, - "sfLag": { - "uxAffinity": "1", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1200000", - "ppmPolicy": "6 1" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 1800000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "4", - "dispFeature": "0", - "cpuFreqMin0": "0 500000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "4 1" - }, - "active": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "4", - "dispFeature": "1", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 1200000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - }, - "interaction": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 1800000", - "cpuFreqMin1": "1 1600000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - }, - "pressed": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 1800000", - "cpuFreqMin1": "1 2000000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - }, - "heavyLoad": { - "schedBoost": "1", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 1800000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 2000000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - }, - "sfLag": { - "uxAffinity": "3", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 2000000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 2000000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - } + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, + { + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" } + ] } - ] + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.7, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.7, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.7, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } } \ No newline at end of file diff --git a/magisk/config/mtd800.json b/magisk/config/mtd800.json deleted file mode 100644 index d44d889..0000000 --- a/magisk/config/mtd800.json +++ /dev/null @@ -1,517 +0,0 @@ -{ - "meta": { - "name": "Dimensity 800(mt6873)[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1600, - "idleLoad": 1160, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ - { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, - { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, - { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, - { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, - { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, - { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, - { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, - { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, - { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, - { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, - { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" - } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 115, - 115, - 115, - 115, - 250, - 250, - 250, - 250 - ], - "knobs": [ - { - "name": "schedBoost", - "path": "/sys/devices/system/cpu/sched/sched_boost", - "type": "string", - "enable": true, - "note": "异构调度器全局任务放置boost,不考虑能耗代价" - }, - { - "name": "topBoost", - "path": "/dev/stune/top-app/schedtune.boost", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, - { - "name": "heavyBoost", - "path": "/dev/stune/rt/schedtune.boost", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, - { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, - { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - }, - { - "name": "ppmPolicy", - "path": "/proc/ppm/policy_status", - "note": "MTK power policy子功能开关", - "type": "string", - "enable": true - }, - { - "name": "cpuFreqMin0", - "path": "/proc/ppm/policy/hard_userlimit_min_cpu_freq", - "note": "MTK power policy manager最小频率", - "type": "string", - "enable": true - }, - { - "name": "cpuFreqMax0", - "path": "/proc/ppm/policy/hard_userlimit_max_cpu_freq", - "note": "MTK power policy manager最大频率", - "type": "string", - "enable": true - }, - { - "name": "cpuFreqMin1", - "path": "/proc/ppm/policy/hard_userlimit_min_cpu_freq", - "note": "MTK power policy manager最小频率", - "type": "string", - "enable": true - }, - { - "name": "cpuFreqMax1", - "path": "/proc/ppm/policy/hard_userlimit_max_cpu_freq", - "note": "MTK power policy manager最大频率", - "type": "string", - "enable": true - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "0", - "cpuFreqMin0": "0 100000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "4 1" - }, - "active": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "1", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1700000", - "cpuFreqMin1": "1 1000000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - }, - "interaction": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 1700000", - "cpuFreqMin1": "1 1000000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - }, - "pressed": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 1700000", - "cpuFreqMin1": "1 1000000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - }, - "heavyLoad": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 1500000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - }, - "sfLag": { - "uxAffinity": "1", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 1700000", - "cpuFreqMin1": "1 1000000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 2000000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "0", - "cpuFreqMin0": "0 100000", - "cpuFreqMax0": "0 1400000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1600000", - "ppmPolicy": "4 1" - }, - "active": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "1", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1400000", - "ppmPolicy": "6 1" - }, - "interaction": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1200000", - "ppmPolicy": "6 1" - }, - "pressed": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1800000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1600000", - "ppmPolicy": "6 1" - }, - "heavyLoad": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 900000", - "cpuFreqMax1": "1 1800000", - "ppmPolicy": "6 1" - }, - "sfLag": { - "uxAffinity": "1", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1200000", - "ppmPolicy": "6 1" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 1800000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "4", - "dispFeature": "0", - "cpuFreqMin0": "0 500000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "4 1" - }, - "active": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "4", - "dispFeature": "1", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 1200000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - }, - "interaction": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 1800000", - "cpuFreqMin1": "1 1600000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - }, - "pressed": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 1800000", - "cpuFreqMin1": "1 2000000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - }, - "heavyLoad": { - "schedBoost": "1", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 1800000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 2000000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - }, - "sfLag": { - "uxAffinity": "3", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 2000000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 2000000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - } - } - } - ] -} \ No newline at end of file diff --git a/magisk/config/mtd800u.json b/magisk/config/mtd800u.json deleted file mode 100644 index a82cdd7..0000000 --- a/magisk/config/mtd800u.json +++ /dev/null @@ -1,517 +0,0 @@ -{ - "meta": { - "name": "Dimensity 800U(mt6853t)[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1420, - "idleLoad": 950, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ - { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, - { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, - { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, - { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, - { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, - { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, - { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, - { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, - { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, - { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, - { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" - } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 6 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 115, - 115, - 115, - 115, - 115, - 115, - 250, - 250 - ], - "knobs": [ - { - "name": "schedBoost", - "path": "/sys/devices/system/cpu/sched/sched_boost", - "type": "string", - "enable": true, - "note": "异构调度器全局任务放置boost,不考虑能耗代价" - }, - { - "name": "topBoost", - "path": "/dev/stune/top-app/schedtune.boost", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, - { - "name": "heavyBoost", - "path": "/dev/stune/rt/schedtune.boost", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, - { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, - { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - }, - { - "name": "ppmPolicy", - "path": "/proc/ppm/policy_status", - "note": "MTK power policy子功能开关", - "type": "string", - "enable": true - }, - { - "name": "cpuFreqMin0", - "path": "/proc/ppm/policy/hard_userlimit_min_cpu_freq", - "note": "MTK power policy manager最小频率", - "type": "string", - "enable": true - }, - { - "name": "cpuFreqMax0", - "path": "/proc/ppm/policy/hard_userlimit_max_cpu_freq", - "note": "MTK power policy manager最大频率", - "type": "string", - "enable": true - }, - { - "name": "cpuFreqMin1", - "path": "/proc/ppm/policy/hard_userlimit_min_cpu_freq", - "note": "MTK power policy manager最小频率", - "type": "string", - "enable": true - }, - { - "name": "cpuFreqMax1", - "path": "/proc/ppm/policy/hard_userlimit_max_cpu_freq", - "note": "MTK power policy manager最大频率", - "type": "string", - "enable": true - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "0", - "cpuFreqMin0": "0 100000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 2400000", - "ppmPolicy": "4 1" - }, - "active": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "1", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1700000", - "cpuFreqMin1": "1 1000000", - "cpuFreqMax1": "1 2400000", - "ppmPolicy": "6 1" - }, - "interaction": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 1700000", - "cpuFreqMin1": "1 1000000", - "cpuFreqMax1": "1 2100000", - "ppmPolicy": "6 1" - }, - "pressed": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 1700000", - "cpuFreqMin1": "1 1000000", - "cpuFreqMax1": "1 2100000", - "ppmPolicy": "6 1" - }, - "heavyLoad": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 1500000", - "cpuFreqMax1": "1 2400000", - "ppmPolicy": "6 1" - }, - "sfLag": { - "uxAffinity": "1", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 1700000", - "cpuFreqMin1": "1 1000000", - "cpuFreqMax1": "1 2100000", - "ppmPolicy": "6 1" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 2400000", - "cpuFreqMax1": "1 2400000", - "ppmPolicy": "6 1" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "0", - "cpuFreqMin0": "0 100000", - "cpuFreqMax0": "0 1400000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1600000", - "ppmPolicy": "4 1" - }, - "active": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "1", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1400000", - "ppmPolicy": "6 1" - }, - "interaction": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1200000", - "ppmPolicy": "6 1" - }, - "pressed": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1800000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1600000", - "ppmPolicy": "6 1" - }, - "heavyLoad": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 900000", - "cpuFreqMax1": "1 1800000", - "ppmPolicy": "6 1" - }, - "sfLag": { - "uxAffinity": "1", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1200000", - "ppmPolicy": "6 1" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 1800000", - "cpuFreqMax1": "1 2300000", - "ppmPolicy": "6 1" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "4", - "dispFeature": "0", - "cpuFreqMin0": "0 500000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 2400000", - "ppmPolicy": "4 1" - }, - "active": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "4", - "dispFeature": "1", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 1200000", - "cpuFreqMax1": "1 2400000", - "ppmPolicy": "6 1" - }, - "interaction": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 1800000", - "cpuFreqMin1": "1 1600000", - "cpuFreqMax1": "1 2400000", - "ppmPolicy": "6 1" - }, - "pressed": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 1800000", - "cpuFreqMin1": "1 2300000", - "cpuFreqMax1": "1 2300000", - "ppmPolicy": "6 1" - }, - "heavyLoad": { - "schedBoost": "1", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 1800000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 2300000", - "cpuFreqMax1": "1 2400000", - "ppmPolicy": "6 1" - }, - "sfLag": { - "uxAffinity": "3", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 2300000", - "cpuFreqMax1": "1 2400000", - "ppmPolicy": "6 1" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 2400000", - "cpuFreqMax1": "1 2400000", - "ppmPolicy": "6 1" - } - } - } - ] -} \ No newline at end of file diff --git a/magisk/config/mtd8100.json b/magisk/config/mtd8100.json new file mode 100644 index 0000000..79e0a24 --- /dev/null +++ b/magisk/config/mtd8100.json @@ -0,0 +1,585 @@ +{ + "meta": { + "name": "Dimensity 8000/8100(mt6895)[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 115, + "nr": 4, + "typicalPower": 0.36, + "typicalFreq": 2.0, + "sweetFreq": 1.4, + "plainFreq": 1.0, + "freeFreq": 0.6 + }, + { + "efficiency": 320, + "nr": 3, + "typicalPower": 1.36, + "typicalFreq": 2.8, + "sweetFreq": 1.9, + "plainFreq": 1.0, + "freeFreq": 0.7 + }, + { + "efficiency": 320, + "nr": 1, + "typicalPower": 1.36, + "typicalFreq": 2.8, + "sweetFreq": 2.2, + "plainFreq": 1.6, + "freeFreq": 0.8 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3 + ], + "c1": [ + 4, + 5, + 6 + ], + "c2": [ + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, + { + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, + { + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, + { + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, + { + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ + { + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ + { + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ + { + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, + { + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, + { + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, + { + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" + } + ] + } + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.3, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } +} \ No newline at end of file diff --git a/magisk/config/mtd820.json b/magisk/config/mtd820.json index 095e56a..31c5618 100644 --- a/magisk/config/mtd820.json +++ b/magisk/config/mtd820.json @@ -1,517 +1,578 @@ { - "meta": { - "name": "Dimensity 820(mt6875)[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1600, - "idleLoad": 1160, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ + "meta": { + "name": "Dimensity 800(mt6873)/820(mt6875)[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 100, + "nr": 6, + "typicalPower": 0.36, + "typicalFreq": 2.0, + "sweetFreq": 1.4, + "plainFreq": 1.0, + "freeFreq": 0.6 + }, + { + "efficiency": 250, + "nr": 2, + "typicalPower": 1.3, + "typicalFreq": 2.6, + "sweetFreq": 1.8, + "plainFreq": 1.0, + "freeFreq": 0.7 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3, + 4, + 5 + ], + "c1": [ + 6, + 7 + ], + "c2": [ + 6, + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 115, - 115, - 115, - 115, - 250, - 250, - 250, - 250 - ], - "knobs": [ + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ { - "name": "schedBoost", - "path": "/sys/devices/system/cpu/sched/sched_boost", - "type": "string", - "enable": true, - "note": "异构调度器全局任务放置boost,不考虑能耗代价" - }, + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ { - "name": "topBoost", - "path": "/dev/stune/top-app/schedtune.boost", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ { - "name": "heavyBoost", - "path": "/dev/stune/rt/schedtune.boost", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - }, + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ { - "name": "ppmPolicy", - "path": "/proc/ppm/policy_status", - "note": "MTK power policy子功能开关", - "type": "string", - "enable": true - }, + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, { - "name": "cpuFreqMin0", - "path": "/proc/ppm/policy/hard_userlimit_min_cpu_freq", - "note": "MTK power policy manager最小频率", - "type": "string", - "enable": true - }, + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, { - "name": "cpuFreqMax0", - "path": "/proc/ppm/policy/hard_userlimit_max_cpu_freq", - "note": "MTK power policy manager最大频率", - "type": "string", - "enable": true - }, + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, { - "name": "cpuFreqMin1", - "path": "/proc/ppm/policy/hard_userlimit_min_cpu_freq", - "note": "MTK power policy manager最小频率", - "type": "string", - "enable": true - }, + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, { - "name": "cpuFreqMax1", - "path": "/proc/ppm/policy/hard_userlimit_max_cpu_freq", - "note": "MTK power policy manager最大频率", - "type": "string", - "enable": true - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "0", - "cpuFreqMin0": "0 100000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 2500000", - "ppmPolicy": "4 1" - }, - "active": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "1", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1700000", - "cpuFreqMin1": "1 1000000", - "cpuFreqMax1": "1 2500000", - "ppmPolicy": "6 1" - }, - "interaction": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 1700000", - "cpuFreqMin1": "1 1000000", - "cpuFreqMax1": "1 2100000", - "ppmPolicy": "6 1" - }, - "pressed": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 1700000", - "cpuFreqMin1": "1 1000000", - "cpuFreqMax1": "1 2100000", - "ppmPolicy": "6 1" - }, - "heavyLoad": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 1500000", - "cpuFreqMax1": "1 2500000", - "ppmPolicy": "6 1" - }, - "sfLag": { - "uxAffinity": "1", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 1700000", - "cpuFreqMin1": "1 1000000", - "cpuFreqMax1": "1 2100000", - "ppmPolicy": "6 1" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2", - "cpuFreqMin0": "0 1100000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 2500000", - "cpuFreqMax1": "1 2600000", - "ppmPolicy": "6 1" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "0", - "cpuFreqMin0": "0 100000", - "cpuFreqMax0": "0 1400000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1600000", - "ppmPolicy": "4 1" - }, - "active": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "1", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1400000", - "ppmPolicy": "6 1" - }, - "interaction": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1200000", - "ppmPolicy": "6 1" - }, - "pressed": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1800000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1600000", - "ppmPolicy": "6 1" - }, - "heavyLoad": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 900000", - "cpuFreqMax1": "1 1800000", - "ppmPolicy": "6 1" - }, - "sfLag": { - "uxAffinity": "1", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 1200000", - "ppmPolicy": "6 1" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2", - "cpuFreqMin0": "0 700000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 1800000", - "cpuFreqMax1": "1 2300000", - "ppmPolicy": "6 1" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "4", - "dispFeature": "0", - "cpuFreqMin0": "0 500000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 700000", - "cpuFreqMax1": "1 2600000", - "ppmPolicy": "4 1" - }, - "active": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "4", - "dispFeature": "1", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 1200000", - "cpuFreqMax1": "1 2600000", - "ppmPolicy": "6 1" - }, - "interaction": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 1800000", - "cpuFreqMin1": "1 1600000", - "cpuFreqMax1": "1 2500000", - "ppmPolicy": "6 1" - }, - "pressed": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 1800000", - "cpuFreqMin1": "1 2300000", - "cpuFreqMax1": "1 2300000", - "ppmPolicy": "6 1" - }, - "heavyLoad": { - "schedBoost": "1", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 1800000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 2300000", - "cpuFreqMax1": "1 2600000", - "ppmPolicy": "6 1" - }, - "sfLag": { - "uxAffinity": "3", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 2300000", - "cpuFreqMax1": "1 2600000", - "ppmPolicy": "6 1" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "cpuFreqMin0": "0 900000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 2600000", - "cpuFreqMax1": "1 2600000", - "ppmPolicy": "6 1" - } + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, + { + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" } + ] } - ] + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.3, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } } \ No newline at end of file diff --git a/magisk/config/mtd9000.json b/magisk/config/mtd9000.json new file mode 100644 index 0000000..9a4fba2 --- /dev/null +++ b/magisk/config/mtd9000.json @@ -0,0 +1,585 @@ +{ + "meta": { + "name": "Dimensity 9000(mt6983)[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 140, + "nr": 4, + "typicalPower": 0.53, + "typicalFreq": 1.8, + "sweetFreq": 1.4, + "plainFreq": 0.9, + "freeFreq": 0.5 + }, + { + "efficiency": 340, + "nr": 3, + "typicalPower": 1.95, + "typicalFreq": 2.8, + "sweetFreq": 1.8, + "plainFreq": 1.0, + "freeFreq": 0.7 + }, + { + "efficiency": 420, + "nr": 1, + "typicalPower": 2.95, + "typicalFreq": 3.0, + "sweetFreq": 2.1, + "plainFreq": 1.6, + "freeFreq": 0.8 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3 + ], + "c1": [ + 4, + 5, + 6 + ], + "c2": [ + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, + { + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, + { + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, + { + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, + { + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ + { + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ + { + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ + { + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, + { + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, + { + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, + { + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" + } + ] + } + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.3, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } +} \ No newline at end of file diff --git a/magisk/config/mtd920.json b/magisk/config/mtd920.json new file mode 100644 index 0000000..3c548e4 --- /dev/null +++ b/magisk/config/mtd920.json @@ -0,0 +1,578 @@ +{ + "meta": { + "name": "Dimensity 900(mt6877)/920(mt6877T)[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 100, + "nr": 6, + "typicalPower": 0.36, + "typicalFreq": 2.0, + "sweetFreq": 1.4, + "plainFreq": 1.0, + "freeFreq": 0.6 + }, + { + "efficiency": 320, + "nr": 2, + "typicalPower": 1.4, + "typicalFreq": 2.5, + "sweetFreq": 1.7, + "plainFreq": 1.0, + "freeFreq": 0.7 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3, + 4, + 5 + ], + "c1": [ + 6, + 7 + ], + "c2": [ + 6, + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, + { + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, + { + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, + { + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, + { + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ + { + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ + { + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ + { + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, + { + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, + { + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, + { + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" + } + ] + } + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.3, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } +} \ No newline at end of file diff --git a/magisk/config/mtg80.json b/magisk/config/mtg80.json index b2d4f35..2134a88 100644 --- a/magisk/config/mtg80.json +++ b/magisk/config/mtg80.json @@ -1,517 +1,578 @@ { - "meta": { - "name": "Helio P65(mt6768)/G70(mt6769v)/G80(mt6769t)/G85(mt6769z)[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1300, - "idleLoad": 870, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ + "meta": { + "name": "Helio P65(mt6768)/G70(mt6769v)/G80(mt6769t)/G85(mt6769z)[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 100, + "nr": 6, + "typicalPower": 0.32, + "typicalFreq": 1.8, + "sweetFreq": 1.4, + "plainFreq": 1.0, + "freeFreq": 0.6 + }, + { + "efficiency": 200, + "nr": 2, + "typicalPower": 1.6, + "typicalFreq": 2.0, + "sweetFreq": 1.6, + "plainFreq": 1.0, + "freeFreq": 0.7 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3, + 4, + 5 + ], + "c1": [ + 6, + 7 + ], + "c2": [ + 6, + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 6 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 115, - 115, - 115, - 115, - 115, - 115, - 200, - 200 - ], - "knobs": [ + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ { - "name": "schedBoost", - "path": "/sys/devices/system/cpu/sched/sched_boost", - "type": "string", - "enable": true, - "note": "异构调度器全局任务放置boost,不考虑能耗代价" - }, + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ { - "name": "topBoost", - "path": "/dev/stune/top-app/schedtune.boost", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ { - "name": "heavyBoost", - "path": "/dev/stune/rt/schedtune.boost", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - }, + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ { - "name": "ppmPolicy", - "path": "/proc/ppm/policy_status", - "note": "MTK power policy子功能开关", - "type": "string", - "enable": true - }, + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, { - "name": "cpuFreqMin0", - "path": "/proc/ppm/policy/hard_userlimit_min_cpu_freq", - "note": "MTK power policy manager最小频率", - "type": "string", - "enable": true - }, + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, { - "name": "cpuFreqMax0", - "path": "/proc/ppm/policy/hard_userlimit_max_cpu_freq", - "note": "MTK power policy manager最大频率", - "type": "string", - "enable": true - }, + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, { - "name": "cpuFreqMin1", - "path": "/proc/ppm/policy/hard_userlimit_min_cpu_freq", - "note": "MTK power policy manager最小频率", - "type": "string", - "enable": true - }, + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, { - "name": "cpuFreqMax1", - "path": "/proc/ppm/policy/hard_userlimit_max_cpu_freq", - "note": "MTK power policy manager最大频率", - "type": "string", - "enable": true - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "0", - "cpuFreqMin0": "0 100000", - "cpuFreqMax0": "0 1400000", - "cpuFreqMin1": "1 500000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "4 1" - }, - "active": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "1", - "cpuFreqMin0": "0 600000", - "cpuFreqMax0": "0 1500000", - "cpuFreqMin1": "1 900000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - }, - "interaction": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 1000000", - "cpuFreqMax0": "0 1500000", - "cpuFreqMin1": "1 900000", - "cpuFreqMax1": "1 1700000", - "ppmPolicy": "6 1" - }, - "pressed": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 1000000", - "cpuFreqMax0": "0 1500000", - "cpuFreqMin1": "1 900000", - "cpuFreqMax1": "1 1700000", - "ppmPolicy": "6 1" - }, - "heavyLoad": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 1000000", - "cpuFreqMax0": "0 1800000", - "cpuFreqMin1": "1 1200000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - }, - "sfLag": { - "uxAffinity": "1", - "cpuFreqMin0": "0 1000000", - "cpuFreqMax0": "0 1500000", - "cpuFreqMin1": "1 900000", - "cpuFreqMax1": "1 1700000", - "ppmPolicy": "6 1" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2", - "cpuFreqMin0": "0 1000000", - "cpuFreqMax0": "0 1800000", - "cpuFreqMin1": "1 2000000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "0", - "cpuFreqMin0": "0 100000", - "cpuFreqMax0": "0 1300000", - "cpuFreqMin1": "1 500000", - "cpuFreqMax1": "1 1300000", - "ppmPolicy": "4 1" - }, - "active": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "1", - "cpuFreqMin0": "0 600000", - "cpuFreqMax0": "0 1400000", - "cpuFreqMin1": "1 500000", - "cpuFreqMax1": "1 1100000", - "ppmPolicy": "6 1" - }, - "interaction": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 600000", - "cpuFreqMax0": "0 1400000", - "cpuFreqMin1": "1 600000", - "cpuFreqMax1": "1 1000000", - "ppmPolicy": "6 1" - }, - "pressed": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 600000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 600000", - "cpuFreqMax1": "1 1300000", - "ppmPolicy": "6 1" - }, - "heavyLoad": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 600000", - "cpuFreqMax0": "0 1800000", - "cpuFreqMin1": "1 800000", - "cpuFreqMax1": "1 1500000", - "ppmPolicy": "6 1" - }, - "sfLag": { - "uxAffinity": "1", - "cpuFreqMin0": "0 600000", - "cpuFreqMax0": "0 1400000", - "cpuFreqMin1": "1 600000", - "cpuFreqMax1": "1 1000000", - "ppmPolicy": "6 1" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2", - "cpuFreqMin0": "0 600000", - "cpuFreqMax0": "0 1800000", - "cpuFreqMin1": "1 1500000", - "cpuFreqMax1": "1 1900000", - "ppmPolicy": "6 1" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "4", - "dispFeature": "0", - "cpuFreqMin0": "0 500000", - "cpuFreqMax0": "0 1800000", - "cpuFreqMin1": "1 500000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "4 1" - }, - "active": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "4", - "dispFeature": "1", - "cpuFreqMin0": "0 800000", - "cpuFreqMax0": "0 1800000", - "cpuFreqMin1": "1 1000000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - }, - "interaction": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 800000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 1300000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - }, - "pressed": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 800000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 1900000", - "cpuFreqMax1": "1 1900000", - "ppmPolicy": "6 1" - }, - "heavyLoad": { - "schedBoost": "1", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 1600000", - "cpuFreqMax0": "0 1800000", - "cpuFreqMin1": "1 1900000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - }, - "sfLag": { - "uxAffinity": "3", - "cpuFreqMin0": "0 800000", - "cpuFreqMax0": "0 1800000", - "cpuFreqMin1": "1 1900000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "cpuFreqMin0": "0 800000", - "cpuFreqMax0": "0 1800000", - "cpuFreqMin1": "1 2000000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - } + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, + { + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" } + ] } - ] + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.7, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.7, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.7, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } } \ No newline at end of file diff --git a/magisk/config/mtg90t.json b/magisk/config/mtg90t.json index df98236..471d491 100644 --- a/magisk/config/mtg90t.json +++ b/magisk/config/mtg90t.json @@ -1,517 +1,578 @@ { - "meta": { - "name": "Helio G90T(mt6785)[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1420, - "idleLoad": 950, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ + "meta": { + "name": "Helio G90T(mt6768)[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 100, + "nr": 6, + "typicalPower": 0.36, + "typicalFreq": 2.0, + "sweetFreq": 1.4, + "plainFreq": 1.0, + "freeFreq": 0.6 + }, + { + "efficiency": 250, + "nr": 2, + "typicalPower": 1.85, + "typicalFreq": 2.0, + "sweetFreq": 1.4, + "plainFreq": 1.0, + "freeFreq": 0.7 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3, + 4, + 5 + ], + "c1": [ + 6, + 7 + ], + "c2": [ + 6, + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 6 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 115, - 115, - 115, - 115, - 115, - 115, - 250, - 250 - ], - "knobs": [ + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ { - "name": "schedBoost", - "path": "/sys/devices/system/cpu/sched/sched_boost", - "type": "string", - "enable": true, - "note": "异构调度器全局任务放置boost,不考虑能耗代价" - }, + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ { - "name": "topBoost", - "path": "/dev/stune/top-app/schedtune.boost", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ { - "name": "heavyBoost", - "path": "/dev/stune/rt/schedtune.boost", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - }, + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ { - "name": "ppmPolicy", - "path": "/proc/ppm/policy_status", - "note": "MTK power policy子功能开关", - "type": "string", - "enable": true - }, + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, { - "name": "cpuFreqMin0", - "path": "/proc/ppm/policy/hard_userlimit_min_cpu_freq", - "note": "MTK power policy manager最小频率", - "type": "string", - "enable": true - }, + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, { - "name": "cpuFreqMax0", - "path": "/proc/ppm/policy/hard_userlimit_max_cpu_freq", - "note": "MTK power policy manager最大频率", - "type": "string", - "enable": true - }, + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, { - "name": "cpuFreqMin1", - "path": "/proc/ppm/policy/hard_userlimit_min_cpu_freq", - "note": "MTK power policy manager最小频率", - "type": "string", - "enable": true - }, + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, { - "name": "cpuFreqMax1", - "path": "/proc/ppm/policy/hard_userlimit_max_cpu_freq", - "note": "MTK power policy manager最大频率", - "type": "string", - "enable": true - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "0", - "cpuFreqMin0": "0 100000", - "cpuFreqMax0": "0 1400000", - "cpuFreqMin1": "1 500000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "4 1" - }, - "active": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "1", - "cpuFreqMin0": "0 600000", - "cpuFreqMax0": "0 1500000", - "cpuFreqMin1": "1 900000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - }, - "interaction": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 1000000", - "cpuFreqMax0": "0 1500000", - "cpuFreqMin1": "1 900000", - "cpuFreqMax1": "1 1700000", - "ppmPolicy": "6 1" - }, - "pressed": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 1000000", - "cpuFreqMax0": "0 1500000", - "cpuFreqMin1": "1 900000", - "cpuFreqMax1": "1 1700000", - "ppmPolicy": "6 1" - }, - "heavyLoad": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 1000000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 1200000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - }, - "sfLag": { - "uxAffinity": "1", - "cpuFreqMin0": "0 1000000", - "cpuFreqMax0": "0 1500000", - "cpuFreqMin1": "1 900000", - "cpuFreqMax1": "1 1700000", - "ppmPolicy": "6 1" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2", - "cpuFreqMin0": "0 1000000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 2000000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "0", - "cpuFreqMin0": "0 100000", - "cpuFreqMax0": "0 1300000", - "cpuFreqMin1": "1 500000", - "cpuFreqMax1": "1 1300000", - "ppmPolicy": "4 1" - }, - "active": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "0", - "dispFeature": "1", - "cpuFreqMin0": "0 600000", - "cpuFreqMax0": "0 1400000", - "cpuFreqMin1": "1 500000", - "cpuFreqMax1": "1 1100000", - "ppmPolicy": "6 1" - }, - "interaction": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 600000", - "cpuFreqMax0": "0 1400000", - "cpuFreqMin1": "1 600000", - "cpuFreqMax1": "1 1000000", - "ppmPolicy": "6 1" - }, - "pressed": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "1", - "dispFeature": "2", - "cpuFreqMin0": "0 600000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 600000", - "cpuFreqMax1": "1 1300000", - "ppmPolicy": "6 1" - }, - "heavyLoad": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 600000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 800000", - "cpuFreqMax1": "1 1500000", - "ppmPolicy": "6 1" - }, - "sfLag": { - "uxAffinity": "1", - "cpuFreqMin0": "0 600000", - "cpuFreqMax0": "0 1400000", - "cpuFreqMin1": "1 600000", - "cpuFreqMax1": "1 1000000", - "ppmPolicy": "6 1" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2", - "cpuFreqMin0": "0 600000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 1500000", - "cpuFreqMax1": "1 1900000", - "ppmPolicy": "6 1" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "4", - "dispFeature": "0", - "cpuFreqMin0": "0 500000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 500000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "4 1" - }, - "active": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "4", - "dispFeature": "1", - "cpuFreqMin0": "0 800000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 1000000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - }, - "interaction": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 800000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 1300000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - }, - "pressed": { - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 800000", - "cpuFreqMax0": "0 1600000", - "cpuFreqMin1": "1 1900000", - "cpuFreqMax1": "1 1900000", - "ppmPolicy": "6 1" - }, - "heavyLoad": { - "schedBoost": "1", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "dispFeature": "2", - "cpuFreqMin0": "0 1600000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 1900000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - }, - "sfLag": { - "uxAffinity": "3", - "cpuFreqMin0": "0 800000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 1900000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - }, - "sfBoost": { - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3", - "cpuFreqMin0": "0 800000", - "cpuFreqMax0": "0 2000000", - "cpuFreqMin1": "1 2000000", - "cpuFreqMax1": "1 2000000", - "ppmPolicy": "6 1" - } + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, + { + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" } + ] } - ] + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.7, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.7, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.7, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } } \ No newline at end of file diff --git a/magisk/config/perapp_powermode.txt b/magisk/config/perapp_powermode.txt new file mode 100644 index 0000000..a7840c1 --- /dev/null +++ b/magisk/config/perapp_powermode.txt @@ -0,0 +1,7 @@ +# 分应用性能模式配置 +# Per-app dynamic power mode rule +# '-' means offscreen rule +# '*' means default rule + +- balance +* balance diff --git a/magisk/config/sdm616.json b/magisk/config/sdm616.json deleted file mode 100644 index 5a65c6f..0000000 --- a/magisk/config/sdm616.json +++ /dev/null @@ -1,534 +0,0 @@ -{ - "meta": { - "name": "sdm615/616[21.07.25]", - "author": "yc@coolapk(powered by wipe-v2)", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 960, - "idleLoad": 640, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ - { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, - { - "hint": "Active", - "action": "normal", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, - { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, - { - "hint": "Pressed", - "action": "interaction", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, - { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, - { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, - { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, - { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, - { - "hint": "SfBoost", - "action": "sfLag", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, - { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, - { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" - } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 100, - 100, - 100, - 100, - 100, - 100, - 100, - 100 - ], - "knobs": [ - { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, - { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, - { - "name": "littleHidelay", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay", - "type": "string", - "enable": true, - "note": "小核的above_hispeed_delay" - }, - { - "name": "littleHifreq", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq", - "type": "string", - "enable": true, - "note": "小核的hispeed_freq" - }, - { - "name": "littleHiload", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load", - "type": "string", - "enable": true, - "note": "小核的go_hispeed_load" - }, - { - "name": "littleTgload", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads", - "type": "string", - "enable": true, - "note": "小核的target_loads" - }, - { - "name": "littleMinSample", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time", - "type": "string", - "enable": true, - "note": "小核的min_sample_time" - }, - { - "name": "littleHyst", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis", - "type": "string", - "enable": true, - "note": "小核的max_freq_hysteresis" - }, - { - "name": "bigHidelay", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay", - "type": "string", - "enable": true, - "note": "大核的above_hispeed_delay" - }, - { - "name": "bigHifreq", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq", - "type": "string", - "enable": true, - "note": "大核的hispeed_freq" - }, - { - "name": "bigHiload", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load", - "type": "string", - "enable": true, - "note": "大核的go_hispeed_load" - }, - { - "name": "bigTgload", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads", - "type": "string", - "enable": true, - "note": "大核的target_loads" - }, - { - "name": "bigMinSample", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time", - "type": "string", - "enable": true, - "note": "大核的min_sample_time" - }, - { - "name": "bigHyst", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/max_freq_hysteresis", - "type": "string", - "enable": true, - "note": "大核的max_freq_hysteresis" - }, - { - "name": "downmigrate", - "path": "/proc/sys/kernel/sched_downmigrate", - "type": "string", - "enable": true, - "note": "如果任务负载占小核容量的百分比小于此阈值,迁移到小核" - }, - { - "name": "upmigrate", - "path": "/proc/sys/kernel/sched_upmigrate", - "type": "string", - "enable": true, - "note": "如果任务负载占小核容量的百分比大于此阈值,迁移到大核" - }, - { - "name": "downmigrate2", - "path": "/proc/sys/kernel/sched_downmigrate", - "type": "string", - "enable": true, - "note": "如果任务负载占小核容量的百分比小于此阈值,迁移到小核,解决down>up的情况" - }, - { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电(相对卡顿百分比 50.0% 相对续航 105.6%)", - "actions": { - "normal": { - "cpuFreqMax": "13,15", - "cpuFreqMin": "2,2", - "littleHidelay": "58000 499000:18000 800000:38000 998000:18000 1113000:58000", - "littleHifreq": "249000", - "littleHiload": "70", - "littleTgload": "60 400000:23 499000:16 800000:31 998000:73 1113000:85 1209000:81", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "38000 533000:58000 800000:38000 960000:18000 1344000:78000 1459000:18000", - "bigHifreq": "200000", - "bigHiload": "71", - "bigTgload": "56 345000:41 400000:29 533000:35 800000:25 960000:67 1344000:93 1459000:95 1497000:86", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "80", - "upmigrate": "80", - "downmigrate2": "80", - "uxAffinity": "1" - }, - "interaction": { - "cpuFreqMax": "13,14", - "cpuFreqMin": "2,3", - "littleHidelay": "58000 499000:18000 800000:38000 998000:18000 1113000:58000", - "littleHifreq": "249000", - "littleHiload": "70", - "littleTgload": "60 400000:23 499000:16 800000:31 998000:73 1113000:85 1209000:81", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "38000 533000:58000 800000:38000 960000:18000 1344000:78000 1459000:18000", - "bigHifreq": "200000", - "bigHiload": "71", - "bigTgload": "56 345000:41 400000:29 533000:35 800000:25 960000:67 1344000:93 1459000:95 1497000:86", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "39", - "upmigrate": "82", - "downmigrate2": "39", - "uxAffinity": "1" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "uxAffinity": "1" - }, - "sfLag": { - "cpuFreqMax": "13,15", - "cpuFreqMin": "12,14", - "uxAffinity": "1" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗(相对卡顿百分比 99.9% 相对续航 118.2%)", - "actions": { - "normal": { - "cpuFreqMax": "13,15", - "cpuFreqMin": "2,2", - "littleHidelay": "78000 400000:38000 499000:58000 800000:38000 998000:58000", - "littleHifreq": "249000", - "littleHiload": "73", - "littleTgload": "79 249000:42 400000:65 499000:24 800000:2 998000:73 1113000:82 1209000:66", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "38000 400000:58000 533000:38000 1113000:58000 1344000:78000 1459000:58000", - "bigHifreq": "345000", - "bigHiload": "78", - "bigTgload": "56 345000:49 400000:86 533000:21 800000:42 960000:52 1113000:71 1344000:95 1459000:89 1497000:91", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "80", - "upmigrate": "80", - "downmigrate2": "80", - "uxAffinity": "1" - }, - "interaction": { - "cpuFreqMax": "13,14", - "cpuFreqMin": "2,3", - "littleHidelay": "78000 400000:38000 499000:58000 800000:38000 998000:58000", - "littleHifreq": "249000", - "littleHiload": "73", - "littleTgload": "79 249000:42 400000:65 499000:24 800000:2 998000:73 1113000:82 1209000:66", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "38000 400000:58000 533000:38000 1113000:58000 1344000:78000 1459000:58000", - "bigHifreq": "345000", - "bigHiload": "78", - "bigTgload": "56 345000:49 400000:86 533000:21 800000:42 960000:52 1113000:71 1344000:95 1459000:89 1497000:91", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "47", - "upmigrate": "82", - "downmigrate2": "47", - "uxAffinity": "1" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "uxAffinity": "1" - }, - "sfLag": { - "cpuFreqMax": "13,14", - "cpuFreqMin": "10,12", - "uxAffinity": "1" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "13,15", - "cpuFreqMin": "2,2", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "uxAffinity": "1" - }, - "interaction": { - "cpuFreqMax": "13,15", - "cpuFreqMin": "12,14", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "uxAffinity": "1" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "uxAffinity": "1" - }, - "sfLag": { - "cpuFreqMax": "14,16", - "cpuFreqMin": "13,15", - "uxAffinity": "1" - } - } - } - ] -} \ No newline at end of file diff --git a/magisk/config/sdm625.json b/magisk/config/sdm625.json new file mode 100644 index 0000000..32b9cfb --- /dev/null +++ b/magisk/config/sdm625.json @@ -0,0 +1,576 @@ +{ + "meta": { + "name": "sdm625/sdm626[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 100, + "nr": 4, + "typicalPower": 0.4, + "typicalFreq": 2.0, + "sweetFreq": 1.4, + "plainFreq": 1.0, + "freeFreq": 0.6 + }, + { + "efficiency": 100, + "nr": 4, + "typicalPower": 0.4, + "typicalFreq": 2.0, + "sweetFreq": 1.9, + "plainFreq": 1.4, + "freeFreq": 0.6 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3 + ], + "c1": [ + 4, + 5, + 6 + ], + "c2": [ + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, + { + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, + { + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, + { + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, + { + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ + { + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ + { + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ + { + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, + { + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, + { + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, + { + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" + } + ] + } + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.7, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.7, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.7, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } +} \ No newline at end of file diff --git a/magisk/config/sdm625_eas.json b/magisk/config/sdm625_eas.json deleted file mode 100644 index 93d4b69..0000000 --- a/magisk/config/sdm625_eas.json +++ /dev/null @@ -1,483 +0,0 @@ -{ - "meta": { - "name": "sdm625-eas[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 960, - "idleLoad": 640, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ - { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, - { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, - { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, - { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, - { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, - { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, - { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, - { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, - { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, - { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, - { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" - } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 100, - 100, - 100, - 100, - 100, - 100, - 100, - 100 - ], - "knobs": [ - { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, - { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, - { - "name": "schedBoost", - "path": "/proc/sys/kernel/sched_boost", - "type": "string", - "enable": true, - "note": "异构调度器全局任务放置boost,不考虑能耗代价" - }, - { - "name": "topBoost", - "path": "/dev/stune/top-app/schedtune.boost", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, - { - "name": "heavyBoost", - "path": "/dev/stune/rt/schedtune.boost", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, - { - "name": "ddrBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpubw/max_freq", - "type": "string", - "enable": true, - "note": "DDR最大带宽" - }, - { - "name": "ddrBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpubw/min_freq", - "type": "string", - "enable": true, - "note": "DDR最小带宽" - }, - { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, - { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "cpuFreqMax": "14,20", - "cpuFreqMin": "1,6", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "15,20", - "cpuFreqMin": "6,9", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "15,17", - "cpuFreqMin": "10,9", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "ddrBwMax": "7104", - "ddrBwMin": "2408", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "15,17", - "cpuFreqMin": "10,9", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "ddrBwMax": "7104", - "ddrBwMin": "2408", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "20,20", - "cpuFreqMin": "10,12", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "ddrBwMax": "7104", - "ddrBwMin": "2408", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "15,17", - "cpuFreqMin": "10,9", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "20,20", - "cpuFreqMin": "10,20", - "topBoost": "0", - "heavyBoost": "10", - "ddrBwMax": "7104", - "ddrBwMin": "7104", - "uxAffinity": "2" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "cpuFreqMax": "13,13", - "cpuFreqMin": "1,6", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "14,11", - "cpuFreqMin": "6,6", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "14,10", - "cpuFreqMin": "6,6", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "16,13", - "cpuFreqMin": "6,6", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "ddrBwMax": "7104", - "ddrBwMin": "2408", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "20,15", - "cpuFreqMin": "6,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "14,10", - "cpuFreqMin": "6,6", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "20,19", - "cpuFreqMin": "6,15", - "topBoost": "0", - "heavyBoost": "1", - "ddrBwMax": "7104", - "ddrBwMin": "4816", - "uxAffinity": "2" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "20,20", - "cpuFreqMin": "6,6", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "7104", - "ddrBwMin": "0", - "uxAffinity": "4", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "20,20", - "cpuFreqMin": "8,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "7104", - "ddrBwMin": "0", - "uxAffinity": "4", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "16,20", - "cpuFreqMin": "8,13", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "7104", - "ddrBwMin": "4816", - "uxAffinity": "3", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "16,19", - "cpuFreqMin": "8,19", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "7104", - "ddrBwMin": "4816", - "uxAffinity": "3", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "20,20", - "cpuFreqMin": "16,19", - "schedBoost": "1", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "7104", - "ddrBwMin": "7104", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "20,20", - "cpuFreqMin": "8,19", - "uxAffinity": "3" - }, - "sfBoost": { - "cpuFreqMax": "20,20", - "cpuFreqMin": "8,20", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "7104", - "ddrBwMin": "7104", - "uxAffinity": "3" - } - } - } - ] -} \ No newline at end of file diff --git a/magisk/config/sdm625_hmp.json b/magisk/config/sdm625_hmp.json deleted file mode 100644 index 58d22f7..0000000 --- a/magisk/config/sdm625_hmp.json +++ /dev/null @@ -1,425 +0,0 @@ -{ - "meta": { - "name": "sdm625-hmp[21.07.25]", - "author": "yc@coolapk(powered by wipe-v2)", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 960, - "idleLoad": 640, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ - { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, - { - "hint": "Active", - "action": "normal", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, - { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, - { - "hint": "Pressed", - "action": "interaction", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, - { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, - { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, - { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, - { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, - { - "hint": "SfBoost", - "action": "sfLag", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, - { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, - { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" - } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 100, - 100, - 100, - 100, - 100, - 100, - 100, - 100 - ], - "knobs": [ - { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, - { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, - { - "name": "littleHidelay", - "path": "/sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay", - "type": "string", - "enable": true, - "note": "小核的above_hispeed_delay" - }, - { - "name": "littleHifreq", - "path": "/sys/devices/system/cpu/cpufreq/interactive/hispeed_freq", - "type": "string", - "enable": true, - "note": "小核的hispeed_freq" - }, - { - "name": "littleHiload", - "path": "/sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load", - "type": "string", - "enable": true, - "note": "小核的go_hispeed_load" - }, - { - "name": "littleTgload", - "path": "/sys/devices/system/cpu/cpufreq/interactive/target_loads", - "type": "string", - "enable": true, - "note": "小核的target_loads" - }, - { - "name": "littleMinSample", - "path": "/sys/devices/system/cpu/cpufreq/interactive/min_sample_time", - "type": "string", - "enable": true, - "note": "小核的min_sample_time" - }, - { - "name": "littleHyst", - "path": "/sys/devices/system/cpu/cpufreq/interactive/max_freq_hysteresis", - "type": "string", - "enable": true, - "note": "小核的max_freq_hysteresis" - }, - { - "name": "ddrBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpubw/max_freq", - "type": "string", - "enable": true, - "note": "DDR最大带宽" - }, - { - "name": "ddrBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpubw/min_freq", - "type": "string", - "enable": true, - "note": "DDR最小带宽" - }, - { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电(相对卡顿百分比 50.0% 相对续航 99.5%)", - "actions": { - "normal": { - "cpuFreqMax": "21,21", - "cpuFreqMin": "6,6", - "littleHidelay": "78000 1401000:18000 1689000:58000 1804000:78000", - "littleHifreq": "1036000", - "littleHiload": "54", - "littleTgload": "83 1036000:64 1401000:99 1689000:31 1804000:69 1958000:70 2016000:98", - "littleMinSample": "18000", - "littleHyst": "18000", - "ddrBwMax": "7000", - "ddrBwMin": "0", - "uxAffinity": "1" - }, - "interaction": { - "cpuFreqMax": "20,20", - "cpuFreqMin": "6,6", - "littleHidelay": "78000 1401000:18000 1689000:58000 1804000:78000", - "littleHifreq": "1036000", - "littleHiload": "54", - "littleTgload": "83 1036000:64 1401000:99 1689000:31 1804000:69 1958000:70 2016000:98", - "littleMinSample": "18000", - "littleHyst": "18000", - "ddrBwMax": "7000", - "ddrBwMin": "5000", - "uxAffinity": "1" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "ddrBwMax": "8000", - "ddrBwMin": "6000", - "uxAffinity": "1" - }, - "sfLag": { - "cpuFreqMax": "20,20", - "cpuFreqMin": "19,19", - "ddrBwMin": "6000", - "uxAffinity": "1" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗(相对卡顿百分比 99.9% 相对续航 106.5%)", - "actions": { - "normal": { - "cpuFreqMax": "21,21", - "cpuFreqMin": "6,6", - "littleHidelay": "78000 1689000:18000 1804000:78000", - "littleHifreq": "1036000", - "littleHiload": "56", - "littleTgload": "66 1036000:64 1401000:76 1689000:85 1804000:54 1958000:98 2016000:94", - "littleMinSample": "18000", - "littleHyst": "18000", - "ddrBwMax": "7000", - "ddrBwMin": "0", - "uxAffinity": "1" - }, - "interaction": { - "cpuFreqMax": "19,19", - "cpuFreqMin": "6,6", - "littleHidelay": "78000 1689000:18000 1804000:78000", - "littleHifreq": "1036000", - "littleHiload": "56", - "littleTgload": "66 1036000:64 1401000:76 1689000:85 1804000:54 1958000:98 2016000:94", - "littleMinSample": "18000", - "littleHyst": "18000", - "ddrBwMax": "7000", - "ddrBwMin": "5000", - "uxAffinity": "1" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "ddrBwMax": "7000", - "ddrBwMin": "5000", - "uxAffinity": "1" - }, - "sfLag": { - "cpuFreqMax": "19,19", - "cpuFreqMin": "17,17", - "ddrBwMin": "5000", - "uxAffinity": "1" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "21,21", - "cpuFreqMin": "6,6", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "ddrBwMax": "7000", - "ddrBwMin": "5000", - "uxAffinity": "1" - }, - "interaction": { - "cpuFreqMax": "20,20", - "cpuFreqMin": "19,19", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "ddrBwMax": "8000", - "ddrBwMin": "6000", - "uxAffinity": "1" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "ddrBwMax": "8000", - "ddrBwMin": "6000", - "uxAffinity": "1" - }, - "sfLag": { - "cpuFreqMax": "21,21", - "cpuFreqMin": "20,20", - "ddrBwMin": "6000", - "uxAffinity": "1" - } - } - } - ] -} \ No newline at end of file diff --git a/magisk/config/sdm626_eas.json b/magisk/config/sdm626_eas.json deleted file mode 100644 index e63c5ba..0000000 --- a/magisk/config/sdm626_eas.json +++ /dev/null @@ -1,483 +0,0 @@ -{ - "meta": { - "name": "sdm626-eas[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 960, - "idleLoad": 640, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ - { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, - { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, - { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, - { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, - { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, - { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, - { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, - { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, - { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, - { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, - { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" - } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 100, - 100, - 100, - 100, - 100, - 100, - 100, - 100 - ], - "knobs": [ - { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, - { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, - { - "name": "schedBoost", - "path": "/proc/sys/kernel/sched_boost", - "type": "string", - "enable": true, - "note": "异构调度器全局任务放置boost,不考虑能耗代价" - }, - { - "name": "topBoost", - "path": "/dev/stune/top-app/schedtune.boost", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, - { - "name": "heavyBoost", - "path": "/dev/stune/rt/schedtune.boost", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, - { - "name": "ddrBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpubw/max_freq", - "type": "string", - "enable": true, - "note": "DDR最大带宽" - }, - { - "name": "ddrBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpubw/min_freq", - "type": "string", - "enable": true, - "note": "DDR最小带宽" - }, - { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, - { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "cpuFreqMax": "14,21", - "cpuFreqMin": "1,6", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "15,21", - "cpuFreqMin": "6,9", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "15,17", - "cpuFreqMin": "10,9", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "ddrBwMax": "7104", - "ddrBwMin": "2408", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "15,17", - "cpuFreqMin": "10,9", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "ddrBwMax": "7104", - "ddrBwMin": "2408", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "22,21", - "cpuFreqMin": "10,12", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "ddrBwMax": "7104", - "ddrBwMin": "2408", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "15,17", - "cpuFreqMin": "10,9", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "22,22", - "cpuFreqMin": "10,21", - "topBoost": "0", - "heavyBoost": "10", - "ddrBwMax": "7104", - "ddrBwMin": "7104", - "uxAffinity": "2" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "cpuFreqMax": "13,13", - "cpuFreqMin": "1,6", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "14,11", - "cpuFreqMin": "6,6", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "14,10", - "cpuFreqMin": "6,6", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "16,13", - "cpuFreqMin": "6,6", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "ddrBwMax": "7104", - "ddrBwMin": "2408", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "22,15", - "cpuFreqMin": "6,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "14,10", - "cpuFreqMin": "6,6", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "22,19", - "cpuFreqMin": "6,15", - "topBoost": "0", - "heavyBoost": "1", - "ddrBwMax": "7104", - "ddrBwMin": "4816", - "uxAffinity": "2" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "22,22", - "cpuFreqMin": "6,6", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "7104", - "ddrBwMin": "0", - "uxAffinity": "4", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "22,22", - "cpuFreqMin": "8,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "7104", - "ddrBwMin": "0", - "uxAffinity": "4", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "16,21", - "cpuFreqMin": "8,13", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "7104", - "ddrBwMin": "4816", - "uxAffinity": "3", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "16,19", - "cpuFreqMin": "8,19", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "7104", - "ddrBwMin": "4816", - "uxAffinity": "3", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "22,22", - "cpuFreqMin": "16,19", - "schedBoost": "1", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "7104", - "ddrBwMin": "7104", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "22,22", - "cpuFreqMin": "8,19", - "uxAffinity": "3" - }, - "sfBoost": { - "cpuFreqMax": "22,22", - "cpuFreqMin": "8,22", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "7104", - "ddrBwMin": "7104", - "uxAffinity": "3" - } - } - } - ] -} \ No newline at end of file diff --git a/magisk/config/sdm626_hmp.json b/magisk/config/sdm626_hmp.json deleted file mode 100644 index 01661a4..0000000 --- a/magisk/config/sdm626_hmp.json +++ /dev/null @@ -1,425 +0,0 @@ -{ - "meta": { - "name": "sdm626-hmp[21.07.25]", - "author": "yc@coolapk(powered by wipe-v2)", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 960, - "idleLoad": 640, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ - { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, - { - "hint": "Active", - "action": "normal", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, - { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, - { - "hint": "Pressed", - "action": "interaction", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, - { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, - { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, - { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, - { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, - { - "hint": "SfBoost", - "action": "sfLag", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, - { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, - { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" - } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 100, - 100, - 100, - 100, - 100, - 100, - 100, - 100 - ], - "knobs": [ - { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, - { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, - { - "name": "littleHidelay", - "path": "/sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay", - "type": "string", - "enable": true, - "note": "小核的above_hispeed_delay" - }, - { - "name": "littleHifreq", - "path": "/sys/devices/system/cpu/cpufreq/interactive/hispeed_freq", - "type": "string", - "enable": true, - "note": "小核的hispeed_freq" - }, - { - "name": "littleHiload", - "path": "/sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load", - "type": "string", - "enable": true, - "note": "小核的go_hispeed_load" - }, - { - "name": "littleTgload", - "path": "/sys/devices/system/cpu/cpufreq/interactive/target_loads", - "type": "string", - "enable": true, - "note": "小核的target_loads" - }, - { - "name": "littleMinSample", - "path": "/sys/devices/system/cpu/cpufreq/interactive/min_sample_time", - "type": "string", - "enable": true, - "note": "小核的min_sample_time" - }, - { - "name": "littleHyst", - "path": "/sys/devices/system/cpu/cpufreq/interactive/max_freq_hysteresis", - "type": "string", - "enable": true, - "note": "小核的max_freq_hysteresis" - }, - { - "name": "ddrBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpubw/max_freq", - "type": "string", - "enable": true, - "note": "DDR最大带宽" - }, - { - "name": "ddrBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpubw/min_freq", - "type": "string", - "enable": true, - "note": "DDR最小带宽" - }, - { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电(相对卡顿百分比 50.0% 相对续航 105.5%)", - "actions": { - "normal": { - "cpuFreqMax": "23,23", - "cpuFreqMin": "6,6", - "littleHidelay": "58000 1401000:18000 1804000:78000", - "littleHifreq": "1036000", - "littleHiload": "80", - "littleTgload": "92 1036000:19 1401000:99 1689000:29 1804000:61 1958000:82 2016000:99 2150000:98", - "littleMinSample": "18000", - "littleHyst": "18000", - "ddrBwMax": "7000", - "ddrBwMin": "0", - "uxAffinity": "1" - }, - "interaction": { - "cpuFreqMax": "19,19", - "cpuFreqMin": "10,10", - "littleHidelay": "58000 1401000:18000 1804000:78000", - "littleHifreq": "1036000", - "littleHiload": "80", - "littleTgload": "92 1036000:19 1401000:99 1689000:29 1804000:61 1958000:82 2016000:99 2150000:98", - "littleMinSample": "18000", - "littleHyst": "18000", - "ddrBwMax": "7000", - "ddrBwMin": "5000", - "uxAffinity": "1" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "ddrBwMax": "8000", - "ddrBwMin": "6000", - "uxAffinity": "1" - }, - "sfLag": { - "cpuFreqMax": "21,21", - "cpuFreqMin": "20,20", - "ddrBwMin": "6000", - "uxAffinity": "1" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗(相对卡顿百分比 99.7% 相对续航 113.3%)", - "actions": { - "normal": { - "cpuFreqMax": "23,23", - "cpuFreqMin": "6,6", - "littleHidelay": "78000 1401000:18000 1689000:58000 1804000:78000", - "littleHifreq": "652000", - "littleHiload": "56", - "littleTgload": "12 1036000:74 1401000:99 1689000:25 1804000:71 1958000:98 2208000:96", - "littleMinSample": "18000", - "littleHyst": "18000", - "ddrBwMax": "7000", - "ddrBwMin": "0", - "uxAffinity": "1" - }, - "interaction": { - "cpuFreqMax": "19,19", - "cpuFreqMin": "6,6", - "littleHidelay": "78000 1401000:18000 1689000:58000 1804000:78000", - "littleHifreq": "652000", - "littleHiload": "56", - "littleTgload": "12 1036000:74 1401000:99 1689000:25 1804000:71 1958000:98 2208000:96", - "littleMinSample": "18000", - "littleHyst": "18000", - "ddrBwMax": "7000", - "ddrBwMin": "5000", - "uxAffinity": "1" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "ddrBwMax": "7000", - "ddrBwMin": "5000", - "uxAffinity": "1" - }, - "sfLag": { - "cpuFreqMax": "19,19", - "cpuFreqMin": "17,17", - "ddrBwMin": "5000", - "uxAffinity": "1" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "23,23", - "cpuFreqMin": "6,6", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "ddrBwMax": "7000", - "ddrBwMin": "5000", - "uxAffinity": "1" - }, - "interaction": { - "cpuFreqMax": "21,21", - "cpuFreqMin": "20,20", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "ddrBwMax": "8000", - "ddrBwMin": "6000", - "uxAffinity": "1" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "ddrBwMax": "8000", - "ddrBwMin": "6000", - "uxAffinity": "1" - }, - "sfLag": { - "cpuFreqMax": "23,23", - "cpuFreqMin": "22,22", - "ddrBwMin": "6000", - "uxAffinity": "1" - } - } - } - ] -} \ No newline at end of file diff --git a/magisk/config/sdm636_eas.json b/magisk/config/sdm636_eas.json deleted file mode 100644 index 0fdbe6e..0000000 --- a/magisk/config/sdm636_eas.json +++ /dev/null @@ -1,505 +0,0 @@ -{ - "meta": { - "name": "sdm636-eas[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1290, - "idleLoad": 860, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ - { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, - { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, - { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, - { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, - { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, - { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, - { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, - { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, - { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, - { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, - { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" - } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 100, - 100, - 100, - 100, - 170, - 170, - 170, - 170 - ], - "knobs": [ - { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, - { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, - { - "name": "schedBoost", - "path": "/proc/sys/kernel/sched_boost", - "type": "string", - "enable": true, - "note": "异构调度器全局任务放置boost,不考虑能耗代价" - }, - { - "name": "topBoost", - "path": "/dev/stune/top-app/schedtune.boost", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, - { - "name": "heavyBoost", - "path": "/dev/stune/rt/schedtune.boost", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, - { - "name": "ddrBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpubw/max_freq", - "type": "string", - "enable": true, - "note": "DDR最大带宽" - }, - { - "name": "ddrBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpubw/min_freq", - "type": "string", - "enable": true, - "note": "DDR最小带宽" - }, - { - "name": "ddrLatBig", - "path": "/sys/class/devfreq/soc:qcom,memlat-cpu4/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核DDR延迟控制,在DDR命中率降低时,值越大越容易提升DDR频率" - }, - { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, - { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "cpuFreqMax": "14,18", - "cpuFreqMin": "1,11", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "15,18", - "cpuFreqMin": "6,11", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "15,17", - "cpuFreqMin": "10,11", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "ddrBwMax": "13763", - "ddrBwMin": "2408", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "15,17", - "cpuFreqMin": "10,11", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "ddrBwMax": "13763", - "ddrBwMin": "2408", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "16,18", - "cpuFreqMin": "10,12", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "ddrBwMax": "13763", - "ddrBwMin": "2408", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "15,17", - "cpuFreqMin": "10,11", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "16,18", - "cpuFreqMin": "10,18", - "topBoost": "0", - "heavyBoost": "10", - "ddrBwMax": "13763", - "ddrBwMin": "13763", - "uxAffinity": "2" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "cpuFreqMax": "13,13", - "cpuFreqMin": "1,11", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "14,11", - "cpuFreqMin": "6,11", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "14,11", - "cpuFreqMin": "6,11", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "16,13", - "cpuFreqMin": "6,11", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "ddrBwMax": "13763", - "ddrBwMin": "2408", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "16,15", - "cpuFreqMin": "6,11", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "ddrLatBig": "800", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "14,11", - "cpuFreqMin": "6,11", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "16,18", - "cpuFreqMin": "6,15", - "topBoost": "0", - "heavyBoost": "1", - "ddrBwMax": "13763", - "ddrBwMin": "4816", - "uxAffinity": "2" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "16,18", - "cpuFreqMin": "6,11", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "13763", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "16,18", - "cpuFreqMin": "8,11", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "13763", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "16,18", - "cpuFreqMin": "8,13", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "13763", - "ddrBwMin": "4816", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "16,18", - "cpuFreqMin": "8,18", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "13763", - "ddrBwMin": "4816", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "16,18", - "cpuFreqMin": "16,18", - "schedBoost": "1", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "13763", - "ddrBwMin": "13763", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "16,18", - "cpuFreqMin": "8,18", - "uxAffinity": "3" - }, - "sfBoost": { - "cpuFreqMax": "16,18", - "cpuFreqMin": "8,18", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "13763", - "ddrBwMin": "13763", - "uxAffinity": "3" - } - } - } - ] -} \ No newline at end of file diff --git a/magisk/config/sdm636_hmp.json b/magisk/config/sdm636_hmp.json deleted file mode 100644 index 12dda61..0000000 --- a/magisk/config/sdm636_hmp.json +++ /dev/null @@ -1,585 +0,0 @@ -{ - "meta": { - "name": "sdm636-hmp[21.07.25]", - "author": "yc@coolapk(powered by wipe-v2)", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1240, - "idleLoad": 830, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ - { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, - { - "hint": "Active", - "action": "normal", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, - { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, - { - "hint": "Pressed", - "action": "interaction", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, - { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, - { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, - { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, - { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, - { - "hint": "SfBoost", - "action": "sfLag", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, - { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, - { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" - } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 100, - 100, - 100, - 100, - 160, - 160, - 160, - 160 - ], - "knobs": [ - { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, - { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, - { - "name": "littleHidelay", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay", - "type": "string", - "enable": true, - "note": "小核的above_hispeed_delay" - }, - { - "name": "littleHifreq", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq", - "type": "string", - "enable": true, - "note": "小核的hispeed_freq" - }, - { - "name": "littleHiload", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load", - "type": "string", - "enable": true, - "note": "小核的go_hispeed_load" - }, - { - "name": "littleTgload", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads", - "type": "string", - "enable": true, - "note": "小核的target_loads" - }, - { - "name": "littleMinSample", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time", - "type": "string", - "enable": true, - "note": "小核的min_sample_time" - }, - { - "name": "littleHyst", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis", - "type": "string", - "enable": true, - "note": "小核的max_freq_hysteresis" - }, - { - "name": "bigHidelay", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay", - "type": "string", - "enable": true, - "note": "大核的above_hispeed_delay" - }, - { - "name": "bigHifreq", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq", - "type": "string", - "enable": true, - "note": "大核的hispeed_freq" - }, - { - "name": "bigHiload", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load", - "type": "string", - "enable": true, - "note": "大核的go_hispeed_load" - }, - { - "name": "bigTgload", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads", - "type": "string", - "enable": true, - "note": "大核的target_loads" - }, - { - "name": "bigMinSample", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time", - "type": "string", - "enable": true, - "note": "大核的min_sample_time" - }, - { - "name": "bigHyst", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/max_freq_hysteresis", - "type": "string", - "enable": true, - "note": "大核的max_freq_hysteresis" - }, - { - "name": "downmigrate", - "path": "/proc/sys/kernel/sched_downmigrate", - "type": "string", - "enable": true, - "note": "如果任务负载占小核容量的百分比小于此阈值,迁移到小核" - }, - { - "name": "upmigrate", - "path": "/proc/sys/kernel/sched_upmigrate", - "type": "string", - "enable": true, - "note": "如果任务负载占小核容量的百分比大于此阈值,迁移到大核" - }, - { - "name": "downmigrate2", - "path": "/proc/sys/kernel/sched_downmigrate", - "type": "string", - "enable": true, - "note": "如果任务负载占小核容量的百分比小于此阈值,迁移到小核,解决down>up的情况" - }, - { - "name": "ddrBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpubw/max_freq", - "type": "string", - "enable": true, - "note": "DDR最大带宽" - }, - { - "name": "ddrBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpubw/min_freq", - "type": "string", - "enable": true, - "note": "DDR最小带宽" - }, - { - "name": "ddrLatBig", - "path": "/sys/class/devfreq/soc:qcom,memlat-cpu4/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核DDR延迟控制,在DDR命中率降低时,值越大越容易提升DDR频率" - }, - { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电(相对卡顿百分比 50.0% 相对续航 99.0%)", - "actions": { - "normal": { - "cpuFreqMax": "17,19", - "cpuFreqMin": "6,11", - "littleHidelay": "78000 1536000:38000", - "littleHifreq": "1113000", - "littleHiload": "68", - "littleTgload": "86 902000:53 1113000:51 1401000:83 1536000:50 1612000:89", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "78000", - "bigHifreq": "1747000", - "bigHiload": "56", - "bigTgload": "88 1401000:73 1747000:98 1804000:96", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "95", - "upmigrate": "95", - "downmigrate2": "95", - "ddrBwMax": "10000", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "0" - }, - "interaction": { - "cpuFreqMax": "17,18", - "cpuFreqMin": "9,11", - "littleHidelay": "78000 1536000:38000", - "littleHifreq": "1113000", - "littleHiload": "68", - "littleTgload": "86 902000:53 1113000:51 1401000:83 1536000:50 1612000:89", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "78000", - "bigHifreq": "1747000", - "bigHiload": "56", - "bigTgload": "88 1401000:73 1747000:98 1804000:96", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "81", - "upmigrate": "92", - "downmigrate2": "81", - "ddrBwMax": "12000", - "ddrBwMin": "5000", - "ddrLatBig": "800", - "uxAffinity": "1" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "ddrBwMax": "14000", - "ddrBwMin": "10000", - "ddrLatBig": "800", - "uxAffinity": "1" - }, - "sfLag": { - "cpuFreqMax": "17,19", - "cpuFreqMin": "16,18", - "ddrBwMin": "10000", - "uxAffinity": "1" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗(相对卡顿百分比 99.9% 相对续航 111.3%)", - "actions": { - "normal": { - "cpuFreqMax": "17,19", - "cpuFreqMin": "6,11", - "littleHidelay": "78000", - "littleHifreq": "1113000", - "littleHiload": "74", - "littleTgload": "88 902000:70 1113000:64 1401000:99 1536000:97 1612000:85", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "78000 1401000:18000 1747000:78000", - "bigHifreq": "1113000", - "bigHiload": "98", - "bigTgload": "56 1401000:82 1747000:97 1804000:96", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "88", - "upmigrate": "88", - "downmigrate2": "88", - "ddrBwMax": "10000", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "0" - }, - "interaction": { - "cpuFreqMax": "16,18", - "cpuFreqMin": "9,11", - "littleHidelay": "78000", - "littleHifreq": "1113000", - "littleHiload": "74", - "littleTgload": "88 902000:70 1113000:64 1401000:99 1536000:97 1612000:85", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "78000 1401000:18000 1747000:78000", - "bigHifreq": "1113000", - "bigHiload": "98", - "bigTgload": "56 1401000:82 1747000:97 1804000:96", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "94", - "upmigrate": "94", - "downmigrate2": "94", - "ddrBwMax": "12000", - "ddrBwMin": "5000", - "ddrLatBig": "400", - "uxAffinity": "0" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "ddrBwMax": "12000", - "ddrBwMin": "5000", - "ddrLatBig": "800", - "uxAffinity": "0" - }, - "sfLag": { - "cpuFreqMax": "16,18", - "cpuFreqMin": "14,17", - "ddrBwMin": "5000", - "uxAffinity": "1" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "17,19", - "cpuFreqMin": "6,11", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "ddrBwMax": "12000", - "ddrBwMin": "5000", - "ddrLatBig": "400", - "uxAffinity": "3" - }, - "interaction": { - "cpuFreqMax": "17,19", - "cpuFreqMin": "16,18", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "ddrBwMax": "14000", - "ddrBwMin": "10000", - "ddrLatBig": "800", - "uxAffinity": "3" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "ddrBwMax": "14000", - "ddrBwMin": "10000", - "ddrLatBig": "800", - "uxAffinity": "3" - }, - "sfLag": { - "cpuFreqMax": "17,19", - "cpuFreqMin": "16,18", - "ddrBwMin": "10000", - "uxAffinity": "3" - } - } - } - ] -} \ No newline at end of file diff --git a/magisk/config/sdm650.json b/magisk/config/sdm650.json deleted file mode 100644 index 5e74dc3..0000000 --- a/magisk/config/sdm650.json +++ /dev/null @@ -1,532 +0,0 @@ -{ - "meta": { - "name": "sdm650[21.07.25]", - "author": "yc@coolapk(powered by wipe-v2)", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 860, - "idleLoad": 570, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ - { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, - { - "hint": "Active", - "action": "normal", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, - { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, - { - "hint": "Pressed", - "action": "interaction", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, - { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, - { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, - { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, - { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, - { - "hint": "SfBoost", - "action": "sfLag", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, - { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, - { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" - } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 100, - 100, - 100, - 100, - 160, - 160 - ], - "knobs": [ - { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, - { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, - { - "name": "littleHidelay", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay", - "type": "string", - "enable": true, - "note": "小核的above_hispeed_delay" - }, - { - "name": "littleHifreq", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq", - "type": "string", - "enable": true, - "note": "小核的hispeed_freq" - }, - { - "name": "littleHiload", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load", - "type": "string", - "enable": true, - "note": "小核的go_hispeed_load" - }, - { - "name": "littleTgload", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads", - "type": "string", - "enable": true, - "note": "小核的target_loads" - }, - { - "name": "littleMinSample", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time", - "type": "string", - "enable": true, - "note": "小核的min_sample_time" - }, - { - "name": "littleHyst", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis", - "type": "string", - "enable": true, - "note": "小核的max_freq_hysteresis" - }, - { - "name": "bigHidelay", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay", - "type": "string", - "enable": true, - "note": "大核的above_hispeed_delay" - }, - { - "name": "bigHifreq", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq", - "type": "string", - "enable": true, - "note": "大核的hispeed_freq" - }, - { - "name": "bigHiload", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load", - "type": "string", - "enable": true, - "note": "大核的go_hispeed_load" - }, - { - "name": "bigTgload", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads", - "type": "string", - "enable": true, - "note": "大核的target_loads" - }, - { - "name": "bigMinSample", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time", - "type": "string", - "enable": true, - "note": "大核的min_sample_time" - }, - { - "name": "bigHyst", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/max_freq_hysteresis", - "type": "string", - "enable": true, - "note": "大核的max_freq_hysteresis" - }, - { - "name": "downmigrate", - "path": "/proc/sys/kernel/sched_downmigrate", - "type": "string", - "enable": true, - "note": "如果任务负载占小核容量的百分比小于此阈值,迁移到小核" - }, - { - "name": "upmigrate", - "path": "/proc/sys/kernel/sched_upmigrate", - "type": "string", - "enable": true, - "note": "如果任务负载占小核容量的百分比大于此阈值,迁移到大核" - }, - { - "name": "downmigrate2", - "path": "/proc/sys/kernel/sched_downmigrate", - "type": "string", - "enable": true, - "note": "如果任务负载占小核容量的百分比小于此阈值,迁移到小核,解决down>up的情况" - }, - { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电(相对卡顿百分比 49.8% 相对续航 107.4%)", - "actions": { - "normal": { - "cpuFreqMax": "15,19", - "cpuFreqMin": "4,4", - "littleHidelay": "78000", - "littleHifreq": "1305000", - "littleHiload": "80", - "littleTgload": "51 691000:49 1017000:67 1190000:65 1305000:79 1401000:60", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "18000 940000:58000 1056000:38000 1113000:78000 1190000:38000 1248000:78000 1305000:58000 1382000:18000 1612000:78000", - "bigHifreq": "883000", - "bigHiload": "42", - "bigTgload": "73 883000:81 940000:44 998000:40 1056000:26 1113000:44 1190000:26 1248000:29 1305000:11 1382000:31 1612000:96 1747000:95 1804000:92", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "95", - "upmigrate": "95", - "downmigrate2": "95", - "uxAffinity": "0" - }, - "interaction": { - "cpuFreqMax": "14,17", - "cpuFreqMin": "6,4", - "littleHidelay": "78000", - "littleHifreq": "1305000", - "littleHiload": "80", - "littleTgload": "51 691000:49 1017000:67 1190000:65 1305000:79 1401000:60", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "18000 940000:58000 1056000:38000 1113000:78000 1190000:38000 1248000:78000 1305000:58000 1382000:18000 1612000:78000", - "bigHifreq": "883000", - "bigHiload": "42", - "bigTgload": "73 883000:81 940000:44 998000:40 1056000:26 1113000:44 1190000:26 1248000:29 1305000:11 1382000:31 1612000:96 1747000:95 1804000:92", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "83", - "upmigrate": "95", - "downmigrate2": "83", - "uxAffinity": "1" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "uxAffinity": "1" - }, - "sfLag": { - "cpuFreqMax": "14,17", - "cpuFreqMin": "12,16", - "uxAffinity": "1" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗(相对卡顿百分比 99.9% 相对续航 138.5%)", - "actions": { - "normal": { - "cpuFreqMax": "15,19", - "cpuFreqMin": "4,4", - "littleHidelay": "78000 1382000:18000", - "littleHifreq": "1190000", - "littleHiload": "80", - "littleTgload": "37 691000:58 806000:23 1017000:70 1190000:66 1305000:99 1382000:92 1401000:73", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "78000 940000:38000 998000:78000 1056000:58000 1113000:78000 1190000:58000 1248000:38000 1612000:58000 1747000:78000", - "bigHifreq": "883000", - "bigHiload": "67", - "bigTgload": "69 883000:87 940000:67 998000:19 1056000:36 1113000:88 1190000:8 1248000:62 1305000:98 1382000:25 1612000:81 1747000:79 1804000:86", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "95", - "upmigrate": "95", - "downmigrate2": "95", - "uxAffinity": "0" - }, - "interaction": { - "cpuFreqMax": "14,17", - "cpuFreqMin": "6,4", - "littleHidelay": "78000 1382000:18000", - "littleHifreq": "1190000", - "littleHiload": "80", - "littleTgload": "37 691000:58 806000:23 1017000:70 1190000:66 1305000:99 1382000:92 1401000:73", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "78000 940000:38000 998000:78000 1056000:58000 1113000:78000 1190000:58000 1248000:38000 1612000:58000 1747000:78000", - "bigHifreq": "883000", - "bigHiload": "67", - "bigTgload": "69 883000:87 940000:67 998000:19 1056000:36 1113000:88 1190000:8 1248000:62 1305000:98 1382000:25 1612000:81 1747000:79 1804000:86", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "94", - "upmigrate": "94", - "downmigrate2": "94", - "uxAffinity": "0" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "uxAffinity": "0" - }, - "sfLag": { - "cpuFreqMax": "14,17", - "cpuFreqMin": "10,12", - "uxAffinity": "1" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "15,19", - "cpuFreqMin": "4,4", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "uxAffinity": "3" - }, - "interaction": { - "cpuFreqMax": "13,17", - "cpuFreqMin": "12,16", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "uxAffinity": "3" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "uxAffinity": "3" - }, - "sfLag": { - "cpuFreqMax": "15,19", - "cpuFreqMin": "14,18", - "uxAffinity": "3" - } - } - } - ] -} \ No newline at end of file diff --git a/magisk/config/sdm650_eas.json b/magisk/config/sdm650_eas.json deleted file mode 100644 index 2987efd..0000000 --- a/magisk/config/sdm650_eas.json +++ /dev/null @@ -1,453 +0,0 @@ -{ - "meta": { - "name": "sdm650-eas[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 860, - "idleLoad": 570, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ - { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, - { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, - { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, - { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, - { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, - { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, - { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, - { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, - { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, - { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, - { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" - } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 100, - 100, - 100, - 100, - 160, - 160 - ], - "knobs": [ - { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, - { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, - { - "name": "schedBoost", - "path": "/proc/sys/kernel/sched_boost", - "type": "string", - "enable": true, - "note": "异构调度器全局任务放置boost,不考虑能耗代价" - }, - { - "name": "topBoost", - "path": "/dev/stune/top-app/schedtune.boost", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, - { - "name": "heavyBoost", - "path": "/dev/stune/rt/schedtune.boost", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, - { - "name": "ddrLatBig", - "path": "/sys/class/devfreq/soc:qcom,memlat-cpu4/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核DDR延迟控制,在DDR命中率降低时,值越大越容易提升DDR频率" - }, - { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, - { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "cpuFreqMax": "13,18", - "cpuFreqMin": "1,4", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "13,18", - "cpuFreqMin": "6,9", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "13,17", - "cpuFreqMin": "8,9", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "13,17", - "cpuFreqMin": "8,9", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "14,18", - "cpuFreqMin": "8,12", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "13,17", - "cpuFreqMin": "8,9", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "14,18", - "cpuFreqMin": "8,18", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "cpuFreqMax": "11,13", - "cpuFreqMin": "1,4", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "13,11", - "cpuFreqMin": "6,4", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "13,10", - "cpuFreqMin": "6,6", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "14,13", - "cpuFreqMin": "6,6", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "14,15", - "cpuFreqMin": "6,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "ddrLatBig": "800", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "13,10", - "cpuFreqMin": "6,6", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "14,18", - "cpuFreqMin": "6,15", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "14,18", - "cpuFreqMin": "4,4", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "14,18", - "cpuFreqMin": "7,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "14,18", - "cpuFreqMin": "7,13", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "14,18", - "cpuFreqMin": "7,18", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "14,18", - "cpuFreqMin": "14,18", - "schedBoost": "1", - "topBoost": "0", - "heavyBoost": "0", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "14,18", - "cpuFreqMin": "7,18", - "uxAffinity": "3" - }, - "sfBoost": { - "cpuFreqMax": "14,18", - "cpuFreqMin": "7,18", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3" - } - } - } - ] -} \ No newline at end of file diff --git a/magisk/config/sdm652.json b/magisk/config/sdm652.json deleted file mode 100644 index 05bddf6..0000000 --- a/magisk/config/sdm652.json +++ /dev/null @@ -1,534 +0,0 @@ -{ - "meta": { - "name": "sdm652[21.07.25]", - "author": "yc@coolapk(powered by wipe-v2)", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1240, - "idleLoad": 830, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ - { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, - { - "hint": "Active", - "action": "normal", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, - { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, - { - "hint": "Pressed", - "action": "interaction", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, - { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, - { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, - { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, - { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, - { - "hint": "SfBoost", - "action": "sfLag", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, - { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, - { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" - } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 100, - 100, - 100, - 100, - 160, - 160, - 160, - 160 - ], - "knobs": [ - { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, - { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, - { - "name": "littleHidelay", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay", - "type": "string", - "enable": true, - "note": "小核的above_hispeed_delay" - }, - { - "name": "littleHifreq", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq", - "type": "string", - "enable": true, - "note": "小核的hispeed_freq" - }, - { - "name": "littleHiload", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load", - "type": "string", - "enable": true, - "note": "小核的go_hispeed_load" - }, - { - "name": "littleTgload", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads", - "type": "string", - "enable": true, - "note": "小核的target_loads" - }, - { - "name": "littleMinSample", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time", - "type": "string", - "enable": true, - "note": "小核的min_sample_time" - }, - { - "name": "littleHyst", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis", - "type": "string", - "enable": true, - "note": "小核的max_freq_hysteresis" - }, - { - "name": "bigHidelay", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay", - "type": "string", - "enable": true, - "note": "大核的above_hispeed_delay" - }, - { - "name": "bigHifreq", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq", - "type": "string", - "enable": true, - "note": "大核的hispeed_freq" - }, - { - "name": "bigHiload", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load", - "type": "string", - "enable": true, - "note": "大核的go_hispeed_load" - }, - { - "name": "bigTgload", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads", - "type": "string", - "enable": true, - "note": "大核的target_loads" - }, - { - "name": "bigMinSample", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time", - "type": "string", - "enable": true, - "note": "大核的min_sample_time" - }, - { - "name": "bigHyst", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/max_freq_hysteresis", - "type": "string", - "enable": true, - "note": "大核的max_freq_hysteresis" - }, - { - "name": "downmigrate", - "path": "/proc/sys/kernel/sched_downmigrate", - "type": "string", - "enable": true, - "note": "如果任务负载占小核容量的百分比小于此阈值,迁移到小核" - }, - { - "name": "upmigrate", - "path": "/proc/sys/kernel/sched_upmigrate", - "type": "string", - "enable": true, - "note": "如果任务负载占小核容量的百分比大于此阈值,迁移到大核" - }, - { - "name": "downmigrate2", - "path": "/proc/sys/kernel/sched_downmigrate", - "type": "string", - "enable": true, - "note": "如果任务负载占小核容量的百分比小于此阈值,迁移到小核,解决down>up的情况" - }, - { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电(相对卡顿百分比 49.8% 相对续航 107.4%)", - "actions": { - "normal": { - "cpuFreqMax": "15,19", - "cpuFreqMin": "4,4", - "littleHidelay": "78000", - "littleHifreq": "1305000", - "littleHiload": "80", - "littleTgload": "51 691000:49 1017000:67 1190000:65 1305000:79 1401000:60", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "18000 940000:58000 1056000:38000 1113000:78000 1190000:38000 1248000:78000 1305000:58000 1382000:18000 1612000:78000", - "bigHifreq": "883000", - "bigHiload": "42", - "bigTgload": "73 883000:81 940000:44 998000:40 1056000:26 1113000:44 1190000:26 1248000:29 1305000:11 1382000:31 1612000:96 1747000:95 1804000:92", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "95", - "upmigrate": "95", - "downmigrate2": "95", - "uxAffinity": "0" - }, - "interaction": { - "cpuFreqMax": "14,17", - "cpuFreqMin": "6,4", - "littleHidelay": "78000", - "littleHifreq": "1305000", - "littleHiload": "80", - "littleTgload": "51 691000:49 1017000:67 1190000:65 1305000:79 1401000:60", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "18000 940000:58000 1056000:38000 1113000:78000 1190000:38000 1248000:78000 1305000:58000 1382000:18000 1612000:78000", - "bigHifreq": "883000", - "bigHiload": "42", - "bigTgload": "73 883000:81 940000:44 998000:40 1056000:26 1113000:44 1190000:26 1248000:29 1305000:11 1382000:31 1612000:96 1747000:95 1804000:92", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "83", - "upmigrate": "95", - "downmigrate2": "83", - "uxAffinity": "1" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "uxAffinity": "1" - }, - "sfLag": { - "cpuFreqMax": "14,17", - "cpuFreqMin": "12,16", - "uxAffinity": "1" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗(相对卡顿百分比 99.9% 相对续航 138.5%)", - "actions": { - "normal": { - "cpuFreqMax": "15,19", - "cpuFreqMin": "4,4", - "littleHidelay": "78000 1382000:18000", - "littleHifreq": "1190000", - "littleHiload": "80", - "littleTgload": "37 691000:58 806000:23 1017000:70 1190000:66 1305000:99 1382000:92 1401000:73", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "78000 940000:38000 998000:78000 1056000:58000 1113000:78000 1190000:58000 1248000:38000 1612000:58000 1747000:78000", - "bigHifreq": "883000", - "bigHiload": "67", - "bigTgload": "69 883000:87 940000:67 998000:19 1056000:36 1113000:88 1190000:8 1248000:62 1305000:98 1382000:25 1612000:81 1747000:79 1804000:86", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "95", - "upmigrate": "95", - "downmigrate2": "95", - "uxAffinity": "0" - }, - "interaction": { - "cpuFreqMax": "14,17", - "cpuFreqMin": "6,4", - "littleHidelay": "78000 1382000:18000", - "littleHifreq": "1190000", - "littleHiload": "80", - "littleTgload": "37 691000:58 806000:23 1017000:70 1190000:66 1305000:99 1382000:92 1401000:73", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "78000 940000:38000 998000:78000 1056000:58000 1113000:78000 1190000:58000 1248000:38000 1612000:58000 1747000:78000", - "bigHifreq": "883000", - "bigHiload": "67", - "bigTgload": "69 883000:87 940000:67 998000:19 1056000:36 1113000:88 1190000:8 1248000:62 1305000:98 1382000:25 1612000:81 1747000:79 1804000:86", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "94", - "upmigrate": "94", - "downmigrate2": "94", - "uxAffinity": "0" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "uxAffinity": "0" - }, - "sfLag": { - "cpuFreqMax": "14,17", - "cpuFreqMin": "10,12", - "uxAffinity": "1" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "15,19", - "cpuFreqMin": "4,4", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "uxAffinity": "3" - }, - "interaction": { - "cpuFreqMax": "13,17", - "cpuFreqMin": "12,16", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "uxAffinity": "3" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "uxAffinity": "3" - }, - "sfLag": { - "cpuFreqMax": "15,19", - "cpuFreqMin": "14,18", - "uxAffinity": "3" - } - } - } - ] -} \ No newline at end of file diff --git a/magisk/config/sdm652_eas.json b/magisk/config/sdm652_eas.json deleted file mode 100644 index 2171a96..0000000 --- a/magisk/config/sdm652_eas.json +++ /dev/null @@ -1,455 +0,0 @@ -{ - "meta": { - "name": "sdm652-eas[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1240, - "idleLoad": 830, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ - { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, - { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, - { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, - { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, - { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, - { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, - { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, - { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, - { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, - { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, - { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" - } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 100, - 100, - 100, - 100, - 160, - 160, - 160, - 160 - ], - "knobs": [ - { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, - { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, - { - "name": "schedBoost", - "path": "/proc/sys/kernel/sched_boost", - "type": "string", - "enable": true, - "note": "异构调度器全局任务放置boost,不考虑能耗代价" - }, - { - "name": "topBoost", - "path": "/dev/stune/top-app/schedtune.boost", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, - { - "name": "heavyBoost", - "path": "/dev/stune/rt/schedtune.boost", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, - { - "name": "ddrLatBig", - "path": "/sys/class/devfreq/soc:qcom,memlat-cpu4/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核DDR延迟控制,在DDR命中率降低时,值越大越容易提升DDR频率" - }, - { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, - { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "cpuFreqMax": "13,18", - "cpuFreqMin": "1,4", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "13,18", - "cpuFreqMin": "6,9", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "13,17", - "cpuFreqMin": "8,9", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "13,17", - "cpuFreqMin": "8,9", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "14,18", - "cpuFreqMin": "8,12", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "13,17", - "cpuFreqMin": "8,9", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "14,18", - "cpuFreqMin": "8,18", - "topBoost": "0", - "heavyBoost": "10", - "uxAffinity": "2" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "cpuFreqMax": "11,13", - "cpuFreqMin": "1,4", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "13,11", - "cpuFreqMin": "6,4", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "13,10", - "cpuFreqMin": "6,6", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "14,13", - "cpuFreqMin": "6,6", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "14,15", - "cpuFreqMin": "6,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "ddrLatBig": "800", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "13,10", - "cpuFreqMin": "6,6", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "14,18", - "cpuFreqMin": "6,15", - "topBoost": "0", - "heavyBoost": "1", - "uxAffinity": "2" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "14,18", - "cpuFreqMin": "4,4", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "14,18", - "cpuFreqMin": "7,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "14,18", - "cpuFreqMin": "7,13", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "14,18", - "cpuFreqMin": "7,18", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "14,18", - "cpuFreqMin": "14,18", - "schedBoost": "1", - "topBoost": "0", - "heavyBoost": "0", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "14,18", - "cpuFreqMin": "7,18", - "uxAffinity": "3" - }, - "sfBoost": { - "cpuFreqMax": "14,18", - "cpuFreqMin": "7,18", - "topBoost": "0", - "heavyBoost": "0", - "uxAffinity": "3" - } - } - } - ] -} \ No newline at end of file diff --git a/magisk/config/sdm660.json b/magisk/config/sdm660.json new file mode 100644 index 0000000..a94a05a --- /dev/null +++ b/magisk/config/sdm660.json @@ -0,0 +1,576 @@ +{ + "meta": { + "name": "sdm660/sdm636[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 100, + "nr": 4, + "typicalPower": 0.36, + "typicalFreq": 1.8, + "sweetFreq": 1.4, + "plainFreq": 1.0, + "freeFreq": 0.6 + }, + { + "efficiency": 170, + "nr": 4, + "typicalPower": 1.5, + "typicalFreq": 2.2, + "sweetFreq": 1.7, + "plainFreq": 1.1, + "freeFreq": 1.1 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3 + ], + "c1": [ + 4, + 5, + 6 + ], + "c2": [ + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, + { + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, + { + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, + { + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, + { + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ + { + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ + { + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ + { + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, + { + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, + { + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, + { + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" + } + ] + } + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.7, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.7, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.7, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } +} \ No newline at end of file diff --git a/magisk/config/sdm660_eas.json b/magisk/config/sdm660_eas.json deleted file mode 100644 index cd79b13..0000000 --- a/magisk/config/sdm660_eas.json +++ /dev/null @@ -1,505 +0,0 @@ -{ - "meta": { - "name": "sdm660-eas[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1290, - "idleLoad": 860, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ - { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, - { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, - { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, - { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, - { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, - { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, - { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, - { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, - { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, - { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, - { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" - } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 100, - 100, - 100, - 100, - 170, - 170, - 170, - 170 - ], - "knobs": [ - { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, - { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, - { - "name": "schedBoost", - "path": "/proc/sys/kernel/sched_boost", - "type": "string", - "enable": true, - "note": "异构调度器全局任务放置boost,不考虑能耗代价" - }, - { - "name": "topBoost", - "path": "/dev/stune/top-app/schedtune.boost", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, - { - "name": "heavyBoost", - "path": "/dev/stune/rt/schedtune.boost", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, - { - "name": "ddrBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpubw/max_freq", - "type": "string", - "enable": true, - "note": "DDR最大带宽" - }, - { - "name": "ddrBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpubw/min_freq", - "type": "string", - "enable": true, - "note": "DDR最小带宽" - }, - { - "name": "ddrLatBig", - "path": "/sys/class/devfreq/soc:qcom,memlat-cpu4/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核DDR延迟控制,在DDR命中率降低时,值越大越容易提升DDR频率" - }, - { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, - { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "cpuFreqMax": "14,21", - "cpuFreqMin": "1,11", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "15,21", - "cpuFreqMin": "6,11", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "15,17", - "cpuFreqMin": "10,11", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "ddrBwMax": "13763", - "ddrBwMin": "2408", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "15,17", - "cpuFreqMin": "10,11", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "ddrBwMax": "13763", - "ddrBwMin": "2408", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,21", - "cpuFreqMin": "10,12", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "ddrBwMax": "13763", - "ddrBwMin": "2408", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "15,17", - "cpuFreqMin": "10,11", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "18,22", - "cpuFreqMin": "10,21", - "topBoost": "0", - "heavyBoost": "10", - "ddrBwMax": "13763", - "ddrBwMin": "13763", - "uxAffinity": "2" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "cpuFreqMax": "13,13", - "cpuFreqMin": "1,11", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "14,11", - "cpuFreqMin": "6,11", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "14,11", - "cpuFreqMin": "6,11", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "16,13", - "cpuFreqMin": "6,11", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "ddrBwMax": "13763", - "ddrBwMin": "2408", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,15", - "cpuFreqMin": "6,11", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "ddrLatBig": "800", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "14,11", - "cpuFreqMin": "6,11", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "18,19", - "cpuFreqMin": "6,15", - "topBoost": "0", - "heavyBoost": "1", - "ddrBwMax": "13763", - "ddrBwMin": "4816", - "uxAffinity": "2" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "18,22", - "cpuFreqMin": "6,11", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "13763", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "18,22", - "cpuFreqMin": "8,11", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "13763", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "16,21", - "cpuFreqMin": "8,13", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "13763", - "ddrBwMin": "4816", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "16,19", - "cpuFreqMin": "8,19", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "13763", - "ddrBwMin": "4816", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,22", - "cpuFreqMin": "16,19", - "schedBoost": "1", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "13763", - "ddrBwMin": "13763", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "18,22", - "cpuFreqMin": "8,19", - "uxAffinity": "3" - }, - "sfBoost": { - "cpuFreqMax": "18,22", - "cpuFreqMin": "8,22", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "13763", - "ddrBwMin": "13763", - "uxAffinity": "3" - } - } - } - ] -} \ No newline at end of file diff --git a/magisk/config/sdm660_hmp.json b/magisk/config/sdm660_hmp.json deleted file mode 100644 index 9470eb8..0000000 --- a/magisk/config/sdm660_hmp.json +++ /dev/null @@ -1,585 +0,0 @@ -{ - "meta": { - "name": "sdm660-hmp[21.07.25]", - "author": "yc@coolapk(powered by wipe-v2)", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1240, - "idleLoad": 830, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ - { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, - { - "hint": "Active", - "action": "normal", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, - { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, - { - "hint": "Pressed", - "action": "interaction", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, - { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, - { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, - { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, - { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, - { - "hint": "SfBoost", - "action": "sfLag", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, - { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, - { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" - } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 100, - 100, - 100, - 100, - 160, - 160, - 160, - 160 - ], - "knobs": [ - { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, - { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, - { - "name": "littleHidelay", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay", - "type": "string", - "enable": true, - "note": "小核的above_hispeed_delay" - }, - { - "name": "littleHifreq", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq", - "type": "string", - "enable": true, - "note": "小核的hispeed_freq" - }, - { - "name": "littleHiload", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load", - "type": "string", - "enable": true, - "note": "小核的go_hispeed_load" - }, - { - "name": "littleTgload", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads", - "type": "string", - "enable": true, - "note": "小核的target_loads" - }, - { - "name": "littleMinSample", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time", - "type": "string", - "enable": true, - "note": "小核的min_sample_time" - }, - { - "name": "littleHyst", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis", - "type": "string", - "enable": true, - "note": "小核的max_freq_hysteresis" - }, - { - "name": "bigHidelay", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay", - "type": "string", - "enable": true, - "note": "大核的above_hispeed_delay" - }, - { - "name": "bigHifreq", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq", - "type": "string", - "enable": true, - "note": "大核的hispeed_freq" - }, - { - "name": "bigHiload", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load", - "type": "string", - "enable": true, - "note": "大核的go_hispeed_load" - }, - { - "name": "bigTgload", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads", - "type": "string", - "enable": true, - "note": "大核的target_loads" - }, - { - "name": "bigMinSample", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time", - "type": "string", - "enable": true, - "note": "大核的min_sample_time" - }, - { - "name": "bigHyst", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/max_freq_hysteresis", - "type": "string", - "enable": true, - "note": "大核的max_freq_hysteresis" - }, - { - "name": "downmigrate", - "path": "/proc/sys/kernel/sched_downmigrate", - "type": "string", - "enable": true, - "note": "如果任务负载占小核容量的百分比小于此阈值,迁移到小核" - }, - { - "name": "upmigrate", - "path": "/proc/sys/kernel/sched_upmigrate", - "type": "string", - "enable": true, - "note": "如果任务负载占小核容量的百分比大于此阈值,迁移到大核" - }, - { - "name": "downmigrate2", - "path": "/proc/sys/kernel/sched_downmigrate", - "type": "string", - "enable": true, - "note": "如果任务负载占小核容量的百分比小于此阈值,迁移到小核,解决down>up的情况" - }, - { - "name": "ddrBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpubw/max_freq", - "type": "string", - "enable": true, - "note": "DDR最大带宽" - }, - { - "name": "ddrBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpubw/min_freq", - "type": "string", - "enable": true, - "note": "DDR最小带宽" - }, - { - "name": "ddrLatBig", - "path": "/sys/class/devfreq/soc:qcom,memlat-cpu4/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核DDR延迟控制,在DDR命中率降低时,值越大越容易提升DDR频率" - }, - { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电(相对卡顿百分比 49.9% 相对续航 105.9%)", - "actions": { - "normal": { - "cpuFreqMax": "19,23", - "cpuFreqMin": "6,11", - "littleHidelay": "78000 1113000:38000 1401000:78000", - "littleHifreq": "902000", - "littleHiload": "96", - "littleTgload": "83 902000:63 1113000:60 1401000:80 1536000:97 1747000:95 1843000:96", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "78000", - "bigHifreq": "1958000", - "bigHiload": "68", - "bigTgload": "89 1401000:76 1747000:23 1958000:99", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "95", - "upmigrate": "95", - "downmigrate2": "95", - "ddrBwMax": "10000", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "0" - }, - "interaction": { - "cpuFreqMax": "18,20", - "cpuFreqMin": "11,11", - "littleHidelay": "78000 1113000:38000 1401000:78000", - "littleHifreq": "902000", - "littleHiload": "96", - "littleTgload": "83 902000:63 1113000:60 1401000:80 1536000:97 1747000:95 1843000:96", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "78000", - "bigHifreq": "1958000", - "bigHiload": "68", - "bigTgload": "89 1401000:76 1747000:23 1958000:99", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "69", - "upmigrate": "82", - "downmigrate2": "69", - "ddrBwMax": "12000", - "ddrBwMin": "5000", - "ddrLatBig": "800", - "uxAffinity": "1" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "ddrBwMax": "14000", - "ddrBwMin": "10000", - "ddrLatBig": "800", - "uxAffinity": "1" - }, - "sfLag": { - "cpuFreqMax": "19,22", - "cpuFreqMin": "18,21", - "ddrBwMin": "10000", - "uxAffinity": "1" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗(相对卡顿百分比 100.0% 相对续航 129.0%)", - "actions": { - "normal": { - "cpuFreqMax": "19,23", - "cpuFreqMin": "6,11", - "littleHidelay": "78000 1113000:38000 1401000:78000 1747000:18000", - "littleHifreq": "902000", - "littleHiload": "55", - "littleTgload": "67 902000:82 1113000:26 1401000:93 1536000:92 1747000:51 1843000:80", - "littleMinSample": "38000", - "littleHyst": "18000", - "bigHidelay": "78000 1747000:38000 1958000:78000", - "bigHifreq": "1401000", - "bigHiload": "68", - "bigTgload": "84 1401000:35 1747000:12 1958000:97 2150000:98", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "95", - "upmigrate": "95", - "downmigrate2": "95", - "ddrBwMax": "10000", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "0" - }, - "interaction": { - "cpuFreqMax": "18,20", - "cpuFreqMin": "11,11", - "littleHidelay": "78000 1113000:38000 1401000:78000 1747000:18000", - "littleHifreq": "902000", - "littleHiload": "55", - "littleTgload": "67 902000:82 1113000:26 1401000:93 1536000:92 1747000:51 1843000:80", - "littleMinSample": "38000", - "littleHyst": "18000", - "bigHidelay": "78000 1747000:38000 1958000:78000", - "bigHifreq": "1401000", - "bigHiload": "68", - "bigTgload": "84 1401000:35 1747000:12 1958000:97 2150000:98", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "70", - "upmigrate": "95", - "downmigrate2": "70", - "ddrBwMax": "12000", - "ddrBwMin": "5000", - "ddrLatBig": "400", - "uxAffinity": "0" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "ddrBwMax": "12000", - "ddrBwMin": "5000", - "ddrLatBig": "800", - "uxAffinity": "0" - }, - "sfLag": { - "cpuFreqMax": "18,20", - "cpuFreqMin": "14,17", - "ddrBwMin": "5000", - "uxAffinity": "1" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "19,23", - "cpuFreqMin": "6,11", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "ddrBwMax": "12000", - "ddrBwMin": "5000", - "ddrLatBig": "400", - "uxAffinity": "3" - }, - "interaction": { - "cpuFreqMax": "19,22", - "cpuFreqMin": "18,21", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "ddrBwMax": "14000", - "ddrBwMin": "10000", - "ddrLatBig": "800", - "uxAffinity": "3" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "ddrBwMax": "14000", - "ddrBwMin": "10000", - "ddrLatBig": "800", - "uxAffinity": "3" - }, - "sfLag": { - "cpuFreqMax": "19,23", - "cpuFreqMin": "18,22", - "ddrBwMin": "10000", - "uxAffinity": "3" - } - } - } - ] -} \ No newline at end of file diff --git a/magisk/config/sdm665.json b/magisk/config/sdm665.json index bcbdcd1..50872ec 100644 --- a/magisk/config/sdm665.json +++ b/magisk/config/sdm665.json @@ -1,505 +1,576 @@ { - "meta": { - "name": "sdm665/sdm662[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1290, - "idleLoad": 860, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ + "meta": { + "name": "sdm665/sdm662[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 100, + "nr": 4, + "typicalPower": 0.36, + "typicalFreq": 1.8, + "sweetFreq": 1.4, + "plainFreq": 1.0, + "freeFreq": 0.6 + }, + { + "efficiency": 170, + "nr": 4, + "typicalPower": 1.5, + "typicalFreq": 2.2, + "sweetFreq": 1.8, + "plainFreq": 1.1, + "freeFreq": 1.1 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3 + ], + "c1": [ + 4, + 5, + 6 + ], + "c2": [ + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 100, - 100, - 100, - 100, - 170, - 170, - 170, - 170 - ], - "knobs": [ + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ { - "name": "schedBoost", - "path": "/proc/sys/kernel/sched_boost", - "type": "string", - "enable": true, - "note": "异构调度器全局任务放置boost,不考虑能耗代价" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ { - "name": "topBoost", - "path": "/dev/stune/top-app/schedtune.boost", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ { - "name": "heavyBoost", - "path": "/dev/stune/rt/schedtune.boost", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ { - "name": "ddrBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpubw/max_freq", - "type": "string", - "enable": true, - "note": "DDR最大带宽" - }, + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, { - "name": "ddrBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpubw/min_freq", - "type": "string", - "enable": true, - "note": "DDR最小带宽" - }, + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, { - "name": "ddrLatBig", - "path": "/sys/class/devfreq/soc:qcom,memlat-cpu4/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核DDR延迟控制,在DDR命中率降低时,值越大越容易提升DDR频率" - }, + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "cpuFreqMax": "14,20", - "cpuFreqMin": "1,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "15,20", - "cpuFreqMin": "6,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "15,17", - "cpuFreqMin": "10,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "ddrBwMax": "13763", - "ddrBwMin": "2408", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "15,17", - "cpuFreqMin": "10,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "ddrBwMax": "13763", - "ddrBwMin": "2408", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,20", - "cpuFreqMin": "10,12", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "ddrBwMax": "13763", - "ddrBwMin": "2408", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "15,17", - "cpuFreqMin": "10,10", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "18,20", - "cpuFreqMin": "10,20", - "topBoost": "0", - "heavyBoost": "10", - "ddrBwMax": "13763", - "ddrBwMin": "13763", - "uxAffinity": "2" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "cpuFreqMax": "13,13", - "cpuFreqMin": "1,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "14,11", - "cpuFreqMin": "6,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "14,10", - "cpuFreqMin": "6,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "16,13", - "cpuFreqMin": "6,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "ddrBwMax": "13763", - "ddrBwMin": "2408", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,15", - "cpuFreqMin": "6,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "ddrLatBig": "800", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "14,10", - "cpuFreqMin": "6,10", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "18,19", - "cpuFreqMin": "6,15", - "topBoost": "0", - "heavyBoost": "1", - "ddrBwMax": "13763", - "ddrBwMin": "4816", - "uxAffinity": "2" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "18,20", - "cpuFreqMin": "6,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "13763", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "18,20", - "cpuFreqMin": "8,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "13763", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "16,20", - "cpuFreqMin": "8,13", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "13763", - "ddrBwMin": "4816", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "16,19", - "cpuFreqMin": "8,19", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "13763", - "ddrBwMin": "4816", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,20", - "cpuFreqMin": "16,19", - "schedBoost": "1", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "13763", - "ddrBwMin": "13763", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "18,20", - "cpuFreqMin": "8,19", - "uxAffinity": "3" - }, - "sfBoost": { - "cpuFreqMax": "18,20", - "cpuFreqMin": "8,20", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "13763", - "ddrBwMin": "13763", - "uxAffinity": "3" - } + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, + { + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" } + ] } - ] + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.7, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.7, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.7, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } } \ No newline at end of file diff --git a/magisk/config/sdm675.json b/magisk/config/sdm675.json index d239a5e..c01ecc2 100644 --- a/magisk/config/sdm675.json +++ b/magisk/config/sdm675.json @@ -1,577 +1,578 @@ { - "meta": { - "name": "sdm675[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1420, - "idleLoad": 950, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ + "meta": { + "name": "sdm675[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 115, + "nr": 6, + "typicalPower": 0.4, + "typicalFreq": 1.8, + "sweetFreq": 1.4, + "plainFreq": 1.0, + "freeFreq": 0.6 + }, + { + "efficiency": 250, + "nr": 2, + "typicalPower": 1.8, + "typicalFreq": 2.0, + "sweetFreq": 1.4, + "plainFreq": 1.0, + "freeFreq": 0.7 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3, + 4, + 5 + ], + "c1": [ + 6, + 7 + ], + "c2": [ + 6, + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" + "k": ".", + "ac": "auto", + "pc": "bg" } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 6 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 115, - 115, - 115, - 115, - 115, - 115, - 250, - 250 - ], - "knobs": [ + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ { - "name": "schedBoost", - "path": "/proc/sys/kernel/sched_boost", - "type": "string", - "enable": true, - "note": "异构调度器全局任务放置boost,不考虑能耗代价" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ { - "name": "topBoost", - "path": "/dev/stune/top-app/schedtune.boost", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ { - "name": "heavyBoost", - "path": "/dev/stune/rt/schedtune.boost", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, { - "name": "llccBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpu-cpu-llcc-bw/max_freq", - "type": "string", - "enable": true, - "note": "LLCC最大带宽" - }, + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, { - "name": "llccBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpu-cpu-llcc-bw/min_freq", - "type": "string", - "enable": true, - "note": "LLCC最小带宽" - }, + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, { - "name": "ddrBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpu-llcc-ddr-bw/max_freq", - "type": "string", - "enable": true, - "note": "DDR最大带宽" - }, + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, { - "name": "ddrBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpu-llcc-ddr-bw/min_freq", - "type": "string", - "enable": true, - "note": "DDR最小带宽" - }, + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, { - "name": "l3LatBig", - "path": "/sys/class/devfreq/soc:qcom,cpu6-cpu-l3-lat/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核L3延迟控制,在L3命中率降低时,值越大越容易提升L3频率" - }, + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, { - "name": "ddrLatBig", - "path": "/sys/class/devfreq/soc:qcom,cpu6-llcc-ddr-lat/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核DDR延迟控制,在DDR命中率降低时,值越大越容易提升DDR频率" - }, + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "cpuFreqMax": "14,20", - "cpuFreqMin": "1,7", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "14236", - "llccBwMin": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "15,20", - "cpuFreqMin": "6,9", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "14236", - "llccBwMin": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "15,18", - "cpuFreqMin": "10,9", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "llccBwMax": "14236", - "llccBwMin": "7829", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "15,18", - "cpuFreqMin": "10,9", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "llccBwMax": "14236", - "llccBwMin": "7829", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,20", - "cpuFreqMin": "10,13", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "llccBwMax": "14236", - "llccBwMin": "7829", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "15,18", - "cpuFreqMin": "10,9", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "18,20", - "cpuFreqMin": "10,20", - "topBoost": "0", - "heavyBoost": "10", - "llccBwMax": "14236", - "llccBwMin": "14236", - "ddrBwMax": "6881", - "ddrBwMin": "6881", - "uxAffinity": "2" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "cpuFreqMax": "13,14", - "cpuFreqMin": "1,7", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "12812", - "llccBwMin": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "14,12", - "cpuFreqMin": "6,7", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "12812", - "llccBwMin": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "14,10", - "cpuFreqMin": "6,7", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "llccBwMax": "14236", - "llccBwMin": "7829", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "16,14", - "cpuFreqMin": "6,7", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "llccBwMax": "14236", - "llccBwMin": "7829", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,16", - "cpuFreqMin": "6,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "llccBwMax": "14236", - "llccBwMin": "7829", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "14,10", - "cpuFreqMin": "6,7", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "18,20", - "cpuFreqMin": "6,16", - "topBoost": "0", - "heavyBoost": "1", - "llccBwMax": "14236", - "llccBwMin": "12812", - "ddrBwMax": "6881", - "ddrBwMin": "4816", - "uxAffinity": "2" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "18,20", - "cpuFreqMin": "5,7", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "14236", - "llccBwMin": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "18,20", - "cpuFreqMin": "8,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "14236", - "llccBwMin": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "16,20", - "cpuFreqMin": "8,14", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "14236", - "llccBwMin": "12812", - "ddrBwMax": "6881", - "ddrBwMin": "4816", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "16,20", - "cpuFreqMin": "8,20", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "14236", - "llccBwMin": "12812", - "ddrBwMax": "6881", - "ddrBwMin": "4816", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,20", - "cpuFreqMin": "16,20", - "schedBoost": "1", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "14236", - "llccBwMin": "14236", - "ddrBwMax": "6881", - "ddrBwMin": "6881", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "18,20", - "cpuFreqMin": "8,20", - "uxAffinity": "3" - }, - "sfBoost": { - "cpuFreqMax": "18,20", - "cpuFreqMin": "8,20", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "14236", - "llccBwMin": "14236", - "ddrBwMax": "6881", - "ddrBwMin": "6881", - "uxAffinity": "3" - } + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" } + ] } - ] + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.3, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } } \ No newline at end of file diff --git a/magisk/config/sdm695.json b/magisk/config/sdm695.json new file mode 100644 index 0000000..ad88ecf --- /dev/null +++ b/magisk/config/sdm695.json @@ -0,0 +1,578 @@ +{ + "meta": { + "name": "sdm695[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 115, + "nr": 6, + "typicalPower": 0.32, + "typicalFreq": 1.8, + "sweetFreq": 1.4, + "plainFreq": 1.0, + "freeFreq": 0.6 + }, + { + "efficiency": 320, + "nr": 2, + "typicalPower": 1.3, + "typicalFreq": 2.2, + "sweetFreq": 1.7, + "plainFreq": 1.0, + "freeFreq": 0.7 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3, + 4, + 5 + ], + "c1": [ + 6, + 7 + ], + "c2": [ + 6, + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, + { + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, + { + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, + { + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, + { + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ + { + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ + { + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ + { + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, + { + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, + { + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, + { + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" + } + ] + } + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.7, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.7, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.7, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } +} \ No newline at end of file diff --git a/magisk/config/sdm710.json b/magisk/config/sdm710.json index 603fe14..ab49315 100644 --- a/magisk/config/sdm710.json +++ b/magisk/config/sdm710.json @@ -1,527 +1,578 @@ { - "meta": { - "name": "sdm710/sdm712[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1300, - "idleLoad": 870, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ + "meta": { + "name": "sdm710/sdm712/sdm670[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 115, + "nr": 6, + "typicalPower": 0.4, + "typicalFreq": 1.8, + "sweetFreq": 1.4, + "plainFreq": 1.0, + "freeFreq": 0.6 + }, + { + "efficiency": 200, + "nr": 2, + "typicalPower": 1.6, + "typicalFreq": 2.3, + "sweetFreq": 1.7, + "plainFreq": 1.0, + "freeFreq": 0.8 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3, + 4, + 5 + ], + "c1": [ + 6, + 7 + ], + "c2": [ + 6, + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 6 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 115, - 115, - 115, - 115, - 115, - 115, - 200, - 200 - ], - "knobs": [ + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ { - "name": "schedBoost", - "path": "/proc/sys/kernel/sched_boost", - "type": "string", - "enable": true, - "note": "异构调度器全局任务放置boost,不考虑能耗代价" - }, + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ { - "name": "topBoost", - "path": "/dev/stune/top-app/schedtune.boost", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, { - "name": "heavyBoost", - "path": "/dev/stune/rt/schedtune.boost", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, { - "name": "ddrBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpubw/max_freq", - "type": "string", - "enable": true, - "note": "DDR最大带宽" - }, + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, { - "name": "ddrBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpubw/min_freq", - "type": "string", - "enable": true, - "note": "DDR最小带宽" - }, + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, { - "name": "l3LatBig", - "path": "/sys/class/devfreq/soc:qcom,l3-cpu6/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核L3延迟控制,在L3命中率降低时,值越大越容易提升L3频率" - }, + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, { - "name": "ddrLatBig", - "path": "/sys/class/devfreq/soc:qcom,memlat-cpu6/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核DDR延迟控制,在DDR命中率降低时,值越大越容易提升DDR频率" - }, + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "cpuFreqMax": "15,23", - "cpuFreqMin": "1,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "16,23", - "cpuFreqMin": "7,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "16,21", - "cpuFreqMin": "10,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "16,21", - "cpuFreqMin": "10,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "17,23", - "cpuFreqMin": "10,15", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "16,21", - "cpuFreqMin": "10,10", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "17,23", - "cpuFreqMin": "10,23", - "topBoost": "0", - "heavyBoost": "10", - "ddrBwMax": "6881", - "ddrBwMin": "6881", - "uxAffinity": "2" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "cpuFreqMax": "14,16", - "cpuFreqMin": "1,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "15,14", - "cpuFreqMin": "7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "15,12", - "cpuFreqMin": "7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "17,16", - "cpuFreqMin": "7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "17,18", - "cpuFreqMin": "7,9", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "15,12", - "cpuFreqMin": "7,8", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "17,23", - "cpuFreqMin": "7,18", - "topBoost": "0", - "heavyBoost": "1", - "ddrBwMax": "6881", - "ddrBwMin": "4816", - "uxAffinity": "2" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "17,23", - "cpuFreqMin": "5,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "17,23", - "cpuFreqMin": "8,12", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "17,23", - "cpuFreqMin": "8,16", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6881", - "ddrBwMin": "4816", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "17,23", - "cpuFreqMin": "8,23", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6881", - "ddrBwMin": "4816", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "17,23", - "cpuFreqMin": "17,23", - "schedBoost": "1", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6881", - "ddrBwMin": "6881", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "17,23", - "cpuFreqMin": "8,23", - "uxAffinity": "3" - }, - "sfBoost": { - "cpuFreqMax": "17,23", - "cpuFreqMin": "8,23", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6881", - "ddrBwMin": "6881", - "uxAffinity": "3" - } + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" } + ] } - ] + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.7, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.7, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.7, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } } \ No newline at end of file diff --git a/magisk/config/sdm730.json b/magisk/config/sdm730.json index f0f9c0e..62044d7 100644 --- a/magisk/config/sdm730.json +++ b/magisk/config/sdm730.json @@ -1,577 +1,578 @@ { - "meta": { - "name": "sdm730/sdm730g[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1420, - "idleLoad": 950, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ + "meta": { + "name": "sdm730/sdm730g[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 115, + "nr": 6, + "typicalPower": 0.4, + "typicalFreq": 1.8, + "sweetFreq": 1.4, + "plainFreq": 1.0, + "freeFreq": 0.6 + }, + { + "efficiency": 250, + "nr": 2, + "typicalPower": 1.6, + "typicalFreq": 2.2, + "sweetFreq": 1.6, + "plainFreq": 1.0, + "freeFreq": 0.7 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3, + 4, + 5 + ], + "c1": [ + 6, + 7 + ], + "c2": [ + 6, + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" + "k": ".", + "ac": "auto", + "pc": "bg" } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 6 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 115, - 115, - 115, - 115, - 115, - 115, - 250, - 250 - ], - "knobs": [ + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ { - "name": "schedBoost", - "path": "/proc/sys/kernel/sched_boost", - "type": "string", - "enable": true, - "note": "异构调度器全局任务放置boost,不考虑能耗代价" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ { - "name": "topBoost", - "path": "/dev/stune/top-app/schedtune.boost", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ { - "name": "heavyBoost", - "path": "/dev/stune/rt/schedtune.boost", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, { - "name": "llccBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpu-cpu-llcc-bw/max_freq", - "type": "string", - "enable": true, - "note": "LLCC最大带宽" - }, + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, { - "name": "llccBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpu-cpu-llcc-bw/min_freq", - "type": "string", - "enable": true, - "note": "LLCC最小带宽" - }, + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, { - "name": "ddrBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpu-llcc-ddr-bw/max_freq", - "type": "string", - "enable": true, - "note": "DDR最大带宽" - }, + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, { - "name": "ddrBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpu-llcc-ddr-bw/min_freq", - "type": "string", - "enable": true, - "note": "DDR最小带宽" - }, + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, { - "name": "l3LatBig", - "path": "/sys/class/devfreq/soc:qcom,cpu6-cpu-l3-lat/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核L3延迟控制,在L3命中率降低时,值越大越容易提升L3频率" - }, + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, { - "name": "ddrLatBig", - "path": "/sys/class/devfreq/soc:qcom,cpu6-llcc-ddr-lat/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核DDR延迟控制,在DDR命中率降低时,值越大越容易提升DDR频率" - }, + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "cpuFreqMax": "16,22", - "cpuFreqMin": "1,7", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "14236", - "llccBwMin": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "17,22", - "cpuFreqMin": "7,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "14236", - "llccBwMin": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "17,21", - "cpuFreqMin": "11,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "llccBwMax": "14236", - "llccBwMin": "7829", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "17,21", - "cpuFreqMin": "11,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "llccBwMax": "14236", - "llccBwMin": "7829", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,22", - "cpuFreqMin": "11,15", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "llccBwMax": "14236", - "llccBwMin": "7829", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "17,21", - "cpuFreqMin": "11,10", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "18,22", - "cpuFreqMin": "11,22", - "topBoost": "0", - "heavyBoost": "10", - "llccBwMax": "14236", - "llccBwMin": "14236", - "ddrBwMax": "6881", - "ddrBwMin": "6881", - "uxAffinity": "2" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "cpuFreqMax": "14,16", - "cpuFreqMin": "1,7", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "12812", - "llccBwMin": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "16,14", - "cpuFreqMin": "7,7", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "12812", - "llccBwMin": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "16,12", - "cpuFreqMin": "7,7", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "llccBwMax": "14236", - "llccBwMin": "7829", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "18,16", - "cpuFreqMin": "7,7", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "llccBwMax": "14236", - "llccBwMin": "7829", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,18", - "cpuFreqMin": "7,9", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "llccBwMax": "14236", - "llccBwMin": "7829", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "16,12", - "cpuFreqMin": "7,7", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "18,22", - "cpuFreqMin": "7,18", - "topBoost": "0", - "heavyBoost": "1", - "llccBwMax": "14236", - "llccBwMin": "12812", - "ddrBwMax": "6881", - "ddrBwMin": "4816", - "uxAffinity": "2" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "18,22", - "cpuFreqMin": "5,7", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "14236", - "llccBwMin": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "18,22", - "cpuFreqMin": "9,12", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "14236", - "llccBwMin": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "18,22", - "cpuFreqMin": "9,16", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "14236", - "llccBwMin": "12812", - "ddrBwMax": "6881", - "ddrBwMin": "4816", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "18,22", - "cpuFreqMin": "9,22", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "14236", - "llccBwMin": "12812", - "ddrBwMax": "6881", - "ddrBwMin": "4816", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,22", - "cpuFreqMin": "18,22", - "schedBoost": "1", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "14236", - "llccBwMin": "14236", - "ddrBwMax": "6881", - "ddrBwMin": "6881", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "18,22", - "cpuFreqMin": "9,22", - "uxAffinity": "3" - }, - "sfBoost": { - "cpuFreqMax": "18,22", - "cpuFreqMin": "9,22", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "14236", - "llccBwMin": "14236", - "ddrBwMax": "6881", - "ddrBwMin": "6881", - "uxAffinity": "3" - } + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" } + ] } - ] + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.7, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.7, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.7, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } } \ No newline at end of file diff --git a/magisk/config/sdm750.json b/magisk/config/sdm750.json index 178fa32..c0b13e4 100644 --- a/magisk/config/sdm750.json +++ b/magisk/config/sdm750.json @@ -1,577 +1,578 @@ { - "meta": { - "name": "sdm750g[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1540, - "idleLoad": 1030, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ + "meta": { + "name": "sdm750/sdm750g[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 115, + "nr": 6, + "typicalPower": 0.4, + "typicalFreq": 1.8, + "sweetFreq": 1.4, + "plainFreq": 1.0, + "freeFreq": 0.6 + }, + { + "efficiency": 300, + "nr": 2, + "typicalPower": 1.6, + "typicalFreq": 2.2, + "sweetFreq": 1.6, + "plainFreq": 1.0, + "freeFreq": 0.7 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3, + 4, + 5 + ], + "c1": [ + 6, + 7 + ], + "c2": [ + 6, + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" + "k": ".", + "ac": "auto", + "pc": "bg" } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 6 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 115, - 115, - 115, - 115, - 115, - 115, - 300, - 300 - ], - "knobs": [ + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ { - "name": "schedBoost", - "path": "/proc/sys/kernel/sched_boost", - "type": "string", - "enable": true, - "note": "异构调度器全局任务放置boost,不考虑能耗代价" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ { - "name": "topBoost", - "path": "/dev/stune/top-app/schedtune.boost", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ { - "name": "heavyBoost", - "path": "/dev/stune/rt/schedtune.boost", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, { - "name": "llccBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpu-cpu-llcc-bw/max_freq", - "type": "string", - "enable": true, - "note": "LLCC最大带宽" - }, + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, { - "name": "llccBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpu-cpu-llcc-bw/min_freq", - "type": "string", - "enable": true, - "note": "LLCC最小带宽" - }, + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, { - "name": "ddrBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpu-llcc-ddr-bw/max_freq", - "type": "string", - "enable": true, - "note": "DDR最大带宽" - }, + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, { - "name": "ddrBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpu-llcc-ddr-bw/min_freq", - "type": "string", - "enable": true, - "note": "DDR最小带宽" - }, + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, { - "name": "l3LatBig", - "path": "/sys/class/devfreq/18321000.qcom,devfreq-l3:qcom,cpu6-cpu-l3-lat/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核L3延迟控制,在L3命中率降低时,值越大越容易提升L3频率" - }, + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, { - "name": "ddrLatBig", - "path": "/sys/class/devfreq/soc:qcom,cpu6-llcc-ddr-lat/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核DDR延迟控制,在DDR命中率降低时,值越大越容易提升DDR频率" - }, + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "cpuFreqMax": "16,22", - "cpuFreqMin": "1,6", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "16265", - "llccBwMin": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "17,22", - "cpuFreqMin": "7,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "16265", - "llccBwMin": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "17,21", - "cpuFreqMin": "11,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "llccBwMax": "16265", - "llccBwMin": "8945", - "ddrBwMax": "7980", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "17,21", - "cpuFreqMin": "11,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "llccBwMax": "16265", - "llccBwMin": "8945", - "ddrBwMax": "7980", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,22", - "cpuFreqMin": "11,15", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "llccBwMax": "16265", - "llccBwMin": "8945", - "ddrBwMax": "7980", - "ddrBwMin": "2408", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "17,21", - "cpuFreqMin": "11,10", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "18,22", - "cpuFreqMin": "11,22", - "topBoost": "0", - "heavyBoost": "10", - "llccBwMax": "16265", - "llccBwMin": "16265", - "ddrBwMax": "7980", - "ddrBwMin": "7980", - "uxAffinity": "2" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "cpuFreqMax": "14,16", - "cpuFreqMin": "1,6", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "14638", - "llccBwMin": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "16,14", - "cpuFreqMin": "7,6", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "14638", - "llccBwMin": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "16,12", - "cpuFreqMin": "7,7", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "llccBwMax": "16265", - "llccBwMin": "8945", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "18,16", - "cpuFreqMin": "7,7", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "llccBwMax": "16265", - "llccBwMin": "8945", - "ddrBwMax": "7980", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,18", - "cpuFreqMin": "7,9", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "llccBwMax": "16265", - "llccBwMin": "8945", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "16,12", - "cpuFreqMin": "7,7", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "18,22", - "cpuFreqMin": "7,18", - "topBoost": "0", - "heavyBoost": "1", - "llccBwMax": "16265", - "llccBwMin": "14638", - "ddrBwMax": "7980", - "ddrBwMin": "4816", - "uxAffinity": "2" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "18,22", - "cpuFreqMin": "5,6", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "16265", - "llccBwMin": "0", - "ddrBwMax": "7980", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "18,22", - "cpuFreqMin": "9,12", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "16265", - "llccBwMin": "0", - "ddrBwMax": "7980", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "18,22", - "cpuFreqMin": "9,16", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "16265", - "llccBwMin": "14638", - "ddrBwMax": "7980", - "ddrBwMin": "4816", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "18,22", - "cpuFreqMin": "9,22", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "16265", - "llccBwMin": "14638", - "ddrBwMax": "7980", - "ddrBwMin": "4816", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,22", - "cpuFreqMin": "18,22", - "schedBoost": "1", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "16265", - "llccBwMin": "16265", - "ddrBwMax": "7980", - "ddrBwMin": "7980", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "18,22", - "cpuFreqMin": "9,22", - "uxAffinity": "3" - }, - "sfBoost": { - "cpuFreqMax": "18,22", - "cpuFreqMin": "9,22", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "16265", - "llccBwMin": "16265", - "ddrBwMax": "7980", - "ddrBwMin": "7980", - "uxAffinity": "3" - } + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" } + ] } - ] + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.7, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.7, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.7, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } } \ No newline at end of file diff --git a/magisk/config/sdm765.json b/magisk/config/sdm765.json index cc409af..f8c73f8 100644 --- a/magisk/config/sdm765.json +++ b/magisk/config/sdm765.json @@ -1,578 +1,587 @@ { - "meta": { - "name": "sdm765/sdm765g[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1420, - "idleLoad": 950, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ + "meta": { + "name": "sdm765/sdm765g/sdm768g[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 115, + "nr": 6, + "typicalPower": 0.4, + "typicalFreq": 1.8, + "sweetFreq": 1.4, + "plainFreq": 1.0, + "freeFreq": 0.6 + }, + { + "efficiency": 250, + "nr": 1, + "typicalPower": 1.39, + "typicalFreq": 2.4, + "sweetFreq": 1.7, + "plainFreq": 1.0, + "freeFreq": 0.7 + }, + { + "efficiency": 250, + "nr": 1, + "typicalPower": 1.76, + "typicalFreq": 2.8, + "sweetFreq": 2.2, + "plainFreq": 1.4, + "freeFreq": 0.8 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3, + 4, + 5 + ], + "c1": [ + 6, + 7 + ], + "c2": [ + 6, + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 6, - 7 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 115, - 115, - 115, - 115, - 115, - 115, - 250, - 250 - ], - "knobs": [ + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ { - "name": "schedBoost", - "path": "/proc/sys/kernel/sched_boost", - "type": "string", - "enable": true, - "note": "异构调度器全局任务放置boost,不考虑能耗代价" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ { - "name": "topBoost", - "path": "/dev/stune/top-app/schedtune.boost", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ { - "name": "heavyBoost", - "path": "/dev/stune/rt/schedtune.boost", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ { - "name": "llccBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpu-cpu-llcc-bw/max_freq", - "type": "string", - "enable": true, - "note": "LLCC最大带宽" - }, + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, { - "name": "llccBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpu-cpu-llcc-bw/min_freq", - "type": "string", - "enable": true, - "note": "LLCC最小带宽" - }, + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, { - "name": "ddrBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpu-llcc-ddr-bw/max_freq", - "type": "string", - "enable": true, - "note": "DDR最大带宽" - }, + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, { - "name": "ddrBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpu-llcc-ddr-bw/min_freq", - "type": "string", - "enable": true, - "note": "DDR最小带宽" - }, + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, { - "name": "l3LatBig", - "path": "/sys/class/devfreq/18321000.qcom,devfreq-l3:qcom,cpu6-cpu-l3-lat/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核L3延迟控制,在L3命中率降低时,值越大越容易提升L3频率" - }, + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, { - "name": "ddrLatBig", - "path": "/sys/class/devfreq/soc:qcom,cpu6-llcc-ddr-lat/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核DDR延迟控制,在DDR命中率降低时,值越大越容易提升DDR频率" - }, + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "cpuFreqMax": "16,20,24", - "cpuFreqMin": "1,6,6", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "16265", - "llccBwMin": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "17,20,24", - "cpuFreqMin": "7,10,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "16265", - "llccBwMin": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "17,16,21", - "cpuFreqMin": "11,10,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "llccBwMax": "16265", - "llccBwMin": "8945", - "ddrBwMax": "7980", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "17,18,21", - "cpuFreqMin": "11,10,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "llccBwMax": "16265", - "llccBwMin": "8945", - "ddrBwMax": "7980", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,20,24", - "cpuFreqMin": "11,14,15", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "llccBwMax": "16265", - "llccBwMin": "8945", - "ddrBwMax": "7980", - "ddrBwMin": "2408", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "17,20,21", - "cpuFreqMin": "11,20,10", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "18,20,24", - "cpuFreqMin": "11,18,24", - "topBoost": "0", - "heavyBoost": "10", - "llccBwMax": "16265", - "llccBwMin": "16265", - "ddrBwMax": "7980", - "ddrBwMin": "7980", - "uxAffinity": "2" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "cpuFreqMax": "14,14,16", - "cpuFreqMin": "1,6,6", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "14638", - "llccBwMin": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "16,12,14", - "cpuFreqMin": "7,6,6", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "14638", - "llccBwMin": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "16,10,12", - "cpuFreqMin": "7,6,7", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "llccBwMax": "16265", - "llccBwMin": "8945", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "18,14,16", - "cpuFreqMin": "7,6,7", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "llccBwMax": "16265", - "llccBwMin": "8945", - "ddrBwMax": "7980", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,16,18", - "cpuFreqMin": "7,8,9", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "llccBwMax": "16265", - "llccBwMin": "8945", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "16,16,12", - "cpuFreqMin": "7,16,7", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "18,20,23", - "cpuFreqMin": "7,16,18", - "topBoost": "0", - "heavyBoost": "1", - "llccBwMax": "16265", - "llccBwMin": "14638", - "ddrBwMax": "7980", - "ddrBwMin": "4816", - "uxAffinity": "2" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "18,22,24", - "cpuFreqMin": "5,6,6", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "16265", - "llccBwMin": "0", - "ddrBwMax": "7980", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "18,22,24", - "cpuFreqMin": "9,10,12", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "16265", - "llccBwMin": "0", - "ddrBwMax": "7980", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "18,22,24", - "cpuFreqMin": "9,14,16", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "16265", - "llccBwMin": "14638", - "ddrBwMax": "7980", - "ddrBwMin": "4816", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "18,20,23", - "cpuFreqMin": "9,20,23", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "16265", - "llccBwMin": "14638", - "ddrBwMax": "7980", - "ddrBwMin": "4816", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,22,24", - "cpuFreqMin": "18,20,23", - "schedBoost": "1", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "16265", - "llccBwMin": "16265", - "ddrBwMax": "7980", - "ddrBwMin": "7980", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "18,22,24", - "cpuFreqMin": "9,22,23", - "uxAffinity": "3" - }, - "sfBoost": { - "cpuFreqMax": "18,22,24", - "cpuFreqMin": "9,22,24", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "16265", - "llccBwMin": "16265", - "ddrBwMax": "7980", - "ddrBwMin": "7980", - "uxAffinity": "3" - } + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" } + ] } - ] + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.3, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } } \ No newline at end of file diff --git a/magisk/config/sdm768.json b/magisk/config/sdm768.json deleted file mode 100644 index bc22f52..0000000 --- a/magisk/config/sdm768.json +++ /dev/null @@ -1,578 +0,0 @@ -{ - "meta": { - "name": "sdm768g[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1420, - "idleLoad": 950, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ - { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, - { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, - { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, - { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, - { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, - { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, - { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, - { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, - { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, - { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, - { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" - } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 6, - 7 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 115, - 115, - 115, - 115, - 115, - 115, - 250, - 250 - ], - "knobs": [ - { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, - { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, - { - "name": "schedBoost", - "path": "/proc/sys/kernel/sched_boost", - "type": "string", - "enable": true, - "note": "异构调度器全局任务放置boost,不考虑能耗代价" - }, - { - "name": "topBoost", - "path": "/dev/stune/top-app/schedtune.boost", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, - { - "name": "heavyBoost", - "path": "/dev/stune/rt/schedtune.boost", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, - { - "name": "llccBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpu-cpu-llcc-bw/max_freq", - "type": "string", - "enable": true, - "note": "LLCC最大带宽" - }, - { - "name": "llccBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpu-cpu-llcc-bw/min_freq", - "type": "string", - "enable": true, - "note": "LLCC最小带宽" - }, - { - "name": "ddrBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpu-llcc-ddr-bw/max_freq", - "type": "string", - "enable": true, - "note": "DDR最大带宽" - }, - { - "name": "ddrBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpu-llcc-ddr-bw/min_freq", - "type": "string", - "enable": true, - "note": "DDR最小带宽" - }, - { - "name": "l3LatBig", - "path": "/sys/class/devfreq/18321000.qcom,devfreq-l3:qcom,cpu6-cpu-l3-lat/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核L3延迟控制,在L3命中率降低时,值越大越容易提升L3频率" - }, - { - "name": "ddrLatBig", - "path": "/sys/class/devfreq/soc:qcom,cpu6-llcc-ddr-lat/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核DDR延迟控制,在DDR命中率降低时,值越大越容易提升DDR频率" - }, - { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, - { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "cpuFreqMax": "16,20,25", - "cpuFreqMin": "1,6,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "16265", - "llccBwMin": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "17,20,25", - "cpuFreqMin": "7,10,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "16265", - "llccBwMin": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "17,16,21", - "cpuFreqMin": "11,10,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "llccBwMax": "16265", - "llccBwMin": "8945", - "ddrBwMax": "7980", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "17,18,21", - "cpuFreqMin": "11,10,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "llccBwMax": "16265", - "llccBwMin": "8945", - "ddrBwMax": "7980", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,20,25", - "cpuFreqMin": "11,14,15", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "llccBwMax": "16265", - "llccBwMin": "8945", - "ddrBwMax": "7980", - "ddrBwMin": "2408", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "17,20,21", - "cpuFreqMin": "11,20,10", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "18,20,28", - "cpuFreqMin": "11,18,25", - "topBoost": "0", - "heavyBoost": "10", - "llccBwMax": "16265", - "llccBwMin": "16265", - "ddrBwMax": "7980", - "ddrBwMin": "7980", - "uxAffinity": "2" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "cpuFreqMax": "14,14,16", - "cpuFreqMin": "1,6,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "14638", - "llccBwMin": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "16,12,14", - "cpuFreqMin": "7,6,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "14638", - "llccBwMin": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "16,10,12", - "cpuFreqMin": "7,6,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "llccBwMax": "16265", - "llccBwMin": "8945", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "18,14,16", - "cpuFreqMin": "7,6,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "llccBwMax": "16265", - "llccBwMin": "8945", - "ddrBwMax": "7980", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,16,18", - "cpuFreqMin": "7,8,9", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "llccBwMax": "16265", - "llccBwMin": "8945", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "16,16,12", - "cpuFreqMin": "7,16,8", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "18,20,23", - "cpuFreqMin": "7,16,18", - "topBoost": "0", - "heavyBoost": "1", - "llccBwMax": "16265", - "llccBwMin": "14638", - "ddrBwMax": "7980", - "ddrBwMin": "4816", - "uxAffinity": "2" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "18,24,28", - "cpuFreqMin": "6,6,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "16265", - "llccBwMin": "0", - "ddrBwMax": "7980", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "18,24,28", - "cpuFreqMin": "9,10,12", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "16265", - "llccBwMin": "0", - "ddrBwMax": "7980", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "18,22,25", - "cpuFreqMin": "9,14,16", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "16265", - "llccBwMin": "14638", - "ddrBwMax": "7980", - "ddrBwMin": "4816", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "18,20,23", - "cpuFreqMin": "9,20,23", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "16265", - "llccBwMin": "14638", - "ddrBwMax": "7980", - "ddrBwMin": "4816", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,24,28", - "cpuFreqMin": "18,20,23", - "schedBoost": "1", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "16265", - "llccBwMin": "16265", - "ddrBwMax": "7980", - "ddrBwMin": "7980", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "18,24,28", - "cpuFreqMin": "9,24,23", - "uxAffinity": "3" - }, - "sfBoost": { - "cpuFreqMax": "18,24,28", - "cpuFreqMin": "9,24,28", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "16265", - "llccBwMin": "16265", - "ddrBwMax": "7980", - "ddrBwMin": "7980", - "uxAffinity": "3" - } - } - } - ] -} \ No newline at end of file diff --git a/magisk/config/sdm775.json b/magisk/config/sdm775.json deleted file mode 100644 index 41cbb51..0000000 --- a/magisk/config/sdm775.json +++ /dev/null @@ -1,578 +0,0 @@ -{ - "meta": { - "name": "sdm775[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1600, - "idleLoad": 1200, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ - { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, - { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, - { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, - { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, - { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, - { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, - { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, - { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, - { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, - { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, - { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" - } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4, - 7 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 115, - 115, - 115, - 115, - 320, - 320, - 320, - 320 - ], - "knobs": [ - { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, - { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, - { - "name": "schedBoost", - "path": "/proc/sys/kernel/sched_boost", - "type": "string", - "enable": true, - "note": "异构调度器全局任务放置boost,不考虑能耗代价" - }, - { - "name": "topBoost", - "path": "/dev/cpuctl/top-app/cpu.uclamp.min", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, - { - "name": "heavyBoost", - "path": "/dev/cpuctl/rt/cpu.uclamp.min", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, - { - "name": "llccBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpu-cpu-llcc-bw/max_freq", - "type": "string", - "enable": true, - "note": "LLCC最大带宽" - }, - { - "name": "llccBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpu-cpu-llcc-bw/min_freq", - "type": "string", - "enable": true, - "note": "LLCC最小带宽" - }, - { - "name": "ddrBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpu-llcc-ddr-bw/max_freq", - "type": "string", - "enable": true, - "note": "DDR最大带宽" - }, - { - "name": "ddrBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpu-llcc-ddr-bw/min_freq", - "type": "string", - "enable": true, - "note": "DDR最小带宽" - }, - { - "name": "l3LatBig", - "path": "/sys/class/devfreq/18590100.qcom,cpu4-cpu-l3-lat/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核L3延迟控制,在L3命中率降低时,值越大越容易提升L3频率" - }, - { - "name": "ddrLatBig", - "path": "/sys/class/devfreq/soc:qcom,cpu4-llcc-ddr-lat/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核DDR延迟控制,在DDR命中率降低时,值越大越容易提升DDR频率" - }, - { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, - { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "cpuFreqMax": "16,19,26", - "cpuFreqMin": "1,7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "17,19,26", - "cpuFreqMin": "7,10,11", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "17,15,22", - "cpuFreqMin": "11,10,11", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "40", - "llccBwMax": "15258", - "llccBwMin": "8391", - "ddrBwMax": "12191", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "17,17,22", - "cpuFreqMin": "11,10,11", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "40", - "llccBwMax": "15258", - "llccBwMin": "8391", - "ddrBwMax": "12191", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,19,26", - "cpuFreqMin": "11,13,16", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "40", - "llccBwMax": "15258", - "llccBwMin": "8391", - "ddrBwMax": "12191", - "ddrBwMin": "2408", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "17,19,22", - "cpuFreqMin": "11,19,11", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "18,19,28", - "cpuFreqMin": "11,17,26", - "topBoost": "0", - "heavyBoost": "40", - "llccBwMax": "15258", - "llccBwMin": "15258", - "ddrBwMax": "12191", - "ddrBwMin": "12191", - "uxAffinity": "2" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "cpuFreqMax": "14,13,17", - "cpuFreqMin": "1,7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "13732", - "llccBwMin": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "16,11,14", - "cpuFreqMin": "7,7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "13732", - "llccBwMin": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "16,10,12", - "cpuFreqMin": "7,7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "30", - "llccBwMax": "15258", - "llccBwMin": "8391", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "18,13,17", - "cpuFreqMin": "7,7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "30", - "llccBwMax": "15258", - "llccBwMin": "8391", - "ddrBwMax": "12191", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,15,19", - "cpuFreqMin": "7,8,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "30", - "llccBwMax": "15258", - "llccBwMin": "8391", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "16,15,12", - "cpuFreqMin": "7,15,8", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "18,19,24", - "cpuFreqMin": "7,15,19", - "topBoost": "0", - "heavyBoost": "30", - "llccBwMax": "15258", - "llccBwMin": "13732", - "ddrBwMax": "12191", - "ddrBwMin": "4816", - "uxAffinity": "2" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "18,24,28", - "cpuFreqMin": "6,7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "0", - "ddrBwMax": "12191", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "18,24,28", - "cpuFreqMin": "9,10,12", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "0", - "ddrBwMax": "12191", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "18,21,26", - "cpuFreqMin": "9,13,17", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "13732", - "ddrBwMax": "12191", - "ddrBwMin": "4816", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "18,19,24", - "cpuFreqMin": "9,19,24", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "13732", - "ddrBwMax": "12191", - "ddrBwMin": "4816", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,24,28", - "cpuFreqMin": "18,19,24", - "schedBoost": "1", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "15258", - "ddrBwMax": "12191", - "ddrBwMin": "12191", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "18,24,28", - "cpuFreqMin": "9,24,24", - "uxAffinity": "3" - }, - "sfBoost": { - "cpuFreqMax": "18,24,28", - "cpuFreqMin": "9,24,28", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "15258", - "ddrBwMax": "12191", - "ddrBwMin": "12191", - "uxAffinity": "3" - } - } - } - ] -} \ No newline at end of file diff --git a/magisk/config/sdm778.json b/magisk/config/sdm778.json new file mode 100644 index 0000000..05a25e5 --- /dev/null +++ b/magisk/config/sdm778.json @@ -0,0 +1,585 @@ +{ + "meta": { + "name": "sdm778g/sdm778g+[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 115, + "nr": 4, + "typicalPower": 0.36, + "typicalFreq": 1.9, + "sweetFreq": 1.4, + "plainFreq": 1.0, + "freeFreq": 0.6 + }, + { + "efficiency": 320, + "nr": 3, + "typicalPower": 1.6, + "typicalFreq": 2.4, + "sweetFreq": 1.7, + "plainFreq": 1.0, + "freeFreq": 0.7 + }, + { + "efficiency": 320, + "nr": 1, + "typicalPower": 1.6, + "typicalFreq": 2.4, + "sweetFreq": 2.1, + "plainFreq": 1.4, + "freeFreq": 0.8 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3 + ], + "c1": [ + 4, + 5, + 6 + ], + "c2": [ + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, + { + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, + { + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, + { + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, + { + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ + { + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ + { + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ + { + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, + { + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, + { + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, + { + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" + } + ] + } + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.3, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } +} \ No newline at end of file diff --git a/magisk/config/sdm780.json b/magisk/config/sdm780.json index a3733c0..7dcb3ae 100644 --- a/magisk/config/sdm780.json +++ b/magisk/config/sdm780.json @@ -1,578 +1,585 @@ { - "meta": { - "name": "sdm780[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1600, - "idleLoad": 1200, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ + "meta": { + "name": "sdm780g[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 115, + "nr": 4, + "typicalPower": 0.36, + "typicalFreq": 1.9, + "sweetFreq": 1.4, + "plainFreq": 1.0, + "freeFreq": 0.6 + }, + { + "efficiency": 320, + "nr": 3, + "typicalPower": 1.6, + "typicalFreq": 2.2, + "sweetFreq": 1.6, + "plainFreq": 1.0, + "freeFreq": 0.7 + }, + { + "efficiency": 320, + "nr": 1, + "typicalPower": 1.89, + "typicalFreq": 2.4, + "sweetFreq": 1.9, + "plainFreq": 1.4, + "freeFreq": 0.8 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3 + ], + "c1": [ + 4, + 5, + 6 + ], + "c2": [ + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4, - 7 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 115, - 115, - 115, - 115, - 320, - 320, - 320, - 320 - ], - "knobs": [ + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ { - "name": "schedBoost", - "path": "/proc/sys/kernel/sched_boost", - "type": "string", - "enable": true, - "note": "异构调度器全局任务放置boost,不考虑能耗代价" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ { - "name": "topBoost", - "path": "/dev/cpuctl/top-app/cpu.uclamp.min", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ { - "name": "heavyBoost", - "path": "/dev/cpuctl/rt/cpu.uclamp.min", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ { - "name": "llccBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpu-cpu-llcc-bw/max_freq", - "type": "string", - "enable": true, - "note": "LLCC最大带宽" - }, + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, { - "name": "llccBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpu-cpu-llcc-bw/min_freq", - "type": "string", - "enable": true, - "note": "LLCC最小带宽" - }, + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, { - "name": "ddrBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpu-llcc-ddr-bw/max_freq", - "type": "string", - "enable": true, - "note": "DDR最大带宽" - }, + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, { - "name": "ddrBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpu-llcc-ddr-bw/min_freq", - "type": "string", - "enable": true, - "note": "DDR最小带宽" - }, + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, { - "name": "l3LatBig", - "path": "/sys/class/devfreq/18590100.qcom,cpu4-cpu-l3-lat/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核L3延迟控制,在L3命中率降低时,值越大越容易提升L3频率" - }, + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, { - "name": "ddrLatBig", - "path": "/sys/class/devfreq/soc:qcom,cpu4-llcc-ddr-lat/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核DDR延迟控制,在DDR命中率降低时,值越大越容易提升DDR频率" - }, + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "cpuFreqMax": "16,19,24", - "cpuFreqMin": "1,7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "17,19,24", - "cpuFreqMin": "7,10,11", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "17,15,22", - "cpuFreqMin": "11,10,11", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "40", - "llccBwMax": "15258", - "llccBwMin": "8391", - "ddrBwMax": "12191", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "17,17,22", - "cpuFreqMin": "11,10,11", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "40", - "llccBwMax": "15258", - "llccBwMin": "8391", - "ddrBwMax": "12191", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "19,19,24", - "cpuFreqMin": "11,13,16", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "40", - "llccBwMax": "15258", - "llccBwMin": "8391", - "ddrBwMax": "12191", - "ddrBwMin": "2408", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "17,19,22", - "cpuFreqMin": "11,19,11", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "19,19,24", - "cpuFreqMin": "11,17,24", - "topBoost": "0", - "heavyBoost": "40", - "llccBwMax": "15258", - "llccBwMin": "15258", - "ddrBwMax": "12191", - "ddrBwMin": "12191", - "uxAffinity": "2" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "cpuFreqMax": "14,13,17", - "cpuFreqMin": "1,7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "13732", - "llccBwMin": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "16,11,14", - "cpuFreqMin": "7,7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "13732", - "llccBwMin": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "16,10,12", - "cpuFreqMin": "7,7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "30", - "llccBwMax": "15258", - "llccBwMin": "8391", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "18,13,17", - "cpuFreqMin": "7,7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "30", - "llccBwMax": "15258", - "llccBwMin": "8391", - "ddrBwMax": "12191", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "19,15,19", - "cpuFreqMin": "7,8,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "30", - "llccBwMax": "15258", - "llccBwMin": "8391", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "16,15,12", - "cpuFreqMin": "7,15,8", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "19,19,24", - "cpuFreqMin": "7,15,19", - "topBoost": "0", - "heavyBoost": "30", - "llccBwMax": "15258", - "llccBwMin": "13732", - "ddrBwMax": "12191", - "ddrBwMin": "4816", - "uxAffinity": "2" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "19,22,24", - "cpuFreqMin": "6,7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "0", - "ddrBwMax": "12191", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "19,22,24", - "cpuFreqMin": "9,10,12", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "0", - "ddrBwMax": "12191", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "18,21,24", - "cpuFreqMin": "9,13,17", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "13732", - "ddrBwMax": "12191", - "ddrBwMin": "4816", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "18,19,24", - "cpuFreqMin": "9,19,24", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "13732", - "ddrBwMax": "12191", - "ddrBwMin": "4816", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "19,22,24", - "cpuFreqMin": "18,19,24", - "schedBoost": "1", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "15258", - "ddrBwMax": "12191", - "ddrBwMin": "12191", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "19,22,24", - "cpuFreqMin": "9,22,24", - "uxAffinity": "3" - }, - "sfBoost": { - "cpuFreqMax": "19,22,24", - "cpuFreqMin": "9,22,24", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "15258", - "ddrBwMax": "12191", - "ddrBwMin": "12191", - "uxAffinity": "3" - } + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" } + ] } - ] + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.3, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } } \ No newline at end of file diff --git a/magisk/config/sdm820.json b/magisk/config/sdm820.json new file mode 100644 index 0000000..3d4bb32 --- /dev/null +++ b/magisk/config/sdm820.json @@ -0,0 +1,570 @@ +{ + "meta": { + "name": "sdm820/sdm821[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 160, + "nr": 2, + "typicalPower": 1.1, + "typicalFreq": 1.6, + "sweetFreq": 1.1, + "plainFreq": 0.8, + "freeFreq": 0.5 + }, + { + "efficiency": 160, + "nr": 2, + "typicalPower": 1.89, + "typicalFreq": 2.1, + "sweetFreq": 1.4, + "plainFreq": 1.0, + "freeFreq": 0.6 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3 + ], + "c0": [ + 0, + 1 + ], + "c1": [ + 2, + 3 + ], + "c2": [ + 2, + 3 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, + { + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, + { + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, + { + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, + { + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ + { + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ + { + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ + { + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, + { + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, + { + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, + { + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" + } + ] + } + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.3, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } +} \ No newline at end of file diff --git a/magisk/config/sdm820_hmp.json b/magisk/config/sdm820_hmp.json deleted file mode 100644 index 444d483..0000000 --- a/magisk/config/sdm820_hmp.json +++ /dev/null @@ -1,581 +0,0 @@ -{ - "meta": { - "name": "sdm820-hmp[21.07.25]", - "author": "yc@coolapk(powered by wipe-v2)", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 740, - "idleLoad": 490, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ - { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, - { - "hint": "Active", - "action": "normal", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, - { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, - { - "hint": "Pressed", - "action": "interaction", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, - { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, - { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, - { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, - { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, - { - "hint": "SfBoost", - "action": "sfLag", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, - { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, - { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" - } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 2 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 150, - 150, - 160, - 160 - ], - "knobs": [ - { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, - { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, - { - "name": "littleHidelay", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay", - "type": "string", - "enable": true, - "note": "小核的above_hispeed_delay" - }, - { - "name": "littleHifreq", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq", - "type": "string", - "enable": true, - "note": "小核的hispeed_freq" - }, - { - "name": "littleHiload", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load", - "type": "string", - "enable": true, - "note": "小核的go_hispeed_load" - }, - { - "name": "littleTgload", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads", - "type": "string", - "enable": true, - "note": "小核的target_loads" - }, - { - "name": "littleMinSample", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time", - "type": "string", - "enable": true, - "note": "小核的min_sample_time" - }, - { - "name": "littleHyst", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis", - "type": "string", - "enable": true, - "note": "小核的max_freq_hysteresis" - }, - { - "name": "bigHidelay", - "path": "/sys/devices/system/cpu/cpu2/cpufreq/interactive/above_hispeed_delay", - "type": "string", - "enable": true, - "note": "大核的above_hispeed_delay" - }, - { - "name": "bigHifreq", - "path": "/sys/devices/system/cpu/cpu2/cpufreq/interactive/hispeed_freq", - "type": "string", - "enable": true, - "note": "大核的hispeed_freq" - }, - { - "name": "bigHiload", - "path": "/sys/devices/system/cpu/cpu2/cpufreq/interactive/go_hispeed_load", - "type": "string", - "enable": true, - "note": "大核的go_hispeed_load" - }, - { - "name": "bigTgload", - "path": "/sys/devices/system/cpu/cpu2/cpufreq/interactive/target_loads", - "type": "string", - "enable": true, - "note": "大核的target_loads" - }, - { - "name": "bigMinSample", - "path": "/sys/devices/system/cpu/cpu2/cpufreq/interactive/min_sample_time", - "type": "string", - "enable": true, - "note": "大核的min_sample_time" - }, - { - "name": "bigHyst", - "path": "/sys/devices/system/cpu/cpu2/cpufreq/interactive/max_freq_hysteresis", - "type": "string", - "enable": true, - "note": "大核的max_freq_hysteresis" - }, - { - "name": "downmigrate", - "path": "/proc/sys/kernel/sched_downmigrate", - "type": "string", - "enable": true, - "note": "如果任务负载占小核容量的百分比小于此阈值,迁移到小核" - }, - { - "name": "upmigrate", - "path": "/proc/sys/kernel/sched_upmigrate", - "type": "string", - "enable": true, - "note": "如果任务负载占小核容量的百分比大于此阈值,迁移到大核" - }, - { - "name": "downmigrate2", - "path": "/proc/sys/kernel/sched_downmigrate", - "type": "string", - "enable": true, - "note": "如果任务负载占小核容量的百分比小于此阈值,迁移到小核,解决down>up的情况" - }, - { - "name": "ddrBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpubw/max_freq", - "type": "string", - "enable": true, - "note": "DDR最大带宽" - }, - { - "name": "ddrBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpubw/min_freq", - "type": "string", - "enable": true, - "note": "DDR最小带宽" - }, - { - "name": "ddrLatBig", - "path": "/sys/class/devfreq/soc:qcom,memlat-cpu2/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核DDR延迟控制,在DDR命中率降低时,值越大越容易提升DDR频率" - }, - { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电(相对卡顿百分比 49.8% 相对续航 109.5%)", - "actions": { - "normal": { - "cpuFreqMax": "16,22", - "cpuFreqMin": "3,3", - "littleHidelay": "38000 1113000:58000 1190000:38000 1324000:58000 1478000:38000", - "littleHifreq": "960000", - "littleHiload": "94", - "littleTgload": "70 422000:37 480000:29 556000:50 652000:66 729000:75 844000:77 1036000:34 1113000:53 1190000:69 1228000:50 1324000:71 1401000:69 1478000:21 1593000:61", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "78000 729000:38000 806000:18000 883000:38000 1036000:18000 1324000:38000 1632000:58000 1785000:38000 1824000:78000 1920000:38000 1996000:58000", - "bigHifreq": "652000", - "bigHiload": "32", - "bigTgload": "81 403000:19 556000:47 652000:59 729000:41 806000:54 883000:69 940000:60 1036000:66 1113000:90 1190000:83 1248000:79 1324000:78 1401000:74 1478000:18 1555000:16 1632000:36 1708000:67 1785000:98 1824000:99 1996000:57 2073000:99", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "45", - "upmigrate": "45", - "downmigrate2": "45", - "ddrBwMax": "12000", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "1" - }, - "interaction": { - "cpuFreqMax": "14,18", - "cpuFreqMin": "3,4", - "littleHidelay": "38000 1113000:58000 1190000:38000 1324000:58000 1478000:38000", - "littleHifreq": "960000", - "littleHiload": "94", - "littleTgload": "70 422000:37 480000:29 556000:50 652000:66 729000:75 844000:77 1036000:34 1113000:53 1190000:69 1228000:50 1324000:71 1401000:69 1478000:21 1593000:61", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "78000 729000:38000 806000:18000 883000:38000 1036000:18000 1324000:38000 1632000:58000 1785000:38000 1824000:78000 1920000:38000 1996000:58000", - "bigHifreq": "652000", - "bigHiload": "32", - "bigTgload": "81 403000:19 556000:47 652000:59 729000:41 806000:54 883000:69 940000:60 1036000:66 1113000:90 1190000:83 1248000:79 1324000:78 1401000:74 1478000:18 1555000:16 1632000:36 1708000:67 1785000:98 1824000:99 1996000:57 2073000:99", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "32", - "upmigrate": "55", - "downmigrate2": "32", - "ddrBwMax": "12000", - "ddrBwMin": "5000", - "ddrLatBig": "800", - "uxAffinity": "1" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "ddrBwMax": "14000", - "ddrBwMin": "11000", - "ddrLatBig": "800", - "uxAffinity": "1" - }, - "sfLag": { - "cpuFreqMax": "16,21", - "cpuFreqMin": "15,20", - "ddrBwMin": "11000", - "uxAffinity": "1" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗(相对卡顿百分比 99.7% 相对续航 136.6%)", - "actions": { - "normal": { - "cpuFreqMax": "16,22", - "cpuFreqMin": "3,3", - "littleHidelay": "38000 1113000:18000 1190000:38000 1228000:58000 1324000:38000", - "littleHifreq": "960000", - "littleHiload": "97", - "littleTgload": "86 422000:23 480000:52 556000:65 652000:74 729000:73 844000:95 960000:77 1036000:96 1113000:56 1190000:4 1228000:38 1324000:65 1401000:42 1478000:48 1593000:80", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "58000 729000:38000 883000:58000 940000:38000 1113000:58000 1190000:18000 1248000:58000 1324000:38000 1478000:18000 1555000:38000 1708000:58000 1785000:38000 1824000:78000 1920000:18000 1996000:38000 2073000:58000", - "bigHifreq": "556000", - "bigHiload": "50", - "bigTgload": "70 403000:28 480000:61 556000:3 652000:39 729000:23 806000:54 883000:59 940000:19 1036000:12 1113000:49 1190000:89 1248000:92 1324000:83 1401000:61 1478000:76 1555000:71 1632000:9 1708000:61 1785000:69 1824000:83 1920000:62 1996000:42 2073000:88", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "45", - "upmigrate": "45", - "downmigrate2": "45", - "ddrBwMax": "12000", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "1" - }, - "interaction": { - "cpuFreqMax": "15,18", - "cpuFreqMin": "3,3", - "littleHidelay": "38000 1113000:18000 1190000:38000 1228000:58000 1324000:38000", - "littleHifreq": "960000", - "littleHiload": "97", - "littleTgload": "86 422000:23 480000:52 556000:65 652000:74 729000:73 844000:95 960000:77 1036000:96 1113000:56 1190000:4 1228000:38 1324000:65 1401000:42 1478000:48 1593000:80", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "58000 729000:38000 883000:58000 940000:38000 1113000:58000 1190000:18000 1248000:58000 1324000:38000 1478000:18000 1555000:38000 1708000:58000 1785000:38000 1824000:78000 1920000:18000 1996000:38000 2073000:58000", - "bigHifreq": "556000", - "bigHiload": "50", - "bigTgload": "70 403000:28 480000:61 556000:3 652000:39 729000:23 806000:54 883000:59 940000:19 1036000:12 1113000:49 1190000:89 1248000:92 1324000:83 1401000:61 1478000:76 1555000:71 1632000:9 1708000:61 1785000:69 1824000:83 1920000:62 1996000:42 2073000:88", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "44", - "upmigrate": "60", - "downmigrate2": "44", - "ddrBwMax": "12000", - "ddrBwMin": "5000", - "ddrLatBig": "400", - "uxAffinity": "1" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "ddrBwMax": "12000", - "ddrBwMin": "5000", - "ddrLatBig": "800", - "uxAffinity": "1" - }, - "sfLag": { - "cpuFreqMax": "15,18", - "cpuFreqMin": "11,15", - "ddrBwMin": "5000", - "uxAffinity": "1" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "16,22", - "cpuFreqMin": "3,3", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "ddrBwMax": "12000", - "ddrBwMin": "5000", - "ddrLatBig": "400", - "uxAffinity": "1" - }, - "interaction": { - "cpuFreqMax": "16,21", - "cpuFreqMin": "15,20", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "ddrBwMax": "14000", - "ddrBwMin": "11000", - "ddrLatBig": "800", - "uxAffinity": "1" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "ddrBwMax": "14000", - "ddrBwMin": "11000", - "ddrLatBig": "800", - "uxAffinity": "1" - }, - "sfLag": { - "cpuFreqMax": "22,24", - "cpuFreqMin": "21,23", - "ddrBwMin": "11000", - "uxAffinity": "1" - } - } - } - ] -} \ No newline at end of file diff --git a/magisk/config/sdm821_v1_hmp.json b/magisk/config/sdm821_v1_hmp.json deleted file mode 100644 index 7d62867..0000000 --- a/magisk/config/sdm821_v1_hmp.json +++ /dev/null @@ -1,581 +0,0 @@ -{ - "meta": { - "name": "sdm821-v1-hmp[21.07.25]", - "author": "yc@coolapk(powered by wipe-v2)", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 740, - "idleLoad": 490, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ - { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, - { - "hint": "Active", - "action": "normal", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, - { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, - { - "hint": "Pressed", - "action": "interaction", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, - { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, - { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, - { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, - { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, - { - "hint": "SfBoost", - "action": "sfLag", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, - { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, - { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" - } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 2 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 150, - 150, - 160, - 160 - ], - "knobs": [ - { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, - { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, - { - "name": "littleHidelay", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay", - "type": "string", - "enable": true, - "note": "小核的above_hispeed_delay" - }, - { - "name": "littleHifreq", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq", - "type": "string", - "enable": true, - "note": "小核的hispeed_freq" - }, - { - "name": "littleHiload", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load", - "type": "string", - "enable": true, - "note": "小核的go_hispeed_load" - }, - { - "name": "littleTgload", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads", - "type": "string", - "enable": true, - "note": "小核的target_loads" - }, - { - "name": "littleMinSample", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time", - "type": "string", - "enable": true, - "note": "小核的min_sample_time" - }, - { - "name": "littleHyst", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis", - "type": "string", - "enable": true, - "note": "小核的max_freq_hysteresis" - }, - { - "name": "bigHidelay", - "path": "/sys/devices/system/cpu/cpu2/cpufreq/interactive/above_hispeed_delay", - "type": "string", - "enable": true, - "note": "大核的above_hispeed_delay" - }, - { - "name": "bigHifreq", - "path": "/sys/devices/system/cpu/cpu2/cpufreq/interactive/hispeed_freq", - "type": "string", - "enable": true, - "note": "大核的hispeed_freq" - }, - { - "name": "bigHiload", - "path": "/sys/devices/system/cpu/cpu2/cpufreq/interactive/go_hispeed_load", - "type": "string", - "enable": true, - "note": "大核的go_hispeed_load" - }, - { - "name": "bigTgload", - "path": "/sys/devices/system/cpu/cpu2/cpufreq/interactive/target_loads", - "type": "string", - "enable": true, - "note": "大核的target_loads" - }, - { - "name": "bigMinSample", - "path": "/sys/devices/system/cpu/cpu2/cpufreq/interactive/min_sample_time", - "type": "string", - "enable": true, - "note": "大核的min_sample_time" - }, - { - "name": "bigHyst", - "path": "/sys/devices/system/cpu/cpu2/cpufreq/interactive/max_freq_hysteresis", - "type": "string", - "enable": true, - "note": "大核的max_freq_hysteresis" - }, - { - "name": "downmigrate", - "path": "/proc/sys/kernel/sched_downmigrate", - "type": "string", - "enable": true, - "note": "如果任务负载占小核容量的百分比小于此阈值,迁移到小核" - }, - { - "name": "upmigrate", - "path": "/proc/sys/kernel/sched_upmigrate", - "type": "string", - "enable": true, - "note": "如果任务负载占小核容量的百分比大于此阈值,迁移到大核" - }, - { - "name": "downmigrate2", - "path": "/proc/sys/kernel/sched_downmigrate", - "type": "string", - "enable": true, - "note": "如果任务负载占小核容量的百分比小于此阈值,迁移到小核,解决down>up的情况" - }, - { - "name": "ddrBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpubw/max_freq", - "type": "string", - "enable": true, - "note": "DDR最大带宽" - }, - { - "name": "ddrBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpubw/min_freq", - "type": "string", - "enable": true, - "note": "DDR最小带宽" - }, - { - "name": "ddrLatBig", - "path": "/sys/class/devfreq/soc:qcom,memlat-cpu2/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核DDR延迟控制,在DDR命中率降低时,值越大越容易提升DDR频率" - }, - { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电(相对卡顿百分比 49.6% 相对续航 103.6%)", - "actions": { - "normal": { - "cpuFreqMax": "16,20", - "cpuFreqMin": "3,3", - "littleHidelay": "58000 1036000:78000 1113000:58000 1228000:78000 1324000:38000 1555000:58000", - "littleHifreq": "960000", - "littleHiload": "99", - "littleTgload": "64 403000:36 480000:50 556000:20 652000:97 729000:85 806000:83 844000:70 960000:73 1036000:77 1113000:37 1228000:42 1248000:77 1324000:90 1401000:52 1593000:69", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "78000 729000:38000 806000:58000 883000:38000 960000:78000 1036000:38000 1113000:18000 1228000:78000 1324000:58000 1401000:78000 1555000:38000 1593000:58000 1632000:78000 1920000:58000", - "bigHifreq": "652000", - "bigHiload": "11", - "bigTgload": "19 403000:41 480000:58 556000:47 652000:55 729000:59 806000:29 844000:32 883000:22 960000:54 1036000:50 1113000:81 1228000:88 1248000:79 1324000:88 1401000:65 1555000:74 1593000:86 1632000:37 1708000:61 1824000:89", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "45", - "upmigrate": "45", - "downmigrate2": "45", - "ddrBwMax": "12000", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "1" - }, - "interaction": { - "cpuFreqMax": "15,18", - "cpuFreqMin": "3,4", - "littleHidelay": "58000 1036000:78000 1113000:58000 1228000:78000 1324000:38000 1555000:58000", - "littleHifreq": "960000", - "littleHiload": "99", - "littleTgload": "64 403000:36 480000:50 556000:20 652000:97 729000:85 806000:83 844000:70 960000:73 1036000:77 1113000:37 1228000:42 1248000:77 1324000:90 1401000:52 1593000:69", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "78000 729000:38000 806000:58000 883000:38000 960000:78000 1036000:38000 1113000:18000 1228000:78000 1324000:58000 1401000:78000 1555000:38000 1593000:58000 1632000:78000 1920000:58000", - "bigHifreq": "652000", - "bigHiload": "11", - "bigTgload": "19 403000:41 480000:58 556000:47 652000:55 729000:59 806000:29 844000:32 883000:22 960000:54 1036000:50 1113000:81 1228000:88 1248000:79 1324000:88 1401000:65 1555000:74 1593000:86 1632000:37 1708000:61 1824000:89", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "31", - "upmigrate": "55", - "downmigrate2": "31", - "ddrBwMax": "12000", - "ddrBwMin": "5000", - "ddrLatBig": "800", - "uxAffinity": "1" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "ddrBwMax": "14000", - "ddrBwMin": "11000", - "ddrLatBig": "800", - "uxAffinity": "1" - }, - "sfLag": { - "cpuFreqMax": "16,21", - "cpuFreqMin": "15,20", - "ddrBwMin": "11000", - "uxAffinity": "1" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗(相对卡顿百分比 99.9% 相对续航 129.4%)", - "actions": { - "normal": { - "cpuFreqMax": "16,20", - "cpuFreqMin": "3,3", - "littleHidelay": "18000 806000:38000 883000:18000 960000:38000 1036000:18000 1228000:78000 1248000:38000 1401000:18000 1555000:58000", - "littleHifreq": "729000", - "littleHiload": "77", - "littleTgload": "89 403000:35 480000:36 556000:43 652000:80 729000:73 806000:78 844000:80 883000:72 960000:64 1036000:72 1113000:84 1228000:60 1248000:75 1324000:50 1401000:56 1555000:58 1593000:77", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "18000 729000:38000 883000:58000 1036000:38000 1228000:58000 1324000:38000 1401000:58000 1555000:38000 1920000:78000", - "bigHifreq": "652000", - "bigHiload": "70", - "bigTgload": "63 403000:46 480000:59 556000:67 652000:56 729000:73 806000:38 844000:19 883000:25 960000:34 1036000:30 1113000:40 1228000:75 1248000:96 1324000:82 1401000:74 1555000:70 1593000:73 1632000:45 1708000:49 1824000:79 1920000:70 1996000:72", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "45", - "upmigrate": "45", - "downmigrate2": "45", - "ddrBwMax": "12000", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "1" - }, - "interaction": { - "cpuFreqMax": "14,18", - "cpuFreqMin": "4,4", - "littleHidelay": "18000 806000:38000 883000:18000 960000:38000 1036000:18000 1228000:78000 1248000:38000 1401000:18000 1555000:58000", - "littleHifreq": "729000", - "littleHiload": "77", - "littleTgload": "89 403000:35 480000:36 556000:43 652000:80 729000:73 806000:78 844000:80 883000:72 960000:64 1036000:72 1113000:84 1228000:60 1248000:75 1324000:50 1401000:56 1555000:58 1593000:77", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "18000 729000:38000 883000:58000 1036000:38000 1228000:58000 1324000:38000 1401000:58000 1555000:38000 1920000:78000", - "bigHifreq": "652000", - "bigHiload": "70", - "bigTgload": "63 403000:46 480000:59 556000:67 652000:56 729000:73 806000:38 844000:19 883000:25 960000:34 1036000:30 1113000:40 1228000:75 1248000:96 1324000:82 1401000:74 1555000:70 1593000:73 1632000:45 1708000:49 1824000:79 1920000:70 1996000:72", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "44", - "upmigrate": "44", - "downmigrate2": "44", - "ddrBwMax": "12000", - "ddrBwMin": "5000", - "ddrLatBig": "400", - "uxAffinity": "1" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "ddrBwMax": "12000", - "ddrBwMin": "5000", - "ddrLatBig": "800", - "uxAffinity": "1" - }, - "sfLag": { - "cpuFreqMax": "14,18", - "cpuFreqMin": "11,15", - "ddrBwMin": "5000", - "uxAffinity": "1" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "16,20", - "cpuFreqMin": "3,3", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "ddrBwMax": "12000", - "ddrBwMin": "5000", - "ddrLatBig": "400", - "uxAffinity": "1" - }, - "interaction": { - "cpuFreqMax": "16,21", - "cpuFreqMin": "15,20", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "ddrBwMax": "14000", - "ddrBwMin": "11000", - "ddrLatBig": "800", - "uxAffinity": "1" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "ddrBwMax": "14000", - "ddrBwMin": "11000", - "ddrLatBig": "800", - "uxAffinity": "1" - }, - "sfLag": { - "cpuFreqMax": "22,24", - "cpuFreqMin": "21,23", - "ddrBwMin": "11000", - "uxAffinity": "1" - } - } - } - ] -} \ No newline at end of file diff --git a/magisk/config/sdm821_v2_hmp.json b/magisk/config/sdm821_v2_hmp.json deleted file mode 100644 index 4627890..0000000 --- a/magisk/config/sdm821_v2_hmp.json +++ /dev/null @@ -1,581 +0,0 @@ -{ - "meta": { - "name": "sdm821-v2-hmp[21.07.25]", - "author": "yc@coolapk(powered by wipe-v2)", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 740, - "idleLoad": 490, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ - { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, - { - "hint": "Active", - "action": "normal", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, - { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, - { - "hint": "Pressed", - "action": "interaction", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, - { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, - { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, - { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, - { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, - { - "hint": "SfBoost", - "action": "sfLag", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, - { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, - { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" - } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 2 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 150, - 150, - 160, - 160 - ], - "knobs": [ - { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, - { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, - { - "name": "littleHidelay", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay", - "type": "string", - "enable": true, - "note": "小核的above_hispeed_delay" - }, - { - "name": "littleHifreq", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq", - "type": "string", - "enable": true, - "note": "小核的hispeed_freq" - }, - { - "name": "littleHiload", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load", - "type": "string", - "enable": true, - "note": "小核的go_hispeed_load" - }, - { - "name": "littleTgload", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads", - "type": "string", - "enable": true, - "note": "小核的target_loads" - }, - { - "name": "littleMinSample", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time", - "type": "string", - "enable": true, - "note": "小核的min_sample_time" - }, - { - "name": "littleHyst", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis", - "type": "string", - "enable": true, - "note": "小核的max_freq_hysteresis" - }, - { - "name": "bigHidelay", - "path": "/sys/devices/system/cpu/cpu2/cpufreq/interactive/above_hispeed_delay", - "type": "string", - "enable": true, - "note": "大核的above_hispeed_delay" - }, - { - "name": "bigHifreq", - "path": "/sys/devices/system/cpu/cpu2/cpufreq/interactive/hispeed_freq", - "type": "string", - "enable": true, - "note": "大核的hispeed_freq" - }, - { - "name": "bigHiload", - "path": "/sys/devices/system/cpu/cpu2/cpufreq/interactive/go_hispeed_load", - "type": "string", - "enable": true, - "note": "大核的go_hispeed_load" - }, - { - "name": "bigTgload", - "path": "/sys/devices/system/cpu/cpu2/cpufreq/interactive/target_loads", - "type": "string", - "enable": true, - "note": "大核的target_loads" - }, - { - "name": "bigMinSample", - "path": "/sys/devices/system/cpu/cpu2/cpufreq/interactive/min_sample_time", - "type": "string", - "enable": true, - "note": "大核的min_sample_time" - }, - { - "name": "bigHyst", - "path": "/sys/devices/system/cpu/cpu2/cpufreq/interactive/max_freq_hysteresis", - "type": "string", - "enable": true, - "note": "大核的max_freq_hysteresis" - }, - { - "name": "downmigrate", - "path": "/proc/sys/kernel/sched_downmigrate", - "type": "string", - "enable": true, - "note": "如果任务负载占小核容量的百分比小于此阈值,迁移到小核" - }, - { - "name": "upmigrate", - "path": "/proc/sys/kernel/sched_upmigrate", - "type": "string", - "enable": true, - "note": "如果任务负载占小核容量的百分比大于此阈值,迁移到大核" - }, - { - "name": "downmigrate2", - "path": "/proc/sys/kernel/sched_downmigrate", - "type": "string", - "enable": true, - "note": "如果任务负载占小核容量的百分比小于此阈值,迁移到小核,解决down>up的情况" - }, - { - "name": "ddrBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpubw/max_freq", - "type": "string", - "enable": true, - "note": "DDR最大带宽" - }, - { - "name": "ddrBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpubw/min_freq", - "type": "string", - "enable": true, - "note": "DDR最小带宽" - }, - { - "name": "ddrLatBig", - "path": "/sys/class/devfreq/soc:qcom,memlat-cpu2/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核DDR延迟控制,在DDR命中率降低时,值越大越容易提升DDR频率" - }, - { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电(相对卡顿百分比 49.8% 相对续航 109.2%)", - "actions": { - "normal": { - "cpuFreqMax": "16,22", - "cpuFreqMin": "3,3", - "littleHidelay": "58000 1132000:38000 1209000:58000 1286000:38000 1440000:58000 1516000:18000 1593000:38000", - "littleHifreq": "1056000", - "littleHiload": "95", - "littleTgload": "72 384000:30 460000:34 537000:53 614000:46 691000:68 768000:67 844000:78 902000:59 979000:91 1056000:86 1132000:53 1209000:85 1286000:26 1363000:35 1440000:91 1516000:67 1593000:53", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "78000 691000:38000 748000:58000 902000:78000 979000:18000 1209000:58000 1286000:18000 1363000:58000 1440000:38000 1593000:18000 1670000:58000 1824000:78000 1900000:38000 1977000:58000", - "bigHifreq": "614000", - "bigHiload": "28", - "bigTgload": "81 384000:47 460000:60 537000:68 614000:15 691000:58 748000:59 825000:51 902000:60 979000:74 1056000:79 1132000:94 1209000:77 1286000:89 1363000:71 1440000:60 1516000:44 1593000:33 1670000:20 1747000:76 1824000:68 1900000:62 1977000:94 2054000:97", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "45", - "upmigrate": "45", - "downmigrate2": "45", - "ddrBwMax": "12000", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "1" - }, - "interaction": { - "cpuFreqMax": "16,18", - "cpuFreqMin": "3,3", - "littleHidelay": "58000 1132000:38000 1209000:58000 1286000:38000 1440000:58000 1516000:18000 1593000:38000", - "littleHifreq": "1056000", - "littleHiload": "95", - "littleTgload": "72 384000:30 460000:34 537000:53 614000:46 691000:68 768000:67 844000:78 902000:59 979000:91 1056000:86 1132000:53 1209000:85 1286000:26 1363000:35 1440000:91 1516000:67 1593000:53", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "78000 691000:38000 748000:58000 902000:78000 979000:18000 1209000:58000 1286000:18000 1363000:58000 1440000:38000 1593000:18000 1670000:58000 1824000:78000 1900000:38000 1977000:58000", - "bigHifreq": "614000", - "bigHiload": "28", - "bigTgload": "81 384000:47 460000:60 537000:68 614000:15 691000:58 748000:59 825000:51 902000:60 979000:74 1056000:79 1132000:94 1209000:77 1286000:89 1363000:71 1440000:60 1516000:44 1593000:33 1670000:20 1747000:76 1824000:68 1900000:62 1977000:94 2054000:97", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "30", - "upmigrate": "66", - "downmigrate2": "30", - "ddrBwMax": "12000", - "ddrBwMin": "5000", - "ddrLatBig": "800", - "uxAffinity": "1" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "ddrBwMax": "14000", - "ddrBwMin": "11000", - "ddrLatBig": "800", - "uxAffinity": "1" - }, - "sfLag": { - "cpuFreqMax": "16,21", - "cpuFreqMin": "15,20", - "ddrBwMin": "11000", - "uxAffinity": "1" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗(相对卡顿百分比 100.0% 相对续航 134.5%)", - "actions": { - "normal": { - "cpuFreqMax": "16,22", - "cpuFreqMin": "3,3", - "littleHidelay": "18000 844000:58000 902000:78000 979000:18000 1056000:38000 1209000:58000 1363000:78000 1440000:58000 1593000:18000", - "littleHifreq": "768000", - "littleHiload": "62", - "littleTgload": "63 384000:52 460000:25 537000:46 614000:85 691000:75 768000:64 844000:54 902000:61 1056000:77 1132000:85 1209000:58 1363000:30 1440000:49 1516000:67 1593000:78", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "58000 902000:78000 979000:58000 1056000:18000 1209000:38000 1286000:58000 1440000:38000 1670000:58000 1747000:38000 1824000:58000", - "bigHifreq": "691000", - "bigHiload": "46", - "bigTgload": "59 384000:75 460000:31 537000:7 614000:18 691000:25 748000:45 825000:27 979000:64 1132000:92 1209000:71 1286000:63 1363000:69 1440000:71 1516000:85 1593000:41 1670000:15 1747000:56 1824000:63 1900000:88 1977000:34 2054000:86", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "45", - "upmigrate": "45", - "downmigrate2": "45", - "ddrBwMax": "12000", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "1" - }, - "interaction": { - "cpuFreqMax": "16,18", - "cpuFreqMin": "3,3", - "littleHidelay": "18000 844000:58000 902000:78000 979000:18000 1056000:38000 1209000:58000 1363000:78000 1440000:58000 1593000:18000", - "littleHifreq": "768000", - "littleHiload": "62", - "littleTgload": "63 384000:52 460000:25 537000:46 614000:85 691000:75 768000:64 844000:54 902000:61 1056000:77 1132000:85 1209000:58 1363000:30 1440000:49 1516000:67 1593000:78", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "58000 902000:78000 979000:58000 1056000:18000 1209000:38000 1286000:58000 1440000:38000 1670000:58000 1747000:38000 1824000:58000", - "bigHifreq": "691000", - "bigHiload": "46", - "bigTgload": "59 384000:75 460000:31 537000:7 614000:18 691000:25 748000:45 825000:27 979000:64 1132000:92 1209000:71 1286000:63 1363000:69 1440000:71 1516000:85 1593000:41 1670000:15 1747000:56 1824000:63 1900000:88 1977000:34 2054000:86", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "45", - "upmigrate": "46", - "downmigrate2": "45", - "ddrBwMax": "12000", - "ddrBwMin": "5000", - "ddrLatBig": "400", - "uxAffinity": "1" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "ddrBwMax": "12000", - "ddrBwMin": "5000", - "ddrLatBig": "800", - "uxAffinity": "1" - }, - "sfLag": { - "cpuFreqMax": "16,18", - "cpuFreqMin": "11,15", - "ddrBwMin": "5000", - "uxAffinity": "1" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "16,22", - "cpuFreqMin": "3,3", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "ddrBwMax": "12000", - "ddrBwMin": "5000", - "ddrLatBig": "400", - "uxAffinity": "1" - }, - "interaction": { - "cpuFreqMax": "16,21", - "cpuFreqMin": "15,20", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "ddrBwMax": "14000", - "ddrBwMin": "11000", - "ddrLatBig": "800", - "uxAffinity": "1" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "ddrBwMax": "14000", - "ddrBwMin": "11000", - "ddrLatBig": "800", - "uxAffinity": "1" - }, - "sfLag": { - "cpuFreqMax": "22,24", - "cpuFreqMin": "21,23", - "ddrBwMin": "11000", - "uxAffinity": "1" - } - } - } - ] -} \ No newline at end of file diff --git a/magisk/config/sdm821_v3_hmp.json b/magisk/config/sdm821_v3_hmp.json deleted file mode 100644 index 8fc1757..0000000 --- a/magisk/config/sdm821_v3_hmp.json +++ /dev/null @@ -1,581 +0,0 @@ -{ - "meta": { - "name": "sdm821-v3-hmp[21.07.25]", - "author": "yc@coolapk(powered by wipe-v2)", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 740, - "idleLoad": 490, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ - { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, - { - "hint": "Active", - "action": "normal", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, - { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, - { - "hint": "Pressed", - "action": "interaction", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, - { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, - { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, - { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, - { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, - { - "hint": "SfBoost", - "action": "sfLag", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, - { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, - { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" - } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 2 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 150, - 150, - 160, - 160 - ], - "knobs": [ - { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, - { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, - { - "name": "littleHidelay", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay", - "type": "string", - "enable": true, - "note": "小核的above_hispeed_delay" - }, - { - "name": "littleHifreq", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq", - "type": "string", - "enable": true, - "note": "小核的hispeed_freq" - }, - { - "name": "littleHiload", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load", - "type": "string", - "enable": true, - "note": "小核的go_hispeed_load" - }, - { - "name": "littleTgload", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads", - "type": "string", - "enable": true, - "note": "小核的target_loads" - }, - { - "name": "littleMinSample", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time", - "type": "string", - "enable": true, - "note": "小核的min_sample_time" - }, - { - "name": "littleHyst", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis", - "type": "string", - "enable": true, - "note": "小核的max_freq_hysteresis" - }, - { - "name": "bigHidelay", - "path": "/sys/devices/system/cpu/cpu2/cpufreq/interactive/above_hispeed_delay", - "type": "string", - "enable": true, - "note": "大核的above_hispeed_delay" - }, - { - "name": "bigHifreq", - "path": "/sys/devices/system/cpu/cpu2/cpufreq/interactive/hispeed_freq", - "type": "string", - "enable": true, - "note": "大核的hispeed_freq" - }, - { - "name": "bigHiload", - "path": "/sys/devices/system/cpu/cpu2/cpufreq/interactive/go_hispeed_load", - "type": "string", - "enable": true, - "note": "大核的go_hispeed_load" - }, - { - "name": "bigTgload", - "path": "/sys/devices/system/cpu/cpu2/cpufreq/interactive/target_loads", - "type": "string", - "enable": true, - "note": "大核的target_loads" - }, - { - "name": "bigMinSample", - "path": "/sys/devices/system/cpu/cpu2/cpufreq/interactive/min_sample_time", - "type": "string", - "enable": true, - "note": "大核的min_sample_time" - }, - { - "name": "bigHyst", - "path": "/sys/devices/system/cpu/cpu2/cpufreq/interactive/max_freq_hysteresis", - "type": "string", - "enable": true, - "note": "大核的max_freq_hysteresis" - }, - { - "name": "downmigrate", - "path": "/proc/sys/kernel/sched_downmigrate", - "type": "string", - "enable": true, - "note": "如果任务负载占小核容量的百分比小于此阈值,迁移到小核" - }, - { - "name": "upmigrate", - "path": "/proc/sys/kernel/sched_upmigrate", - "type": "string", - "enable": true, - "note": "如果任务负载占小核容量的百分比大于此阈值,迁移到大核" - }, - { - "name": "downmigrate2", - "path": "/proc/sys/kernel/sched_downmigrate", - "type": "string", - "enable": true, - "note": "如果任务负载占小核容量的百分比小于此阈值,迁移到小核,解决down>up的情况" - }, - { - "name": "ddrBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpubw/max_freq", - "type": "string", - "enable": true, - "note": "DDR最大带宽" - }, - { - "name": "ddrBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpubw/min_freq", - "type": "string", - "enable": true, - "note": "DDR最小带宽" - }, - { - "name": "ddrLatBig", - "path": "/sys/class/devfreq/soc:qcom,memlat-cpu2/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核DDR延迟控制,在DDR命中率降低时,值越大越容易提升DDR频率" - }, - { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电(相对卡顿百分比 49.6% 相对续航 115.0%)", - "actions": { - "normal": { - "cpuFreqMax": "16,24", - "cpuFreqMin": "3,3", - "littleHidelay": "38000 1132000:18000 1209000:58000 1286000:78000 1363000:38000 1440000:78000 1516000:38000 1593000:58000", - "littleHifreq": "979000", - "littleHiload": "95", - "littleTgload": "80 384000:59 460000:67 537000:58 614000:67 691000:70 768000:56 844000:76 902000:74 979000:85 1056000:83 1132000:76 1209000:62 1286000:49 1363000:62 1440000:97 1516000:78 1593000:70", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "78000 691000:58000 748000:78000 825000:18000 902000:58000 1056000:78000 1132000:18000 1209000:58000 1440000:78000 1516000:58000 1593000:38000 1670000:78000 1747000:58000 1900000:38000 2054000:58000 2150000:78000 2246000:38000", - "bigHifreq": "614000", - "bigHiload": "84", - "bigTgload": "28 384000:24 460000:46 537000:37 614000:29 691000:50 748000:57 825000:73 902000:67 979000:59 1056000:56 1132000:87 1209000:90 1286000:87 1363000:71 1440000:56 1516000:33 1593000:15 1670000:3 1747000:70 1824000:99 1900000:77 1977000:97 2054000:98", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "45", - "upmigrate": "45", - "downmigrate2": "45", - "ddrBwMax": "12000", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "1" - }, - "interaction": { - "cpuFreqMax": "16,18", - "cpuFreqMin": "3,3", - "littleHidelay": "38000 1132000:18000 1209000:58000 1286000:78000 1363000:38000 1440000:78000 1516000:38000 1593000:58000", - "littleHifreq": "979000", - "littleHiload": "95", - "littleTgload": "80 384000:59 460000:67 537000:58 614000:67 691000:70 768000:56 844000:76 902000:74 979000:85 1056000:83 1132000:76 1209000:62 1286000:49 1363000:62 1440000:97 1516000:78 1593000:70", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "78000 691000:58000 748000:78000 825000:18000 902000:58000 1056000:78000 1132000:18000 1209000:58000 1440000:78000 1516000:58000 1593000:38000 1670000:78000 1747000:58000 1900000:38000 2054000:58000 2150000:78000 2246000:38000", - "bigHifreq": "614000", - "bigHiload": "84", - "bigTgload": "28 384000:24 460000:46 537000:37 614000:29 691000:50 748000:57 825000:73 902000:67 979000:59 1056000:56 1132000:87 1209000:90 1286000:87 1363000:71 1440000:56 1516000:33 1593000:15 1670000:3 1747000:70 1824000:99 1900000:77 1977000:97 2054000:98", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "30", - "upmigrate": "59", - "downmigrate2": "30", - "ddrBwMax": "12000", - "ddrBwMin": "5000", - "ddrLatBig": "800", - "uxAffinity": "1" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "ddrBwMax": "14000", - "ddrBwMin": "11000", - "ddrLatBig": "800", - "uxAffinity": "1" - }, - "sfLag": { - "cpuFreqMax": "16,21", - "cpuFreqMin": "15,20", - "ddrBwMin": "11000", - "uxAffinity": "1" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗(相对卡顿百分比 100.0% 相对续航 139.8%)", - "actions": { - "normal": { - "cpuFreqMax": "16,24", - "cpuFreqMin": "3,3", - "littleHidelay": "78000 902000:38000 979000:18000 1056000:38000 1286000:58000 1363000:78000 1593000:38000", - "littleHifreq": "844000", - "littleHiload": "95", - "littleTgload": "85 384000:39 460000:50 537000:33 614000:68 691000:63 768000:77 844000:80 902000:82 979000:84 1132000:56 1209000:52 1286000:17 1363000:88 1440000:25 1516000:24 1593000:75", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "58000 691000:38000 748000:58000 902000:78000 979000:38000 1056000:18000 1286000:58000 1363000:78000 1516000:58000 1593000:38000 1670000:58000 1747000:38000 1824000:18000 1900000:38000 1977000:78000 2054000:58000 2246000:78000", - "bigHifreq": "614000", - "bigHiload": "56", - "bigTgload": "81 384000:38 460000:15 537000:60 614000:53 691000:61 748000:44 825000:30 902000:61 979000:58 1056000:55 1132000:93 1209000:80 1286000:85 1363000:64 1440000:16 1516000:53 1593000:45 1670000:51 1747000:72 1824000:48 1900000:97 1977000:94 2054000:98", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "45", - "upmigrate": "45", - "downmigrate2": "45", - "ddrBwMax": "12000", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "1" - }, - "interaction": { - "cpuFreqMax": "16,18", - "cpuFreqMin": "3,3", - "littleHidelay": "78000 902000:38000 979000:18000 1056000:38000 1286000:58000 1363000:78000 1593000:38000", - "littleHifreq": "844000", - "littleHiload": "95", - "littleTgload": "85 384000:39 460000:50 537000:33 614000:68 691000:63 768000:77 844000:80 902000:82 979000:84 1132000:56 1209000:52 1286000:17 1363000:88 1440000:25 1516000:24 1593000:75", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "58000 691000:38000 748000:58000 902000:78000 979000:38000 1056000:18000 1286000:58000 1363000:78000 1516000:58000 1593000:38000 1670000:58000 1747000:38000 1824000:18000 1900000:38000 1977000:78000 2054000:58000 2246000:78000", - "bigHifreq": "614000", - "bigHiload": "56", - "bigTgload": "81 384000:38 460000:15 537000:60 614000:53 691000:61 748000:44 825000:30 902000:61 979000:58 1056000:55 1132000:93 1209000:80 1286000:85 1363000:64 1440000:16 1516000:53 1593000:45 1670000:51 1747000:72 1824000:48 1900000:97 1977000:94 2054000:98", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "42", - "upmigrate": "52", - "downmigrate2": "42", - "ddrBwMax": "12000", - "ddrBwMin": "5000", - "ddrLatBig": "400", - "uxAffinity": "1" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "ddrBwMax": "12000", - "ddrBwMin": "5000", - "ddrLatBig": "800", - "uxAffinity": "1" - }, - "sfLag": { - "cpuFreqMax": "16,18", - "cpuFreqMin": "11,15", - "ddrBwMin": "5000", - "uxAffinity": "1" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "16,24", - "cpuFreqMin": "3,3", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "ddrBwMax": "12000", - "ddrBwMin": "5000", - "ddrLatBig": "400", - "uxAffinity": "1" - }, - "interaction": { - "cpuFreqMax": "16,21", - "cpuFreqMin": "15,20", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "ddrBwMax": "14000", - "ddrBwMin": "11000", - "ddrLatBig": "800", - "uxAffinity": "1" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "ddrBwMax": "14000", - "ddrBwMin": "11000", - "ddrLatBig": "800", - "uxAffinity": "1" - }, - "sfLag": { - "cpuFreqMax": "22,24", - "cpuFreqMin": "21,23", - "ddrBwMin": "11000", - "uxAffinity": "1" - } - } - } - ] -} \ No newline at end of file diff --git a/magisk/config/sdm82x_eas.json b/magisk/config/sdm82x_eas.json deleted file mode 100644 index 5983499..0000000 --- a/magisk/config/sdm82x_eas.json +++ /dev/null @@ -1,501 +0,0 @@ -{ - "meta": { - "name": "sdm82x-eas[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 760, - "idleLoad": 510, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ - { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, - { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, - { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, - { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, - { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, - { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, - { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, - { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, - { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, - { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, - { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" - } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 2 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 160, - 160, - 160, - 160 - ], - "knobs": [ - { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, - { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, - { - "name": "schedBoost", - "path": "/proc/sys/kernel/sched_boost", - "type": "string", - "enable": true, - "note": "异构调度器全局任务放置boost,不考虑能耗代价" - }, - { - "name": "topBoost", - "path": "/dev/stune/top-app/schedtune.boost", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, - { - "name": "heavyBoost", - "path": "/dev/stune/rt/schedtune.boost", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, - { - "name": "ddrBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpubw/max_freq", - "type": "string", - "enable": true, - "note": "DDR最大带宽" - }, - { - "name": "ddrBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpubw/min_freq", - "type": "string", - "enable": true, - "note": "DDR最小带宽" - }, - { - "name": "ddrLatBig", - "path": "/sys/class/devfreq/soc:qcom,memlat-cpu2/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核DDR延迟控制,在DDR命中率降低时,值越大越容易提升DDR频率" - }, - { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, - { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "cpuFreqMax": "12,21", - "cpuFreqMin": "1,3", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "12,21", - "cpuFreqMin": "5,9", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "12,17", - "cpuFreqMin": "8,9", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "ddrBwMax": "13763", - "ddrBwMin": "2408", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "12,17", - "cpuFreqMin": "8,9", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "ddrBwMax": "13763", - "ddrBwMin": "2408", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "21,21", - "cpuFreqMin": "8,12", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "ddrBwMax": "13763", - "ddrBwMin": "2408", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "12,17", - "cpuFreqMin": "8,9", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "21,23", - "cpuFreqMin": "8,21", - "topBoost": "0", - "heavyBoost": "10", - "ddrBwMax": "13763", - "ddrBwMin": "13763", - "uxAffinity": "2" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "cpuFreqMax": "10,13", - "cpuFreqMin": "1,3", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "12,11", - "cpuFreqMin": "5,3", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "12,10", - "cpuFreqMin": "5,6", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "13,13", - "cpuFreqMin": "5,6", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "ddrBwMax": "13763", - "ddrBwMin": "2408", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "21,15", - "cpuFreqMin": "5,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "ddrLatBig": "800", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "12,10", - "cpuFreqMin": "5,6", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "21,19", - "cpuFreqMin": "5,15", - "topBoost": "0", - "heavyBoost": "1", - "ddrBwMax": "13763", - "ddrBwMin": "4816", - "uxAffinity": "2" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "21,23", - "cpuFreqMin": "3,3", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "13763", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "21,23", - "cpuFreqMin": "6,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "13763", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "13,21", - "cpuFreqMin": "6,13", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "13763", - "ddrBwMin": "4816", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "13,19", - "cpuFreqMin": "6,19", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "13763", - "ddrBwMin": "4816", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "21,23", - "cpuFreqMin": "13,19", - "schedBoost": "1", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "13763", - "ddrBwMin": "13763", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "21,23", - "cpuFreqMin": "6,19", - "uxAffinity": "3" - }, - "sfBoost": { - "cpuFreqMax": "21,23", - "cpuFreqMin": "6,23", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "13763", - "ddrBwMin": "13763", - "uxAffinity": "3" - } - } - } - ] -} \ No newline at end of file diff --git a/magisk/config/sdm835.json b/magisk/config/sdm835.json new file mode 100644 index 0000000..a623f57 --- /dev/null +++ b/magisk/config/sdm835.json @@ -0,0 +1,576 @@ +{ + "meta": { + "name": "sdm835[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 100, + "nr": 4, + "typicalPower": 0.32, + "typicalFreq": 1.9, + "sweetFreq": 1.5, + "plainFreq": 1.0, + "freeFreq": 0.5 + }, + { + "efficiency": 170, + "nr": 4, + "typicalPower": 1.46, + "typicalFreq": 2.5, + "sweetFreq": 1.8, + "plainFreq": 1.0, + "freeFreq": 0.7 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3 + ], + "c1": [ + 4, + 5, + 6 + ], + "c2": [ + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, + { + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, + { + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, + { + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, + { + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ + { + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ + { + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ + { + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, + { + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, + { + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, + { + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" + } + ] + } + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.3, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } +} \ No newline at end of file diff --git a/magisk/config/sdm835_eas.json b/magisk/config/sdm835_eas.json deleted file mode 100644 index d475e5a..0000000 --- a/magisk/config/sdm835_eas.json +++ /dev/null @@ -1,505 +0,0 @@ -{ - "meta": { - "name": "sdm835-eas[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1290, - "idleLoad": 860, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ - { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, - { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, - { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, - { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, - { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, - { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, - { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, - { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, - { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, - { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, - { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" - } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 100, - 100, - 100, - 100, - 170, - 170, - 170, - 170 - ], - "knobs": [ - { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, - { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, - { - "name": "schedBoost", - "path": "/proc/sys/kernel/sched_boost", - "type": "string", - "enable": true, - "note": "异构调度器全局任务放置boost,不考虑能耗代价" - }, - { - "name": "topBoost", - "path": "/dev/stune/top-app/schedtune.boost", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, - { - "name": "heavyBoost", - "path": "/dev/stune/rt/schedtune.boost", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, - { - "name": "ddrBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpubw/max_freq", - "type": "string", - "enable": true, - "note": "DDR最大带宽" - }, - { - "name": "ddrBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpubw/min_freq", - "type": "string", - "enable": true, - "note": "DDR最小带宽" - }, - { - "name": "ddrLatBig", - "path": "/sys/class/devfreq/soc:qcom,memlat-cpu4/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核DDR延迟控制,在DDR命中率降低时,值越大越容易提升DDR频率" - }, - { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, - { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "cpuFreqMax": "15,24", - "cpuFreqMin": "1,3", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "16,24", - "cpuFreqMin": "7,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "16,20", - "cpuFreqMin": "10,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "ddrBwMax": "13763", - "ddrBwMin": "3143", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "16,20", - "cpuFreqMin": "10,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "ddrBwMax": "13763", - "ddrBwMin": "3143", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "19,24", - "cpuFreqMin": "10,14", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "ddrBwMax": "13763", - "ddrBwMin": "3143", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "16,20", - "cpuFreqMin": "10,10", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "19,24", - "cpuFreqMin": "10,24", - "topBoost": "0", - "heavyBoost": "10", - "ddrBwMax": "13763", - "ddrBwMin": "13763", - "uxAffinity": "2" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "cpuFreqMax": "14,15", - "cpuFreqMin": "1,3", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "15,13", - "cpuFreqMin": "7,3", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "15,11", - "cpuFreqMin": "7,7", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "ddrBwMax": "6881", - "ddrBwMin": "3143", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "17,15", - "cpuFreqMin": "7,7", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "ddrBwMax": "13763", - "ddrBwMin": "3143", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "19,18", - "cpuFreqMin": "7,9", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "ddrBwMax": "6881", - "ddrBwMin": "3143", - "ddrLatBig": "800", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "15,11", - "cpuFreqMin": "7,7", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "19,22", - "cpuFreqMin": "7,18", - "topBoost": "0", - "heavyBoost": "1", - "ddrBwMax": "13763", - "ddrBwMin": "4816", - "uxAffinity": "2" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "19,24", - "cpuFreqMin": "3,3", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "13763", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "19,24", - "cpuFreqMin": "8,11", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "13763", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "17,24", - "cpuFreqMin": "8,15", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "13763", - "ddrBwMin": "4816", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "17,22", - "cpuFreqMin": "8,22", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "13763", - "ddrBwMin": "4816", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "19,24", - "cpuFreqMin": "17,22", - "schedBoost": "1", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "13763", - "ddrBwMin": "13763", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "19,24", - "cpuFreqMin": "8,22", - "uxAffinity": "3" - }, - "sfBoost": { - "cpuFreqMax": "19,24", - "cpuFreqMin": "8,24", - "topBoost": "0", - "heavyBoost": "0", - "ddrBwMax": "13763", - "ddrBwMin": "13763", - "uxAffinity": "3" - } - } - } - ] -} \ No newline at end of file diff --git a/magisk/config/sdm835_hmp.json b/magisk/config/sdm835_hmp.json deleted file mode 100644 index 0c3651e..0000000 --- a/magisk/config/sdm835_hmp.json +++ /dev/null @@ -1,585 +0,0 @@ -{ - "meta": { - "name": "sdm835-hmp[21.07.25]", - "author": "yc@coolapk(powered by wipe-v2)", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1290, - "idleLoad": 860, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ - { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, - { - "hint": "Active", - "action": "normal", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, - { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, - { - "hint": "Pressed", - "action": "interaction", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, - { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, - { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, - { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, - { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, - { - "hint": "SfBoost", - "action": "sfLag", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, - { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, - { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" - } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 100, - 100, - 100, - 100, - 170, - 170, - 170, - 170 - ], - "knobs": [ - { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, - { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, - { - "name": "littleHidelay", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay", - "type": "string", - "enable": true, - "note": "小核的above_hispeed_delay" - }, - { - "name": "littleHifreq", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq", - "type": "string", - "enable": true, - "note": "小核的hispeed_freq" - }, - { - "name": "littleHiload", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load", - "type": "string", - "enable": true, - "note": "小核的go_hispeed_load" - }, - { - "name": "littleTgload", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads", - "type": "string", - "enable": true, - "note": "小核的target_loads" - }, - { - "name": "littleMinSample", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time", - "type": "string", - "enable": true, - "note": "小核的min_sample_time" - }, - { - "name": "littleHyst", - "path": "/sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis", - "type": "string", - "enable": true, - "note": "小核的max_freq_hysteresis" - }, - { - "name": "bigHidelay", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay", - "type": "string", - "enable": true, - "note": "大核的above_hispeed_delay" - }, - { - "name": "bigHifreq", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq", - "type": "string", - "enable": true, - "note": "大核的hispeed_freq" - }, - { - "name": "bigHiload", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load", - "type": "string", - "enable": true, - "note": "大核的go_hispeed_load" - }, - { - "name": "bigTgload", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads", - "type": "string", - "enable": true, - "note": "大核的target_loads" - }, - { - "name": "bigMinSample", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time", - "type": "string", - "enable": true, - "note": "大核的min_sample_time" - }, - { - "name": "bigHyst", - "path": "/sys/devices/system/cpu/cpu4/cpufreq/interactive/max_freq_hysteresis", - "type": "string", - "enable": true, - "note": "大核的max_freq_hysteresis" - }, - { - "name": "downmigrate", - "path": "/proc/sys/kernel/sched_downmigrate", - "type": "string", - "enable": true, - "note": "如果任务负载占小核容量的百分比小于此阈值,迁移到小核" - }, - { - "name": "upmigrate", - "path": "/proc/sys/kernel/sched_upmigrate", - "type": "string", - "enable": true, - "note": "如果任务负载占小核容量的百分比大于此阈值,迁移到大核" - }, - { - "name": "downmigrate2", - "path": "/proc/sys/kernel/sched_downmigrate", - "type": "string", - "enable": true, - "note": "如果任务负载占小核容量的百分比小于此阈值,迁移到小核,解决down>up的情况" - }, - { - "name": "ddrBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpubw/max_freq", - "type": "string", - "enable": true, - "note": "DDR最大带宽" - }, - { - "name": "ddrBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpubw/min_freq", - "type": "string", - "enable": true, - "note": "DDR最小带宽" - }, - { - "name": "ddrLatBig", - "path": "/sys/class/devfreq/soc:qcom,memlat-cpu4/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核DDR延迟控制,在DDR命中率降低时,值越大越容易提升DDR频率" - }, - { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电(相对卡顿百分比 49.9% 相对续航 114.3%)", - "actions": { - "normal": { - "cpuFreqMax": "20,24", - "cpuFreqMin": "3,3", - "littleHidelay": "58000 1478000:18000 1670000:58000 1824000:38000", - "littleHifreq": "1401000", - "littleHiload": "63", - "littleTgload": "65 364000:81 441000:44 518000:87 595000:25 672000:57 748000:35 825000:53 883000:68 960000:62 1036000:38 1094000:19 1171000:20 1248000:38 1324000:78 1401000:46 1478000:29 1555000:48 1670000:66 1747000:71 1824000:72 1900000:80", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "18000 576000:38000 729000:78000 806000:58000 902000:38000 1056000:18000 1132000:38000 1267000:58000 1344000:38000 1420000:18000 1497000:78000 1574000:58000 1728000:38000 1804000:58000 1881000:78000 1958000:38000 2035000:58000 2112000:38000 2342000:78000 2361000:58000", - "bigHifreq": "499000", - "bigHiload": "11", - "bigTgload": "69 345000:55 422000:59 499000:36 576000:43 652000:20 729000:32 806000:55 902000:40 979000:36 1056000:21 1132000:23 1190000:4 1267000:27 1344000:23 1420000:96 1497000:53 1574000:57 1651000:59 1728000:90 1804000:80 1881000:52 1958000:55 2035000:96", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "91", - "upmigrate": "91", - "downmigrate2": "91", - "ddrBwMax": "12000", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "0" - }, - "interaction": { - "cpuFreqMax": "19,21", - "cpuFreqMin": "4,3", - "littleHidelay": "58000 1478000:18000 1670000:58000 1824000:38000", - "littleHifreq": "1401000", - "littleHiload": "63", - "littleTgload": "65 364000:81 441000:44 518000:87 595000:25 672000:57 748000:35 825000:53 883000:68 960000:62 1036000:38 1094000:19 1171000:20 1248000:38 1324000:78 1401000:46 1478000:29 1555000:48 1670000:66 1747000:71 1824000:72 1900000:80", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "18000 576000:38000 729000:78000 806000:58000 902000:38000 1056000:18000 1132000:38000 1267000:58000 1344000:38000 1420000:18000 1497000:78000 1574000:58000 1728000:38000 1804000:58000 1881000:78000 1958000:38000 2035000:58000 2112000:38000 2342000:78000 2361000:58000", - "bigHifreq": "499000", - "bigHiload": "11", - "bigTgload": "69 345000:55 422000:59 499000:36 576000:43 652000:20 729000:32 806000:55 902000:40 979000:36 1056000:21 1132000:23 1190000:4 1267000:27 1344000:23 1420000:96 1497000:53 1574000:57 1651000:59 1728000:90 1804000:80 1881000:52 1958000:55 2035000:96", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "72", - "upmigrate": "94", - "downmigrate2": "72", - "ddrBwMax": "12000", - "ddrBwMin": "5000", - "ddrLatBig": "800", - "uxAffinity": "1" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "ddrBwMax": "14000", - "ddrBwMin": "11000", - "ddrLatBig": "800", - "uxAffinity": "1" - }, - "sfLag": { - "cpuFreqMax": "19,22", - "cpuFreqMin": "18,21", - "ddrBwMin": "11000", - "uxAffinity": "1" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗(相对卡顿百分比 99.9% 相对续航 138.3%)", - "actions": { - "normal": { - "cpuFreqMax": "20,24", - "cpuFreqMin": "3,3", - "littleHidelay": "78000 441000:58000 518000:38000 883000:58000 960000:18000 1094000:78000 1171000:18000 1324000:58000 1401000:78000 1478000:38000 1555000:58000 1824000:38000", - "littleHifreq": "364000", - "littleHiload": "47", - "littleTgload": "54 364000:31 441000:25 518000:29 595000:61 672000:14 748000:11 825000:18 883000:9 960000:34 1036000:48 1094000:25 1171000:51 1248000:48 1324000:31 1401000:86 1478000:60 1555000:64 1670000:53 1747000:96 1824000:65 1900000:91", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "38000 422000:78000 499000:38000 576000:58000 729000:18000 806000:38000 902000:78000 979000:58000 1132000:38000 1190000:58000 1267000:18000 1344000:38000 1420000:58000 1497000:18000 1574000:78000 1651000:38000 1958000:58000 2112000:18000 2265000:78000 2342000:18000 2361000:38000", - "bigHifreq": "345000", - "bigHiload": "32", - "bigTgload": "21 345000:55 422000:51 499000:41 576000:38 652000:69 729000:21 806000:26 902000:66 979000:60 1056000:37 1132000:23 1190000:64 1267000:45 1344000:51 1420000:47 1497000:70 1574000:20 1651000:26 1728000:52 1804000:58 1881000:51 1958000:44 2035000:64", - "bigMinSample": "58000", - "bigHyst": "18000", - "downmigrate": "88", - "upmigrate": "88", - "downmigrate2": "88", - "ddrBwMax": "12000", - "ddrBwMin": "0", - "ddrLatBig": "400", - "uxAffinity": "0" - }, - "interaction": { - "cpuFreqMax": "19,18", - "cpuFreqMin": "3,3", - "littleHidelay": "78000 441000:58000 518000:38000 883000:58000 960000:18000 1094000:78000 1171000:18000 1324000:58000 1401000:78000 1478000:38000 1555000:58000 1824000:38000", - "littleHifreq": "364000", - "littleHiload": "47", - "littleTgload": "54 364000:31 441000:25 518000:29 595000:61 672000:14 748000:11 825000:18 883000:9 960000:34 1036000:48 1094000:25 1171000:51 1248000:48 1324000:31 1401000:86 1478000:60 1555000:64 1670000:53 1747000:96 1824000:65 1900000:91", - "littleMinSample": "18000", - "littleHyst": "18000", - "bigHidelay": "38000 422000:78000 499000:38000 576000:58000 729000:18000 806000:38000 902000:78000 979000:58000 1132000:38000 1190000:58000 1267000:18000 1344000:38000 1420000:58000 1497000:18000 1574000:78000 1651000:38000 1958000:58000 2112000:18000 2265000:78000 2342000:18000 2361000:38000", - "bigHifreq": "345000", - "bigHiload": "32", - "bigTgload": "21 345000:55 422000:51 499000:41 576000:38 652000:69 729000:21 806000:26 902000:66 979000:60 1056000:37 1132000:23 1190000:64 1267000:45 1344000:51 1420000:47 1497000:70 1574000:20 1651000:26 1728000:52 1804000:58 1881000:51 1958000:44 2035000:64", - "bigMinSample": "58000", - "bigHyst": "18000", - "downmigrate": "85", - "upmigrate": "94", - "downmigrate2": "85", - "ddrBwMax": "12000", - "ddrBwMin": "5000", - "ddrLatBig": "400", - "uxAffinity": "0" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "ddrBwMax": "12000", - "ddrBwMin": "5000", - "ddrLatBig": "800", - "uxAffinity": "0" - }, - "sfLag": { - "cpuFreqMax": "19,18", - "cpuFreqMin": "15,16", - "ddrBwMin": "5000", - "uxAffinity": "1" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "20,24", - "cpuFreqMin": "3,3", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "ddrBwMax": "12000", - "ddrBwMin": "5000", - "ddrLatBig": "400", - "uxAffinity": "3" - }, - "interaction": { - "cpuFreqMax": "19,22", - "cpuFreqMin": "18,21", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "ddrBwMax": "14000", - "ddrBwMin": "11000", - "ddrLatBig": "800", - "uxAffinity": "3" - }, - "heavyLoad": { - "cpuFreqMax": "99,99", - "cpuFreqMin": "10,10", - "littleHidelay": "18000", - "littleHifreq": "1200000", - "littleHiload": "90", - "littleTgload": "70 1500000:90", - "littleMinSample": "18000", - "littleHyst": "78000", - "bigHidelay": "18000 1800000:78000", - "bigHifreq": "1500000", - "bigHiload": "90", - "bigTgload": "70 1800000:95", - "bigMinSample": "18000", - "bigHyst": "18000", - "downmigrate": "40", - "upmigrate": "80", - "downmigrate2": "40", - "ddrBwMax": "14000", - "ddrBwMin": "11000", - "ddrLatBig": "800", - "uxAffinity": "3" - }, - "sfLag": { - "cpuFreqMax": "20,24", - "cpuFreqMin": "19,23", - "ddrBwMin": "11000", - "uxAffinity": "3" - } - } - } - ] -} \ No newline at end of file diff --git a/magisk/config/sdm845.json b/magisk/config/sdm845.json index 337b901..62248d4 100644 --- a/magisk/config/sdm845.json +++ b/magisk/config/sdm845.json @@ -1,577 +1,576 @@ { - "meta": { - "name": "sdm845[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1510, - "idleLoad": 1000, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ + "meta": { + "name": "sdm845[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 115, + "nr": 4, + "typicalPower": 0.4, + "typicalFreq": 1.8, + "sweetFreq": 1.4, + "plainFreq": 0.9, + "freeFreq": 0.6 + }, + { + "efficiency": 200, + "nr": 4, + "typicalPower": 1.76, + "typicalFreq": 2.8, + "sweetFreq": 1.8, + "plainFreq": 1.0, + "freeFreq": 0.8 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3 + ], + "c1": [ + 4, + 5, + 6 + ], + "c2": [ + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" + "k": ".", + "ac": "auto", + "pc": "bg" } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 115, - 115, - 115, - 115, - 200, - 200, - 200, - 200 - ], - "knobs": [ + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ { - "name": "schedBoost", - "path": "/proc/sys/kernel/sched_boost", - "type": "string", - "enable": true, - "note": "异构调度器全局任务放置boost,不考虑能耗代价" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ { - "name": "topBoost", - "path": "/dev/stune/top-app/schedtune.boost", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ { - "name": "heavyBoost", - "path": "/dev/stune/rt/schedtune.boost", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, { - "name": "llccBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpubw/max_freq", - "type": "string", - "enable": true, - "note": "LLCC最大带宽" - }, + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, { - "name": "llccBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpubw/min_freq", - "type": "string", - "enable": true, - "note": "LLCC最小带宽" - }, + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, { - "name": "ddrBwMax", - "path": "/sys/class/devfreq/soc:qcom,llccbw/max_freq", - "type": "string", - "enable": true, - "note": "DDR最大带宽" - }, + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, { - "name": "ddrBwMin", - "path": "/sys/class/devfreq/soc:qcom,llccbw/min_freq", - "type": "string", - "enable": true, - "note": "DDR最小带宽" - }, + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, { - "name": "l3LatBig", - "path": "/sys/class/devfreq/soc:qcom,l3-cpu4/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核L3延迟控制,在L3命中率降低时,值越大越容易提升L3频率" - }, + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, { - "name": "ddrLatBig", - "path": "/sys/class/devfreq/soc:qcom,memlat-cpu4/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核DDR延迟控制,在DDR命中率降低时,值越大越容易提升DDR频率" - }, + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "cpuFreqMax": "15,25", - "cpuFreqMin": "1,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "14236", - "llccBwMin": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "16,25", - "cpuFreqMin": "7,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "14236", - "llccBwMin": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "16,21", - "cpuFreqMin": "10,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "llccBwMax": "14236", - "llccBwMin": "7829", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "16,21", - "cpuFreqMin": "10,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "llccBwMax": "14236", - "llccBwMin": "7829", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,25", - "cpuFreqMin": "10,15", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "llccBwMax": "14236", - "llccBwMin": "7829", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "16,21", - "cpuFreqMin": "10,10", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "18,28", - "cpuFreqMin": "10,25", - "topBoost": "0", - "heavyBoost": "10", - "llccBwMax": "14236", - "llccBwMin": "14236", - "ddrBwMax": "6881", - "ddrBwMin": "6881", - "uxAffinity": "2" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "cpuFreqMax": "14,16", - "cpuFreqMin": "1,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "12812", - "llccBwMin": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "15,14", - "cpuFreqMin": "7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "12812", - "llccBwMin": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "15,12", - "cpuFreqMin": "7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "llccBwMax": "14236", - "llccBwMin": "7829", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "17,16", - "cpuFreqMin": "7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "llccBwMax": "14236", - "llccBwMin": "7829", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,18", - "cpuFreqMin": "7,9", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "llccBwMax": "14236", - "llccBwMin": "7829", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "15,12", - "cpuFreqMin": "7,8", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "18,23", - "cpuFreqMin": "7,18", - "topBoost": "0", - "heavyBoost": "1", - "llccBwMax": "14236", - "llccBwMin": "12812", - "ddrBwMax": "6881", - "ddrBwMin": "4816", - "uxAffinity": "2" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "18,28", - "cpuFreqMin": "5,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "14236", - "llccBwMin": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "18,28", - "cpuFreqMin": "8,12", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "14236", - "llccBwMin": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "17,25", - "cpuFreqMin": "8,16", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "14236", - "llccBwMin": "12812", - "ddrBwMax": "6881", - "ddrBwMin": "4816", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "17,23", - "cpuFreqMin": "8,23", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "14236", - "llccBwMin": "12812", - "ddrBwMax": "6881", - "ddrBwMin": "4816", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,28", - "cpuFreqMin": "17,23", - "schedBoost": "1", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "14236", - "llccBwMin": "14236", - "ddrBwMax": "6881", - "ddrBwMin": "6881", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "18,28", - "cpuFreqMin": "8,23", - "uxAffinity": "3" - }, - "sfBoost": { - "cpuFreqMax": "18,28", - "cpuFreqMin": "8,28", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "14236", - "llccBwMin": "14236", - "ddrBwMax": "6881", - "ddrBwMin": "6881", - "uxAffinity": "3" - } + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" } + ] } - ] + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.3, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } } \ No newline at end of file diff --git a/magisk/config/sdm855.json b/magisk/config/sdm855.json index 303e760..6a60ac2 100644 --- a/magisk/config/sdm855.json +++ b/magisk/config/sdm855.json @@ -1,578 +1,585 @@ { - "meta": { - "name": "sdm855/sdm855+[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1600, - "idleLoad": 1160, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ + "meta": { + "name": "sdm855/sdm855+/sdm860[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 115, + "nr": 4, + "typicalPower": 0.35, + "typicalFreq": 1.8, + "sweetFreq": 1.4, + "plainFreq": 1.0, + "freeFreq": 0.6 + }, + { + "efficiency": 250, + "nr": 3, + "typicalPower": 1.53, + "typicalFreq": 2.4, + "sweetFreq": 1.8, + "plainFreq": 1.0, + "freeFreq": 0.7 + }, + { + "efficiency": 250, + "nr": 1, + "typicalPower": 2.06, + "typicalFreq": 2.8, + "sweetFreq": 2.2, + "plainFreq": 1.4, + "freeFreq": 0.8 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3 + ], + "c1": [ + 4, + 5, + 6 + ], + "c2": [ + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4, - 7 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 115, - 115, - 115, - 115, - 250, - 250, - 250, - 250 - ], - "knobs": [ + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ { - "name": "schedBoost", - "path": "/proc/sys/kernel/sched_boost", - "type": "string", - "enable": true, - "note": "异构调度器全局任务放置boost,不考虑能耗代价" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ { - "name": "topBoost", - "path": "/dev/stune/top-app/schedtune.boost", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ { - "name": "heavyBoost", - "path": "/dev/stune/rt/schedtune.boost", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ { - "name": "llccBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpu-cpu-llcc-bw/max_freq", - "type": "string", - "enable": true, - "note": "LLCC最大带宽" - }, + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, { - "name": "llccBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpu-cpu-llcc-bw/min_freq", - "type": "string", - "enable": true, - "note": "LLCC最小带宽" - }, + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, { - "name": "ddrBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpu-llcc-ddr-bw/max_freq", - "type": "string", - "enable": true, - "note": "DDR最大带宽" - }, + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, { - "name": "ddrBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpu-llcc-ddr-bw/min_freq", - "type": "string", - "enable": true, - "note": "DDR最小带宽" - }, + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, { - "name": "l3LatBig", - "path": "/sys/class/devfreq/soc:qcom,cpu4-cpu-l3-lat/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核L3延迟控制,在L3命中率降低时,值越大越容易提升L3频率" - }, + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, { - "name": "ddrLatBig", - "path": "/sys/class/devfreq/soc:qcom,cpu4-llcc-ddr-lat/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核DDR延迟控制,在DDR命中率降低时,值越大越容易提升DDR频率" - }, + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "cpuFreqMax": "16,21,28", - "cpuFreqMin": "1,7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "17,21,28", - "cpuFreqMin": "7,10,11", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "17,17,22", - "cpuFreqMin": "11,10,11", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "llccBwMax": "15258", - "llccBwMin": "8391", - "ddrBwMax": "7980", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "17,19,22", - "cpuFreqMin": "11,10,11", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "llccBwMax": "15258", - "llccBwMin": "8391", - "ddrBwMax": "7980", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,21,28", - "cpuFreqMin": "11,15,16", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "llccBwMax": "15258", - "llccBwMin": "8391", - "ddrBwMax": "7980", - "ddrBwMin": "2408", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "17,21,22", - "cpuFreqMin": "11,21,11", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "18,21,29", - "cpuFreqMin": "11,19,28", - "topBoost": "0", - "heavyBoost": "10", - "llccBwMax": "15258", - "llccBwMin": "15258", - "ddrBwMax": "7980", - "ddrBwMin": "7980", - "uxAffinity": "2" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "cpuFreqMax": "14,15,18", - "cpuFreqMin": "1,7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "13732", - "llccBwMin": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "16,13,15", - "cpuFreqMin": "7,7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "13732", - "llccBwMin": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "16,10,12", - "cpuFreqMin": "7,7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "llccBwMax": "15258", - "llccBwMin": "8391", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "18,15,18", - "cpuFreqMin": "7,7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "llccBwMax": "15258", - "llccBwMin": "8391", - "ddrBwMax": "7980", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,17,20", - "cpuFreqMin": "7,8,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "llccBwMax": "15258", - "llccBwMin": "8391", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "16,17,12", - "cpuFreqMin": "7,17,8", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "18,21,25", - "cpuFreqMin": "7,17,20", - "topBoost": "0", - "heavyBoost": "1", - "llccBwMax": "15258", - "llccBwMin": "13732", - "ddrBwMax": "7980", - "ddrBwMin": "4816", - "uxAffinity": "2" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "18,24,29", - "cpuFreqMin": "5,7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "0", - "ddrBwMax": "7980", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "18,24,29", - "cpuFreqMin": "9,10,12", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "0", - "ddrBwMax": "7980", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "18,23,28", - "cpuFreqMin": "9,15,18", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "13732", - "ddrBwMax": "7980", - "ddrBwMin": "4816", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "18,21,25", - "cpuFreqMin": "9,21,25", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "13732", - "ddrBwMax": "7980", - "ddrBwMin": "4816", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,24,29", - "cpuFreqMin": "18,21,25", - "schedBoost": "1", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "15258", - "ddrBwMax": "7980", - "ddrBwMin": "7980", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "18,24,29", - "cpuFreqMin": "9,24,25", - "uxAffinity": "3" - }, - "sfBoost": { - "cpuFreqMax": "18,24,29", - "cpuFreqMin": "9,24,29", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "15258", - "ddrBwMax": "7980", - "ddrBwMin": "7980", - "uxAffinity": "3" - } + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" } + ] } - ] + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.3, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } } \ No newline at end of file diff --git a/magisk/config/sdm865.json b/magisk/config/sdm865.json index f9a1d31..5ad0150 100644 --- a/magisk/config/sdm865.json +++ b/magisk/config/sdm865.json @@ -1,578 +1,585 @@ { - "meta": { - "name": "sdm865/sdm865+/sdm870[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1600, - "idleLoad": 1200, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ + "meta": { + "name": "sdm865/sdm865+/sdm870[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 115, + "nr": 4, + "typicalPower": 0.32, + "typicalFreq": 1.8, + "sweetFreq": 1.4, + "plainFreq": 1.0, + "freeFreq": 0.6 + }, + { + "efficiency": 300, + "nr": 3, + "typicalPower": 1.39, + "typicalFreq": 2.4, + "sweetFreq": 1.8, + "plainFreq": 1.0, + "freeFreq": 0.7 + }, + { + "efficiency": 300, + "nr": 1, + "typicalPower": 1.84, + "typicalFreq": 2.8, + "sweetFreq": 2.2, + "plainFreq": 1.4, + "freeFreq": 0.8 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3 + ], + "c1": [ + 4, + 5, + 6 + ], + "c2": [ + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4, - 7 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 115, - 115, - 115, - 115, - 300, - 300, - 300, - 300 - ], - "knobs": [ + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ { - "name": "schedBoost", - "path": "/proc/sys/kernel/sched_boost", - "type": "string", - "enable": true, - "note": "异构调度器全局任务放置boost,不考虑能耗代价" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ { - "name": "topBoost", - "path": "/dev/stune/top-app/schedtune.boost", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ { - "name": "heavyBoost", - "path": "/dev/stune/rt/schedtune.boost", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ { - "name": "llccBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpu-cpu-llcc-bw/max_freq", - "type": "string", - "enable": true, - "note": "LLCC最大带宽" - }, + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, { - "name": "llccBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpu-cpu-llcc-bw/min_freq", - "type": "string", - "enable": true, - "note": "LLCC最小带宽" - }, + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, { - "name": "ddrBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpu-llcc-ddr-bw/max_freq", - "type": "string", - "enable": true, - "note": "DDR最大带宽" - }, + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, { - "name": "ddrBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpu-llcc-ddr-bw/min_freq", - "type": "string", - "enable": true, - "note": "DDR最小带宽" - }, + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, { - "name": "l3LatBig", - "path": "/sys/class/devfreq/18590000.qcom,devfreq-l3:qcom,cpu4-cpu-l3-lat/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核L3延迟控制,在L3命中率降低时,值越大越容易提升L3频率" - }, + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, { - "name": "ddrLatBig", - "path": "/sys/class/devfreq/soc:qcom,cpu4-llcc-ddr-lat/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核DDR延迟控制,在DDR命中率降低时,值越大越容易提升DDR频率" - }, + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "cpuFreqMax": "16,21,29", - "cpuFreqMin": "1,7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "17,21,29", - "cpuFreqMin": "7,10,12", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "17,17,23", - "cpuFreqMin": "11,10,12", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "llccBwMax": "15258", - "llccBwMin": "8391", - "ddrBwMax": "10437", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "17,19,23", - "cpuFreqMin": "11,10,12", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "llccBwMax": "15258", - "llccBwMin": "8391", - "ddrBwMax": "10437", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,21,29", - "cpuFreqMin": "11,15,17", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "10", - "llccBwMax": "15258", - "llccBwMin": "8391", - "ddrBwMax": "10437", - "ddrBwMin": "2408", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "17,21,23", - "cpuFreqMin": "11,21,12", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "18,21,32", - "cpuFreqMin": "11,19,29", - "topBoost": "0", - "heavyBoost": "10", - "llccBwMax": "15258", - "llccBwMin": "15258", - "ddrBwMax": "10437", - "ddrBwMin": "10437", - "uxAffinity": "2" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "cpuFreqMax": "14,15,18", - "cpuFreqMin": "1,7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "13732", - "llccBwMin": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "16,13,16", - "cpuFreqMin": "7,7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "13732", - "llccBwMin": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "16,10,13", - "cpuFreqMin": "7,7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "llccBwMax": "15258", - "llccBwMin": "8391", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "18,15,18", - "cpuFreqMin": "7,7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "llccBwMax": "15258", - "llccBwMin": "8391", - "ddrBwMax": "10437", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,17,21", - "cpuFreqMin": "7,8,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "1", - "llccBwMax": "15258", - "llccBwMin": "8391", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "16,17,13", - "cpuFreqMin": "7,17,8", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "18,21,26", - "cpuFreqMin": "7,17,21", - "topBoost": "0", - "heavyBoost": "1", - "llccBwMax": "15258", - "llccBwMin": "13732", - "ddrBwMax": "10437", - "ddrBwMin": "4816", - "uxAffinity": "2" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "18,24,32", - "cpuFreqMin": "6,7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "0", - "ddrBwMax": "10437", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "18,24,32", - "cpuFreqMin": "9,10,13", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "0", - "ddrBwMax": "10437", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "18,23,29", - "cpuFreqMin": "9,15,18", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "13732", - "ddrBwMax": "10437", - "ddrBwMin": "4816", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "18,21,26", - "cpuFreqMin": "9,21,26", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "13732", - "ddrBwMax": "10437", - "ddrBwMin": "4816", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,24,32", - "cpuFreqMin": "18,21,26", - "schedBoost": "1", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "15258", - "ddrBwMax": "10437", - "ddrBwMin": "10437", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "18,24,32", - "cpuFreqMin": "9,24,26", - "uxAffinity": "3" - }, - "sfBoost": { - "cpuFreqMax": "18,24,32", - "cpuFreqMin": "9,24,32", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "15258", - "ddrBwMax": "10437", - "ddrBwMin": "10437", - "uxAffinity": "3" - } + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" } + ] } - ] + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.3, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } } \ No newline at end of file diff --git a/magisk/config/sdm888.json b/magisk/config/sdm888.json index 2b108e9..4b3b85c 100644 --- a/magisk/config/sdm888.json +++ b/magisk/config/sdm888.json @@ -1,578 +1,585 @@ { - "meta": { - "name": "sdm888[21.07.25]", - "author": "yc@coolapk", - "features": "touch cpuload render standby sfanalysis ssanalysis dispfeature" - }, - "common": { - "verboseLog": { - "note": "用于调试的详细日志", - "enable": false - }, - "switchInode": { - "note": "接收性能模式切换的inode节点", - "path": "/sdcard/yc/uperf/cur_powermode" - }, - "inputReader": { - "note": "用户输入读取提供触摸按下/点击/滑动hint。sampleIntervalMinMs:最小用户输入采样间隔。swipeThdPct:滑动大于此相对距离阈值认为是滑动操作。gesturePctX:全面屏手势识别起始坐标X轴阈值。gesturePctY:全面屏手势识别起始坐标X轴阈值。gestureDelayMs:全面屏手势退出延时。holdEnterMs:长时间保持触摸的时长。", - "enable": false, - "sampleIntervalMinMs": 20, - "swipeThdPct": 0.04, - "gesturePctX": 0.04, - "gesturePctY": 0.03, - "gestureDelayMs": 3000, - "holdEnterMs": 1000 - }, - "loadMonitor": { - "note": "系统负载监视器提供重负载hint。load:系统负载为所有核心的负载总和,单个核心负载=频率(Ghz)*效率(A53@1.0g为100)*负载(%)。heavyLoad:进入HeavyLoad的系统负载阈值。idleLoad:退出HeavyLoad的系统负载阈值。requestBurstSlackMs:在上一次HeavyLoad结束后,且在requestBurstSlack时间内没有HeavyLoad请求,才能响应新的HeavyLoad。", - "enable": false, - "sampleIntervalMinMs": 100, - "heavyLoad": 1600, - "idleLoad": 1200, - "requestBurstSlackMs": 3000 - }, - "sfAnalysis": { - "note": "surfaceflinger分析器提供渲染开始/结束/滞后hint。boostCntMax:SfBoost可用次数缓存上限。boostGrowQuantumMs:每满此间隔没有SfBoost请求,则SfBoost可用次数+1。renderIdleSlackMs:进入渲染结束状态前的滞后时长。", - "enable": true, - "boostCntMax": 50, - "boostGrowQuantumMs": 100, - "renderIdleSlackMs": 1 - }, - "ssAnalysis": { - "note": "system_server分析器提供系统过渡动画开始/结束hint。", - "enable": true - }, - "uxAffinity": { - "note": "UX线程自动设置,固定高优先级的UX线程到大核,并限制低优先级线程的需求响应", - "enable": true - }, - "dispFeature": { - "note": "动态屏幕刷新率。path:白名单配置文件路径。rampDownDelayMs:降低屏幕刷新率前延时,降低频繁切换对视觉效果的影响。", - "enable": false, - "path": "/sdcard/yc/uperf/cfg_uperf_display.txt", - "rampDownDelayMs": 2000 - }, - "dispatch": [ + "meta": { + "name": "sdm888/sdm888+[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 115, + "nr": 4, + "typicalPower": 0.32, + "typicalFreq": 1.8, + "sweetFreq": 1.4, + "plainFreq": 1.0, + "freeFreq": 0.6 + }, + { + "efficiency": 320, + "nr": 3, + "typicalPower": 1.66, + "typicalFreq": 2.4, + "sweetFreq": 1.7, + "plainFreq": 1.0, + "freeFreq": 0.7 + }, + { + "efficiency": 400, + "nr": 1, + "typicalPower": 3.18, + "typicalFreq": 2.8, + "sweetFreq": 1.9, + "plainFreq": 1.4, + "freeFreq": 0.8 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3 + ], + "c1": [ + 4, + 5, + 6 + ], + "c2": [ + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ { - "hint": "None", - "action": "normal", - "maxDuration": 0, - "note": "无Hint的常规状态" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Active", - "action": "active", - "maxDuration": 0, - "note": "屏幕渲染刷新时切换的Hint" - }, + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, { - "hint": "Touch", - "action": "interaction", - "maxDuration": 0, - "note": "触摸到屏幕切换的Hint" - }, + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, { - "hint": "Pressed", - "action": "pressed", - "maxDuration": 0, - "note": "按住屏幕切换的Hint" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ { - "hint": "Tap", - "action": "interaction", - "maxDuration": 2000, - "note": "点击松开屏幕切换的Hint" - }, + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, { - "hint": "Swipe", - "action": "interaction", - "maxDuration": 4000, - "note": "在屏幕滑动一段距离松开后切换的Hint" - }, + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, { - "hint": "HeavyLoad", - "action": "heavyLoad", - "maxDuration": 2000, - "note": "在Tap或Swipe检测到重负载后切换,负载降低后回落到Tap" - }, + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, { - "hint": "SfLag", - "action": "sfLag", - "maxDuration": 20, - "note": "给Surfaceflinger的渲染提交出现滞后的Hint,滞后的渲染完成后会提前退出" - }, + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ { - "hint": "SfBoost", - "action": "sfBoost", - "maxDuration": 100, - "note": "同SfLag,针对某些重负载场景" - }, + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, { - "hint": "SsAnim", - "action": "heavyLoad", - "maxDuration": 300, - "note": "系统过渡动画的Hint" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ { - "hint": "Wakeup", - "action": "heavyLoad", - "maxDuration": 1500, - "note": "屏幕点亮Hint" + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" } - ], - "stateTransition": { - "note": "Hint状态转移表,key为源状态,value为目的状态列表(按优先级降序排列),不含状态退出转移", - "None": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe", - "Active" - ], - "Active": [ - "Wakeup", - "Touch", - "Pressed", - "Tap", - "Swipe" - ], - "Touch": [ - "Wakeup", - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Pressed": [ - "SsAnim", - "SfBoost" - ], - "Tap": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "Swipe": [ - "SsAnim", - "SfLag", - "HeavyLoad" - ], - "HeavyLoad": [ - "SfBoost" - ], - "SfLag": [], - "SfBoost": [], - "SsAnim": [ - "SfBoost" - ], - "Wakeup": [ - "SfBoost" - ] - } - }, - "platform": { - "noteClusterCpuId": "集群的CPU代表id", - "clusterCpuId": [ - 0, - 4, - 7 - ], - "noteEfficiency": "每个CPU核心的的相对同频性能,以Cortex-A53@1.0g为100", - "efficiency": [ - 115, - 115, - 115, - 115, - 320, - 320, - 320, - 400 - ], - "knobs": [ + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ { - "name": "cpuFreqMax", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最大频率,单位为100Mhz" - }, + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ { - "name": "cpuFreqMin", - "path": "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_min_freq", - "type": "cpufreq", - "enable": true, - "note": "集群最小频率,单位为100Mhz" - }, + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ { - "name": "schedBoost", - "path": "/proc/sys/kernel/sched_boost", - "type": "string", - "enable": true, - "note": "异构调度器全局任务放置boost,不考虑能耗代价" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ { - "name": "topBoost", - "path": "/dev/cpuctl/top-app/cpu.uclamp.min", - "type": "string", - "enable": true, - "note": "正在交互的App的schedtune.boost" - }, + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ { - "name": "heavyBoost", - "path": "/dev/cpuctl/rt/cpu.uclamp.min", - "type": "string", - "enable": true, - "note": "重负载线程的schedtune.boost" - }, + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ { - "name": "llccBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpu-cpu-llcc-bw/max_freq", - "type": "string", - "enable": true, - "note": "LLCC最大带宽" - }, + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, { - "name": "llccBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpu-cpu-llcc-bw/min_freq", - "type": "string", - "enable": true, - "note": "LLCC最小带宽" - }, + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, { - "name": "ddrBwMax", - "path": "/sys/class/devfreq/soc:qcom,cpu-llcc-ddr-bw/max_freq", - "type": "string", - "enable": true, - "note": "DDR最大带宽" - }, + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, { - "name": "ddrBwMin", - "path": "/sys/class/devfreq/soc:qcom,cpu-llcc-ddr-bw/min_freq", - "type": "string", - "enable": true, - "note": "DDR最小带宽" - }, + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, { - "name": "l3LatBig", - "path": "/sys/class/devfreq/18590100.qcom,cpu4-cpu-l3-lat/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核L3延迟控制,在L3命中率降低时,值越大越容易提升L3频率" - }, + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, { - "name": "ddrLatBig", - "path": "/sys/class/devfreq/soc:qcom,cpu4-llcc-ddr-lat/mem_latency/ratio_ceil", - "type": "string", - "enable": true, - "note": "大核DDR延迟控制,在DDR命中率降低时,值越大越容易提升DDR频率" - }, + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, { - "name": "uxAffinity", - "path": "placeholder", - "type": "uxaffinity", - "enable": true, - "note": "0=idle,1=active,2=pulse,3=heavy,4=unlimited" - }, + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, { - "name": "dispFeature", - "path": "placeholder", - "type": "dispfeature", - "enable": true, - "note": "0=空闲,1=活动,2=正在交互" - } - ] - }, - "powermodes": [ - { - "name": "balance", - "note": "均衡模式,比原厂略流畅的同时略省电", - "actions": { - "normal": { - "cpuFreqMax": "16,19,24", - "cpuFreqMin": "1,7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "17,19,24", - "cpuFreqMin": "7,10,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "0", - "ddrBwMax": "6881", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "17,15,20", - "cpuFreqMin": "11,10,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "40", - "llccBwMax": "15258", - "llccBwMin": "8391", - "ddrBwMax": "12191", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "17,17,20", - "cpuFreqMin": "11,10,10", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "40", - "llccBwMax": "15258", - "llccBwMin": "8391", - "ddrBwMax": "12191", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,19,24", - "cpuFreqMin": "11,13,14", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "40", - "llccBwMax": "15258", - "llccBwMin": "8391", - "ddrBwMax": "12191", - "ddrBwMin": "2408", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "17,19,20", - "cpuFreqMin": "11,19,10", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "18,19,28", - "cpuFreqMin": "11,17,24", - "topBoost": "0", - "heavyBoost": "40", - "llccBwMax": "15258", - "llccBwMin": "15258", - "ddrBwMax": "12191", - "ddrBwMin": "12191", - "uxAffinity": "2" - } - } - }, - { - "name": "powersave", - "note": "卡顿模式,保证基本流畅的同时尽可能降低功耗", - "actions": { - "normal": { - "cpuFreqMax": "14,13,15", - "cpuFreqMin": "1,7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "13732", - "llccBwMin": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "16,11,13", - "cpuFreqMin": "7,7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "13732", - "llccBwMin": "0", - "ddrBwMax": "6192", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "0", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "16,10,11", - "cpuFreqMin": "7,7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "30", - "llccBwMax": "15258", - "llccBwMin": "8391", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "18,13,15", - "cpuFreqMin": "7,7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "30", - "llccBwMax": "15258", - "llccBwMin": "8391", - "ddrBwMax": "12191", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "400", - "uxAffinity": "1", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,15,18", - "cpuFreqMin": "7,8,9", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "30", - "llccBwMax": "15258", - "llccBwMin": "8391", - "ddrBwMax": "6881", - "ddrBwMin": "2408", - "l3LatBig": "8000", - "ddrLatBig": "800", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "16,15,11", - "cpuFreqMin": "7,15,8", - "uxAffinity": "1" - }, - "sfBoost": { - "cpuFreqMax": "18,19,22", - "cpuFreqMin": "7,15,18", - "topBoost": "0", - "heavyBoost": "30", - "llccBwMax": "15258", - "llccBwMin": "13732", - "ddrBwMax": "12191", - "ddrBwMin": "4816", - "uxAffinity": "2" - } - } - }, - { - "name": "performance", - "note": "费电模式,保证费电的同时多一点流畅度", - "actions": { - "normal": { - "cpuFreqMax": "18,24,28", - "cpuFreqMin": "6,7,8", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "0", - "ddrBwMax": "12191", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "0" - }, - "active": { - "cpuFreqMax": "18,24,28", - "cpuFreqMin": "9,10,11", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "0", - "ddrBwMax": "12191", - "ddrBwMin": "0", - "l3LatBig": "4000", - "ddrLatBig": "400", - "uxAffinity": "4", - "dispFeature": "1" - }, - "interaction": { - "cpuFreqMax": "18,21,24", - "cpuFreqMin": "9,13,15", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "13732", - "ddrBwMax": "12191", - "ddrBwMin": "4816", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "pressed": { - "cpuFreqMax": "18,19,22", - "cpuFreqMin": "9,19,22", - "schedBoost": "0", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "13732", - "ddrBwMax": "12191", - "ddrBwMin": "4816", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "heavyLoad": { - "cpuFreqMax": "18,24,28", - "cpuFreqMin": "18,19,22", - "schedBoost": "1", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "15258", - "ddrBwMax": "12191", - "ddrBwMin": "12191", - "l3LatBig": "20000", - "ddrLatBig": "4000", - "uxAffinity": "3", - "dispFeature": "2" - }, - "sfLag": { - "cpuFreqMax": "18,24,28", - "cpuFreqMin": "9,24,22", - "uxAffinity": "3" - }, - "sfBoost": { - "cpuFreqMax": "18,24,28", - "cpuFreqMin": "9,24,28", - "topBoost": "0", - "heavyBoost": "0", - "llccBwMax": "15258", - "llccBwMin": "15258", - "ddrBwMax": "12191", - "ddrBwMin": "12191", - "uxAffinity": "3" - } + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" } + ] } - ] + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.3, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } } \ No newline at end of file diff --git a/magisk/config/sdm8g1+.json b/magisk/config/sdm8g1+.json new file mode 100644 index 0000000..0723b5d --- /dev/null +++ b/magisk/config/sdm8g1+.json @@ -0,0 +1,585 @@ +{ + "meta": { + "name": "sdm8g1+[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 140, + "nr": 4, + "typicalPower": 0.5, + "typicalFreq": 1.8, + "sweetFreq": 1.4, + "plainFreq": 0.9, + "freeFreq": 0.5 + }, + { + "efficiency": 340, + "nr": 3, + "typicalPower": 1.7, + "typicalFreq": 2.7, + "sweetFreq": 1.8, + "plainFreq": 1.0, + "freeFreq": 0.7 + }, + { + "efficiency": 420, + "nr": 1, + "typicalPower": 3.6, + "typicalFreq": 3.2, + "sweetFreq": 2.1, + "plainFreq": 1.6, + "freeFreq": 0.8 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3 + ], + "c1": [ + 4, + 5, + 6 + ], + "c2": [ + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, + { + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, + { + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, + { + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, + { + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ + { + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ + { + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ + { + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, + { + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, + { + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, + { + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" + } + ] + } + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.3, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } +} \ No newline at end of file diff --git a/magisk/config/sdm8g1.json b/magisk/config/sdm8g1.json new file mode 100644 index 0000000..e56c1d7 --- /dev/null +++ b/magisk/config/sdm8g1.json @@ -0,0 +1,585 @@ +{ + "meta": { + "name": "sdm8g1[22.07.09] (FDE.AI Edition)", + "author": "yc@coolapk" + }, + "modules": { + "switcher": { + "switchInode": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "perapp": "/sdcard/Android/yc/uperf/perapp_powermode.txt", + "hintDuration": { + "idle": 0.0, + "touch": 4.0, + "trigger": 0.03, + "gesture": 0.1, + "switch": 0.4, + "junk": 0.06 + } + }, + "atrace": { + "enable": false + }, + "log": { + "level": "info" + }, + "input": { + "enable": true, + "swipeThd": 0.01, + "gestureThdX": 0.03, + "gestureThdY": 0.03, + "gestureDelayTime": 2.0, + "holdEnterTime": 1.0 + }, + "sfanalysis": { + "enable": true, + "renderIdleSlackTime": 0.2 + }, + "cpu": { + "enable": true, + "powerModel": [ + { + "efficiency": 140, + "nr": 4, + "typicalPower": 0.61, + "typicalFreq": 1.8, + "sweetFreq": 1.4, + "plainFreq": 0.9, + "freeFreq": 0.5 + }, + { + "efficiency": 340, + "nr": 3, + "typicalPower": 2.3, + "typicalFreq": 2.5, + "sweetFreq": 1.7, + "plainFreq": 1.0, + "freeFreq": 0.7 + }, + { + "efficiency": 420, + "nr": 1, + "typicalPower": 4.0, + "typicalFreq": 3.0, + "sweetFreq": 2.0, + "plainFreq": 1.4, + "freeFreq": 0.8 + } + ] + }, + "sysfs": { + "enable": false, + "knob": {} + }, + "sched": { + "enable": true, + "cpumask": { + "all": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "c0": [ + 0, + 1, + 2, + 3 + ], + "c1": [ + 4, + 5, + 6 + ], + "c2": [ + 7 + ] + }, + "affinity": { + "auto": { + "bg": "", + "fg": "", + "idle": "", + "touch": "", + "boost": "" + }, + "norm": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "all", + "boost": "all" + }, + "bg": { + "bg": "", + "fg": "c0", + "idle": "c0", + "touch": "c0", + "boost": "c0" + }, + "ui": { + "bg": "", + "fg": "all", + "idle": "c1", + "touch": "c1", + "boost": "all" + }, + "crit": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "c1" + }, + "gtcoop": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c1", + "boost": "all" + }, + "gtmain": { + "bg": "", + "fg": "all", + "idle": "all", + "touch": "c2", + "boost": "all" + } + }, + "prio": { + "auto": { + "bg": 0, + "fg": 0, + "idle": 0, + "touch": 0, + "boost": 0 + }, + "norm": { + "bg": -1, + "fg": -1, + "idle": -1, + "touch": -1, + "boost": -1 + }, + "bg": { + "bg": -3, + "fg": 139, + "idle": 139, + "touch": 139, + "boost": 139 + }, + "coop": { + "bg": -3, + "fg": 124, + "idle": 122, + "touch": 122, + "boost": 130 + }, + "ui": { + "bg": -3, + "fg": 120, + "idle": 110, + "touch": 98, + "boost": 116 + }, + "rtusr": { + "bg": 98, + "fg": 98, + "idle": 97, + "touch": 97, + "boost": 98 + }, + "rtsys": { + "bg": 97, + "fg": 97, + "idle": 96, + "touch": 96, + "boost": 97 + } + }, + "rules": [ + { + "name": "Launcher", + "regex": "/HOME_PACKAGE/", + "pinned": true, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "rtusr" + }, + { + "k": "^(RenderThread|GLThread)", + "ac": "crit", + "pc": "rtusr" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SurfaceFlinger", + "regex": "/system/bin/surfaceflinger", + "pinned": true, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "crit", + "pc": "auto" + }, + { + "k": "^(app|RenderEngine)", + "ac": "crit", + "pc": "auto" + }, + { + "k": "^Binder:", + "ac": "auto", + "pc": "auto" + }, + { + "k": ".", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "SystemServer", + "regex": "system_server", + "pinned": true, + "rules": [ + { + "k": "^(TaskSnapshot|Greezer|CachedApp|SystemPressure|SensorService)|[Mm]emory", + "ac": "bg", + "pc": "auto" + }, + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "SystemUI", + "regex": "com.android.systemui", + "pinned": true, + "rules": [ + { + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "MediaProvider", + "regex": "^com.android.providers.media", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Memory reclaim", + "regex": "swapd|compactd", + "pinned": true, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "bg" + } + ] + }, + { + "name": "Phone", + "regex": "com.android.phone", + "pinned": false, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "Other system processes", + "regex": "^(/system|/vendor|magiskd|zygiskd)|@|-service$", + "pinned": false, + "rules": [ + { + "k": ".", + "ac": "auto", + "pc": "auto" + } + ] + }, + { + "name": "App co-process", + "regex": "[.].+:", + "pinned": false, + "rules": [ + { + "k": "^(Jit thread pool|HeapTaskDaemon|FinalizerDaemon|ReferenceQueueD)", + "ac": "bg", + "pc": "auto" + } + ] + }, + { + "name": "Default rule", + "regex": ".", + "pinned": false, + "rules": [ + { + "k": "/MAIN_THREAD/", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(UnityMain|RenderThread |GameThread)", + "ac": "gtmain", + "pc": "auto" + }, + { + "k": "^(Unity|Worker Thread|TaskGraph|RHIThread)", + "ac": "gtcoop", + "pc": "auto" + }, + { + "k": "^(RenderThread|GLThread|JNISurfaceText|IJK_External_Re)|[Aa]nim|([.]raster|[.]ui)$", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(Chrome_InProc|CrRendererMain|CrGpuMain|CompositorTile)", + "ac": "norm", + "pc": "norm" + }, + { + "k": "^(Viz|Chrome_|Compositor)|[Vv]sync|mali-", + "ac": "ui", + "pc": "ui" + }, + { + "k": "^(OkHttp|Ysa|Xqa|Rx|TVKDL|APM|tp-|cgi-|ODCP-|Bugly|xlog_)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(xg_vip_service|Profile|SearchDaemon|default_matrix|FrameDecoder|FrameSeq)", + "ac": "bg", + "pc": "auto" + }, + { + "k": "^(GPU completion|HWC release|hwui|FramePolicy|ScrollPolicy|ged-swd)", + "ac": "bg", + "pc": "rtusr" + }, + { + "k": "^(JS|libweexjsb|WeexJsBridge|mqt_native|mqt_js|JavaScriptTh)", + "ac": "norm", + "pc": "coop" + }, + { + "k": "^(pool-|glide-|launcher-)|[Dd]ownload|[Ss]chedule|[Ww]ork|[Pp]ool|[Dd]efau|Fresco", + "ac": "norm", + "pc": "coop" + }, + { + "k": ".", + "ac": "norm", + "pc": "norm" + } + ] + } + ] + } + }, + "initials": { + "cpu": { + "baseSampleTime": 0.01, + "baseSlackTime": 0.01, + "latencyTime": 0.5, + "slowLimitPower": 3.0, + "fastLimitPower": 6.0, + "fastLimitCapacity": 10.0, + "fastLimitRecoverScale": 0.3, + "predictThd": 0.3, + "margin": 0.25, + "burst": 0.0, + "guideCap": true, + "limitEfficiency": false + }, + "sysfs": {}, + "sched": { + "scene": "idle" + } + }, + "presets": { + "balance": { + "*": { + "cpu.latencyTime": 0.2, + "cpu.slowLimitPower": 2.0, + "cpu.fastLimitPower": 2.0, + "cpu.fastLimitCapacity": 20.0, + "cpu.margin": 0.2 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 0.3, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.6, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 3.0, + "cpu.fastLimitPower": 6.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.4, + "sched.scene": "boost" + } + }, + "powersave": { + "*": { + "cpu.latencyTime": 0.4, + "cpu.slowLimitPower": 1.0, + "cpu.fastLimitPower": 1.0, + "cpu.fastLimitCapacity": 5.0, + "cpu.margin": 0.1 + }, + "idle": { + "cpu.baseSampleTime": 0.04, + "cpu.baseSlackTime": 0.08, + "cpu.predictThd": 1.0, + "cpu.limitEfficiency": true, + "sched.scene": "idle" + }, + "touch": { + "cpu.baseSampleTime": 0.04, + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.4, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.6, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.3, + "sched.scene": "touch" + }, + "switch": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 1.5, + "cpu.fastLimitPower": 3.0, + "cpu.fastLimitRecoverScale": 0.1, + "cpu.margin": 0.3, + "sched.scene": "boost" + } + }, + "performance": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 4.0, + "cpu.fastLimitPower": 10.0, + "cpu.fastLimitCapacity": 360.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + }, + "fast": { + "*": { + "cpu.latencyTime": 0.0, + "cpu.slowLimitPower": 2.5, + "cpu.fastLimitPower": 2.5, + "cpu.fastLimitCapacity": 0.0, + "cpu.margin": 0.4 + }, + "idle": { + "cpu.baseSampleTime": 0.01, + "cpu.baseSlackTime": 0.04, + "sched.scene": "idle" + }, + "touch": { + "sched.scene": "touch" + }, + "trigger": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "gesture": { + "cpu.margin": 0.8, + "sched.scene": "touch" + }, + "junk": { + "cpu.burst": 0.5, + "sched.scene": "touch" + }, + "switch": { + "cpu.burst": 0.2, + "sched.scene": "boost" + } + } + } +} \ No newline at end of file diff --git a/magisk/customize.sh b/magisk/customize.sh deleted file mode 100644 index a488717..0000000 --- a/magisk/customize.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/system/bin/sh - -$BOOTMODE || abort "! Uperf cannot be installed in recovery." -ui_print "- Extracting module files" -unzip -o "$ZIPFILE" -x 'META-INF/*' -d "$MODPATH" > /dev/null -sh "$MODPATH"/setup_uperf.sh -[ "$?" != "0" ] && abort -rm "$MODPATH"/setup_uperf.sh diff --git a/magisk/flag/fdeai b/magisk/flag/fdeai new file mode 100644 index 0000000..3cacc0b --- /dev/null +++ b/magisk/flag/fdeai @@ -0,0 +1 @@ +12 \ No newline at end of file diff --git a/magisk/flags/.placeholder b/magisk/flags/.placeholder deleted file mode 100644 index e69de29..0000000 diff --git a/magisk/initsvc_uperf.sh b/magisk/initsvc_uperf.sh deleted file mode 100755 index 7f9abb5..0000000 --- a/magisk/initsvc_uperf.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/system/bin/sh -# Uperf Service Script -# https://github.com/yc9559/ -# Author: Matt Yang -# Version: 20200401 -# FeraVolt: No logs, we're good - -BASEDIR="/data/adb/modules/uperf" - -wait_until_login() -{ - # in case of /data encryption is disabled - while [ "$(getprop sys.boot_completed)" != "1" ]; do - sleep 2 - done - - # we doesn't have the permission to rw "/sdcard" before the user unlocks the screen - local test_file="/sdcard/Android/.PERMISSION_TEST" - true > "$test_file" - while [ ! -f "$test_file" ]; do - true > "$test_file" - sleep 2 - done - rm "$test_file" -} - -wait_until_login -sh "$BASEDIR"/script/prepare.sh -sh "$BASEDIR"/script/powercfg_once.sh -sh "$BASEDIR"/script/start_injector.sh diff --git a/magisk/install.sh b/magisk/install.sh new file mode 100644 index 0000000..7dee639 --- /dev/null +++ b/magisk/install.sh @@ -0,0 +1,123 @@ +########################################################################################## +# Config Flags +########################################################################################## + +# Set to true if you do *NOT* want Magisk to mount +# any files for you. Most modules would NOT want +# to set this flag to true +SKIPMOUNT=false + +# Set to true if you need to load system.prop +PROPFILE=true + +# Set to true if you need post-fs-data script +POSTFSDATA=true + +# Set to true if you need late_start service script +LATESTARTSERVICE=true + +########################################################################################## +# Replace list +########################################################################################## + +# List all directories you want to directly replace in the system +# Check the documentations for more info why you would need this + +# Construct your list in the following format +# This is an example +# REPLACE_EXAMPLE=" +# /system/app/Youtube +# /system/priv-app/SystemUI +# /system/priv-app/Settings +# /system/framework +# " + +# Construct your own list here +REPLACE="" + +########################################################################################## +# +# Function Callbacks +# +# The following functions will be called by the installation framework. +# You do not have the ability to modify update-binary, the only way you can customize +# installation is through implementing these functions. +# +# When running your callbacks, the installation framework will make sure the Magisk +# internal busybox path is *PREPENDED* to PATH, so all common commands shall exist. +# Also, it will make sure /data, /system, and /vendor is properly mounted. +# +########################################################################################## +########################################################################################## +# +# The installation framework will export some variables and functions. +# You should use these variables and functions for installation. +# +# ! DO NOT use any Magisk internal paths as those are NOT public API. +# ! DO NOT use other functions in util_functions.sh as they are NOT public API. +# ! Non public APIs are not guranteed to maintain compatibility between releases. +# +# Available variables: +# +# MAGISK_VER (string): the version string of current installed Magisk +# MAGISK_VER_CODE (int): the version code of current installed Magisk +# BOOTMODE (bool): true if the module is currently installing in Magisk Manager +# MODPATH (path): the path where your module files should be installed +# TMPDIR (path): a place where you can temporarily store files +# ZIPFILE (path): your module's installation zip +# ARCH (string): the architecture of the device. Value is either arm, arm64, x86, or x64 +# IS64BIT (bool): true if $ARCH is either arm64 or x64 +# API (int): the API level (Android version) of the device +# +# Availible functions: +# +# ui_print +# print to console +# Avoid using 'echo' as it will not display in custom recovery's console +# +# abort +# print error message to console and terminate installation +# Avoid using 'exit' as it will skip the termination cleanup steps +# +# set_perm [context] +# if [context] is empty, it will default to "u:object_r:system_file:s0" +# this function is a shorthand for the following commands +# chown owner.group target +# chmod permission target +# chcon context target +# +# set_perm_recursive [context] +# if [context] is empty, it will default to "u:object_r:system_file:s0" +# for all files in , it will call: +# set_perm file owner group filepermission context +# for all directories in (including itself), it will call: +# set_perm dir owner group dirpermission context +# +##########################################################################################x + +# Set what you want to display when installing your module +print_modname() { + return +} + +# Copy/extract your module files into $MODPATH in on_install. +on_install() { + $BOOTMODE || abort "! Uperf cannot be installed in recovery." + [ $ARCH == "arm64" ] || abort "! Uperf ONLY support arm64 platform." + + ui_print "- Extracting module files" + unzip -o "$ZIPFILE" -x 'META-INF/*' -d $MODPATH >/dev/null + + # use universal setup.sh + sh $MODPATH/script/setup.sh + [ "$?" != "0" ] && abort +} + +# Only some special files require specific permissions +# This function will be called after on_install is done +# The default permissions should be good enough for most cases +set_permissions() { + return +} + +# You can add more functions to assist your custom script code diff --git a/magisk/module.prop b/magisk/module.prop index 9db9f10..1797037 100644 --- a/magisk/module.prop +++ b/magisk/module.prop @@ -1,7 +1,6 @@ id=uperf name=Uperf (FDE.AI edition) -version=v2.01 (21.08.15) -versionCode=201 +version=v3.01 (22.07.09) +versionCode=320709 author=Matt Yang -description=Userspace performance controller for android. Modified by FeraVolt for FDE.AI v12.5.1+. -minMagisk=20400 +description=Userspace performance controller for android. Modified by FeraVolt for FDE.AI v22.x+. diff --git a/magisk/script/initsvc.sh b/magisk/script/initsvc.sh new file mode 100644 index 0000000..7ff7fb0 --- /dev/null +++ b/magisk/script/initsvc.sh @@ -0,0 +1,26 @@ +#!/vendor/bin/sh +# +# Copyright (C) 2021-2022 Matt Yang +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +BASEDIR="$(dirname $(readlink -f "$0"))" +. $BASEDIR/pathinfo.sh +. $BASEDIR/libcommon.sh +. $BASEDIR/libuperf.sh + +wait_until_login + +sh $SCRIPT_PATH/powercfg_once.sh +uperf_start diff --git a/magisk/script/libcgroup.sh b/magisk/script/libcgroup.sh index 120c070..2ee61ef 100644 --- a/magisk/script/libcgroup.sh +++ b/magisk/script/libcgroup.sh @@ -1,12 +1,19 @@ #!/system/bin/sh -# Cgroup Library -# https://github.com/yc9559/ -# Author: Matt Yang -# Version: 20210530 - -BASEDIR="/data/adb/modules/uperf" -. $BASEDIR/script/pathinfo.sh -. $BASEDIR/script/libcommon.sh +# +# Copyright (C) 2021-2022 Matt Yang +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # process scan cache ps_ret="" @@ -23,80 +30,73 @@ ps_ret="" # CPUID_HIGH="4-7" # $1:task_name $2:cgroup_name $3:"cpuset"/"stune" -change_task_cgroup() -{ +change_task_cgroup() { local comm for temp_pid in $(echo "$ps_ret" | grep -i -E "$1" | awk '{print $1}'); do for temp_tid in $(ls "/proc/$temp_pid/task/"); do - comm="$(cat /proc/"$temp_pid"/task/"$temp_tid"/comm)" - echo "$temp_tid" > "/dev/$3/$2/tasks" + comm="$(cat /proc/$temp_pid/task/$temp_tid/comm)" + echo "$temp_tid" >"/dev/$3/$2/tasks" done done } # $1:process_name $2:cgroup_name $3:"cpuset"/"stune" -change_proc_cgroup() -{ +change_proc_cgroup() { local comm for temp_pid in $(echo "$ps_ret" | grep -i -E "$1" | awk '{print $1}'); do - comm="$(cat /proc/"$temp_pid"/comm)" - echo "$temp_pid" > "/dev/$3/$2/cgroup.procs" + comm="$(cat /proc/$temp_pid/comm)" + echo $temp_pid >"/dev/$3/$2/cgroup.procs" done } # $1:task_name $2:thread_name $3:cgroup_name $4:"cpuset"/"stune" -change_thread_cgroup() -{ +change_thread_cgroup() { local comm for temp_pid in $(echo "$ps_ret" | grep -i -E "$1" | awk '{print $1}'); do for temp_tid in $(ls "/proc/$temp_pid/task/"); do - comm="$(cat /proc/"$temp_pid"/task/"$temp_tid"/comm)" - if [ "$(echo "$comm" | grep -i -E "$2")" != "" ]; then - echo "$temp_tid" > "/dev/$4/$3/tasks" + comm="$(cat /proc/$temp_pid/task/$temp_tid/comm)" + if [ "$(echo $comm | grep -i -E "$2")" != "" ]; then + echo "$temp_tid" >"/dev/$4/$3/tasks" fi done done } # $1:task_name $2:cgroup_name $3:"cpuset"/"stune" -change_main_thread_cgroup() -{ +change_main_thread_cgroup() { local comm for temp_pid in $(echo "$ps_ret" | grep -i -E "$1" | awk '{print $1}'); do - comm="$(cat /proc/"$temp_pid"/comm)" - echo "$temp_pid" > "/dev/$3/$2/tasks" + comm="$(cat /proc/$temp_pid/comm)" + echo $temp_pid >"/dev/$3/$2/tasks" done } # $1:task_name $2:hex_mask(0x00000003 is CPU0 and CPU1) -change_task_affinity() -{ +change_task_affinity() { local comm for temp_pid in $(echo "$ps_ret" | grep -i -E "$1" | awk '{print $1}'); do for temp_tid in $(ls "/proc/$temp_pid/task/"); do - comm="$(cat /proc/"$temp_pid"/task/"$temp_tid"/comm)" - taskset -p "$2" "$temp_tid" >> "$LOG_FILE" + comm="$(cat /proc/$temp_pid/task/$temp_tid/comm)" + taskset -p "$2" "$temp_tid" >>$LOG_FILE done done } # $1:task_name $2:thread_name $3:hex_mask(0x00000003 is CPU0 and CPU1) -change_thread_affinity() -{ +change_thread_affinity() { local comm for temp_pid in $(echo "$ps_ret" | grep -i -E "$1" | awk '{print $1}'); do for temp_tid in $(ls "/proc/$temp_pid/task/"); do - comm="$(cat /proc/"$temp_pid"/task/"$temp_tid"/comm)" - if [ "$(echo "$comm" | grep -i -E "$2")" != "" ]; then - taskset -p "$3" "$temp_tid" >> "$LOG_FILE" + comm="$(cat /proc/$temp_pid/task/$temp_tid/comm)" + if [ "$(echo $comm | grep -i -E "$2")" != "" ]; then + taskset -p "$3" "$temp_tid" >>$LOG_FILE fi done done } # $1:task_name $2:nice(relative to 120) -change_task_nice() -{ +change_task_nice() { for temp_pid in $(echo "$ps_ret" | grep -i -E "$1" | awk '{print $1}'); do for temp_tid in $(ls "/proc/$temp_pid/task/"); do renice -n +40 -p "$temp_tid" @@ -107,13 +107,12 @@ change_task_nice() } # $1:task_name $2:thread_name $3:nice(relative to 120) -change_thread_nice() -{ +change_thread_nice() { local comm for temp_pid in $(echo "$ps_ret" | grep -i -E "$1" | awk '{print $1}'); do for temp_tid in $(ls "/proc/$temp_pid/task/"); do - comm="$(cat /proc/"$temp_pid"/task/"$temp_tid"/comm)" - if [ "$(echo "$comm" | grep -i -E "$2")" != "" ]; then + comm="$(cat /proc/$temp_pid/task/$temp_tid/comm)" + if [ "$(echo $comm | grep -i -E "$2")" != "" ]; then renice -n +40 -p "$temp_tid" renice -n -19 -p "$temp_tid" renice -n "$3" -p "$temp_tid" @@ -123,98 +122,85 @@ change_thread_nice() } # $1:task_name $2:priority(99-x, 1<=x<=99) -change_task_rt() -{ +change_task_rt() { for temp_pid in $(echo "$ps_ret" | grep -i -E "$1" | awk '{print $1}'); do for temp_tid in $(ls "/proc/$temp_pid/task/"); do - comm="$(cat /proc/"$temp_pid"/task/"$temp_tid"/comm)" - chrt -f -p "$2" "$temp_tid" >> "$LOG_FILE" + comm="$(cat /proc/$temp_pid/task/$temp_tid/comm)" + chrt -f -p "$2" "$temp_tid" >>$LOG_FILE done done } # $1:task_name $2:thread_name $3:priority(99-x, 1<=x<=99) -change_thread_rt() -{ +change_thread_rt() { local comm for temp_pid in $(echo "$ps_ret" | grep -i -E "$1" | awk '{print $1}'); do for temp_tid in $(ls "/proc/$temp_pid/task/"); do - comm="$(cat /proc/"$temp_pid"/task/"$temp_tid"/comm)" - if [ "$(echo "$comm" | grep -i -E "$2")" != "" ]; then - chrt -f -p "$3" "$temp_tid" >> "$LOG_FILE" + comm="$(cat /proc/$temp_pid/task/$temp_tid/comm)" + if [ "$(echo $comm | grep -i -E "$2")" != "" ]; then + chrt -f -p "$3" "$temp_tid" >>$LOG_FILE fi done done } # $1:task_name -change_task_high_prio() -{ +change_task_high_prio() { # audio thread nice <= -16 change_task_nice "$1" "-15" } # $1:task_name $2:thread_name -change_thread_high_prio() -{ +change_thread_high_prio() { # audio thread nice <= -16 change_thread_nice "$1" "$2" "-15" } # $1:task_name $2:thread_name -unpin_thread() -{ +unpin_thread() { change_thread_cgroup "$1" "$2" "" "cpuset" } # $1:task_name $2:thread_name -pin_thread_on_pwr() -{ +pin_thread_on_pwr() { change_thread_cgroup "$1" "$2" "background" "cpuset" } # $1:task_name $2:thread_name -pin_thread_on_mid() -{ +pin_thread_on_mid() { unpin_thread "$1" "$2" change_thread_affinity "$1" "$2" "7f" } # $1:task_name $2:thread_name -pin_thread_on_perf() -{ +pin_thread_on_perf() { unpin_thread "$1" "$2" change_thread_affinity "$1" "$2" "f0" } # $1:task_name -unpin_proc() -{ +unpin_proc() { change_task_cgroup "$1" "" "cpuset" } # $1:task_name -pin_proc_on_pwr() -{ +pin_proc_on_pwr() { change_task_cgroup "$1" "background" "cpuset" } # $1:task_name -pin_proc_on_mid() -{ +pin_proc_on_mid() { unpin_proc "$1" change_task_affinity "$1" "7f" } # $1:task_name -pin_proc_on_perf() -{ +pin_proc_on_perf() { unpin_proc "$1" change_task_affinity "$1" "f0" } -rebuild_process_scan_cache() -{ +rebuild_process_scan_cache() { # avoid matching grep itself # ps -Ao pid,args | grep kswapd # 150 [kswapd0] diff --git a/magisk/script/libcommon.sh b/magisk/script/libcommon.sh index 1deb8aa..19dd90a 100644 --- a/magisk/script/libcommon.sh +++ b/magisk/script/libcommon.sh @@ -1,32 +1,69 @@ #!/system/bin/sh -# Basic Tool Library -# https://github.com/yc9559/ -# Author: Matt Yang -# Version: 20210523 - -BASEDIR="/data/adb/modules/uperf" -. $BASEDIR/script/pathinfo.sh +# +# Copyright (C) 2021-2022 Matt Yang +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ############################### # Basic tool functions ############################### # $1:value $2:filepaths -mutate() -{ +lock_val() { + for p in $2; do + if [ -f "$p" ]; then + chown root:root "$p" + chmod 0666 "$p" + echo "$1" >"$p" + fi + done +} + +# $1:value $2:filepaths +mask_val() { + touch /data/local/tmp/mount_mask + for p in $2; do + if [ -f "$p" ]; then + umount "$p" + chmod 0666 "$p" + echo "$1" >"$p" + mount --bind /data/local/tmp/mount_mask "$p" + fi + done +} + +# $1:value $2:filepaths +mutate() { for p in $2; do if [ -f "$p" ]; then - chmod 0666 "$p" 2> /dev/null - echo "$1" > "$p" + chmod 0666 "$p" + echo "$1" >"$p" fi done } +# $1:file path +lock() { + if [ -f "$1" ]; then + chown root:root "$p" + fi +} + # $1:value $2:list -has_val_in_list() -{ +has_val_in_list() { for item in $2; do - if [ "$1" = "$item" ]; then + if [ "$1" == "$item" ]; then echo "true" return fi @@ -39,8 +76,7 @@ has_val_in_list() ############################### # $1:key $return:value(string) -read_cfg_value() -{ +read_cfg_value() { local value="" if [ -f "$PANEL_FILE" ]; then value="$(grep -i "^$1=" "$PANEL_FILE" | head -n 1 | tr -d ' ' | cut -d= -f2)" @@ -49,29 +85,26 @@ read_cfg_value() } # $1:content -write_panel() -{ - echo "$1" >> "$PANEL_FILE" +write_panel() { + echo "$1" >>"$PANEL_FILE" } -clear_panel() -{ - true > "$PANEL_FILE" +clear_panel() { + true >"$PANEL_FILE" } -wait_until_login() -{ +wait_until_login() { # in case of /data encryption is disabled while [ "$(getprop sys.boot_completed)" != "1" ]; do - sleep 1 + sleep 2 done # we doesn't have the permission to rw "/sdcard" before the user unlocks the screen local test_file="/sdcard/Android/.PERMISSION_TEST" - true > "$test_file" + true >"$test_file" while [ ! -f "$test_file" ]; do - true > "$test_file" - sleep 1 + true >"$test_file" + sleep 2 done rm "$test_file" } @@ -81,61 +114,10 @@ wait_until_login() ############################### # $1:content -log() -{ - echo "$1" >> "$LOG_FILE" +log() { + echo "$1" } -clear_log() -{ - true > "$LOG_FILE" -} - -############################### -# Platform info functions -############################### - -# $1:"4.14" return:string_in_version -match_linux_version() -{ - echo "$(cat /proc/version | grep -i "$1")" -} - -# return:platform_name -get_platform_name() -{ - echo "$(getprop ro.board.platform)" -} - -# return_nr_core -get_nr_core() -{ - echo "$(cat /proc/stat | grep cpu[0-9] | wc -l)" -} - -is_aarch64() -{ - if [ "$(getprop ro.product.cpu.abi)" = "arm64-v8a" ]; then - echo "true" - else - echo "false" - fi -} - -is_mtk() -{ - if [ "$(getprop | grep ro.mtk)" != "" ]; then - echo "true" - else - echo "false" - fi -} - -is_magisk() -{ - if [ "$(echo "$BASEDIR" | grep "^\/data\/adb\/modules")" != "" ]; then - echo "true" - else - echo "false" - fi +clear_log() { + echo true } diff --git a/magisk/script/libpowercfg.sh b/magisk/script/libpowercfg.sh index 4b174d7..4cd22b5 100644 --- a/magisk/script/libpowercfg.sh +++ b/magisk/script/libpowercfg.sh @@ -1,176 +1,92 @@ #!/system/bin/sh -# Powercfg Library -# https://github.com/yc9559/ -# Author: Matt Yang -# Version: 20210411 - -BASEDIR="/data/adb/modules/uperf" -. $BASEDIR/script/pathinfo.sh -. $BASEDIR/script/libcommon.sh - -############################### -# PATHs -############################### - -PERFCFG_REL="./system/vendor/etc/perf" - -############################### -# Abbreviations -############################### - -SCHED="/proc/sys/kernel" -CPU="/sys/devices/system/cpu" -KSGL="/sys/class/kgsl/kgsl-3d0" -DEVFREQ="/sys/class/devfreq" -LPM="/sys/module/lpm_levels/parameters" -MSM_PERF="/sys/module/msm_performance/parameters" -SDA_Q="/sys/block/sda/queue" +# +# Copyright (C) 2021-2022 Matt Yang +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ############################### # Powermodes helper functions ############################### # $1:keyword $2:nr_max_matched -get_package_name_by_keyword() -{ +get_package_name_by_keyword() { echo "$(pm list package | grep "$1" | head -n "$2" | cut -d: -f2)" } -is_eas() -{ - if [ "$(grep sched $CPU/cpu0/cpufreq/scaling_available_governors)" != "" ]; then - echo "true" - else - echo "false" - fi -} - -# $1:cpuid -get_maxfreq() -{ - local fpath="/sys/devices/system/cpu/cpu$1/cpufreq/scaling_available_frequencies" - local maxfreq="0" - - if [ ! -f "$fpath" ]; then - echo "" - return - fi - - for f in $(cat "$fpath"); do - [ "$f" -gt "$maxfreq" ] && maxfreq="$f" - done - echo "$maxfreq" -} - # $1:"0:576000 4:710400 7:825600" -set_cpufreq_min() -{ - mutate "$1" $MSM_PERF/cpu_min_freq +set_cpufreq_min() { + lock_val "$1" /sys/module/msm_performance/parameters/cpu_min_freq local key local val for kv in $1; do key=${kv%:*} val=${kv#*:} - mutate "$val" $CPU/cpu"$key"/cpufreq/scaling_min_freq + lock_val "$val" /sys/devices/system/cpu/cpu$key/cpufreq/scaling_min_freq done } # $1:"0:576000 4:710400 7:825600" -set_cpufreq_max() -{ - mutate "$1" $MSM_PERF/cpu_max_freq -} - -# $1:"0:576000 4:710400 7:825600" -set_cpufreq_dyn_max() -{ +set_cpufreq_max() { + lock_val "$1" /sys/module/msm_performance/parameters/cpu_max_freq local key local val for kv in $1; do key=${kv%:*} val=${kv#*:} - mutate "$val" $CPU/cpu"$key"/cpufreq/scaling_max_freq + lock_val "$val" /sys/devices/system/cpu/cpu$key/cpufreq/scaling_max_freq done } # $1:"schedutil/pl" $2:"0:4 4:3 7:1" -set_governor_param() -{ +set_governor_param() { local key local val for kv in $2; do key=${kv%:*} val=${kv#*:} - mutate "$val" $CPU/cpu"$key"/cpufreq/"$1" + lock_val "$val" /sys/devices/system/cpu/cpu$key/cpufreq/$1 # sdm625 hmp - mutate "$val" $CPU/cpufreq/"$1" + lock_val "$val" /sys/devices/system/cpu/cpufreq/$1 done } # $1:"min_cpus" $2:"0:4 4:3 7:1" -set_corectl_param() -{ +set_corectl_param() { local key local val for kv in $2; do key=${kv%:*} val=${kv#*:} - mutate "$val" $CPU/cpu"$key"/core_ctl/"$1" + lock_val "$val" /sys/devices/system/cpu/cpu$key/core_ctl/$1 done } -# $1:upmigrate $2:downmigrate $3:group_upmigrate $4:group_downmigrate -set_sched_migrate() -{ - mutate "$2" $SCHED/sched_downmigrate - mutate "$1" $SCHED/sched_upmigrate - mutate "$2" $SCHED/sched_downmigrate - mutate "$4" $SCHED/sched_group_downmigrate - mutate "$3" $SCHED/sched_group_upmigrate - mutate "$4" $SCHED/sched_group_downmigrate -} - -############################### -# QTI perf framework functions -############################### - -perfhal_mode="balance" - # stop before updating cfg -perfhal_stop() -{ +perfhal_stop() { for i in 0 1 2 3 4; do for j in 0 1 2 3 4; do - stop "perf-hal-$i-$j" 2> /dev/null + stop "perf-hal-$i-$j" 2>/dev/null done done usleep 500 } # start after updating cfg -perfhal_start() -{ +perfhal_start() { for i in 0 1 2 3 4; do for j in 0 1 2 3 4; do - start "perf-hal-$i-$j" 2> /dev/null + start "perf-hal-$i-$j" 2>/dev/null done done } - -# $1:mode(such as balance) -perfhal_update() -{ - perfhal_mode="$1" - rm /data/vendor/perfd/default_values - cp -af "$MODULE_PATH/$PERFCFG_REL/perfd_profiles/$perfhal_mode"/* "$MODULE_PATH/$PERFCFG_REL/" -} - -# return:status -perfhal_status() -{ - if [ "$(ps -A | grep "qti.hardware.perf")" != "" ]; then - echo "Running. Current mode is $perfhal_mode." - else - echo "QTI boost framework not equipped with this system." - fi -} diff --git a/magisk/script/libsysinfo.sh b/magisk/script/libsysinfo.sh new file mode 100644 index 0000000..a81bc44 --- /dev/null +++ b/magisk/script/libsysinfo.sh @@ -0,0 +1,170 @@ +#!/system/bin/sh +# +# Copyright (C) 2021-2022 Matt Yang +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################### +# Platform info functions +############################### + +# $1:"4.14" return:string_in_version +match_linux_version() { + echo "$(cat /proc/version | grep -i "$1")" +} + +get_socid() { + if [ -f /sys/devices/soc0/soc_id ]; then + echo "$(cat /sys/devices/soc0/soc_id)" + else + echo "$(cat /sys/devices/system/soc/soc0/id)" + fi +} + +get_nr_core() { + echo "$(cat /proc/stat | grep cpu[0-9] | wc -l)" +} + +# $1:cpuid +get_maxfreq() { + echo "$(cat "/sys/devices/system/cpu/cpu$1/cpufreq/cpuinfo_max_freq")" +} + +is_aarch64() { + if [ "$(getprop ro.product.cpu.abi)" == "arm64-v8a" ]; then + echo "true" + else + echo "false" + fi +} + +is_eas() { + if [ "$(grep sched /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors)" != "" ]; then + echo "true" + else + echo "false" + fi +} + +is_mtk() { + if [ "$(getprop | grep ro.mtk)" != "" ]; then + echo "true" + else + echo "false" + fi +} + +_get_sm6150_type() { + case "$(get_socid)" in + 365 | 366) echo "sdm730" ;; + 355 | 369) echo "sdm675" ;; + esac +} + +_get_sdm76x_type() { + if [ "$(get_maxfreq 7)" -gt 2300000 ]; then + echo "sdm765" + else + echo "sdm750" + fi +} + +_get_msm8916_type() { + case "$(get_socid)" in + "206" | "247" | "248" | "249" | "250") echo "msm8916" ;; + "233" | "240" | "242") echo "sdm610" ;; + "239" | "241" | "263" | "268" | "269" | "270" | "271") echo "sdm616" ;; + *) echo "msm8916" ;; + esac +} + +_get_lahaina_type() { + if [ "$(get_maxfreq 7)" -gt 2600000 ]; then + echo "sdm888" + else + if [ "$(get_maxfreq 4)" -gt 2300000 ]; then + echo "sdm778" + else + echo "sdm780" + fi + fi +} + +_get_taro_type() { + if [ "$(get_maxfreq 4)" -gt 2700000 ]; then + echo "sdm8g1+" + else + echo "sdm8g1" + fi +} + +# $1:board_name +get_config_name() { + case "$1" in + "taro") echo "$(_get_taro_type)" ;; + "lahaina") echo "$(_get_lahaina_type)" ;; + "shima") echo "$(_get_lahaina_type)" ;; + "yupik") echo "$(_get_lahaina_type)" ;; + "kona") echo "sdm865" ;; # 865, 870 + "msmnile") echo "sdm855" ;; # 855, 860 + "sdm845") echo "sdm845" ;; + "lito") echo "$(_get_sdm76x_type)" ;; + "sm6150") echo "$(_get_sm6150_type)" ;; + "sdm710") echo "sdm710" ;; + "msm8916") echo "$(_get_msm8916_type)" ;; + "msm8939") echo "sdm616" ;; + "msm8953") echo "sdm625" ;; # 625 + "msm8953pro") echo "sdm625" ;; # 626 + "sdm660") echo "sdm660" ;; + "sdm636") echo "sdm660" ;; + "trinket") echo "sdm665" ;; # sdm665 + "bengal") echo "sdm665" ;; # sdm662 + "msm8976") echo "sdm652" ;; + "msm8956") echo "sdm650" ;; + "msm8998") echo "sdm835" ;; + "msm8996") echo "sdm820" ;; + "msm8996pro") echo "sdm820" ;; + "s5e9925") echo "e2200" ;; + "exynos2100") echo "e2100" ;; + "exynos1080") echo "e1080" ;; + "exynos990") echo "e990" ;; + "universal9925") echo "e2200" ;; + "universal2100") echo "e2100" ;; + "universal1080") echo "e1080" ;; + "universal990") echo "e990" ;; + "universal9825") echo "e9820" ;; + "universal9820") echo "e9820" ;; + "universal9810") echo "e9810" ;; + "universal8895") echo "e8895" ;; + "universal8890") echo "e8890" ;; + "universal7420") echo "e7420" ;; + "mt6768") echo "mtg80" ;; # Helio P65(mt6768)/G70(mt6769v)/G80(mt6769t)/G85(mt6769z) + "mt6785") echo "mtg90t" ;; + "mt6833") echo "mtd720" ;; + "mt6833p") echo "mtd720" ;; # Dimensity 810 + "mt6833v") echo "mtd720" ;; # Dimensity 810 + "mt6853") echo "mtd720" ;; + "mt6873") echo "mtd820" ;; + "mt6875") echo "mtd820" ;; + "mt6877") echo "mtd920" ;; + "mt6885") echo "mtd1000" ;; + "mt6889") echo "mtd1000" ;; + "mt6891") echo "mtd1100" ;; + "mt6893") echo "mtd1200" ;; + "mt6895") echo "mtd8100" ;; + "mt6983") echo "mtd9000" ;; + "gs101") echo "gs101" ;; + *) echo "unsupported" ;; + esac +} diff --git a/magisk/script/libuperf.sh b/magisk/script/libuperf.sh index 9c5ded6..a3ce209 100644 --- a/magisk/script/libuperf.sh +++ b/magisk/script/libuperf.sh @@ -1,66 +1,47 @@ #!/system/bin/sh -# Uperf Library -# https://github.com/yc9559/ -# Author: Matt Yang -# Version: 20210304 - -BASEDIR="/data/adb/modules/uperf" -. $BASEDIR/script/pathinfo.sh -. $BASEDIR/script/libcommon.sh -. $BASEDIR/script/libcgroup.sh - -############################### -# PATHs -############################### - -UPERF_NAME="uperf" - -############################### -# Uperf tool functions -############################### - -uperf_config_path="$USER_PATH/cfg_uperf.json" -uperf_log_path="$USER_PATH/log_uperf.txt" -uperf_powermode_node="$USER_PATH/cur_powermode" - -# $1:mode_name -uperf_set_powermode() -{ - mutate "$1" $uperf_powermode_node -} - -uperf_status() -{ - # (uperfd & uperf) or (uperfd & new_uperf & old_uperf) - # if [ "$(ps -A | grep "$UPERF_NAME" | wc -l)" -ge 2 ]; then - # echo "Running. Details see $uperf_log_path." - # else - # echo "Not running. Reasons see $uperf_log_path." - # fi - echo "Details see $uperf_log_path." -} - -uperf_stop() -{ - killall "$UPERF_NAME" +# +# Copyright (C) 2021-2022 Matt Yang +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +BASEDIR="$(dirname "$0")" +. $BASEDIR/pathinfo.sh +. $BASEDIR/libcommon.sh +. $BASEDIR/libcgroup.sh + +uperf_stop() { + killall uperf } -uperf_start() -{ - # raise inotify limit - mutate "131072" /proc/sys/fs/inotify/max_queued_events - mutate "131072" /proc/sys/fs/inotify/max_user_watches - mutate "1024" /proc/sys/fs/inotify/max_user_instances +uperf_start() { + # raise inotify limit in case file sync existed + lock_val "1048576" /proc/sys/fs/inotify/max_queued_events + lock_val "1048576" /proc/sys/fs/inotify/max_user_watches + lock_val "1024" /proc/sys/fs/inotify/max_user_instances - # cleanup - cmd settings delete system min_refresh_rate + rm -f $USER_PATH/uperf_log.txt + if [ -f $BIN_PATH/libc++_shared.so ]; then + ASAN_LIB="$(ls $BIN_PATH/libclang_rt.asan-*-android.so)" + export LD_PRELOAD="$ASAN_LIB $BIN_PATH/libc++_shared.so" + fi + $BIN_PATH/uperf $USER_PATH/uperf.json -o $USER_PATH/uperf_log.txt - # start uperf - "$BIN_DIR/$UPERF_NAME" -o "$uperf_log_path" "$uperf_config_path" # waiting for uperf initialization - sleep 5 + sleep 2 # uperf shouldn't preempt foreground tasks + echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor + echo "schedutil" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor rebuild_process_scan_cache - change_task_rt "$UPERF_NAME" "1" - pin_proc_on_pwr "$UPERF_NAME" + change_task_cgroup "uperf" "background" "cpuset" } diff --git a/magisk/script/pathinfo.sh b/magisk/script/pathinfo.sh index 66a0e8d..5224640 100644 --- a/magisk/script/pathinfo.sh +++ b/magisk/script/pathinfo.sh @@ -1,14 +1,25 @@ #!/system/bin/sh +# +# Copyright (C) 2021-2022 Matt Yang +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# -# Module Path Header -# https://github.com/yc9559/ -# Author: Matt Yang +MODULE_PATH="$(dirname $(readlink -f "$0"))" +MODULE_PATH="${MODULE_PATH%\/script}" +SCRIPT_PATH="$MODULE_PATH/script" +BIN_PATH="$MODULE_PATH/bin" +FLAG_PATH="$MODULE_PATH/flag" +USER_PATH="/sdcard/Android/yc/uperf" -MODULE_PATH="/data/adb/modules/uperf" -USER_PATH="/sdcard/yc/uperf" -PANEL_FILE="$USER_PATH/panel_uperf.txt" -LOG_FILE="$USER_PATH/log_uperf_initsvc.log" -FLAGS="$MODULE_PATH/flags" -SCRIPT_DIR="$MODULE_PATH/script" -BIN_DIR="$MODULE_PATH/bin" PATH="/sbin:/system/sbin:/system/xbin:/system/bin:/vendor/xbin:/vendor/bin" diff --git a/magisk/script/powercfg.json b/magisk/script/powercfg.json new file mode 100644 index 0000000..6748edc --- /dev/null +++ b/magisk/script/powercfg.json @@ -0,0 +1,14 @@ +{ + "name": "Uperf", + "author": "Matt Yang", + "version": "22.07.09", + "versionCode": 3, + "features": { + "strict": true, + "pedestal": true + }, + "module": "uperf,sfanalysis", + "state": "/sdcard/Android/yc/uperf/cur_powermode.txt", + "entry": "/data/powercfg.sh", + "projectUrl": "https://github.com/yc9559/uperf" +} \ No newline at end of file diff --git a/magisk/script/powercfg_main.sh b/magisk/script/powercfg_main.sh index b49b7a3..81fe85d 100644 --- a/magisk/script/powercfg_main.sh +++ b/magisk/script/powercfg_main.sh @@ -1,35 +1,27 @@ #!/system/bin/sh -# Uperf https://github.com/yc9559/uperf/ -# Author: Matt Yang +# +# Copyright (C) 2021-2022 Matt Yang +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# -BASEDIR="/data/adb/modules/uperf" -. $BASEDIR/script/libcommon.sh -. $BASEDIR/script/libuperf.sh +BASEDIR="$(dirname $(readlink -f "$0"))" +. $BASEDIR/pathinfo.sh -# $1: power_mode -apply_power_mode() -{ - uperf_set_powermode "$1" - echo "Applying $1 done." -} - -# $1: power_mode -verify_power_mode() -{ - # fast -> performance - case "$1" in - "powersave"|"balance"|"performance") echo "$1" ;; - "fast") echo "performance" ;; - *) echo "balance" ;; - esac -} - -# 1. target from exec parameter action="$1" -if [ "$action" != "" ]; then - action="$(verify_power_mode "$action")" - apply_power_mode "$action" - exit 0 -fi - -exit 0 +case "$1" in +"powersave" | "balance" | "performance" | "fast" | "auto") echo "$1" >"$USER_PATH/cur_powermode.txt" ;; +"pedestal") echo "performance" >"$USER_PATH/cur_powermode.txt" ;; +"init") echo "balance" >"$USER_PATH/cur_powermode.txt" ;; +*) echo "Failed to apply unknown action '$1'." ;; +esac diff --git a/magisk/script/powercfg_once.sh b/magisk/script/powercfg_once.sh index 03f8686..84a2064 100644 --- a/magisk/script/powercfg_once.sh +++ b/magisk/script/powercfg_once.sh @@ -1,207 +1,117 @@ #!/system/bin/sh -# Uperf https://github.com/yc9559/uperf/ -# Author: Matt Yang +# +# Copyright (C) 2021-2022 Matt Yang +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # Runonce after boot, to speed up the transition of power modes in powercfg -BASEDIR="/data/adb/modules/uperf" -. $BASEDIR/script/libcommon.sh -. $BASEDIR/script/libcgroup.sh -. $BASEDIR/script/libpowercfg.sh -. $BASEDIR/script/libuperf.sh +BASEDIR="$(dirname $(readlink -f "$0"))" +. $BASEDIR/pathinfo.sh +. $BASEDIR/libcommon.sh +. $BASEDIR/libpowercfg.sh +. $BASEDIR/libcgroup.sh -unify_cgroup() -{ - # clear stune & uclamp - for g in background foreground top-app; do - mutate "0" /dev/stune/$g/schedtune.sched_boost_no_override - mutate "0" /dev/stune/$g/schedtune.boost - mutate "0" /dev/stune/$g/schedtune.prefer_idle - mutate "0" /dev/cpuctl/$g/cpu.uclamp.sched_boost_no_override - mutate "0" /dev/cpuctl/$g/cpu.uclamp.min - mutate "0" /dev/cpuctl/$g/cpu.uclamp.latency_sensitive - done - for cg in stune cpuctl; do - for p in $(cat /dev/$cg/top-app/tasks); do - echo "$p" > /dev/$cg/foreground/tasks - done +unify_cgroup() { + # clear top-app + for p in $(cat /dev/cpuset/top-app/tasks); do + echo $p >/dev/cpuset/foreground/tasks done - # VMOS may set cpuset/background/cpus to "0" - chmod 0444 /dev/cpuset/background/cpus - - # Reduce Perf Cluster Wakeup - # daemons - pin_proc_on_pwr "crtc_commit|crtc_event|pp_event|msm_irqbalance|netd|mdnsd|analytics" - pin_proc_on_pwr "imsdaemon|cnss-daemon|qadaemon|qseecomd|time_daemon|ATFWD-daemon|ims_rtp_daemon|qcrilNrd" - # ueventd related to hotplug of camera, wifi, usb... - # pin_proc_on_pwr "ueventd" - # hardware services, eg. android.hardware.sensors@1.0-service - pin_proc_on_pwr "android.hardware.bluetooth" - pin_proc_on_pwr "android.hardware.gnss" - pin_proc_on_pwr "android.hardware.health" - pin_proc_on_pwr "android.hardware.thermal" - pin_proc_on_pwr "android.hardware.wifi" - pin_proc_on_pwr "android.hardware.keymaster" - pin_proc_on_pwr "vendor.qti.hardware.qseecom" - pin_proc_on_pwr "hardware.sensors" - pin_proc_on_pwr "sensorservice" - # com.android.providers.media.module controlled by uperf - pin_proc_on_pwr "android.process.media" - # com.miui.securitycenter & com.miui.securityadd - pin_proc_on_pwr "miui\.security" - - # system_server blacklist - # system_server controlled by uperf - change_proc_cgroup "system_server" "" "cpuset" - # input dispatcher - change_thread_high_prio "system_server" "input" - # related to camera startup - # change_thread_affinity "system_server" "ProcessManager" "ff" - # not important - pin_thread_on_pwr "system_server" "Miui|Connect|Wifi|backup|Sync|Observer|Power|Sensor|batterystats" - pin_thread_on_pwr "system_server" "Thread-|pool-|Jit|CachedAppOpt|Greezer|TaskSnapshot|Oom" - change_thread_nice "system_server" "Greezer|TaskSnapshot|Oom" "4" - # pin_thread_on_pwr "system_server" "Async" # it blocks camera - # pin_thread_on_pwr "system_server" "\.bg" # it blocks binders - # do not let GC thread block system_server - # pin_thread_on_mid "system_server" "HeapTaskDaemon" - # pin_thread_on_mid "system_server" "FinalizerDaemon" - - # Render Pipeline - # surfaceflinger controlled by uperf - # android.phone controlled by uperf - # speed up searching service binder - change_task_cgroup "servicemanag" "top-app" "cpuset" - # prevent display service from being preempted by normal tasks - # vendor.qti.hardware.display.allocator-service cannot be set to RT policy, will be reset to 120 - unpin_proc "\.hardware\.display" - change_task_affinity "\.hardware\.display" "7f" - change_task_rt "\.hardware\.display" "2" - # let UX related Binders run with top-app - change_thread_cgroup "\.hardware\.display" "^Binder" "top-app" "cpuset" - change_thread_cgroup "\.hardware\.display" "^HwBinder" "top-app" "cpuset" - change_thread_cgroup "\.composer" "^Binder" "top-app" "cpuset" - - # Heavy Scene Boost - # boost app boot process, zygote--com.xxxx.xxx - # boost android process pool, usap--com.xxxx.xxx - unpin_proc "zygote|usap" - change_task_high_prio "zygote|usap" - - # busybox fork from magiskd - pin_proc_on_mid "magiskd" - change_task_nice "magiskd" "19" + # work with uperf/ContextScheduler + change_task_cgroup "surfaceflinger|system_server" "foreground" "cpuset" + change_task_cgroup "netd|allocator" "foreground" "cpuset" + change_task_cgroup "hardware.media.c2|vendor.mediatek.hardware" "background" "cpuset" + change_task_cgroup "aal_sof|kfps|dsp_send_thread|vdec_ipi_recv|mtk_drm_disp_id|disp_feature|hif_thread|main_thread|rx_thread|ged_" "background" "cpuset" + change_task_cgroup "pp_event|crtc_" "background" "cpuset" } -unify_cpufreq() -{ - # no msm_performance limit - set_cpufreq_min "0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0" - set_cpufreq_max "0:9999000 1:9999000 2:9999000 3:9999000 4:9999000 5:9999000 6:9999000 7:9999000" - - # stop sched core_ctl, game's main thread need be pinned on prime core - set_corectl_param "enable" "0:0 2:0 4:0 6:0 7:0" - - # clear cpu load scale factor - for i in 0 1 2 3 4 5 6 7 8 9; do - mutate "0" "$CPU"/cpu$i/sched_load_boost +unify_sched() { + # clear stune & uclamp + for d in /dev/stune/*/; do + lock_val "0" $d/schedtune.boost + lock_val "0" $d/schedtune.prefer_idle + done + for d in /dev/cpuctl/*/; do + lock_val "0" $d/cpu.uclamp.min + lock_val "0" $d/cpu.uclamp.latency_sensitive done - # unify governor, use schedutil if kernel has it - set_governor_param "scaling_governor" "0:interactive 2:interactive 4:interactive 6:interactive 7:interactive" - set_governor_param "scaling_governor" "0:schedutil 2:schedutil 4:schedutil 6:schedutil 7:schedutil" - - # unify hmp interactive governor, only 2+2 4+2 4+4 - set_governor_param "interactive/use_sched_load" "0:1 2:1 4:1" - set_governor_param "interactive/use_migration_notif" "0:1 2:1 4:1" - set_governor_param "interactive/enable_prediction" "0:0 2:0 4:0" - set_governor_param "interactive/ignore_hispeed_on_notif" "0:0 2:0 4:0" - set_governor_param "interactive/fast_ramp_down" "0:0 2:0 4:0" - set_governor_param "interactive/boostpulse_duration" "0:0 2:0 4:0" - set_governor_param "interactive/boost" "0:0 2:0 4:0" - set_governor_param "interactive/timer_slack" "0:12345678 2:12345678 4:12345678" + for d in kernel walt; do + mask_val "0" /proc/sys/$d/sched_force_lb_enable + done } -unify_sched() -{ - # disable sched global placement boost - mutate "0" "$SCHED"/sched_boost - mutate "1000" "$SCHED"/sched_min_task_util_for_boost - mutate "1000" "$SCHED"/sched_min_task_util_for_colocation - mutate "0" "$SCHED"/sched_conservative_pl - mutate "0" "$SCHED"/sched_force_lb_enable - mutate "0" "$SCHED"/sched_boost_top_app - - # unify WALT HMP sched - mutate "5" "$SCHED"/sched_ravg_hist_size - mutate "2" "$SCHED"/sched_window_stats_policy - mutate "90" "$SCHED"/sched_spill_load - mutate "1" "$SCHED"/sched_restrict_cluster_spill - mutate "1" "$SCHED"/sched_prefer_sync_wakee_to_waker - mutate "200000" "$SCHED"/sched_freq_inc_notify - mutate "400000" "$SCHED"/sched_freq_dec_notify - - # place a little heavier processes on big cluster, due to Cortex-A55 poor efficiency - # The same Binder, A55@1.0g took 7.3ms,A76@1.0g took 3.0ms, in this case, A76's efficiency is 2.4x of A55's. - # However in EAS model A76's efficiency is 1.7x of A55's, so the down migrate threshold need compensate. - set_sched_migrate "50" "15" "999" "888" - set_sched_migrate "50 80" "15 60" "999" "888" - - # 10ms=10000000, prefer to use prev cpu, decrease jitter from 0.5ms to 0.3ms with lpm settings - # 0.2ms=200000, prevent system_server binders pinned on perf cluster - mutate "200000" "$SCHED"/sched_migration_cost_ns +unify_devfreq() { + for df in /sys/class/devfreq; do + for d in $df/*cpubw $df/*llccbw $df/*cpu-cpu-llcc-bw $df/*cpu-llcc-ddr-bw; do + lock_val "9999000000" "$d/max_freq" + done + done + for d in DDR LLCC L3; do + lock_val "9999000000" "/sys/devices/system/cpu/bus_dcvs/$d/*/max_freq" + done } -unify_lpm() -{ - # enter C-state level 3 took ~500us - # Qualcomm C-state ctrl - mutate "0" "$LPM"/sleep_disabled - mutate "0" "$LPM"/lpm_ipi_prediction - if [ -f "$LPM/bias_hyst" ]; then - mutate "5" "$LPM"/bias_hyst - mutate "0" "$LPM"/lpm_prediction - elif [ -f "$SCHED/sched_busy_hyst_ns" ]; then - mutate "127" "$SCHED"/sched_busy_hysteresis_enable_cpus # seem not working well on cpu7 - mutate "0" "$SCHED"/sched_coloc_busy_hysteresis_enable_cpus - mutate "5000000" "$SCHED"/sched_busy_hyst_ns - mutate "0" "$LPM"/lpm_prediction - else - mutate "1" "$LPM"/lpm_prediction - fi +unify_lpm() { + # Qualcomm enter C-state level 3 took ~500us + lock_val "0" /sys/module/lpm_levels/parameters/lpm_ipi_prediction + lock_val "0" /sys/module/lpm_levels/parameters/lpm_prediction + lock_val "2" /sys/module/lpm_levels/parameters/bias_hyst + for d in kernel walt; do + mask_val "255" /proc/sys/$d/sched_busy_hysteresis_enable_cpus + mask_val "2000000" /proc/sys/$d/sched_busy_hyst_ns + done } -disable_hotplug() -{ +disable_hotplug() { # Exynos hotplug mutate "0" /sys/power/cpuhotplug/enabled - mutate "0" "$CPU"/cpuhotplug/enabled + mutate "0" /sys/devices/system/cpu/cpuhotplug/enabled # turn off msm_thermal - mutate "0" /sys/module/msm_thermal/core_control/enabled - mutate "N" /sys/module/msm_thermal/parameters/enabled + lock_val "0" /sys/module/msm_thermal/core_control/enabled + lock_val "N" /sys/module/msm_thermal/parameters/enabled # 3rd - mutate "0" /sys/kernel/intelli_plug/intelli_plug_active - mutate "0" /sys/module/blu_plug/parameters/enabled - mutate "0" /sys/devices/virtual/misc/mako_hotplug_control/enabled - mutate "0" /sys/module/autosmp/parameters/enabled - mutate "0" /sys/kernel/zen_decision/enabled + lock_val "0" /sys/kernel/intelli_plug/intelli_plug_active + lock_val "0" /sys/module/blu_plug/parameters/enabled + lock_val "0" /sys/devices/virtual/misc/mako_hotplug_control/enabled + lock_val "0" /sys/module/autosmp/parameters/enabled + lock_val "0" /sys/kernel/zen_decision/enabled + + # stop sched core_ctl + set_corectl_param "enable" "0:0 2:0 4:0 6:0 7:0" # bring all cores online for i in 0 1 2 3 4 5 6 7 8 9; do - mutate "1" "$CPU"/cpu$i/online + lock_val "1" /sys/devices/system/cpu/cpu$i/online done } -disable_kernel_boost() -{ +disable_kernel_boost() { # Qualcomm - mutate "0" "/sys/devices/system/cpu/cpu_boost/*" - mutate "0" "/sys/devices/system/cpu/cpu_boost/parameters/*" - mutate "0" "/sys/module/cpu_boost/parameters/*" - mutate "0" "/sys/module/msm_performance/parameters/*" + lock_val "0" "/sys/devices/system/cpu/cpu_boost/*" + lock_val "0" "/sys/devices/system/cpu/cpu_boost/parameters/*" + lock_val "0" "/sys/module/cpu_boost/parameters/*" + lock_val "0" "/sys/module/msm_performance/parameters/*" + lock_val "0" "/sys/kernel/msm_performance/parameters/*" + lock_val "0" "/proc/sys/walt/input_boost/*" + + # no msm_performance limit + set_cpufreq_min "0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0" + set_cpufreq_max "0:9999000 1:9999000 2:9999000 3:9999000 4:9999000 5:9999000 6:9999000 7:9999000" # MediaTek # policy_status @@ -217,69 +127,125 @@ disable_kernel_boost() # [9] PPM_POLICY_SYS_BOOST: disabled # [10] PPM_POLICY_HICA: ? # Usage: echo <1(enable)/0(disable)> > /proc/ppm/policy_status - mutate "1" /proc/ppm/enabled - # used by uperf - mutate "6 1" /proc/ppm/policy_status + # use cpufreq interface with PPM_POLICY_HARD_USER_LIMIT enabled, thanks to helloklf@github + lock_val "1" /proc/ppm/enabled + for i in 0 1 2 3 4 5 6 7 8 9 10; do + lock_val "$i 0" /proc/ppm/policy_status + done + lock_val "6 1" /proc/ppm/policy_status + lock_val "enable 0" /proc/perfmgr/tchbst/user/usrtch + lock "/proc/ppm/policy/*" + lock "/proc/ppm/*" # Samsung mutate "0" "/sys/class/input_booster/*" - # Samsung EPIC interfaces, used by uperf - # mutate "0" /dev/cluster0_freq_min - # mutate "0" /dev/cluster1_freq_min - # mutate "0" /dev/cluster2_freq_min - # mutate "0" /dev/bus_throughput - # mutate "0" /dev/gpu_freq_min - # Samsung /kernel/sched/ems/... - mutate "0" /sys/kernel/ems/eff_mode - # Oneplus - mutate "N" "/sys/module/control_center/parameters/*" - mutate "0" /sys/module/aigov/parameters/enable - mutate "0" "/sys/module/houston/parameters/*" + lock_val "N" "/sys/module/control_center/parameters/*" + lock_val "0" /sys/module/aigov/parameters/enable + lock_val "0" "/sys/module/houston/parameters/*" # OnePlus opchain always pins UX threads on the big cluster - mutate "0" /sys/module/opchain/parameters/chain_on - - # HTC - mutate "0" "/sys/power/pnpmgr/*" + lock_val "0" /sys/module/opchain/parameters/chain_on # 3rd - mutate "0" "/sys/kernel/cpu_input_boost/*" - mutate "0" "/sys/module/cpu_input_boost/parameters/*" - mutate "0" "/sys/module/dsboost/parameters/*" - mutate "0" "/sys/module/devfreq_boost/parameters/*" + lock_val "0" "/sys/kernel/cpu_input_boost/*" + lock_val "0" "/sys/module/cpu_input_boost/parameters/*" + lock_val "0" "/sys/module/dsboost/parameters/*" + lock_val "0" "/sys/module/devfreq_boost/parameters/*" } -disable_userspace_boost() -{ +disable_userspace_boost() { + # xiaomi vip-task scheduler override + chmod 0000 /dev/migt + for f in /sys/module/migt/parameters/*; do + chmod 0000 $f + done + + # xiaomi perfservice + stop vendor.perfservice + stop miuibooster + # stop vendor.miperf + + # brain service maybe not smart + stop oneplus_brain_service 2>/dev/null + # Qualcomm perfd - stop perfd 2> /dev/null + stop perfd 2>/dev/null + + # work with uperf/ContextScheduler + lock_val "0" "/sys/module/mtk_fpsgo/parameters/boost_affinity*" + lock_val "0" "/sys/module/fbt_cpu/parameters/boost_affinity*" + lock_val "9999000" "/sys/kernel/fpsgo/fbt/limit_*" + lock_val "0" /sys/kernel/fpsgo/fbt/switch_idleprefer + lock_val "1" /proc/perfmgr/syslimiter/syslimiter_force_disable + lock_val "1" /sys/module/mtk_core_ctl/parameters/policy_enable + lock_val "90" /sys/kernel/fpsgo/fbt/thrm_temp_th + lock_val "-1" /sys/kernel/fpsgo/fbt/thrm_limit_cpu + lock_val "-1" /sys/kernel/fpsgo/fbt/thrm_sub_cpu # Qualcomm&MTK perfhal - # keep perfhal running with empty config file in magisk mode - [ ! -f "$FLAGS/enable_perfhal_stub" ] && perfhal_stop + perfhal_stop + + # libperfmgr + stop vendor.power-hal-1-0 + stop vendor.power-hal-1-1 + stop vendor.power-hal-1-2 + stop vendor.power-hal-1-3 + stop vendor.power-hal-aidl +} - # brain service maybe not smart - stop oneplus_brain_service 2> /dev/null +restart_userspace_boost() { + # Qualcomm&MTK perfhal + perfhal_start + + # libperfmgr + start vendor.power-hal-1-0 + start vendor.power-hal-1-1 + start vendor.power-hal-1-2 + start vendor.power-hal-1-3 + start vendor.power-hal-aidl +} + +disable_userspace_thermal() { + # yes, let it respawn + killall mi_thermald + # prohibit mi_thermald use cpu thermal interface + for i in 0 2 4 6 7; do + local maxfreq="$(cat /sys/devices/system/cpu/cpu$i/cpufreq/cpuinfo_max_freq)" + [ "$maxfreq" -gt "0" ] && lock_val "cpu$i $maxfreq" /sys/devices/virtual/thermal/thermal_message/cpu_limits + done +} - # disable service below will BOOM - # stop vendor.power.stats-hal-1-0 - # stop vendor.power-hal-1-0 +restart_userspace_thermal() { + # yes, let it respawn + killall mi_thermald } -log "PATH=$PATH" -log "sh=$(which sh)" -rebuild_process_scan_cache +clear_log +exec 1>$LOG_FILE +# exec 2>&1 +echo "PATH=$PATH" +echo "sh=$(which sh)" + +# set permission +disable_kernel_boost +disable_hotplug +unify_sched +unify_devfreq +unify_lpm + +disable_userspace_thermal +restart_userspace_thermal disable_userspace_boost +restart_userspace_boost + +# unify value disable_kernel_boost disable_hotplug -unify_cpufreq unify_sched +unify_devfreq unify_lpm # make sure that all the related cpu is online +rebuild_process_scan_cache unify_cgroup - -# start uperf once only -uperf_stop -uperf_start diff --git a/magisk/script/prepare.sh b/magisk/script/prepare.sh deleted file mode 100644 index 1e8b8bd..0000000 --- a/magisk/script/prepare.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/system/bin/sh -# https://github.com/yc9559/ -# Author: Matt Yang - -BASEDIR="/data/adb/modules/uperf" -. $BASEDIR/script/libcommon.sh - -# clear module init log -clear_log -log "$(date '+%Y-%m-%d %H:%M:%S')" -log "" diff --git a/magisk/script/setup.sh b/magisk/script/setup.sh new file mode 100644 index 0000000..0b91b22 --- /dev/null +++ b/magisk/script/setup.sh @@ -0,0 +1,81 @@ +#!/system/bin/sh +# +# Copyright (C) 2021-2022 Matt Yang +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +BASEDIR="$(dirname $(readlink -f "$0"))" +. $BASEDIR/pathinfo.sh +. $BASEDIR/libsysinfo.sh + +# $1:error_message +abort() { + echo "$1" + echo "! Uperf installation failed." + exit 1 +} + +# $1:file_node $2:owner $3:group $4:permission $5:secontext +set_perm() { + chown $2:$3 $1 + chmod $4 $1 + chcon $5 $1 +} + +# $1:directory $2:owner $3:group $4:dir_permission $5:file_permission $6:secontext +set_perm_recursive() { + find $1 -type d 2>/dev/null | while read dir; do + set_perm $dir $2 $3 $4 $6 + done + find $1 -type f -o -type l 2>/dev/null | while read file; do + set_perm $file $2 $3 $5 $6 + done +} + +install_uperf() { + echo "- Finding platform specified config" + echo "- ro.board.platform=$(getprop ro.board.platform)" + echo "- ro.product.board=$(getprop ro.product.board)" + + local target + local cfgname + target="$(getprop ro.board.platform)" + cfgname="$(get_config_name $target)" + if [ "$cfgname" == "unsupported" ]; then + target="$(getprop ro.product.board)" + cfgname="$(get_config_name $target)" + fi + + if [ "$cfgname" == "unsupported" ] || [ ! -f $MODULE_PATH/config/$cfgname.json ]; then + abort "! Target [$target] not supported." + fi + + echo "- Uperf config is located at $USER_PATH" + mkdir -p $USER_PATH + mv -f $USER_PATH/uperf.json $USER_PATH/uperf.json.bak + cp -f $MODULE_PATH/config/$cfgname.json $USER_PATH/uperf.json + [ ! -e "$USER_PATH/perapp_powermode.txt" ] && cp $MODULE_PATH/config/perapp_powermode.txt $USER_PATH/perapp_powermode.txt + rm -rf $MODULE_PATH/config + + set_perm_recursive $BIN_PATH 0 0 0755 0755 u:object_r:system_file:s0 +} + +echo "" +echo "* Uperf https://github.com/yc9559/uperf/" +echo "* Author: Matt Yang" +echo "* Version: v3.01(22.07.09)" +echo "" + +echo "- Installing uperf (FDE.AI edition)" +install_uperf diff --git a/magisk/script/start_injector.sh b/magisk/script/start_injector.sh deleted file mode 100644 index 7cd6f40..0000000 --- a/magisk/script/start_injector.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/system/bin/sh -# Injector Library -# https://github.com/yc9559/ -# Author: Matt Yang -# Version: 20210225 -# FeraVolt: Don't allow selinux switches - -BASEDIR="/data/adb/modules/uperf" -. $BASEDIR/script/pathinfo.sh -. $BASEDIR/script/libcommon.sh - -############################### -# PATHs -############################### - -INJ_REL="$BIN_DIR" -INJ_NAME="sfa_injector" - -############################### -# Injector tool functions -############################### - -# $1:process $2:dynamiclib $3:alog_tag -inj_do_inject() -{ - log "[begin] injecting $2 to $1" - - local lib_path - if [ "$(is_aarch64)" = "true" ]; then - lib_path="/system/lib64/$2" - else - lib_path="/system/lib/$2" - fi - - # fallback to standlone mode - [ ! -e "$lib_path" ] && lib_path="${MODULE_PATH}${lib_path}" - - # try to allow executing dlopen in surfaceflinger - magiskpolicy --live "allow surfaceflinger system_lib_file file { read getattr execute }" >> "$LOG_FILE" - magiskpolicy --live "allow surfaceflinger system_data_file file { read write getattr }" >> "$LOG_FILE" - magiskpolicy --live "allow surfaceflinger system_data_file dir { read write getattr search }" >> "$LOG_FILE" - - "$INJ_REL/$INJ_NAME" "$lib_path" >> "$LOG_FILE" - - sleep 1 - log "[end] injecting $2 to $1" - log "" -} - -inj_do_inject "/system/bin/surfaceflinger" "libsfanalysis.so" "SfAnalysis" diff --git a/magisk/service.sh b/magisk/service.sh deleted file mode 100644 index 760ee36..0000000 --- a/magisk/service.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/system/bin/sh - -MODDIR="/data/adb/modules/uperf" - -sh "$MODDIR"/initsvc_uperf.sh diff --git a/magisk/setup_uperf.sh b/magisk/setup_uperf.sh deleted file mode 100755 index cf81a86..0000000 --- a/magisk/setup_uperf.sh +++ /dev/null @@ -1,466 +0,0 @@ -#!/system/bin/sh -# Uperf Setup -# https://github.com/yc9559/ -# Author: Matt Yang & cjybyjk (cjybyjk@gmail.com) -# Version: 20201129 - -BASEDIR="$(dirname $(readlink -f "$0"))" -USER_PATH="/sdcard/yc/uperf" - -# $1:error_message -_abort() -{ - echo "$1" - echo "! Uperf installation failed." - exit 1 -} - -# $1:file_node $2:owner $3:group $4:permission $5:secontext -_set_perm() -{ - local con - chown "$2":"$3" "$1" - chmod "$4" "$1" - con=$5 - [ -z "$con" ] && con=u:object_r:system_file:s0 - chcon $con "$1" -} - -# $1:directory $2:owner $3:group $4:dir_permission $5:file_permission $6:secontext -_set_perm_recursive() { - find "$1" -type d 2>/dev/null | while read dir; do - _set_perm "$dir" "$2" "$3" "$4" "$6" - done - find "$1" -type f -o -type l 2>/dev/null | while read file; do - _set_perm "$file" "$2" "$3" "$5" "$6" - done -} - -_get_nr_core() -{ - echo "$(cat /proc/stat | grep cpu[0-9] | wc -l)" -} - -_is_aarch64() -{ - if [ "$(getprop ro.product.cpu.abi)" = "arm64-v8a" ]; then - echo "true" - else - echo "false" - fi -} - -_is_eas() -{ - if [ "$(grep sched /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors)" != "" ]; then - echo "true" - else - echo "false" - fi -} - -# $1:cpuid -_get_maxfreq() -{ - local fpath="/sys/devices/system/cpu/cpu$1/cpufreq/scaling_available_frequencies" - local maxfreq="0" - - if [ ! -f "$fpath" ]; then - echo "" - return - fi - - for f in $(cat "$fpath"); do - [ "$f" -gt "$maxfreq" ] && maxfreq="$f" - done - echo "$maxfreq" -} - -_get_socid() -{ - if [ -f /sys/devices/soc0/soc_id ]; then - echo "$(cat /sys/devices/soc0/soc_id)" - else - echo "$(cat /sys/devices/system/soc/soc0/id)" - fi -} - -_get_sm6150_type() -{ - [ -f /sys/devices/soc0/soc_id ] && SOC_ID="$(cat /sys/devices/soc0/soc_id)" - [ -f /sys/devices/system/soc/soc0/id ] && SOC_ID="$(cat /sys/devices/system/soc/soc0/id)" - case "$SOC_ID" in - 365 | 366) echo "sdm730" ;; - 355 | 369) echo "sdm675" ;; - esac -} - -_get_sdm76x_type() -{ - if [ "$(_get_maxfreq 7)" -gt 2800000 ]; then - echo "sdm768" - elif [ "$(_get_maxfreq 7)" -gt 2300000 ]; then - echo "sdm765" - else - echo "sdm750" - fi -} - -_get_msm8916_type() -{ - case "$(_get_socid)" in - "206"|"247"|"248"|"249"|"250") echo "msm8916" ;; - "233"|"240"|"242") echo "sdm610" ;; - "239"|"241"|"263"|"268"|"269"|"270"|"271") echo "sdm616" ;; - *) echo "msm8916" ;; - esac -} - -_get_msm8952_type() -{ - case "$(_get_socid)" in - "264"|"289") - echo "msm8952" - ;; - *) - if [ "$(_get_nr_core)" = "8" ]; then - echo "sdm652" - else - echo "sdm650" - fi - ;; - esac -} - -_get_sdm636_type() -{ - if [ "$(_is_eas)" = "true" ]; then - echo "sdm636_eas" - else - echo "sdm636_hmp" - fi -} - -_get_sdm660_type() -{ - local b_max - b_max="$(_get_maxfreq 4)" - # sdm660 & sdm636 may share the same platform name - if [ "$b_max" -gt 2000000 ]; then - if [ "$(_is_eas)" = "true" ]; then - echo "sdm660_eas" - else - echo "sdm660_hmp" - fi - else - echo "$(_get_sdm636_type)" - fi -} - -_get_sdm652_type() -{ - if [ "$(_is_eas)" = "true" ]; then - echo "sdm652_eas" - else - echo "sdm652_hmp" - fi -} - -_get_sdm650_type() -{ - if [ "$(_is_eas)" = "true" ]; then - echo "sdm650_eas" - else - echo "sdm650_hmp" - fi -} - -_get_sdm626_type() -{ - if [ "$(_is_eas)" = "true" ]; then - echo "sdm626_eas" - else - echo "sdm626_hmp" - fi -} - -_get_sdm625_type() -{ - local b_max - b_max="$(_get_maxfreq 4)" - # sdm625 & sdm626 may share the same platform name - if [ "$b_max" -lt 2100000 ]; then - if [ "$(_is_eas)" = "true" ]; then - echo "sdm625_eas" - else - echo "sdm625_hmp" - fi - else - echo "$(_get_sdm626_type)" - fi -} - -_get_sdm835_type() -{ - if [ "$(_is_eas)" = "true" ]; then - echo "sdm835_eas" - else - echo "sdm835_hmp" - fi -} - -_get_sdm82x_type() -{ - if [ "$(_is_eas)" = "true" ]; then - echo "sdm82x_eas" - return - fi - - local l_max - local b_max - l_max="$(_get_maxfreq 0)" - b_max="$(_get_maxfreq 2)" - - # sdm820 OC 1728/2150 - if [ "$l_max" -lt 1800000 ]; then - if [ "$b_max" -gt 2100000 ]; then - # 1593/2150 - echo "sdm820_hmp" - elif [ "$b_max" -gt 1900000 ]; then - # 1593/1996 - echo "sdm821_v1_hmp" - else - # 1363/1824 - echo "sdm820_hmp" - fi - else - if [ "$b_max" -gt 2300000 ]; then - # 2188/2342 - echo "sdm821_v3_hmp" - else - # 1996/2150 - echo "sdm821_v2_hmp" - fi - fi -} - -_get_e8890_type() -{ - if [ "$(_is_eas)" = "true" ]; then - echo "e8890_eas" - else - echo "e8890_hmp" - fi -} - -_get_e8895_type() -{ - if [ "$(_is_eas)" = "true" ]; then - echo "e8895_eas" - else - echo "e8895_hmp" - fi -} - -_get_mt6853_type() -{ - local b_max - b_max="$(_get_maxfreq 6)" - if [ "$b_max" -gt 2200000 ]; then - echo "mtd800u" - else - echo "mtd720" - fi -} - -_get_mt6873_type() -{ - local b_max - b_max="$(_get_maxfreq 4)" - if [ "$b_max" -gt 2500000 ]; then - echo "mtd820" - else - echo "mtd800" - fi -} - -_get_mt6885_type() -{ - local b_max - b_max="$(_get_maxfreq 4)" - if [ "$b_max" -gt 2500000 ]; then - echo "mtd1000" - else - echo "mtd1000l" - fi -} - -_get_lahaina_type() -{ - local b_max - b_max="$(_get_maxfreq 7)" - if [ "$b_max" -gt 2600000 ]; then - echo "sdm888" - else - echo "sdm780" - fi -} - -# $1:cfg_name -_setup_platform_file() -{ - rm -f $USER_PATH/* - cp -f "$BASEDIR"/config/"$1".json $USER_PATH/cfg_uperf.json -} - -# $1:board_name -_get_cfgname() -{ - local ret - case "$1" in - "lahaina") ret="$(_get_lahaina_type)" ;; - "shima") ret="sdm775" ;; - "kona") ret="sdm865" ;; - "msmnile") ret="sdm855" ;; - "sdm845") ret="sdm845" ;; - "lito") ret="$(_get_sdm76x_type)" ;; - "sm6150") ret="$(_get_sm6150_type)" ;; - "sdm710") ret="sdm710" ;; - "msm8916") ret="$(_get_msm8916_type)" ;; - "msm8939") ret="sdm616" ;; - "msm8952") ret="$(_get_msm8952_type)" ;; - "msm8953") ret="$(_get_sdm625_type)" ;; - "msm8953pro") ret="$(_get_sdm626_type)" ;; - "sdm660") ret="$(_get_sdm660_type)" ;; - "sdm636") ret="$(_get_sdm636_type)" ;; - "trinket") ret="sdm665" ;; - "bengal") ret="sdm665" ;; # sdm662 - "msm8976") ret="$(_get_sdm652_type)" ;; - "msm8956") ret="$(_get_sdm650_type)" ;; - "msm8998") ret="$(_get_sdm835_type)" ;; - "msm8996") ret="$(_get_sdm82x_type)" ;; - "msm8996pro") ret="$(_get_sdm82x_type)" ;; - "exynos2100") ret="e2100" ;; - "exynos1080") ret="e1080" ;; - "exynos990") ret="e990" ;; - "universal2100") ret="e2100" ;; - "universal1080") ret="e1080" ;; - "universal990") ret="e990" ;; - "universal9825") ret="e9820" ;; - "universal9820") ret="e9820" ;; - "universal9810") ret="e9810" ;; - "universal8895") ret="$(_get_e8895_type)" ;; - "universal8890") ret="$(_get_e8890_type)" ;; - "universal7420") ret="e7420" ;; - "mt6768") ret="mtg80" ;; # Helio P65(mt6768)/G70(mt6769v)/G80(mt6769t)/G85(mt6769z) - "mt6785") ret="mtg90t" ;; - "mt6853") ret="$(_get_mt6853_type)" ;; - "mt6873") ret="$(_get_mt6873_type)" ;; - "mt6875") ret="$(_get_mt6873_type)" ;; - "mt6885") ret="$(_get_mt6885_type)" ;; - "mt6889") ret="$(_get_mt6885_type)" ;; - "mt6891") ret="mtd1100" ;; - "mt6893") ret="mtd1200" ;; - *) ret="unsupported" ;; - esac - echo "$ret" -} - -uperf_print_finish() -{ - echo "- Uperf installation was successful." -} - -uperf_install() -{ - echo "- Installing uperf (FDE.AI edition)" - echo "- ro.board.platform=$(getprop ro.board.platform)" - echo "- ro.product.board=$(getprop ro.product.board)" - - local target - local cfgname - target="$(getprop ro.board.platform)" - cfgname="$(_get_cfgname "$target")" - if [ "$cfgname" = "unsupported" ]; then - target="$(getprop ro.product.board)" - cfgname="$(_get_cfgname "$target")" - fi - - mkdir /data/media/0/yc - mkdir -p $USER_PATH - if [ "$cfgname" != "unsupported" ] && [ -f "$BASEDIR"/config/"$cfgname".json ]; then - _setup_platform_file "$cfgname" - else - _abort "! [$target] not supported." - fi - rm -rf "$BASEDIR"/config - - if [ "$(_is_aarch64)" = "true" ]; then - rm -f "$BASEDIR"/bin/uperf - mv -f "$BASEDIR/bin/uperf8" "$BASEDIR/bin/uperf" - else - rm -f "$BASEDIR"/bin/uperf8 - fi - - _set_perm_recursive "$BASEDIR" 0 0 0755 0755 - _set_perm_recursive "$BASEDIR"/bin 0 0 0755 0755 -} - -injector_install() -{ - echo "- Installing injector" - - if [ "$(_is_aarch64)" = "true" ]; then - rm -f "$BASEDIR"/bin/sfa_injector - rm -f "$BASEDIR"/bin/libsfanalysis.so - mkdir "$BASEDIR"/system/lib64 - mv -f "$BASEDIR/bin/sfa_injector8" "$BASEDIR/bin/sfa_injector" - mv -f "$BASEDIR/bin/libsfanalysis.so8" "$BASEDIR/system/lib64/libsfanalysis.so" - else - mkdir "$BASEDIR"/system/lib - mv -f "$BASEDIR/bin/libsfanalysis.so" "$BASEDIR/system/lib/libsfanalysis.so" - rm -f "$BASEDIR"/bin/sfa_injector8 - rm -f "$BASEDIR"/bin/libsfanalysis.so8 - fi - - _set_perm "$BASEDIR"/bin/sfa_injector 0 0 0755 u:object_r:system_file:s0 - _set_perm "$BASEDIR"/system/lib/libsfanalysis.so 0 0 0644 u:object_r:system_lib_file:s0 - _set_perm "$BASEDIR"/system/lib64/libsfanalysis.so 0 0 0644 u:object_r:system_lib_file:s0 - sleep 1 -} - -powerhal_stub_install() -{ - echo "- Installing perfhal stub" - # do not place empty json if it doesn't exist in system - # vendor/etc/powerhint.json: android perf hal - # vendor/etc/powerscntbl.cfg: mediatek perf hal (android 9) - # vendor/etc/powerscntbl.xml: mediatek perf hal (android 10+) - # vendor/etc/perf/commonresourceconfigs.json: qualcomm perf hal resource - # vendor/etc/perf/targetresourceconfigs.json: qualcomm perf hal resource overrides - local perfcfgs - perfcfgs=" - vendor/etc/powerhint.json - vendor/etc/powerscntbl.cfg - vendor/etc/powerscntbl.xml - vendor/etc/perf/commonresourceconfigs.xml - vendor/etc/perf/targetresourceconfigs.xml - " - for f in $perfcfgs; do - if [ ! -f "/$f" ]; then - rm "$BASEDIR/system/$f" - else - _set_perm "$BASEDIR/system/$f" 0 0 0644 u:object_r:vendor_configs_file:s0 - true > $BASEDIR/flags/enable_perfhal_stub - fi - done -} - -uperf_install -injector_install -powerhal_stub_install -uperf_print_finish -chmod 0755 "$BASEDIR"/bin/* -chmod 0755 "$BASEDIR"/script/* -chmod 0755 "$BASEDIR"/* -exit 0 diff --git a/magisk/system.prop b/magisk/system.prop deleted file mode 100644 index fd51a67..0000000 --- a/magisk/system.prop +++ /dev/null @@ -1,9 +0,0 @@ -# This file will be read by resetprop -# Example: Change dpi -# ro.sf.lcd_density=320 - -# unify surfaceflinger props -debug.sf.latch_unsignaled=1 -ro.surface_flinger.max_frame_buffer_acquired_buffers=4 -persist.sys.miui.sf_cores=6 -persist.sys.miui_animator_sched.bigcores=6-7 diff --git a/magisk/system/vendor/etc/perf/commonresourceconfigs.xml b/magisk/system/vendor/etc/perf/commonresourceconfigs.xml deleted file mode 100644 index 506e4fa..0000000 --- a/magisk/system/vendor/etc/perf/commonresourceconfigs.xml +++ /dev/null @@ -1,277 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/magisk/system/vendor/etc/perf/targetresourceconfigs.xml b/magisk/system/vendor/etc/perf/targetresourceconfigs.xml deleted file mode 100644 index e1e38be..0000000 --- a/magisk/system/vendor/etc/perf/targetresourceconfigs.xml +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/magisk/system/vendor/etc/powerhint.json b/magisk/system/vendor/etc/powerhint.json deleted file mode 100644 index d75e757..0000000 --- a/magisk/system/vendor/etc/powerhint.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "Nodes": [ - { - "Name": "PMQoSCpuDmaLatency", - "Path": "/dev/cpu_dma_latency", - "Values": [ - "44", - "1000" - ], - "Type": "File", - "DefaultIndex": 1, - "ResetOnInit": true, - "HoldFd": true - } - ], - "Actions": [ - { - "PowerHint": "LAUNCH", - "Node": "PMQoSCpuDmaLatency", - "Duration": 2000, - "Value": "44", - "ValueIndex": 0 - } - ] -} diff --git a/magisk/system/vendor/etc/powerscntbl.cfg b/magisk/system/vendor/etc/powerscntbl.cfg deleted file mode 100644 index c979836..0000000 --- a/magisk/system/vendor/etc/powerscntbl.cfg +++ /dev/null @@ -1,21 +0,0 @@ -CMD_SET_OPP_DDR, MTK_POWER_HINT_ACT_SWITCH, 0 -CMD_SET_OPP_DDR, MTK_POWER_HINT_PACK_SWITCH, 0 -CMD_SET_OPP_DDR, MTK_POWER_HINT_LAUNCH, 0 -CMD_SET_OPP_DDR, MTK_POWER_HINT_EXT_LAUNCH, 1 -CMD_SET_OPP_DDR, MTK_POWER_HINT_PROCESS_CREATE, 0 -CMD_SET_OPP_DDR, MTK_POWER_HINT_GAME_LAUNCH, 0 -CMD_SET_OPP_DDR, MTK_POWER_HINT_APP_ROTATE, 0 -CMD_SET_OPP_DDR, MTK_POWER_HINT_PMS_INSTALL, 0 -CMD_SET_OPP_DDR, MTK_POWER_HINT_GALLERY_BOOST, 1 -CMD_SET_SCREEN_OFF_STATE, MTK_POWER_HINT_WFD, 2 -CMD_SET_OPP_DDR, MTK_POWER_HINT_WIPHY_SPEED_DL, 0 -CMD_SET_WIPHY_CAM, MTK_POWER_HINT_WIPHY_SPEED_DL, 1 -CMD_SET_OPP_DDR, MTK_POWER_HINT_SPORTS, 0 -CMD_SET_FSBT_SOFT_FPS, MTK_POWER_HINT_SPORTS, 60, 60 -CMD_SET_FBT_BHR_OPP, MTK_POWER_HINT_SPORTS, 15 -CMD_SET_SCHED_BOOST, MTK_POWER_HINT_SPORTS, 1 -CMD_SET_CPUFREQ_CCI_MODE, MTK_POWER_HINT_SPORTS, 1 -CMD_SET_SCREEN_OFF_STATE, MTK_POWER_HINT_SPORTS, 2 -CMD_SET_EARA_BENCH, MTK_POWER_HINT_SPORTS, 1 -CMD_SET_SCHEDPLUS_DOWN_THROTTLE_NS, MTK_POWER_HINT_SPORTS, 1000000 -CMD_SET_SCHEDPLUS_SYNC_FLAG, MTK_POWER_HINT_SPORTS, 1 diff --git a/magisk/system/vendor/etc/powerscntbl.xml b/magisk/system/vendor/etc/powerscntbl.xml deleted file mode 100644 index b6d7329..0000000 --- a/magisk/system/vendor/etc/powerscntbl.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/magisk/uninstall.sh b/magisk/uninstall.sh index 44598d3..f3b7c9a 100644 --- a/magisk/uninstall.sh +++ b/magisk/uninstall.sh @@ -1,3 +1,43 @@ #!/system/bin/sh +# +# Copyright (C) 2021-2022 Matt Yang +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# -rm -Rf /sdcard/yc +# MR author: railjty +USER_PATH=/sdcard/Android/yc/uperf + +wait_until_login() { + # in case of /data encryption is disabled + while [ "$(getprop sys.boot_completed)" != "1" ]; do + sleep 1 + done + + # we doesn't have the permission to rw "/sdcard" before the user unlocks the screen + local test_file="/sdcard/Android/.PERMISSION_TEST" + true >"$test_file" + while [ ! -f "$test_file" ]; do + true >"$test_file" + sleep 1 + done + rm "$test_file" +} + +on_remove() { + wait_until_login + rm -Rf $USER_PATH + rm -f /data/powercfg* +} + +(on_remove &) diff --git a/version.json b/version.json new file mode 100644 index 0000000..f2116dc --- /dev/null +++ b/version.json @@ -0,0 +1,6 @@ +{ + "versionCode": 220709, + "version": "v3", + "zipUrl": "https://github.com/yc9559/uperf/releases/download/dev-22.07.09/uperf-dev-22.07.09.zip", + "changelog": "https://github.com/yc9559/uperf/raw/master/changelog.md" +}