maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   SailfishOS 2.0 on Nexus 5 (https://talk.maemo.org/showthread.php?t=94620)

llelectronics 2016-02-20 22:29

Re: SailfishOS 2.0 on Nexus 5
 
Nope I checked the permissions.
And as the file is found but giving an error message it must be something else.

Running 2.0.0.10 btw. Maybe you have a newer version were it works.

frullewulle 2016-02-20 22:40

Re: SailfishOS 2.0 on Nexus 5
 
i've updated to 2.0.1.7, but don't think that does a lot

i don't change screen settings anymore after reboot.
every change there gives a bit higher cpu usage for both, sensors.qcom and sensorfwd

llelectronics 2016-02-20 23:37

Re: SailfishOS 2.0 on Nexus 5
 
Upgraded to 2.0.1.7 but no change. Still the same error message when I try to get this .so file to start.
So there must be something else different here.

What I noticed is that. When doing a big change in the accelerometer and pressing on the power button I immediately get the high cpu usage. Holding the phone still and pressing the power button until the lock screen appears and pressing it again and the sensor processes go immediately down again and won't go up at this stage.

Not sure whats wrong there but its reproducable everytime.

jellyroll 2016-02-21 12:27

Re: SailfishOS 2.0 on Nexus 5
 
Quote:

Originally Posted by frullewulle (Post 1499279)

temporary disabled sensors.qcom in init.hammerhead.rc for now


How did you disabled sensors.qcom in init.hammerhead.rc? Did you edit lines or just deleted some stuff?

frullewulle 2016-02-21 13:35

Re: SailfishOS 2.0 on Nexus 5
 
putting # in front of some specific sensor lines almost in the end of the file.

But have already restored it.
Now i'm trying to disabled some sensors in /etc/sensorsfw/primaryuse.conf
disabled accelerometer, magnetometeradaptor, gyroscopeadaptor, orientationadaptor

proximity and alsadpter are still working
huge improvement in cpu usage

i always restart the phone to be sure that every service is fully restarting

I believe that the orientationadapter is the main reason for the big cpu usage, and after a while also a bigger memory usage

llelectronics 2016-02-21 13:43

Re: SailfishOS 2.0 on Nexus 5
 
Quote:

I believe that the orientationadapter is the main reason for the big cpu usage, and after a while also a bigger memory usage
Yeah exactly that correspondents with my observations.

romu 2016-02-22 09:47

Re: SailfishOS 2.0 on Nexus 5
 
@llelectronics: just added your watchdog service to my N5, let you know how things are going. Thanks a lot, that could be really helpful/

llelectronics 2016-02-22 18:06

Re: SailfishOS 2.0 on Nexus 5
 
Just an update on my script or in general the restarting when process is to high for an amount of time.
I encountered already several times that lipstick or whatever does the rotation for the UI sometimes keeps hanging.
So "Messwerk" still shows the gyroscope still working though apps don't rotate anymore.
Not sure what triggers that but I fear it might be reloading the sensorfwd service at a specific point where it kills lipsticks ability to use it.

The only solution I found so far for this restarting lipstick via settings utitlites (or using the terminal command)

So in general this script or any other script are just workarounds that might trigger sideeffects.
We need to fix the real problem somehow that is clearly connected to the gyroscope sensors.

jellyroll 2016-02-22 23:12

Re: SailfishOS 2.0 on Nexus 5
 
The best solution I could find so far is disabling some sensors. This results in a longer battery life.

llelectronics 2016-02-23 00:25

Re: SailfishOS 2.0 on Nexus 5
 
Based on the suggestion to replace the binary blob .so file.
I searched for one that
1) works on my version without issues
2) does not suffer from that bug

and tada I found an .so file from Android 5.0.2 that works flawlessly and for the first few hours I am testing it currently I had no high cpu usage of sensor.qcom or sensorfw anymore.

Before testing it on your own. Remove my script or the .service file or any other solution you had installed that restarts sensorfwd to make sure it works for you to.
I tested it on my updated 2.0.1 installation.

Get this sensors.msm8974.so file extract it and put the sensors.msm8974.so into /vendor/lib/hw/

Make sure to make a backup of the file thats already in there just in case.

After that reboot your device.
Now try testing with top open in a ssh session and see if it works for you.

For me its working fine and I now get a clearly longer battery life as its also using almost nothing of the cpu when using the accelerometer to switch orientation in browser or video player. (or do the shaking test)

Hope that settles it finally :P

RealJohnGalt 2016-02-23 06:13

Re: SailfishOS 2.0 on Nexus 5
 
I have two issues on 2.0.1.7, and I have no clue if they're regressions or original issues (so help would be appreciated).

1) When playing music through bluetooth, it plays for anywhere from 2 seconds to 2 minutes (rough guesses), then stops playing completely. When I turn it off, the bluetooth device thinks it's still connected. To turn bluetooth back on, I need to reboot the phone.

2) When I use flash with the camera, I either get extraordinarily over bright photos, or green photos. I'm not sure why it varies.

I'll be getting logs when I get a chance and will help to figure the issues out, I just wanted to narrow it down a bit first since I'm not sure if these issues are present on previous builds.

PS: great work llelectronics. Maybe this is a sign we should work on moving to cm12 based builds.

boebbele 2016-02-23 06:56

Re: SailfishOS 2.0 on Nexus 5
 
How can I copy this file in /vendor/lib/hw/?? If I'm root I became this Error: "only read filesystem". :-(

RealJohnGalt 2016-02-23 07:15

Re: SailfishOS 2.0 on Nexus 5
 
Quote:

Originally Posted by boebbele (Post 1499553)
How can I copy this file in /vendor/lib/hw/?? If I'm root I became this Error: "only read filesystem". :-(

I recommend terminal or ssh paired with "devel-su cp -f SENSOR_SO_LOCATION /vendor/lib/hw/"

BluesLee 2016-02-23 08:36

Re: SailfishOS 2.0 on Nexus 5
 
Quote:

Originally Posted by llelectronics (Post 1499530)
Based on the suggestion to replace the binary blob .so file.
I searched for one that
1) works on my version without issues
2) does not suffer from that bug

and tada I found an .so file from Android 5.0.2 that works flawlessly and for the first few hours I am testing it currently I had no high cpu usage of sensor.qcom or sensorfw anymore.

Before testing it on your own. Remove my script or the .service file or any other solution you had installed that restarts sensorfwd to make sure it works for you to.
I tested it on my updated 2.0.1 installation.

Get this sensors.msm8974.so file extract it and put the sensors.msm8974.so into /vendor/lib/hw/

Make sure to make a backup of the file thats already in there just in case.

After that reboot your device.
Now try testing with top open in a ssh session and see if it works for you.

For me its working fine and I now get a clearly longer battery life as its also using almost nothing of the cpu when using the accelerometer to switch orientation in browser or video player. (or do the shaking test)

Hope that settles it finally :P

I am impressed llelectronics, the Android 5.0.2 library for sensors seems to work very well for me, tested with SFOS 2.0.1.7. I am going to share this information with sledges so that he can decide how to handle it in the mainstream.

ps LowPowerMode doesn't work for me.

wganis 2016-02-23 09:00

Re: SailfishOS 2.0 on Nexus 5
 
alo i want to update to 2.0.1.7 is sfdroid working well on 2.0.1.7 ? tks sorry for my bad english

romu 2016-02-23 09:23

Re: SailfishOS 2.0 on Nexus 5
 
I probably made something wrong with the systemd service because it didn't seem to work as expected.

So, I'm trying the "new" sensors.msm8974.so and PROBLEM: the proximity sensor does not work at all. Rebooted the phone twice.

And no need to reboot the phone, just restart the sensors framework to take new drivers into account.

llelectronics 2016-02-23 09:52

Re: SailfishOS 2.0 on Nexus 5
 
Do you get any error message regarding that sensor when restarting the sensorfwd service in journalctl (down at the bottom reachable by pressing GG on the keyboard)?

And just for reference the sensor works fine here.

romu 2016-02-23 10:16

Re: SailfishOS 2.0 on Nexus 5
 
Here is the journal when I restart the sensors framework with your driver:

Code:

Feb 23 11:10:04 Jolla systemd[1]: Stopping Sensor daemon for sensor framework...
Feb 23 11:10:04 Jolla systemd[1]: Starting Sensor daemon for sensor framework...
Feb 23 11:10:04 Jolla sensorfwd[7135]: [SocketHandler]: Unlinked stale socket "/var/run/sensord.sock"
Feb 23 11:10:04 Jolla sensorfwd[7135]: Created a daemon
Feb 23 11:10:04 Jolla systemd[1]: Started Sensor daemon for sensor framework.
Feb 23 11:10:04 Jolla lipstick[987]: [D] AbstractSensorChannelInterface::stopFinished:185 - "No such object path '/SensorManager/orientationsensor'"
Feb 23 11:10:12 Jolla sensors.sh[459]: 0.0
Feb 23 11:10:12 Jolla sensors.sh[459]: CPU Usage of sensors.qcom: 0
Feb 23 11:10:12 Jolla sensors.sh[459]: Nothing to do

Just tried again to swap between your driver and the original one, same, proximity doesn't work.

llelectronics 2016-02-23 10:42

Re: SailfishOS 2.0 on Nexus 5
 
Ah so it didn't work before for you.
Hmm... maybe its broken or you are using a different revision of nexus 5 then I do (or others)
I don't see an error message on the driver not loading though because of errors in your journalctl log.

m4r0v3r 2016-02-23 10:45

Re: SailfishOS 2.0 on Nexus 5
 
if this issue has been fixed maybe its time to look at a cm12 port to see if the drivers have improved at all.

nh1402 2016-02-23 10:49

Re: SailfishOS 2.0 on Nexus 5
 
Quote:

Originally Posted by m4r0v3r (Post 1499569)
if this issue has been fixed maybe its time to look at a cm12 port to see if the drivers have improved at all.

why not cm13 as base? (mainly for sfdroid)

boebbele 2016-02-23 11:19

Re: SailfishOS 2.0 on Nexus 5
 
Quote:

Originally Posted by RealJohnGalt (Post 1499554)
I recommend terminal or ssh paired with "devel-su cp -f SENSOR_SO_LOCATION /vendor/lib/hw/"

Dont work for me! "only readable filesystem"

jellyroll 2016-02-23 12:22

Re: SailfishOS 2.0 on Nexus 5
 
Quote:

Originally Posted by boebbele (Post 1499572)
Dont work for me! "only readable filesystem"

Move the file to /android/media/0/ start sfdroid and copy it from /android/media/0/ to /vendor/lib/hw/ by using a root file explorer.

boebbele 2016-02-23 14:04

Re: SailfishOS 2.0 on Nexus 5
 
Quote:

Originally Posted by jellyroll (Post 1499580)
Move the file to /android/media/0/ start sfdroid and copy it from /android/media/0/ to /vendor/lib/hw/ by using a root file explorer.

It works! Thank you!

JohnHughes 2016-02-23 17:40

Re: SailfishOS 2.0 on Nexus 5
 
Overly complex bit of script:

Code:

sensors_pid=$(ps aux | grep sensors.qcom | grep -v grep | awk '{print $2}')
Could just do
Code:

sensors_pid=$(ps ax | awk '/sensors.qcom$/{print $1}')
And, of course,
Code:

cpu_usage=$(top -b -p $sensors_pid -n1 | grep $sensors_pid | awk '{print $9}')
Could be
Code:

cpu_usage=$(top -b -p $sensors_pid -n1 | awk  -v pid=$sensors_pid '$1 == pid {print $9}')
(edited to get rid of more excess grep's)

frullewulle 2016-02-23 17:45

Re: SailfishOS 2.0 on Nexus 5
 
even with a better blob, after a while, i still see a bigger memory usage of sensors.qcom
even more then 12 Mb after a day, and we start with 8 à 900 kb

so still a memory hole somewhere.

i was thinking to try with mixed sensors solution as mentioned in SailfishOS-HardwareAdaptationDevelopmentKit-1.1.1 chapter 13.9

https://github.com/mer-packages/sens...nsord-tbj.conf

llelectronics 2016-02-23 18:28

Re: SailfishOS 2.0 on Nexus 5
 
Quote:

Overly complex bit of script:
...
I don't want to start a flamewar or discussion about programming styles.
But in general grep is faster than awk most of the times :)


Quote:

even with a better blob, after a while, i still see a bigger memory usage of sensors.qcom
even more then 12 Mb after a day, and we start with 8 à 900 kb
Yeah I also noticed that it is using quite some RAM.
Lets see if it will stop rising or not or if there is another solution.
(There are several threads for Android about sensors.qcom memory usage)

Quote:

i was thinking to try with mixed sensors solution as mentioned in SailfishOS-HardwareAdaptationDevelopmentKit-1.1.1 chapter 13.9
Sounds interesting. Keep us updated on this.

m4r0v3r 2016-02-23 23:24

Re: SailfishOS 2.0 on Nexus 5
 
Quote:

Originally Posted by nh1402 (Post 1499570)
why not cm13 as base? (mainly for sfdroid)

weve already spoken about this, am ghosalmartin, ill probably be taking a look this weekend

romu 2016-02-25 08:13

Re: SailfishOS 2.0 on Nexus 5
 
Hi,
I've a problem with the watchdog script. Yesterday night, my sensors were obviously crashed. I checked the systemd service and it was running.

So, I see some possibilities:
  • I did a bad watchdog service setup
  • The watchdog script is buggy
  • The sensors framework can crash without actually eating enough CPU to trigger the watchdog

Any idea?

llelectronics 2016-02-25 11:10

Re: SailfishOS 2.0 on Nexus 5
 
Did you start messwerk to see if it was still showing something for accelerometer or orientation? Maybe it was the effect I described before where lipstick lost orientation sensor capability.

Anyhow I advise everyone to stop using watchdog and just replace the sensors so file like described in my post.
It works way better this way and running it for a couple of days I can clearly see an improved battery life.
The memory leak thing is a minor issue in my opinion as it is not always doing it. I have a memory usage about 3 MB for 2 days already so its not even an issue always.
I did not managed to track when and why the menory usage grows yet.

BluesLee 2016-02-25 11:45

Re: SailfishOS 2.0 on Nexus 5
 
Quote:

Originally Posted by llelectronics (Post 1499773)
Did you start messwerk to see if it was still showing something for accelerometer or orientation? Maybe it was the effect I described before where lipstick lost orientation sensor capability.

Anyhow I advise everyone to stop using watchdog and just replace the sensors so file like described in my post.
It works way better this way and running it for a couple of days I can clearly see an improved battery life.
The memory leak thing is a minor issue in my opinion as it is not always doing it. I have a memory usage about 3 MB for 2 days already so its not even an issue always.
I did not managed to track when and why the menory usage grows yet.

For me proximity sensors do not work at all with the Android 5 sensor*.so file. I rebooted several times and checked with Messwerk and MCE low power mode which stopped working, romu has similar issues.

llelectronics 2016-02-25 12:23

Re: SailfishOS 2.0 on Nexus 5
 
Quote:

For me proximity sensors do not work at all with the Android 5 sensor*.so file. I rebooted several times and checked with Messwerk and MCE low power mode which stopped working, romu has similar issues.
Ok very strange
Running on 2.0.1.7 ?

I wonder what could be the difference between our devices then as it is running fine here.
If it isn't software then it needs to be hardware.

romu 2016-02-25 12:24

Re: SailfishOS 2.0 on Nexus 5
 
Yes, as @BluesLee wrote, this is just not an option if proximity sensor does not work.

llelectronics 2016-02-25 15:49

Re: SailfishOS 2.0 on Nexus 5
 
So then we have to find out whats the difference between our installations.

I installed the image like instructed here: https://wiki.merproject.org/wiki/Ada...eps_to_install

Installed via CWM Recovery. Then upgraded like instruced in the same wiki to the latest version.
Did you install via another method ? Maybe used another cm base ?

If not. Then we need to find out if there is different hardware involved. But I hope it is only a software issue and not hardware related because that would mean we need different drivers for different models which makes everything a lot more complicated.

JohnHughes 2016-02-25 16:47

Re: SailfishOS 2.0 on Nexus 5
 
Quote:

Originally Posted by llelectronics (Post 1499628)
I don't want to start a flamewar or discussion about programming styles.
But in general grep is faster than awk most of the times :)

Yes, but is two greps plus one awk faster than just one awk?

llelectronics 2016-02-25 17:26

Re: SailfishOS 2.0 on Nexus 5
 
Quote:

Yes, but is two greps plus one awk faster than just one awk?
Yes as the last awk is not "grepping" strings :)

BluesLee 2016-02-25 18:54

Re: SailfishOS 2.0 on Nexus 5
 
Quote:

Originally Posted by llelectronics (Post 1499798)
So then we have to find out whats the difference between our installations.

I installed the image like instructed here: https://wiki.merproject.org/wiki/Ada...eps_to_install

Installed via CWM Recovery. Then upgraded like instruced in the same wiki to the latest version.
Did you install via another method ? Maybe used another cm base ?

If not. Then we need to find out if there is different hardware involved. But I hope it is only a software issue and not hardware related because that would mean we need different drivers for different models which makes everything a lot more complicated.

I am using TWRP recovery and Multirom, romu? I will check things at the weekend.

frullewulle 2016-02-25 20:25

Re: SailfishOS 2.0 on Nexus 5
 
Quote:

Originally Posted by llelectronics (Post 1499798)
So then we have to find out whats the difference between our installations.

I installed the image like instructed here: https://wiki.merproject.org/wiki/Ada...eps_to_install

Installed via CWM Recovery. Then upgraded like instruced in the same wiki to the latest version.
Did you install via another method ? Maybe used another cm base ?

If not. Then we need to find out if there is different hardware involved. But I hope it is only a software issue and not hardware related because that would mean we need different drivers for different models which makes everything a lot more complicated.

your blob file doesn't work for me either
i wonder if it depends how we unpack the file

can you upload your file again without compressing?

or for those who have problems with your blob, that they can try with mine fot couple of pages back in this thread

romu 2016-02-25 21:01

Re: SailfishOS 2.0 on Nexus 5
 
Multirom for sure and probably TWRP too, if this is the one with a black background and buttons as big grey rectangle, right?

llelectronics 2016-02-25 21:46

Re: SailfishOS 2.0 on Nexus 5
 
Quote:

Originally Posted by frullewulle (Post 1499827)
your blob file doesn't work for me either
i wonder if it depends how we unpack the file

can you upload your file again without compressing?

Here is the file without compression:
https://www.dropbox.com/s/pgqv0bqobd...sm8974.so?dl=0

And the rights when placed in the correct folder:
Quote:

-rw-r--r-- 1 root root 165292 Feb 23 01:03 /vendor/lib/hw/sensors.msm8974.so


Quote:

Multirom for sure and probably TWRP too, if this is the one with a black background and buttons as big grey rectangle, right?
Yes.
And btw. I also have multirom :)


All times are GMT. The time now is 15:32.

vBulletin® Version 3.8.8