yashsingh1/xdaforums huggingface dataset:
[Nexus 5 Original Android Development] neobuddy89:
Brief Note about Bluetooth issues and Chaos

Chaos kernel had worst bluetooth issue in the past.

Yes, in the past, when bluetooth was connected with some misc device... there was memory corruption and dmesg was filled with special characters , mostly garbage.

As we moved forward, this corruption is now completely fixed... I guess 10.2 onwards.

Exact source of issue was not identified; it's my assumption that it came from upstream 3.4 kernel updates.

At present stage, what we face is what I call drowsy bluetooth issue.

This issue is described as follow:

If you initiate a file transfer (for example) to some other device (definitely good device), it will work as it should.

However, if you disconnect your device from other connections like data and wifi, and turn off your screen....

your device will sleep within few seconds!! This results in breakage of ongoing file transfer!!

However, if other device had initiated file transfer to your device... this may not be the case.

This issue can also be seen on Stock CM11 kernel + ROM. You can search that official topic and read out user expressions.

Please do note that ROM has major implementation of bluedroid (bluetooth tech used on hammerhead)

Also, @franciscofranco stated that this issue of drowsy bluetooth is due to new Power Mode structure on CM11 kernel.

This new PM structure uses Louis Cache flush which probably breaks bluetooth and even linaro 4.8 builds!

I cannot/won't revert this structure as it is deeply integrated update from CAF and partially from 3.14 upstream.

With Chaos, I am updating "Serial Driver" which is used by bluetooth (bluetooth is serial connection, FYI)

This will help to some extent for reliable connections but don't expect magic until and unless it is fixed by CM11 (either kernel side or ROM side)

So, concluding, until and unless CM11 fixes drowsy bluetooth issue.... all BT issues cannot be completely resolved.

New nightly with new VIDC driver updates and Serial connection driver updates will be available soon.

Currently under test.

Best Regards,

Neo.
[Nexus 5 Original Android Development] aamzalag:
Thanks for the update! Hope it solves my issues. I know you mentioned its a cm issue on a whole however as of now it only happens with chaos kernel.I tested stock and elemental kernels and those work fine

Thanks again!
[Nexus 5 Original Android Development] whytechapel_x:
Is there a way to add more color profiles?
[Nexus 5 Original Android Development] neobuddy89:
Send me few, I will add to NXT.

If you wish to load manually, use franco's app.

Here is new nightly:

Chaos-Kernel_v12.0-[05-12]-[13-17]

* Backport ZRam (Compressed RAM) and ZSMAlloc (Compressed mem allocator) from 3.15 mainline kernel.

* VIDC playback driver update (That should resolve video playback issues, if any) [Report back]

* Serial driver update (used for bluetooth connection, also please read my BT not above.) [Report back]

* Implement Yorici's fix for Color calibration.

* Minor thermal update to speed boot up.

* Update 'random' entropy driver from 3.15 mainline kernel.

* Minor LMK improvement.

* Add missing DT updates from CAF.

* Charger update to allow charging from legacy chargers. (not tested)

* EXT4 filesystem optimizations cherry-picked from 3.15 mainline kernel.

Enjoy. Reviews welcome.
[Nexus 5 Original Android Development] lezzi:
yes, I think so:good:
[Nexus 5 Original Android Development] Ashish Bhalla:
no more video playback issues for me for this nightly working great so far :good:
[Nexus 5 Original Android Development] oo0:
smooth and stable as always, dt2wake issue is fixed (seems to be related to nxtweaks options i've changed, just reverted to default and fine).

if possible, please bring back battery life extender to make it perfect)
[Nexus 5 Original Android Development] neobuddy89:
There is one more bug which got squashed.

MultiROM - Chaos on secondary ROM wouldn't let device charge.

This bug is now gone. Atleast for me. :silly:
[Nexus 5 Original Android Development] xeraphael:
Can someone tell me if it's worth using the stable version of this kernel (v11.1) with CM nightlies?

How many changes are merged into the CM kernel with each CM nightly build? Will I be missing out on a ton of kernel merges if I stick to Chaos stable?

Thanks in advance.
[Nexus 5 Original Android Development] topgeardave:
You should stick with nightlies, if there are any issues you could always roll back to the previous working nightly. There are a whole load of new feature in v12 compared to 11.1
[Nexus 5 Original Android Development] Williamsss:
Fluther made a thread for Chaos kernel setups =]

If any of you want advice or want to share your setups, that would be a good place to start.

http://xdaforums.com/google-nexus-5/general/chaos-kernel-users-threadtips-t2749159
[Nexus 5 Original Android Development] neobuddy89:
Good initiative. Will help me to set defaults for profiles based on reviews and usage stats.:good:

Will add this link to OP.

Thanks.
[Nexus 5 Original Android Development] Williamsss:
When ever I connect to my Bluetooth audio reciver on 5/12 my whole phone locks up. I reverted to 5/10 and its okay now.
[Nexus 5 Original Android Development] xxjrkkrjxx:
Hi neobuddy89, sorry for the persistent problems, but for about 2 weeks now I have had problems with the YouTube app. I can play a video once, and then if I pause it or it stops, it won't start again and force closes. I have uninstalled the app and reinstalled but the only fix is to reboot my phone and then I can watch about one video, and it does it again. I dont know if it is kernel related, but I have a logcat attached that maybe could help diagnose the problem.
[Nexus 5 Original Android Development] Qret:
+1

I got the same problem. I use latest cm nightly and latest nightly chaos kernel
[Nexus 5 Original Android Development] willybarca:
same here,
[Nexus 5 Original Android Development] neobuddy89:
I am unable to find kernel error in this.

Have you tried to reproduce this on stock kernel + CM11?

AFAIK, Steve is aware about this kind of bug and expects to be fixed by Google in 4.4.3

http://review.cyanogenmod.org/#/c/62542/

Let me try to merge few bits from above abandoned commit and try to fix.
[Nexus 5 Original Android Development] bigdave79:
The latest nightly got my bluetooth working! No more SOD when connecting. Only minor thing I noticed is that the phone still thinks the connection is going even after the other device (car) has turned off. Doesn't bother me much, just FYI.
[Nexus 5 Original Android Development] xxjrkkrjxx:
Thanks for the info and link! If it's something you can fix, great! If not, I'll play the waiting game :D
[Nexus 5 Original Android Development] JulianXhokaxhiu:
Anyone of you is having a dirty toolbar when you open up the Gallery App? It's best noticed when you open up a Photo (this is happening after I flashed the latest nightly of the Kernel). I'm also using the latest Nightly of CM11 and did not helped on fixing that (probably because it's related to Kernel itself).

I'm not able also to make a screenshot of this because the toolbar shows glitchy only when you open a photo, but when you make a screenshot it just redraw ok.

Thanks in advice.
[Nexus 5 Original Android Development] c3v1t:
Hi, this is a bug of last two CM11 nightly released...

I hope it will be resolved quickly (something in today changelog was appered, but don't resolve the bug...)

Have a nice day!

---------- Post added at 04:24 PM ---------- Previous post was at 04:19 PM ----------

Hi bigdave79, with last nightlies I've again a bother bug, my headset Jabra don't connect normally to my N5, I have to switch off BT and only then it connect ... but with elementalX 0.38 cm this problem there isn't, as with Purity ROM...).

I'll do other tests but it seem kernel (drivers?!?) and ROM (CM11) related...

:(:rolleyes:
[Nexus 5 Original Android Development] mo976:
Just had a random reboot here's the log

https://www.dropbox.com/s/12fgqz4mlq6x2pl/chaos_last_kmsg
[Nexus 5 Original Android Development] oo0:
have you ever used supercharger? there's interesting Engine Flush-O-Matic script, refreshing resources, are those, represented in NXTweaks act similar on dumping unneeded caches etc? can they be used together?

also, which pacman built-in init.d and build.prop tweaks are worth using on your opinion?
[Nexus 5 Original Android Development] neobuddy89:
Which nightly version are you using? Seems to me 9th May one?
[Nexus 5 Original Android Development] mo976:
Correct I seemed to be getting a lot of weird ui freezes and instability with the 10th and 12th nightlys.
[Nexus 5 Original Android Development] neobuddy89:
I had posted earlier that nightly users should update to 12th one.

I am checking your logs.

Meanwhile, please try latest nightly uploaded on mediafire mirror:

Chaos-Kernel_v12.0-[05-15]-[23-42]

* Kernel internal locking mechanism backport from 3.14 Mainline kernel.

* Update to Linux 3.4.90

* MSM Hotplug update to work more reliably and with low latency

* Interactive governor update to provide smoother experience (Under testing)

* Crypto driver fixes from CAF

* Google update for IPv6

* Sync with CM11 branch

Recommended to install on latest CM nightly.

Will be available on AFH mirror after some hours.

AOKP based ROMs seems to have some compiled binary issue which makes random reboots.

Remedy for them is turn off Morpheus mode.
[Nexus 5 Original Android Development] mo976:
Thanks Neo your the man!
[Nexus 5 Original Android Development] myfluxi:
It was never unreliable. hist_size = 10 is still recommended. Also make sure you use: https://github.com/myfluxi/initram_hammerhead/commit/4a786539ab60e46ab6a18420a29675c72c0669b8

I did lots and lots of testing, I even disassembled mpdecision as good as I could. msm_hotplug is the most configurable and overall best performing, with the correct settings even battery-wise. I wish I was able to switch to mpdecision because it would save me precious time but closed source just sucks 'cause you can't change some important details.

Btw: don't do the faux and label mainline patches as yours that aren't. I taught you how to keep original authorship.
[Nexus 5 Original Android Development] neobuddy89:
1. I never said unreliable. :)

2. I am spending hours to back port from 3.14 and 3.15. Please don't make such false blames. Surely its good source of idea what can be backported. So including what faux have backported, I have backported many other features.

Get your info correct.

This is one example I am not blind merging my patches

https://github.com/faux123/Nexus_5/commit/2048de9e04c931ed5dc3bbd3760acbebf24359dc
[Nexus 5 Original Android Development] myfluxi:
I am not going to make this another xda drama but my facts are straight:

One example for patches labeled as yours, that aren't. You do this all the time.

Don't confuse backporting with developing. And don't make me dig out that post where you blamed CM for an error of yours while arcee did a brillantly simple patch that fixes Qualcomm's/LGE's error properly. Maybe it's also a language thing but your lack of respect in many aspects is really striking.
[Nexus 5 Original Android Development] neobuddy89:
This is not faux: https://github.com/neobuddy89/hammerhead_kernel_caf/commit/4c9e24cd37c464770b977b023277598bda07e055

This is actually backported from 3.14 last night:

https://github.com/android/kernel_common/commit/6a72a700f44b2fa1b1d6f3529e5d492a4f71de49

If you are not helping fixing errors or enlighting what could be source of issue we are facing, don't dig past posts and make false blames. I am not sure what grudge ou have against me when I have given all respect to your patches.

EDIT:

It was never backported by Faux I suppose:

https://github.com/faux123/Nexus_5/commits/kk_mr1/drivers/gpu/ion

Get your facts straight, in real.
[Nexus 5 Original Android Development] BRiANj64:
Wow people are really trying to make flamewars. But this kind of personal conversations should be done using the PM system IMHO
[Nexus 5 Original Android Development] neobuddy89:
A test build is up.

Download Link: http://www.androidfilehost.com/?fid=23487008491963880

Chaos-Kernel_v12.0-[05-16]-[12-03]

* Disable watchdog barks over IRQ.

(To test and debug random reboot due to IRQ)

* Fix MSM Hotplug behavior when boosted CPUs is set to 1 via NXTweaks.

Anyone getting random reboot while device is completely idle, can test this build with me.
[Nexus 5 Original Android Development] JulianXhokaxhiu:
Feature Request

How much is possible to have this inside your Kernel? Do we have this already somehow?

https://github.com/pelya/android-keyboard-gadget

Thanks in advice :)
[Nexus 5 Original Android Development] teh_g:
Are Bluetooth issues going to be kernel or ROM related? I am getting Bluetooth crashes where it stop and does not start again until I reboot.
[Nexus 5 Original Android Development] antypas:
[MENTION=3795148]neobuddy89[/MENTION]:

I guess that Myfluxi means that, for example, this should be like this

I don't think it is a big deal but Myfluxi is the god of kernel development so... :D
[Nexus 5 Original Android Development] BRiANj64:
It's legal cuz GPL. With GPL you can claim ownership as long as the source+license is available. So who ****ing cares on how its commited...
[Nexus 5 Original Android Development] neobuddy89:
A new nightly build is up -

Chaos-Kernel_v12.0-[05-16]-[21-27]

* Fix behavior when CPUs boosted is set to 1 in MSM Hotplug driver via NXTweaks (i.e. CPU0 handles most work)

[ This is what we want as default to help saving power and no spurious spiking of CPU1 when Min CPUs online is also set to 1]

* Use bash binary for execution of morpheus mode service

[ MAY help with AOKP based ROMs to fix up random reboots, if any. ]
[Nexus 5 Original Android Development] neobuddy89:
Yes, maybe. Dev has provided kernel patch.

Let me know if you are will to try a test build for this?
[Nexus 5 Original Android Development] BRiANj64:
I would test it. Will stock USB cable work?
[Nexus 5 Original Android Development] gravedigger76:
When you back up you're profile settings, where do they go? Something that can be copied of to external and imported back after full wipe?
[Nexus 5 Original Android Development] willybarca:
as of the latest updates the scrolling has been extremely fluid even in browser and tapatalk which always used to lag a bit , using msm hotplug and intelliactive seems to be the best option for battery and performance
[Nexus 5 Original Android Development] myfluxi:
Your changes to msm_hotplug introduce bad regressions and contain noops. Would you prefer me to leave comments here or inline on github?
[Nexus 5 Original Android Development] neobuddy89:
Inline if you can, I am testing ..couldn't find any regression.
[Nexus 5 Original Android Development] giajp:
This hatred on this thread is interesting as a fiction, though I don't understand the reason to do so here

Sent with my Google Nexus 5
[Nexus 5 Original Android Development] :
I agree. [MENTION=4152171]myfluxi[/MENTION] If you, a "recognized developer" desire to make a comment to another developer about something that bothers you, it should be first done via PM. [MENTION=3795148]neobuddy89[/MENTION] is a very nice and respectable person, I have known him for years now where he developed for a previous device. All you need to do is talk with him privately and he will resolve any issues you have.

It's quite inappropriate to come here with an accusatory mindframe, when you haven't even tried to privately contact him first.
[Nexus 5 Original Android Development] kong:
On the other hand, I respect both developers and don't mind seeing constructive discussions in the thread... Though most of the time I have no idea what they're talking about, lol :D

IMHO, [MENTION=4152171]myfluxi[/MENTION] made a comment because he cares and wanna help improve this kernel.
[Nexus 5 Original Android Development] paychex:
He basically accused him of stealing code though. Something like that, especially when---at worst--it was due to not retaining authorship on lines of code, should not be handled like that IMO. I don't know how egregious it is, but it seems to be minor syntax on github. Coming into the man's thread with a post like that isn't cool. Nothing constructive about it
[Nexus 5 Original Android Development] kong:
Hmm, maybe they’re just having different point of views. To be honest I barely have any idea how this thing works, but *I guess* when you “backport” something, you may have to rewrite the code to make it work with older kernel. For me it’s OK to claim that you authored the code (because you really did), but then the “idea” or “algorithm” is originally from someone else so at the same time you should also give the credit to them… Maybe it’s a serious ethic in open source community, etc. etc.

Suppose we leave the authorship stuff issue aside, I’m still pretty sure that [MENTION=4152171]myfluxi[/MENTION]’s (or any devs) comments can help make this kernel better and [MENTION=3795148]neobuddy89[/MENTION] is open to any comments/suggestions :fingers-crossed:
[Nexus 5 Original Android Development] myfluxi:
Guys, just a few sentences that would help everybody:

1. Keep original authorship.

2. Don't rewrite history.

3. Behave according to the rules (xda, gerrits, mailings lists etc.).

4. Do your homework.

5. Show some respect in general, yes it's ethics.

6. Only smear somebody (in this case me) if you have a point and don't make something up.

Then everything is fine.

Maybe the original poster of this thread is able to confirm, that each and every of my statements in this thread is valid, that we talked about every aspect in detail in private and that I even gave him a lot of practical hints to accomplish all of the above a long time ago.

I am open source throughout.
[Nexus 5 Original Android Development] neobuddy89:
Your hints are useful as always, your first post "Don't do faux" was misinterpreted by me. I will take care and make sure to maintain original author as long as I can.

However, this is still not appreciable "Don't confuse backporting with developing. And don't make me dig out that post where you blamed CM for an error of yours while arcee did a brillantly simple patch that fixes Qualcomm's/LGE's error properly."

As you might aware that we did face audio glitches and you simply posted "You are looking in wrong direction" when I was reverting my audio patches and bringing them in sync with CM11. As per of that statement of yours, this was my reply, "If you are not helping fixing errors or enlighting what could be source of issue we are facing, don't dig past posts and make false blames."

Also, backporting can be considered as developing since backporting also includes fixes and enhancements like in case of CPUIDLE driver.

Thanks for all the support (especially with yesterday's MSM Hotplug fix and Faux sound hack) and practical hints.

I hope there is no more post related to this subject from anyone. If still something is pending, feel free to PM me and keep this topic clean from OT.

@others:

Here is next nightly:

Chaos-Kernel_v12.0-[05-18]-[11-11]

* Finally allow non-boosting of CPU cores when "Boosted CPUs" is set to 1 in MSM Hotplug.

* Fix permission error due to SELinux with Console service

* Some fine tuning in MSM Hotplug driver.

* Misc updates from CAF.

* Use 200MHz as idle frequency for GPU driver.
[Nexus 5 Original Android Development] antypas:
[MENTION=3795148]neobuddy89[/MENTION],

You don't need to have GPU at 200Mhz when it is idle. Normally it must be at 27Mhz and show this through the sysfs interface. Try the above commits!
[Nexus 5 Original Android Development] neobuddy89:
Oh.. what I did is simply replace 320MHz as initial frequency to 200MHz.

So, you can notice when device is idle while screen is on... it goes down to 200MHz.

No big deal:

https://github.com/neobuddy89/hammerhead_kernel_caf/commit/8fd1d03f1132ddb00b326d74518b9db88d9a0950
[Nexus 5 Original Android Development] JulianXhokaxhiu:
Of course I do :) Just tell me what do I have to do, when the test build will be ready!
[Nexus 5 Original Android Development] myfluxi:
This will not do, what you expect. Our device idles at 27MHz freq all the time between busy cycles. You just set the last step before going to SLUMBER and when returning active. Maybe 200MHz is sufficient, maybe not. The freq step you introduced will only last one sample (10ms) but may introduce performance regressions. Savings are practically zero, so this is not a noop but almost.

strtstp-sleepwake has an interesting git history, if interested, I'll write about it in detail. The commits mentioned above are correct, antypas knows his stuff.
[Nexus 5 Original Android Development] neobuddy89:
Yes, antypas is correct.

GPU freq reported in sysfs is incorrect, reports idling at 320 MHz and needs your patch.

I noticed slight performance regression as well.

I would be interested in strtstp-sleepwake if you can explain.
[Nexus 5 Original Android Development] neobuddy89:
Test build: http://www.androidfilehost.com/?fid=23487008491964877

For me, app loads but doesn't take my input to device.

Please check if it works for you with

https://play.google.com/store/apps/details?id=remote.hid.keyboard.client

You will need to enable ADB debugging under Developer Options.

EDIT:

This actually works.

Steps:

1. Enable ADB.

2. Open APP

3. Now connect your device to System via USB

Good hacky stuff.
[Nexus 5 Original Android Development] JulianXhokaxhiu:
Flashed and tested exactly with those steps. Works very good, thank you, couldn't be easier! :D
[Nexus 5 Original Android Development] gravedigger76:
[MENTION=3795148]neobuddy89[/MENTION]

Any chance you could answer above please?

Thank you
[Nexus 5 Original Android Development] neobuddy89:
If you are on default profile, and tap backup.

Your default profile settings are saved in sdcard with file name default.profile_backup.

After you are done with wipe, install kernel, you need to be again on default profile and tap restore.

App will autoclose and should load with backed up settings.

---

In case you are on battery profile, and tap backup, your settings are saved to battery.profile_backup.

Next time you need to be on battery profile when you make restore.
[Nexus 5 Original Android Development] gravedigger76:
EDIT. Ah got it. Thank you!
[Nexus 5 Original Android Development] daniel84cs:
After days I use the paranoid android with the Franco kernel or elementalX I am obliged to return to the CM11 with the legendary Chaos kernel ..... I did 3000 tests but I can not get the same results for consumption and performance.

Thanks [MENTION=3795148]neobuddy89[/MENTION].

Inviato dal mio Nexus 5 utilizzando Tapatalk
[Nexus 5 Original Android Development] gravedigger76:
[MENTION=3795148]neobuddy89[/MENTION]

Another question

How do you apply the profile at boot?

I'm not seeing anything in init.d

It's there another method used?

Thanks
[Nexus 5 Original Android Development] neobuddy89:
Glad to have you back. :)

It's all coded in the ramdisk:

https://github.com/neobuddy89/hammerhead_initramfs_caf

Building NXTweaks working backend took me year.

Also, special thanks to @dorimanx for being inspiration and great learning source while coding that.

It all starts with /sbin/ext/postinit.sh and too complicated. :fingers-crossed:
[Nexus 5 Original Android Development] giajp:
Nothing more true

Sent with my Google Nexus 5
[Nexus 5 Original Android Development] Semetery:
This kernel has made using AOSP ROM's not an option for me anymore. Haha. While that is a double-edged sword (I like using PA, for example), I can't imagine using a different kernel. Guess I'll continue to use CM.

Everything feels super smooth and my battery lasts plenty long enough to get me through a day no matter what I do on my phone. Huge thanks for a truly outstanding kernel!
[Nexus 5 Original Android Development] bosna110:
by any chance is there a nightly changelog? I love the kernel by the way! it is awesome
[Nexus 5 Original Android Development] gravedigger76:
Yes. Every time a new nightly is up neobuddy posts change log. Probably should read a few pages and see