Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,786,868 Members 42,698 Now Online
XDA Developers Android and Mobile Development Forum

[KERNEL] Bricked-Kernel Hammerhead | Sweep2wake | KnockKnock/Dt2w

Tip us?
 
show-p1984
Old
(Last edited by show-p1984; 27th March 2014 at 12:26 AM.)
#1  
show-p1984's Avatar
Recognized Developer - OP
Thanks Meter 11,432
Posts: 3,330
Join Date: Jul 2011

 
DONATE TO ME
Default [KERNEL] Bricked-Kernel Hammerhead | Sweep2wake | KnockKnock/Dt2w




Welcome to the most customizable N5 kernel on xda
Bricked-Kernel Nexus 5 (hammerhead)
Features:

* Based upon Google's msm 3.4 source
* Various fixes, improvements and optimizatios (look @ github)
* Compiled with gcc4.7.2 toolchain (linaro 09.12)
* -O3+ optimized
* Snapdragon & CortexA15 optimizations
* replaced qcom's hotplug binary with msm_mpdecision (IN-KERNEL, better battery life + performance)
* Extensive sysfs interface for mpdecision with all the tuneables you want (/sys/kernel/msm_mpdecision/)
* replaced qcom's thermal binary with my IN-KERNEL solution. (/sys/kernel/msm_thermal/)
* export krait version to: /sys/kernel/debug/krait_variant
* Allow OC up to 2,5Ghz
* Allow UC to 96Mhz
* Undervolting (faux123)
* F2FS Support
* Multirom Support
* KCAL (savoca) & Gamma Control (faux123)
* Sound Control (faux123)

* Default clocks: 300 Mhz min & 2265,6 Mhz max

Zip features:
*** ON-THE-FLY-RAMDISK EDITS!
*** THIS KERNEL USES YOUR RAMDISK, it will just modify it on the fly while flashing. These changes are not creating any incompatibilities with roms/other kernels.
* removes min freq overrides from the ramdisk
* removes governor overrides from the ramdisk
* adds init.d support to your ramdisk (if not already supported)
* modifies stock ondemand settings
* add module insertion

Check the compare links for the rest
Where is tha Changelog???

There will be no more changelogs.
Instead the download pages were outfitted with compare links to github for each download.
What is sweep2wake?


Disabled as default, activate through an app like KControl or over sysfs: echo 1 > /sys/android_touch/sweep2wake
What is doubletap2wake / knock knock?


Disabled as default, activate through an app like KControl or over sysfs: echo 1 > /sys/android_touch/doubletap2wake
How to install?

Flash through recovery. #done.
How to uninstall?

Flash this:
http://bricked.de/downloads/kernel/h...hammerhead.zip

You are done. Bye.
Where to complain about errors/bugs?

Please use the Issuetracker for bugs/errors/feature wishes!
Issuetracker @ https://github.com/showp1984/bricked-hammerhead/issues


showp1984@gmail.com
IRC Chat: Freenode IRC #bricked
Download:

No Guarantees! If it kills your grandmother or your device, I am NOT responsible! If you understand this:
(If you download, please hit Thanks below my post! Thank you!)

*stables* [STABLE] Click me
*betas* [Possibly unstable, for testing only.] Click me

Donation Hall-of-Fame:

> Hall of fame <

Thank you very much!

Stock 4.4 Nexus5 boot.img - flash this if you come from another kernel coming with it's own ramdisk (eg: zip contains a *.img file) ONLY FLASH ON 4.4
Source:


in Euro.

Creator of Sweep2wake, cmdline_khz/gov/scheduler/maxscroff, badass, 3-phase-kernel-thermal-control, kernel mpdecision (msm/tegra), etc...
"Any sufficiently advanced technology is indistinguishable from magic." [Arthur C. Clarke's Third Law]

<<<< Before you ask questions, read and understand this! >>>>
Translations:
Chinese, Dutch, French, German, Japanese, Polish, Romanian, Russian, Spanish, Turkish.


KControl thread on xda:
The Following 281 Users Say Thank You to show-p1984 For This Useful Post: [ Click to Expand ]
 
show-p1984
Old
(Last edited by show-p1984; 21st November 2013 at 08:39 PM.)
#2  
show-p1984's Avatar
Recognized Developer - OP
Thanks Meter 11,432
Posts: 3,330
Join Date: Jul 2011

 
DONATE TO ME
What is msm_thermal?

Kernel based 3-phase thermal control!
This replaces your /system/bin/thermal-engine-hh binary which is renamed by the installer to thermal-engine-hh_bck.
It will throttle your cpu speed to keep it cool and unleash it if the cpu has cooled down enough. (3 phases: low, mid and high)

Check /sys/kernel/msm_thermal/conf/ for the thermal configuration

allowed_max_high = highest threshold (phase 3)
allowed_max_low = remove the throttling if we cooled down to this (clr_thrshold)
allowed_max_freq = max frequency if throttled (limit)

[...]mid[...] = same as above, just for phase 2
[...]low[...] = Lowest threshold (phase 1)

check_interval_ms = how often shall we check? (sampling rate)

shutdown_temp = if we reach this shut down the device!

If you want to see msm_thermal doing it's job:
Code:
adb shell
cat /proc/kmsg | grep 'thermal'
What is msm_mpdecision?

100% kernel based multi core decision! (should cpu1/2/3 be online or not?)
This replaces your /system/bin/mpdecision binary which is renamed by the installer to mpdecision_bck.

Check /sys/kernel/msm_mpdecision/conf/ for the configuration.

startdelay = time until mpdecision starts doing it's magic (20000)
delay = time between checks (130)
pause = if something else plugs in the cpu, fall asleep for 10000ms (10 secs)
scroff_single_core = if the screen is off, don't plug in cpu1/2/3. Additionally: Unplug all cpus except cpu0 when screen is turned off (1)
enabled = enable(1) or disable(0) mpdecision. This does not affect scroff_single_core!
min_cpus = min cpus to be online, cannot be < 1. Default: 1
max_cpus = max cpus to be online, cannot be > 4. (if you set it to 2 and min_cpus to 1 you will basically have a dualcore) Default: 4
idle_freq = a value against that will be checked if a core +/- is requested. (499200)
If cpu0 is below that value and a core up of another cpu is requested, nothing will happen.
If any other cpu is above that value and a core down of that cpu is requested, nothing will happen. (otherwise it would now put down that cpu even though it is still working, which isn't what we want)


Hot plug thresholds (aka now it gets 'complicated')
This small formula calculates which value will be used: (number_of_cpus_online - 1) * 2
The result of this formula will be the nwns_threshold where a new cpu is hotplugged.
The result of this formula + 1 will be the nwns_threshold where a cpu is unplugged.

nwns_threshold_x = runqueue threshold, if this is reached cpuX will be hot/unplugged
twts_threshold_x = time threshold, this amount of time must have passed for the related action to be taken (hot/unplug)

Example:
One cpu is online.
(1 - 1) * 2 = 0 ergo:
nwns_threshold_0 = cpu1 will be hotplugged at this value
((1 - 1) * 2) + 1 = 1
nwns_threshold_1 = cpu0 will be unplugged at this value
Since we can't unplug cpu0 this is '0'.

Two cpus are online.
(2 - 1) * 2 = 2 ergo:
nwns_threshold_2 = cpu2 will be hotplugged at this value
((2 - 1) * 2) + 1 = 3
nwns_threshold_3 = cpu1 will be unplugged at this value

etc...

Some values are:
NwNs_Threshold: 12, 0, 25, 20, 32, 28, 0, 35
TwTs_Threshold: 140, 0, 140, 190, 140, 190, 0, 190
Where the position and function of the number equals the result of the above explained formula.

(all times are in ms)
If you want to see the mpdecision magic happening:
Code:
adb shell
cat /proc/kmsg | grep 'MPDEC'
mpdecision's input event boost, aka project butter

This will boost your min cpu speed if you touch the screen or press a button and gives you full control.
In those events the min cpu freq will be risen to a predefined value (look below) on every online cpu. This boosts overall reaction times and smoothness a lot. (works similar to the qcom mpdecision binary)
Configuration files:
root@android:/sys/kernel/msm_mpdecision/conf # ls | grep boost
boost_enabled
boost_freqs
boost_time

All of them work like the usual sysfs files, except one special case:
boost_freqs will list all frequencies from cpu 0 to cpu x. Cpu 3 and any following cpu will share one frequency.
To change those frequencies echo the cpu number + the frequency in khz.
Example: To change the boost freq of cpu3 (and 4,5,6,7,8, etc) the echo would look as follows:
Code:
echo "3 960000" > /sys/kernel/msm_mpdecision/conf/boost_freqs
for cpu0:
Code:
echo "0 960000" > /sys/kernel/msm_mpdecision/conf/boost_freqs
Defaults:
Code:
cat /sys/kernel/msm_mpdecision/conf/boost_freqs
960000
960000
729600
576000
Why do I have no WLAN?

Due to this kernels very high optimization settings it is too big for our boot.img with WLAN included into the kernel, so it is built as a module. That means it needs to be inserted into the kernel upon boot up, which needs to be automated for maximum comfort.

The zip adds module insertion to your ramdisk, if that fails for some reason the wlan module cannot be inserted.

if
Code:
adb shell lsmod
doesn't show this:
Code:
tun 14701 0 - Live 0x00000000
cifs 275399 0 - Live 0x00000000
bcmdhd 2964650 0 - Live 0x00000000 (C)
Then something went horribly wrong.
Chances are that I broke it and this should never happen.
One post in the issue tracker will probably fix it with the next release

You can restore wlan for your current bootup by executing:
Code:
adb shell
su
insmod /system/lib/modules/bcmdhd.ko
Is there an app available to customize this pure bodacious and awesome kernel?

Yes there is: KControl. It's in the Google Playstore.


in Euro.

Creator of Sweep2wake, cmdline_khz/gov/scheduler/maxscroff, badass, 3-phase-kernel-thermal-control, kernel mpdecision (msm/tegra), etc...
"Any sufficiently advanced technology is indistinguishable from magic." [Arthur C. Clarke's Third Law]

<<<< Before you ask questions, read and understand this! >>>>
Translations:
Chinese, Dutch, French, German, Japanese, Polish, Romanian, Russian, Spanish, Turkish.


KControl thread on xda:
The Following 59 Users Say Thank You to show-p1984 For This Useful Post: [ Click to Expand ]
 
show-p1984
Old
(Last edited by show-p1984; 13th November 2013 at 02:07 AM.)
#3  
show-p1984's Avatar
Recognized Developer - OP
Thanks Meter 11,432
Posts: 3,330
Join Date: Jul 2011

 
DONATE TO ME
A few benchmark results:

Vellamo Metal:
http://vellamo2.quicinc.com/api/v2/a...E-6BCA76DF491D
(usually ranges from 11xx-12xx. Depending on system background load, thermal status, air pressure, weather, world hunger, etc...)

Antutu:
https://plus.google.com/u/0/10826296...ts/VJbxpMoFJPN
(usually ranges from 28.xxx - 30.xxx. Depending on system background load, thermal status, air pressure, weather, world hunger, etc...)

3DMark Icestorm unlimited: (the others are maxed out)
https://plus.google.com/u/0/10826296...ts/N24t9ssoBcL
(17xxx)
in Euro.

Creator of Sweep2wake, cmdline_khz/gov/scheduler/maxscroff, badass, 3-phase-kernel-thermal-control, kernel mpdecision (msm/tegra), etc...
"Any sufficiently advanced technology is indistinguishable from magic." [Arthur C. Clarke's Third Law]

<<<< Before you ask questions, read and understand this! >>>>
Translations:
Chinese, Dutch, French, German, Japanese, Polish, Romanian, Russian, Spanish, Turkish.


KControl thread on xda:
The Following 24 Users Say Thank You to show-p1984 For This Useful Post: [ Click to Expand ]
 
P.Mobile
Old
#4  
P.Mobile's Avatar
Senior Member
Thanks Meter 935
Posts: 4,336
Join Date: Nov 2011
Location: RhOdE IsLAnD... 401
FIRST! o yes!!! mwhahahah!! and so it begins
The Following User Says Thank You to P.Mobile For This Useful Post: [ Click to Expand ]
 
Ngo93
Old
#5  
Ngo93's Avatar
Senior Member
Thanks Meter 970
Posts: 2,420
Join Date: Jun 2010
Finally a Bricked thread! No more F5 spamming the kernel website
The Following User Says Thank You to Ngo93 For This Useful Post: [ Click to Expand ]
 
Savant
Old
#6  
Savant's Avatar
Senior Member
Thanks Meter 1,088
Posts: 3,210
Join Date: Jul 2011
Location: Manchester
Good stuff, you've finally joined the party.

Sent from my Nexus 5 using Tapatalk
The Following User Says Thank You to Savant For This Useful Post: [ Click to Expand ]
 
faux123
Old
#7  
faux123's Avatar
Senior Member
Thanks Meter 34,086
Posts: 8,497
Join Date: Dec 2010
Location: West Los Angeles

 
DONATE TO ME
Woot! first page!
How to report Kernel Bugs!
Newest GeekTalk
Fight against Trolls, up vote my threads back to normal (1 star was due to trolling) Thanks!
FauxClock FAQ
The Following 7 Users Say Thank You to faux123 For This Useful Post: [ Click to Expand ]
 
Lancez
Old
#8  
Lancez's Avatar
Senior Member
Thanks Meter 398
Posts: 1,435
Join Date: Aug 2008
Location: Los Angeles
+1

10 char
My Devices:
Nexus 5 32G White (Stock Rooted + ElementalX Kernel + Gravity Box KK)
Nexus 7 2013 32G (Stock Rooted + ElementalX Kernel + Gravity Box KK)
Galaxy Nexus (AOKP + Fancy Kernel)
Samsung s8600 bada (Stock Wave 2.0, Damn you Samsung)
Samsung i9100 (NeatROM + PhilZ Kernel)
Sony Ericsson X10a (TripNMiUI "Iris" 1.7.3)
Samsung Captivate (Apex 9.2)
Samsung i8000 (my own custom HTC Sense 2.5_23699)
Samsung i900 (my own custom M2D 2.0_21916)
The Following User Says Thank You to Lancez For This Useful Post: [ Click to Expand ]
 
show-p1984
Old
#9  
show-p1984's Avatar
Recognized Developer - OP
Thanks Meter 11,432
Posts: 3,330
Join Date: Jul 2011

 
DONATE TO ME
Quote:
Originally Posted by Ngo93 View Post
Finally a Bricked thread! No more F5 spamming the kernel website
If you are familiar with rss, all kernel download pages have a little rss symbol, if you click it you get here:
http://bricked.de/kernelrss.php?acti...able&type=aosp

Just something to consider instead of spamming F5

Quote:
Originally Posted by unforgivenmercy View Post
Good stuff, you've finally joined the party.
If you take a look at the dates on my homepage you might notice that the party ended about 2 days ago. The after party on the other hand starts now!

Quote:
Originally Posted by faux123 View Post
Woot! first page!
Indeed! Well the thread isn't that old yet
in Euro.

Creator of Sweep2wake, cmdline_khz/gov/scheduler/maxscroff, badass, 3-phase-kernel-thermal-control, kernel mpdecision (msm/tegra), etc...
"Any sufficiently advanced technology is indistinguishable from magic." [Arthur C. Clarke's Third Law]

<<<< Before you ask questions, read and understand this! >>>>
Translations:
Chinese, Dutch, French, German, Japanese, Polish, Romanian, Russian, Spanish, Turkish.


KControl thread on xda:
The Following 5 Users Say Thank You to show-p1984 For This Useful Post: [ Click to Expand ]
 
n3ocort3x
Old
#10  
n3ocort3x's Avatar
Senior Member
Thanks Meter 10,862
Posts: 5,857
Join Date: May 2012
Location: Vienna

 
DONATE TO ME
OBI ONE is here aweseome !!! Always a pleasure to hang around in ur threads
================================================== ======================
========== ICE COLD JELLY COMMUNITY ON G+ ->>LINK ============
================================================== ======================
================ FOLLOW ME ON TWITTER ->> LINK ==================

The Following 3 Users Say Thank You to n3ocort3x For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes