Jump to content

  1. 0
  2. 0
  3. 0/5

Rate this Topic

* * * * *
17 votes

Timur's Kernel - USB ROM - Most popular thread on Rootzwiki

  • This topic is locked

MetalMan

MetalMan

Android Lover

  • 223 posts

Posted 10 January 2013 - 07:48 AM #111

One question about the newly gained ability to completely shut off the N7 on external power loss. Now that this is actually possible, isn't it a little annoying to have to wait for the device to boot up, every time you want to use it? What is the big disadvantage in having the device rest in deep sleep mode - and be able to turn it on in no time, when you need it? I'm probably missing something.


Similar to kookie monster, I think boot-on power would be nice because my N7 drains up to 10% per day while sleeping even with Wifi and Bluetooth off (a Tasker profile is supposed to shut them off when the screen turns off, and another profile turns the screen off shortly after power is removed).

And a slight off-topic: for those using USB DACs, can you not change the volume with the N7? I recall that one of JackNorris's mods is for volume control while using a DAC, but I've always had volume control through the N7 with a DAC attached... running Timur's kernels (4.1.2 and 4.2.1) and Team EOS nightlies (EOS 3 for 4.1.2 and EOS 4 for 4.2.1). No changes other than those.

EDIT:
Another thing, possibly geared more towards Timur:
Lately I've been requesting Forced Fast Charge to be added to the kernel since I'm stuck at USB charging speeds while charging + OTG hosting. On the 4.1.2 version of the kernel my N7 indicated charging at AC speed while charging + OTG.

One user came up with kernel patches for various devices that would allow Forced Fast Charging to be enabled whenever a particular script is run. I'd like this because I could set up Tasker to run the script at boot, or turn it off if need be.
That user didn't do this for the Nexus 7, but he did it for other devices. See these links:
http://forum.xda-dev...d.php?t=1564973
http://forum.xda-dev...d.php?t=1524014

So I guess this is my way of politely asking again :)

Edited by MetalMan, 10 January 2013 - 11:22 AM.

  • 0 Likes

OP Timur

Timur

Android Master

Posted 10 January 2013 - 11:42 AM #112

I'm glad it's possible.


I am, too. I'm just asking to get a better understanding of why and how you are using this. Anyway, 10% battery loss over 24 hours is an indication, that the device is probably not in deep sleep (LP0). A Tegra 3 device in deep sleep mode is practically off, except for very few components, including a really tiny chip running at 32khz which controls the power button, the USB port and a few other things. This is what the Tegra 3 Technical Reference Manual says about LP0:

Low Power 0 state in which, OS is suspended, DRAM is put in self-refresh, system state is saved in PMC + DRAM , VDD_SOC and VDD_CPU rails are powered off, and PMC is configured to monitor “LP0 wake events” which would trigger LP0 exit. This is also called Deep Sleep state. Deep Sleep is an ultra-low-power standby state in which a Tegra 3 device maintains much of its IO state while most of the chip is powered off.


What's good about LP0, is that the device will turn on really fast. And also, it can be configured to wake up by timers. I'm toying with the idea of communicating with the device in the car, parked near my flat, over wifi. That would allow me, for instance, to add new content to it. For instance by having the device wake up in the middle of the night, run a special script to check certain folders on my NAS and then have it go back to deep sleep, all by itself. As far as I am aware, no more than 3-4% of battery should be drained over 24 hours in deep sleep mode. Which should stretch over up to 3-4 weeks. On the N7 there is this problem, that from the outside, you cannot distinguish LP0 from regular sleep mode (where basically only the screen is turned off). And there are certain things, such as wifi with an active IP connection (but not just wifi being active) that prevent a device from going into deep sleep.

Well, basically, this is why I have asked. Maybe to be continued...

Edit: The battery will, of course, also drain in a device that is fully turned off. The 24h 3-4% drain in deep sleep is total. Not on top of that.

Edited by Timur, 10 January 2013 - 11:55 AM.

  • 0 Likes

kodiack99

kodiack99

Android Lover

  • 107 posts

Posted 10 January 2013 - 12:10 PM #113

Mine usually only drops 3-4% a day,if its a real cold day maybe 5%.But the fast charge option would be nice to have just in case.But if I expect a long time of non driving I power down.
  • 0 Likes

Kookie_Monster

Kookie_Monster

Android Master

  • 593 posts

Posted 10 January 2013 - 02:21 PM #114

I am, too. I'm just asking to get a better understanding of why and how you are using this. Anyway, 10% battery loss over 24 hours is an indication, that the device is probably not in deep sleep (LP0). A Tegra 3 device in deep sleep mode is practically off, except for very few components, including a really tiny chip running at 32khz which controls the power button, the USB port and a few other things. This is what the Tegra 3 Technical Reference Manual says about LP0:

Low Power 0 state in which, OS is suspended, DRAM is put in self-refresh, system state is saved in PMC + DRAM , VDD_SOC and VDD_CPU rails are powered off, and PMC is configured to monitor “LP0 wake events” which would trigger LP0 exit. This is also called Deep Sleep state. Deep Sleep is an ultra-low-power standby state in which a Tegra 3 device maintains much of its IO state while most of the chip is powered off.


What's good about LP0, is that the device will turn on really fast. And also, it can be configured to wake up by timers. I'm toying with the idea of communicating with the device in the car, parked near my flat, over wifi. That would allow me, for instance, to add new content to it. For instance by having the device wake up in the middle of the night, run a special script to check certain folders on my NAS and then have it go back to deep sleep, all by itself. As far as I am aware, no more than 3-4% of battery should be drained over 24 hours in deep sleep mode. Which should stretch over up to 3-4 weeks. On the N7 there is this problem, that from the outside, you cannot distinguish LP0 from regular sleep mode (where basically only the screen is turned off). And there are certain things, such as wifi with an active IP connection (but not just wifi being active) that prevent a device from going into deep sleep.

Well, basically, this is why I have asked. Maybe to be continued...

Edit: The battery will, of course, also drain in a device that is fully turned off. The 24h 3-4% drain in deep sleep is total. Not on top of that.


Dude... you rock!! lol

That's a very interesting option... for the weekends when I use the car the most and can leave it on without being worried about it getting drained. Cause I'm thinking of a way (very simple actually) to keep the tablet completely off during weekly short drives. I'm connecting a lighter splitter where I'm gonna plug the 2V car charger which has switches for each port, like this one:

Posted Image

This will actually allow me to not let the tablet boot up when I don't want it to. I just turn the switch off and that's it. Plus, I could adapt the USB port, connecting the OTG cable to it and using a USB hub.

Does this make any sense? lol :lol:


Uh.... one question though. How can someone now for sure that the Nexus 7 is in that LP0 state you talked about? Is turning all the sensors off enough to ensure that?

Edited by Kookie_Monster, 10 January 2013 - 02:25 PM.

  • 0 Likes
In-Dash Nexus 7 Project | Mod Shop

Samsung Galaxy SIII LTE 16Gb »» ROM: Stock Android 4.1.2 (Root) »» Kernel: Stock
Asus Transformer TF101 16Gb »» ROM: EOS4 Nightlies »»»»»»»»»»» Kernel: KATKernel
Google Nexus 7 32Gb »»»»»»»»»» ROM: Timur's USBROM »»»»»»»»» Kernel: Timur's Kernel

The Guz

The Guz

Member

  • 35 posts

Posted 10 January 2013 - 03:56 PM #115

Timur,

I have tested your kernel with a set of Logitech USB headphones (acquired in 2008). They work the second I attach them to the Nexus 7 (USB-OTG). I am gratified that this is so, but puzzled why it should work at all.

Android Open Accessory (AOA) 2.0 protocol requires that the accessory send the SET_AUDIO_MODE USB control request.

How could the headphones do this? Android was announced in 2007, the headphones were purchased in 2008. Logitech wouldn't have known about the AOA 2.0 protocol.

Can you explain this to me?

Thanks,

Graham

Edited by The Guz, 10 January 2013 - 03:57 PM.

  • 0 Likes

millab

millab

Member

  • 16 posts

Posted 10 January 2013 - 04:07 PM #116

CM 10.1 is 4.2 JB ;) I think you are talking about the stock one :)


Yep I am, sorry I was referring to the name that Timur is using for the various versions. "Android 4.2.x kernel for fixed installation"

When you use the special purpose FI kernel, you need to power all your USB Slave devices externally (or use self powered USB slave devices). Can you confirm your devices are actually powered on, when you fail to detect then?

Yes I can confirm that they are externally powered. I am using a powered hub, and for instance my HDD will have the light on to indicate power. Worked fine when I tested on the 2012-12-23 fixed version a couple of weeks ago. I will have a try with some of the other versions of the kernel tonight and see if I can confirm it is only 2013-01-06 with the problem.
  • 0 Likes

jmcguire525

jmcguire525

Android Lover

  • 102 posts

Posted 10 January 2013 - 06:23 PM #117

Timur, could you post the FI version with usb hotplug audio?
  • 0 Likes

millab

millab

Member

  • 16 posts

Posted 11 January 2013 - 02:12 AM #118

Turns out it is actually working as expected on 2012-01-06 4.2 fixed. The problem is that I wasn't powering the TABLET!
I have now spliced in power to my USB cable between the powered hub and the tablet and the USB devices now work.

So now my only problem is that when I unplug the tablet charger, the hard drive connection drops and my music program freaks out when i reconnect the charger. The hard drive is definitely still powered during this time
  • 0 Likes

OP Timur

Timur

Android Master

Posted 11 January 2013 - 02:23 AM #119

Timur, could you post the FI version with usb hotplug audio?


I saw your other post. Let's see if you get a response.
  • 0 Likes

OP Timur

Timur

Android Master

Posted 11 January 2013 - 02:29 AM #120

How can someone now for sure that the Nexus 7 is in that LP0 state you talked about?


N7 is a bit like Schrödiger's cat, in this respect. As long as you don't try to find out, deep sleep will probably work well. But when you try to investigate (say, by using adb over wifi) you will most likely kill it. But honestly, the problem is not with sensors. Apps can prevent deep sleep, by using wake locks. Unfortunately, it does not seem to be possible to tell, by just looking at the outside. Maybe there is a solution to this. But, so far, I'm not aware of it.
  • 1 Likes