yashsingh1/xdaforums huggingface dataset:
[Nexus S Android Development] :
Okay, on general release: v1.2 http://d-h.st/FUW

-Stable

-800MHz DI code fixed

-Adds BLD

-Increased system timer from 256 to 512Hz

-Fixed config to sort a graphics issue I was having

AnTuTu Public Health Advisory!

Be aware that this app (and so possibly others) will kill deep idle. This is especially a problem with my kernel, because after DI stops working, my 800MHz fixed step will use extra battery, if you are playing music or doing anything else with the screen off. You can always reboot, or temporarily turn DI off if you find it has failed.

I can't fix this until I learn how to debug! If and when I find which check is failing, I can set a flag to automatically disable my 800 MHz tweak. Until I can do this, I recommend checking all your regularly used apps to make sure they don't kill DI. And please name-and-shame if you find any.
[Nexus S Android Development] Randomwalker:
Do you really see the 800MHz as battery killing? I used to run T144 on performance for some time and got about one day's worth out of a full charge, thanks to way over 90% deep sleep. Just being curious.
[Nexus S Android Development] :
Sort of. It'll be fine really, it'll just use battery slightly faster. It's like the opposite of what I'm shooting for. :p
[Nexus S Android Development] alen1901:
Whats this system timer thing which is increased? :D

And i dont understand correctly, DI 800mhz fails with cm9 and kalims kernel/DI thing too?

Sent from SpeedMachine i9023
[Nexus S Android Development] :
So, after playing about with deep idle for a while, I just can't get it stable on my device, at all. It's fine until it suspends, then it locks up and reboots. No matter what I tried, I couldn't get it to reliably work, so I stopped attempting to fix it, because it's clearly not reliable, which is likely why it wasn't implemented by Samsung. I'm not going to waste any more of my life on it.

I did actually manage to capture an oops trace though, here, the first one I've managed to get. I'm not sure what exactly is going on but it looks as if deep idle is interfering with suspend, or perhaps racing with suspend, as I've had the log end at the beginning of the suspend on several occasions.

I did fix one thing in deep idle though, there was an incorrect use of mutexes while running in an atomic context. Mutexes can sleep, and sleeping is not allowed when we are running in an atomic context. So, I replaced the mutexes with spinlocks which don't sleep and fixed the issue.

Apply the patch with the following command to retain authorship:

curl [url]http://pastebin.com/raw.php?i=2Z3Ce9HZ[/url] | git am

---------- Post added at 12:06 AM ---------- Previous post was at 12:04 AM ----------

Won't make any difference if the device is suspended the majority of the time as the CPU is power gated so the frequency is irrelevant.
[Nexus S Android Development] alexdemonumber3:
So what's with the red frame flash I keep seeing? Lol nice kernel though, still testing but so far, so good!

Also, where is the info on the DI 800mhz state? Thanks!
[Nexus S Android Development] cdljl2005:
BLN Advanced Feature Request

If someone posted it before or this post is bothering you... plz just ignore it...

Bedalus could you please adding possibility for us to modify BLN blinking ON/OFF time ourselves?

Well I'm kinda in fond of the old Nokia pulse-style blinking way...

A lot of thanks for you for providing me my favorite kernel on JB!
[Nexus S Android Development] technogravy:
This attitude is exactly what I was talking about, I certainly am an 'aspiring developer' noob, and you set a great example..

(Btw the only reason I traded the NS was because I fried my LCD. I could have easily got a year more with super dev support like yours.)
[Nexus S Android Development] 19venom89:
had 3 reboots on the latest 4.7 for cm10 nightlies from 19th sep
[Nexus S Android Development] infernalMan:
i've asking the same and bedalus was answer in just 1 last page before.

use nstools to set led timeout.
[Nexus S Android Development] Articudos:
Sleeping beauty;)
[Nexus S Android Development] thehulk1969:
What ROM bud?
[Nexus S Android Development] alen1901:
Easy to sleep in airplane mod. On v4.5 i had no blue line for phone awake. 8hours of sleep and no awake line. And thats without airplane mod. :cool:

Sent from SpeedMachine i9023
[Nexus S Android Development] doc_v15:
had 2 reboots after 2hrs installing the 4.7 for other roms

Using MIUI US 2.9.21

Will fixing permission fix it?
[Nexus S Android Development] Articudos:
Rasbean jelly sep22, marmite v4.7,

my addon, personal tweaks:)

Blue line: I listened to music;)
[Nexus S Android Development] :
I would actually ignore NSTools for setting BLN if possible. Learn to use an init.d script instead! There are some settings with my version of BLN that you can't adjust with NSTools. Also, I think NSTools seems to have a strange ability of resetting the minimum frequency from 100 to 200 MHz, which is bad for battery. There's a guide to doing it by JokerAce linked in the OP. There's also a list of settings for BLN in the OP.

However, I was considering adding 'modes' for BLN, which would be settable by a further value: blink_mode

Mode 1: Blinking on and off

Mode 2: Blinking time starts fast and gets slower

Mode 3: Blinking time starts slow and gets faster

Mode 4: Blinking time starts slow, gets fast, then slows down again.

I could also add a blink_speed for fast, medium, and slow blinking.

Adding this code won't make any difference to anyone who has already set up an init.d script, as I'll set the default to Mode 2, and medium speed.
[Nexus S Android Development] :
I think using unstable roms like the miui weekly and cm10 nightlies is the cause. Try their stable versions. (actually I'm not sure if miui has released a stable jb ROM yet) But feel free to upload a last_kmsg if you can!
[Nexus S Android Development] infernalMan:
that would be great bedalus :good:

waiting for that :D
[Nexus S Android Development] alen1901:
Why adding this, isnt the normal blink which is present enough? Its not like this is must have. I dont even use blink, just lights up. I am more interested in bln fade, can we make lights fade? Like giving them low energy, than increasing. Or we have hardware limitations?

Sent from SpeedMachine i9023
[Nexus S Android Development] cdljl2005:
tried, but no use for me...
[Nexus S Android Development] sperelli:
I find the idea worth a try!

Please consider inserting the possibility to have the lights on even after smspopup/whatssapp-popup unlocks the screen;

i.e. for example UNTILL one cancels the notification (sms/whatsapp/missedcall),

and not simply as soon as the phone unlocks the screen.

Consider the smspopup: when it is set to unlock the phone, automatically

lights turn off once the smspopup is displayed and the telephone locks itself again.
[Nexus S Android Development] thehulk1969:
Can only find nexus s 4g link.....do you have the nexus s link handy..
[Nexus S Android Development] :
Hardware limitation. In the i9023 it's possible to control each LED separately, but not in the i9020. Also, there is no power control for the LED, only ON or OFF, so unfortunately, fade is not possible.

Unfortunately, this would need to be implemented in the ROM. The kernel is only told if there is a notification, not what type.
[Nexus S Android Development] Maximilian Mary:
He has provided the possibility for us to modify it ourselves: https://github.com/bedalus. Instructions are in post # 3
[Nexus S Android Development] :
v4.7.1 is here: http://goo.gl/HvUrp

-Merged in some wifi stuff from android-3.0/common

-BLN Modes

New BLN settings:

http://xdaforums.com/showthread.php?p=31886929#post31886929
[Nexus S Android Development] alen1901:
So, you are saying, you can make bln pattern to blink slide? I mean, back key lights up, than when it lights down, menu key lights up at the same time etc. Like a wave? That would be cool, but not needed that much.

Sent from SpeedMachine i9023
[Nexus S Android Development] micha3lvd:
Blinking is already possible with BLN control, but not wave =]

Free version:

https://play.google.com/store/apps/details?id=neldar.bln.control.free&feature=search_result

Pro version:

https://play.google.com/store/apps/details?id=neldar.bln.control.pro&feature=search_result
[Nexus S Android Development] :
Yeah, but only for i9023
[Nexus S Android Development] :
Forgot to say, this may not be stable! The last time i meddled with this code i caused a wakelock issue. I was much more wary of that this time so hopefully there will be no problems, but keep your eyes peeled for odd behaviour!
[Nexus S Android Development] :
The download link in the post above will take you to a spreadsheet with all versions
[Nexus S Android Development] niteh@wk:
After a day of testing 4.7, I'm going back to 4.4. On 4.7 the phone lags badly right after waking up with Android System using high cpu. Not sure if that's related to the phone waking up from deep sleep. 4.4 has been very stable and running smooth for me. I'm at work now but will probably look more into testing 4.7 tonight.
[Nexus S Android Development] zbiecik:
In 4.7 there are random restart and wake problems. It helps to just remove the battery. AOKP Rom.

Wysyłane z mojego AOKP
[Nexus S Android Development] melvinchng:
Nope... but it never happened in 4.6... strange... I've it disabled it now... and I don't have Google map installer and disabled Google now.

Accidentally sent from my Google Nexus S
[Nexus S Android Development] :
See if you can get a last_kmsg if it happens again!
[Nexus S Android Development] sperelli:
ok then, assume the notification comes and light is on.

why is the notification cancelled if a popup shows with screen unlocked?
[Nexus S Android Development] :
I haven't seen the code, but my guess is that whoever designed the pop-up decided that if you've got the screen on, you must have seen the message, so there is nothing to notify you about. I'm not saying this is right, but it's not something the kernel has control over.

I have my own personal grievance with notifications. Did you know that if you get a notification while the screen is off, that if it times-out, then you later receive another notification, the LEDs will not light up? It seems a little unfair that a sound can happen every time, but the LEDs can only happen once.
[Nexus S Android Development] sperelli:
i really appreciate the intelligence you put in what you say.

and in the things you do.

in miui roms, for ex, pop up doesn't unlock the screen, simply turns it on

letting the user preview some text in notification bar, over screenlocker.

yet, who says "I" was there when the phone rang?
[Nexus S Android Development] :
Exactly, you might not be there. This is a problem with the pop-up design. It is cancelling the notification. Is there a way to turn off pop-up?

If you can't turn them off, or if you need them, then the developers need to be informed of the bug. Or, for phones with proximity sensors, they can disable pop-up if it is in your pocket, or face down.
[Nexus S Android Development] sperelli:
or if one puts the finger on lit keys..., ah?
[Nexus S Android Development] joeyddr:
Went back to smartassv2 being the default?
[Nexus S Android Development] polobunny:
No, ondemand with CFQ is the default.
[Nexus S Android Development] joeyddr:
on 4.7.1 it defaulted to smartass and cfq
[Nexus S Android Development] polobunny:
Ah maybe, I'm on v4.7 :)

Unrelated, but from what I can see from the downloads, there's a 3 to 1 All other roms vs CM nightly downloads of your kernel Bedalus. There's also less stock OTA downloads than every other category, minus CM nightly NS4G.

So all in all, if there's support that should be dropped, it's for stock OTA, no? :P
[Nexus S Android Development] :
I'm not looking to drop any support. Only if there's some experimental feature that might break something, I'll just upload the non 4G all-rom version. It saves me time with admin tasks that I can then spend on code.
[Nexus S Android Development] polobunny:
I know, but I was poking fun since you didn't think CM nightly was really worth supporting except for stables. :P
[Nexus S Android Development] cdljl2005:
Thanks, but I failed to find a post #3 following the link...:silly:
[Nexus S Android Development] sidnoit22:
Where is 4.7.1? Link? Changelog?
[Nexus S Android Development] polobunny:
Also post #3 in the first page of the thread, not in the link. :)
[Nexus S Android Development] :
He means, my source code is available. Post 3 is the third post of this thread. I wrote a guide on how to build the kernel.

You might as well wait for v4.7.2, I'm disabling a load of debug stuff.
[Nexus S Android Development] alen1901:
I think we can put code in init.d script for bln to never time out. So, keys would be lighted until you turn screen on. That was possible in ics with your kernel, not sure what code to put here on v4.7

Sent from SpeedMachine i9023
[Nexus S Android Development] :
v4.7.2 is here: http://goo.gl/HvUrp

-Disabled a load of debugging stuff

It seemed like unnecessary bloat since things appear to be working well. No last_kmsg files posted that were kernel faults since linux 3.0.43 dropped anyway. Hopefully this will save a few CPU cycles.
[Nexus S Android Development] :
The pop-up turns the screen on. That's the whole problem. It's a ROM issue, not a kernel issue. And it is possible to keep the BLN light on, just set blink_final_state to 1
[Nexus S Android Development] caliban2:
Wait a bit before making such statements... ^^

I've been getting freeze/reboots with 4.7 and cm10 a lot, and this after I did a full wipe. See the last log attached. I'm now running cm-kernel for almost 25 hours and it's still fine. I'll give it another 12 hours and if it still doesn't crash, I guess it's safe to say "it's the kernel".

(and btw, didn't i spot another last_kmsg today?)
[Nexus S Android Development] :
Haha, I was just thinking about you. I almost put (except caliban2 at the end of that post).

Somebody uploaded something a day or two ago, but it was a ROM issue.
[Nexus S Android Development] polobunny:
You have the weirdest glitches. Shoo, don't rain on our parade! :p *plugs ears not to hear*
[Nexus S Android Development] caliban2:
It's always the same glitch though...

http://xdaforums.com/showthread.php?p=31932534

Looks the same as mine. So you're sure it's a rom-bug, eh? :p
[Nexus S Android Development] polobunny:
I'm still wondering if it's not a problem with CM. Codename Android has a lot of tweaks merged from CM so it's not like it's absolutely impossible.
[Nexus S Android Development] caliban2:
Well, I think it's stable with cm-kernel. Also, there are no crash-reports in cm-thread.

Differences I've noted so far: cm-kernel has KSM. Not that I'm using it, but the option disappears with marmite.

While cm has the option for MTP, it doesn't work with its kernel. Also: 396 mb ram, camera is stable. (Just noting)

I think I'll try ondemand with marmite next and see if smartass is causing the bug. I seem to remember getting crashes that way in the past, but I'm not really sure.

KSM is mem-related though, and mem-management seems to be the bugger here.
[Nexus S Android Development] :
I'm looking at it now. Here's some of the stuff from the backtrace:

SGX2DQueryBlitsComplete
KM: Ops pending. Start polling.
SGX2DQueryBlitsCompleteKM: Wait over. Blits complete.
SGX2DQueryBlitsCompleteKM: Timed out. Ops pending.
SGXContextSuspend: Failed to submit context suspend commanddrivers/gpu/pvr/sgx/sgxkick.c
SGXDoKickKM: Invalid CCB offset
SGXDoKickKM: SGXScheduleCCBCommandKM failed.drivers/gpu/pvr/sgx/sgxtransfer.c
SGXSubmitTransferKM: Invalid CCB offset
SGXSubmitTransferKM : Same src synchronized multiple times!
SGXSubmitTransferKM : Same dst synchronized multiple times!

So it looks like the PVR driver. There was some GPU stuff in the recent code bump. You might try using a ROM that's got the new _r6 source, see if the problem goes away.
[Nexus S Android Development] qu3becker:
Codename Android 3.6.0 is based on the last source. So, I guess Google or CNA didn't fix it or something else but I'm no dev.

Today, my phone froze while typing a SMS. I'm using SwiftKey keyboard and it froze when tapping on a word suggestion. I thought it might be related.

Sent using Kirby's Warp Star.
[Nexus S Android Development] :
Your last_kmsg slipped past me for some reason, but I'm reviewing it now.

EDIT: Yep, PVR bug again.

Can I just check, did both of you update your bootloaders?

EDIT2: Check your bootloaders are up to date, but I did find a difference between kalimochoAz's source and mine:

https://github.com/CyanogenMod/android_kernel_samsung_crespo/tree/jb/drivers/gpu/pvr/sgx

https://github.com/bedalus/marmite/tree/bedalusv4.7/drivers/gpu/pvr/sgx

So I'll have a little compare, and see what sticks out.

EDIT3: There's no difference.
[Nexus S Android Development] caliban2:
where'd you get this from? it ain't in my kmsg... :confused:

Jup, latest bootloader.

I just noticed that trouble seems to start at boot already:

[ 2.658149] ------------[ cut here ]------------
[ 2.658309] WARNING: at drivers/gpio/gpiolib.c:101 gpio_ensure_requested+0x58/0x114()
[ 2.658452] autorequest GPIO-195
[ 2.658527] Modules linked in:
[ 2.658675] Backtrace:
[ 2.658844] [<c003b440>] (dump_backtrace+0x0/0x10c) from [<c0518e70>] (dump_stack+0x18/0x1c)
[ 2.658988] r6:00000065 r5:c0202874 r4:e7837da8 r3:00000000
[ 2.659425] [<c0518e58>] (dump_stack+0x0/0x1c) from [<c0059b80>] (warn_slowpath_common+0x54/0x6c)
[ 2.659515] [<c0059b2c>] (warn_slowpath_common+0x0/0x6c) from [<c0059c3c>] (warn_slowpath_fmt+0x38/0x40)
[ 2.659659] r8:00000001 r7:000000c3 r6:00000000 r5:c070f178 r4:c075b824
[ 2.660086] r3:00000009
[ 2.660310] [<c0059c04>] (warn_slowpath_fmt+0x0/0x40) from [<c0202874>] (gpio_ensure_requested+0x58/0x114)
[ 2.660453] r3:000000c3 r2:c066f0e0
[ 2.660682] [<c020281c>] (gpio_ensure_requested+0x0/0x114) from [<c0202b00>] (gpio_direction_output+0xbc/0x15c)
[ 2.660825] r7:c070f178 r6:60000013 r5:e7836000 r4:c075b824
[ 2.661270] [<c0202a44>] (gpio_direction_output+0x0/0x15c) from [<c0049a4c>] (s5pv210_setup_sdhci0_cfg_gpio+0xe8/0x118)
[ 2.661362] [<c0049964>] (s5pv210_setup_sdhci0_cfg_gpio+0x0/0x118) from [<c0517b90>] (sdhci_s3c_probe+0x26c/0x58c)
[ 2.661507] r5:e7269bb4 r4:00000000
[ 2.661796] [<c0517924>] (sdhci_s3c_probe+0x0/0x58c) from [<c02544a0>] (platform_drv_probe+0x20/0x24)
[ 2.661946] [<c0254480>] (platform_drv_probe+0x0/0x24) from [<c0253064>] (driver_probe_device+0x78/0x188)
[ 2.662036] [<c0252fec>] (driver_probe_device+0x0/0x188) from [<c0253208>] (__driver_attach+0x94/0x98)
[ 2.662180] r8:00000000 r7:00000000 r6:c06fde04 r5:c071cb74 r4:c06fddd0
[ 2.662607] r3:00000000
[ 2.662830] [<c0253174>] (__driver_attach+0x0/0x98) from [<c0252204>] (bus_for_each_dev+0x64/0x90)
[ 2.662974] r6:c0253174 r5:00000000 r4:c071cb74 r3:00000000
[ 2.663345] [<c02521a0>] (bus_for_each_dev+0x0/0x90) from [<c0252d50>] (driver_attach+0x24/0x28)
[ 2.663489] r6:e727dd00 r5:c0711ea0 r4:c071cb74
[ 2.663851] [<c0252d2c>] (driver_attach+0x0/0x28) from [<c0252a30>] (bus_add_driver+0x184/0x24c)
[ 2.663938] [<c02528ac>] (bus_add_driver+0x0/0x24c) from [<c0253740>] (driver_register+0x80/0x144)
[ 2.664089] [<c02536c0>] (driver_register+0x0/0x144) from [<c02548b4>] (platform_driver_register+0x4c/0x60)
[ 2.664233] r8:00000000 r7:00000013 r6:00000000 r5:c072a380 r4:e7836000
[ 2.664665] r3:00000000
[ 2.664894] [<c0254868>] (platform_driver_register+0x0/0x60) from [<c0020188>] (sdhci_s3c_init+0x14/0x1c)
[ 2.665051] [<c0020174>] (sdhci_s3c_init+0x0/0x1c) from [<c0032488>] (do_one_initcall+0x11c/0x184)
[ 2.665142] [<c003236c>] (do_one_initcall+0x0/0x184) from [<c0008ad4>] (kernel_init+0xe8/0x18c)
[ 2.665294] [<c00089ec>] (kernel_init+0x0/0x18c) from [<c005d450>] (do_exit+0x0/0x71c)
[ 2.665436] r5:c00089ec r4:00000000
[ 2.665671] ---[ end trace 0ff8a568c97959e0 ]---
[Nexus S Android Development] alen1901:
I have newest bootloader and i dont have that kind of reboots, CNA 3.6.0. I didnt have problems before with it. So, some strange things happening here

Sent from SpeedMachine i9023
[Nexus S Android Development] caliban2:
Have you ever reached more than 20 hours without a reboot? Looks like that's the critical time frame for me.
[Nexus S Android Development] :
Okay, compared with kalim's source, and there's no difference in the driver.

Caliban2, how I got that info: http://www.armadeus.com/wiki/index.php?title=Oops,_Linux_crashes

I'll have a look at the backtrace you just posted
[Nexus S Android Development] alen1901:
You bet. Now prepare for shocking screenshot, you asked for it. :o ;)

it was 335 when i flashed updated ROM and kernel, from cna 3.5 and marmite 4.5 to cna 3.6 and marmite 4.7 :cool:

Sent from SpeedMachine i9023
[Nexus S Android Development] polobunny:
I gotta say mine has had instabilities in the past but nothing THAT extreme. Would it be useful to make a somewhat fuller audit of people who have no problem at all/very little problem and people who do?

Wouldn't it be possible it's a software with root access misbehaving?
[Nexus S Android Development] caliban2:
How does that work?! :confused:

Your uptime shows over 13 days, yet marmite 4.7 has been released on sept 21. What are you, time-traveller?! :p

Of course! For some time I thought it's Opera Mobile, as it always crashed when I was surfing the web. But then, why doesn't it crash with cm's original kernel?!
[Nexus S Android Development] :
I recognise that colourful censorship. That was a post from when he was on v4.5
[Nexus S Android Development] :
I got the exact same message about the PVR driver from the boot backtrace you posted. I thought, that's a bit odd. I did some investigating, and it looks like I'm always blaming the PVR driver for no good reason: http://www.mjmwired.net/kernel/Documentation/oops-tracing.txt
[Nexus S Android Development] polobunny:
I can't really argue with that. :p
[Nexus S Android Development] alen1901:
No, no, you got me wrong. Read carefully. I was on cna 3.5 and marmite 4.5 when i achieved that time. Than on 300 and some hours of uptime, i changed all. So, now i will try to do another 300hours uptime. ;)

Sent from SpeedMachine i9023
[Nexus S Android Development] :
I'm going to build a special kernel with all debugging enabled. If you don't mind deliberately trying to crash your phone, so I can have a nice detailed last_kmsg to look at?
[Nexus S Android Development] polobunny:
That was in reply to caliban that didn't have crash with CM kernel but did with marmite. Not to you. :)
[Nexus S Android Development] 4tticuz:
Excuse me for asking, but which kernel version do I have to flash, running latest jellBro euroskank?

Thanks in advance
[Nexus S Android Development] polobunny:
In the first post there's a link to the version matrix. It links all the latest versions of the kernel depending on your configuration. You need to get the CM nightlies from Sept 19th onward version in the column D. You can get v4.7 which is deemed "stable" or you can get the v4.7.2 which is the latest beta. You can get bugs if you use that version though, so be prepared.
[Nexus S Android Development] :
It's cm nightly based right? Use the one with CM in the filename. Blue columns are for 4G model.
[Nexus S Android Development] 4tticuz:
Thanks alot, seems to work.
[Nexus S Android Development] thehulk1969:
Thanks. Sorry was actually after the Rasbean Jellybean ROM for the Nexus S
[Nexus S Android Development] caliban2:
Sure. :)

Just don't expect a crash right away, most of the time it takes roughly a day.
[Nexus S Android Development] :
During the process of debugging the the kernel I've eliminated three section mismatches, and there's still one to go. When that's done I'll release that without any debug stuff, then if that one is still causing problems for people, I'll do a full debug version. These warnings I'm fixing might not have even the slightest impact on stability.
[Nexus S Android Development] :
v4.7.3 is here: http://goo.gl/HvUrp

-Fixed section mismatches.

I've had four section mismatches for as long as I can remember. I figured I'd stop ignoring them, and fix them! This may improve stability for some users. (Caliban2) :p