DivestOS/Patches/LineageOS-18.1/android_device_htc_msm8974-common/295147.patch

42 lines
2.0 KiB
Diff
Raw Normal View History

From 9eafc9bac81580be0a391981ea28d8b2fc51b4f7 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 26986943..28965315 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 c978a74f..470ce27f 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