Fwd: [ltp] Maximum sleep time R52?

m h linux-thinkpad@linux-thinkpad.org
Mon, 20 Mar 2006 22:49:01 +0000


Forgot to reply to list...

---------- Forwarded message ----------
From: m h <sesquile@gmail.com>
Date: Mar 20, 2006 10:48 PM
Subject: Re: [ltp] Maximum sleep time R52?
To: "Igor V. Rafienko" <igorr@ifi.uio.no>


On 3/20/06, Igor V. Rafienko <igorr@ifi.uio.no> wrote:
> on Mar 20, 2006, 14:12, m h wrote:
>
> [ ... ]
>
> > I'm not using the modem.
> > Mostly just wireless....
>
>
> Try unloading usb modules, firewire modules, wireless modules. Check
> people's scripts on google for R52 (someone else is bound to have found
> something like that).

Will Google more.  Most references to R52s are for the ATI variety....

radeontools has been mentioned (basically, you need
> to find how much the laptop draws during sleep)
>

Again, I don't have an ati card.  Maybe I'll try vbetools.

FYI, I did a simple port of the script  (
http://www.thinkwiki.org/wiki/ACPI_sleep_power_drain_test_script ) to
python using my values:
date_before =3D 1142892198
bat_before =3D 49050

date_after =3D 1142893513
bat_after =3D 48780

diff =3D bat_after - bat_before
seconds =3D date_after - date_before
usage =3D (diff * 60. * 60)/seconds

print "before:", bat_before
print "after:", bat_after
print "diff", diff
print "seconds:", seconds
print "result:", usage

threshhold =3D 1000

if usage > threshhold:
    print "congrats"
else:
    print "affected"

$ python /tmp/bat.py
before: 49050
after: 48780
diff -270
seconds: 1315
result: -739.163498099
affected

It seems like there is a logic error in the script though...
Shouldn't the test for usage> threshhold be abs(usage) < threshhold?