yashsingh1/xdaforums huggingface dataset:
[Nexus S General] rasengan82:
Awesome, I will test it soon. Also, is there a reason the updater script doesn't clear the whole /tmp folder after the update and just deletes boot.img?

By the way, I saw your blog and your dislike of the Interactive Governor... JellyBean Stock Kernel uses the Interactive governor.....
[Nexus S General] :
The deleting of /tmp/boot.img is a hack to get the assert to work correctly...

The /tmp directory resides in RAM, so is lost on reboot anyway.

Yes, I know the stock kernel uses it, which makes sense as it was Google engineers that wrote it. It's still expensive in terms of CPU cycles though.
[Nexus S General] jay_993:
Stable kernel works perfectly fine with jellybeam
[Nexus S General] rasengan82:
Very stable indeed.
[Nexus S General] rasengan82:
Looks like this kernel is very stable with the stock 4.0.4 ICS ROM. How does this perform with other ROMs, such as BuglessBeast?

Edit: Oh man! Found an issue. Wifi Tether does not work :( I checked the logs and the app is not able to initialize the wifi interface as well as the access point.
[Nexus S General] snandlal:
Thanks again for your contribitions. I took your source and added BLD BLN Touchwake & Deepidle and I'm lovin it. Great kernel base!
[Nexus S General] :
Wifi tether works here. I just enabled it and disabled my ethernet, so am using the wifi tether to post this message. ;)

If you could post the output of adb shell dmesg and adb logcat from when the tethering isn't working, I'll take a look.
[Nexus S General] snandlal:
One is using native and one is using the app.....I think.
[Nexus S General] rasengan82:
What version of wifi tether are you guys using?
[Nexus S General] chronophase1:
I've always used the native one with no issues.

Sent by pocket technology.
[Nexus S General] rasengan82:
I am using Wifi Tether for Root, version 2.0.7. For some reason it's not able to initialize the wifi device for tethering. No logcat errors since the app tries to execute a binary with root. I might try out their newest beta version though to see if it solves the issue.

By the way, for Voodoo sound, do we really need to install the Voodoo sound app to get any enhancements at all? I'm wondering if the kernel already brings some out of the box enhancement from Voodoo sound such as DAC Direct, etc without installing the Voodoo Sound app. Also, does the Voodoo app reload it's settings on boot? I could not find the sources to check if it has a Receiver for that.

Edit: I think I saw in the logcat that the Voodoo sound app runs on the boot complete broadcast.

Edit 2: Confirmed with Supercurio. The app does capture the Boot Complete broadcast to set the settings on boot by default ;).
[Nexus S General] apatal:
+1. same here.

I think you need the app in order to change the Voodoo sound settings, such as bass enhancer, smart speaker, etc. :)

Sent by a Pacifist from a Nexus S
[Nexus S General] :
That doesn't work. This does however, set the profile to generic ics in the settings and it will work.

It's a bit funky though, it's caused a few BUG() occurrences in the wifi module, so I'm not exactly sure what the app is doing.

Edit: Actually, it doesn't seem to work properly. Native does, that doesn't, so it figures that it's an issue with the app.
[Nexus S General] rasengan82:
Oh man... too bad. I should get an AOSP ROM then because the stock ICS 4.0.4 for NS4G has the native tethering disabled...
[Nexus S General] RtOaNn:
Have gotten a random reboot while using Flipboard.

Briefly going through last_kmsg, it seems like the PVR bug.
[Nexus S General] rasengan82:
So does this PVR bug happen in the stock kernel as well?
[Nexus S General] apatal:
Yes, I think so. I think _thalamus tried disabling whatever is causing that PVR error but found out it did more harm than good.
[Nexus S General] :
Yeah, it's that again. It's a real nuisance even though it happens extremely rarely. I haven't managed to reproduce it for a couple of weeks now.

I assume it must, I experienced it in a few different kernel versions. It's one of those issues which might or might not occur though.

Yeah, it causes the GPU to get wedged so you get a black screen of nothingness until you power off and back on again. Not ideal, at least a reboot gets the device back online.
[Nexus S General] apatal:
New test build here.

What's new with this one, thalamus? :)

Sent by a Pacifist from a Nexus S
[Nexus S General] :
Nothing much really. I just merged in android-common-3.0 changes, which was just a little fix for the wifi module, just moving the locking init code a bit, not sure what it fixes because the commit message isn't exactly verbose, but I suspect it fixes a specific issue.
[Nexus S General] rasengan82:
Today I was forced to use turn by turn navigation for 7 hours straight. Drove 300 miles without a hiccup. No reboot no FC.
[Nexus S General] Imppy:
Thats insane
[Nexus S General] rasengan82:
Yes it was insane... my garmin gps died in mid road.... so I pulled my ns4g to continue the trip.
[Nexus S General] apatal:
Test Nexus S kernel release 3.0.36-15_test-20120714

Again, for the adventurous types (like me ;)), a new test build was uploaded in _thalamus' archive. Please see the updated OP for the download link.

Any big changes with this one, _thalamus?
[Nexus S General] migz012788:
Hello. :) i was looking for a kernel that runs best for games. That is almost no lags. Smooth. So any gamers tried this kernel? How was the performance?
[Nexus S General] :
Would it surprise you if I said I have absolutely no idea? I don't think it's got anything interesting.
[Nexus S General] apatal:
Not really, but I thank you for your honesty. ;)

Been using the latest stable with the latest JB ROM port and everything is all :good:
[Nexus S General] :
I might have something for people to test soon.

I have spent much of today porting the Samsung idle2 driver. This is basically deep idle with a different name and slightly different code, and which is implemented correctly so it properly supports both the IDLE and IDLE2(DEEP_IDLE) states at the same time.

It also doesn't race with the suspend code as it uses locking and checks wakelocks, so the device can *never* be suspending at the same time as it is attempting to leave or enter idle2, which is the issue I found with the normal deep idle.

I'm not ready to share the code yet, because it still needs some work, but the early signs are encouraging, it works far better on my device than deep idle does, and it will have the same power saving benefits and should be much more stable.

Plus it's enabled by default and doesn't need tweaking. :)
[Nexus S General] apatal:
Awesome! Keep us posted! :highfive:
[Nexus S General] :
Cool. Hope it works out. I'm still going to attempt getting a 400mhz deep idle state, just for practice.
[Nexus S General] :
To add to my previous post, I've come across a stability issue, possibly CPU register corruption during idle2 / suspend transitions.

The annoying thing is that it doesn't happen every time, the even more annoying thing is you don't generally get a particularly useful last_kmsg from it because it really borks the system and it takes an age to reboot, all the time spewing crap into kmsg.

The even more annoying thing is that it wasn't happening, then it started happening, which strangely enough is exactly what happened when I was testing deep idle.

Perhaps my phone is faulty, I dunno. :(

Taking a big of a guess and assuming that my phone isn't faulty, I think it's probably down to the idle2 cpu sleep / wake code s5p_idle2_save and s5p_idle2_resume, which I borrowed from deep idle, which would explain why the issue would occur in both.

Unfortunately, said code is in assembly, and assembly is certainly not one of my skills, so I need to try to learn enough to figure through it and compare it to the platform CPU sleep / wake code to see if it's executing the same instructions. Either that or unify it with the platform code, which is what Samsung did in the first place, but due to the massive changes in the platform code it was impossible to integrate with no assembly knowledge.

So, watch this space lol.

Maybe I'll release it anyway, to see how other people fare with it. Deep idle is allegedly stable, but I've had no success with it at all on my device, so it could be the same thing causing this. But I'll try to fix it first, as the aim was an improved deep idle, and I think it certainly does that. :)
[Nexus S General] hiphopboy:
This build in July, 14 stable with Jelly Beans, at least the port version i tested, with save more battery life (but need more better), thanks for this kernel :)
[Nexus S General] dbenyakar:
I cant turn on Bluetooth.

Can anyone verify it can be turned on?
[Nexus S General] :
Yes, verified that it can be turned on.
[Nexus S General] rasengan82:
Same here, mine works fine.
[Nexus S General] :
Update on the idle2 situation...

I tracked down the cause of the instabilty, it was the ARM coresight driver interfering with the registers. After disabling it and implementing the suspend / resume asm from Samsungs sleep.S file, instead of the didle.S asm, it appears to be stable.

If it continues to be stable, I will do a release with it in soon after I have cleaned up a load of superfluous asm, and then I will release my code for the kangers to kang. ;)
[Nexus S General] afzalarsalan:
So you gave what people wanted, but made it better. Can't wait as I remember my time with deep idle gave me quite a few SOD's but did marginally improve battery.
[Nexus S General] rasengan82:
Oh man trying stock kernel right now to feel the difference... it indeed feels slower than this kernel.
[Nexus S General] :
It'll only improve battery if you are listening to audio. The point of it is to power down the Cortex-A8 core when the display is off and audio is playing to save power. That is the only time you will see any power saving. The implementation which I ported is an improved implementation, and it doesn't require any configuration because it is activated automatically when the conditions are right. :)

Haha, I'll take that as a compliment then. :)
[Nexus S General] rasengan82:
Haha yup. Now I cannot go back...Once JB hits... I will be waiting for your kernel.
[Nexus S General] chronophase1:
Yep. There are only 2 kernels that will touch my Nexus now. Pete's stock and this one. Looking forward to the JB release.

Sent by pocket technology.
[Nexus S General] rasengan82:
Hopefully Pete releases the sources of his kernel someday.
[Nexus S General] :
There will be a new test release coming later on today with my IDLE2 patch and also merged up to 3.0.37, assuming no last minute issues.

I spent some time today cleaning up and optimising the IDLE2 code, including the assembly code (which was a new experience for me), and it appears to be rock solid stable so far, I haven't had any issues reported by the people who are testing it and I've hammered it myself today and had no issues.

The release is tagged, built and ready to go. I just need to do a blog post, upload it and push the source, which I will do tomorrow afternoon UK time, again, assuming no last minute issues.

I'm being very cautious with this one, as IDLE2 is a massive change and I'm anal about ensuring stability when I implement anything big, which benefits everyone really as you know you won't be getting crap.

There is no point pushing 10 barely tested releases a day which are full of bugs and only contain minor changes.

My ethos is to produce a regular, worthwhile release and be stable even when I call it a 'test' release, hence why I insist on it being thoroughly tested before release, then I can fix any little issues that crop up *before* I push it out to the public.

I'm also looking forward to some peer review on the IDLE2 patch, which has taken up many hours of my life over the last 3 days. I personally think it is a better alternative to the deep-idle patch, and it's certainly cheaper in terms of CPU because it has no stat collection and the code is cleaner, but I'm biased of course. As per most of my kernel, it works straight out the box, nothing needs to be configured or tweaked and it will put the SoC into TOP OFF DEEP-IDLE mode whenever the conditions are right, and if they aren't, it won't.

What I'm not looking forward to, however, is releasing my work to the kangers, but hey, it wouldn't be XDA without the cherry-picking copycats, right? ;) As long as full credit is given, in bold, large, red text, I won't make a fuss about it. ;)
[Nexus S General] rasengan82:
Oh man this is gonna be epic. I never use DI as a daily setting because of stability issues. If this is stable man... hell yea every kernel dev will cherry pick it lol.
[Nexus S General] :
Yeah, it should be good. Since I disabled coresight and changed the asm, I haven't had a lockup or crash, and that is over 24 hours ago. :)
[Nexus S General] sdhanjal15:
So will this improve my battery life. And since bedalus kernel is based off of this will his kernel get it to?
[Nexus S General] rasengan82:
Bedalus is based on CM I think.
[Nexus S General] sdhanjal15:
Ohhh
[Nexus S General] apatal:
+1

exactly what I told thalamus. IDLE2 is going to be revolutionary, as it's a totally different but definitely more effective implementation of deep idle

and the best thing about it is, it's supposed to work out of the box - no need for any tweaking on the user's part, whatsoever. Been testing it out for thalamus and cpuspy don't lie: IDLE2 works, especially when listening to music/audio while screen off. ;)

Sent from my Nexus S
[Nexus S General] ironia.:
I have use your kernel (Stable Nexus S Kernel release 3.0.36-14) for one week (after come back to stock ics kernel, my gps stop working..reporting this error:

07-17 23:53:27.363 E/GPS (132): [gps_lcsapi_init][line = 436] : Failed to call BrcmLbs_init(errno = 2)

07-17 23:53:27.363 I/GPS (132): [gps_state_done][line = 293] : successfully called

07-17 23:53:28.363 E/GPS (132): [gps_lcsapi_init][line = 436] : Failed to call BrcmLbs_init(errno = 2)

07-17 23:53:28.363 I/GPS (132): [gps_state_done][line = 293] : successfully called

07-17 23:53:29.367 E/GPS (132): [gps_lcsapi_init][line = 436] : Failed to call BrcmLbs_init(errno = 2)

07-17 23:53:29.367 I/GPS (132): [gps_state_done][line = 293] : successfully called

any suggestion???

tnx a lot
[Nexus S General] :
It will reduce battery drain when you are listening to audio and the screen is off. Not at any other time though. And it's not anymore, and this isn't a bedalus kernel thread, so why are you asking that in here? :rolleyes:

Nah, sorry. It doubt it's a kernel problem tbh. I'm not exactly sure how the Nexus S GPS works, I've never looked into it, but if it's anything like MSM based devices, it relies on RPC calls to the modem and bypasses the kernel entirely.

---------- Post added at 09:44 AM ---------- Previous post was at 09:42 AM ----------

Oh yeah, another thing...the bluetooth patch isn't required for my implementation either. It just works™.
[Nexus S General] apatal:
Exactly! Trust me guys you can uninstall NStools before flashing the next release. Flash and forget, if you know what I mean. ;)

Sent from my Nexus S
[Nexus S General] :
Will this new deep idle code be compatible with my fixed frequency / performance governor idea?

When it's released I'll measure the battery drain.
[Nexus S General] :
No. It doesn't need such hacks. The frequency scales from 100 <> 1000 as needed when the CPU comes out of idle.

---------- Post added at 02:08 PM ---------- Previous post was at 01:53 PM ----------

http://thalamus-hacking.blogspot.co.uk/2012/07/idle2-for-s5pv210-soc-v0122.html

Idle2 announcement.
[Nexus S General] apatal:
New Test Release and IDLE2 Announcement

OP updated with the link to the latest blog post of _thalamus which in turn contain the download links to the new test release as well as the corresponding changelog.

Post #2 of the thread also updated to show links to more information on _thalamus' biggest contribution to date to Nexus S development: the implementation of what he refers to as IDLE2.

Cheers!
[Nexus S General] gparent:
Were you exaggerating or not? I do plan on pulling in your patch, but I have no intention of putting anyone on a special pedestal. A star, then a feature description with bold text indicating your name is okay too? (e.g. * IDLE2 by _thalamus)

This is how I plan to credit everyone.

Hundreds and hundreds of people have been contributing to the Linux Kernel and to Android over several years without expecting preferential treatment, so I just want to make things clear and not anger any developer :)

That said, your work is very impressive and deserving of recognition. Keep up the good work.
[Nexus S General] :
Nah, that was a joke. ;) I was taking the piss a bit.

Read the end of my IDLE2 announce post for the serious version. :)
[Nexus S General] gparent:
Cool, thanks man. Can't wait to test your changes tonight!
[Nexus S General] alexdemonumber3:
Do you have to enable deep idle2 or is it already enabled by default? running aosp 4.1.1 (legolas build) and nstools not showing an option for deep idle. thanks!
[Nexus S General] Pipusz:
Maybe because deep idle isn't implemented? -.-'

You can read more about it on _thalamus' blog.
[Nexus S General] alexdemonumber3:
its supposed to be in the test release, didn't you see that?! big news!! lol
[Nexus S General] :
Lol. Seriously? You need to read my IDLE2 announcement again, fully.

Specially the part where it says: "Enabled by default and automatically invoked whenever the conditions are right."
[Nexus S General] Pipusz:
I don't think it should appear either in NStools or anywhere else. It just works I guess.
[Nexus S General] doa4ever:
Your new Test Nexus S kernel release 3.0.37-17 working perfect as your other releases.

Thanks again for your work. :victory:
[Nexus S General] :
Correct. It's completely transparent to the end user, as the 'normal' IDLE is. There are no tunables, no sysfs interfaces and no way of getting specific stats from it. It just works. :)
[Nexus S General] alexdemonumber3:
lol.. sorry boss, just got done with a drivers ed course that took 7 hours (non-stop) and was too excited, I forgot to fully read the announcement... good work, thalamus! thank you for your dedication! :)
[Nexus S General] gparent:
As a developer, I like your no-bull**** attitude. Keeping things simple and hard to break is the way to go in the kernel world.

Also, going to be running your test kernel so you can have more data on it if anything happens. No crashes yet.
[Nexus S General] :
Can you make a switch for it to go on and off? When I measure the power drain I want to see a before and after.
[Nexus S General] :
There is a switch, you compile it without CONFIG_S5P_IDLE2 enabled.

I can build one if you like, then you have the same build config, and built with the same toolchain.
[Nexus S General] :
I start a new job tomorrow, so I'm gonna be Hella busy... I think it's probably quicker if you build the two versions. But I'm very interested in this. Measuring amps is one of my hobbies :p
[Nexus S General] apatal:
Again, my unsolicited advice to you guys: get rid of NStools. It's buggy, unreliable and does more harm than good if you don't know what you're doing tinkering with the kernel settings. Use the latest test release as is and you won't be disappointed. Also, you can install cpuspy if you really want something to look at on how the kernel, "just works". :)

Sent from my Nexus S
[Nexus S General] :
I'll build you one without and email you the link.

It'll be identical to my current release except the IDLE2 code won't be included, because I #ifdeffed it all.

I did test building it with it disabled the other day and it built and worked fine, hopefully I haven't broken anything since then.
[Nexus S General] tycruickshank:
Thanks so much for the hard work on the kernel. I'd like to comment that with the latest test build, 3.0.37-17, whenever I have a Bluetooth audio device, such as Bluetooth headphones or in my car, connected and streaming music/audio if I lock the screen the music stops playing. I can confirm this only happens over Bluetooth and not the analog audio out. I have to reconnect the Bluetooth device to get the audio to play again. I'm on stock OTA rooted 4.0.4
[Nexus S General] :
Oh.

Yeah.

Damn.

Lol.

I know what causes that. I don't have a bluetooth headset to test with, so I didn't catch it. I'll fix it today. :)
[Nexus S General] aLNG:
During the night there is something that always waking up my phone

If I'm the only having this thing I will try reflash again
[Nexus S General] :
Looks pretty normal to me. It will wake up from time to time.

---------- Post added at 09:02 AM ---------- Previous post was at 08:30 AM ----------

Has anybody got a bluetooth headset? I need someone to test a fix that I am working on, but I have no way of testing it currently. Anybody who can test this, please PM me.
[Nexus S General] apatal:
My phone also wakes up from time to time but screen still takes the cake in the battery consumption department, not cell standby. Is the mobile signal in your home weak? Try switching to 2G only mode before going to bed, or if this shows no improvement, going to Airplane mode, just to check if this is what's keeping your phone awake.

Also, try turning off your wifi as well. This will further save you battery. :)
[Nexus S General] aLNG:
Its not normal for me..I'm gonna check with betterbatterystats

I did checked 2g only.
[Nexus S General] caliban2:
Could be Facebook syncing, check your notification settings.
[Nexus S General] apatal:
New Test Release with Bluetooth Streaming fix

OP updated with the link to the new blog post for the new test release incorporating the bluetooth fix for IDLE2.

Cheers! ;)
[Nexus S General] jfmac:
Something I think it's worth mentioning: Torch (Pete's BB rom) didn't work when screen off on previous (3.0.37-17) kernel. However, it works on the latest 3.0.37-18.

By the way, thalamus, according to your posts, I think you're maybe the only developer here on xda that's trustworthy. I'm a complete noob so I can't understand a bit what you're saying in releases description, but it seems you know what you're doing. Thanks for your work.
[Nexus S General] gotjazz:
Idle2 sounds interesting. Giving it a spin :-)
[Nexus S General] kleineronkl:
I have the same problem over night. Phone in Airplane-modus by Gentle Alarm ;-) With last staple Kernel it only used 1-2 % ( in 6-8h). Newest Kernel "eats" 15%. Normal? Hm. :-(

And by the way: This Kernel is a beast :-) i don't need project Butter... I use thalamus with rascream
[Nexus S General] chronophase1:
I may pop my SIM back into my Nexus and try the latest stable today.
[Nexus S General] daniel3ric:
Hello _thalamus, and thank you for your hard work.

I have the same problem with TeslaLED, supposed to be on when screen is off, but it turns off latest diddle2 kernels.

I have also tested kernel-S5PC110-3.0.37-18_test-20120719-112916.zip. Any notable difference vs. previous one ?
[Nexus S General] :
I think this drainage could have been introduced in the .37 stable update.

I don't think it's idle2 causing it, because I had good battery usage results with .36 and idle2, but I didn't really test much with .37, I only merged it on the morning of the 17th.

I'm rolling back to .36 to confirm, will update once I know more. :)
[Nexus S General] gparent:
I have one. I can patch and compile myself if you just PM me the patches :) I'm up to 0.122 on my current kernel.
[Nexus S General] :
Patch v0.130 is available in the same place as the others. :)

---------- Post added at 02:02 PM ---------- Previous post was at 02:00 PM ----------

Hmmm, I'll look into that, might be a similar situation to the bluetooth audio streaming.

And no, don't flash kernels that I haven't announced on here. That one enabled a load of debug to track down an issue.
[Nexus S General] rasengan82:
Omg... forgot to nandroid and messed up with system partition lol. Would fastboot flashing system.img with boot.img take my phone to pure stock again? I know I will lose root but that's fine.
[Nexus S General] :
I've never used TeslaLED before, but I use Torch LED Flashlight and it works fine with the 18 test kernel.

If it helps to compare logs, I've uploaded a logcat of me triggering the torch (done with search key).