Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[KERNEL][Sense/AOSP][aroma] lONELyX #023|3.1.10|S2W,DT2W,FC,UMS,UV,OC,MPDec,CPUQuiet

OP lyapota

27th December 2013, 03:18 PM   |  #1  
lyapota's Avatar
OP Recognized Contributor / Recognized Developer
Flag Kiev
Thanks Meter: 6,901
 
1,356 posts
Join Date:Joined: Aug 2008
More

src GitHub link.

CREDITS
step by step i'm porting works this guys.

maxwen (most of code)
n3ocort3x, Xmister, Alex-V, faux123

IMAGES


Quote:

Configuring kernel parameters:

Quote:

S2W Configs:
Turn off:

Code:
echo "0" > /sys/android_touch/sweep2wake
Button panel locks to s2w after this distance:
Code:
/sys/android_touch/s2w_register_threshold
Screen turns on/off after this distance:
Code:
/sys/android_touch/s2w_min_distance
Direction independent(1 - Yes, 0 - No):
Code:
/sys/android_touch/s2w_allow_stroke
Pocket protection(1 - Yes, 0 - No):
Code:
/sys/android_touch/pocket_detect
DoubleTap2Wake Configs:
Turn on:
Code:
/sys/android_touch/s2w_allow_double_tap
Time double taps (ms)
Code:
/sys/android_touch/s2w_double_tap_threshold
Time between double taps
Code:
/sys/android_touch/s2w_double_tap_duration
Dead area in points from top of screen
put 1780 for dt2w works only on virtual keya area
Code:
/sys/android_touch/s2w_double_tap_dead_area
Fast charge:
allow charge device from usb connected to PC as from wall wallet
can close ums connestion
Code:
/sys/devices/platform/htc_battery/fast_charge
Disable CPU freq limit in early suspend mode
Code:
/sys/module/cpu_tegra/parameters/perf_early_suspend
Disable EDP limit
Code:
/sys/module/cpu_tegra/parameters/disable_edp_limit
Backlight button brightness (0-255)
Code:
/sys/class/leds/button-backlight/button_brightness
Quick GPU OC 0 - 416 Mhz, 1 - 484 Mhz, 2 - 520 Mhz
Code:
/sys/kernel/tegra3_dvfs/gpu_quick_oc
CPU UV one digital value such as 25 or 0 or -25, -50, etc
Code:
/sys/kernel/tegra3_dvfs/cpu_millivolts
CORE UV one digital value such as 25 or 0 or -25, -50, etc
Code:
/sys/kernel/tegra3_dvfs/core_millivolts
Eco mode 0 - disabled, 1 - enabled (plug up to max 2 core)
Code:
/sys/module/intelli_plug/parameters/eco_mode_active

Quote:

aroma installer


  • UMS Mass storage (Sense applications)
  • common presets
    • turn on/off S2W
    • S2W direction dependent
    • S2W three/two buttons distance
    • pocket protection on/off
    • turn on/off DT2W
    • DT2W only on the VK board
    • usb fast charge on/off
    • VK button brightness
      • set 0
      • set 10
      • set 60
      • set 140
      • set 255
    • GPU OC 416, 484, 520
      • set 416 Mhz
      • set 484 Mhz
      • set 520 Mhz
    • boost CPU on resume
    • disable/enable EDP limitation
    • disable/enable LP mode on resume
    • disable/enable ECO mode
    • limit CPU max freq
  • undervolting
    • CPU
      • -25 mV
      • -50 mV
    • CORE
      • -25 mV
      • -50 mV
  • frandom device
  • flash kernel image (for S-OFF device)
    • Sense LM seria
    • Sense LQ seria
    • Sense LI seria
    • Sense UV LM seria
    • Sense UV LQ seria
    • Sense UV LI seria
    • Sense MV LM seria
    • Sense MV LQ seria
    • Sense MV LI seria

CHANGE LOG
Code:
Ver 023
+ added MV kernels - middle undervolting from the box (CORE -25 mV/CPU -50 mV) 
- complette removed LS seria.
full kernel set now: LM, LM_UV, LM_MV, LQ, LQ_UV, LQ_MV, LI, LI_UV, LI_MV
aroma 
+ added value 10 backlight button brightness
 
Ver 022 (renew)
+ the golden kernel seria LM UV -50 from the box, return back in full team UV - LM, LQ, LI, LS look in ZIP with uv predicate.
- removed quick core uv option as incompatible with UV -50 kernels, the core_millivolts stay.
aroma 
* fixed mistakes.
+ added  eco mode option
+ added limit CPU max freq option
+ account UV -50 kernels features
 
Ver 021
+ added intelli hot plug (faux123), LI seria in ZIP
* restored Best trade  hot plug (HTC), LS seria in ZIP
 
Ver 020
* fixed bluetooth for AOSP, checked with CM 10.2.1
 
Ver 019
+ restored frandom compiled as separate module
* restored /sys/kernel/tegra3_dvfs/core_millivolts
getter show CPU clock freq with CPU voltage, setter takes one digital value: 25 or -25 or -50 etc. Entered value applying to all CPU voltage table.
+ added core voltage attribute /sys/kernel/tegra3_dvfs/core_millivolts
getter show GPU clock freq with CORE voltage, setter takes one digital value: 25 or -25 or -50 etc. Entered value applying to all CORE voltage table.
+ added quick core voltage atrribute /sys/kernel/tegra3_dvfs/core_quick_mv
 0 - stock mV table, 1 set -25 mV,  2 set -50 mV into core_millivolts
* compiled two kernel files LM and LQ with stock voltage 
aroma 
+ added undervolting option to CORE and CPU voltage.
* restored frandom option
* in zip file two kernel images LM and LQ seria packed with Sense ramdisk.
To get AOSP repack appropriate sense kernel into AOSP image. 
 
Ver 018 (renew)
* DVFS GPU table 484 Mhz set as default
- removed frandom device
aroma 
+ default GPU OC 484 Mhz
- removed endeavoru model checks before install
- removed rescue voltage
* in zip file now four kernels: LM seria 50 and 25 mV undervolted, LQ seria 50 and 25 mV undervolted.
To get AOSP repack appropriate sense kernel into AOSP image. 
 
Ver 017 (renew)
* undervolted -50mV for all freq table from the box
* enhanced gpu_quick_oc to three position. 0 - 416 Mhz(default), 1 - 484 Mhz, 2 - 520 Mhz
* no_edp_limit reworked and renamed to disable_edp_limit. Now applied values from init.d without losing after.
+ added gaming governor
+ compiled with linaro 4.7 Cortex A9 toolchain with appropriated compiler options
+ added frandom and erandom char devices
56frandom script replace random with frandom and urandom with erandom.
* installation via aroma installer
+ kernel repacked with AISP and CM ramdisks (tnx @audahadi)
  Not sure it working - need check.
 
Ver 016
- reverted to stock variant button backlight - removed blink virtual key supports, button_brightness stay here.
+ swap support
+ reworked init.d/55sw2wake
+ reworked min scale frequnce same as max
+ compiled with linaro 4.7
* fixed not applied CPU voltage
* fixed abnormal battery consuming
* GPU OC set default to 484 Mhz
+ added gpu_quick_oc to 520 Mgz
 
Ver 015
* user policy max  freq sync vs scaling max.
+ applied fix for proximity sensor with not enough light.
+applyed wi-fi patch.
 
To init.d/55sw2wake added
------------------------
##Blink VK with events
echo "0" > /sys/class/leds/button-backlight/auto_bln;
#Actual anly for cpuquiet LQ seria
#echo "0" > /sys/module/cpu_tegra/parameters/disable_lp_mode_on_resume;
 
Ver 014
* Remade no_edp_limit attribute. Now can be applied from init.d
 
Ver 013
+ added Backlight button brightness
/sys/class/leds/button-backlight/button_brightness (0-255)
 
Ver 012
* UV-mv table
/sys/kernel/tegra3_dvfs/cpu_millivolts
* GPU OC 520 persist
removed gpu_oc and quick_gpu_oc attributies (not needed),
but forgot to remove commented string gpu_quick_oc from init.d/sw2wake
- Removed intellidemand, ondemand1 and touchdemand governors 
old release not compatible with new kernel, may be i'm add reworked versions latter
* Thermal throttle limitation
to disable /sys/module/cpu_tegra/parameters/no_thermal_throttle_limit (1-disable control)
i'm highly do not recommending touch it
thermal throttle prevent cpu damage from overheating more then 85 deg by C
* EDP limitation
to disable /sys/module/cpu_tegra/parameters/no_edp_limit (1-disable max CPU freq limits in multi cpu mode)
EDP set freq limits dinamicalky decide battery level and cpu temperature below 85 deg by C
* perf mode for awake 
/sys/module/cpu_tegra/parameters/perf_early_suspend (1-enable perfomance mode in early suspend mode)
+ Support HTC power save mode
/sys/htc/power_save (1 - enable power save mode 1.3 Ghz cpu limitation)
controlled by ROM HTC power manager no need touch it
+ Support HTC media boost
Don't investigate it. In code it some alghoritm to boost cpu freq for audio and video processing. looks like controled by ROM
+ Support HTC ril boost
Boost cpu freq in deep sleep mode for ril modem(incoming call)
 
Ver 011 - died in beta stage
 
Ver 010
+ GPU OC 520 optional in init.d/sw2wake
+ MP Decision instead HOTPLUG
+ IO Schedules (bfq, row, sio)
+ Governors (touchdemand, ondemand1)
 
Ver 009
- GPU 520 removed
* do over again dt2w
* fixed stuck after deep sleep
* fixed vk responsible for Venom users
 
Ver 008
+ Voltage control
+ GPU 520
+ smartmax, smartmax_eps governors.
 
Ver 007
*Code revised and cleaned
*Pocket protection rewrited, now it work as expected
-Dead area by default revert back to 0
 
Ver 006
+s2w Added pocket protection
/sys/android_touch/pocket_detect, enabled by default in 55sw2wake
+dt2w Added dead area
/sys/android_touch/s2w_double_tap_dead_area, 1780 by default in 55sw2wake (dt2w work only in virtual key panel)
put 0 for dt2w works on all screen and not only on virtual keya area.
HOW TO FLASH
For S-OFF
1. Download ZIP file and put to SD card
2. Flash ZIP from recovery

For S-ON
1. Download ZIP file and extract kernel\[what you need].img to Kernel Flasher fastboot dirrectory on the PC
2. Rename .img file to boot.img
2. Put ZIP file to SD card and flash from recovery
3. Reboot to bootloader and flash kernel by Kernel Flasher from PC

Downloads post #2
Last edited by lyapota; 23rd March 2014 at 01:05 AM.
The Following 155 Users Say Thank You to lyapota For This Useful Post: [ View ]
27th December 2013, 03:22 PM   |  #2  
lyapota's Avatar
OP Recognized Contributor / Recognized Developer
Flag Kiev
Thanks Meter: 6,901
 
1,356 posts
Join Date:Joined: Aug 2008
More
Download section
Quote:

Short explanation


Tegra 3
Tegra 3 have two CPU clasters
G cluster: 4 high performance Cortex A9 cores
LP cluster: 1 low leakage Cortex A9 core
Only 1 cluster can be active at a time
To enable use of LP cluster, must only 1 CPU to be active
No interrupts or other wakeups possible for other cores

CPU management
Handles both onlining/offlining cores and cluster switch
Use hotplug to online/offline cores
Uses the per cpu frequency targets set by cpufreq, and number of runing threads, as a measure of load

CPUFreq
The cpufreq architecture allows frequency scaling of a target CPU and is a basic driver installed in the kernel. Controlling of frequency and its corresponding voltage results in lower power of the target device. On the Android device, dynamic frequency scaling is realized by using the governors.
Governor monitors the current usage on each core at certain time intervals. When the load exceeds or falls below the threshold, frequencies are made higher or lower dynamically. Use SMP to identify power suspend/resume events.

Governors
Deside with what frequency must works cpu
Decide how long time cpu must stay with this frequency and which be next
Good guide by governors HERE.

HotPlug
The hotplug is an extended function of cpufreq, which was developed specifically for the power control of multicore processors. When cpufreq sets a core to the maximum frequency that runs for a certain period of time, the hotplug adds another core to distribute the load. Similarly, when cpufreq sets a core to the minimum frequency and the load stays low, the hotplug shuts down excess cores to reduce power consumption.

HTC best trade (HTC)
Cpu auto-hotplug/unplug based on cpufreq and runnable threads
Automatic decision wether to switch to low power core or not
Automatic decision wether to switch off cpus 1,2,3

Qualcom mpdecision (showp1984)
Cpu auto-hotplug/unplug based on system load (runqueue)
Automatic decision wether to switch to low power core or not
Low power single core while screen is off

Nvidia cpuquiet (maxwen)
Uses load status to hotplug cpus
Uses also rq_stats to detect situations with lots of threads, but low load
Froze cpus instead turn off as in best trade and mpdecision.

Cpuquiet implements pluggable policies for forcing cpu cores into a quiescent state. Appropriate policies will save power without hurting performance
Basically its a governer for the CPU cores
Runnable activates cores based on multithreading
Balanced activates based on load
Userspace basically forces them online
RQ_STATS and LOAD_STATS use the rq information to scale the CPUs

Cpu quiescent state, instead turning off it was main idea for develop cpuquiet by nvidia.

Intelliplug (faux123)
Cpu auto-hotplug/unplug based on system load (runqueue)
Automatic decision wether to switch to low power core or not
Low power single core while screen is off
Faux's mpdecision variation.

ver #023
LS seria - stock HTC best trade hotplug, LM seria - mpdecision hotplug, LQ seria - nvidia cpuquiet hotplug, LI seria - intelli hotplug
*for more informtyion read Short explanation


To get AOSP just repack apropriate Sense seria with wanted AOSP kernel image from installer

UV predicate mean undervolted -50 mV both CPU and CORE from the box.
MV predicate mean undervolted -25 mV CORE and -50 mV CPU from the box.
Flash UV only if you sure in your device. Other way - it try first standart version with undervolting on the fly. If your device works without problems with -50 mV can try MV version, next step UV.
*UV version MUCH power save than standart, but so undervolting can not works on your device.

androidfilehost.com

mirror
bindroid.com
Last edited by lyapota; 23rd March 2014 at 01:09 AM.
The Following 77 Users Say Thank You to lyapota For This Useful Post: [ View ]
27th December 2013, 03:35 PM   |  #3  
NowenUI's Avatar
Senior Member
Flag RUSSIA, Vologda.
Thanks Meter: 259
 
111 posts
Join Date:Joined: Feb 2013
Donate to Me
More
Great work!!!
But upload sources please!!!
27th December 2013, 03:35 PM   |  #4  
One-M8-Master's Avatar
Senior Member
Flag Hannover
Thanks Meter: 2,638
 
7,443 posts
Join Date:Joined: May 2012
More
awesome mate *_* thanks for that will flash now and your rom too really great that you are doing still so much for us
The Following 2 Users Say Thank You to One-M8-Master For This Useful Post: [ View ]
27th December 2013, 03:46 PM   |  #5  
04kiran's Avatar
Senior Member
Flag Bangalore
Thanks Meter: 154
 
253 posts
Join Date:Joined: Sep 2011
More
Good to see kernel thread.. Thanks a lot mate.
27th December 2013, 03:47 PM   |  #6  
Senior Member
Flag Valongo
Thanks Meter: 20
 
244 posts
Join Date:Joined: Sep 2011
More
Will this kernel work in CM 10.2?

Enviado do meu EndeavorU através de Tapatalk
The Following User Says Thank You to salomaoa For This Useful Post: [ View ]
27th December 2013, 03:57 PM   |  #7  
One-M8-Master's Avatar
Senior Member
Flag Hannover
Thanks Meter: 2,638
 
7,443 posts
Join Date:Joined: May 2012
More
Quote:
Originally Posted by salomaoa

Will this kernel work in CM 10.2?

Enviado do meu EndeavorU através de Tapatalk

no as you see it
s made for sense only
27th December 2013, 04:07 PM   |  #8  
bhaumik555's Avatar
Senior Member
Flag Ahmedabad
Thanks Meter: 44
 
194 posts
Join Date:Joined: Jan 2012
More
Awh my god lyapota you are the real champ i mean real developer 1st for mod 2nd for ROM and now for even kernel also. I salute your dedication for one x. You have learned a lot. Gr8 work much appreciated

Sent from my HTC One X using Tapatalk
The Following User Says Thank You to bhaumik555 For This Useful Post: [ View ]
27th December 2013, 04:12 PM   |  #9  
Senior Member
Thanks Meter: 145
 
218 posts
Join Date:Joined: Aug 2009
Quote:
Originally Posted by bhaumik555

Awh my god lyapota you are the real champ i mean real developer 1st for mod 2nd for ROM and now for even kernel also. I salute your dedication for one x. You have learned a lot. Gr8 work much appreciated

Sent from my HTC One X using Tapatalk

+ 1

Many Thanks Maestro... :thumbup:

Sent from my HTC One X using Tapatalk 2
27th December 2013, 04:13 PM   |  #10  
a.broken.star's Avatar
Senior Member
Flag India
Thanks Meter: 496
 
819 posts
Join Date:Joined: Mar 2013
More
thats what everyone wanted.. and thats what everybody got... thanx a lot lyapota.... thanx for giving sense ROMs a new kernel...

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes