maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview (https://talk.maemo.org/showthread.php?t=96932)

mautz 2017-01-27 21:57

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Quote:

Originally Posted by shmerl (Post 1522514)
Can you enumerate, what exactly is usually using a blob? WiFi I suppose? Touchscreen? Interface to the modem?

Some of that stutf could be in those upstream patches already, some might not. It's probably good to make some table, describing what's missing.

I doubt they'll release anything, but same thing was with Adreno blobs. They were reverse engineered however.

Maybe someone should just compile the kernel and see if it boots anything:p

Then the blobs could be tested: https://developers.google.com/androi...ers#hammerhead

minimec 2017-01-28 01:03

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Quote:

Originally Posted by mautz (Post 1522515)
Could anyone please test this kernel and the bt on off 'scripts'? I don't have any BT devices here at the moment.

I can confirm that this hack is working. It is possible to switch off/on bluetooth and profit of suspend mode. My headset can connect without problems after toggling off/on bluetooth with your scripts.

I might have an idea for a systemd service including a desktop launcher.

Give me some time to work it out over the weekend...

mautz 2017-01-28 05:18

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Quote:

Originally Posted by minimec (Post 1522522)
I can confirm that this hack is working. It is possible to switch off/on bluetooth and profit of suspend mode. My headset can connect without problems after toggling off/on bluetooth with your scripts.

I might have an idea for a systemd service including a desktop launcher.

Give me some time to work it out over the weekend...

Thanks minimec!

A toogle would be nice. Take a look at schturmanns BT toogle on openrepos, this could easily be modified to reflect our needs.

After turning bt on could you please 'echo 1 > /proc/bluetooth/sleep/lpm' and test if it is still working?

lfc22 2017-01-28 19:13

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Quote:

Originally Posted by rinigus (Post 1522391)
On OPX, I have 60-150 s during a night and 0-40 s during a relatively active period of use. For reference, the CPU sleep % goes and stays at 97% during most of the time in a night.

rinigus, on my opx (cm12.1/2.0.5.6) I only get a max of ~63% CPU sleep. How can I find which unneeded processes/services are consuming CPU cycles and push sleep up to 95% w/o breaking basic functionality?

rinigus 2017-01-28 20:38

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Quote:

Originally Posted by lfc22 (Post 1522547)
rinigus, on my opx (cm12.1/2.0.5.6) I only get a max of ~63% CPU sleep. How can I find which unneeded processes/services are consuming CPU cycles and push sleep up to 95% w/o breaking basic functionality?

@lfc22 - its as off-topic as it gets in N5 thread, isn't it? :)

I would suspect that its network-related sync (email, calendar, ...), but you never know for sure. Try to disable the network and see if CPU sleep % would get larger. In the end, its trial and error. I don't think that I have optimized my setup to get these numbers, so it should be possible

lfc22 2017-01-28 23:57

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Quote:

Originally Posted by rinigus (Post 1522549)
@lfc22 - its as off-topic as it gets in N5 thread, isn't it? :)

hey, you started it... ;)
Thanks for the suggestions, I'll stay on topic next time :D

shmerl 2017-01-29 02:24

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Quote:

Originally Posted by mautz (Post 1522519)
Maybe someone should just compile the kernel and see if it boots anything:p

Then the blobs could be tested: https://developers.google.com/androi...ers#hammerhead

Thanks for the pointer! I'll try experimenting with upstream kernel to see what works and what not. But I never did it before, so it will take time for me to figure out what's where and how to do it. I've heard Plasma Mobile developers did some of that work already, so I can try pinging them for additional input.

shmerl 2017-01-29 02:38

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Founds this: https://stackoverflow.com/questions/...er-for-bcm4339

Key part:

Quote:

BCM4339 (chip inside Nexus 5) has an SDIO interface, which means that it has a driver implemented in HARDWARE (these devices are commonly named HardMAC device).

The driver that support the BCM4339 is brcmfmac (the SoftMAC version of the driver being brcmfsmac).
Apparently, brcmfmac itself is open source: http://lxr.free-electrons.com/source...mfmac/common.c

minimec 2017-02-05 20:48

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Regarding the bluetooth wakelock we face with the Nexus5, I can offer you a solution now, that will allow you to use bluetooth the way you used it until now and profit from Bluetooth LowPowerMode, without any interaction form your part.

After some input of the community on irc (#sailfishos-porters), and some discussion with 'mautz', I wrote a script, that should work quiet nicely with all Sailfishos ports, CM11,CM12, or future releases.

The script is a workaround for an existing kernel bug, that also some android users face. So the hope is, that we might not need that workaround some day in the future.

Please do some testing and tell me if it works for you.

Update
As stated by mautz, I forgot to mention that you need the latest kernel with 'bluetooth sleep' enabled.


The script can be downloaded here... <- New Version

Don't forget to...
Code:

chmod +x bt-sleep-monitor.sh
All information is in the script itself...

#title : bt-sleep-monitor.sh
#description : Bluetooth 'LowPowerMode' monitor for SailfishOS ports that face a bluetooth wakelock bug.
#author : minimec
#date : 20170206
#version : 0.3 (2nd release/code cleaned/with logfile for testing)
#usage : ./bash bt-sleep-monitor.sh & (first login to a root console with 'devel-su')
#kill script : devel-su killall bt-sleep-monitor.sh dbus-monitor
#follow log : tail -f /dev/shm/bt-sleep-monitor.log
#notes : Best use as systemd service
#================================================= =============================
#How it works... : LowPowerMode is disabled in two cases:
# - by enabling the bluetooth adapter, in case it is 'disabled'.
# - by powering on the display, in case the adapter is 'enabled'.
# The script switches between these modes automatically.
# After an 'action' is triggered you have 120sec. (default value) to connect a device.
# In case a device is connected, the script listens for 'disconnect' and will enable LPM again afterwards.
#================================================= =============================

mautz 2017-02-06 09:25

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
For minmecs script to work, you need my kernel with bt sleep enabled.

Update cm13 port.

Thanks to abranson

camera is now working, video recording not yet.


All times are GMT. The time now is 16:51.

vBulletin® Version 3.8.8