yashsingh1/xdaforums huggingface dataset:
[General Omni Discussion] FrodgE:
i9100 kernel build for OmniROM

For anyone running OmniROM on their i9100 who would like to try the kernel updates from [MENTION=4141005]Lanchon[/MENTION] and [MENTION=5948587]zeitferne[/MENTION], I have attached my own build. This build is based on stock Omni with only the additional commits as described by zeitferne in post 833. This is only for the adventurous, it is working for me but I can't make any guarantees it will work for you. Normal disclaimers apply. Ideally you should wait for an official implementation within Omni.

As a test I have flashed this directly over the normal nightly build. Android settings should the version as "NIGHTLY" and the kernel as my own OpenSUSE box.

I've appended my sig to the filename purely to identify the build and certainly not to attempt to claim any ownership.

md5: 63a0495f1da93dbe5c78895cd31f3a86

You make a very good point. Based upon your link and some other flashable kernels I've seen I've put this together. I'd still be keen to learn how to build each section of the ROM independently. XDA university has a good article but it misses the kernel which is the bit I wanted !
[General Omni Discussion] Lanchon:
very easy to make the kernel: instead of brunch <device> or mka bacon, try mka bootimage

for building other subprojects google help for envsetup. look into mm/mmp/mmm etc..
[General Omni Discussion] tac07:
Flashed and running fine so far!
[General Omni Discussion] gpkumaran:
Is there any version for omni rom with FPBug and TRIM together???
[General Omni Discussion] Lanchon:
besides my kernels, i think only gustavos has trim. he made the changes this week. we didnt talk about it, so i really cant vouch for its safety.
[General Omni Discussion] FrodgE:
Thanks for the feedback, it's nice to know I didn't break anything !

Ahhh that's what I was looking for, so simple !! Many thanks.
[General Omni Discussion] notabenem:
I am using the latest build of Gustavo's kernel. Since the 21/12 build of Gustavo's kernel I am having random Baseband issues (phone would not recognize the Baseband after restart, and About phone would show "Baseband: unknown"). Subsequent restarts usually help and once the Baseband is recognized, connectivity is stable.
[General Omni Discussion] ahmedelhofy:
Restart to recovery, and fix permissions .. That should fix your baseband issues
[General Omni Discussion] notabenem:
Thanks for the kind advice. Did not help, unfortunately.
[General Omni Discussion] ahmedelhofy:
It worked for me... :weird:
[General Omni Discussion] Lanchon:
fix permissions is a rain dance. people report simple rebooting solves it.

i verified that gustavo's kernel is safe regarding trimming; as safe as my trim kernel. it doesn't mean it will work as it should, just that it shouldnt trigger brickbug.
[General Omni Discussion] telephonemann:
User experience Zeitferne kernel

I am using Zeitfernes kernel, based on Launchons kernel, since about 5 days now, and it works like a charm. No battery drain after reboot, phone does not get hot anymore, everything seems to be more fluid.

I am running cm 11 nightly from 12/18/2014 and 12/24/2014, both work very fine. Just HDSPA using seems to drain a lot of battery, and phone gets hot around the camera again. Music bug doesent appear anymore. In general the battery life doubled, though I didnt meassure the sot.

The phone is refusing to connect to any PC or Mac, but I had to change the USB port at the same time I flashed the fixed kernel, so I am pretty sure thats the reason and not the kernel, esspecially because it doesent work with any kernel.

Great job you guys, thought I finally had a reason to buy a new phone, but it seems S2 is back in the game!
[General Omni Discussion] zeitferne:
I made a small update to my patch, mostly interesting for kernel developers. See here: http://xdaforums.com/showpost.php?p=57643086&postcount=829

/cc [MENTION=4141005]Lanchon[/MENTION], [MENTION=1670821]cybernetus[/MENTION], [MENTION=4217277]Gustavo_s[/MENTION]
[General Omni Discussion] Lanchon:
are you doing something to the codebase that is not in mainline arm linux? if so you should report it to the arm list (or i can do it if you want)
[General Omni Discussion] zeitferne:
The mainline ARM Linux exynos cpuidle driver (wow, that's a word) is completely different, I don't think that the changes apply there (although I haven't seen a call to local_irq_disable or equivalent).
[General Omni Discussion] cybernetus:
Thanks for this patch. I will try to apply this on the dorimanx kernel and i will build a new version when i have time :)
[General Omni Discussion] j1gga84:
Also interesting for [MENTION=3445281]pedestre[/MENTION] and [MENTION=1228651]fusionjack[/MENTION] ;)

Regards

Sent from my GT-I9100 with german Tapatalk
[General Omni Discussion] pilgrim011:
Could you please explain to us non-developers in layman terms what's this patch for?

As one of the members said recently, the only negative thing so far is the high battery usage over 3g/hspa+/hsdpa (even on screen off it seems to constantly transfer some data according to bbs), but that probably isn't related to fpbugfix. I'm assuming its cm11 fault, or maybe some app misbehaving...
[General Omni Discussion] zeitferne:
Since the kernel worked well already, there will, as I already said, probably be no difference at all, with "probably" being the key word. The problem was that there is some code in the kernel that expects that it is never interrupted by any other code (e.g. code that executes when the baseband signals an incoming call or when you press a hardware button, or just when a timer fires), as that code's documentation says, but I did not ensure that this was the case. This means that if such a interrupt comes at the wrong moment (a very, very short one, which might be why it did not cause any problems) during the execution of this code (which only executes when the phone enters a deeper sleep state), the behavior of a kernel with the previous patch is unpredictable; it might just work anyway, not wake up anymore, cause the FPBug again, or whatever.
[General Omni Discussion] snow:
[MENTION=5145944]GeeckoDev[/MENTION] have you seen this? :D I hope this will be useful for you for fixing freeze thanks to master [MENTION=5948587]zeitferne[/MENTION] :victory: Exynos 4210 FTW! :cool:
[General Omni Discussion] Maroussia:
Does it work with the Samsung Galaxy note 1 n7000 ?
[General Omni Discussion] Lanchon:
patches do. but the build is an i9100 kernel.
[General Omni Discussion] pilgrim011:
I have flashed your newest kernel. It was running fine, but after I rebooted the phone, the mobile network was gone - something like when there is a problem with efs. I have waited few minutes, then rebooted to recovery and flashed Apolo (version with your previous patch) and after reboot the network was there.

I have to say, maybe this isn't connected with newest patch, but that is what happened. It could be that network was down for all in that particular moment, or it was a bug with modem or... Who knows...
[General Omni Discussion] zeitferne:
N7000 needs testing anyway, so I made a build and attached it to the original post. Note the warning there: I do not have a Note 1, so that ZIP is completely untested.
[General Omni Discussion] notabenem:
Had a similar problem. See this post: http://xdaforums.com/showpost.php?p=57756636&postcount=860

As of this moment (running Gustavo's 23/12 build) I still think it applies to my phone (but I did not restart for a couple of days now). I suspected the TRIM code to cause this, but since you're using zeitferne's patched kernel which does not include the TRIM it must be something else. Either zeitferne's own patch, or something completely unrelated.
[General Omni Discussion] pilgrim011:
Yes, but your problem is with Gustavo_s kernel, and that kernel had similar problems for months before this patch even existed. Since Gustavo_s made a shift to Synapse and started to experiment, it's not rock stable like it was before...

On the other hand, I had this problems several times in cm11, so it could be totally unrelated to zei's patch...
[General Omni Discussion] grzwolf:
Neither issue to my s2 with zeitferne's 20141227 in general, nor regarding mobile data after reboot in specific.
[General Omni Discussion] GeeckoDev:
Good news [MENTION=5948587]zeitferne[/MENTION] [MENTION=4141005]Lanchon[/MENTION]

I applied the latest patchset on my Touchwiz kernel for n7000, everything seems to be working ok so far.

Interestingly the first eight patches are already applied in the stock kernel (I didn't remember seeing that the last time I attempted, so it must have been a mismerge). The last patch "ARM: Exynos: Call PM notifiers w/ IRQs disabled." couldn't be applied automatically so I have done it by hand.

Thanks a bunch for all your efforts. :victory:
[General Omni Discussion] notabenem:
Interesting. I was using Gustavo's 12-07 and 6-6 (I think) kernels for months and I had no such issues before the 12-x versions. I just checked the git commits. There are a lot of commits since the beginning of Dezember, so the current issue could have been caused by anything.
[General Omni Discussion] zeitferne:
I have submitted the patches to CyanogenMod: http://review.cyanogenmod.org/#/c/83190/ (Bug report: https://jira.cyanogenmod.org/browse/CYAN-3877).
[General Omni Discussion] Entropy512:
I was hoping to evaluate these earlier, but I've been busier over the holidays than I expected, I haven't even plugged in my build server in the past week.

I'll try to take a look at zeitferne's patches this weekend on Omni.
[General Omni Discussion] Markox89:
Congratulations to everyone! CyanogenMod merged the patches into its nightly branch :highfive: :cool: :victory:
[General Omni Discussion] Acid0057:
So will this start on January 7th nightlies?

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[General Omni Discussion] zeitferne:
It will be in the next nightly, see http://www.cmxlog.com/11/i9100/. But in their latest Blog post the CyanogenMod team announced that nightlies for CM11 will only be released weekly (every Sunday) now (instead official CM12 nightlies are now available daily).
[General Omni Discussion] Acid0057:
Thanks!

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[General Omni Discussion] davidcie:
Having quietly followed this thread for the better part of the year it almost feels like the armies of Mordor have finally been miraculously defeated :) [MENTION=4141005]Lanchon[/MENTION], [MENTION=5948587]zeitferne[/MENTION], [MENTION=591147]Entropy512[/MENTION] and countless others who chipped in — you rock. Thank you ever so much for your incredible persistence, hard work, and seeing this through to a very happy end. I also hope this thread lives on to show to our grandchildren as the epitome of the xda community and what it was/is capable of.

Now if only [MENTION=5145944]GeeckoDev[/MENTION] makes a little more progress in his own epic battle with HWC, we might actually have a very handy device indeed in our hands! IMHO plenty capable of running Lollipop :cool:
[General Omni Discussion] sagie:
I hope this isn't a stupid question, but should these patches also be merged to the CM12 branch? Does it suffer from the same problem?

P.S. mad props for all of the guys working on finding the root and the fix for this elusive bug! You guys rock!
[General Omni Discussion] zeitferne:
CM12 would certainly suffer from the same problem, but it looks like there will be no official CM12 for any of the affected devices (lack of maintainers or maintainer's time). Regarding inofficial Lollipop ROMs, I think all have merged at least Lanchon's fix, so they should be FPBug-free.
[General Omni Discussion] NeoTrantor:
Sounds great! Will the snapshot releases also have the patch?
[General Omni Discussion] Acid0057:
I would think cm11 m13 will have it once they do the code freeze on cm11. But anything older won't.

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[General Omni Discussion] NeoTrantor:
That would be great :)
[General Omni Discussion] lebensmuede:
Is this bug fixed in the new s2 nightly (2015-01-11, cm-11-20150111-NIGHTLY-i9100.zip)?
[General Omni Discussion] rogers11:
Yes
[General Omni Discussion] prateekkat:
Thanks a ton bro for this music patch...i am extremely amazed at how u came up with this fix....!!! Hats off :)
[General Omni Discussion] notabenem:
Could I submit the patch somehow for OmniRom? As of now I happen to have a complete build environment of omni.
[General Omni Discussion] Lanchon:
google fpbug, most kernels added the patches already. surely omni too, i suppose.
[General Omni Discussion] zeitferne:
It's not on Github at least: https://github.com/omnirom/android_kernel_samsung_smdk4412/commits/android-4.4
[General Omni Discussion] notabenem:
I have just applied the patches from post #833 (thanks zeitferne). Built the kernel (actually the whole ROM, because I don't know how to build specifically the kernel inside omni), flashed and running it. The FPBug test is running for a couple of minutes now, so far so good.

I can upload the CWM/TWRP flashable kernel, if anyone is interested. I also took the liberty of creating a pull-request: https://github.com/omnirom/android_kernel_samsung_smdk4412/pull/3
[General Omni Discussion] zeitferne:
If OmiROM handles that like CyanogenMod, they will not use GitHub pull request and you should instead submit the patches to gerrit.omnirom.org.
[General Omni Discussion] Bluffer94:
Same here
[General Omni Discussion] Acid0057:
The bug was fixed. If your still affected upgrade. What Rom are you using?

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[General Omni Discussion] FrodgE:
An omni kernel build like this one? ;)
[General Omni Discussion] notabenem:
Right! I forgot about your post, so there's no need to upload my build, because it will essentially be the same. Thanks for the reminder. What I will do though, is submit those patches to Omni via gerrit (unless someone, Entropy perhaps, will do it faster).

Update:

Struggling with gerrit. Some of the patch messages are missing a comit id in the footer and gerrit refuses them:

[remote rejected] HEAD -> refs/for/android-4.4 (missing Change-Id in commit message footer)

Any suggestions, how to submit?
[General Omni Discussion] notabenem:
Another thing: in the kernel I built, I can't turn on the wifi, even though the modules were part of the zip and were flashed by TWRP. dhd.ko is inside /system/lib/modules/ with the correct size ...
[General Omni Discussion] Lanchon:
make a squashed single commit. i think changes are supposed to be a single commit anyway?

---------- Post added at 09:36 PM ---------- Previous post was at 09:33 PM ----------

dont worry, it must be your build process, not the patches. (you can test by building without fpbug patch and checking that wifi fails too.) omni's build bot will work fine.
[General Omni Discussion] notabenem:
Apologies, I did not want to create the impression, that the patches caused the bug. Before posting the previous message I did exactly as you suggested here and the build from the original repo had the same problem with the wifi, so it's clear that I am doing something wrong, just can't figure out what...
[General Omni Discussion] FrodgE:
Hehe thought you might have ! I haven't looked too closely but I think the only recent Omni kernel changes are specific to the S3. Still no reason why you shouldn't go through the steps as personal learning experience, that's half the reason why I did it ! For gold on how to compile just the kernel check out master Lanchon's comments near my kernel build post (I had the exact same questions).

Are you trying to flash just a kernel zip over the regular nightlys here or do you also get this problem if you flash your entire "homebuilt" ROM ? Is it possible you've just messed up the zip file ? Maybe you can pinch mine (which I pinched from someone else) and try modifying it to suit ? Do the md5 sums check out as well as just the size ? Can permission issues cause this ?
[General Omni Discussion] notabenem:
Thanks for the valuable advice.

I only flashed the kernel, not the complete rom - although I may just try to flash it.

I checked my zip against your zip of course. Included all the modules, made sure they were flashed. Also tried the "fix permission" exercise, but so far no cigar. I will have to check the MD5s (or binary comparison)
[General Omni Discussion] Lanchon:
did you pull the blobs from a github repo?

https://github.com/DonkeyCoyote

https://github.com/ThankYouMario

https://github.com/TheMuppets

https://github.com/PupPeople

etc...

i think DonkeyCoyote is used for omni.
[General Omni Discussion] notabenem:
I pulled the blobs from the phone, as described here: http://docs.omnirom.org/Samsung_Galaxy_S_II
[General Omni Discussion] Lanchon:
many times the blob pulling scripts are incomplete. blob pulling via script is not what the official build server does.
[General Omni Discussion] notabenem:
Finally managed to submit the patch(es) to Omni's gerrit: https://gerrit.omnirom.org/11614
[General Omni Discussion] Entropy512:
Actually in this particular case, since most of the commits are upstream commits, it is preferred not to squash them.

Can you try and resubmit as a separate set of commits?

You might need to do something like:

git rebase -i omnirom/android4.4

and choose the "reword" option to cause git to redo the commit message for each commit. This should, when you save the "changed" commit message (even if you changed nothing), cause it to add a changeID
[General Omni Discussion] notabenem:
In that case please cancel this change and instead I will submit 12 separate changes.

Alternatively, I can do 1 request for all the upstream changes (still squashed) and 1 separate for zeitferne's changes.
[General Omni Discussion] Lanchon:
i think he wants those as separate commits. and i think you can abandon your own change yourself in gerrit.
[General Omni Discussion] notabenem:
Gerrit is quite new to me, apologies for the newbie mistakes. I have submitted 13 separate changes (one for each upstream change, and one for zeitferne's changes).

These are from https://gerrit.omnirom.org/#/c/11621/ to https://gerrit.omnirom.org/#/c/11633/
[General Omni Discussion] GidiK:
I have made a build (omni-4.4, i9100) with all 13 patches applied. I reconfirmed that I could reproduce the fuse bug with a recent nightly and ran the exact same test with the new build. And good news: the bug is gone! So as far as I am concerned, they are good to go.

The test I did:

adb shell
cd /storage/sdcard1
tar c Movies > /dev/null

while in another terminal window monitor progress with:

adb shell
iostat -k 5

On the recent nightly it would get stuck the moment the screen went off.

Thanks to all involved in finding this solution!
[General Omni Discussion] Entropy512:
Yes, although in this case, the changeID for the "squashed" commit could have been preserved and used for the final commit in the chain. Yes, you can alter dependency chains for existing commits.

Yup. Only issue I have is that for the upstream patches, you added "smdk4412" to the commits even though they're just plain old upstream cherry-picks (unless zeitferne did this too???)

It's easy enough to fix this, I can edit the commit messages tonight.

Based on your input, I'll be ninjamerging these without personally testing them tonight, can you go into Gerrit and +1 them as confirmation?
[General Omni Discussion] GidiK:
Done. Tried to preserve the order, which I think is important.

Thanks in advance!
[General Omni Discussion] notabenem:
I changed the commit messages and removed the "smdk4412" prefix as Entropy requested. It seems this removed the +1's from GidiK?
[General Omni Discussion] notabenem:
I am happy to report, that thanks to GidiK and Entropy, the changes are now merged to android-4.4 branch of Omni. There also exists an android-5.0 branch. How do we keep that also up-to-date (knowing, that before this change, it was identical to 4.4)?
[General Omni Discussion] GidiK:
Just tested the 27 Jan 2015 nightly and it is indeed bug-free! Well, free of this bug...

Thanks everybody for all the hard work.

The 5.0 is a whole different issue; for i9100 5.0 doesn't really exist yet and it is not sure it ever will. I assume that anybody who wants to try a private build for 5.0 will have to do his own repo/git-trickery for now (e.g. put a 4.4 reference in your local manifest instead).
[General Omni Discussion] notabenem:
True. I don't expect Omni to miraculously start working on the 5.0 branch of the whole ROM for i9100. However, given the importance of this fix, I suggest to update the android-5.0 branch of the smdk4421 kernel repo. If someone in the future decides to start working on Omni-lollipop for I9100, it would be good to give him a somewhat more stable starting point. This merge is far too important just to have it lost somewhere in 'translation' between 4.4 and 5.0.
[General Omni Discussion] Entropy512:
I can look at merging that. If it's the ONLY delta I might be able to have gerrit do the work for me. Won't be able to look until the weekend though.
[General Omni Discussion] notabenem:
Christian Balster has merged the patchset also to Omni's android-5.0 branch: https://gerrit.omnirom.org/11791

It seems there's nothing else to be done for this bug and this thread is ripe to be closed by a mod.

Thanks for everybody who contributed to have this bug discovered, identified, analyzed, tested, fixed and merged, but most notably to: pilgrim, Entropy, cgx, Lanchon and zeitferne!
[General Omni Discussion] martin1984:
:good:Interesting
[General Omni Discussion] Xlost_saintX:
Hey..try clearing cache and dalvik cache and then reboot your device.
[General Omni Discussion] Twiq:
i'm pretty sure they all no longer suffering from this issue by now, or moved on to newer devices.. last post above you is from march 2015 :D
[General Omni Discussion] kl0ndike:
All these permissions would be dropped after the system reboot
[General Omni Discussion] bassmanitram:
(as already noted in my instructions - which is where a system init script would be helpful, but I'm not experienced enough with Android yet to provide one)
[General Omni Discussion] AA1973:
Don't know if it helps, but I found the article quite interesting.

http://www.androidpolice.com/2014/0...at-and-even-samsung-may-be-implementing-them/

Article based on

http://www.chainfire.eu/articles/113/Is_Google_blocking_apps_writing_to_SD_cards_/

Sent via GALAXY NOTE N7000 // KitKat
[General Omni Discussion] kl0ndike:
Doesn't work with TTS :/
[General Omni Discussion] bassmanitram:
Text-To-Speech? As in it prevents TTS from working, or TTS can't access files from the newly exposed mount, or TTS wasn't working and still doesn't? If the former, well, yup - that's one feature I don't use and so I wasn't aware of that side effect - so another one to add to the list. If the latter ... well, pretty much the same - sorry.

As I said my primary concern is reliable music playback. For now this hack affords me that with no impact on my other device use cases. Classic YMMV caveat.

But thanks for the report. I've added it to the original post.
[General Omni Discussion] kl0ndike:
If the Entropy's hack testing succeeds on Omni, I'll build the CM nightly with those changes myself or 'll ask someone to do this. PsychoI3oy from the Cyanogenmod team does not recognize that this bug exists at all :angel: so I think, it will never be fixed officially in CM...
[General Omni Discussion] bassmanitram:
With so much anecdotal evidence I'd LOVE to know what his reasoning is!:confused:
[General Omni Discussion] kl0ndike:
He played 8 hours with Apollo, Play Music, Amazon and nothing happend (as he said). Additionally, they don't want to accept bugs on nightlies)))) But this problem is not only with music (I don't have any hangs on music too, sometimes) but I used the TTS Reader frequently in CM 10.1.3 and now it is impossible. I don't have enough time to convince CM to fix this issue.
[General Omni Discussion] Entropy512:
I don't do blind development. I might possibly consider it for I9100, but since I usually never build it as I don't own the device, it takes a lot longer to pop anything out for it.

CM doesn't accept bug reports against nightlies.
[General Omni Discussion] lerkin:
Ok, you know better.