Remove All Ads from XDA

[KERNEL][STOCK-MM 3.4.113][Gabriel][Stweak][D85X_VS985_LS990_F400]_[160617]

1,216 posts
Thanks Meter: 2,151
By mostafaz, Senior Member on 27th June 2016, 01:04 PM
Post Reply Email Thread
Be Sure ! If you benefit to the other's you will see it's effect.
Imam Ali (a.s.)

If you don't believe in any religion and don't fear the Resurrection Day, at least be free in this world.
Imam Husayn (a.s.)

Q&A in 2nd post
Features/Changelog in 3rd post
Mod & Tweak in 4th post

Flash at you own Risk !
Download directory

Kernel Source Code:
Ramdisk Source Code:
There is a file named "compile.log" in kernel zip file
that says which branch i used for build process

Attached Thumbnails
Click image for larger version

Name:	attachment.php.png
Views:	18162
Size:	74.0 KB
ID:	3842538   Click image for larger version

Name:	attachment2.php.png
Views:	18760
Size:	122.1 KB
ID:	3842539   Click image for larger version

Name:	Screenshot_2016-08-12-16-35-09.png
Views:	18284
Size:	190.0 KB
ID:	3842540   Click image for larger version

Name:	Screenshot_2016-08-12-16-47-36.png
Views:	17212
Size:	235.9 KB
ID:	3842541   Click image for larger version

Name:	Screenshot_2017-06-16-18-02-43.jpg
Views:	3050
Size:	244.3 KB
ID:	4184023  
The Following 92 Users Say Thank You to mostafaz For This Useful Post: [ View ] Gift mostafaz Ad-Free
27th June 2016, 01:04 PM |#2  
mostafaz's Avatar
OP Senior Member
Thanks Meter: 2,151

Q: i have long charge time !
A: there is a driver to reduce charge current if battery temp goes high to prevent damage, if cpu temp goes high thermal driver will cut off freqs so it can reduce charge time, so monitor system for why temp is high specially on battery.

Q: can i turn intelli_thermal_2 off to get better performance?
A: we have 2 intelligent thermal control driver, if you turn it off the built-in driver will get online and control the temperature which is controlling temp during the boot till intelli_2 get online then you can have more control over it. i changed parameters from 80 & 90 degC to 72 & 75 degC for safer temp control (as a user requested ). so if you want get higher freq values at higher temperature you should get control of intelli_2. caution: reduce the temperature for long life.

Q: i can't get last_kmsg , there is no last_kmsg ?
A: actually there is a tunable parameters to let the kernel dump it at fails but you can use ADB and get live kmsg log at terminal by running "cat /proc/kmsg". it will show you live show
<3>[ 8624.446243 / 07-07 11:08:50.416] pre-check do_freq_control temp[47], 				limit_idx[14], 
<3>[ 8624.696399 / 07-07 11:08:50.666] pre-check do_freq_control temp[48], 				limit_idx[14], 
<3>[ 8624.946358 / 07-07 11:08:50.916] pre-check do_freq_control temp[47], 				limit_idx[14], 
<3>[ 8625.196421 / 07-07 11:08:51.166] pre-check do_freq_control temp[46], 				limit_idx[14], 
<3>[ 8625.446387 / 07-07 11:08:51.416] pre-check do_freq_control temp[46], 				limit_idx[14], 
<3>[ 8625.696374 / 07-07 11:08:51.666] pre-check do_freq_control temp[46], 				limit_idx[14],
if you want get log only for your desired parameters like temp you can limit it with "cat /proc/kmsg | grep temp"

Q: my device is always hot and max freq is decreasing to lower values?
A: depends on your config, decreasing max freq is due to thermal limitation ( protect your device from heat by decreasing max freq to produce less heat ... ).
you can find out which process using the cpu and cpu produced heat :
run "top -s cpu" in your android terminal or adb :
  PID PR CPU% S  #THR     VSS     RSS PCY UID      Name
22972  2  26% S    14 1362360K 135488K  bg u0_a23
 4432  0  24% S     4   9680K   2632K  fg media_rw /system/bin/sdcard
 4974  1   7% S    14 1354472K  69500K  fg system
  361  2   3% S    18 191664K   6452K  fg system   /system/bin/surfaceflinger
22960  0   2% S    10 1716192K 198660K  bg u0_a38
23060  3   1% R     1   3068K   1288K  fg root     top
21534  0   1% S    20 1221608K  49832K  bg u0_a104  com.grarak.kerneladiutor
 3532  0   0% S   148 2023996K  93580K  fg system   system_server
 1134  0   0% D     1      0K      0K  fg root     mdss_fb0
in this case is using much more that other processes , find out why it's running or end that process.

Q: i faced lag ! what can i do ?
A: depends on your config, but try ramp up thermal degC can prevent to throttle freq & cores (you will kill your device by heat )

Q: can i take my device temprature down ?
A: depends on your config, try lower down temprature degC limit to make throttle freq & core as soon as possible.
lower down max freq, you have not to kill performance at all try free up the ram from unwanted apps

Q: i have long charge time ?
A: i switched cpu_governor at charge process to have shortest ( ~ 1:20 ), monitor its rate at battery usage.( i've tested slim and alucard )

Q: what you mean by optimized build?
A: simple answer is i use GCC build flags in build process, google it.

Q: do you have any script for configuration?
A: actually i'm trying to build some script :
example: to drop cache and free up ram in scheduled time using: echo 2 > /proc/sys/vm/drop_caches
and some cool script from dorimanx
implementing stweak can fix all of these stuff

Q: why there is a build for slim governor and one for elementalx?
A: they have almost similar code, they can't live toghether or i can't make them.i'm working on it.

Q: do you have plan to build with separate toolchain, like uber-7,5 or linaro ?
A: it depends on users feedback, let's experience them, who cares

Q: do you support other variants like D852 and ... ?
A: as far as i can

Q: why kernel options not tuned?
A: i've planing to implement stweak to have control over sysfs

Q: what is your kernel config?
A: i satisfied if i have 0% or 1% during the night

   # My simple profile
   cpu alucard
   hotplug alucard
   gpu powersave
   i/o noop 1024
      	        232 237 256, saturation 75 (franco config)
		read 512, write 256
   fsync off
		core control off
		freq throttle 75, core throttle 72
		temp,core hysterecis 10

   # my smoothness profile
   cpu slim/elementalx
		down_differential 10
		input_enent_timeout 800
		sampling_down_factor 2
		ui/sampling_rate 15000
   hotplug alucard
		sample_rate 35%
   gpu msm-adreno
	   	simple algorithm laziness 3, ramp threshold 7
   screen same
   i/o fiops 1024
   entropy same
   fsync same
note: for better performance set same sample rate at cpu and hotplug
The Following 42 Users Say Thank You to mostafaz For This Useful Post: [ View ] Gift mostafaz Ad-Free
27th June 2016, 01:05 PM |#3  
mostafaz's Avatar
OP Senior Member
Thanks Meter: 2,151

* restore f2fs driver to 3.4.y stable
* codes compiled with gnu gcc 7.1.0 toolchain compile by me
* kernel use updated libraries instead of linux ones by gcc 7.1.0
* add CFS kernel scheduler switch (how to balance tasks onto different CPU unit)
* fix devfreq nodes unavailable
* remove async-fsync
* add fsync control
* remove sched relaxing cpu-idle by nvidia
* merge kernel cpu codes
* merge cpu-idle codes from 3.10.y kernel mainline
* merge codes to fat, exfat from 3.10.y kernel mainline
* add interactivex, nightmare, darkness governors
* merge massive codes to crypto, of, cgroup, kernel time, ntp, tick, rcu, lib
* merge codes to net
* merge codes to zram driver from 4.11.y kernel mainline
* merge codes to base/power & base/core & qos driver from 3.10.y kernel mainline
* merge codes to mdss
* merge codes to selinux
* merge codes to kernel/irq
* merge codes to kernel scheduler, cputime, cpu accounting from 3.10.y kernel mainline

##### Ramdisk/Stweak
* add dcop7 profile by @dcop7
* add salvation profile by me
* add per governor profile for alucard & nighmare cpu governors
* add profile for alucard hotplug
* add adreno-idler controls
* add multicore power saving controls
* fix thermal driver switch
* fix synapse stats, now it shows kernel stats
* fix node path for cpu-boost & devfreq governors
* update busybox to latest codes from branch "", compiled by me

* allow modem to enter deep sleep (control interface in mastercore tab)
* merge random driver from 3.16.y
* disable more debug option to save space and cpu cycle
* add maple io scheduler (based on zen & sio)
* merged alucard touch-boost driver's option and stability to caf cpu-boost to fix the min freq locking to boosted freq and boosted core & freq in heat.
* merge NTFS fs from 3.10.y
* merge EXT4 & F2FS fs from 3.10.y ( better coded file system can save power )
* merge update to selinux
* removed dyn_fsync and add fast async_fsync from htc
* merge update to ZRAM & ZSMALLOC from 4.8 kernel
* merge swap speed update to ZRAM driver
* merged massive update to memory code from 3.10.y and upstream code aurora updates backported from 4.5.y
* merge updates to memory code and ram leaks fixes ( slub, OOM, LMK, page_aloc, etc )
* merged some updates to memory code from 4.6.y and some fixes to shrinker code
* merged many updates to memory code, including vmpressure and new shrinker API & tunable process reclaim control available in memory tab
* add zen-interactive tuning to optimized & overclocked version and all ondemand based GOVs (Tunes the kernel for responsiveness at the cost of throughput and power usage) (web)
Thank you @dorimanx

* all profiles will be reset at fisrt boot after flash

* merge kernel printk driver from 3.10.y
* merge cgroup & library updates from 3.10.y
* merge I/O driver from 3.10.y (all io schedulers converted to use new io update)
* merge LMK driver from 3.10.y and fix panic under memory pressure
* merge ipc & android binder codes from 3.10.y (interprocess communication mechanism, rom and apps should do better under pressure, thanks dorimanx)
* add quick wake-up driver and fix for lpm and cpu-idle
* available in 3 style
1- same as previous versions
2- same as #1 + GCC OPTimization Flags (Ofast, Graphite, ...)
3- same as #1 & #2 + CPU and GPU has been Over Clocked ( CPU 2.8 GHz and GPU 657 MHz )

##### Ramdisk/Stweak
* add suigintou profile
* some typo fixes
* add overclocked frequencies which works only in Over Clocked version

* merge MMC codes from 3.10.y kernel mainline
* merge cpuidle codes from 3.10.y
* add ability to disable dmesg (kernel logging)
* merge qseecom from 3.10.y
* merge watchdog from 3.10.y
* add frandom
* add Boeffla sound engine
sysfs available at: /sys/class/misc/boeffla_sound/*
enable with : echo 1 > /sys/class/misc/boeffla_sound/boeffla_sound
to change volume you should add left & right chanel : echo "20 20" > /sys/class/misc/boeffla_sound/speaker_volume

##### Ramdisk/Stweak
* add ability to disable dmesg logging (others tab)
* add sound control options
* update busybox

* merge workqueue from 3.10.y and use new idr
* alucard hotplug is up with latest version to use the new workqueue structure.

##### Ramdisk/Stweak
* add an option to deactivate hotplug protection (you can set hotplug out of the stweak and cortexbrain can't change it to stweak value)

* Linux kernel version 3.4.113
* merge arm codes
* getting almost same and close features to v 1.7 features
* revert back to 3.4.y kernel scheduler
* multirom support
* merge lge v30j kernel source codes
* merge lmk (low memory killer) & oom (out of mermory) codes
* squashfs implemented (i don't have any tools to enable it)
* lz4 de/compression updated with 3.10.y
* enabled unaligned memory access (faster lz4 de/compression)
* merged latest 3.4.y f2fs updates
* merged latest zram from 3.10.y Motorola
* merged latest zsmalloc codes 3.10.y and some other memory improvement codes
* merged kgls, devfreq codes (gpu update)
* merged much saner idr and using it in most parts of kernel
* zram using new idr and compact in sleep mode (see kernel log for statistics while going to sleep, much improved results will show when ram loaded and have much app)
* kernel uses 300 Mhz internal clock
* swapping scheduled on all cores to free up ram faster
* merged codes to main cpu driver
* added null cpu-idle governor
* merged some CVE commit
* krait boost enabled
* added dynamic fsync
* compiled with latest Linaro 6.1.1

##### Ramdisk/Stweak
* added Gabriel profile (ran asphalt 8 , no lag in high detailed maps and ui)
* added undervolt control
* added sleep state control for VM (there is 2 profile for VM in Gabriel profile that you can adapt and use, one for awake state (speedmod) and one for sleep state (boeffla, adapted from boeffla kernel)
* added more controls on hotplug and cpu
* added kcal profiles
* control for new features, dynfsync, vibrator strength , ...

* Linux kernel version 3.4.112
* Merge UKSM codes (ultra kernel same page merging)
* Add cpufreq barry_allen, intel, ondemandx, interactive & ondemand from AOSP kernel mainline
* Merge Nvidia Cpuquiet codes (available on kernel adiutor)
* Merge cpu codes
* Merge multi cpu policy limiter
* Merge cpu freq limiter v 5.4 (per core functions)
* Merge cpu-boost update (per core functions)
* Merge sched codes (higher linux mainline)
* Merge workqueue codes (higher linux mainline)
* Merge power codes (higher linux mainline)
* Disable bunch of trace & debug to save cpu cycle
* Merge HMP (heterogeneous multi-process) codes (higher linux mainline)
* Cpu underclock to 268 MHz
* Merge KGSL codes
* Add Thunder-plug hotplug driver
* Add Intelli-plug hotplug driver
* Merge Random codes (3.16.y mainline)
* Merge RWSEM optimization
* Merge sl[a,o,u]b memory codes
* Merge zcache codes (3.18.y mainline)
# with new cpu/sched codes some hotplug driver may don't work properly, codes need more update !
* Implement Stweak support (kernel control with profile support)
* Stweak: add more sleep/awake functions to control kernel
* Stweak: add tunable service control (fstrim,memory reclaim and more)
* Stweak: initial 5 profile support (extreme battery,battery,default,performance,extreme performance)
# install Dorimanx stweak by default as respect him, other different ui available in download folder

* Introduce Linaro 5.3 Toolchain
* Fixed latest kernel crash
* Add Ondemand CPU_Governor from semaphore kernel (nexus 4)
* Update Intelli_Thermal driver (parameters descriptions)
* Set High Performance Profile After Boot Up to Finish the OS Load Process
As Fast As Possible and Smoothly,
Normal Profile will set after CPU Temp Goes Under 65 degC, Just a While

* F2FS bring up to date with latest codes,
stable branch 4.7-rc1-3.4 - 2016-06-03
* Sync FS just once before suspend, not all the time
* Mako Hotplug added
* Quick Wakeup driver added
( system back into suspend without fully resuming
if the wake reason was a special quick wakeup event )
* Make MPDecision to be Conservative
* Enhanced Power Efficiency by NVIDIA implemented
* Interactive CPU back to LGe changes
* CPU Boost updates and Relative Dependencies Removed
this should solve last Kernel oops
* Back light control by jon777 added
Force Rom to use defined min/max back light
* Arch Power & Gentle Fair Sleepers sysfs added
disabling gentle fair sleepers may bring you smoother ui
* Add MMC CRC control sysfs
( Enabling software CRCs on the data blocks can be a
significant (30%) performance cost )

* Support F2FS (see this instruction)
* Neon-mode activated
* Neon optimized Crypto

* Fix kernel crash/reboot
* Add Smartmax cpu_governor
* cleanup dmseg to produce better logs
* Install custom busybox for my later needs
* Enable msm_thermal by default

* Support Exfat
* Tune down default thermal limit to 72 & 75 degC
* Switch to XZ kernel compressor
* Initial support for D850, 1 ,2

* Introducing UBERTC-7 toolchain, Experimental (first time for G3)
* CPU_Governor added:
zzmoove,alucard,impulse,intellimm,hyper,nightmare, darkness,lionheart,(slim & elementalx : gpu_boost feature)
(i can't have slim and elementalx at same time) :\
interactive synced with AOSP source
* GPU_Governor added:
conservative + adreno idler,simple gpu algorithm
* Minimum GPU Freq 27 MHz
* Hotplug added:
* I/O Scheduler added:
* CPU_Boost updated
* Scheduled Workqueue implemented
* CPU Voltage control supported
* MSM_Thermal v2 implemented
* KCal v2 implemented
* Live user sharpening control implemented
can access by "/sys/devices/virtual/graphics/fb0/sharpening"
* KSM ,disabled by default
* Adaptive LMK (by motorolla) implemented
* Fsync implemented
* TCP congestion algorithm (westwood & ...)
* State notifier (determine screen state, on & off)
* ZCache,ZRam,Zsmalloc,Frontswap implemented
zram compressor can switch to lzo or lz4
maximum compressor streams can change from 1~4 cpu
## enabling zram can drain battery faster, google zcache,zram,frontswap
## to enable 512 MiB zram copy these commands to your init.d script or run in terminal:
	swapoff /dev/block/zram0;
	echo "1" > /sys/block/zram0/reset;
	echo "lz4" > /sys/block/zram0/comp_algorithm;
	echo "2" > /sys/block/zram0/max_comp_streams;
	echo "512MB" > /sys/block/zram0/disksize;
	mkswap /dev/block/zram0;
	swapon /dev/block/zram0;
* Process reclaim implemented (i don't think it's working ...)
* EXT4 filesys updated
* Frandom implemented (10-50 times faster than what you get from Linux urandom)
* Disabled crc check
* memutils, memcpy, memmove optimization

## filename resolution
SLIM is for slim cpu_governor
ELEX is for elementalx cpu_governor
U7 is for UBERTC-7 toolchain
U5 is for UBERTC-5.3.x toolchain
L5 is for Linaro-5.3.x toolchain
OPT is for optimized with gcc build flags
STK is for no-optimization
The Following 34 Users Say Thank You to mostafaz For This Useful Post: [ View ] Gift mostafaz Ad-Free
27th June 2016, 01:09 PM |#4  
mostafaz's Avatar
OP Senior Member
Thanks Meter: 2,151
Mod & Tweak

1- Bullet_93 UKM_Mod ( synapse ) 010716
Bullet_93_Mod 1.3

2- Tasker instruction
The Following 16 Users Say Thank You to mostafaz For This Useful Post: [ View ] Gift mostafaz Ad-Free
27th June 2016, 01:11 PM |#5  
bl0odmo0n's Avatar
Junior Member
Flag Rasht
Thanks Meter: 5
Niceeeeeeeee I loveeeeee it always best on LP and now in MM
The Following User Says Thank You to bl0odmo0n For This Useful Post: [ View ] Gift bl0odmo0n Ad-Free
27th June 2016, 02:15 PM |#6  
Junior Member
Thanks Meter: 6
f400 variant pls...
Pls support f400 i would like to use this kernel as daily driver........
The Following User Says Thank You to toks420 For This Useful Post: [ View ] Gift toks420 Ad-Free
27th June 2016, 02:18 PM |#7  
mostafaz's Avatar
OP Senior Member
Thanks Meter: 2,151
Originally Posted by toks420

Pls support f400 i would like to use this kernel as daily driver........

you know i'd failed for fF400 with LP, i will try again, if you know anyone who build stock MM for F400 please introduce him/her to me,tnx
i should get sources,step by step during the time
The Following User Says Thank You to mostafaz For This Useful Post: [ View ] Gift mostafaz Ad-Free
27th June 2016, 02:49 PM |#8  
Hucci's Avatar
Thanks Meter: 48
Great to see you on MM builds @mostafaz, thank you for your work.
The Following User Says Thank You to Hucci For This Useful Post: [ View ] Gift Hucci Ad-Free
27th June 2016, 02:53 PM |#9  
Thanks Meter: 5
Any reviews? Performance, battery life, feeling?
27th June 2016, 03:26 PM |#10  
cultofluna's Avatar
Senior Member
Thanks Meter: 1,249
Great performance......
For battery life is to early.......
( UBERTC 7.0.0 )
Cpu elementalx
Gpu alucard

27th June 2016, 03:27 PM |#11  
davidez25's Avatar
Senior Member
Thanks Meter: 269

Inviato dal mio LG-D855 utilizzando Tapatalk
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes