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)

jellyroll 2016-02-18 17:31

Re: SailfishOS 2.0 on Nexus 5
 
Quote:

Originally Posted by eaanv (Post 1499149)
can anyone help me upgrade to 2.0.0.10 version? i tried many times and always say "error with repo.merproject.org".

PLEASE! http://i68.tinypic.com/24zdcsm.jpg

You need to start with
Code:

devel-su sed -i -e "s|^adaptation=.*$|adaptation=http://repo.merproject.org/obs/nemo:/testing:/hw:/lge:/hammerhead/sailfish_latest_armv7hl/|" /usr/share/ssu/repos.ini
and set the latest version.
Code:

ssu release 2.0.1.7
It's also better to change your language settings back to English.

eaanv 2016-02-18 18:25

Re: SailfishOS 2.0 on Nexus 5
 
I did it and I'm still on the same version. http://uploads.tapatalk-cdn.com/2016...bd5bd292e3.jpg

eaanv 2016-02-18 18:26

Re: SailfishOS 2.0 on Nexus 5
 
Quote:

Originally Posted by jellyroll (Post 1499162)
You need to start with
Code:

devel-su sed -i -e "s|^adaptation=.*$|adaptation=http://repo.merproject.org/obs/nemo:/testing:/hw:/lge:/hammerhead/sailfish_latest_armv7hl/|" /usr/share/ssu/repos.ini
and set the latest version.
Code:

ssu release 2.0.1.7
It's also better to change your language settings back to English.

OK, I'll do it. Thanks

llelectronics 2016-02-19 23:53

Re: SailfishOS 2.0 on Nexus 5
 
I created an alternative workaround for the sensor services running amok in the background and eating cpu thus battery life.
I was not so happy that I need to compile a python library for the proposed fix to test, so I took a look at the python script and wrote my own version of it in a more simpler way in bash script.

You can download it from here: https://www.dropbox.com/s/86wvsayyg5...ensors.sh?dl=0

You don't need python just execute the script and let it running.
You can also use the service for systemd and edit it to use this bash script instead of the python one. I also did that here: https://www.dropbox.com/s/xs7rkzcpdh...l.service?dl=0
(see the .service file check_sensors.sh needs to be put into /home/nemo if you don't want to change the location)

In fact the bash script is so small I can attach the 29 lines directly here. What it does should be self explanatory:
Code:

#!/bin/bash
 
# This checks every 1/2 minute and kills if
# sensors.qcom process is eating more than 8% CPU for 1 minute
 
TERM=linux
export TERM
 
kill_count=0
 
while true; do
sensors_pid=$(ps aux | grep sensors.qcom | grep -v grep | awk '{print $2}')
cpu_usage=$(top -b -p $sensors_pid -n1 | grep $sensors_pid | awk '{print $9}')
echo $cpu_usage
echo "CPU Usage of sensors.qcom: ${cpu_usage/.*}"
if [[ ${cpu_usage/.*} -ge 8 ]]; then
        if [[ $kill_count -ge 1 ]]; then
                echo "CPU Usage of sensors.qcom too high restarting..."
                systemctl restart sensorfwd
                kill_count=0
        else
                echo "CPU Usage of sensors.qcom too high! Setting kill_count + 1"
                kill_count=$((kill_count+1))
        fi
else
        echo "Nothing to do"
fi
sleep 30
done

If anyone with an bugzilla account could forward this to the bugtracker it would be great. (I don't have an account there and registration is disabled)

BluesLee 2016-02-20 07:29

Re: SailfishOS 2.0 on Nexus 5
 
Quote:

Originally Posted by llelectronics (Post 1499256)
I created an alternative workaround for the sensor services running amok in the background and eating cpu thus battery life.
I was not so happy that I need to compile a python library for the proposed fix to test, so I took a look at the python script and wrote my own version of it in a more simpler way in bash script.
...
If anyone with an bugzilla account could forward this to the bugtracker it would be great. (I don't have an account there and registration is disabled)

Done, there's a small typo in the service, killall command.

llelectronics 2016-02-20 09:09

Re: SailfishOS 2.0 on Nexus 5
 
Thanks fixed that typo :)

frullewulle 2016-02-20 17:54

Re: SailfishOS 2.0 on Nexus 5
 
i'm also looking to this sensors.qcom error except i rather would like to find the reason for its behavior.

i don't see errors when enabling debug for sensorfwd
(it are exactly the same things that appear in journalctl -af on jolla phone and on nexus5)

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

i've seen that in cm 13 and 12.1 the build.prop fiole has changed.

it's nor longer ro.qc.sensor.xxx but it's now ro.qti.sensors.xxx
i would like to find a way to disable each specific sensors to find which one exactly is the reason for the high cpu usage

someone else a suggestion to achieve this?

regards

frullewulle 2016-02-20 20:48

Re: SailfishOS 2.0 on Nexus 5
 
1 Attachment(s)
I think i found a solution.
I've replaced sensors.msm8974.so in /vendor/lib/hw with the one from the 6.0.1 android rom and now sensors.qcom en sensorfwd do stay below 1%

Can somenone else try this too?
(unzip attached file before copying into the proper directory)

llelectronics 2016-02-20 21:58

Re: SailfishOS 2.0 on Nexus 5
 
Hmm... replacing it on my system does not work.
After a restart sensors won't work at all.

Did you modified anything else to make it work ?

journalctl shows me this when trying to start sensorfwd service:

Quote:

Feb 20 22:54:48 Jolla sensorfwd[2268]: Node ' "proximityadaptor" ' state changed to invalid
Feb 20 22:54:48 Jolla sensorfwd[2268]: SensorManagerError: "adaptor 'proximityadaptor' can not be started"
Feb 20 22:54:48 Jolla sensorfwd[2268]: Node ' "proximitysensor" ' state changed to invalid
Feb 20 22:54:48 Jolla sensorfwd[2268]: "proximitysensor instantiation failed"
Feb 20 22:54:48 Jolla sensorfwd[2268]: SensorManagerError: "sensor has not been instantiated"
Feb 20 22:54:48 Jolla sensorfwd[2268]: SensorManagerError: "requested sensor id 'alssensor' not registered"
Feb 20 22:54:48 Jolla sensorfwd[2268]: int HybrisManager::handleForType(int) No sensor of type: 1
Feb 20 22:54:48 Jolla sensorfwd[2268]: Node ' "accelerometeradaptor" ' state changed to invalid
Feb 20 22:54:48 Jolla sensorfwd[2268]: SensorManagerError: "adaptor 'accelerometeradaptor' can not be started"
Feb 20 22:54:48 Jolla sensorfwd[2268]: ASSERT: "accelerometerAdaptor_" in file accelerometerchain.cpp, line 48
Feb 20 22:54:48 Jolla systemd[1]: sensorfwd.service: main process exited, code=killed, status=6/ABRT

frullewulle 2016-02-20 22:12

Re: SailfishOS 2.0 on Nexus 5
 
rebooted afterwards...
have put debug mode back to warning
changed the name of the original file to sensors.msm8974.so.bak
to be sure that the copy infiletug root worked well, maybe filepermissions?


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

vBulletin® Version 3.8.8