yashsingh1/xdaforums huggingface dataset:
[Nexus 4 Original Android Development] socialdistortion:
Something must be messed up with PA. I can't get usb storage access from PC (USB charging works though) :/
[Nexus 4 Original Android Development] hughfollett:
I got the message "device can't be recognized" because I wasn't using the original cable :/

Inviato dal mio Nexus 4 utilizzando Tapatalk
[Nexus 4 Original Android Development] mrg666:
New update!

- SELinux updates to improve efficiency

- Linux 3.4.83

- many other small updates

Enjoy!
[Nexus 4 Original Android Development] Fenvarien:
Great! Thanks for the new version and your hard work :good: :) I really like your kernel for the perfect combination of efficiency, stability and performance - especially with the oc version.

disce aut discede
[Nexus 4 Original Android Development] guimendes:
Hey guys, do this kernel support multirom?
[Nexus 4 Original Android Development] haget83:
Is there any way to set display tone more contrasty?

Inviato dal mio Nexus 4 utilizzando Tapatalk
[Nexus 4 Original Android Development] apatal:
Not on this kernel unfortunately...
[Nexus 4 Original Android Development] mrg666:
That is a very harmless hack, although I won't use, I can live with it. Whose gamma control interface is the most popular? Let me know and I will add it since tvall is not maintaining his fork anymore. I had added the CM interface before but it wasn't the preferred one as I remember.
[Nexus 4 Original Android Development] jimyiak:
This is every person's choise so it wont be easy..i phone5 profile i think most popular..

neXus⁴ running kitkat 4.4.2 on ART
[Nexus 4 Original Android Development] Swords.Grizzlebee:
I would say faux's gamma control has the most editable parameters and the best available pre-set profiles. IMO.
[Nexus 4 Original Android Development] mrg666:
I meant the gamma control sysfs interface. There are several apps that control gamma but they cannot control every kernel's sysfs. Let me ask the other way. Which control app is preferred?

How about semaphore app? Does trickster app use faux interface?
[Nexus 4 Original Android Development] Swords.Grizzlebee:
Yes, the Trickster app can use the faux interface. The easiest way to convert the faux profiles to the Semaphore app interface is to set it using Trickster, then install the Semaphore app and it will read and save the colors you already set in Trickster.
[Nexus 4 Original Android Development] mrg666:
Seems like we are converging. Is it okay if I use the gamma interface from semaphore?
[Nexus 4 Original Android Development] TheNerd:]:
I think most people prefer Franco's gamma
[Nexus 4 Original Android Development] Swords.Grizzlebee:
I think so... Semaphore looks the same as faux in the trickster gamma settings.
[Nexus 4 Original Android Development] mrg666:
Here we go.

The test kernels with semaphore's gamma interface. Please let me know how it works. I haven't tested.

standard kernel: http://www.mediafire.com/download/ldg8rrj13gem8ml/MiRaGe_mako_test_kernel_KOT_031314.zip

oc kernel: http://www.mediafire.com/download/v3avr11a6tay2cu/MiRaGe_mako_oc_test_kernel_KOT_031314.zip

You can find the commits in the repo. Thanks to stratosk!
[Nexus 4 Original Android Development] haget83:
Standard kernel works perfect for me, using trikster to change display gamma preset :)

Inviato dal mio Nexus 4 utilizzando Tapatalk
[Nexus 4 Original Android Development] Swords.Grizzlebee:
It's working! Thank you.
[Nexus 4 Original Android Development] mrg666:
Thanks for the confirmations. I will keep the gamma control from now on.
[Nexus 4 Original Android Development] :
Hey [MENTION=4203114]mrg666[/MENTION] - thanks for the mention in the OP! :)
[Nexus 4 Original Android Development] Fenvarien:
It seems I come too late to the party, but Semaphore's interface would have been my choice anyway ;) Thanks for this nice and useful addition!

disce aut discede
[Nexus 4 Original Android Development] mrg666:
Well, thanks for the company :)

Welcome! We still have some fresh kernel back there. Help yourself.
[Nexus 4 Original Android Development] mrg666:
I have updated the stable builds in the OP with the following changes

- screen gamma interface added (thanks to stratosk)

- smoother vdd curve in the standard kernel for better power efficiency

- increased bus speed at lower cpu frequencies, a big thank you to [MENTION=4128576]bedalus[/MENTION] for the original idea.

- gradual scaling of L2 frequency with the cpu frequency

I think the L2 and bus speed optimizations noticeably improved the responsiveness of the kernel but there is no change in the battery use. While watching a movie, for example, the cpu spends more time in the lower frequencies now. I had tried and reverted this before and it took some time to improve the implementation until this build. Please check the voltage, frequency values in the repo and let me know your feedback.

Cheers!
[Nexus 4 Original Android Development] TheNerd:]:
Downloaded :)
[Nexus 4 Original Android Development] mrg666:
A new build is available in the OP.

- improved vdd settings for the OC kernel. There were artifacts on the pictures taken with cpu at 1728 MHz. Now everything works at 1728 MHz for me. If you had instability problems with OC kernel, although oc stability is still not guaranteed, give it another try.

- cleaned up unnecessary code in kgsl driver and applied many fixes from CAF

- qseecom, audio, video, camera updates/fixes

Enjoy!
[Nexus 4 Original Android Development] pirigu:
thank you very much for your work! your kernel and just great!:good::D
[Nexus 4 Original Android Development] michelemascia7:
Great, thanks for update :)

Inviato dal mio Nexus 4 utilizzando Tapatalk

---------- Post added at 10:12 PM ---------- Previous post was at 09:51 PM ----------

Hey [MENTION=4203114]mrg666[/MENTION] I have reboot when i change the frequency to 1728000, this is my last kmsg : https://www.dropbox.com/s/i0tzmnbghg430ut/last_kmsg.log

Inviato dal mio Nexus 4 utilizzando Tapatalk
[Nexus 4 Original Android Development] mrg666:
Can you please if you were you able to use at 1728 MHz without reboot before?
[Nexus 4 Original Android Development] michelemascia7:
when i set that value with trickstermod, the phone reboot immediately :/
[Nexus 4 Original Android Development] mrg666:
This means your cpu cannot to run at 1728, not even close. I wrote in today's release post that it was still not guaranteed. Sorry for the disappointment. If we raise vdd, your cpu *might* run stable but the heat will be unmanageable. Is the default 1566 MHz completely stable?
[Nexus 4 Original Android Development] michelemascia7:
thanks for informations :) yes with stock frequency and at 1674 Mhz is stable :)

EDIT: reboot also with 1674 Mhz :/ now i try more time with stock frequence :)
[Nexus 4 Original Android Development] mrg666:
that is such a bummer :crying:

I was a big-time overclocker in the old days when I was building PCs. I hated those CPUs that didn't overclock. I remember that Opteron 165 :mad: ... in the end, I destroyed it while trying to remove the heat spreader.

But there is not much you can do. The good thing is that the stock frequency is completely smooth for N4. There is no noticeable gain at 1728 other than a geek trophy. I hope you can run at the stock frequency using the OC kernel since the phone will be cooler due to undervolt.
[Nexus 4 Original Android Development] surtrafl:
Neat kernel, simple, not bloated. Runs perfect, I tested a bunch of other kernels, like hellscore, bricked, semaphore and Franco. After a month my phone starts to become slower and choppy, with this one I don't have this issue. But, I'm just looking for 1 thing, if someone could apply faux sound control, I'm using Viper, but it doesn't come close to the gain you get from the faux one. I'm not asking to implement it to the mainline, but if someone could make one. Thanks in advance.
[Nexus 4 Original Android Development] mrg666:
Thanks for the feedback. But I don't think other kernels would slow down after a month. What you observe is completely related to the OS and I think it would happen with MiRaGe too. Just delete the unused apps and do a cache/dalvik-cache wipe when you feel OS slower.

__________________

[MENTION=3675426]ihancioglu[/MENTION] had an interesting post about enabling the standalone_power_collapse mode. Although I had enabled the retention mode, I missed this completely until now. standalone_power_collapse mode is now enabled in my testing build for idle and suspend states. I will keep it enabled in the next stable build if the testing doesn't show any problems. Thanks, ihancioglu!
[Nexus 4 Original Android Development] Jagdish84:
How can one get access to those test builds? :)
[Nexus 4 Original Android Development] mrg666:
I only have the OC kernel for testing.

http://www.mediafire.com/download/mthqy4piwr0vi2l/MiRaGe_mako_oc_test_kernel_KOT_031714.zip
[Nexus 4 Original Android Development] Jagdish84:
Even better, using the 16th oc version atm, flashing it now.
[Nexus 4 Original Android Development] Fenvarien:
Thanks, I'll test this build too ;)

disce aut discede
[Nexus 4 Original Android Development] Jagdish84:
Had a reboot when device went to sleep while listening to music, if I didn't reboot again will the last kmsg log still be relevant? I was driving while it happened so couldn't get it right away...

Btw, My handset can handle oc, at least till now...

Anyways, here it is, hope it helps...

https://www.dropbox.com/s/2fyiwuhcsk1cvt1/last_kmsg
[Nexus 4 Original Android Development] Fenvarien:
The test build is running perfectly stable here, including heavy gaming and playing music with screen off. :good:

disce aut discede
[Nexus 4 Original Android Development] Jagdish84:
Did you overclock? Because I had mine at 1.7 freq, now at 1.6 I'm experiencing 0 problems...
[Nexus 4 Original Android Development] mrg666:
I don't have any reboots but we can't ignore even a single reboot; that is not acceptable. I think we are seeing the original reason why the standalone power collapse was disabled here.

I am posting here the standard test kernel with standalone power collapse enabled. Can you please check if this causes reboot after suspend? If this doesn't cause the reboot, I think the standalone power collapse has a peculiar interaction with overclocking. I can disable standalone power collapse over suspend and keep for idle only but the benefits (if there is any noticeable) will be diminished. Your help is appreciated since I can't replicate the reboot.

http://www.mediafire.com/download/iqqmlu2fka3o1hu/MiRaGe_mako_test_kernel_KOT_031714.zip
[Nexus 4 Original Android Development] Fenvarien:
I'm at 1.6 too, that's the best performance/battery deal imho.

disce aut discede
[Nexus 4 Original Android Development] mrg666:
Please don't overclock while testing the standalone power collapse mode. That is my fault that I posted the OC kernel for testing, sorry.
[Nexus 4 Original Android Development] Jagdish84:
Is it alright if I use the OC version with stock freq? I wanna enjoy the OC versions uv

Edit: right, so I disabled c2 state(standalone power collapse) and kept c3 and c0, no reboots so far... Max freq at 1.7...
[Nexus 4 Original Android Development] mrg666:
You can use OC version at the default frequency. That is what I do.

The point of the test builds were testing the C2 state. That is the only difference in the test build. What I understand from your feedback so far is that C2 state causes instability when overclocked to 1.7 GHz. But there is no problem of having C2 enabled at the default frequency. Can you please confirm?
[Nexus 4 Original Android Development] Jagdish84:
That's my experience at least... 1.6 freqs a bit unstable as well...

Well, I spoke too soon, just had a reboot with 1.5 freq and C2 enabled...
[Nexus 4 Original Android Development] mrg666:
Thanks. No need for any further trouble. Please go back to the stable build. It seems that some of the CPUs will have trouble with c2 enabled. We can't enable it by default.
[Nexus 4 Original Android Development] Jagdish84:
No problem, it's weird because it's the first time I experience this kinda behavior, it's not the first time I've enabled C2 state, I thought retentions is the one causing troubles... I have a fast bin cpu btw...
[Nexus 4 Original Android Development] Fenvarien:
Here it's stable at the stock freq, no trouble with the C2 state. My CPU is binned as 'fast' too. Maybe some SoC revisions have problems with the enabled C2 state?

[MENTION=4203114]mrg666[/MENTION] It would be great to have the possibility to enable C2 via sysfs :)

disce aut discede
[Nexus 4 Original Android Development] mrg666:
sysfs interface for enabling C2 states will still be available.
[Nexus 4 Original Android Development] Jagdish84:
So, I flashed the 17th OC test version after I migrated from Mahdi rom to Vanilla unicorn and having 0 reboots so far (1 hr and 40 mins uptime) using stock freq... C2 state enabled obviously :)
[Nexus 4 Original Android Development] ihancioglu:
Hi [MENTION=4203114]mrg666[/MENTION],

I am trying to merge some of your commits to the kernel forked from Semaphore.

Example ;

24cf8b2 msm: pm-8x60: Fix bug where CPU doesn't enter PC When Krait regulator disables retention mode, an incorrect ordering of the switch case disables power collapse.

But there are so much code changes If compare side by side. So patch does not applies.

This is my first experiment for kernels and I am not a programmer. What is your suggestion? How I can proceed?

Thanks,
[Nexus 4 Original Android Development] mrg666:
My repo is now in a state very far from google's mr1 base due to large number of backports I have done from CAF and mainline Linux. When the patches do not apply, the first thing you can try is to do the changes in the patch manually. Sometimes even that is not possible since the base code required for the patch is significantly different. In that case, you need to find the dependencies and apply the required patches to your base to bring at the same level. You can check the file history for the previous patches applied to the particular file. The dependence search frequently spreads around other files and create a tree of dependencies. This is a lot of work of course which I like doing but I am not sure if you will like such tedious effort. Then, the only option is to pick the patches that apply normally.
[Nexus 4 Original Android Development] ihancioglu:
Thanks Mirage,

I am able merge commits without error but I got an error while compiling the kernel,

arch/arm/mach-msm/pm-8x60.c: In function ‘msm_pm_wait_cpu_shutdown’:

arch/arm/mach-msm/pm-8x60.c:913:2: error: invalid use of undefined type ‘struct msm_pm_sleep_status_data’

arch/arm/mach-msm/pm-8x60.c:913:21: error: dereferencing pointer to incomplete type

Any idea about that?

EDIT: I found another commit which related to this and after merge it resolves this problem. I think I am getting familiar with git operations.. Thanks.
[Nexus 4 Original Android Development] mrg666:
Great! You are already finding the dependencies. When you see such kind of an undefined variable/function/type, you can quickly use grep command to find the file with the required definition in the other repo and then find the required patches from file's history to add the missing definition in your repo. Have fun.
[Nexus 4 Original Android Development] mrg666:
I have backported the devfreq driver from CAF and swtiched kgsl 3D governor to simple_ondemand. Can you please help me with testing these changes. I especially want to hear about the gaming experience. I am hoping that this new governor will improve the smoothness of frame rates. Of course the more important part of testing is absolute stability. Because of this I am only posting the standard kernel here. Thank you for the help in advance.

http://www.mediafire.com/download/5jd7xoxtd6p6fcm/MiRaGe_mako_test_kernel_KOT_031914.zip
[Nexus 4 Original Android Development] pirigu:
hello mrg666 also you apply these changes to the kernel to OC? Thank you in advance
[Nexus 4 Original Android Development] Connor Baker:
He's doing this test to see if it's even worth considering adding into the kernel. He posted the non-oc version for a reason: he wants to see if it's stable. Having oc in the test kernel would nullify the point.

Connor Baker
[Nexus 4 Original Android Development] kkruglov:
i've tried some games, punch quest and riptide gp2, first is very ok, second is ok too, but i had one fps drop after minimizing game (under fps drop i mean a lot's of lags in interface and game for 15-30 seconds).
[Nexus 4 Original Android Development] mrg666:
The lags in the interface after minimizing the third game could be due to background memory operations given that there are two other games in the memory. Can you kill the previous games before testing the next?

As Connor wrote, I will include it in the OC kernel after it is proven stable.
[Nexus 4 Original Android Development] pirigu:
thank you very much for your reply and especially for the great job!
[Nexus 4 Original Android Development] Flak:
I'm getting some weird audio stutter in a couple games on the test kernel w/slim weekly.
[Nexus 4 Original Android Development] kkruglov:
hmm, with 1 game in memory there are no problems at all.

tried 3 games, punch quest, riptide gp2 and swords and soldiers hd.

rom: latest PA (i know that kernel is made for stock, sorry)
[Nexus 4 Original Android Development] mrg666:
I know that audio sometimes stutters in some of the games. But this has been happening since the original kernel. There is no change in this test kernel that can cause additional trouble with sound. I am not sure if this stuttering is because of just bad code in some games or the audio driver in the kernel. I will try to upgrade the audio driver if I can find some time next week.

BTW, the simple_ondemand governor is working completely stable for me. There seems to be some improvement in the smoothness of frame rates.
[Nexus 4 Original Android Development] mrg666:
New build is in the OP with the following changes

- enabled standalone power collapse for all cores (thanks to [MENTION=3675426]ihancioglu[/MENTION]), there were no problems reported with the standard kernel

- backported latest devfreq driver from CAF

- converted kgsl 3D driver to devfreq simple_ondemand governor for improved efficiency

- increased sound gain (thanks to [MENTION=4128576]bedalus[/MENTION]), sound is louder now but you can turn down the sound volume

- replaced unnecessary /dev/random calls in fs/ext4 with prandom to avoid wasting entropy

- several other changes

Enjoy!
[Nexus 4 Original Android Development] RolF2:
nice work mrg666 !

does this kernel have init.d support ?
[Nexus 4 Original Android Development] mrg666:
init.d is not a kernel feature. You can add it by yourself. See below

http://xdaforums.com/showthread.php?t=1933849

http://xdaforums.com/showthread.php?t=2287540
[Nexus 4 Original Android Development] RolF2:
thanks :) you are telling that this is not kernel future, but giving me link to thread with instructions how to add init.d support to kernel ?

:confused:

Edit : nevermind - term-init is ok for now

thanks one more time :)

BR

R.
[Nexus 4 Original Android Development] ihancioglu:
Hi [MENTION=4203114]mrg666[/MENTION],

How do you create your bootimages?

I am trying this way but does not boot.

- extracted ramdisk from stock kernel

find . | cpio -o -H newc | gzip > ../output/boot.img-ramdisk.cpio.gz

cp arch/arm/boot/zImage ../output/

cd ../output/

mkbootimg --kernel zImage --ramdisk boot.img-ramdisk.cpio.gz -o boot.img

Could you please advice the right way to do boot images?

Thanks,
[Nexus 4 Original Android Development] mrg666:
Following is the command I use to create the bootimage for kitkat

~/bin/mkbootimg --kernel zImage --ramdisk ramdisk.gz --cmdline "console=ttyHSL0,115200,n8 androidboot.hardware=mako lpj=67677 user_debug=31" -o boot.img --base 0x80200000 --pagesize 2048 --ramdiskaddr 0x81800000

I am not sure if the default Ubuntu mkbootimg binary works but, in any case, the mkbootimg that I use for MiRaGe is the following

http://www.mediafire.com/download/igg4fy38dg4blwp/mkbootimg
[Nexus 4 Original Android Development] ihancioglu:
It is working great.

Thank you very much!
[Nexus 4 Original Android Development] mrg666:
You're welcome
[Nexus 4 Original Android Development] haget83:
I ve noticed some sporadic screen blink after Last update. Same thing happened to me using semaphore in previous months and It was The reason why i switched from semaphore months ago

Inviato dal mio Nexus 4 utilizzando Tapatalk
[Nexus 4 Original Android Development] mrg666:
I don't see anything unusual. Can you describe in a little more detail, how to replicate?
[Nexus 4 Original Android Development] :
Hi mrg666

after cherry-picking your commits regarding workqueue: make deferrable delayed_work initializer names consistent, during the build i get these errors:

arch/arm/kernel/auto_hotplug.c: In function ‘auto_hotplug_init’:

arch/arm/kernel/auto_hotplug.c:645:2: error: implicit declaration of function ‘__setup_timer’ [-Werror=implicit-function-declaration]

INIT_DELAYED_WORK(&hotplug_decision_work, hotplug_decision_work_fn);

^

arch/arm/kernel/auto_hotplug.c:645:459: error: ‘TIMER_IRQSAFE’ undeclared (first use in this function)

INIT_DELAYED_WORK(&hotplug_decision_work, hotplug_decision_work_fn);

^

arch/arm/kernel/auto_hotplug.c:645:459: note: each undeclared identifier is reported only once for each function it appears in

arch/arm/kernel/auto_hotplug.c:646:447: error: ‘TIMER_DEFERRABLE’ undeclared (first use in this function)

INIT_DEFERRABLE_WORK(&hotplug_unpause_work, hotplug_unpause_work_fn);

^

cc1: some warnings being treated as errors

make[1]: *** [arch/arm/kernel/auto_hotplug.o] Errore 1

make: *** [arch/arm/kernel] Errore 2

make: *** Attesa per i processi non terminati....

CC kernel/printk.o

CC arch/arm/mach-msm/dma.o

arch/arm/mach-msm/dma.c:191:3: error: implicit declaration of function ‘__TIMER_INITIALIZER’ [-Werror=implicit-function-declaration]

.work = __DELAYED_WORK_INITIALIZER(dmov_conf[0].work,

^

arch/arm/mach-msm/dma.c:191:295: error: ‘TIMER_IRQSAFE’ undeclared here (not in a function)

.work = __DELAYED_WORK_INITIALIZER(dmov_conf[0].work,

^

cc1: some warnings being treated as errors

make[1]: *** [arch/arm/mach-msm/dma.o] Errore 1

make: *** [arch/arm/mach-msm] Errore 2

I know where is the problem but i don t actually know how to fix it. As i would keep auto_hotplug as hotplug driver , can you help me finding a solution?

my repository is here: https://github.com/f96p/mako

Thanks for your time and your work!
[Nexus 4 Original Android Development] mrg666:
These patches are missing, apparently.

https://github.com/mrg666/android_kernel_mako/commits/master/kernel/timer.c

Edit: The dependency tree of the patches in my repo can get very complex sometimes since I have diverged too much from the Google's mr1 base. Feel free to use anything you want but I would recommend caution with what you are picking.
[Nexus 4 Original Android Development] mrg666:
Okay, then. But you should be careful with using that "sarcastic roll eyes" smiley. It means the same in every language ;)

Regarding the incompatibility, it is probably due to different API's of user space libraries of the ROM. Even the two versions of stock AOSP ROM requires two different kernels (JSS and JWR). There is no universal compatibility of kernel across different ROMs, unfortunately. As I said in the OP, I use the stock ROM and develop the kernel for it. I am not really interested in having the most popular kernel around here, just sharing what I build for myself.

Peace! :)
[Nexus 4 Original Android Development] mrg666:
I have updated the MiRaGe kernel with the following changes

- enabled Qualcomm Crypto Acceleretor and updated from CAF msm-3.4

- updated Qualcomm HW RNG driver from CAF msm-3.4

- enabled BPF JIT compiler for packet filters

- applied glibc patch to improve the performance of memcpy and memmove

- applied word-at-a-time ARM API patches

Please see the details of the changes in my repo.

My initial testing was completely stable. Please let me know your experience.

Enjoy!
[Nexus 4 Original Android Development] apatal:
Sounds promising. I'll try it out and let you know what I think. Thanks for sharing your work. :)