yashsingh1/xdaforums huggingface dataset:
[Galaxy 3 Android Development] Dharam_Maniar:
thanks for the comparison...as you see the 3d is improved...

the bus clock depends on the main freq, and cannot be controlled manually right now...

maybe in future i will try something to make it possible to change via the app...
[Galaxy 3 Android Development] NishantM:
Flashed 1.7 Ultimate today morning. Phone has absolutely no freezes at all, using 200-1200Mhz ondemand. Great kernel indeed! Thanks again Dharam! From 1.6, your kernel has become very stable.

Will surely try out multiboot when I get enough time to do it :o.
[Galaxy 3 Android Development] radek.god:
And what about 1400 MHz version ? 1.6 Extreme crashed within 5 mins, but fugumod 1366 works great over 12+ hours , then I closed stability test ...
[Galaxy 3 Android Development] ilievski.ace:
Hi i am on Kyrillos' ROM v7.1 and i have update your Kernel 1.7 ulimate and again not showing the temperature on palmary Weather .....

about a week i have instal the FuguMod Ultra | OC -> 1366MHz + 1% Battery MOD + Voodoo Sound and it was ok

can you fix this problem ???

Thanks love you work :)
[Galaxy 3 Android Development] NishantM:
For me, Fugumod Ultra never worked, phone used to hang as soon as booted. Have tried different ROMs with Fugumod Ultra, but same result. Therefore, I have dropped trying out high OC kernels, so I've never tried extreme versions of G3Mod too :o.
[Galaxy 3 Android Development] Dharam_Maniar:
I dont think that is a kernel problem...
[Galaxy 3 Android Development] ilievski.ace:
It Is because i know i have triad several times
[Galaxy 3 Android Development] Dharam_Maniar:
how can an app not working properly be a kernel problem??

I dont really understand...maybe you can help me debug where the problem stands ? :)
[Galaxy 3 Android Development] ilievski.ace:
i will install now the ultimate version and i will show you

on the picture .

in a second i will show you the picture from it is working whit weather

and hire it is whit FuguMod Ultra | OC -> 1366MHz
[Galaxy 3 Android Development] psiva2010:
Hi dharam

I had little battery drain in 1.7 and Im not interested in multiboot so I back to 1.6 is it possible to implement dynamic oc in 1.6?.

Siva
[Galaxy 3 Android Development] psiva2010:
Battery Drain in 1.6

Hi Dharam,

I have installed 1.6 Yesterday night and charged upto 100%, Today morning I started using my phone browse xda app on threads for 30 mins my battery still 100%:D and screen off phone and after 10 mins while on the screen suddenly battery drains rapidly upto 93%:eek: after 93% no drain, works pefect. :)

I had the same problem second time.

Can you please Investigate this.:cool:

Siva.
[Galaxy 3 Android Development] Dharam_Maniar:
Well see from 1.6 to 1.7 i havent touched the battery driver...so drain should be same for both...just let some cycles pass on 1.7 and it should become ok...i know the battery driver sucks...
[Galaxy 3 Android Development] hillbeast:
I think in v2.0 the battery driver is gonna need a major reworking. I know a little about programming. I can read the syntax of C and C++. Would you like some help with it?
[Galaxy 3 Android Development] Dharam_Maniar:
https://github.com/dharamg3/G3MOD/tree/master/Kernel/drivers/power

s5p6442_battery.c and s5p6442_battery.h files are the battery driver files...check it out and let me know...we can try out different stuff as well....
[Galaxy 3 Android Development] Dharam_Maniar:
http://www.facebook.com/groups/250493751637407/

Join this group on facebook for live support regarding G3MOD Kernel.​
[Galaxy 3 Android Development] ron_gangte:
I'd Appreciate It if you could look into the drivers! :)
[Galaxy 3 Android Development] ron_gangte:
That's nothing compared to the battery drain I experience!! :D

My Battery Drain is awfully dreadful! But well, having said that, it probably is due to some other reason and not the kernel.. :/
[Galaxy 3 Android Development] pante5:
Man, best kernel EVA :D thx ;)
[Galaxy 3 Android Development] hillbeast:
Looking at the code, it looks needlessly complex for such a simple task. I don't get why I needs to define so much about levels and such. It should just be able to do it based on a formula, ie: MAX = 4200, MIN = 3500 and then using (MAX - MIN = 700 = RANGE) and the current level (let's say 3850) which would equate to CURRENT - MIN = 350 = CURRENTINRANGE then we take (CURRENTINRANGE / RANGE) * 100 = BATTERYLEVEL = 50%.

That's my theory on how it should look, not all this nonsense about specific areas having specific percentages. We can then take into account the COMPENSATION_VIBRATOR and such to get more accurate figures.

EDIT: I just compared my formula to my battery levels on my phone right now. My battery is at 80% and it says 3896mV, however my formula says I should be on about 50% (assuming MIN = 3590 as defined in the s5p6442_battery.h). This actually sounds right to me because I always found it odd my phone stays above 80% for ages, and then it starts dropping the percentages really quickly after 80%.
[Galaxy 3 Android Development] Dharam_Maniar:
well, i tried that method, but i got a problem with it that the phone got switched off at 30%...maybe it was because i had disabled the compensation also...

want to give it a try ?
[Galaxy 3 Android Development] hillbeast:
I will give it a go. I'm not sure how successful I will be. I'll download your sources from Github and adjust them.

EDIT: Also perhaps it was turning off at 30% because the minimum voltage level was too low?
[Galaxy 3 Android Development] Dharam_Maniar:
you can build a kernel? or if you want, paste me the code over here,i'll build it, upload it here and we can both test the zImage...
[Galaxy 3 Android Development] hillbeast:
Yeah I read your guide on building kernels and built the Samsung stock kernel from the sources, but never tested it as I was too lazy :P.

Also is this the code for returning the battery level or am I looking in the wrong place:

static int s3c_get_bat_level(struct power_supply *bat_ps)
{
int fg_soc = -1;
int fg_vcell = -1;

if ((fg_soc = fg_read_soc()) < 0) {
dev_err(dev, "%s: Can't read soc!!!\n", __func__);
fg_soc = s3c_bat_info.bat_info.level;
}

if ((fg_vcell = fg_read_vcell()) < 0) {
dev_err(dev, "%s: Can't read vcell!!!\n", __func__);
fg_vcell = s3c_bat_info.bat_info.batt_vol;
} else
s3c_bat_info.bat_info.batt_vol = fg_vcell;

// printk("----> battery : s3c_get_bat_level : fg_soc : %d fg_vcell : %d\n", fg_soc, fg_vcell);

if (is_over_abs_time()) {
fg_soc = 100;
dev_info(dev, "%s: charging time is over\n", __func__);
s3c_set_chg_en(0);
s3c_bat_info.bat_info.batt_is_full = 1;
goto __end__;
}

if (fg_soc > 80) {
fg_soc += (fg_soc - 80) * 2;
if (fg_soc > 100)
fg_soc = 100;
}
#ifdef __CHECK_CHG_CURRENT__
if (fg_vcell >= FULL_CHARGE_COND_VOLTAGE) {
if (s3c_bat_info.bat_info.charging_enabled) {
check_chg_current(bat_ps);
if (s3c_bat_info.bat_info.batt_is_full)
fg_soc = 100;
}
}
#endif /* __CHECK_CHG_CURRENT__ */

#ifdef __CHECK_RECHARGING__
check_recharging_bat(fg_vcell);
#endif /* __CHECK_RECHARGING__ */

__end__:
dev_dbg(dev, "%s: fg_vcell = %d, fg_soc = %d, is_full = %d\n",
__func__, fg_vcell, fg_soc,
s3c_bat_info.bat_info.batt_is_full);
return fg_soc;
}
[Galaxy 3 Android Development] hillbeast:
Why exactly is there two static ints for s3c_get_bat_level? One at line 389 and the other (1% mod one) at 581?
[Galaxy 3 Android Development] Dharam_Maniar:
its samsucks code...ask them y :p

just kidding, wait let me check out...you coming to IM ?
[Galaxy 3 Android Development] hillbeast:
Yeah I added you. I just had to download Google Talk. I haven't touched it in years.
[Galaxy 3 Android Development] bane21:
first of all - great kernel - thanks

second:I had a drop in my battery this morning from 53% to 23%. Wenn I pluged the phone via USB into the computer it started charging from around 50%. No idea what that means.
[Galaxy 3 Android Development] hillbeast:
Yeah Dharam and I are taking a good look at the battery drivers. They clearly aren't calculating the battery levels correctly.
[Galaxy 3 Android Development] ron_gangte:
Critical Battery ISSUE!!!

Can someone help me troubleshoot my battery issue??

I tried calibrating.. but it doesn't seem to work.. no matter how many cycles are done.. it still stays the same..

My battery drains out and my phone switches off within a few minutes and sometimes even in a few seconds when the Data Connection is ON.

But without Data Connection ON.. the battery seems to drain comparatively lesser and lasts for about 5 hours after very less usage..

And, I have observed that with the data connection ON, and keeping the phone on stand-by (i.e. Without using the phone and keeping screen off), the battery seems to stay at 100% for over 2 hours. :O ..and the very instant, I start using the phone, it switches off saying that the battery is low... :/

I would really appreciate it if someone helps me troubleshoot this issue.

Thank You!!

God Bless!

Ron Gangte
[Galaxy 3 Android Development] hillbeast:
Have you tried erasing battery stats in CWM?
[Galaxy 3 Android Development] ron_gangte:
Yes, I did..

I have tried different kernels and different governors too.. didn't help.. :/
[Galaxy 3 Android Development] fuxmen:
Did You think that maybe something is bad with Your battery?
[Galaxy 3 Android Development] ron_gangte:
I did think so.. but then, if it was so.. it wouldn't cause extra battery drain with Data Connection ON.. and how will you explain the less battery drain when screen is off..? :'(
[Galaxy 3 Android Development] Dharam_Maniar:
well, but if data is not on, it doesnt drain...
[Galaxy 3 Android Development] hillbeast:
Get Titanium Backup, backup your data and apps, do a factory reset, and restore your data and try it then. Keep it plugged in until it's at 100% and then don't plug it back in until it's so dead it won't turn on. Even if you have to sit there benchmarking for hours on end to drain the battery, do it.
[Galaxy 3 Android Development] ron_gangte:
Well.. I did reflash a couple of time to see if it helps, but sadly, it didn't.. :(

And yea.. I tried to empty the battery completely.. it just doesn't.. every time I tried to switch my phone on.. it did.. :eek:

...and I kept switching it on and it turned itself off at the homescreen.. I kept doing that for a LONG LONG time.. :/ ...after a while, some of the apps started FC'ing!! :/

:confused::confused:
[Galaxy 3 Android Development] hillbeast:
Sounds like the phone thinks it's flat but it's not. It seems like the calibration is completely broken. Did you erase the battery stats from CWM and while the phone was at 100%?
[Galaxy 3 Android Development] hillbeast:
Ugh... Every time I compile the kernel, nothing happens. It just refuses to boot on the phone even when I just compile it exactly from the sources. Y U NO WORK LINUX KERNEL?
[Galaxy 3 Android Development] i_rnb:
i m havin d same prob.. but for me wiping batt stat via cwm dsnt show any confirmation.. ie wen i select yes i feel i m returned to the menu & the writing dsnt show any "battery stats wiped" like confirmation..
[Galaxy 3 Android Development] ron_gangte:
Don't remember. But I Think I Did. :/
[Galaxy 3 Android Development] hillbeast:
Did you use the battery test kernel a few kernels back?
[Galaxy 3 Android Development] ron_gangte:
Yes.. I tried the "Ultimate" Battery Test version.
[Galaxy 3 Android Development] hillbeast:
I had similar problems for a while after using that kernel and I had to do a full factory reset on my phone and it came right again after a few cycles. I'm not sure why that isn't fixing your phone though...
[Galaxy 3 Android Development] ron_gangte:
:/

One thing I am pretty sure about is it's not the battery that is at fault.. it's a calibration issue. Something has made my battery calibration ridiculously haywire!

Will try flashing again and let you know what happens after a few cycles.

Thanks for the replies! :)
[Galaxy 3 Android Development] cdesai:
Are you sure it compiled properly?

Do u get a ~4mb zImage

Maybe your fs are converted to something other than rfs

Convert all to rfs and retry

Try it on a stock rom with no mods
[Galaxy 3 Android Development] hillbeast:
I have no idea if it compiled correctly. The zImage is roughly the same size as the one Dharam compiled (6.3MB). My filesystems are EXT2/4 I believe.

And I tried stock to no avail but now that you mention filesystems, it makes me think when on stock that was why it won't work. It doesn't explain why G3Mod won't work though. I'm not concerned if I can't get the stock kernel to compile. I just want to get the kernel I'm wanting to work on to compile.
[Galaxy 3 Android Development] radek.god:
no root

1.7 extreme tested as unusable, it hangs even 1300/1400 , 1366 Fugumod works stable 12+ hours ---
[Galaxy 3 Android Development] hillbeast:
What? It is rooted.
[Galaxy 3 Android Development] TheCreat:
I have a note about battery depletion for you two working on the battery driver. I do assume you already know this, but just in case you don't here it is:

Battery depletion isn't linear. If 20% of the energy is used, the voltage doesn't drop by 20% (inside the valid range). After charging, the first bit of useage drops the voltage a relatively large amount. Then it stays roughly the same, dropping just slightly until at some point the voltage drops rather rapidly. This is why the battery driver uses tables (or rather a list of known constants, but see below).

To give you an idea how the voltage curve generally looks like have a look at these google image results.

There is a good reason why it isn't calculated every time. It might seem complex to you, but since the values (min, max, range, ...) are known in advance it's easy to calculate them in advance and hardcode them into the source code. Calculating these values every time the state is queried (which I guess is rather often) would also result in a calculation every time. You even have a division (by something other than a constant divisible by 2, which the compiler would optimize as a bitshift), which is relatively expensive. There is just no need for this...

(keep in mind that the processor in our beloved G3 isn't exactly rocket fast... even running at 1400 MHz it isn't even remotely comparable to a desktop CPU at that same speed!)

But what's more is these values represent the non-linear nature of the voltage drop, which would me much more complex to implement as a single formula.
[Galaxy 3 Android Development] nathan.lopes:
I'm facing calibration/battery percentage issues too.

I'm on 1.7 Ultimate.

I did all I should do to make it works (drain all battery, clear battery stats, wait for a few cycles) and nothing solves it.

Battery is draining too fast and the percentage shown on status bar is wrong.

I'm pretty sure about that because yesterday I was using my phone and it was showing that I still had ~30%. But, suddenly, it became pretty laggy... It was because SetCPU profile for low battery (under 6%) was active, and clock was set to 400mhz. I rebooted and then battery icon showed 5%.

And early, phone shutted off when I had still 27%. I rebooted, and it showed 3%.

You said that you didn't touch battery driver since 1.6. And it was awesome, perfect battery driver. What could be happening, since a lot of users are posting issues like that?

Thank you for all! Your kernel ROCKS!
[Galaxy 3 Android Development] radek.god:
I had to clear data for superuser.app , then rooted again :-)
[Galaxy 3 Android Development] eduardoturconi:
dharamg, could be only the battery driver that has issues?

Couldn't the code has, in another file, anything related to battery use that could cause this problems?
[Galaxy 3 Android Development] Dharam_Maniar:
yes, i am sure it is the battery driver only...I'll try to recode the battery driver completely this weekend :)
[Galaxy 3 Android Development] eduardoturconi:
The problem is that battery driver causes real drain, or does it show wrong values, or does it doesn't charge completely the phone?
[Galaxy 3 Android Development] Dharam_Maniar:
all the above can be a problem...I'll have to rework...please wait for sometime :)
[Galaxy 3 Android Development] Godyn:
Hey fellows,

thanks for the superb work, but

there's a bug,

the battery status is not updated correctly updated, it stays at the % from when it was started up.

OW, never mind :-D

I see others have it to :-)

Keep up the good work.

Q: can I downgrade easily???
[Galaxy 3 Android Development] moikop:
To downgrade you'd only have to flash an older version through Odin or CMW. Nothing else :)
[Galaxy 3 Android Development] dilzo:
I really want an oc bus is it going to happen anytime soon as I'm missing out on slot of stuff being on v1.3.0
[Galaxy 3 Android Development] hillbeast:
I know where you're coming from with this, however the way they are doing it takes several CPU cycles (like at least 10-20) to calculate a single number that isn't even accurate. My formula should be able to do it in 3-5 cycles. That means that even if all the kernel wants to do for a second is calculate battery drop, it can do it millions of times a second. The formula they use is just weird. It works it out differently for different voltages, and it just isn't a linear drop that way. The voltage itself drops in a linear fashion, but the percentage doesn't.

I am currently trying to get this formula to work and get the kernel to compile so I can test my theory.

The main issue with OC bus was that it was causing sound clicking on a lot of peoples phones. It never happened to me, but a lot of other people experienced this and Dharam had to take it out. He can do it, it just causes issues for people. Once I get the battery sorted, I will help him figure out this I think because I want it too.
[Galaxy 3 Android Development] TheCreat:
Yes that is precisely the point! Batteries behaves differently depending on their current voltage level (and a couple of other things, but let's keep it simple). Haven't you looked at the link I gave? Just do a google image search for "battery discharge curve" (without the quotes), that is how a battery's voltage behaves over time when discharged.

Basically, a full battery will experience a much smaller voltage drop than one at half capacity let alone an almost empty one. That's why the linear mapping you propose makes little sense.

What Samsung is trying to do (even though they've obviously missed the 'perfect'-mark by quite a bit) - and probably every other phone maker as well - is adapt non-linear voltage drop to a seemingly linear percentage display. If it shows 90% I should be able to use it for about 10 times as long as I already have if I keep my use constant. If it shows 50% I'll have about as much time left as it's been since I've last charged it.

If you implement the linear mapping of voltage to percent you proposed, it will mean that in the first hours of usage the bar will show 9x percent, probably for quite some time. Then drop more or less constant to about 50-60%, at which only about 15% of the charge is actually remaining, the phone will shut off in a couple of hours!

That means if I decide not to charge my phone because it's still at 70% and I have spotty network coverage (meaning staying connected takes more power) there is a decent chance it will be empty by the morning, the alarm won't go off and I'll sleep till noon ;)

Hope I made the point I wanted to make clearer this time :D

Still: if you can find a better way to map the voltage to percentage which better represents how much

time

I have actually left (usage wise), that would be great!
[Galaxy 3 Android Development] hillbeast:
Yeah I get what you're saying. What that will require is a logarithmic scale, which again, will just require a slightly longer formula. Yes it's a big formula but it's still much simpler than the way Samsung did it. They did it based on certain areas of the battery life such as 80-100% and 60-80% and as a result you get unpredictable stuff going on. I'm going to have to test it and see how linear the voltage drop is and figure out a scale based on that.
[Galaxy 3 Android Development] rahul.oberoy:
heyyy thanx dude ... but hw to enable the 5 Touch Support???????????
[Galaxy 3 Android Development] hillbeast:
It's already on. You don't have to enable it.
[Galaxy 3 Android Development] Rapier07:
@dharam

I'm getting freezes on v1.7

Tried 200-800 onDemand as well as performance..

The device doesn't wake up after its kept idle for a while..

Any solution?
[Galaxy 3 Android Development] Dharam_Maniar:
U have UV?
[Galaxy 3 Android Development] Rapier07:
Nope..the regular

M using 1.7 ultimate
[Galaxy 3 Android Development] :
This happened on my phone too. Only on 1.7 without UV.
[Galaxy 3 Android Development] Jai-tulip:
awsome kernel..\\//

Flashed g3mod 1.7 ultimate.The kernel is awesome no freezes on my phone.:p

but when in multiboot i cant back up my stock froyo rom. i get following error

E:can't mount /dev/block/mmcblk0p1(or null)

(no such file or directory)

can't mount /sdcard :eek::eek:

can you explain it?:confused:
[Galaxy 3 Android Development] Dharam_Maniar:
hmm, check your sdcard...is it properly working otherwise ?
[Galaxy 3 Android Development] cool.darshak:
Finally i can roam around without charger ...thanks dharam battery life is great even with data connection on :-)

Edit: typo :-D
[Galaxy 3 Android Development] i_rnb:
dara connection..!! lol.. :D
[Galaxy 3 Android Development] Gurjot95:
First of all thanks for awesome kernel and all the hard work you put into it. I am using your V1.7 ultimate but I am constantly getting freezes, lags. It's hardly usable. It's restarting, hangs all the time. I tried to post this via mobile but was not able to write because of lag. Back to V1.6 now.
[Galaxy 3 Android Development] Jai-tulip:
yes.. my card is working fine.playing music stored in sd card as i type..
[Galaxy 3 Android Development] mankokoma:
accidental double clicks

Hi Dharam,

meanwhile my home button loves to make accidental double clicks :mad:

So when I changed the ROM in multiboot and wanted to backup the last used one, it went into the wrong folder... I'm lucky, so nothing was overwritten, but could you implement a "do-you-really-want-to-backup-in-this-folder"-thing?

I know your next kernel will have to wait and I think, last one is near to perfection. Just wanna make a suggestion and I can imagine that maybe others will complain about this idea.

Looking forward to your next ROM also!!!!
[Galaxy 3 Android Development] Dharam_Maniar:
Yes got your point. :)

Noted Down ;)

Will be done :D
[Galaxy 3 Android Development] manish19:
Freeze....

Hey Dharam,

Great job with the kernels. Just want some help. i'm using V1.7 ultimate with kyrillos V7. everything happens to work fine but the phone freezes sometimes and I have to reset.

CPU freq is set at 800-200 on-demand. what should I do. please help.

afer installing the kernel, i had wiped data and factory reset.
[Galaxy 3 Android Development] Rapier07:
Seems like many users are experiencing the freezes with 1.7, any ideas dharam ?

Meanwhile I've flashed 1.7 Performance.. Will report how it goes...
[Galaxy 3 Android Development] Dharam_Maniar:
did you check with any other ROM?

@all: those of you who are getting freeze's with 1.7 please try out with another ROM also... :)
[Galaxy 3 Android Development] i_rnb:
i wld suggest to use adw launcher..!!
[Galaxy 3 Android Development] NishantM:
I'm on G3Mod Ultimate 1.7 with SetCPU configured as 200-1200 Ondemand without UV from the last two days, will absolutely NO freezes. Except sudden battery drop, no issues at all. I'm using Kyrillos ROM 7.1.
[Galaxy 3 Android Development] FadeFx:
Dharam, can we somehow configure or disable compcache? I'd like to test something...

----------------------------------------

tapatalked
[Galaxy 3 Android Development] KSLevel11:
+1

I don't have a SWAP partition but if I type "free" in terminal emulator, in swap line there aren't zeros...like SWAP/compcache is working.

But, is compcache is able to work without swap partition?
[Galaxy 3 Android Development] Dharam_Maniar:
I dont know if there is any method to disable compcache through phone...

if you'd like to test something, i can make a kernel without compcache and give it to u...