Sailfish OS for OnePlus One


Will you flash Sailfish OS?

  1. Yes

    890 vote(s)
  2. No

    459 vote(s)
  3. May be, when it is stable enough.

    879 vote(s)
  1. Mecca EL
    Gingerbread Apr 9, 2015

    Mecca EL , Apr 9, 2015 :
    I'm using CM12.1, by Team Nocturnal, Oxygens firmware as primary. No problems with wifi at all, while under SF.

    vgrade and mvmsaikrishna like this.
  2. lozo2010
    Eclair Apr 9, 2015

  3. mykel_shoemaker
    Honeycomb Apr 9, 2015

  4. P0wnd
    Froyo Apr 10, 2015

    vgrade and horst58 like this.
  5. P0wnd
    Froyo Apr 10, 2015

    P0wnd , Apr 10, 2015 :
    You could try to install roamer, through the warehouse app or openrepos.

    If installed fill in the UI and accept. If it doesn't work after, try that link vgrade sent you.

    vgrade likes this.
  6. ccout
    Eclair Apr 10, 2015

    ccout , Apr 10, 2015 :
    @vgrade: I saw that you ask @yacuken to investigate droid-init. Since I had free time I did it myself. This is what I have found so far:

    The process that kept being respawn are 'time_daemon', 'qrngd' and 'quipc_main'.

    It fails because it can open /dev/hw_random even if /dev/hw_random exists and points to /dev/hwrng

    [[email protected] nemo]# ls -l /dev/hw* 
    lrwxrwxrwx 1 root root  5 Jun 12  1970 /dev/hw_random -> hwrng
    crw------- 1 root root 10, 183 Jun 12  1970 /dev/hwrng
    [[email protected] nemo]# strace /system/bin/qrngd -f
    open("/dev/hw_random", O_RDONLY|O_LARGEFILE) = -1 EACCES (Permission denied)
    • QUIPC_MAIN seems related to gps from what I gather. It failed due to missing liblowi_client.so nowhere to be found on device.
    [[email protected] nemo]# /system/bin/quipc_main 
    CANNOT LINK EXECUTABLE: could not load library "liblowi_client.so" needed by "/system/bin/quipc_main"; caused by library "liblowi_client.so" not found
    • Time_daemon. I'm not sure what it is used for but when I straced it, I could see that it failed to open a bunch of file
    [[email protected] nemo]# strace /system/bin/time_daemon
    open("/dev/log/main", O_WRONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOTDIR (Not a directory)
    open("/dev/log/radio", O_WRONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOTDIR (Not a directory)
    open("/dev/log/events", O_WRONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOTDIR (Not a directory)
    open("/dev/log/system", O_WRONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOTDIR (Not a directory)
    open("/dev/rtc0", O_RDONLY|O_LARGEFILE) = -1 EBUSY (Device or resource busy)
    As I'm not confident that I can resolve those problems, this is the best that I can do. Hope it helps.

    horst58, tomgus1, ameen123 and 6 others like this.
  7. vgrade
    Honeycomb Apr 10, 2015

    vgrade , Apr 10, 2015 :
    This is really great work and it makes me very happy to see this. I don't do this porting just to make sailfishOs run on other devices I do it for this reason as well. Bringing new developers to the project makes me as happy as making a new feature work. You are very welcome on IRC to talk more about these findings.

    We can disable time_deamon in the .rc as time is handled by sailfishOs. The rng issue looks like a permission problem and I think we don't need this service, could you check the IRC logs? As for quipc if that lib is missing on stock android then I'd say we don't need that service and it can be disabled as well in the .rc.

    Let me know if disabling these lets the device enter idle and reduce power consumption


    horst58, ccout, tomgus1 and 3 others like this.
  8. ccout
    Eclair Apr 10, 2015

    ccout , Apr 10, 2015 :
    Thanks for inviting me on IRC but as I am a slow writer I rather post on this forum if you don't mind.

    So regarding these issues, I disabled all those service + gsiff_daemon as I missed it before but it was also being respawn from times to times (but less than the others 3 services) and so far, everything seems to work as before and it feels that there is less drain on battery (to be confirmed)

    gsiff_daemon is related to gps but disabling it didn't seem to change the result of 'test_gps'...

    For qrngd, I think I got it working. Like you said it was a permission problem. If I do
    [[email protected] nemo]# chmod 0660 /dev/hwrng
    , I can launch qrngd.

    But, now, if I reboot it come back as 0600. So I found where the permissions are set and
    there were different 'rules' for /dev/hw_random in 3 different files.

    [[email protected] nemo]# grep hw_random /ueventd.* 
    /ueventd.bacon.rc:/dev/hw_random  0600  root  root
    /ueventd.qcom.rc:/dev/hw_random  0600  root  root
    /ueventd.rc:/dev/hw_random  0440  root  system
    So I comment the rules in /ueventd.qcom.rc and /ueventd.rc and change permission to 0660 in /ueventd.bacon.rc (copied from https://github.com/siteshwar/androi...lob/hybris-11.0-old/ueventd.hammerhead.rc#L45). But the changes don't take effect after a reboot. Permissions are back to 0600. Not sure how to fix this.

    Mecca EL, tomgus1 and CBpbxEcmecmBeH like this.
  9. mvmsaikrishna
    Ice Cream Sandwich Apr 10, 2015

    mvmsaikrishna , Apr 10, 2015 :
    Thanks for lending a hand in porting.
    - from Sailfish lovers :)

  10. ccout
    Eclair Apr 10, 2015

    ccout , Apr 10, 2015 :
    I just reboot SailfishOS and I was also unable to connect to wifi. Actually the wlan module didn't get load. A simple
    modprobe wlan
    as root fixed the problem without the need to reboot.

    Mecca EL and mvmsaikrishna like this.
  11. mvmsaikrishna
    Ice Cream Sandwich Apr 10, 2015

    mvmsaikrishna , Apr 10, 2015 :
    wow! thanks for the fix :)

    ccout likes this.
  12. mykel_shoemaker
    Honeycomb Apr 10, 2015

    mykel_shoemaker , Apr 10, 2015 :
    There is a good discussion on XDA S3 section on gsiff daemon.It may give some pointers or help.

    ccout likes this.
  13. Mecca EL
    Gingerbread Apr 10, 2015

    Mecca EL , Apr 10, 2015 :
    I left Sailfish active on my device, at roughly 12a est. Switched back to my primary at roughly 7:30 a est. I had 45% battery life left, from a fully charged state. SOT, I estimate at roughly an hour and half, using the browser and viewing Warehouse.
    Looking forward to some optimization, once we approach beta. I'll take better notes, with images, tonight for a proper baseline. I'll tweak my kernel, I'm on AK, and see if that has any effect on SFOS. If I see results, the community will be able to come up with all manner of optimal performance records.
    Man, this is exciting!!!

    mvmsaikrishna and CBpbxEcmecmBeH like this.
  14. mvmsaikrishna
    Ice Cream Sandwich Apr 10, 2015

    mvmsaikrishna , Apr 10, 2015 :
    Exciting , yeah!!!

    Mecca EL likes this.
  15. Deactivated User
    Apr 11, 2015

  16. mvmsaikrishna
    Ice Cream Sandwich Apr 11, 2015

    mvmsaikrishna , Apr 11, 2015 :
    Diztronic TPU Blue ;)

    Deactivated User likes this.
  17. ccout
    Eclair Apr 11, 2015

    ccout , Apr 11, 2015 :
    To be confirmed with more test but I think I found the culprit number 1 regarding battery consumption.
    All the cpu governor are set to 'performance' by default instead of 'interactive' on android.

    The following code fixes the problem (need to be run as root at every reboot)
    for i in `seq 0 3`; do echo interactive > /sys/devices/system/cpu/cpu$i/cpufreq/scaling_governor; done
    And now the phone hasn't lost a single percent of battery in the last 15min \o/

    I also install powertop from the repo. It advises to run 2 commands. The first one was
    iw dev wlan0 set power_save on
    and I forgot the 2nd one :(

    For those who want to test, first install powertop (every line of code must be run as root)
    zypper in powertop
    and then run it
    Go to the 'Tunables' tab by pressing 'Tab'. There, you will see a list of 'tunables' with either 'Good' or 'Bad' written in front of them. Just press 'Enter' on those with 'Bad'. That's it.

    The second command that powertop advises to run is:
    echo '1' > '/sys/devices/system/cpu/sched_mc_power_savings';
    And instead of running powertop and then 'Tab', etc...
    You can just run as root
    powertop --auto-tune
    Last edited: Apr 11, 2015

    horst58, Mecca EL, msri3here and 7 others like this.
  18. tomgus1
    Cupcake Apr 11, 2015

    tomgus1 , Apr 11, 2015 :
    @ccout Thanks for this. Love using SailfishOS but the battery drain was a big downer for me. Will try your guide and see how it goes :D

    ccout likes this.
  19. vgrade
    Honeycomb Apr 11, 2015

    vgrade , Apr 11, 2015 :
    Nice work,

    looking at init.qcom-common.rc its waiting on these two properties

    [[email protected] /]# setprop service.bootanim.exit 1
    [[email protected] /]# setprop init.svc.bootanim "stopped"

    as we don't run the bootanimation they are not getting set, setting them sets the required options


  20. t-uzun
    Honeycomb Apr 11, 2015

    t-uzun , Apr 11, 2015 :
    seems like you guys did it again! As you seemed to fix the battery drain option =)
    guys youre all awesome

    dipinrajan likes this.