Magisk-Modules-Alt-Repo / submission

Information regarding the submission of Magisk Modules to the Alt-Repo.
166 stars 8 forks source link

[Module] perf-limit-xiaomi-12 #194

Closed mgrybyk closed 1 year ago

mgrybyk commented 1 year ago

ID: perf-limit-xiaomi-12 Name: Performance limit for Xiaomi 12 Description: Limit CPU and GPU performance to desired level on Xiaomi devices with Qualcomm Gen 1 CPU Link: https://github.com/mgrybyk/perf-limit-magisk Source code: https://github.com/mgrybyk/perf-limit-magisk

HuskyDG commented 1 year ago

Please do not use exit in customize.sh because module installer will need to clean up tmp file. I have a suggestion for customize.sh:

ui_print "perf-limit: GPU power and CPU frequencies limit for Xiaomi 12 Pro."
ui_print "perf-limit: running checks..."

check_if_file_exist(){
if [ ! -f "${1}" ] ; then
    abort "perf-limit: won't work ${1} not found. Exiting."
fi;
}

for file in \
/sys/class/kgsl/kgsl-3d0/max_pwrlevel \
/sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq \
/sys/devices/system/cpu/cpufreq/policy4/scaling_max_freq \
/sys/devices/system/cpu/cpufreq/policy7/scaling_max_freq; do
    check_if_file_exist "$file"
done

ui_print "perf-limit: all looks good! Please reboot the device."
mgrybyk commented 1 year ago

@HuskyDG thanks a lot for the feedback! I've applied the suggested changes and triggered a new release.

HuskyDG commented 1 year ago

@mgrybyk Approved.

I have created a repository for you at: https://github.com/Magisk-Modules-Alt-Repo/perf-limit-xiaomi-12

Enjoy!

Check your e-mail inbox for an invite to your new repository and remember to 'Watch' your repository on Github to have new issues in it show up in your feed.

Make sure to change your local repository's push URLs or configure 2 parallel push URLs.