Commit Graph

59 Commits

Author SHA1 Message Date
theshaenix
d5b0780c14 sm7125-common: rootdir: kang post_boot from miatolls common tree
* Synced post_boot script from Evolution-X miatolls common tree
  https://github.com/Evolution-X-Devices/device_xiaomi_sm6250-common/blob/bka/rootdir/bin/init.qcom.post_boot-atoll.sh
2025-11-09 19:26:16 +05:30
theshaenix
1e298d14a6 sm7125-common: fine tuned the zram 2025-11-09 19:22:09 +05:30
theshaenix
8f96a9bf71 sm7125-common: rootdir : bin : Aggressive performance & boot optimization for RMX2061
- Fine-tuned GPU devfreq governors and frequencies for dynamic performance
  - Added support for simple_ondemand and msm-adreno-tz
  - AdrenoBoost handling for performance/battery modes
  - Dynamic min/max frequency assignment without killing idle sleep
- Improved ZRAM configuration
  - Auto-sized based on available RAM
  - Multi-threaded compression enabled
  - Aggressive memory management (swappiness 90, vfs_cache_pressure 80)
- VM and memory tweaks
  - Optimized dirty ratios, writeback intervals, overcommit, and compaction
  - Transparent HugePage disabled for faster memory reclaim
  - NUMA balancing disabled for unified memory efficiency
- LMK / RAM management updates
  - Preserves recent apps longer with custom minfree values
  - Extra free memory and watermark tuning
  - CPU cgroup tuning for foreground/background prioritization
- Thermal and network optimizations
  - Conservative thermal trip points to reduce throttling
  - TCP/IP stack and buffer tuning for low latency
- Bootspeed improvements
  - Suppressed printk, RCU and debug overhead
  - Disabled NMI watchdog and tracing for faster initialization
- Overall: Enhanced user experience for both gaming and everyday usage
  - Aggressive memory & GPU management without sacrificing idle or background tasks
2025-11-09 19:22:09 +05:30
theshaenix
e005ad2aa1 sm7125-common: rootdir : bin: tune CPU, scheduler and memory
- Enable ZRAM with LZ4 compression and tuned swappiness
- Adjust CPU hispeed freqs and minimums for better responsiveness
- Configure schedutil governor for both clusters
- Lower migration thresholds for smoother task distribution
- Tune core_ctl for balanced performance vs. idle drain
- Re-enable sleep states for improved standby battery
- Set up bw_hwmon and mem_latency governors on interconnects
- Cleaned out unnecessary/duplicate entries from script

Overall effect: smoother UI, faster app response, and better
multitasking with minimal idle power impact.
2025-11-09 19:22:07 +05:30
theshaenix
be8403dea6 sm7125-common : rootdir: Optimize CPU governor, sched, and core control for Snapdragon 720G
- Replaced static performance governor with dynamic schedutil for all cores
    - Tuned up_rate_limit_us and down_rate_limit_us for smooth everyday performance
    - Set scaling_min and scaling_max frequencies according to Kryo 465 Gold/Silver cores
    - Configured core_ctl for little cluster (min_cpus, busy thresholds, offline delay)
    - Disabled core_ctl on big cluster to let scheduler manage ramp-up efficiently
    - Adjusted b.L scheduler parameters (sched_downmigrate, sched_upmigrate, group migrate)
    - Set sched_little_cluster_coloc_fmin_khz for smoother colocation
    - Applied sched_load_boost per CPU for better responsiveness
    - Configured input boost frequency and duration for UI snappiness
    - Updated memory and bus DCVS parameters for balanced performance/power
    - Maintained conservative power optimizations (cpusets, sleep modes, kswapd, I/O scheduler)

    This commit ensures a universal setup for normal daily use and gaming while
    avoiding overheating and maintaining high FPS
2025-11-09 19:22:06 +05:30
LuK1337
e455368c95 sm7125-common: Set SSR restart_level in init.qcom.rc
Change-Id: I31e174f8c3647c17152a2b225b1bb524e22e07aa
2025-11-09 19:22:05 +05:30
theshaenix
0a8fe4c93c Revert "sm7125--common: Commonize schedtune and cpuset configuration"
This reverts commit 13f221fb28.
2025-11-09 19:22:05 +05:30
Arian
98dd114623 sm7125-common: rootdir: Enable PowerHAL hint processing
Change-Id: I4de6ec81eaf002c094df53ff26ed24db02972dfe
2025-11-09 19:22:00 +05:30
shaenix
1961573023 sm7125-common: rootdir: Remove unnecessary class_core script 2025-08-07 18:53:59 +05:30
shaenix
ec7b29dd10 sm7125-common: Cleanup class_main/early_boot/qcom scripts 2025-08-07 18:53:59 +05:30
shaenix
addd5faa9a sm7125-common: init: Uprev hwcomposer to 2.4 2025-08-07 18:53:59 +05:30
shaenix
34b4061261 sm7125-common: init.qcom.rc: Remove unused property
Remove persist.ims.regmanager.mode
property along with the service
which is unused
2025-08-07 18:53:59 +05:30
shaenix
07824c7604 sm7125-common: Remove unnecessary hvdcp service
* hvdcp_opti is the correct one
2025-08-07 18:53:58 +05:30
shaenix
1c0533888b sm7125-common: Ditch rild.libpath prop
This is only needed for AOSP rild services. It's currently
unused since the move to QCRIL.
2025-08-07 18:53:58 +05:30
shaenix
d26ff9517f sm7125-common: init: Don't mount TraceFS twice
* AOSP already mounts TraceFS in system init, so mounting it twice
   causes SEPolicy denials. See the comments in this change.

   https://android-review.googlesource.com/c/platform/system/sepolicy/+/1294195
2025-08-07 18:53:58 +05:30
shaenix
13f221fb28 sm7125--common: Commonize schedtune and cpuset configuration 2025-08-07 18:53:58 +05:30
shaenix
ea5c124304 sm7125-common: Clean up the no longer used logdump service code. 2025-08-07 18:53:57 +05:30
shaenix
b6c5c1e6ae sm7125-common: init.qcom.rc: Removed deprecated drmdiag entry
Eliminate drmdiagapp entries in init scripts. This app was deprecated
hence these entries were causing boot time degradation.
2025-07-29 01:56:18 +05:30
shaenix
2fa1b4afe0 sm7125-common:Remove usage of ro.data.large_tcp_window_size
* Not needed for us.
2025-07-29 01:56:17 +05:30
shaenix
cba52552ea sm7125-common:-common: init: Add missing vendor prefix to hwcomposer props 2025-07-29 01:56:17 +05:30
shaenix
fe498e9589 sm7125-common:rootdir : Added the late-init flags 2025-07-29 01:56:17 +05:30
shaenix
7eb94406cd sm7125-common:rootdir: shifted to blueprints 2025-07-29 01:56:16 +05:30
shaenix
3e30042459 sm7125-common:rootdir:Replaced writepid with task_profiles command for cgroup migration
writepid command usage to join a cgroup has been deprecated in favor
of a more flexible approach using task_profiles. This way cgroup path
is not hardcoded and cgroup changes can be easily made. Replace
writepid with task_profiles command to migrate between cgroups.
2025-07-28 19:38:03 +05:30
shaenix
b8e738cb7c sm7125-common:rootdir: Delete dhcpcd init entries, since dhcpcd is no more. 2025-07-28 19:30:12 +05:30
debdeep199x
b2469133d8 sm7125-common: init: Use schedutil governor for atoll 2024-05-24 13:46:00 +00:00
markakash
40bd8fa77e sm7125-common: : rootdir: Chown the cgroup.procs nodes
* Perf-hal tries to access the nodes but requires permissions as reflected in the logs
* 11-10 19:25:50.044  1055  1080 E ANDR-PERF-OPTSHANDLER: Cannot open/create foreground cgroup file
2024-05-23 15:23:52 +00:00
UtsavBalar1231
d7d9ad7657 sm7125-common: : rootdir: Add vendor prefix to rmt_storage
* As per the init.qcom.rc service defination has vendor prefix
* This Fixes:
I init    : Command 'start rmt_storage' action=boot (/vendor/etc/init/hw/init.target.rc:161) took 0ms and failed: service rmt_storage not found
2024-05-23 15:23:52 +00:00
Wei Wang
0627483da8 sm7125-common: rootdir: Boot time tuning 2024-05-23 15:23:52 +00:00
Jaegeuk Kim
e85c1f5aab sm7125-common: Get back to default from long-standing VM tweaks
This patch removed the old writeout policy tune which was never touched since
2009. In the meantime, most of Android devices are equipped with over 4GB DRAM
and very fast flash storages like UFS, which becomes more like desktop or
servers in 2009. So, it'd be worth to go back to use the default kernel configs.
2024-05-23 15:23:52 +00:00
Kyle Lin
f9076c8962 sm7125-common: rootdir: Setup runtime cpusets
Because the arch is similiar with SDM670, we aling the setting with
bonito.
2024-05-23 15:23:51 +00:00
Egor Pilipenko
22c662aee9 sm7125-common: RealmeParts: Remove OTG toggle
Always enabled since newer kernel changes

Signed-off-by: Egor Pilipenko <ctapchuk@gmail.com>
2024-05-22 19:00:54 +07:00
debdeep199x
21b639ef56 sm7125-common: switch to common libperf manager 2024-05-22 03:31:10 +00:00
SagarMakhar
77d0be00b5 sm7125-common: add service for logging 2023-10-29 14:03:24 +00:00
LuK1337
331761a346 sm7125-common: Changes for AOSP Recovery 2023-03-31 14:03:32 +00:00
debdeep199x
786c839377 sm7125-common: Revert"rootdir: Remove sdcard legacy support" 2023-03-31 14:03:32 +00:00
Adithya R
26d410a7e3 sm7125-common: rootdir: Override disable self-init GSI services
* this service runs from vendor in non-stock roms and enables gsi
   mode in order to pass cts/vts, but also has the side effect of
   breaking aux cams and more

 * since we are not running any cts or vts tests, disable these
   services to retain stock behavior of camera hal and other stuff

 * retain oppo_version and product mounts while we're at it

Signed-off-by: debdeep199x <debdeep199x@gmail.com>
2022-10-18 15:19:35 +00:00
Wang Han
2652e6979d sm7125-common: rootdir: ueventd: Don't modify permissions of
/dev/hw_random

This addresses an underlying problem since /dev/hw_random is used. The
issue is that EntropyMixer, which runs in system_server, needs to read
from /dev/hw_random, but thanks to our qualcomm ueventd, EntropyMixer
can never accress this node, resulting in warnings like this:

W EntropyMixer: Failed to add HW RNG output to entropy pool
W EntropyMixer: java.io.FileNotFoundException: /dev/hw_random (Permission denied)

AOSP ueventd handles this well, so just remove this line to get things
back to stage. This issue was never exposed because Google derps the
logging here, which is already fixed on Pie.

c78a463e87

Change-Id: I42c9aaa8f57306536e51c0a17febad57a5a77581

Signed-off-by: debdeep199x <debdeep199x@gmail.com>
2022-10-17 15:40:13 +00:00
Adam Shih
c9a35084ba sm7125-common: rootdir: Remove sdcard legacy support
[    1.667218] audit: type=1400 audit(1804301.953:5): avc:  denied  { write } for  pid=507 comm="init" name="/" dev="tmpfs" ino=17273 scontext=u:r:vendor_init:s0 tcontext=u:object_r:tmpfs:s0 tclass=dir permissive=0
[    1.667362] init: Command 'symlink /sdcard /mnt/sdcard' action=vendor.skip.init=0 && init (/vendor/etc/init/hw/init.sm8150.rc:87) took 1ms and failed: symlink() failed: Permission denied
[    1.669181] init: Command 'symlink /sdcard /storage/sdcard0' action=vendor.skip.init=0 && init (/vendor/etc/init/hw/init.sm8150.rc:88) took 1ms and failed: symlink() failed: Read-only file system

Bug: 131295392
Test: modify rc file, push to device and find error log gone
Change-Id: I24b6f5ac58159a1172a286eb680ded326c7319f9
(cherry picked from commit b1a63f1a7a99fb6c5a526c73426cab0bbf29a352)
Signed-off-by: Jason(HeWei) Sung <jasonsung@google.com>
Signed-off-by: debdeep199x <debdeep199x@gmail.com>
2022-10-09 11:01:27 +00:00
Sultan Alsawaf
e4781bbe95 sm7125-common: Change userdata fsync mode to strict for f2fs
To help mitigate data loss potential in the event of an unclean
shutdown. The small performance hit is worth the trade-off for improved
data integrity, especially since custom builds are more susceptible to
unclean shutdowns during development.

Signed-off-by: debdeep199x <debdeep199x@gmail.com>
2022-10-06 15:01:22 +00:00
Mingshu Pang
d028fc7d30 sm7125-common: add cpu set for audio app
Define cpu set for audio app. This is to optimize
audio scheduling against lpm exit latencies.

CRs-Fixed: 2588130
Change-Id: If53c569febb0dbf3adf69c5cea2db6d505ba8471
Signed-off-by: debdeep199x <debdeep199x@gmail.com>
2022-10-06 15:01:22 +00:00
Prasanta Kumar Sahu
c209577534 sm7125-common: Add 'check' flag for metadata partition.
Change-Id: I68d58178c80e2ed12f67d95b74ab048908c5a5e7
Signed-off-by: debdeep199x <debdeep199x@gmail.com>
2022-10-06 15:01:21 +00:00
Neeraj Soni
60b49f4edc sm7125-common: Enable new file encryption flag and mount option
Enable mount option and encryption flags to use new file encryption
architecture.

Change-Id: I4a99068baf6830b9e0e86619420be6ab6809db3e
Signed-off-by: default avatarNeeraj Soni <neersoni@codeaurora.org>
Signed-off-by: debdeep199x <debdeep199x@gmail.com>
2022-10-06 15:01:21 +00:00
daniml3
b18c6f6659 sm7125-common: mark wpa_supplicant as an aidl
Signed-off-by: debdeep199x <debdeep199x@gmail.com>
2022-10-06 14:15:10 +00:00
Sonal Singh
c13697605a sm7125-common: rootdir: Override AIDL Power HAL service
Signed-off-by: debdeep199x <debdeep199x@gmail.com>
2022-08-26 03:37:48 +00:00
Kyle Lin
664f3f671b sm7125-common:rootdir: Enable s2idle
Signed-off-by: debdeep199x <debdeep199x@gmail.com>
2022-08-26 03:34:05 +00:00
Danny Lin
17f59e393f sm7125-common: rootdir: Use Google's schedutil rate-limits
These are tuned for mobile/interactive systems, unlike CAF's equivalent
up and down rate-limits.

Signed-off-by: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: Alex Winkowski <dereference23@outlook.com>
Signed-off-by: debdeep199x <debdeep199x@gmail.com>
2022-06-16 15:32:59 +00:00
SVB
3f5ac4b14f sm7125-common: rootdir: Allow all filesystems for USB-OTG
Signed-off-by: SVB <shef@intech-stv.ru>
Signed-off-by: debdeep199x <debdeep199x@gmail.com>
2022-04-30 15:48:08 +00:00
SagarMakhar
4b93b831cd sm7125-common: Update fastchg fw on init
Signed-off-by: SagarMakhar <sagarmakhar@gmail.com>
Signed-off-by: debdeep199x <debdeep199x@gmail.com>
2022-04-30 15:29:24 +00:00
SagarMakhar
6133c96e0f sm7125-common: rootdir: Import device specific init rc file
Signed-off-by: SagarMakhar <sagarmakhar@gmail.com>
2021-08-29 16:42:01 +00:00
SagarMakhar
48934a3165 sm7125-common: Restore cabc node permissions
Signed-off-by: SagarMakhar <sagarmakhar@gmail.com>
2021-08-28 04:47:05 +00:00