yashsingh1/xdaforums huggingface dataset:
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] kast:
Oki...

While more people get the required time to report on the battery bug (I'd like to be totally sure it's gone for good), I'm checking the other issues that were reported. I also converted this thread into a DevDB project, so there you go with some proper bug reporting, feature request and so on.

Talking about possibly remaining issues, I was checking the one reported by [MENTION=3457878]kingozzo[/MENTION], an issue he encounters trying to play videos.

I must admit I'm not a fan of watching videos on my phone. It's not linked to the weeness of these phones, I just don't fancy watching videos on any phone, even iPhones which do have bigger screens. So it's not something I generally test.

For the purpose of checking this, took my MiniPro running latest 1.7Lite, installed MXPlayer and downloaded a standard DivX sample from here: http://trailers.divx.com/divx_prod/profiles/Helicopter_DivXHT_ASP.divx

This is a 720x576 video. I launched MXPlayer and... if at first nothing was playing, once I enabled the HW decoding, all played smoothly and beautifully. So... My question is, what type of video were you trying to play? What software were you using? Was it rated >18? ;)

Hope you don't mind the silly joke ;)

While I gather more info on the video problem I'll take care of KaMenu and do a general regression test.

Yes, Kappa is back in active patching! ;)

Thanks for your help!

Ka.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Aayushya:
Kast show some love for coconut too! ;)

And congrats on fixing this insane bug!
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] kast:
Hi there,

your wish is my command, here's latest 1.7Lite for Coconut... Untested unfortunately 'cause I don't have a LWW myself.

http://www.mediafire.com/download/qc7jv5fgwck6la4/KaCoconut41.img

Ka.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] azzazelium:
finally! can't wait to taste it.

edit: work like charm, hang up at the first boot. i pull out the batery and wait for second boot, take a little while and finally its booting. Usuall it shows 100% after pulling the batery but now the indicator shows normal. Perfecto!
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] cybercop007:
hybrid governor

is hybrid a dual core cpu governor??

http://xdaforums.com/showthread.php?t=2186957
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] kast:
Yes, which makes it pretty much useless on these devices.

Ka.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Arun Av:
Ka, one for smultron too, if u dnt mind. Want to be sure that the bug is dead-squashed- :)
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] kast:
Hi,

smultron was posted yesterday:

http://xdaforums.com/showpost.php?p=47480118&postcount=1229

BTW, was tested and it boots ;)

Take care,

Ka.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] BealeStBluesBoy:
No battery bug in my coconut :D
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Arun Av:
Geez, I missed the post! Thank u!!! :) :)
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] kast:
I'm starting to love these reports! ;)

Ka,
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] kast:
Let's keep these reports flowing before we say that at 100% the 100% bug is gone.

Meanwhile, I'll disclose a little what was done. I checked what were the differences between Mesa and this one.

There are thousands differences, of course, all show the geniality behind Mesa. Following hints I had received, checked more carefully the I2C code in Mesa... And applied the same "relaxed" logic. Hopefully this was it. When confirmed I'll give all the details.

Ka.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Muckyfox:
Mango booting, I forced the battery bug on 1.6rel and then flashed the latest lite version and like magic it fixed it, no longer stuck at 100%, battery bug defeated :thumbup:.

Also might be worth noting previous lite versions only booted once every ten tries for me.

Thanks again :D
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] JimNta:
Can I test 1.7 satsuma karnel..?
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] cybercop007:
???

is it 1.7?? What is new in this??
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Akshay Anand:
Bro congrats battery bug gone for good from my coconut..

I tried to remove battery.... Using rom

Tried to.replicate the same thing again and again

:) But that evil.thing. Is gone:sly:
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Niteshdcool:
The new version i.e 1.7 is in beta and is a attempt to remove 100% battry bug..

And it has done exactly that.. :D
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] kast:
So...

After keeping you for several months on a silly but stubborn bug, now that it seems to be solved, I guess I owe you all some explanations.

For the people that just want something to work, regardless of the "how", this post will be very boring. For the others, here is what has been done to fix the 100% battery bug issue.

First of all I must thank all the people that helped me investigating this issue. Not only by providing logcats (as you know I never had the problem myself) but also digging into the code and logs to find a possible reason to the issue. In no order, thanks to: karandpr, a|\|droid_user, kingozzo, and a few others too. Thanks!

Now, for the "boring" technical bits. After months of wandering in the dark, karandpr post finally brought a little light to this. The line that made a bit clearer to me what was going wrong is this one, as in the log he provided in his post:

<3>[ 9.910949] msm_i2c msm_i2c.0: (00aa) Error during data xfer (-5)

There was at somepoint a transfer problem but we didn't know why. This issue happened to some and never to others. No way to know if it was hardware related or not. The only sure thing is that it happened with some kernels and not with others.

That log line there pointed to this piece of code here:

i2c-msm.c

line 520

if (dev->err) {
dev_err(dev->dev,
"(%04x) Error during data xfer (%d)\n",
addr, dev->err);
ret = dev->err;
goto out_err;

Yet, because dev->err is populated "asynchrounously", it was hard to tell, once again, what was going wrong.

Only resort was to compare sources between this kernel and one that didn't have the issue. I went with Mesa.

Downloaded the diffset an0nym0us_ provides with his kernel, applied to stock Sony kernel and then diffed the I2C bus driver code between Mesa and this kernel here. Bingo! There were maaany differences! ;)

The most relevant ones, to my understanding, were the following:

first of all, in Mesa, "read" and "write" functions were replaced by "relaxed" ones. For example:

-	val = readl(dev->base+QUP_CONFIG);
+	val = readl_relaxed(dev->base+QUP_CONFIG);

Second, mutex calls and type were replaced too:

-	mutex_init(&adap->bus_lock);
+	rt_mutex_init(&adap->bus_lock);

Although I must admit part of the logic difference is too deep in the lowlevel kernel lands for me, it seemed to do the trick.

This "relaxed" change coupled with rt_mutexes seem to have (probably) solved hardware slowness of some devices. I might just give a shot to some kind of technical explanation but it's only speculation. Maybe some phones need a bit more of a "relaxed" approach when writing or reading, this made the trick.

I wish being able to provide more details in the technical aspect of the solution. I don't doubt skilled people are able to. I'm just a kernel patcher ;)

Take care you all and thanks again for your help!

1.7 is now much closer than before. Tempted to add JB booting but yet to understand exactly what needs to be patched in kernel and ramdisk. I know GB boots with the correct ramdisk, JB still a mistery.

Ka.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] karandpr:
Plausible explanation ...but still ,why didn't Kappa 1.3 didn;t have the bug ? If i2c was not patched with the initial commit then there might be more than one "solution" for the bug ...It's funny imo ...The first Kappa didn't have the bug ...Some commit triggered the bug ...and another commit patched the "bug" ...

Also ,I explained ,that in July the bug was not present on any Kappa .The bug appeared randomly in October ...
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] kast:
Yep, do agree, very strange... Unless our phones were much "younger" when 1.3 was out and that's why nearly nobody had discovered the bug. Some people report they started seeing the bug after the phone fell, others say that a magnetic storm passed in the area, some others have seen ufos and then suddenly the battery bug was there. That's why I assigned now the case to Mulder and Scully ;)

Ka.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] gocegi:
I hear House were a good diagnostician.

Should've asked him first :)

Congrats on solving a mystery, Kast.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] karandpr:
:highfive::good::laugh:

No ,thats not it ...1.3 was perfect on my phone ...It never shows battery bug ...Also I might have seen martian mice on bikes .. ...
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] kast:
I do believe you m8, I mean on the fact that 1.3 never had the issue. For the martian mice on bikes leave me a little time before I'm convinced, ok? ;)

Now need to find out, except for the ramdisk, what makes a 2.6.32.x kernel boot JB and... The other not.

In case anybody has ideas, more than willing to hear them.

Ka.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] a|\|droid_user:
peace finally..!

[MENTION=373657]kast[/MENTION] No more battery bug on coconut!!! good job kast...:good::D
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] LaShto34:
No battery bug on smultron - st15i too. Just one question: did anyone tryed restoring sd-ext (ext4)? It takes forever. Kappa 1.6 doesn't have this problem...
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] roxandn:
hi dear kast

i use KaSmultron481 in my xperia mini

im not overclock but this version kappa ,

why in every boot Overclocking cpu automatically to 1708 MHz :confused:

plz fix this bug

thanks
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] rahimali:
check to see if you don't have some other app that's over-riding cpu control, like nofrills or setcpu etc.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] roxandn:
No, I have no cpu optimize applications in my cellphone bro.

Also I test whit another Rom (nxt) again I saw this (overclocking cpu )after every boot.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] karandpr:
AFAIK ,CPU is overclocked for faster boot ...It is underclocked on boot however ...
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] kast:
Hi there roxandn,

as karandpr rightfully mentioned, this kernel goes automatically into OC, the highest I believe still to be "reasonable", only at boot time, then automatically goes back to "standard" ranges (max 1GHz).

What you see in your screenshot is indeed the time it the kernel spent at a specific rate. I could make it a configurable parameter for people that are totally allergic to OC... But even me who don't OC at all, I like to have a faster boot. The wear of the CPU, considering how little it stays at that rate, I might consider it irrevalent, until proven wrong by somebody that knows this stuff better than I do.

Ka.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] sandeep101:
somehow init.d scripts not executing . do i need to flash rom again?
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] scorpion 21:
Kast, I told before that version for smultron is booting, but when I have ext partition on sd card it stuck on boot logo, this bug is happened since you

update something about partitions as I remember
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] kast:
Ext is something I never test 'cause personally not using it. Thanks for reporting it, I'm adding this to the list of bugs in current 1.7 ;)

End of tunnel is near though...

Ka.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] kast:
And because a picture is worth a thousand words...

Thanks to master An0nym0us_ for his precious tip!

I'll keep you updated as this is only a first test. First need to fix a few of the reported bugs...

Take care and good night you all,

Ka.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] rahimali:
thank you [MENTION=373657]kast[/MENTION]! thank you [MENTION=4135482]an0nym0us_[/MENTION]! looking forward to this!
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] karandpr:
I am curious about how will the kernel sources will be handled ...What Kappa-master will be ? :)

Stock ICS will be master and then JB will be a branch ......or something else ....
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] kast:
No need ;)

At least for the moment.

I tested and the current test version boots both ICS and JB. Of course, ramdisks are different.

What I did was, according to An0nym0us_' hint, was to update a pile of video drivers the same way (well, more or less) Cosmicdan did in his Turbo Kernel. Nearly 40 files patched later, I first tried to boot my Smultron which runs ICS. Then, took the zImage, packaged it with a ramdisk known to boot JB too (used the Lupus JB one) and bingo... JB booted fine too. Both are usable, no bug found so far.

Now need to prep my own ramdisks... While trying to keep the total size of the img as small as possible.

Ka.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] karandpr:
Makes sense ,though booting is not really an issue with Hybrid kernels ....Subway surfers used to hard crash on Mesa Hybrid on Stock ICS ...but it was decent for CM 9

AFAIK ,MESA uses gzip on init and lzma on others ...Still the starting lag is awful on Hybrid kernel....
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] job.bousix:
Hi , you've done a great work on this kernel but it stil has bugs .

Sometimes , videos, what ever their type is ,doesn't play untill reboot ( just black screen ) .

Sometimes ( or most of the time ) rom doesn't boot only after 3 or 4 times of kernel "boot fail" ( stack at the logo for a while then reboot agan )

But still a great kernel ! Using mango with stock ics rom .
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Arun Av:
ka, there's something I've noticed in v1.6...if system partition is formatted or the rom doesn't have a rooted rom (stock ics for example)..then if I flash 1.6 kernel and try to boot to recovery at first start... phone gets stuck at boot logo/dark screen after boot logo and reboots eventually. Means it can't enter recovery. I think it'd be great if u'd include a feature like.. the kernel would automatically boot to recovery if there's no rom/no valid rom present/ system partition is formatted. About the stock unrooted rom I'm not sure what should be done but at least there shouldn't be any problem to boot to recovery ..whatever rom is installed or not. :) Thank u
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] dato02:
kast is there any chance the way i unlocked my phone was the reason of battery bug? I unlocked by testpoint method.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] karandpr:
Nope.Not a chance ...(Considering I unlocked with official method)

From what I know ,it's probably due to nand wear ....Which makes it device specific bug w.r.t ...To put it bluntly people may not encounter the bug today but they will in 6/12/18 months time ....
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] kast:
Yep, this is my conclusion too, considering I've replaced my Mini Pro with a "last one still in stock" at some shop only 6 months ago.

The Mini was also little used... The Active was bright new. The only one I use most is the Mini Pro but again, not as my primary phone.

And never had the issue myself.

Ka.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] karandpr:
Ahh ..Thats why ...

Mine is 20 months old ...It's my primary phone too ..:victory::laugh:
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] job.bousix:
fix boot bug please

Hi , please fix the boot bug that the last kernel has , it most of the times stuck at boot logo for a wile then boot agan fix it please , im using xperia mini pro .
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Aayushya:
Even I have this problem, I have a coconut.

Please fix, as that is the only problem that i have faced with 1.7b.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] Marília de Oliveira:
Cool

Optimal kernel! Wanted to know what the best governor? :cyclops:
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] rahimali:
smartassv2 or smartassH3 as governor with sio as scheduler...
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] smoke_slim:
some news kast?
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] job.bousix:
+1

where is kast ??
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] rahimali:
[MENTION=373657]kast[/MENTION], is it not possible you could re-release Kappa 1.6 with battery fix included as a stopgap until you can release the next version at your convenience? Thanks a lot!
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] yawako:
I dont have any problem with 1.6 its must be ROM issue not kernel. Been using it for 3 weeks no problem with battery stats with Nextgen V8
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] madhouses:
Just read older post and you will see its kernel releated problem. I use before 1.6 longer than month w/o problem and second time when i flash it i face this problem first time.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] kast:
Don't know why I didn't do that before... I'm on it.

Thanks.

Ka.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] karandpr:
Can you just upload the fix on github so I can shamelessly cherry pick it :laugh::angel:

Also I am forking off Kappa 1.3 to see if I can find another battery fix ...Since Lupus and Radeon both don't have commits which Mesa has ...
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] rahimali:
That would be awetastic (awesome+fantastic) to quote a friend of mine! ;)

Thanks you!
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] kingozzo:
Are there news about kappa 1.7? The latest beta is pretty good and fast but the video codecs are missing.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] subconscious_mind:
Still now kappa 1.6 is the best except battery bug.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] job.bousix:
any news [MENTION=373657]kast[/MENTION] about v1.7 or fixed 1.6 or hybrid kernel ?
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] kast:
Hi there,

since I lately find hard to have time to play with a final 1.7 (which I hope to make hybrid ICS/JB)... I followed one of our friends advice and patched version 1.6 to remove (hopefully) the battery bug.

Anyone interested to give it a spin? I built two versions for the moment, others will come soon if tests are ok with these.

Kappa 1.6B for Mango / Mini Pro

Kappa 1.6B for Smultron / Mini

Please, anyone having the battery bug issue could confirm these two solve them too?

EDIT:

Added Satsuma / Active

Thanks,

Ka.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] JimNta:
can you build for satsuma aka active..i'm ready for tester
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] kast:
Here it is

http://www.mediafire.com/view/g99pqfqmpg71v4c/KaSatsuma1-6B.img

but can't tell you right now if it boots, sorry, don't have a Satsuma with me right now.

Ka.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] JimNta:
i will test...wait..

---------- Post added at 05:16 PM ---------- Previous post was at 05:09 PM ----------

Boot for satsuma...do you have change log...

but thanks for build kernel for satsuma
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] kingozzo:
Battery is ok for me ;)
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] subconscious_mind:
waiting for coconut build
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] rahimali:
Thank you! Thank you! Thank you! I have been waiting for this and flashing this right now! Will try and provide feedback soon!
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] job.bousix:
thanl you very much for the update , but for me it still there after pulling the battery :(

using xperia mini pro - mango version , i will attach a dmesg later because i have exams for now :(
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] dark4m:
Hello Kast,

no luck on this one

I've tested it with a 2 months used battery booted = no bug

tested it again with a 14 months used battery =bug is there

after that even the new battery boot catch the uggley bug =LOL

was on mesa 4.6 before that, phone = Mango SK17i

take care
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] rahimali:
dang! my battery went from 50% (or thereabouts) prior to flashing to 4% after flashing. charging now. was that expected?
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] kast:
Thanks for your feedback, thanks a lot.

You know what? It's only today, for the very first time in my whole life... That I'm finally seeing the bug myself!

Please allow me to share my mixed feelings, I'm not happy I got a phone that shows the bug, yet, finally can do so tests myself!

I can tell you that it's a mix between battery and phone. When I swapped the battery from my Mango to my Mini, the Mango phone kept having the bug, the Mini kept reporting the right battery level. This enforces the idea it's not linked "directly" to the battery wear but more to some hardware of the phone showing signs of age... Provided this assumption is even remotely close to what is actually behind the issue.

Version 1.7, in its Beta stages, was tested 100% bug free... Means some other stuff needs to be changed in 1.6 to make sure this bug is removed completely and not only the I2C part. Now, fixing 1.6 completely might turn into providing you with a 1.7 less the hybrid boot.

This gives me only one valid option I reckon, fixing 1.7 with the known bugs, e.g. Video issues which have been reported.

Yet, since it seems I can now replicate the issue on one of my phones... I'll be here testing and patching.

On the other hand... I'd appreciate someone who experienced problems with 1.7 and video playback to contact me via PM with the details, thanks a a lot.

Thank you all for your help,

really appreciated.

Ka
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] rahimali:
well this one seems to have an 86% battery bug, which is better than the 100% battery bug :D

battery was stuck at 86% until i powered off, took battery out, put it back in and powered back on again...
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] job.bousix:
Hi ,

i want to give a feedback about other bugs :

In addition to the video playback , i noticed that the init.d script does not execute or run at all in both v1.6 and v1.7 and also in v1.7 only there is another bug in booting the kernel : it is buggy to boot properly sometimes kernel need to boot twice to boot to system .

thank you .
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] kast:
Hi,

thanks.

Could you please give me a specific example of video playback issue? Which application do you use, which type of file?

I use MXPlayer with HW decoding activated and see no issue there.

Thanks,

Ka.
[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] job.bousix:
Hi ,

video playback works fine most of the times but it happened to me onse that

with any app i try to use they simply give black screen with no sound or picture there is no playback and onse i rebooted the phone it worked fine . That's what i can confirm about this issue .

Keep it up , you are doing a magnificent work :)

Thank you .