:: Re: [maemo-leste] Droid 4 in 5.3-rc…
Página Principal
Delete this message
Reply to this message
Autor: Pavel Machek
Data:  
Para: Merlijn Wajer, maemo-leste, tony
Assunto: Re: [maemo-leste] Droid 4 in 5.3-rc1, development boards
Hi!

> (Off list to not be too spammy)


Merlijn wanted this to be off list, but ... I guess I want this archived.

> On 14/07/2019 02:52, Merlijn Wajer wrote:
> >> Now... there is more work to do in Droid4, but it should be mostly
> >> userland and patch merging. Is there some development board, where
> >> work of kernel hacker would be useful?
>
> One other thing, too: Power management on Nokia N900 would be an
> interesting one to me too, Maemo Leste gets about 8-10 hours of battery
> usage on 5.1. Wonder if we can get it closer to Fremantle
> (days/weeks).


Yeah, power management is a lot of fun :-(. And there are similar
problems on N900 and D4.

There's "off" mode on omap CPUs. It needs to be enabled to get real
power savings, but it is incompatible with some stuff, like with
display being on, and serial ports being enabled..

off mode is enabled by

echo 1 > /sys/kernel/debug/pm_debug/enable_off_mode

But that needs uart to be configured. From "demo/tefone", from unicsy
demo:

But... I believe I was able to enable the off mode, but I don't think
I got the days/weeks of battery life :-(.

Best regards,
                                Pavel


#!/usr/bin/python2
# -*- python -*-
# Test N900 phone

from __future__ import print_function

import sys
sys.path += [ "/usr/share/unicsy/lib" ]

import os
import time
from hardware import *

...

class Autosleep(Test):
    hotkey = "u"
    name = "aUtosleep"


    def handle_uart(m, path, on):
        if not os.path.exists(path):
            print("Skipping", path);
            return
        m.write_root(path+"device/power/autosuspend_delay_ms", "3000")
        m.write_root(path+"power/wakeup", "enabled")
        m.write_root(path+"power/control", "auto")


    def sleep_on(m, on):
        for i in [ 0, 1, 2, 3 ]:
            m.handle_uart( "/sys/class/tty/ttyO%d/" % i, on )


    def run(m):
        sy("sudo mount /dev/zero -t debugfs /sys/kernel/debug/")
        m.sleep_on(True)


        sy("killall mond")
        sy("./mond -s &")
        time.sleep(1)
        sy("killall mond")


        twl_test = "/sys/devices/platform/68000000.ocp/48070000.i2c/i2c-1/1-0048/48070000.i2c:twl@48:twl4030-usb/test"
        debug_brightness = "/sys/class/leds/debug::sleep/brightness"


        enable_access(debug_brightness)
        enable_access(twl_test)


        sy("echo 0xdead > " + twl_test)


        sy("echo 255 > " + debug_brightness)
        sy("sudo iw dev wlan0 set power_save on")
        m.verify()


    def verify(m):
        sy("sudo cat /sys/kernel/debug/pm_debug/count")



--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html