[Ramdisk Kernel Mod] LateAutumn zImage + Zetsubou init tweak for Lineage OS 14.1

didhiy

Senior Member
Mar 29, 2011
1,080
1,291
0
Jakarta
This is just a proof of concept for "if we like a Kernel but don't like the default setting and too lazy to use kernel adiutor to apply the desirable setting" :D

Basically I just changed the Late Autumn installer zip using the goodies from Zetsubou. So this is a Late Autumn kernel with my modifications to ramdisk.

Here's the difference:
1. Enable doubletap2wake by default
2. Set CPU maximum frequency to 1401600
3. Set CPU minimum frequency to 200000
4. Set GPU maximum frequency to 550000
5. Set GPU minimum frequency to 100000
6. Enable MSM CPU hotplug by default
7. Disable GPU Adreno idle by default

Warning:
Only tested on lineage-14.1-20170126-nightly-wt88047 !!
Make sure to install this kernel on top of that rom stock kernel...
And make sure to clear the kernel adiutor setting too... You can set the others later, I did a dirty trick to let the CPU minimum frequency goes to 200 with interactive governor. I don't know if others got this weird problem, in my device set min freq to 200 didn't work with interactive governor.

How to install:
- Make sure you have lineage-14.1-20170126-nightly-wt88047 rom with the stock kernel
- Flash from TWRP like usual

Download:
https://drive.google.com/file/d/0B3ue12JCB2NgbVo3ODkxeVN1Ylk/view?usp=drivesdk

Credits:
@nicknitewolf for the awesome lineage official build
@iamsubhranil for the amazing stable kernel
@Ashish94 for the various genius tweaks
 
Last edited:

didhiy

Senior Member
Mar 29, 2011
1,080
1,291
0
Jakarta
My modifications details:

1. In anykernel.sh file
Code:
# begin ramdisk changes

# add zetsubou initialization script
insert_line init.rc "import /init.zetsubou.rc" after "import /init.environ.rc" "import /init.zetsubou.rc";

# adb secure
backup_file default.prop;
replace_string default.prop "ro.adb.secure=0" "ro.adb.secure=1" "ro.adb.secure=0";
replace_string default.prop "ro.secure=0" "ro.secure=1" "ro.secure=0";

# change CPU
backup_file init.qcom.power.rc;
replace_string init.qcom.power.rc "scaling_min_freq 200000" "scaling_min_freq 800000" "scaling_min_freq 200000";
replace_string init.qcom.power.rc "1 200000:85" "1 800000:85" "1 200000:85";

# end ramdisk changes
2. Add file init.zetsubou.rc :
Code:
on boot

#S2W
write /sys/android_touch/sweep2wake  0

#DT2W
write /sys/android_touch/doubletap2wake  1

#S2S
write /sys/android_touch/sweep2sleep 0

on property:sys.boot_completed=1


#a53 max
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 1401600

#GPU
write /sys/class/kgsl/kgsl-3d0/devfreq/min_freq 100000000
write /sys/class/kgsl/kgsl-3d0/max_gpuclk 550000000
write /sys/module/adreno_idler/parameters/adreno_idler_active N

# Enable MSM Hotplug
write /sys/module/msm_hotplug/msm_enabled 1
 
Last edited: