DivestOS/Patches/LineageOS-18.1/android_device_htc_msm8974-common/295147.patch
Tad 2eda5086fc Tiny tweak
Signed-off-by: Tad <tad@spotco.us>
2022-02-13 23:57:59 -05:00

42 lines
2.0 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Bruno Martins <bgcngm@gmail.com>
Date: Thu, 3 Dec 2020 20:52:39 +0000
Subject: [PATCH] msm8974-common: Re-enable ZRAM
This time around with ZRAM size set to 75% of total RAM size,
as per Qualcomm Android GO Performance Tuning Guide.
Change-Id: I8f8362ccb5110fba6c5ed50b5d87a0b94a48e01c
---
rootdir/etc/fstab.qcom | 2 ++
rootdir/etc/init.qcom.rc | 4 ++++
2 files changed, 6 insertions(+)
diff --git a/rootdir/etc/fstab.qcom b/rootdir/etc/fstab.qcom
index 2698694..2896531 100644
--- a/rootdir/etc/fstab.qcom
+++ b/rootdir/etc/fstab.qcom
@@ -18,5 +18,7 @@
/dev/block/platform/msm_sdcc.1/by-name/radio /firmware/radio vfat ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait
/dev/block/platform/msm_sdcc.1/by-name/adsp /firmware/adsp vfat ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait
+/dev/block/zram0 none swap defaults zramsize=75%,max_comp_streams=4,swapprio=10,notrim
+
/devices/msm_sdcc.2/mmc_host* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata
/devices/platform/xhci-hcd/usb* auto auto defaults voldmanaged=usb:auto
diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc
index c978a74..470ce27 100644
--- a/rootdir/etc/init.qcom.rc
+++ b/rootdir/etc/init.qcom.rc
@@ -289,6 +289,10 @@ service wcnss-service /vendor/bin/wcnss_service
oneshot
## Properties start here
+on property:sys.boot_completed=1
+ # Enable ZRAM once boot is completed
+ swapon_all /vendor/etc/fstab.qcom
+
on property:vendor.bluetooth.hciattach=true
start hciattach