[ROM] AOSP/CM Jelly Bean 4.2.2 for a2109

PJBrs

Senior Member
Developer
Dec 29, 2014
480
405
These wakelocks are not unique to our device... I've seen hundreds of posts relating to this same GSF wakelock.

Yeah, I know. Also, I though I understood how to disable these but it turned out I didn't.

I just don't know how our rom is specific. I can think of only two things--the NvCPLSvc which includes some OTA updater, and the CPU governor which is a tegra specific thing, IIRC (unlikely, since deep sleep only stops occurring after I wake up the tablet after a long time of inactivity (~ eight hours; provided I have disabled the wearables thing, because that's really an issue).

I did read some post online pointing at configurations of wifi access points. This might be our bug...
 

PJBrs

Senior Member
Developer
Dec 29, 2014
480
405
but then wouldn't tablet sleep deep with wifi off?
Sigh, one would think so, wouldn't one...

To be honest, I haven't the slightest idea of what this wakelock thing is and I don't even know how to disable services on boot, so I don't even seem to be able to do anything about it.

This wakelock thing is turning out to be as annoying and frustrating as the whole camera hal.
 

tasinofan

Senior Member
Jan 13, 2013
92
23
Sigh, one would think so, wouldn't one...

To be honest, I haven't the slightest idea of what this wakelock thing is and I don't even know how to disable services on boot, so I don't even seem to be able to do anything about it.

This wakelock thing is turning out to be as annoying and frustrating as the whole camera hal.
Hi PJBrs
Let's hope and assume 'wakelock thing' is not specific to your valuable contributions.
I have 2 access points as well (one personal and one for work), and, when I connected to the one for work, I got 70% deep sleep. Next I turned off wifi, and got no more deep sleep. Then, I connect to personal one and got no more deep sleep either.
There seems to be some similarity with the story you referred to. Somehow some software is confused about wifi/sleep state machinery. I doubt if it can have been caused by you.
Success
 
Last edited:

PJBrs

Senior Member
Developer
Dec 29, 2014
480
405
Hi PJBrs
Let's hope and assume 'wakelock thing' is not specific to your valuable contributions.
I have 2 access points as well (one personal and one for work), and, when I connected to the one for work, I got 70% deep sleep. Next I turned off wifi, and got no more deep sleep. Then, I connect to personal one and got no more deep sleep either.
There seems to be some similarity with the story you referred to. Somehow some software is confused about wifi/sleep state machinery. I doubt if it can have been caused by you.
Success
Okay, that's good to hear, thanks!
 

PJBrs

Senior Member
Developer
Dec 29, 2014
480
405
Allllllright. First post updated with new build dated 20150503 for cm-10.1. AOSP build went wrong, will fix later.

This fixes the camera and an issue that /system got mounted rw.

Bugs / not working are in the first page. Only little things left, too little to bother with. Battery drain remains, but I can't seem to fix it, and I'm not sure whether it's my bug or Google's.

Happy testing!
 
Last edited:

joebine

Senior Member
Jan 14, 2015
150
32
What do you prefer? Camera with good video recording that doesn't take pictures, or camera that takes pictures okay but in video recording has incorrect aspect ratio?

I prefer the camera taking pictures well. I don't take video with a tablet...

Thanks for the hard work
 

DBlake

Senior Member
Nov 29, 2013
90
24
I found some info on that post you linked that might help you...

1) I've got a Netgear N600 ADSL/Wifi router at home. On my 2.4GHz radio, I set up two access points: one for my stuff and one for guests. I made sure to delete the guest account from all my Wifi equipment to make sure there's no "fighting" or "flapping".
2) It appears that the phone ignores the Wifi-'stay connected while sleeping' setting, or the radio is broken. When the phone goes to sleep, it disconnects from Wifi.
3) When the phone disconnects from wifi, the Google Services Framework lose connection: this causes the phone to wake up.
4) When the phone wakes up, Wifi gets re-established. This makes Google re-connect.
5) The phone goes back to sleep and we return to step #2.
 

PJBrs

Senior Member
Developer
Dec 29, 2014
480
405
I found the wake-up problem. Somehow, one stock binary, tf_daemon didn't get copied over, and in its absence the kernel doesn't enter deep sleep. We've all been looking in the wrong place, though understandably so, since disabling that wearables thing really improved deep sleep. Yesterday I finally thought of looking at dmesg output and quickly spotted an error thar mentioned instructions starting with tf_. So, essentially this is an example of PEBKAC with some unexpected kernel behaviour added in. The good news- we have deep sleep again!

Thanks very much @tasinofan @profeet and @DBlake for testing and thinking along! I appreciate it very much!

New builds after the weekend.
 

DBlake

Senior Member
Nov 29, 2013
90
24
Could you be able to upload that binary for us to add to our devices form the time being?
 

PJBrs

Senior Member
Developer
Dec 29, 2014
480
405
Could you be able to upload that binary for us to add to our devices form the time being?

*** EDIT I fixed the link, the first one probably will work just as well ***

Here you go! I picked tf_daemon from here. (Can't access my build tree right now.) Next, remount /system rw:
$ su
# mount -o remount /system

Move tf_daemon to /system/bin and mark it executable:
# chmod +x /system/bin/tf_daemon

Reboot, and all should be fine.
 

PJBrs

Senior Member
Developer
Dec 29, 2014
480
405
New builds. Battery drain is fixed, camera fully functional. Not working:
  • Hardware rotation lock button
  • Wifi-direct
  • Receiving files via Bluetooth (AOSP only)
Autobrightness is a bit wonky, bluetooth MAC address is not right.

For the rest, everything seems fine!

AOSP-4.2.2 (md5sum: b84c6d039edff8fd57766615d46f0f6b)
CM-10.1 (md5sum: 12d29e6dd6aae23b808a49022bdaa1a1)

I don't expect serious issues anymore. Let me know if you find any.
 

DBlake

Senior Member
Nov 29, 2013
90
24
New builds. Battery drain is fixed, camera fully functional. Not working:
  • Hardware rotation lock button
  • Wifi-direct
  • Receiving files via Bluetooth (AOSP only)
Autobrightness is a bit wonky, bluetooth MAC address is not right.

For the rest, everything seems fine!

AOSP-4.2.2 (md5sum: b84c6d039edff8fd57766615d46f0f6b)
CM-10.1 (md5sum: 12d29e6dd6aae23b808a49022bdaa1a1)

I don't expect serious issues anymore. Let me know if you find any.
Nice! Have you considered using vampirefo's tweaked kernel with this (or using his tweaked build script for it)? He has an OC of 200MHz (up to 1500MHz from stock 1300MHz) as well as a lot of governors and such enabled. His kernels also beat stock kernel benchmarks.

EDIT: I'd honestly say that CM-10.2 (android 4.3) would be a waste of time since it is so very close to 4.2 in features. That being said, can we expect to see a proto build of 4.4 soon? :D
 
Top