Active Topics

 


Reply
Thread Tools
Posts: 635 | Thanked: 1,535 times | Joined on Feb 2014 @ Germany
#491
Originally Posted by shmerl View Post
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

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

The Following 2 Users Say Thank You to mautz For This Useful Post:
Posts: 97 | Thanked: 318 times | Joined on Feb 2012 @ Switzerland
#492
Originally Posted by mautz View Post
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...
 

The Following 5 Users Say Thank You to minimec For This Useful Post:
Posts: 635 | Thanked: 1,535 times | Joined on Feb 2014 @ Germany
#493
Originally Posted by minimec View Post
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?
 

The Following 5 Users Say Thank You to mautz For This Useful Post:
Posts: 118 | Thanked: 55 times | Joined on Jul 2013
#494
Originally Posted by rinigus View Post
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?
 

The Following User Says Thank You to lfc22 For This Useful Post:
Posts: 1,414 | Thanked: 7,547 times | Joined on Aug 2016 @ Estonia
#495
Originally Posted by lfc22 View Post
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
 

The Following 2 Users Say Thank You to rinigus For This Useful Post:
Posts: 118 | Thanked: 55 times | Joined on Jul 2013
#496
Originally Posted by rinigus View Post
@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
 

The Following User Says Thank You to lfc22 For This Useful Post:
Posts: 1,298 | Thanked: 2,277 times | Joined on May 2011
#497
Originally Posted by mautz View Post
Maybe someone should just compile the kernel and see if it boots anything

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.
 

The Following User Says Thank You to shmerl For This Useful Post:
Posts: 1,298 | Thanked: 2,277 times | Joined on May 2011
#498
Founds this: https://stackoverflow.com/questions/...er-for-bcm4339

Key part:

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
 

The Following User Says Thank You to shmerl For This Useful Post:
Posts: 97 | Thanked: 318 times | Joined on Feb 2012 @ Switzerland
#499
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.
#================================================= =============================

Last edited by minimec; 2017-02-06 at 19:45.
 

The Following 12 Users Say Thank You to minimec For This Useful Post:
Posts: 635 | Thanked: 1,535 times | Joined on Feb 2014 @ Germany
#500
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.

Last edited by mautz; 2017-02-06 at 10:24.
 

The Following 8 Users Say Thank You to mautz For This Useful Post:
Reply

Tags
hammerhead, nexus5, sailfishos, sfdroid


 
Forum Jump


All times are GMT. The time now is 04:17.