yashsingh1/xdaforums huggingface dataset:
[Nexus One Android Development] intersectRaven:
I also think it has something to do with the regulator code...when I tried to use the regulator framework, my N1 wouldn't even boot! Right now the release uses a hybrid approach which bypasses the regulator framework and goes directly to the tps65023 function to set voltages which is what the codeaurora codes do. It's just that our codes are different which may point to a change which could be the cause of the problem. Anyways I'll continue with this approach while you work on a complete backport. :)
[Nexus One Android Development] intersectRaven:
Test Update!

- Finished merging the old and new way of setting voltages. Hopefully, it will be stable. :)
[Nexus One Android Development] martin0285:
Glad to see you hard at work on this IR... Hard to believe AVS has never really worked because this is by far my best batt life kernel... With AVS actually working I can't image what we will see :) Best of luck IR!!
[Nexus One Android Development] intersectRaven:
Updated! :)

*Btw, does anyone know what BIT(7) converts to? :p
[Nexus One Android Development] shorza:
Has anyone tested on CM's latest nightly?

Will i lose 720p?

Is it stable?
[Nexus One Android Development] wbknox:
BIT(7) converts 128
[Nexus One Android Development] SimFox3:
yes, yes, no
[Nexus One Android Development] shorza:
Thanks.

I love IR's kernels but i think i'll wait a bit first.
[Nexus One Android Development] christiankk:
Latest kernel from yesterday messed up my phone badly.

I had to give up on it. :(
[Nexus One Android Development] ardatdat:
To IntersectRaven,

The newest version 2.6.35-FM_AVS-925mV_CFS_20100806_0839 works fine for me.

Although "20100805_1604" gives me boot loop, newest version "20100806_0839" is running so far so smooth and I will keep on using it :D

Thanks again for your great work.

** p.s. I have turn off SetCPU's load on start (before flashing the new kernel), and change the method from "interactive" to "ondemand". After flashing, I change it to "interactive" and works great.
[Nexus One Android Development] d3cryp7:
"20100805_1604" hang on boot for me. "20100806_0839" hang up on the lock screen. Using CM 6 nightly on 06/08/2010
[Nexus One Android Development] citronbitare:
2.6.35-FM_AVS-925mV_CFS_20100806_0839 works great for me, too. I am on KingxFroyoSense2Nexus 1.1 ROM.

Edit: Actually it didn't work that great after rebooting. Two times hang on lock screen. Also higher battery drain then usual.
[Nexus One Android Development] Chahk:
IR, could you please also build the non-FM version with working bluetooth? Even it it's only the 925mV CFS for now.

[Edit]

After applying the latest kernel (2.6.35-FM_AVS-925mV_CFS_20100806_0839) I lost the ability to connect to WiFi. It enables fine, but then gives the following:

D/WifiService( 163): releaseWifiLockLocked: WifiLock{NetworkLocationProvider type=2 binder=android.os.Binder@4534e1f0}
W/wpa_supplicant( 1049): Failed to initiate AP scan.

[Edit 2]

Also now I'm having a problem where the phone will not wake up after going to sleep.
[Nexus One Android Development] intersectRaven:
Test Update!
[Nexus One Android Development] d3cryp7:
Boot ok. reboot ok. Wifi not working. CM 6 Nightly 7/8/2010
[Nexus One Android Development] intersectRaven:
AVS: Were you unstable before? *forgot about your last post...ignore... :p

WiFi: Have you tried pushing the WiFi module manually? (sometimes doesn't work when flashed which is just weird)
[Nexus One Android Development] intersectRaven:
Test Kernel Updated!

Please post when this release made it more stable or is STILL unstable for you! :)
[Nexus One Android Development] zyonee:
Love your work, but WiFi is still not connecting. Needed to boot-loop a few times until it started, but I'll revert to the latest stable non-FM kernel of yours again because I need WiFi.
[Nexus One Android Development] intersectRaven:
I see the problem now. The Android branch I merged had an updated WiFi processing. I think the problem's been corrected in the common branch but I won't merge anything that isn't in the primary experimental branch so you'll have to wait 'til they merge it in. :(
[Nexus One Android Development] Ivan Dimkovic:
Hmm I spent some time analyzing the TPS65023 regulator code in our kernels and Code Aurora - although it looks different at the end it really does the same thing for setting the voltage - i2c_smbus_write_byte_data

Even more - "our" regulator code has implementation of the calculated delay after the voltage setting waiting for the voltage to be actually set.. That and some mutex protections as well - Code Aurora TPS65023 code has none of that.

So I guess that regulator code is not the culprit here (I find it highly unlikely that the delay and/or mutex would make it worse ;-) ) Also, the delay in "our" regulator might be the reason why just porting the Aurora regulator code ends up in a crash - it could be that this delay is done somewhere else in Code Aurora kernel (I didn't look for that)

One thought - perhaps AVS just does not work below 1.00v which is, after all, QSD 8250 lowest "designed" voltage? Code Aurora AVS code does not scale below 1.00v as well.
[Nexus One Android Development] zyonee:
Good to hear that you found the cause of the problem. Seemed to run pretty stable for the short time I tried it, so I'll definitely be trying it more once WiFi works. Been using your kernels for more than a month now, and I'm very satisfied with the performance and battery life. Thanks again!
[Nexus One Android Development] intersectRaven:
I also noticed that which is why I've been bringing the new regulator code more into AVS. I also noticed that there is a delay set in AVS before actually writing the code (or running the timer which also writes the voltage) and tried modifying it to immediately write it and it was stable but got too many complaints about the voltage being unable to get high enough.
[Nexus One Android Development] d3cryp7:
For the 20100808, the wifi is not working?
[Nexus One Android Development] intersectRaven:
Not yet. The Android repositories tend to be updated during weekdays only. :(
[Nexus One Android Development] Scylarr:
hi, i'm pretty new around here, but i'd like to know which version is the most stable? (with least bugs)
[Nexus One Android Development] RieGo:
I just flashed the 20100808_0755 avs with clearing cache/dalvik-cache on latest cm6 nightly. testing it now:

-i think i'm in an infinite bootloop

-manual rebooting

-freeze on reboot attempt (pwr+vol down+trackb)

-removed and reinserted battery

-almost booted: stuck in boot animation, key lights already on

-again manual reboot

-lockscreen showing

-force reboot right after lockscreen

still not working for me, sorry. keep it going :)

edit: i'll try out the new one right now:

-wipe cache + dalvik cache, flash 20100808_2102

-force reboot on boot animation? (or maybe it just restarted the animation?)

-successfully booted

-trying out now

-wifi not working (as we know already)

-i play a round racing thunder :)

-google earth

-everything fine so far, i try a reboot

-wow, really fast reboot!

-ok, so far everything is fine

did you change anything important in the latest kernel? no problems for me. I'll report back again in a few hours.

edit2: are you sure avs is working in this latest kernel? it's always 925mV@245MHz and 1225mV@998MHz (and so on... it's always a linear scaling over the frequencies), no indication of avs
[Nexus One Android Development] intersectRaven:
Too bad. Maybe AVS really wasn't supposed to work for undervolting? I'll try to release a 1000mV one if ever. Anyways, I'll stick with my 925mV since my N1 can handle it. :(
[Nexus One Android Development] intersectRaven:
Yeah I changed something in the latest kernel which is I integrated the AXI tweak and I think more importantly for AVS, I specified the startup clock for our CPUs to 998Mhz. My theory is that since the starting clock is at 768Mhz, AVS is trying to undervolt AND FAILING MISERABLY which causes the reboots. Pinning startup to the maximum speed which has a more stable voltage seeks to solve that problem. :)
[Nexus One Android Development] RieGo:
edit: lol you're faster than me... what about the linear scaling:
[Nexus One Android Development] intersectRaven:
It's a Hybrid AVS system which pins the maximum voltages to the ones that kmobs' uses in his undervolted kernel so AVS will only try to go below those values if your CPU can handle it. If not, it will follow the voltages in the SVS kernels. :)
[Nexus One Android Development] intersectRaven:
Yeah it's possible. I use the same kernel and some of my voltages are undervolted static while some are undervolted by AVS:

<6>[ 3438.990875] AVS setting V to 1000 mV @460 MHz -> max undervolt

<6>[ 3439.211669] AVS setting V to 925 mV @422 MHz -> AVS undervolt
[Nexus One Android Development] RieGo:
nice, than i think this looks like some kind of success... :)

edit: you're right, i just got the first avs: 925 mV @384 MHz
[Nexus One Android Development] intersectRaven:
Don't call it a success just yet! Latest version isn't even a day old! Besides, most of the really unstable N1s seem to be taking a break due to the weekend so we'll only know for sure when most of them takes this for a run. :p
[Nexus One Android Development] RieGo:
yeah, i just got a force reboot, after i tried another reboot to test it out...

but at least it was much more stable than the other ones.

i'm switching back to a svs kernel since i need a stable phone tomorrow.
[Nexus One Android Development] ChronoReverse:
The old AVS didn't work but how do I tell that? The same AVS messages are posted after all.

In any case, the new AVS should at least be setting voltages now right?
[Nexus One Android Development] damanrico:
Thanks for all the great work, intersectRaven.

I'm actually using Wildmonks' kernel, but since his work is based on your work, I would also like to thank you.

I've donated a small amount of money to show my appreciation. Hope you enjoy the beer. :)
[Nexus One Android Development] Ivan Dimkovic:
@intersectRaven,

Here are the quick AVS patches I made to the kernel I use. I uploaded it here for anyone playing with AVS to compare with their own work

It does appear to be stable for now... even with 1190 MHz overclock I use

I made few changes:

- It is now using "regular" voltage setting code from Android, with delays, etc...

- I extended the AVS tables to hold minimum voltages per frequency (not globally)

- During the boot, I manually set voltage to 1.3v and 1113 MHz frequency (of course, this can be changed to 998 MHz and 1.275v) just to be sure
[Nexus One Android Development] wildmonks:
Wow! Strong work Ivan! Your patches made the .35 kernels I was compiling stable (well at least it doesn't boot loop anymore). Thank you so much for your hard work and infinite wisdom! :D
[Nexus One Android Development] intersectRaven:
I think the only thing that made a significant difference is the bootup clock. RieGo actually booted up earlier when I set it to maximum speed. As for the minimum, doesn't AVS already clamp it to minimum for all REGULAR voltages? (although now that I read your patch again, I think you added that for the overclocked levels?) Anyways, as for reverting back to original regulator code, I haven't tried that but I have been going down that road so maybe now that you've confirmed my bootup speed theory, I could revert immediately. :)
[Nexus One Android Development] Ivan Dimkovic:
I added those minimum levels for the sake of overclocked frequencies actually as I am not really sure that AVS would work there reliably.

I also think the bootup clock is probably responsible for stability.

Although, for example, I still have problems on my phone if I decrease the minimum voltage to 800 mV or even 875 mV - with 800 mV I cannot pass the "X" boot logo, while with 876 mV I am getting instability similar to "old" AVS problems.

I guess AVS is not really reliable for such low voltages and that it really depends more on the CPU quality itself. We cannot complain too much, though - as QSD 8250 is not even designed to run stable at those voltages - so it could also mean AVS is not always reliable there as well.
[Nexus One Android Development] minooch:
intersectRaven,

The latest kernel "seems" stable isn't stable on my N1

Is there a FM radio App that is compatible, or do we need someone to develop one?

Cheers,

Minooch

Edit: I went to use my phone to find the touch button lights on (nothing on the screen) and the phone frozen - Just restarted, see how we go from here
[Nexus One Android Development] SimFox3:
Boot loop on latest test.
[Nexus One Android Development] intersectRaven:
Please post on whether the last update was better or the one before that. We need to isolate what works the best for the most people out there. :)
[Nexus One Android Development] minooch:
Sorry,

I hadn't tried the previous kernels, if it crashs again I will try the previous kernel & see if the current is better or worse? - Would that be of any assistance?
[Nexus One Android Development] intersectRaven:
That would be great. They have different ways of using the regulator to modify frequencies so it would be of great help to see whether there is any difference in stability. :)
[Nexus One Android Development] minooch:
Would "20100808_2102" be a good test point?

Currently "20100809_0829" hasn't crashed (again) - I will flash back in 30min and let you know how it goes.
[Nexus One Android Development] intersectRaven:
Yeah. Those two use different ways to set voltages. :)
[Nexus One Android Development] minooch:
Cool. I have flashed yesterday's kernel, it has frozen once so far will keep you posted. (within 30 min)
[Nexus One Android Development] Ivan Dimkovic:
Hmm

Unfortunately, it looks like the strategy to set up the initial voltage does not work - I'm looking into the logs, and I see that there was no regulator at that point.

Also, first AVS voltage adjustment does fail with "no regulator" error...

@edit - I modified my code a bit. Now, it will prevent AVS from touching the voltages completely until the regulator is present.
[Nexus One Android Development] intersectRaven:
I thought that was safe but it seems it is safer to do as you say. It adjusts it's own table even when no regulator is present so it might lower the internal table list of voltages so that next time it will lower it further. ;)
[Nexus One Android Development] intersectRaven:
Test Update!

Again, please post which version is most stable for you!

*This update may cause you to panic when you see the early AVS messages. Rest assured that it is fine. :)
[Nexus One Android Development] Ivan Dimkovic:
@intersectRaven,

I made few more changes which I think do help the stability:

- I prevented acpuclk_set_rate() to work before regulator is obtained, so any frequency scaling will have to wait for the regulator (that includes AVS)

- I removed first voltage adjustment call in avs_init() as it would fail anyway (no regulator)

This way, AVS will kick in much later in the boot process - once the regulator is ready to take voltage adjustments and this means no AVS call to set_vdd() would fail
[Nexus One Android Development] sirtrini:
IR - I would love to test, however I also need Bluetooth for my daily activities. Is it possible to compile this last version with Bluetooth support? I suspect others might be in the same boat - hence the lack of feedback.

Thanks - appreciate it!
[Nexus One Android Development] minooch:
Not sure if its good news or not, but the two kernels that I was testing, both appear to be stable on my phone (but only after it freezes once). Hope this helps. I will flash the latest kernel shortly.
[Nexus One Android Development] intersectRaven:
Test Kernel posted without FM so bluetooth will be fine.
[Nexus One Android Development] minooch:
Was about to post that the latest FM kernel had been stable ALL day, and then it froze - power, volume down & trackball didn't restart it either :(

Is there a log that I can provide that might be of some assistance?
[Nexus One Android Development] intersectRaven:
No logs actually since this is processor level. Once the processor conks out unless a different processor is writing the log we'll have nothing. :p
[Nexus One Android Development] minooch:
Well,

That just sucks! Just kidding :) let me know how I can help, happy to assist.
[Nexus One Android Development] wbknox:
Same problem but with none FM version.
[Nexus One Android Development] Pochemuchka1977:
Same here - after installing the latest non-FM kernel on top of the latest CM 6.0 night build, first boot was unsuccessful, second one did get to unlock screen and hanged there, third boot got to unlock screen, I have managed to open it and than it got boot loop again
[Nexus One Android Development] Bxrxyxaxn:
thanx for this kernel 2.6.35_AVS-925mV_CFS_20100810_0836

fixed my camera issues
[Nexus One Android Development] atomizasser:
Flash on CM6 nightly build any wifi doesn't work.
[Nexus One Android Development] minooch:
Read the thread (or at least some) before posting - We already know that Wi-Fi isn't working yet - It's out of IR's hands - Patience
[Nexus One Android Development] pgwipeout:
I have the same problem on CM6 - RC2 in dmesg I get (w1_iw_iscan_set_scan: Scan from SIOCGIWSCAN not supported), as well as "AVS setting V to -22428 mV @0MHz" every .06 seconds or so.
[Nexus One Android Development] Pochemuchka1977:
Just installed the latest kernel no-FM (2.6.35_AVS-925mV_CFS_20100811_0816)

The device stucked, the kmsg log shows:

<6>[ 203.003295] AVS setting V to 1200 mV @998 MHz

<6>[ 203.329803] do_imprecise_ext: ADFSR = 0x00000004

<6>[ 203.329986] do_imprecise_ext: DFSR = 0x00000416

<6>[ 203.330108] do_imprecise_ext: ACTLR = 0x000c0037

<6>[ 203.330200] do_imprecise_ext: EFSR = 0x00000004

<6>[ 203.330352] do_imprecise_ext: L2SR = 0x00010000

<6>[ 203.330474] do_imprecise_ext: L2CR0 = 0xc0050f0f

<6>[ 203.330627] do_imprecise_ext: L2CPUESR = 0x00001020

<6>[ 203.330749] do_imprecise_ext: L2CPUCR = 0x000000e0

<6>[ 203.330841] do_imprecise_ext: SPESR = 0x00000000

<6>[ 203.331024] do_imprecise_ext: SPCR = 0x0000000f

<6>[ 203.331115] do_imprecise_ext: DMACHSR = 0x00000001

<6>[ 203.331268] do_imprecise_ext: DMACHESR = 0x00000000

<6>[ 203.331390] do_imprecise_ext: DMACHCR = 0x0000000f

<6>[ 203.331542] do_imprecise_ext: TCSR_SPARE2 = 0x0000a037

<1>[ 203.331634] Unhandled fault: imprecise external abort (0x416) at 0x43237004

<6>[ 205.005279] AVS setting V to 925 mV @384 MHz

<4>[ 206.187164] wds: 0020 @ 01

<3>[ 206.187530] qmi: wds: network start failed (000e)

<6>[ 208.838958] AVS setting V to 1200 mV @998 MHz

<6>[ 208.878997] AVS setting V to 925 mV @384 MHz

<6>[ 209.089172] AVS setting V to 1200 mV @998 MHz

<6>[ 209.434692] do_imprecise_ext: ADFSR = 0x00000004

<6>[ 209.434814] do_imprecise_ext: DFSR = 0x00000416

<6>[ 209.434997] do_imprecise_ext: ACTLR = 0x000c0037

<6>[ 209.435089] do_imprecise_ext: EFSR = 0x00000004

<6>[ 209.435180] do_imprecise_ext: L2SR = 0x00010000

<6>[ 209.435363] do_imprecise_ext: L2CR0 = 0xc0050f0f

<6>[ 209.435455] do_imprecise_ext: L2CPUESR = 0x00000020

<6>[ 209.435638] do_imprecise_ext: L2CPUCR = 0x000000e0

<6>[ 209.435729] do_imprecise_ext: SPESR = 0x00000000

<6>[ 209.435821] do_imprecise_ext: SPCR = 0x0000000f

<6>[ 209.436004] do_imprecise_ext: DMACHSR = 0x00000001

<6>[ 209.436096] do_imprecise_ext: DMACHESR = 0x00000000

<6>[ 209.436279] do_imprecise_ext: DMACHCR = 0x0000000f

<6>[ 209.436370] do_imprecise_ext: TCSR_SPARE2 = 0x0000a037

<1>[ 209.436553] Unhandled fault: imprecise external abort (0x416) at 0x4bc0e328

<6>[ 209.454742] binder: 440:455 transaction failed 29189, size 84-4

<6>[ 209.461669] alarm_release: clear alarm, pending 0

<6>[ 209.461791] alarm_release: clear alarm, pending 0

<6>[ 209.461975] alarm_release: clear alarm, pending 0

<6>[ 209.462066] alarm_release: clear alarm, pending 0

<6>[ 209.465179] capella_cm3602_release

<6>[ 209.465362] capella_cm3602_disable

<6>[ 209.465454] capella_cm3602_disable: already disabled

<6>[ 209.509704] AVS setting V to 925 mV @384 MHz

<6>[ 211.003173] binder: 379:379 transaction failed 29189, size 140-0

<6>[ 222.658752] batt: 100%, 4148 mV, 0 mA (-1 avg), 31.6 C, 1358 mAh

<6>[ 256.345672] AVS setting V to 950 mV @245 MHz

<6>[ 260.369598] AVS setting V to 925 mV @245 MHz

<6>[ 272.780242] batt: 100%, 4148 mV, 0 mA (0 avg), 31.6 C, 1358 mAh
[Nexus One Android Development] intersectRaven:
AVS is setting the voltages too low in your case but not low enough to restart the phone. Instead, it's making some programs crash due to incorrect results in CPU processing. Odd that AVS isn't raising your CPU voltage to 1275. You may have a buggy sensor that AVS uses. :(
[Nexus One Android Development] Pochemuchka1977:
That's really odd since SVS OV kernel works just fine and, if I remember correctly, sets the 1250@998. I have tried the latest wildmonks kernel and it works flawless ...

I remember, that old kernels of yours need several reboots before they started to work normally. Might it be here the case ?
[Nexus One Android Development] minooch:
IR,

I can finaly say that the current kernel (BT version) actually appears stable!!! :eek:

Its been running for 20 hours - That is a great record for me (since the change in AVS) - Previously I could only make it 3 hours MAX then crash.

Hope I'm not the only one :)
[Nexus One Android Development] intersectRaven:
Try the latest one and tell me if it's stable also. I got rid of the irritating messages that just tell that AVS isn't doing anything while there's no regulator. Hopefully, this is truly stable now. :)
[Nexus One Android Development] d3cryp7:
There was a few boot loop before the phone finally booted up properly.

After phone booted up successfully, I did a shutdown and power on again.

Phone booted up but hang at Preparing SD card.
[Nexus One Android Development] intersectRaven:
Was the previous one more stable than the latest for you?
[Nexus One Android Development] d3cryp7:
So far all the kernels have been the same for me. A few boot loops and the phone booted up properly. Do a reboot, the phone hang at boot animation. Did a few "remove battery and put it back" to reboot the device. Still hang at boot animation. Have to revert to CM6 kernel.
[Nexus One Android Development] minooch:
Downloading now - Hopefully you won't hear from me for a little while :)
[Nexus One Android Development] intersectRaven:
I see. AVS may not really be for you then. :(
[Nexus One Android Development] THATTON:
Nevermind... Figured it out
[Nexus One Android Development] intersectRaven:
Since not that many are having problems (since there aren't that many problematic posts), I'll go back to updating this and mark AVS as partially fixed and depends on the N1. :D
[Nexus One Android Development] madj42:
I had an issue with the latest kernel posted. It did an infinite boot loop on the first boot and then on the second time it kept crashing at the unlock screen. I needed to use my phone so I restored from a backup. Later I'll try and get the kmsg to see what's going on.
[Nexus One Android Development] sirtrini:
So far the latest kernel has been stable for me. Had one reboot when I went into SetCPU, but other than that its been stable so far (approx 8 hours).

Thanks!
[Nexus One Android Development] minooch:
Well,

It's been 17 hours since I flashed the new kernel - Not even 1 problem to report. :D

My only concern is, you mentioned that you removed the "irritating message" about AVS not doing anything without the regulator being present? I never got that message on the previous kernel (& obviously this one) - Is that good or bad?

Cheers,

Minooch
[Nexus One Android Development] intersectRaven:
Unless you used adb shell cat /proc/kmsg > kmsg.txt and viewed the resulting text file, you really won't see it in the previous ones. It will only appear at the very beginning of the kernel loading. :)
[Nexus One Android Development] minooch:
I guess that its all good then :)
[Nexus One Android Development] intersectRaven:
Now to work on other things such as 720p and such. :) I'll also put audioboost since I forgot to put it in. :)
[Nexus One Android Development] minooch:
720p would be nice :)

To be honest, I didn't even notice that the audio wasn't in :o