FORUMS
Remove All Ads from XDA

[KERNEL] Semaphore N4 3.4.2

6,095 posts
Thanks Meter: 31,725
 
By stratosk, Recognized Developer on 13th April 2013, 10:56 AM
Post Reply Email Thread



This is a kernel based on stock one, tested on stock KK 4.4.3, JB 4.2.2, CM10.1, JB 4.3, Lollipop 5.0


Versions >= 3.0.0b are for Lollipop 5.1.x
Versions >= 2.2.0 are for KK 4.4.3
Versions >= 1.8.5 are for KK 4.4.1 / 4.4.2 only
Versions >= 1.8.0 are for KK 4.4 only
Versions >= 1.5.0 are for JB 4.3 only


More features will be added soon. Please don't ask for ETA.


Features
- Linux kernel 3.4.112
- built with Linaro gcc 4.8.2 201306
- enabled O2 optimizations
- ondemand (Changed calculation of frequency, tweaked)
- conservative
- mpdecision dropped
- dyn_hotplug driver
- Noop scheduler (default)
- SIO scheduler
- Touch wake
- Double Tap to Wake
- Gamma control
- LED triggers: touchwake, thermal
- Undervolting
- removed many debug options

For more information check the semaphore kernel website: www.semaphore.gr

Please use Semaphore Manager application to control every kernel's feature.

Thanks to
- Linux developers
- faux123 for ideas about gamma tables
- Ezekeel for touchwake
- my wife who always supports me
- a German friend who helped to buy N4

All people who support this kernel by testing, reporting issues, donating or simply using it.

Thanks italia0101 for his review.

Change log

3.4.2 (19/05/2016)
- Linux kernel 3.4.112

3.4.1 (24/03/2016)
- Linux kernel 3.4.111

3.4.0 (02/11/2015)
- Linux kernel 3.4.110

3.3.0 (23/09/2015)
- Linux kernel 3.4.109

3.2.6 (16/08/2015)
- Merge Android 5.1.1_r0.14 changes

3.2.5 (21/06/2015)
- Linux kernel 3.4.108

3.2.0 (21/05/2015)
- Merge Android 5.1.1 changes

3.1.5 (20/04/2015)
- Linux kernel 3.4.107
- Double tap to wake: add option to temporarily disable after power key pressed. Auto enabled again after device resumed. Enable this feature using the command:
echo 1 > /sys/devices/virtual/input/lge_touch/dt_wake_pwr_disable

3.1.0 (15/04/2015)
- Merge Android-5.1.0_r0.9 changes

3.0.5 (22/03/2015)
- cpufreq: new per cpu tunable util_threshold (default 25)
- Dynamic hotplug: Change algorithm. If CPUs have different util_threshold, the CPU with the greater one will be chosen
- ondemand: new tunable down_threshold. If load below this threshold lowest frequency will be user.

3.0.2 (18/02/2015)
- Linux kernel 3.4.106

3.0.1 (11/12/2014)
- Merge latest changes from Android source (5.0.1)

3.0.0
- Linux kernel 3.4.105
- Fix initramfs issues (mpdfake, initscripts) due to SELinux. Semaphore init script uses Chainfire's supolicy tool (included in latests SuperSU) to patch sepolicy

3.0.0b (18/11/2014)
- Lollipop release
- Merged latest lollipop branch
- Linux 3.4.104

2.4.0 (19/08/2014)
- Linux kernel 3.4.103
- ondemand: a small fix in check load condition (thanks to moddingg33k)
- tick-sched: Remove unnecessary statistics calculation required by mpdecision (thanks to moddingg33k)
- tick-sched: A couple of fixes from mainline

2.3.3 (19/07/2014)
- Linux kernel 3.4.99

2.3.0 (27/06/2014)
- Linux kernel 3.4.95
- ondemand: Change the calculation of next frequency to utilize lower frequencies more (the governor will be more sensitive to lower loads)
- ondemand: Change default touch load to 65 to keep the touch frequency to 1134MHz (because of the change in calculation)
Please note that you have to change the touch load to 65 in Semaphore Manager until the app update.

2.2.5 (15/06/2014)
- Linux kernel 3.4.93
- ondemand: Be friendly towards latency-sensitive bursty workloads (backport 2 patches that intended for 3.16)

About Double Tap to Wake.
Implemented from scratch and hints from show-p1984 and LG G pad kernels (thanks).

The basic idea is known: touchscreen remains _always_ powered to handle input events
and wake up the device with a double tap.
User have to double tap on the _center_ of the screen (to limit accidentally wake ups).
Double tap is disabled by default. To enable it run the command bellow as su:

echo 1 > /sys/devices/virtual/input/lge_touch/dt_wake_enabled

If you run the above command during screen off, the command will remain pending until
the next power on. Then it will be actually executed.

Touchwake functionality is still implemented and it should be disabled if double tap to wake
is enabled.


1.8.8 (22/12/2013)
- Linux kernel 3.4.75
- dyn_hotplug: Activate the driver 1min after boot (because during init scripts execution all CPUs should be online to get initial settings. Fixes issue where a CPU governor could be set with default performance governor. Thanks to ihancioglu for reporting and reproducing the issue).
- cpufreq: set initial utilization to zero on device CPU addition

Full changelog: http://www.semaphore.gr/changelog/n4-version


Sources
Semaphore kernel sources


Please use it at your own risk!


Zip files in download section are for flashing from CWM recovery.

'j' versions are for JSS15J ROMs only
The normal files are for JWR66V &JWR66Y ROMs only

Alternative download from http://www.semaphore.gr/downloads/nexus-4

XDA:DevDB Information
Semaphore, Kernel for the Google Nexus 4

Contributors
stratosk
Source Code: https://github.com/stratosk/kernel_msm

Kernel Special Features:

Version Information
Status: Stable
Current Stable Version: 3.4.2
Stable Release Date: 2016-05-19

Created 2013-07-30
Last Updated 2016-05-19
Attached Files
File Type: zip Semaphore_N4_1.4.0.zip - [Click for QR Code] (6.41 MB, 808 views)
File Type: zip Semaphore_N4_1.4.1.zip - [Click for QR Code] (6.41 MB, 849 views)
File Type: zip Semaphore_N4_1.5.0.zip - [Click for QR Code] (6.40 MB, 639 views)
File Type: zip Semaphore_N4_1.5.0j.zip - [Click for QR Code] (6.41 MB, 265 views)
File Type: zip Semaphore_N4_1.5.1.zip - [Click for QR Code] (6.78 MB, 2165 views)
File Type: zip Semaphore_N4_1.5.1j.zip - [Click for QR Code] (6.79 MB, 4767 views)
The Following 641 Users Say Thank You to stratosk For This Useful Post: [ View ]
 
 
13th April 2013, 10:56 AM |#2  
stratosk's Avatar
OP Recognized Developer
Flag Thessaloniki
Thanks Meter: 31,725
 
Donate to Me
More
About undervolting

As you may know, APQ8064 comes to 4 versions (PVS bin): Slow, Nominal, Fast, Faster.
Every bin has it's own voltage table. Nominal bin chips use lower voltages than Slow bin,
Fast lower than Nominal and finally Faster even lower voltages.

Stock kernel uses a paramater boost_uV. By default, is added in voltages but it can be disabled.
The value of boost_uV is 0 for Slow bin chips and 25000 uV = 25 mV for Nominal, Fast and Faster.

The boost_uV may be disabled (= undervolting by 25000 uV in Nominal, Fast and Faster) using this command:

Code:
echo n > /sys/module/acpuclock_krait/parameters/boost

I implemented 3 more paramater that handle undervolting:
- lower_uV: undervolting value for lower frequencies
- higher_uV: undervolting value for higher frequencies
- higher_khz_thres: above this frequency (default 1350000KHz) higher_uV will be used. Else lower_uV will be used.

Undervolting value is subtracted from stock voltage. The final voltage for each frequency is calulated:
Vdd(final) = Vdd(core) + boost_uV - uV

So, to undervolt frequencies 384000-1242000 by 25mV and the other frequencies by 12.5mV use these command:

Code:
echo 25000 > /sys/module/acpuclock_krait/parameters/lower_uV
echo 12500 > /sys/module/acpuclock_krait/parameters/higher_uV
The higher_khz_thres maybe changed using this command (for example to use higher_uV from 981000KHz):

Code:
echo 918000 > /sys/module/acpuclock_krait/parameters/higher_khz_thres
Also, I added a debugfs file (acpuclk/acpu_table) to show the acpu table frequencies and voltages.
For example to get the information about the current status use this command:

Code:
cat /sys/kernel/debug/acpuclk/acpu_table
and the output:

Code:
CPU PVS: Fast
Boost uV: 25000
Boost uV enabled: No
Higher KHZ threshold: 1350000
Lower under uV: 37500
Higher under uV: 25000

CPU KHz  VDD(stock)  VDD(final)  Difference
 384000      875000      812500      -62500  
 486000      900000      837500      -62500  
 594000      925000      862500      -62500  
 702000      950000      887500      -62500  
 810000     1000000      937500      -62500  
 918000     1025000      962500      -62500  
1026000     1050000      987500      -62500  
1134000     1100000     1037500      -62500  
1242000     1125000     1062500      -62500  
1350000     1150000     1100000      -50000  
1458000     1162500     1112500      -50000  
1512000     1175000     1125000      -50000
Please note that undervolting may cause instabilities in your phone. Be careful!
The Following 192 Users Say Thank You to stratosk For This Useful Post: [ View ]
13th April 2013, 10:57 AM |#3  
stratosk's Avatar
OP Recognized Developer
Flag Thessaloniki
Thanks Meter: 31,725
 
Donate to Me
More
reserved for future use
The Following 128 Users Say Thank You to stratosk For This Useful Post: [ View ]
13th April 2013, 11:03 AM |#4  
Bluewall's Avatar
Senior Member
Flag Sion
Thanks Meter: 870
 
More
Hey welcome here man! I've heard a lot of good things about Semaphore

Little quick question, do you use Mpdecision or do you have your custom hot-plug?

Thanks and glad to see you!

Envoyé depuis mon Nexus 4 avec Tapatalk
The Following User Says Thank You to Bluewall For This Useful Post: [ View ] Gift Bluewall Ad-Free
13th April 2013, 11:14 AM |#5  
Senior Member
Thanks Meter: 14
 
More
Great to see you here stratosk! I'll try your kernel asap

Sent from my Nexus 4 using xda app-developers app
13th April 2013, 11:16 AM |#6  
nikzDHD's Avatar
Senior Member
Flag London
Thanks Meter: 1,227
 
More
Use Semaphore on the i9000 good to see you here to.

Sent from my Nexus 4 using Tapatalk 2
13th April 2013, 11:18 AM |#7  
stratosk's Avatar
OP Recognized Developer
Flag Thessaloniki
Thanks Meter: 31,725
 
Donate to Me
More
Quote:
Originally Posted by Bluewall

Hey welcome here man! I've heard a lot of good things about Semaphore

Little quick question, do you use Mpdecision or do you have your custom hot-plug?

Thanks and glad to see you!

Envoyé depuis mon Nexus 4 avec Tapatalk

Thanks!
At the moment stock options. Just rebased to Linux 3.4.40 and enabled O2
The Following 17 Users Say Thank You to stratosk For This Useful Post: [ View ]
13th April 2013, 11:25 AM |#8  
superleeds27's Avatar
Senior Member
Flag Hull
Thanks Meter: 688
 
More
Always good to see new options been thrown in the forums!
13th April 2013, 11:32 AM |#9  
Senior Member
Thanks Meter: 134
 
More
Great to see you in this section! My old SGS is still running your kernel. Hopefully this kernel will become as succesfull as your old one .
13th April 2013, 11:37 AM |#10  
Higadeb's Avatar
Senior Member
Thanks Meter: 143
 
Donate to Me
More
Woo, Stratosk! Nice to see you here I used Semaphore on my old SGS1 for what must have been 12-18months straight (well still do technically when I use it for music).
I'm straight on this when my finals are over.
13th April 2013, 11:39 AM |#11  
sMtt's Avatar
Senior Member
Ankara
Thanks Meter: 66
 
More
Nice to see a new kernel, I will give it a try.
Post Reply Subscribe to Thread

Tags
kernel, nexus 4, semaphore

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

Advanced Search
Display Modes