[Nexus S Q&A, Help & Troubleshooting] deville~>:
Here's my story. I like experimenting with my device, installing different ROMs, kernels, apps etc.

Few weeks ago I've installed franco kernel (version from 27/10/2011) on du5t3r's Stock Deodexed ZipAligned ROM (which was installed 2 months before that) to enable deep idle on my device. Everything worked just great, battery usage in standby mode was about 1% and I was happy about, but I had a few small, annoying issues (like default app for market links, *.doc files being reset all the time). Besides that, I had lots of crap left on my /sdcard from previously installed apps.

I decided to back up important stuff, perform factory reset, format /sdcard, wipe /cache and Dalvik Cache and install everything from scratch. I installed the same rom, GLaDOS kernel (v 1.6 at that time, which also had deep idle), restored all my apps with settings using TitaniumBackup v 4.21.

GLaDOS kernel didn't work well for me (it was noticeably slower than franco). Besides that, my battery didn't last more than 12 hours (mostly in STANDBY mode!), so I decided to flash franco kernel (17/11/2011 version). It solved my problems with lags (everything was running smoothly again), but didn't help much with battery life.

I was guessing why until I noticed strange behaviour of my WiFi. It was always ON (probably keeping my device awake), though I chose "Turn off when screen is off" as WiFi Sleep Policy using default settings.

Before that I tried to set this policy to "Never when plugged" (using Spare Parts), but after that I changed this setting back to "Turn off when screen is off" (using Spare Parts again) and uninstalled this app.

Also I tried using Samba File Sharing (which didn't work well and seemed to have some kind of conflict with Barnacle WiFi Tether). I also tried using SwiFTP.

One of those apps messed up my WiFi. When I switch it on it stays on until I switch it off (when screen is switched off, it's still on, I can ping my phone after 10, 20, 30 minutes. Changing sleep policy doesn't help, looks like it's either ignored or changer back to "Never" or whatever).

This affects my battery life greatly. When WiFi is off, my device sleeps normally and I get about 1% per hour in standby mode.

Here's what I tried:

1) Deleting all applications mentioned above

2) Installing Spare Parts back from the same source, changing Sleep Policy to "Never" and back (rebooting each time).

3) Restoring from full Nandroid backup dated before I tried my first kernel with deep idle

4) Restoring from full Nandroid backup dated right after I rooted my device (no mods of any kind, just rooted stock 2.3.4 Android with stock kernel few apps).

5) Flashing GLaDOS again (v 1.8 this time), then franco kernel (17/11/2011 version), then franco kernel again (27/10/2011 version, which worked normally before)

6) Flashing Stock 2.3.6 ([GRK39F]Stock+Radio+Boot+Rooted+Deodexed+Zipalign) after factory reset and formatting /boot and /system

7) Flashing KD1, KB3/KB1, KF1 radio

And... NOTHING. When I check Sleep Policy in standard settings, it says "Turn off when screen is off", but behaves like "Never", and after few reboots (or reboot with battery pulled out for 10 minutes) it says "Never".

Seems like I am stuck with Sleep policy set to "Never" unable to change anything. I have no idea if it was one of the kernels or one of the apps (or maybe both) that messed up my WiFi. Other than stuck policy setting my WiFi works well (not perfect, maybe, but acceptable).

Any suggestions?