:: Re: [maemo-leste] Droid 4 in 5.3-rc…
Top Page
Delete this message
Reply to this message
Author: Merlijn Wajer
Date:  
To: Pavel Machek, maemo-leste, tony
Subject: Re: [maemo-leste] Droid 4 in 5.3-rc1, development boards
Hi Pavel,

On 21/07/2019 23:34, Pavel Machek wrote:
> Hi!
>
>> (Off list to not be too spammy)
>
> Merlijn wanted this to be off list, but ... I guess I want this archived.


Makes sense!

>> 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")


I don't have a device/power path, just power/ (with autosuspend_delay_ms
in there)

Also don't have a wakeup file, but the control file is there.

>
>     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"


I don't have this `/test` path in
/sys/devices/platform/68000000.ocp/48070000.i2c/i2c-1/1-0048/48070000.i2c:twl@48:twl4030-usb
- any option I need?

>         debug_brightness = "/sys/class/leds/debug::sleep/brightness"


What does this do, exactly?

>
>         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")

>
>


Thanks,
Cheers,
Merlijn