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 2016-11-06 03:55

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Why don't you undervolt the frequencies independently? I can undervolt 300Mhz frequency down to 650mV rockstable. This is by far the most important frequency to undervolt, because the phone (should) stay the most time at this frequency.

Which powertop version did you use? With 2.7 i get errors about missing functions in the kernel and i*m not in the mood to compile a new one right now...

The blu_active governor needs alot of tweaking to be more battery-friendly than conservative. In its default configuration it goes way to fast to the highest frequency and stays there too long. So, a few tweaks are needed...

minimec 2016-11-06 10:50

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

Originally Posted by mautz (Post 1518112)
Which powertop version did you use? With 2.7 i get errors about missing functions in the kernel and i*m not in the mood to compile a new one right now...

Indeed I got this message too. Still I can use powertop and see no problem when the program is running. In addition I get that 'devfreq' message when stopping powertop.
Code:

PowerTOP v2.7 needs the kernel to support the 'perf' subsystem   
as well as support for trace points in the kernel:
...

"Devfreq not enabled"

If you cannot run powertop on your phone, maybe first try
Code:

rm /var/cache/powertop/saved_parameters.powertop
Quote:

Originally Posted by mautz (Post 1518112)
Why don't you undervolt the frequencies independently? I can undervolt 300Mhz frequency down to 650mV rockstable.

I simply did not know how far I can go, so I just started with the values mentioned above by deprecated. Now I tried 650mV @ 300Mhz... and my phone crashed on me after some time.

I will continue to test some frequencies and also hope that others will post their values here.

mautz 2016-11-06 13:02

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Powertop problem is solved.

Here's my current voltage table:
Code:

300mhz: 650 mV
422mhz: 690 mV
652mhz: 725 mV
729mhz: 735 mV
883mhz: 755 mV
960mhz: 765 mV
1036mhz: 775 mV
1190mhz: 810 mV
1267mhz: 820 mV
1497mhz: 855 mV
1574mhz: 870 mV
1728mhz: 900 mV
1958mhz: 945 mV
2265mhz: 1025 mV

But i'm not done yet. For testing the individual frequencies, just use the userspace governor an dset it to the desired cpu speed. Put load on the cpu and change the frequency. If the system crashes, you've gone too low, of course.

And you are right 'blu_active' uses more power than 'conservative'(around 250mw more). This was the governor i also always used.But it is less power hungry than the original 'interactive' governor(about 250mw less).

I'll try to add a another governor to the kernel which is based on conservative.

minimec 2016-11-06 21:06

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
I worked out some settings that I will test during the week on my 'daily runner' Nexus 5 (PVS 2 binned SoC.), using the new 'mautz-kernel'...

# Set CPU governor to 'conservative'
Code:

/bin/echo "conservative" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
# Voltage table: -100mV (300mhz+422mhz), -70mV (652mhz-1267mhz), -60mV (1497mhz-1728mhz), -50mV (1958mhz+2265mhz)
Code:

/bin/echo "675 675 725 735 755 765 775 795 805 850 865 895 945 1000" > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table
# Set max GPU Clock from 450mhz to 320mhz
Code:

/bin/echo "320000000" > /sys/class/kgsl/kgsl-3d0/max_gpuclk
# Set Simple GPU Governor (default: 5, 6000)
Code:

/bin/echo "4" > /sys/module/msm_kgsl_core/parameters/simple_laziness
Code:

/bin/echo "7000" > /sys/module/msm_kgsl_core/parameters/simple_ramp_threshold

mautz 2016-11-07 07:58

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

New features:
Code:

Added CPU Governors:

Slim

A new governor from the cm branch and the slimrom project. This is a performance optimized governor and has been tuned a lot for newer devices such as the One Plus One.

Nightmare

A PegasusQ modified, less aggressive and more stable. A good compromise between performance and battery. In addition to the SoD is a prevention because it usually does not hotplug.

Pegasusq/Pegasusd

The Pegasusq / d is a multi-core based on the Ondemand governor and governor with integrated hot-plugging. It is quite stable and has the same battery life as ondemand. Ongoing processes in the queue, we know that multiple processes can run simultaneously on. These processes are active in an array, which is a field called "Run Queue" queue that is ongoing, with their priority values ​​arranged (priority will be used by the task scheduler, which then decides which process to run next).

To ensure that each process has its fair share of resources, each will run for a certain period and will eventually stop and then again placed in the queue until it is your turn again. If a program is terminated, so that others can run the program with the highest priority in the current queue is executed.

Lionheart:

Lionheart is a conservative-based governor which is based on samsung's update3 source.
The tunables (such as the thresholds and sampling rate) were changed so the governor behaves more like the performance one, at the cost of battery as the scaling is very aggressive.

ZZmoove

The ZZmoove Governor by ZaneZam is optimized for low power consumption when the screen off, with particular attention to the limitation of consumption applications in the background with the screen off, such as listening to music. The unique feature with ZZmoove is that it has predefined profiles and allows profile switching. This governor is still a WIP as the developer is constantly giving updates!
In short:
So what you can expect now from this thingy is a battery-friendly behaving hotplug conservative governor which
uses a frequency lookup table for faster upscaling (so called "smooth scaling") So this is more a energy-safer than a performer.

ZZmoove profiles
Code:

1.for Default (set governor defaults)
2.for Yank Battery -> old untouched setting (a very good battery/performance balanced setting DEV-NOTE: highly recommended!)
3.for Yank Battery Extreme -> old untouched setting (like yank battery but focus on battery saving)
4.for ZaneZam Battery -> old untouched setting (a more 'harsh' setting strictly focused on battery saving DEV-NOTE: might give some lags!)
5.for ZaneZam Battery Plus -> NEW! reworked 'faster' battery setting (DEV-NOTE: recommended too!  )
6.for ZaneZam Optimized -> old untouched setting (balanced setting with no focus in any direction DEV-NOTE: relict from back in the days, even though some people still like it!)
7.for ZaneZam Moderate -> NEW! setting based on 'zzopt' which has mainly (but not strictly only!) 2 cores online
8.for ZaneZam Performance -> old untouched setting (all you can get from zzmoove in terms of performance but still has the fast down scaling/hotplugging behaving)
9.for ZaneZam InZane -> NEW! based on performance with new auto fast scaling active. a new experience!
10.for ZaneZam Gaming -> NEW! based on performance with new scaling block enabled to avoid cpu overheating during gameplay
11.for ZaneZam Relax -> NEW! based on moderate (except hotplug settings) with relaxed sleep settings (to react audio/bluetooth/wakeup issues)
(since version 0.9 beta4: cpu temperature threshold of 65°C enabled if exynos4 cpu temperature reading support was compiled with the governor)

The governor profile can be changed by 'echoing' the corresponding number into /sys/devices/system/cpu/cpufreq/zzmoove/profile_number

This time i compiled two different flashable Zips.

This ZIP has blu_plug governor included and this one NOT.

Because i haven't found a way to disable the blu_plug governor, i made the ZIP without it, if you want to try out ZZmooves own hotplugging driver.
If you want to use ZZmoove with blu_plug, you should disable hotplugging in ZZmooves settings.

Sources have been updated.

Thanks to all the people whose original work i have added and of course all the people who made SFOS possible on the N5.

Have fun.

I'm going to add some more features to the kernel, if you have any wishes, please let me know.

minimec 2016-11-07 12:51

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

Originally Posted by mautz (Post 1518220)
This time i compiled two different flashable Zips.

This ZIP has blu_plug governor included and this one NOT.

Could it be, that you posted a wrong SFOS-custom.zip? It seems that the 'zzmove' governor is not included in the kernel just downloaded and tested.

mautz 2016-11-07 15:38

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
CPU or Hotplug governor, or both?

minimec 2016-11-07 16:20

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

Originally Posted by mautz (Post 1518254)
CPU or Hotplug governor, or both?

I would say both...

Here is what I tried:

I wanted to check the default settings of the "zzmoove" cpu governor, but '/sys/devices/system/cpu/cpufreq/zzmoove/' doesn't exist.

I then simply tried to set the governor with 'echo "zzmoove" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor'. That resulted in an error.

Last I tried 'find / -name "*zzmoove*' as root. Nothing is found.

mautz 2016-11-07 17:42

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Could you please download and flash it again? I downloaded tge zip, flashed it and zzmoove is working. If you still have problems we can sort them out on IRC later.

minimec 2016-11-07 19:46

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

Originally Posted by mautz (Post 1518258)
Could you please download and flash it again? I downloaded tge zip, flashed it and zzmoove is working. If you still have problems we can sort them out on IRC later.

I may have been distracted by the "update hell" I had, upgrading to 2.0.2.51 "Aurajoki". It took ages and I had to restart the upgrade process three times... ;)

Indeed the 'zzmoove' governor is available. The clue is, that you have to activate the governor first. Then, and only then the "/sys/devices/system/cpu/cpufreq/zzmoove/profile_number" file will be available.

Still... I prefer the "conservative" governor.

deprecated 2016-11-07 20:24

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

I've flashed the new SFOS-custom.zip four times now. The first time I was able to load zzmove once by:

[root@Nexus5 cpufreq]# echo "zzmoove" > scaling_governor

Now, I rebooted and tried again:

[root@Nexus5 cpufreq]# echo "zzmoove" > scaling_governor
bash: echo: write error: Invalid argument

I've reflashed the kernel several times, all with the same result. I can't get zzmoove to load. Any ideas? Thanks!

deprecated 2016-11-07 20:30

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Disregard my previous post. I fixed it by flashing the first revision back, then flashing the new one over it.

Probably just a permissions glitch on my end. Sorry!

mautz 2016-11-07 20:40

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

Originally Posted by minimec (Post 1518270)
Still... I prefer the "conservative" governor.

I preffered the powersave governor(i don't know why, but it does scale and it is not fixed at the lowest frequency), everything was working well except the stuttering of the ring tone, when you get an incomming call..

mautz 2016-11-07 23:24

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
This version has two more Conservative based governors included:

ConservativeX and Bioshock

ZIP with blu_plug
ZIP WITHOUT blu_plug

Happy testing.

deprecated 2016-11-10 22:41

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
I'll be testing the new stuff with conservativex and bioshock soon.

Meanwhile, I made a fix to my intermittent call issues with the microphone on my Nexus 5. Not sure if it was due to a bug or a hardware fault, but every person I called reported a bad echo from my end. Not sure if this has been discussed here before, but my fix is as follows:

remount /system rw with: devel-su mount -o rw,remount,relatime,data=ordered /system

edit /system/build.prop (I used nano). Find the following strings and replace as indicated:

persist.audio.handset.mic.type=digital (replace digital with analog)
persist.audio.dualmic.config=endfire (replace endfire with false)

Save the file and reboot your device. Echo gone, call quality improved dramatically. Enjoy!

abyzthomas 2016-11-11 03:31

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

Originally Posted by deprecated (Post 1518465)
Not sure if it was due to a bug or a hardware fault, but every person I called reported a bad echo from my end. Not sure if this has been discussed here before!

Wow! This will be great. Yes. This has been discussed here before. This is the reason I stopped using Sailfish on my Nexus 5. I will do this and see if it fixes the issue.

Thanks a lot.

mautz 2016-11-11 06:07

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

Originally Posted by deprecated (Post 1518465)
I'll be testing the new stuff with conservativex and bioshock soon.

Or wait a few days, i'm going to release a new version next week.

deprecated 2016-11-11 06:59

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

Originally Posted by mautz (Post 1518482)
Or wait a few days, i'm going to release a new version next week.

I'll wait a few days then. Thanks mautz, for your continued contributions to this wonderful community! :)

rinigus 2016-11-11 10:12

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

Originally Posted by deprecated (Post 1518465)
I'll be testing the new stuff with conservativex and bioshock soon.

Meanwhile, I made a fix to my intermittent call issues with the microphone on my Nexus 5. Not sure if it was due to a bug or a hardware fault, but every person I called reported a bad echo from my end. Not sure if this has been discussed here before, but my fix is as follows:

remount /system rw with: devel-su mount -o rw,remount,relatime,data=ordered /system

edit /system/build.prop (I used nano). Find the following strings and replace as indicated:

persist.audio.handset.mic.type=digital (replace digital with analog)
persist.audio.dualmic.config=endfire (replace endfire with false)

Save the file and reboot your device. Echo gone, call quality improved dramatically. Enjoy!

I don't know which version of SFOS adaptation do you use. On mako, we fixed the echo and bad call quality a while ago with @ballock by hunting down a bug in libhybris. Unfortunately, it took a long time to start using this bugfix due to relatively slow merge of the PR into the upstream libhybris. So, its possible that you are using SFOS with older version (@sledges suggests that the version with fix is 0.0.5.18). To test if you are hit by the bug, try to check whether properties are read in correctly:

getprop persist.audio.fluence.voicecall

(this can be run as nemo). If you see empty line as a response you are hit by the bug! Find an updated image for N5, or ask for an update, and enjoy noise-canceling digital microphone. If you get "true" as a response, you probably have a bug in hardware.

Similar issue was in onyx as well. There, it turned out that the bug was in the settings of underlying CM base. But, if I remember correctly, N5 was OK in terms of CM settings.

abyzthomas 2016-11-11 13:17

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

Originally Posted by rinigus (Post 1518493)

getprop persist.audio.fluence.voicecall

(this can be run as nemo). If you see empty line as a response you are hit by the bug! Find an updated image for N5, or ask for an update, and enjoy noise-canceling digital microphone.

Hmm.. Looks like I have the buggy one. Do I need to remove and re-install SFOS with a newer image? Which image is the correct one? I am running under MultiROM.

Thanks for your help.

rinigus 2016-11-11 14:19

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

Originally Posted by abyzthomas (Post 1518498)
Hmm.. Looks like I have the buggy one. Do I need to remove and re-install SFOS with a newer image? Which image is the correct one? I am running under MultiROM.

Thanks for your help.

@abyzthomas: you're welcome! just to be sure that its not due to the changes in property names (N4 vs N5): try to run also

getprop | grep audio

In this case, you should see the property that you checked and its value.

The bug was basically induced at long property names. If you don't have the property that you checked in |grep audio list, choose the one with the longest name and check that.

As for image, I don't know. Maybe @RealJohnGalt has a newer version somewhere around? Or ask on IRC... If I recall correctly, @sledges was fixing this bug on N5.

deprecated 2016-11-11 18:41

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
A lot of people in Android-specific forums have cited the N5 noise cancelling microphone as a hardware fault, e.g. "cheap microphone". Disabling it and switching to analog was my best bet for being able to use it as a phone. My device adaptation is 0.0.1.3 and I'm running on SFOS 2.0.4.14. As of yesterday, my calls are clean with exceptional audio, even in wind and with background noise.

Perhaps we can find a later adaptation, but that suggests a huge road of work. For now, my fix works on Nexus 5 with our adaptation.

rinigus 2016-11-11 19:31

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

Originally Posted by deprecated (Post 1518510)
A lot of people in Android-specific forums have cited the N5 noise cancelling microphone as a hardware fault, e.g. "cheap microphone". Disabling it and switching to analog was my best bet for being able to use it as a phone. My device adaptation is 0.0.1.3 and I'm running on SFOS 2.0.4.14. As of yesterday, my calls are clean with exceptional audio, even in wind and with background noise.

Perhaps we can find a later adaptation, but that suggests a huge road of work. For now, my fix works on Nexus 5 with our adaptation.

/* Please note that the later assumes that you are on SFOS with getprop bug that I cited. Until its checked by getprop commands listed in earlier messages, this is an assumption */

So far, before the fix, the microphone that was loaded during voice call was actually analog microphone (at least on mako). It might have been misconfigured and what your properties do is probably fixing it with this regard. Situation before getprop bug fix was transmitting metallic and chopped voice, sometimes echo. When switching to Android (using multirom), the voice quality improved dramatically. After the fix, the voice calls in SFOS were the same as in Android, rather clear.

As for long road - since the bug is fixed and in hybris proper, its just a matter of bugging the developers to recompile the SFOS images. The long part of the road has been made ready in March ( https://github.com/libhybris/libhybris/pull/313 ). It just that it wasn't incorporated into mer-hybris for a long time. Now the patch is within, so its mainly a question of recompiling hybris. If you wish, you could probably do it yourself for N5.

Reminder: all text above assumes that you are hit by this bug. You could also test it by comparing voice call quality in Android vs SFOS on the same device. If Android can do better, its possible and rather simple to get the same voice call quality in SFOS.

Whether N5 is better suited for using analog or digital mic - that I don't know. It could be also a common hardware bug on N5.

Writing this up with a hope its of use for N5 users as well. :)

minimec 2016-11-11 21:06

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

Originally Posted by deprecated (Post 1518465)
Meanwhile, I made a fix to my intermittent call issues with the microphone on my Nexus 5. Not sure if it was due to a bug or a hardware fault, but every person I called reported a bad echo from my end. Not sure if this has been discussed here before, but my fix is as follows:

I applied your changes and will see if there is a change, although in my case people have not complained about sound quality during calls.

Quote:

Originally Posted by deprecated (Post 1518510)
... and I'm running on SFOS 2.0.4.14.

After a messy upgrade to sailfishos 2.0.2.51 (I was not patient enough), I pushed that multirom image to 2.0.4.14. I am very happy with the result... So yay... For the first time, I am 'bleeding edge' on my Nexus 5 when it comes to SailfishOS!

Quote:

Originally Posted by rinigus (Post 1518513)
As for long road - since the bug is fixed and in hybris proper, its just a matter of bugging the developers to recompile the SFOS images. The long part of the road has been made ready in March ( https://github.com/libhybris/libhybris/pull/313 ). It just that it wasn't incorporated into mer-hybris for a long time. Now the patch is within, so its mainly a question of recompiling hybris. If you wish, you could probably do it yourself for N5.

In general I am pretty optimistic when it comes to new 'hammerhead' images. We have come far with this device.

minimec 2016-11-11 21:10

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
For those who are testing the new 'mautz'-kernel, I can refer to a post I made some time ago. I wrote a systemd service that allows you to load all your settings @boot, and also toggle the settings.

Basically you can just follow this post http://talk.maemo.org/showpost.php?p...&postcount=672 and change the content of the '/usr/lib/systemd/scripts/cpu-governor' file to something like this...

Code:

#!/bin/bash

# Toggle script to change power settings on the Nexus 5.
# Used as systemd.service in combination with /etc/systemd/system/cpu-governor
# Can be used as simple 'toggler' without systemd.

start() {
    # Max Frequency
    /bin/echo "1728000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

    # blu_plug
    /bin/echo "1" > /sys/module/blu_plug/parameters/max_cores_screenoff
    /bin/echo "2" > /sys/module/blu_plug/parameters/min_online

    # voltage table (undervolt)
    /bin/echo "675 675 725 735 755 765 775 795 805 850 865 895 945 1000" > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table

    # simple gpu
    /bin/echo "320000000" > /sys/class/kgsl/kgsl-3d0/max_gpuclk
    /bin/echo "4" > /sys/module/msm_kgsl_core/parameters/simple_laziness
    /bin/echo "7000" > /sys/module/msm_kgsl_core/parameters/simple_ramp_threshold

    # set governor
    /bin/sleep 10
    /bin/echo "conservative" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
}

stop() {
    # Max Frequency
    /bin/echo "2265600" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

    # blu_plug
    /bin/echo "2" > /sys/module/blu_plug/parameters/max_cores_screenoff
    /bin/echo "2" > /sys/module/blu_plug/parameters/min_online

    # voltage table
    /bin/echo "775 775 795 805 825 835 845 865 875 910 925 955 995 1050" > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table

    # simple gpu
    /bin/echo "450000000" > /sys/class/kgsl/kgsl-3d0/max_gpuclk
    /bin/echo "5" > /sys/module/msm_kgsl_core/parameters/simple_laziness
    /bin/echo "6000" > /sys/module/msm_kgsl_core/parameters/simple_ramp_threshold

    # set governor
    /bin/echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
}

case "$1" in
    start)
        start
        ;;
    stop)
        stop
        ;;
    restart)
        stop
        sleep 1
        start
        ;;
    *) exit 1
esac


mautz 2016-11-12 05:45

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Freshly compiled kernels anyone?

First the changelog:
Code:

Added some CPU hotplug governors:

- Mako hotplug governor
- Alucard hotplug governor
- MSM Sleeper hotplug governor
- Zen Decision hotplug governor

- Blu_plug can be enabled/disabled via sysfs now,
  so only one kernel build this time.

Added support for ARM Neon in kernel mode and some crypto algorithms now use the NEON extensions

Added MDSS color control and faux wcd93xx sound control hax to the kernel.

To get an idea what MDSS color control is you can get more infos on XDA.

The settings can be changed via Android app or sysfs:
Code:

/sys/devices/platform/kcal_ctrl.0/kcal - (0-256 0-256 0-256) - Controls R/G/B Multipliers
/sys/devices/platform/kcal_ctrl.0/kcal_min - (0-256) - Controls minimum RGB Multiplier value
/sys/devices/platform/kcal_ctrl.0/kcal_enable - (0-1) - Enables/Disables RGB Multiplier Control
/sys/devices/platform/kcal_ctrl.0/kcal_invert - (0-1) - Enables/Disables Display Inversion Mode
/sys/devices/platform/kcal_ctrl.0/kcal_sat - (224-383 or 128) - Controls saturation intensity - use 128 for grayscale mode
/sys/devices/platform/kcal_ctrl.0/kcal_hue - (0-1536) - Controls display hue - may have issues with msm8x26 in the higher values
/sys/devices/platform/kcal_ctrl.0/kcal_val - (128-383) - Controls display value
/sys/devices/platform/kcal_ctrl.0/kcal_cont - (128-383) - Controls display contrast

There are many profiles available on XDA

The sound control hax lets you change the volume of the speaker/headphone/ringtone and so on. You could buy FuxSoundControl android app or use one of the many other kernel settings apps for android or configure it via sysfs:
Code:

/sys/kernel/sound_control_3/
But be carefull, for rising the audio above zero(default) up to 20 you can enter values 0-20, but for setting sound below twenty the values are 255(equals -1) down to 226(equals -30).

And NEVER echo "-10" while wearing headphones :eek:

To enable/disable one of the Hotplug governors use an app or take a look here:
Code:

Mako  /sys/class/misc/mako_hotplug_control/enabled
Alucard  /sys/kernel/alucard_hotplug/hotplug_enable
blu_plug  /sys/module/blu_plug/parameters/enabled
msm_sleeper  /sys/devices/platform/msm_sleeper/enabled
zen_decision  /sys/kernel/zen_decision/enabled

Don't forget to only use one governor at a time and to disable mpdecision.

This page has some more information about governors.

Source is updated.

Compiled kernel can be downloaded here

Feedback welcome.

deprecated 2016-11-13 07:20

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Fantastic work, mautz. Doing a lot of testing! Thank you for the work you've put into these kernels, they just keep getting better!

I'll post my conclusions and results as soon as possible.

deprecated 2016-11-14 06:31

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

Originally Posted by mautz (Post 1518527)
Don't forget to only use one governor at a time and to disable mpdecision.

@mautz, how do I go about disabling mpdecision to try one of the other hotplug drivers? I think I'm missing something obvious. :p

Edit: I'm looking at this strictly from an SFOS point of view. I don't use sfdroid as I like to avoid Google wherever possible, just on principle. Does SFOS use the same structure as Android as far as where the tunables are kept?

rinigus 2016-11-14 06:52

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

Originally Posted by deprecated (Post 1518696)
@mautz, how do I go about disabling mpdecision to try one of the other hotplug drivers? I think I'm missing something obvious. :p

Edit: I'm looking at this strictly from an SFOS point of view. I don't use sfdroid as I like to avoid Google wherever possible, just on principle. Does SFOS use the same structure as Android as far as where the tunables are kept?

@deprecated: I'd suggest not to disable mpdecision. I played around custom kernels during summer on mako and it became clear very fast that kernels without mpdecision have a major problem on SFOS - many SFOS "boosters" communicate with mpdecision. As a result, kernels without mpdecision (Hells Core, for example) had issues with showing you GUI at the end of the boot. There were also plenty of complaining messages in journal regarding it.

I didn't look much further then into it since it seemed that, on ARM, SFOS does require mpdecision (some boosters are probably closed source, such like a silica one). So, if you guys can find the way around it that would be great. I ended up just using underclocking in the kernel for mako since it was actually very hard to find kernels with mpdecision enabled.

What you guys are doing with N5 kernel is very interesting and I hope that you could optimize this aspect of SFOS further. Good luck!

mautz 2016-11-14 11:13

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
To disable mpdecision just rename mpdecision in /system/bin folder.
If you don't use another hotplugging governor the four cores of the cpu stay online at 300MHz when they are not used instead of going offline.

I haven't encountered any problems using another hotplugging governor for weeks now.

mautz 2016-11-16 21:19

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Kernel v6 has arrived.

Source still up on Github.

Changelog:
Code:

- Added FIFO, FIOPS, SIO, TRIPNDROID, VR and ZEN I/O scheduler

- Added backlight dimmer option

- Added Westwood+ TCP congestion control

- Added new force_fast_charge options

- Added double tap 2 wake

- Optimized build flags

I/O scheduler is set at /sys/block/mmcblk0/queue/scheduler.
Code:

cat /sys/block/mmcblk0/queue/scheduler
gives you a list of available schedulers and shows which scheduler is active.


The backlight can now be dimmed beyond the lowest setting.
Change /sys/module/lm3630_bl/parameters/backlight_dimmer to '1' to activate the feature and set your desired value in /sys/module/lm3630_bl/parameters/min_brightness (default is 5)
Change your brightness in settings to maximum and back to minimum to check your results.

Force fast charge can be enabled at /sys/kernel/fast_charge
'1' is the old behaviour(charging with usb up to 900mA)
'2' lets you choose your desired charge level. Available levels are:
500 900 1200 1500 2000 (change in fast_charge_level)

To enable doubletap2wake feature change /sys/android_touch//doubletap2wake to '1' for the bottom half of the screen and '2' for fullscreen.

How long dt2w is active can be changed in /sys/android_touch/wake_timeout (in minutes, 0 is always active).
dt2w is active again after unlocking the phone.

To stop doubletap2wake feature using the power button set /sys/module/qpnp_power_on/parameters/pwrkey_suspend to '1'.
dt2w is active again when you lock the screen with swipe to lock or using the lock button.

But since dt2w is not a native feature of the N5 it will cause battery drain, i haven't tested it long enough to say how much battery it costs, because i got used to the lpm screen unlocking.

Flashable ZIP can be downloaded here.

Sorry, i've uploaded a ZIP which was missing the westwood TCP congestion control, link is now fixed (11-16-2016 11:11 PM)

Happy testing...

minimec 2016-11-17 21:02

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
@mautz: Let me tell you first, that you make me feel like a little boy, full of pleasure, testing new stuff almost every evening. Big Kudos to you!


So I wanted to share my current test settings with you, using v6 of the mautz kernel.

I recommend 2.0.4.* as sailfish version. In my opinion it is more stable than the proposed 2.0.1.11 at the first page of this thread. I upgraded my version with OTA to 2.0.4.14, but there is a new '2.0.4.13' image available here... http://images.devaamo.fi/sfe/hammerhead/beta5/

I had some very rare freezes/reboots with my old voltage table, so I went +5mV for the whole range. I might do some fine-tuning later. The device is rock stable now.

I use Alucard as hot-plug governor with default settings. I think I love that one. With the new v6 kernel I set [noop] as I/O scheduler. 'They' say, [noop] is good for battery life. Other option I might try is [fiops].

I did not touch the dimmer settings, neither 'doubletap2wake' or 'fastcharge'. 'Dt2w' might drain battery, and I see no need for 'fastcharge', using a QI charger.


Code:

# Max Frequency
/bin/echo "1728000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

# Alucard
echo "1" > /sys/kernel/alucard_hotplug/hotplug_enable

# voltage table (undervolt)
/bin/echo "680 680 730 740 760 770 780 800 810 855 870 900 950 1010" > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table

# simple gpu
/bin/echo "320000000" > /sys/class/kgsl/kgsl-3d0/max_gpuclk
/bin/echo "4" > /sys/module/msm_kgsl_core/parameters/simple_laziness
/bin/echo "7000" > /sys/module/msm_kgsl_core/parameters/simple_ramp_threshold
/bin/echo "simple" > /sys/class/kgsl/kgsl-3d0/pwrscale/trustzone/governor
/bin/echo "150000000" > /sys/devices/fdb00000.qcom,kgsl-3d0/kgsl/kgsl-3d0/min_pwrlevel

# set governor
/bin/echo "conservative" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

# set I/O scheduler
/bin/echo "noop" > /sys/block/mmcblk0/queue/scheduler


maximilian1st 2016-11-19 13:27

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

Originally Posted by minimec (Post 1518937)
...I recommend 2.0.4.* as sailfish version. In my opinion it is more stable than the proposed 2.0.1.11 at the first page of this thread. I upgraded my version with OTA to 2.0.4.14, but there is a new '2.0.4.13' image available here... http://images.devaamo.fi/sfe/hammerhead/beta5/

Hi,
is it a very bad idea to try an OTA to 2.0.4.13 from the link above using the method from the link below?
https://wiki.merproject.org/wiki/Ada...for_hammerhead

deprecated 2016-11-19 23:41

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

Originally Posted by maximilian1st (Post 1519037)
Hi,
is it a very bad idea to try an OTA to 2.0.4.13 from the link above using the method from the link below?
https://wiki.merproject.org/wiki/Ada...for_hammerhead

I've OTA'ed from 2.0.1.11 to 2.0.4.13 and 2.0.4.14 with ease, installing 2.0.1.11 following the guide in the first post of this thread. I think you'll be just fine OTA'ing to 2.0.4.1x after installing following the guide you linked.

Edit: just make sure to back up anything of value, as this is all a,“beta” process.

maximilian1st 2016-11-20 13:06

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Here is what I did to bring my Nexus 5 to version 2.0.4.13:
- Download the magic-device-tool from https://github.com/MariusQuabeck/magic-device-tool because I'm lazy
- Install Sailfish OS using the tool
- Update to 2.0.4.13 using the instructions on this page https://wiki.merproject.org/wiki/Ada...for_hammerhead by replacing the RELEASE number
Job done... but, the battery still drains at the same speed haha silly me ;-p
I guess the way to go is to flash and patch as advertised on the first page of this thread if you are looking for less battery drain.

minimec 2016-11-20 13:43

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

Originally Posted by maximilian1st (Post 1519078)
Here is what I did to bring my Nexus 5 to version 2.0.4.13:
- Download the magic-device-tool from https://github.com/MariusQuabeck/magic-device-tool because I'm lazy
- Install Sailfish OS using the tool
- Update to 2.0.4.13 using the instructions on this page https://wiki.merproject.org/wiki/Ada...for_hammerhead by replacing the RELEASE number
Job done... but, the battery still drains at the same speed haha silly me ;-p
I guess the way to go is to flash and patch as advertised on the first page of this thread if you are looking for less battery drain.

Did you flash the new kernel by user 'mautz'? https://www.dropbox.com/s/u0r74xx8uy...el-v6.zip?dl=0
I would try that first and do some tuning. Would be cool to share your results... (see previous posts in this thread)

maximilian1st 2016-11-20 14:04

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

Originally Posted by minimec (Post 1519081)
Did you flash the new kernel by user 'mautz'? https://www.dropbox.com/s/u0r74xx8uy...el-v6.zip?dl=0
I would try that first and do some tuning. Would be cool to share your results... (see previous posts in this thread)

My guess is you overestimate my "tuning" abilities but here I go again with the flashing session :). What I just did, between my previous post and your reply is flash and patch as on the first page. I will do that again now as I understand one should not flash over a system that booted already.
Do I flash the kernel after flashing sfos and leave out the sensors patch? I guess so.

minimec 2016-11-20 14:22

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

Originally Posted by maximilian1st (Post 1519037)
Hi,
is it a very bad idea to try an OTA to 2.0.4.13 from the link above using the method from the link below?
https://wiki.merproject.org/wiki/Ada...for_hammerhead

As I had a spare multirom test image, I tried something. Basically I just flashed the 2.0.4.13 zip file over an existing 2.0.1.11 installation. It works, BUT it will reset your device. All your data will be gone!


Backup/Restore

So you need a backup of your data. That brings us to another problem with 2.0.4.X. With the new version, the backup routine has fundamentally changed! The software is looking for an sdcard, and as we don't have an sdcard slot on the Nexus5, you cannot use the 'backup/restore' routine in the 'settings' app, unless you work with a CloudService-Account.

I use a different way. I use 'rsync' and backup the whole '/home/nemo' folder to my computer over wifi. That works well for almost everything but 'contacts/calendar'.

Code:

I am not a frequent 'rsync'-user, so there might be a slightly better command.

Backup:
rsync -avz /home/nemo YOURNAME@YOURCOMPUTER:/home/YOURNAME/Nexus5-backup
 
Restore:
rsync -avz /home/YOURNAME/Nexus5-backup/nemo nemo@YOURPHONE:/home/nemo

For 'contacts/calendar' I found a way in the SailfishOS cheat sheet ( https://sailfishos.org/wiki/Sailfish...t_Sheet#People ). You can export the 'contacts/calendar' to a file...

Code:

devel-su pkcon install nemo-qml-plugin-contacts-qt5-tools
devel-su -p vcardconverter --export contacts.vcf

Code:

pkcon install nemo-qml-plugin-calendar-qt5-tools
devel-su -p icalconverter export calendar.ics

You can then import the data by opening the files with the jolla-file-browser.

minimec 2016-11-20 14:27

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

Originally Posted by maximilian1st (Post 1519085)
Do I flash the kernel after flashing sfos and leave out the sensors patch? I guess so.

No. You need to apply the sensorsfix3.zip anyway, but just once. Afterwards you can just flash any new kernel zip file.

maximilian1st 2016-11-20 14:30

Re: SailfishOS 2.0 Nexus 5 CM12.1 Alpha1 | Sfdroid Pre-Alpha/Early Preview
 
Ok thanks, will finish the install.
Just wanted to share that I use fruux.com for the contacts and calendar.


All times are GMT. The time now is 12:09.

vBulletin® Version 3.8.8