[Community] GTA04 - Power management improvements
Dr. H. Nikolaus Schaller
hns at goldelico.com
Wed Jan 29 09:34:50 CET 2014
Am 29.01.2014 um 09:07 schrieb Hermann Schwärzler:
> On 01/28/2014 11:27 AM, Dr. H. Nikolaus Schaller wrote:
>> Am 28.01.2014 um 10:28 schrieb Hermann Schwärzler:
>>> No I did not use such a script. Just the "poweroff" command of the
>>> system. Tonight I will power off after running this script and will
>>> report my findings.
> I can confirm that powering down the modem before powering down the
> device results in ~0 power usage!
> I used the modem-poweroff.sh script in /opt/qtmoko/bin/ yesterday
> evening before calling "poweroff" on the device and after powering it on
> this morning (after 9:25 hours) I saw a mere 5mAh decrease in the
> charge-value of the battery. I saw this *after* boot so most/all of it
> is due to power-usage of the boot process.
That is fine since everything else would have made me wonder a little.
> As far as I can tell the modem-poweroff.sh script is not used anywhere
> in qtmoko.
Oops. That should not be so. It makes people believe to have a hardware
bug but it is a missing piece in software.
> So I propose to call it when a device-shutdown is requested.
> E.g. in QtopiaServerApplication::shutdown()? But this is for sure
> device-dependent so there might be a better place...
The optimal solution would be to have it in some "shutdown" script that
is installed within Debian. I.e. something that is executed if "poweroff" is
done on the command line or called from QtopiaServerApplication::shutdown()
I did some experiements a while ago but did not find time to complete it.
>>> But there remains the power-usage of a suspended device (that has no
>>> need to communicate with the base station as it lies on the same place
>>> all the time and receives neither calls nor text-messages): If
>>> communcation with the base station draws 100 mA the device would have to
>>> communicate 19% of the time with the station to get an average current
>>> of 20.9 mA...
>> Well, in suspend the CPU is in sleep mode and the DRAM in self-refresh. This
>> still needs some mA.
>> And we know that the IrDA receiver may still be turned on (known bug in GTA04A4
>> hardware). Since I don't know exactly what the Neil-kernel
>> does in suspend it may even be the RS232 that is not turned off.
> Is there anything I can do to check this?
The only way to check it correctly is by oscilloscope.
> Is there a way to turn off IrDA and/or RS232 explicitely (similar to the
Well, you could try to switch GPIO13 through /sys. But since I don't know how the
pinmux for suspend is set up the kernel might override any value during suspend.
And, immediately after changing GPIO13 the RS232 console will become inoperative.
BR and thanks for the test with modem-poweroff,
More information about the Community