Compare commits
23 Commits
bq1
...
bka-backup
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
10586a9d4a | ||
|
|
213053b2e3 | ||
|
|
ce5d0c333f | ||
|
|
e8da85fd96 | ||
|
|
34d8554510 | ||
|
|
b277f8c03e | ||
|
|
7b575ce1eb | ||
|
|
37a7dd6cfb | ||
|
|
f03e83d1e1 | ||
|
|
c1b0ecc377 | ||
|
|
7aa4220185 | ||
|
|
7c63bfebaa | ||
|
|
c4e96fd547 | ||
|
|
129fdb00e4 | ||
|
|
b44aed089a | ||
|
|
afef2a1d6f | ||
|
|
d70d2d17d3 | ||
|
|
b6efc02294 | ||
|
|
5d82c74ffb | ||
| 890393a955 | |||
|
|
e4e29defad | ||
|
|
b0a455e0b8 | ||
|
|
3967a9b37f |
@@ -101,7 +101,6 @@ BOARD_HAVE_QCOM_FM := true
|
||||
DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \
|
||||
hardware/qcom-caf/common/vendor_framework_compatibility_matrix.xml \
|
||||
hardware/qcom-caf/common/vendor_framework_compatibility_matrix_legacy.xml \
|
||||
vendor/lineage/config/device_framework_matrix.xml \
|
||||
$(COMMON_PATH)/framework_compatibility_matrix.xml
|
||||
|
||||
DEVICE_MANIFEST_FILE := \
|
||||
|
||||
@@ -22,6 +22,9 @@ $(call inherit-product, hardware/qcom-caf/common/common.mk)
|
||||
# UDFPS
|
||||
$(call soong_config_set,surfaceflinger,udfps_lib,//$(LOCAL_PATH):libudfps_extension.realme_sm7125)
|
||||
|
||||
# speaker layout channel mask
|
||||
$(call soong_config_set,android_hardware_audio,skip_speaker_layout_channel_mask_field,true)
|
||||
|
||||
# Partitions
|
||||
PRODUCT_USE_DYNAMIC_PARTITIONS := true
|
||||
PRODUCT_BOARD_PLATFORM := atoll
|
||||
@@ -227,9 +230,11 @@ PRODUCT_PACKAGES += \
|
||||
init.qcom.usb.rc \
|
||||
init.sm7125.rc
|
||||
|
||||
# Recovery init script
|
||||
# Recovery
|
||||
PRODUCT_PACKAGES += \
|
||||
init.recovery.qcom.sh
|
||||
init.recovery.qcom.sh \
|
||||
init.recovery.qcom.rc \
|
||||
init.recovery.usb.rc
|
||||
|
||||
# Vendor shell scripts
|
||||
PRODUCT_PACKAGES += \
|
||||
|
||||
@@ -1,17 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2020 The LineageOS Project
|
||||
|
||||
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.
|
||||
Copyright (C) 2022-2024 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<!-- Whether a software navigation bar should be shown. NOTE: in the future this may be
|
||||
autodetected from the Configuration. -->
|
||||
@@ -21,9 +13,6 @@
|
||||
<!-- The restoring is handled by modem if it is true-->
|
||||
<bool name="skip_restoring_network_selection">true</bool>
|
||||
|
||||
<!-- Set to true to add links to Cell Broadcast app from Settings and MMS app. -->
|
||||
<bool name="config_cellBroadcastAppLinks">true</bool>
|
||||
|
||||
<!-- M user agent string -->
|
||||
<string name="config_mms_user_agent">Android-Mms/2.0</string>
|
||||
|
||||
@@ -161,6 +150,9 @@
|
||||
Doze dreams will run whenever the power manager is in a dozing state. -->
|
||||
<string name="config_dozeComponent">com.android.systemui/com.android.systemui.doze.DozeService</string>
|
||||
|
||||
<!-- Doze: should the TYPE_PICK_UP_GESTURE sensor be used as a pulse signal. -->
|
||||
<bool name="config_dozePulsePickup">true</bool>
|
||||
|
||||
<!-- If true, the doze component is not started until after the screen has been
|
||||
turned off and the screen off animation has been performed. -->
|
||||
<bool name="config_dozeAfterScreenOffByDefault">true</bool>
|
||||
@@ -218,10 +210,6 @@
|
||||
on the headphone/microphone jack. When false use the older uevent framework. -->
|
||||
<bool name="config_useDevInputEventForAudioJack">true</bool>
|
||||
|
||||
<!-- Boolean indicating whether the HWC setColorTransform function can be performed efficiently
|
||||
in hardware. -->
|
||||
<bool name="config_setColorTransformAccelerated">true</bool>
|
||||
|
||||
<!-- Flag indicating whether the we should enable the automatic brightness in Settings.
|
||||
Software implementation will be used if config_hardware_auto_brightness_available is not set -->
|
||||
<bool name="config_automatic_brightness_available">true</bool>
|
||||
@@ -366,11 +354,6 @@
|
||||
Equivalent to 67/255 (default for this device) -->
|
||||
<integer name="config_screenBrightnessSettingDefault">45</integer>
|
||||
|
||||
<!-- Vibrator pattern for a very short but reliable vibration for soft keyboard tap -->
|
||||
<integer-array name="config_keyboardTapVibePattern">
|
||||
<item>40</item>
|
||||
</integer-array>
|
||||
|
||||
<!-- Vibrator pattern for feedback about a long screen/key press -->
|
||||
<integer-array name="config_longPressVibePattern">
|
||||
<item>0</item>
|
||||
@@ -434,22 +417,58 @@
|
||||
|
||||
<!-- Default list of files pinned by the Pinner Service -->
|
||||
<string-array translatable="false" name="config_defaultPinnerServiceFiles">
|
||||
<item>"/apex/com.android.art/javalib/core-libart.jar"</item>
|
||||
<item>"/apex/com.android.art/javalib/core-oj.jar"</item>
|
||||
<item>"/apex/com.android.art/javalib/core-libart.jar"</item>
|
||||
<item>"/system_ext/priv-app/SystemUI/SystemUI.apk"</item>
|
||||
<item>"/system/bin/surfaceflinger"</item>
|
||||
<item>"/system/framework/boot-framework.vdex"</item>
|
||||
<item>"/system/framework/ext.jar"</item>
|
||||
<item>"/system/framework/framework-res.apk"</item>
|
||||
<item>"/system/framework/framework.jar"</item>
|
||||
<item>"/system/framework/services.jar"</item>
|
||||
<item>"/system/framework/ext.jar"</item>
|
||||
<item>"/system/framework/telephony-common.jar"</item>
|
||||
<item>"/system/lib/libEGL.so"</item>
|
||||
<item>"/system/lib/libGLESv1_CM.so"</item>
|
||||
<item>"/system/lib/libGLESv2.so"</item>
|
||||
<item>"/system/lib/libGLESv3.so"</item>
|
||||
<item>"/system/lib/libgui.so"</item>
|
||||
<item>"/system/lib/libhwui.so"</item>
|
||||
<item>"/system/lib/libui.so"</item>
|
||||
<item>"/system/lib/libvulkan.so"</item>
|
||||
<item>"/system/lib64/libEGL.so"</item>
|
||||
<item>"/system/lib64/libGLESv1_CM.so"</item>
|
||||
<item>"/system/lib64/libGLESv2.so"</item>
|
||||
<item>"/system/lib64/libGLESv3.so"</item>
|
||||
<item>"/system/lib64/libgui.so"</item>
|
||||
<item>"/system/lib64/libhwui.so"</item>
|
||||
<item>"/system_ext/priv-app/SystemUI/SystemUI.apk"</item>
|
||||
<item>"/system/lib64/libui.so"</item>
|
||||
<item>"/system/lib64/libvulkan.so"</item>
|
||||
<item>"/vendor/lib/egl/eglSubDriverAndroid.so"</item>
|
||||
<item>"/vendor/lib/egl/libEGL_adreno.so"</item>
|
||||
<item>"/vendor/lib/egl/libGLESv1_CM_adreno.so"</item>
|
||||
<item>"/vendor/lib/egl/libGLESv2_adreno.so"</item>
|
||||
<item>"/vendor/lib/hw/vulkan.adreno.so"</item>
|
||||
<item>"/vendor/lib/libCB.so"</item>
|
||||
<item>"/vendor/lib/libOpenCL.so"</item>
|
||||
<item>"/vendor/lib/libadreno_utils.so"</item>
|
||||
<item>"/vendor/lib/libgsl.so"</item>
|
||||
<item>"/vendor/lib/libllvm-glnext.so"</item>
|
||||
<item>"/vendor/lib/libllvm-qcom.so"</item>
|
||||
<item>"/vendor/lib64/egl/eglSubDriverAndroid.so"</item>
|
||||
<item>"/vendor/lib64/egl/libEGL_adreno.so"</item>
|
||||
<item>"/vendor/lib64/egl/libGLESv1_CM_adreno.so"</item>
|
||||
<item>"/vendor/lib64/egl/libGLESv2_adreno.so"</item>
|
||||
<item>"/vendor/lib64/hw/vulkan.adreno.so"</item>
|
||||
<item>"/vendor/lib64/libCB.so"</item>
|
||||
<item>"/vendor/lib64/libOpenCL.so"</item>
|
||||
<item>"/vendor/lib64/libadreno_utils.so"</item>
|
||||
<item>"/vendor/lib64/libgsl.so"</item>
|
||||
<item>"/vendor/lib64/libllvm-qgl.so"</item>
|
||||
<item>"/vendor/lib64/libllvm-glnext.so"</item>
|
||||
<item>"/vendor/lib64/libllvm-qcom.so"</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Should the pinner service pin the Home application? -->
|
||||
<bool name="config_pinnerHomeApp">true</bool>
|
||||
<!-- Bytes that the PinnerService will pin for Home app -->
|
||||
<integer name="config_pinnerHomePinBytes">6291456</integer>
|
||||
|
||||
<!-- List of files pinned by the Pinner Service with the JIT Zygote boot image b/119800099 -->
|
||||
<string-array translatable="false" name="config_jitzygoteBootImagePinnerServiceFiles">
|
||||
@@ -502,9 +521,6 @@
|
||||
available on some devices. -->
|
||||
<bool name="config_enableHapticTextHandle">true</bool>
|
||||
|
||||
<!-- Enable Zram writeback feature to allow unused pages in zram be written to flash. -->
|
||||
<bool name="config_zramWriteback">true</bool>
|
||||
|
||||
<!-- Whether to post reset runnable for all clients. Needed for some older
|
||||
vendor fingerprint HAL implementations. -->
|
||||
<bool name="config_fingerprintPostResetRunnableForAllClients">true</bool>
|
||||
@@ -565,6 +581,8 @@
|
||||
manager will disable alpha trasformation in animations where not
|
||||
strictly needed. -->
|
||||
<bool name="config_sf_limitedAlpha">true</bool>
|
||||
<!-- Whether the new Auto Selection Network UI should be shown -->
|
||||
<bool name="config_enableNewAutoSelectNetworkUI">true</bool>
|
||||
|
||||
<!-- Package name of a telephony-related system app, such as an IMS service.
|
||||
Exempted from privacy indicators. -->
|
||||
@@ -589,9 +607,7 @@
|
||||
|
||||
<!-- Whether we use large screen shade header which takes only one row compared to QS header -->
|
||||
<bool name="config_use_large_screen_shade_header">true</bool>
|
||||
|
||||
<!-- Boost Framework -->
|
||||
<bool name="config_supportsBoostFramework">true</bool>
|
||||
|
||||
|
||||
<!-- Whether WiFi display is supported by this device.
|
||||
There are many prerequisites for this feature to work correctly.
|
||||
@@ -606,4 +622,8 @@
|
||||
* The device must be provisioned with HDCP keys (for protected content).
|
||||
-->
|
||||
<bool name="config_enableWifiDisplay">true</bool>
|
||||
</resources>
|
||||
|
||||
<!-- Whether WM DisplayContent supports high performance transitions
|
||||
(lower-end devices may want to disable) -->
|
||||
<bool name="config_deviceSupportsHighPerfTransitions">false</bool>
|
||||
</resources>
|
||||
16
product.prop
16
product.prop
@@ -19,6 +19,22 @@ vendor.display.disable_metadata_dynamic_fps=1
|
||||
|
||||
# LMKD
|
||||
ro.config.low_ram=false
|
||||
ro.lmk.log_stats=false
|
||||
ro.lmk.kill_heaviest_task=true
|
||||
ro.lmk.swap_free_low_percentage=100
|
||||
|
||||
# LMK tuning
|
||||
ro.lmk.filecache_min_kb=153600
|
||||
ro.lmk.stall_limit_critical=40
|
||||
ro.lmk.use_new_strategy=true
|
||||
ro.lmk.enable_watermark_check=true
|
||||
ro.lmk.enable_userspace_lmk=true
|
||||
ro.lmk.enhance_batch_kill=false
|
||||
ro.lmk.super_critical=701
|
||||
ro.lmk.kill_timeout_ms=50
|
||||
ro.lmk.psi_scrit_complete_stall_ms=150
|
||||
ro.lmk.direct_reclaim_pressure=45
|
||||
ro.lmk.reclaim_scan_threshold=0
|
||||
|
||||
# Incremental FS
|
||||
ro.incremental.enable=1
|
||||
|
||||
20
recovery/root/Android.bp
Normal file
20
recovery/root/Android.bp
Normal file
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// Copyright (C) 2026 The LineageOS Project
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
prebuilt_etc {
|
||||
name: "init.recovery.qcom.rc",
|
||||
src: "init.recovery.qcom.rc",
|
||||
sub_dir: "recovery/root",
|
||||
filename: "init.recovery.qcom.rc",
|
||||
installable: true,
|
||||
}
|
||||
|
||||
prebuilt_etc {
|
||||
name: "init.recovery.usb.rc",
|
||||
src: "init.recovery.usb.rc",
|
||||
sub_dir: "recovery/root",
|
||||
filename: "init.recovery.usb.rc",
|
||||
installable: true,
|
||||
}
|
||||
@@ -4,15 +4,15 @@
|
||||
#
|
||||
# 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.
|
||||
# * Neither the name of The Linux Foundation nor
|
||||
# the names of its contributors may be used to endorse or promote
|
||||
# products derived from this software without specific prior written
|
||||
# permission.
|
||||
# * 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.
|
||||
# * Neither the name of The Linux Foundation nor
|
||||
# the names of its 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
|
||||
@@ -31,59 +31,148 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
#
|
||||
|
||||
function configure_zram_parameters() {
|
||||
swapoff /dev/block/zram0 2>/dev/null || true
|
||||
|
||||
# Reset zram device
|
||||
[ -w /sys/block/zram0/reset ] && echo 1 > /sys/block/zram0/reset
|
||||
|
||||
# Set compression algorithm (LZ4 optimized for ARM Cortex-A76/A55)
|
||||
echo lz4 > /sys/block/zram0/comp_algorithm 2>/dev/null || return 1
|
||||
|
||||
# Optimize compression streams for 8-core big.LITTLE (2x A76 + 6x A55)
|
||||
echo 4 > /sys/block/zram0/max_comp_streams 2>/dev/null || true
|
||||
|
||||
# Set 4GB zram size
|
||||
echo 4294967296 > /sys/block/zram0/disksize 2>/dev/null || return 1
|
||||
|
||||
# Initialize and enable swap
|
||||
mkswap /dev/block/zram0 2>/dev/null || return 1
|
||||
swapon /dev/block/zram0 -p 32758 2>/dev/null || return 1
|
||||
|
||||
# VM tuning - Optimized for Realme 6 Pro mobile workloads
|
||||
{
|
||||
# Swappiness: Slightly higher for 4GB zram to utilize it effectively
|
||||
echo 100 > /proc/sys/vm/swappiness
|
||||
|
||||
# Cache pressure: Aggressive reclaim for mobile RAM management
|
||||
echo 100 > /proc/sys/vm/vfs_cache_pressure
|
||||
|
||||
# Page-cluster: Small reads optimal for mobile flash + zram combo
|
||||
echo 1 > /proc/sys/vm/page-cluster
|
||||
|
||||
# Dirty ratios: Conservative for mobile storage longevity
|
||||
echo 20 > /proc/sys/vm/dirty_ratio
|
||||
echo 5 > /proc/sys/vm/dirty_background_ratio
|
||||
|
||||
# Extra free memory: Buffer for smooth operation
|
||||
echo 1024 > /proc/sys/vm/extra_free_kbytes
|
||||
|
||||
# Memory overcommit: Conservative for stability
|
||||
echo 1 > /proc/sys/vm/overcommit_memory
|
||||
echo 50 > /proc/sys/vm/overcommit_ratio
|
||||
|
||||
# Additional mobile optimizations for Snapdragon 720G
|
||||
echo 1 > /proc/sys/vm/compact_memory 2>/dev/null || true
|
||||
echo 0 > /proc/sys/vm/oom_kill_allocating_task 2>/dev/null || true
|
||||
|
||||
# Optimize readahead for mobile storage patterns
|
||||
echo 128 > /sys/block/*/queue/read_ahead_kb 2>/dev/null || true
|
||||
|
||||
} 2>/dev/null
|
||||
|
||||
return 0
|
||||
function configure_read_ahead_kb_values() {
|
||||
MemTotalStr=`cat /proc/meminfo | grep MemTotal`
|
||||
MemTotal=${MemTotalStr:16:8}
|
||||
|
||||
dmpts=$(ls /sys/block/*/queue/read_ahead_kb | grep -e dm -e mmc)
|
||||
|
||||
# Set 128 for <= 3GB &
|
||||
# set 512 for >= 4GB targets.
|
||||
if [ $MemTotal -le 3145728 ]; then
|
||||
echo 128 > /sys/block/mmcblk0/bdi/read_ahead_kb
|
||||
echo 128 > /sys/block/mmcblk0rpmb/bdi/read_ahead_kb
|
||||
for dm in $dmpts; do
|
||||
echo 128 > $dm
|
||||
done
|
||||
else
|
||||
echo 512 > /sys/block/mmcblk0/bdi/read_ahead_kb
|
||||
echo 512 > /sys/block/mmcblk0rpmb/bdi/read_ahead_kb
|
||||
for dm in $dmpts; do
|
||||
echo 512 > $dm
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
function enable_swap() {
|
||||
# Enable swap if not already enabled
|
||||
if [ ! -f /proc/swaps ] || [ -z "$(cat /proc/swaps | grep zram0)" ]; then
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
function configure_memory_parameters() {
|
||||
# Unified memory configuration for Atoll device (Realme 6 Pro: 6GB/8GB RAM)
|
||||
# Combines ZRAM setup and memory management parameters
|
||||
|
||||
ProductName=`getprop ro.product.name`
|
||||
arch_type=`uname -m`
|
||||
MemTotalStr=`cat /proc/meminfo | grep MemTotal`
|
||||
MemTotal=${MemTotalStr:16:8}
|
||||
|
||||
# Configure ZRAM parameters with LZ4 compression
|
||||
echo lz4 > /sys/block/zram0/comp_algorithm
|
||||
echo 100 > /proc/sys/vm/swappiness
|
||||
echo 60 > /proc/sys/vm/direct_swappiness
|
||||
echo 0 > /proc/sys/vm/page-cluster
|
||||
|
||||
if [ -f /sys/block/zram0/disksize ]; then
|
||||
# Enable deduplication if available
|
||||
if [ -f /sys/block/zram0/use_dedup ]; then
|
||||
echo 1 > /sys/block/zram0/use_dedup
|
||||
fi
|
||||
|
||||
# Configure ZRAM size based on total RAM
|
||||
if [ $MemTotal -le 4194304 ]; then
|
||||
# 4GB RAM: 2.5GB ZRAM
|
||||
echo 2684354560 > /sys/block/zram0/disksize
|
||||
echo 4 > /sys/module/lowmemorykiller/parameters/almk_totalram_ratio
|
||||
elif [ $MemTotal -le 6291456 ]; then
|
||||
# 6GB RAM: 3GB ZRAM
|
||||
echo 3221225472 > /sys/block/zram0/disksize
|
||||
echo 6 > /sys/module/lowmemorykiller/parameters/almk_totalram_ratio
|
||||
elif [ $MemTotal -le 8388608 ]; then
|
||||
# 8GB RAM: 4GB ZRAM
|
||||
echo 4294967296 > /sys/block/zram0/disksize
|
||||
echo 8 > /sys/module/lowmemorykiller/parameters/almk_totalram_ratio
|
||||
else
|
||||
# 12GB+ RAM: 5GB ZRAM
|
||||
echo 5368709120 > /sys/block/zram0/disksize
|
||||
echo 10 > /sys/module/lowmemorykiller/parameters/almk_totalram_ratio
|
||||
fi
|
||||
|
||||
# Initialize and enable ZRAM swap
|
||||
mkswap /dev/block/zram0
|
||||
swapon /dev/block/zram0 -p 32758
|
||||
fi
|
||||
|
||||
# Configure Low Memory Killer parameters
|
||||
# Read adj series and set adj threshold for PPR and ALMK
|
||||
adj_series=`cat /sys/module/lowmemorykiller/parameters/adj`
|
||||
adj_1="${adj_series#*,}"
|
||||
set_almk_ppr_adj="${adj_1%%,*}"
|
||||
|
||||
# Calculate PPR adj threshold (HOME adj and below should not be affected)
|
||||
set_almk_ppr_adj=$(((set_almk_ppr_adj * 6) + 6))
|
||||
echo $set_almk_ppr_adj > /sys/module/lowmemorykiller/parameters/adj_max_shift
|
||||
|
||||
# Calculate vmpressure_file_min for 64-bit architecture
|
||||
if [ "$arch_type" == "aarch64" ]; then
|
||||
minfree_series=`cat /sys/module/lowmemorykiller/parameters/minfree`
|
||||
minfree_1="${minfree_series#*,}"
|
||||
rem_minfree_1="${minfree_1%%,*}"
|
||||
minfree_2="${minfree_1#*,}"
|
||||
rem_minfree_2="${minfree_2%%,*}"
|
||||
minfree_3="${minfree_2#*,}"
|
||||
rem_minfree_3="${minfree_3%%,*}"
|
||||
minfree_4="${minfree_3#*,}"
|
||||
rem_minfree_4="${minfree_4%%,*}"
|
||||
minfree_5="${minfree_4#*,}"
|
||||
|
||||
vmpres_file_min=$((minfree_5 + (minfree_5 - rem_minfree_4)))
|
||||
echo $vmpres_file_min > /sys/module/lowmemorykiller/parameters/vmpressure_file_min
|
||||
fi
|
||||
|
||||
# Enable Adaptive LMK
|
||||
echo 1 > /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk
|
||||
|
||||
# Enable OOM reaper
|
||||
if [ -f /sys/module/lowmemorykiller/parameters/oom_reaper ]; then
|
||||
echo 1 > /sys/module/lowmemorykiller/parameters/oom_reaper
|
||||
fi
|
||||
|
||||
# Configure Process Reclaim parameters
|
||||
if [ -f /sys/devices/soc0/soc_id ]; then
|
||||
soc_id=`cat /sys/devices/soc0/soc_id`
|
||||
else
|
||||
soc_id=`cat /sys/devices/system/soc/soc0/id`
|
||||
fi
|
||||
|
||||
# Set PPR parameters (excluding premium SoCs)
|
||||
case "$soc_id" in
|
||||
"321" | "341" | "292" | "319" | "246" | "291" | "305" | "312")
|
||||
# Skip PPR for premium targets
|
||||
;;
|
||||
*)
|
||||
echo $set_almk_ppr_adj > /sys/module/process_reclaim/parameters/min_score_adj
|
||||
echo 1 > /sys/module/process_reclaim/parameters/enable_process_reclaim
|
||||
echo 50 > /sys/module/process_reclaim/parameters/pressure_min
|
||||
echo 70 > /sys/module/process_reclaim/parameters/pressure_max
|
||||
echo 30 > /sys/module/process_reclaim/parameters/swap_opt_eff
|
||||
echo 512 > /sys/module/process_reclaim/parameters/per_swap_size
|
||||
;;
|
||||
esac
|
||||
|
||||
# Set global VM parameters
|
||||
echo 0 > /sys/module/vmpressure/parameters/allocstall_threshold
|
||||
echo 1 > /proc/sys/vm/watermark_scale_factor
|
||||
|
||||
# Configure read-ahead values
|
||||
configure_read_ahead_kb_values
|
||||
|
||||
# Enable swap
|
||||
enable_swap
|
||||
}
|
||||
|
||||
# Core control parameters on silver
|
||||
echo 0 0 0 0 1 1 > /sys/devices/system/cpu/cpu0/core_ctl/not_preferred
|
||||
@@ -103,109 +192,94 @@ echo 85 > /proc/sys/kernel/sched_group_downmigrate
|
||||
echo 100 > /proc/sys/kernel/sched_group_upmigrate
|
||||
echo 1 > /proc/sys/kernel/sched_walt_rotate_big_tasks
|
||||
|
||||
#colocation v3 settings
|
||||
# Colocation v3 settings
|
||||
echo 740000 > /proc/sys/kernel/sched_little_cluster_coloc_fmin_khz
|
||||
|
||||
# configure governor settings for little cluster
|
||||
# Configure governor settings for little cluster
|
||||
echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
|
||||
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/up_rate_limit_us
|
||||
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/down_rate_limit_us
|
||||
echo 500 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/up_rate_limit_us
|
||||
echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/down_rate_limit_us
|
||||
echo 1248000 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq
|
||||
echo 576000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
|
||||
|
||||
# configure governor settings for big cluster
|
||||
# Configure governor settings for big cluster
|
||||
echo "schedutil" > /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor
|
||||
echo 0 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/up_rate_limit_us
|
||||
echo 0 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/down_rate_limit_us
|
||||
echo 500 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/up_rate_limit_us
|
||||
echo 20000 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/down_rate_limit_us
|
||||
echo 1267200 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/hispeed_freq
|
||||
echo 652800 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq
|
||||
|
||||
# sched_load_boost as -6 is equivalent to target load as 85. It is per cpu tunable.
|
||||
echo -6 > /sys/devices/system/cpu/cpu6/sched_load_boost
|
||||
echo -6 > /sys/devices/system/cpu/cpu7/sched_load_boost
|
||||
echo -6 > /sys/devices/system/cpu/cpu6/sched_load_boost
|
||||
echo -6 > /sys/devices/system/cpu/cpu7/sched_load_boost
|
||||
echo 85 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/hispeed_load
|
||||
|
||||
# Enable conservative pl for power save
|
||||
echo 1 > /proc/sys/kernel/sched_conservative_pl
|
||||
|
||||
echo "0:1248000" > /sys/module/cpu_boost/parameters/input_boost_freq
|
||||
echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms
|
||||
|
||||
# Set Memory parameters
|
||||
configure_memory_parameters
|
||||
|
||||
# Enable bus-dcvs
|
||||
for device in /sys/devices/platform/soc
|
||||
do
|
||||
for cpubw in $device/*cpu-cpu-llcc-bw/devfreq/*cpu-cpu-llcc-bw
|
||||
do
|
||||
echo "bw_hwmon" > $cpubw/governor
|
||||
echo "2288 4577 7110 9155 12298 14236" > $cpubw/bw_hwmon/mbps_zones
|
||||
echo 4 > $cpubw/bw_hwmon/sample_ms
|
||||
echo 68 > $cpubw/bw_hwmon/io_percent
|
||||
echo 20 > $cpubw/bw_hwmon/hist_memory
|
||||
echo 0 > $cpubw/bw_hwmon/hyst_length
|
||||
echo 80 > $cpubw/bw_hwmon/down_thres
|
||||
echo 0 > $cpubw/bw_hwmon/guard_band_mbps
|
||||
echo 250 > $cpubw/bw_hwmon/up_scale
|
||||
echo 1600 > $cpubw/bw_hwmon/idle_mbps
|
||||
echo 50 > $cpubw/polling_interval
|
||||
done
|
||||
for cpubw in $device/*cpu-cpu-llcc-bw/devfreq/*cpu-cpu-llcc-bw
|
||||
do
|
||||
echo "bw_hwmon" > $cpubw/governor
|
||||
echo "2288 4577 7110 9155 12298 14236" > $cpubw/bw_hwmon/mbps_zones
|
||||
echo 4 > $cpubw/bw_hwmon/sample_ms
|
||||
echo 68 > $cpubw/bw_hwmon/io_percent
|
||||
echo 20 > $cpubw/bw_hwmon/hist_memory
|
||||
echo 0 > $cpubw/bw_hwmon/hyst_length
|
||||
echo 80 > $cpubw/bw_hwmon/down_thres
|
||||
echo 0 > $cpubw/bw_hwmon/guard_band_mbps
|
||||
echo 250 > $cpubw/bw_hwmon/up_scale
|
||||
echo 1600 > $cpubw/bw_hwmon/idle_mbps
|
||||
echo 50 > $cpubw/polling_interval
|
||||
done
|
||||
|
||||
for llccbw in $device/*cpu-llcc-ddr-bw/devfreq/*cpu-llcc-ddr-bw
|
||||
do
|
||||
echo "bw_hwmon" > $llccbw/governor
|
||||
echo "1144 1720 2086 2929 3879 5931 6881 8137" > $llccbw/bw_hwmon/mbps_zones
|
||||
echo 4 > $llccbw/bw_hwmon/sample_ms
|
||||
echo 68 > $llccbw/bw_hwmon/io_percent
|
||||
echo 20 > $llccbw/bw_hwmon/hist_memory
|
||||
echo 0 > $llccbw/bw_hwmon/hyst_length
|
||||
echo 80 > $llccbw/bw_hwmon/down_thres
|
||||
echo 0 > $llccbw/bw_hwmon/guard_band_mbps
|
||||
echo 250 > $llccbw/bw_hwmon/up_scale
|
||||
echo 1600 > $llccbw/bw_hwmon/idle_mbps
|
||||
echo 40 > $llccbw/polling_interval
|
||||
done
|
||||
|
||||
for npubw in $device/*npu*-npu-ddr-bw/devfreq/*npu*-npu-ddr-bw
|
||||
do
|
||||
echo 1 > /sys/devices/virtual/npu/msm_npu/pwr
|
||||
echo "bw_hwmon" > $npubw/governor
|
||||
echo "1144 1720 2086 2929 3879 5931 6881 8137" > $npubw/bw_hwmon/mbps_zones
|
||||
echo 4 > $npubw/bw_hwmon/sample_ms
|
||||
echo 80 > $npubw/bw_hwmon/io_percent
|
||||
echo 20 > $npubw/bw_hwmon/hist_memory
|
||||
echo 10 > $npubw/bw_hwmon/hyst_length
|
||||
echo 30 > $npubw/bw_hwmon/down_thres
|
||||
echo 0 > $npubw/bw_hwmon/guard_band_mbps
|
||||
echo 250 > $npubw/bw_hwmon/up_scale
|
||||
echo 0 > $npubw/bw_hwmon/idle_mbps
|
||||
echo 40 > $npubw/polling_interval
|
||||
echo 0 > /sys/devices/virtual/npu/msm_npu/pwr
|
||||
done
|
||||
|
||||
#Enable mem_latency governor for L3, LLCC, and DDR scaling
|
||||
for memlat in $device/*cpu*-lat/devfreq/*cpu*-lat
|
||||
do
|
||||
echo "mem_latency" > $memlat/governor
|
||||
echo 10 > $memlat/polling_interval
|
||||
echo 400 > $memlat/mem_latency/ratio_ceil
|
||||
done
|
||||
|
||||
#Enable cdspl3 governor for L3 cdsp nodes
|
||||
for l3cdsp in $device/*cdsp-cdsp-l3-lat/devfreq/*cdsp-cdsp-l3-lat
|
||||
do
|
||||
echo "cdspl3" > $l3cdsp/governor
|
||||
done
|
||||
|
||||
#Gold L3 ratio ceil
|
||||
echo 4000 > /sys/class/devfreq/soc:qcom,cpu6-cpu-l3-lat/mem_latency/ratio_ceil
|
||||
|
||||
#Enable compute governor for gold latfloor
|
||||
for latfloor in $device/*cpu*-ddr-latfloor*/devfreq/*cpu-ddr-latfloor*
|
||||
do
|
||||
echo "compute" > $latfloor/governor
|
||||
echo 10 > $latfloor/polling_interval
|
||||
done
|
||||
for llccbw in $device/*cpu-llcc-ddr-bw/devfreq/*cpu-llcc-ddr-bw
|
||||
do
|
||||
echo "bw_hwmon" > $llccbw/governor
|
||||
echo "1144 1720 2086 2929 3879 5931 6881 8137" > $llccbw/bw_hwmon/mbps_zones
|
||||
echo 4 > $llccbw/bw_hwmon/sample_ms
|
||||
echo 68 > $llccbw/bw_hwmon/io_percent
|
||||
echo 20 > $llccbw/bw_hwmon/hist_memory
|
||||
echo 0 > $llccbw/bw_hwmon/hyst_length
|
||||
echo 80 > $llccbw/bw_hwmon/down_thres
|
||||
echo 0 > $llccbw/bw_hwmon/guard_band_mbps
|
||||
echo 250 > $llccbw/bw_hwmon/up_scale
|
||||
echo 1600 > $llccbw/bw_hwmon/idle_mbps
|
||||
echo 40 > $llccbw/polling_interval
|
||||
done
|
||||
|
||||
for npubw in $device/*npu*-npu-ddr-bw/devfreq/*npu*-npu-ddr-bw
|
||||
do
|
||||
echo 1 > /sys/devices/virtual/npu/msm_npu/pwr
|
||||
echo "bw_hwmon" > $npubw/governor
|
||||
echo "1144 1720 2086 2929 3879 5931 6881 8137" > $npubw/bw_hwmon/mbps_zones
|
||||
echo 4 > $npubw/bw_hwmon/sample_ms
|
||||
echo 80 > $npubw/bw_hwmon/io_percent
|
||||
echo 20 > $npubw/bw_hwmon/hist_memory
|
||||
echo 10 > $npubw/bw_hwmon/hyst_length
|
||||
echo 30 > $npubw/bw_hwmon/down_thres
|
||||
echo 0 > $npubw/bw_hwmon/guard_band_mbps
|
||||
echo 250 > $npubw/bw_hwmon/up_scale
|
||||
echo 0 > $npubw/bw_hwmon/idle_mbps
|
||||
echo 40 > $npubw/polling_interval
|
||||
echo 0 > /sys/devices/virtual/npu/msm_npu/pwr
|
||||
done
|
||||
done
|
||||
|
||||
# cpuset parameters
|
||||
echo 0-5 > /dev/cpuset/background/cpus
|
||||
# memlat specific settings are moved to separate file under
|
||||
# device/target specific folder
|
||||
setprop vendor.dcvs.prop 1
|
||||
|
||||
# cpuset parameters for power save
|
||||
echo 0-3 > /dev/cpuset/background/cpus
|
||||
echo 0-5 > /dev/cpuset/system-background/cpus
|
||||
|
||||
# Turn off scheduler boost at the end
|
||||
@@ -214,8 +288,8 @@ echo 0 > /proc/sys/kernel/sched_boost
|
||||
# Turn on sleep modes
|
||||
echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
|
||||
|
||||
# configure zram
|
||||
configure_zram_parameters
|
||||
# Change IO scheduler to noop for better performance
|
||||
echo noop > /sys/block/sda/queue/scheduler
|
||||
|
||||
# Post-setup services
|
||||
setprop vendor.post_boot.parsed 1
|
||||
# Create 1 kswapd thread
|
||||
echo 1 > /proc/sys/vm/kswapd_threads
|
||||
10
system.prop
10
system.prop
@@ -25,9 +25,10 @@ persist.vendor.camera.oissr.debug=1
|
||||
vendor.debug.camera.eisv2enable=1
|
||||
vendor.debug.camera.eisv3enable=1
|
||||
# Allow privileged camera apps
|
||||
persist.vendor.camera.privapp.list=com.android.camera,com.google.camera,org.lineageos.aperture
|
||||
persist.vendor.camera.privapp.list=org.lineageos.aperture,org.codeaurora.snapcam,com.android.camera,com.google.camera
|
||||
# Allow aux cameras
|
||||
vendor.camera.aux.packagelist=com.android.camera,com.google.camera,org.lineageos.aperture
|
||||
vendor.camera.aux.packagelist=org.lineageos.aperture,org.codeaurora.snapcam,com.android.camera,com.google.camera
|
||||
persist.vendor.camera.expose.aux=1
|
||||
|
||||
# CNE
|
||||
persist.vendor.cne.feature=1
|
||||
@@ -122,11 +123,6 @@ persist.vendor.ssr.restart_level=ALL_ENABLE
|
||||
persist.debug.wfd.enable=1
|
||||
persist.sys.wfd.virtual=0
|
||||
|
||||
# ZRAM
|
||||
ro.zram.mark_idle_delay_mins=60
|
||||
ro.zram.first_wb_delay_mins=180
|
||||
ro.zram.periodic_wb_delay_hours=24
|
||||
|
||||
#SkiaGL
|
||||
debug.renderengine.backend=skiaglthreaded
|
||||
renderthread.skia.reduceopstasksplitting=true
|
||||
|
||||
@@ -151,9 +151,6 @@ ro.qcom.adreno.qgl.ShaderStorageImageExtendedFormats=0
|
||||
# FM
|
||||
vendor.hw.fm.init=0
|
||||
|
||||
# FRP
|
||||
ro.frp.pst=/dev/block/bootdevice/by-name/frp
|
||||
|
||||
#Graphics
|
||||
debug.hwui.use_hint_manager=true
|
||||
debug.hwui.target_cpu_time_percent=30
|
||||
|
||||
Reference in New Issue
Block a user