yashsingh1/xdaforums huggingface dataset:
[Sony Xperia M4 Aqua] ivy.lally:
Problem with battery, how people complain, probably has something to do with WiFi module.

After installing v8a and reverting to 8 still have increased drain, then flashing Foy kernel and afterwards system lacks WiFi. However when, earlier, flashed Foy after v7e or v8 then WiFi worked fine, but it was yet before first flashing of v8a.

How to have WiFi working with Foy now without flashing the whole system? (How to revert system changes made by version 8a of SkyMelon kernel?)

Aqua-M4 E2303, modded MarshMallow, SkyMelon kernel
[Sony Xperia M4 Aqua] roxandn:
feedback

[MENTION=5689354]AndyPhoenix9879[/MENTION]

after flash v8a i have battery drain peoblem and heating issues

no more deep sleep

"cpu governor set on ironactive - noop " when i return to v8 still i have this problems

....also i cant use smart unlock (mi band 2) after flash SkyMelon kernel ...

plz someone give me Stock kernel link ' for TWRP Recovery ' e2333
[Sony Xperia M4 Aqua] ivy.lally:
You may flash SkyMelon version 7e and set interactive governor, limit max frequencies of cpu and gpu, set minimal to the lowest, it'll help.

However v8a flashable zip file contains init.qcom.post_boot.sh which tunes system wide parameters, and they survive even after flashing other kernel.

init.qcom.post_boot.sh is just in version 8a, how to reverse to stock values because these tunings increase battery drain?

Aqua-M4 E2303, modded MarshMallow, SkyMelon kernel
[Sony Xperia M4 Aqua] AndyPhoenix9879:
The only tuning done there is to interactive governor... Wifi module is the exact same as v8.

I'm not sure what's causing the problem yet.

And about that reverting to foy kernel and getting wifi to work - check the second post.
[Sony Xperia M4 Aqua] CactusPie:
The kernel keeps getting better and better :) Any chance you could add F2FS support in one of the future releases?
[Sony Xperia M4 Aqua] AndyPhoenix9879:
​

I kinda did lol, just didn't enabled it cause idk why but during my testing I can't see a "F2FS" option in TWRP when I'm about to format it. Guess that you need a TWRP F2FS version or something :confused:
[Sony Xperia M4 Aqua] ivy.lally:
However sd formatting you can make in your PC after plugging SD card via adapter etc

And interesting is what do you med F2FS for? If for SD card then what partitions layout and what for do you mean?

In the second post there is just change log, apparently you must have meant the third post ;) with the link of wlan.ko to download.
[Sony Xperia M4 Aqua] phoenix295:
What are all thode wake locks?? They started after v8a
[Sony Xperia M4 Aqua] ivy.lally:
Yet about wlan.ko, in folder "modules" now there is the link wlan.ko to

/system/lib/modules/pronto/pronto_wlan.ko,

binary file in subfolder pronto with files:

/system/lib/modules/pronto/
pronto_wlan.ko
WCNSS_wlan_dictionary.dat
WCNSS_qcom_wlan_nv.bin

Has SkyMelon installer created it?

People, anybody else has these files too, or is this from any other piece of software which placed them in my phone?

Aqua-M4 E2303, modded MarshMallow, SkyMelon kernel
[Sony Xperia M4 Aqua] valyo_bg:
I do downgrade from kernel v8a to kernel v8 then v7, but still big battery drain. I made calculations of current for each app inside battery menu and found that Sum is approximatelly 50% of battery capacity, so other 50% is missing, at least are not shown inside battery measuring menu. For example, my phone shows below 10% of battery, calculation of all process shows 1200ma current used, capacity of battery is 2400ma. This mean that more of 1000ma are missing and not shown inside battery measuring menu. This with downgraded to v7 kernel. For example, before with kernel v8 and update with v8 beta everything was ok with battery life. So now I'm not sure if my battery is faulty, or after last upgrade to kernel v8a something is changed permanetly and even downgrading of kernel dont help to resolve battery drain. My phone is almost 2 years old.

Interesting thing is that all cpu cores are avtive all the time for different governors - ironactive, intelliactive and interactive. They only change frequency form 200MHz to 1600MHz, but all are active, this even with downgraded to v7 kernel (I don't remember how was behaviour before last upgrade to v8a).

Except for big battery drain all other work perfect and smooth on phone with kernel v8a. So what is difference between kernel v8beta and v8a? If there is something related to the battery, or my battery is become faulty. Charging of flat battery (from 2% for example) takes with 1200ma charger approximatelly 2 hours.
[Sony Xperia M4 Aqua] ivy.lally:
What you're saying is similar to my observations: before installing v8a for the first time phone was ok, and after even downgraded from v8a battery drain is still bigger than before, apparently v8a had spoiled something in system beyond usual kernel space.

And please, check these things:

- do you also have shortcut "wlan.ko" to

/system/lib/modules/pronto/pronto_wlan.ko

(i.e. file in the pronto subfolder within your modules directory)?

- replace the module

/system/lib/modules/wlan.ko

still with the downgraded kernel version (e.g.7e), like described in the bottom of the third post of this thread, reboot, and then check the battery drain?

Aqua-M4 E2303, modded MarshMallow, SkyMelon kernel
[Sony Xperia M4 Aqua] valyo_bg:
I don't have shortcut "wlan.ko" - it's was native file. So I just replace wlan.ko module with old one with correct permissions and do reboot. Now let see if battery drain it's resolved, I'm currently use v7 of kernel. Thank you for suggestion.
[Sony Xperia M4 Aqua] CactusPie:
For anyone interested, I recompiled the 8a kernel with F2FS support:

http://cactuspie.com/files/Sky_Melon8a-f2fs.zip

All credit goes to AndyPhoenix9879 for implementing that. All I did before compiling was to uncomment the lines that he commented out :) Already tried it, it works.

EDIT: Welp, looks like WiFi doesn't work with this one. I haven't touched anything even remotely related to WiFi. Could be one of the latest commits?
[Sony Xperia M4 Aqua] armivzla:
How would you format your f2fs partitions?

The recovery that I have currently does not give me such an option, regards
[Sony Xperia M4 Aqua] CactusPie:
I'm using APP2SD: https://play.google.com/store/apps/details?id=in.co.pricealert.apps2sd&hl=en

It gives you an option to format the partition using F2FS
[Sony Xperia M4 Aqua] armivzla:
Would you first flash the kernel version with f2fs, and then with the application, you would pass "data" and "cache" to f2fs?
[Sony Xperia M4 Aqua] ivy.lally:
Please, explain, why making partitions in F2FS, what is the rationale and benefits behind it, is it faster?
[Sony Xperia M4 Aqua] ryandxter:
hmmm I found battery drain tho then directly investigate with my favorite kernel manager (kernel adiutor mod) and results was surprising me all core are always on!!! no wonder if my battery got me crazy drain 10%++ within 2hrs with screen off

here it is mate workaround solution is find better hotplug such mpdecision (though IDK if SD600 exist too in-built kernel hotplug) but if so then there is a big mistake if dev remove mpdecision hotplug feature from stock kernel source build (no offense) CMIIW
[Sony Xperia M4 Aqua] mfpss95134:
Does this kernel work well on E2363?
[Sony Xperia M4 Aqua] CactusPie:
The system wouldn't even mount an f2fs partition without proper support. So you first need to flash the kernel with f2fs support and then format the SD card.

It's a file system for flash storage. You can look up some benchmarks, it's supposed to be faster than ext4 for example.
[Sony Xperia M4 Aqua] AndyPhoenix9879:
Hmm I think the changes I did to a HMP related tunings might've affected the battery drain... Since you guys reported back battery problems even after reverting to an older version of the kernel..

Try this :

Change

/proc/sys/kernel/sched_upmigrate to value 70

/proc/sys/kernel/sched_downmigrate to 45
[Sony Xperia M4 Aqua] AndyPhoenix9879:
Mpdecision never existed in this phone lol... The phone does turn off cores when in standby (deep sleep).
[Sony Xperia M4 Aqua] ryandxter:
thanks, since I'm not tweak anything for a half year then it must be something qcom's hotplug design perhaps thermald or similar

anyway I'm simply remove your postboot script and it get better, will try soon with your suggestion this
[Sony Xperia M4 Aqua] valyo_bg:
I can't go to these files - as soon I click on "proc" my phone freeze and do self reboot. I use Root browser for this, any suggestions what app to use to edit both files?
[Sony Xperia M4 Aqua] CactusPie:
Execute in a terminal:

echo 70 > /proc/sys/kernel/sched_upmigrate

echo 45 > /proc/sys/kernel/sched_downmigrate

Or add it to the kernel adiutor so it runs at startup
[Sony Xperia M4 Aqua] valyo_bg:
I try, but when check values they are not changed, no errors during execution of commands in terminal.
[Sony Xperia M4 Aqua] AndyPhoenix9879:
Report back on the battery life : https://drive.google.com/file/d/0B4nj3MjAx2wISWpmVV9oTk5faTQ/view?usp=sharing
[Sony Xperia M4 Aqua] valyo_bg:
Just installed, will charge my phone to 100% and will report for results about battery life, thank you for quick reaction :) .

Phone boot successfully, intelliactive governor is used.
[Sony Xperia M4 Aqua] CactusPie:
EDIT: Nevermind, figured it out. Here's the kernel with F2FS support and fixed WiFi

http://cactuspie.com/files/Sky_Melon8a-f2fs.zip
[Sony Xperia M4 Aqua] valyo_bg:
Still big battery drain, for 1 hour, with locked phone (not in use) 10% of battery is missing.

---------- Post added at 20:06 ---------- Previous post was at 20:05 ----------

What about battery life, is it fixed with this version?
[Sony Xperia M4 Aqua] ivy.lally:
And just in WRITEs is faster indeed, but in readonly operations is the same.

Question then which partitions to convert to F2FS, which are write intensive? Answer: cache!

And the partition "/data" is rather read intensive, 'writes' occur just when installing programs and changing settings, how do you think?

However, indeed: write intensive partitions converted into F2FS will result in faster performance and less battery drain, let's do it guys!!! :)

Aqua-M4 E2303, modded MarshMallow, SkyMelon kernel
[Sony Xperia M4 Aqua] CactusPie:
No, I didn't touch anything related to battery. I only uncommented config lines related to F2FS before compiling. Besides that it's the same kernel.
[Sony Xperia M4 Aqua] valyo_bg:
Ampere shows constant current of 420ma, this is a reason for draining of battery. Could you check what is your consumption? Any advices how to minimize battery drain?
[Sony Xperia M4 Aqua] CactusPie:
Depending on screen brightness it varies between 320and 460 for me. You can try reducing the brightness (or covering the light sensor temporarily for testing), but besides that I don't have any ideas.
[Sony Xperia M4 Aqua] ivy.lally:
Even with hot plugged switching LITTLE cores off, and further reducing aggressiveness of migrate, i.e. running:

echo 90 > /proc/sys/kernel/sched_upmigrate
echo 49 > /proc/sys/kernel/sched_downmigrate

# Enable/disable cluster-plug
echo 1 > /sys/module/cluster_plug/parameters/active ;

It has on average >100mA than before first flashing v8a.

And want to emphasize, these Ampere readings are of the same brightness level (I take care if it thanks to the utility PowerToggles)

With the lowest brightness level before first flash v8a I used to see readings of 150mA when navigating through system settings and having greenified processes with Greenify widget tapped.

And now in the same situation it is constantly 250-350mA

[MENTION=5689354]AndyPhoenix9879[/MENTION], there is still something spoiled in system wide, it survives various kernels flashings, even of different brands like Foy. Please find it. Your kernel has potentials and as the next step introducing F2FS could improve performance and battery savings with cache partition.
[Sony Xperia M4 Aqua] CactusPie:
I've added BFQ I/O scheduler for testing. Seems to be pretty smooth when used with internal storage:

http://cactuspie.com/files/Sky_Melon8a-f2fs-bfq.zip
[Sony Xperia M4 Aqua] ivy.lally:
And what about power consumption as this has made us concern more about than smoothness?

How do you think which partitions are write intensive enough to convert them to F2FS?

Just cache or /data too?

Aqua-M4 E2303, modded MarshMallow, SkyMelon kernel
[Sony Xperia M4 Aqua] CactusPie:
I haven't done anything to the power consumption. I'm not really going to touch this, as I'm not even remotely experienced with kernel development, so that's something AndyPhoenix9879 or another dev will have to look into. To be honest I'm not even sure if it's actually draining any faster for me...

As far as which partitions to format to F2FS, I personally mostly wanted it for one the partitions on my SD card. But I'm actually thinking of formatting /data /cache and /system to F2FS. By looking at the benchmarks both Read and Write operations benefit from that file system.
[Sony Xperia M4 Aqua] ivy.lally:
Which benchmarks, could you provide any link? People used to say F2FS is faster than ext4 just in writings, maybe this advantage you're saying is marginal?

And which partition of SD card do you want to have in F2FS? Xperia Aqua has very thin internal storage and extensive use of Adopted storage is a must! Question if Adopted storage could use F2FS partition on SD card, if it could then this would be excellent indeed! :)

Aqua-M4 E2303, modded MarshMallow, SkyMelon kernel
[Sony Xperia M4 Aqua] AndyPhoenix9879:
F2FS would work with adoptable storage (any storage that can be partitioned and formatted would work lol). Honestly I'm very surprised F2FS even works... Great job [MENTION=8097182]CactusPie[/MENTION] . As for the battery, I'm reverting back to a test version of 8a where my testers reported normal battery life. Let's see how things goes..
[Sony Xperia M4 Aqua] ivy.lally:
And about /system partition, it seems converting it into F2FS would turn out very cumbersome, TWRP hasn't F2FS support so how would you flash and backup systems? And accessing system partition is relatively rare, even for reading operations, doubt if you would notice any difference, far more read intensive is data (please people express your views about write intensity of data partition?)

Aqua-M4 E2303, modded MarshMallow, SkyMelon kernel
[Sony Xperia M4 Aqua] AndyPhoenix9879:
It kinda is very proven that F2FS is more superior than ext4 in almost every respect... Mind sharing the source where it says that ext4's read performance is better?
[Sony Xperia M4 Aqua] ivy.lally:
Why "better"? What it says is F2FS is better actually, in writing is better for sure, in readings - it's disputeable. However overall performance is advantageous over ext4.

Just you may think if purely read-only system partition really will very benefit from converting it into F2FS, and how to flash/backup system with TWRP not supporting the filesystem?

If the kernel got F2FS I'd convert cache, SD card Adopted, and maybe data (?)

Partition cache we could format from running system (can't we?), SD card from PC, what about data?

However, as we can see, somebody should review TWRP sources, it also has kernel which could be recompiled after uncommenting of one line. ;)

Everything else would stay the same and see converted partitions transparently through filesystem kind.

Aqua-M4 E2303, modded MarshMallow, SkyMelon kernel
[Sony Xperia M4 Aqua] AndyPhoenix9879:
Report back on the battery life : https://drive.google.com/file/d/0B4nj3MjAx2wIbGNJQzAtSWhIcnM/view?usp=sharing

F2FS is enabled in this one, as well as some additional governors (and a lot of reverted commits)
[Sony Xperia M4 Aqua] ivy.lally:
What to start from as far as F2FS is concerned? ;)

Adopted storage as we can format it from PC, then check if works with the newest kernel ;)

Just format the second partition from PC (with Linux), is it simple as this?

Hasn't Adopted partition any special system markings or so?

If so, then are the steps like this:

- put SD card into PC running Linux,

- mount the second partition (yet as ext4),

- backup content with

tar -cvzf file.tgz

or just copy somewhere else on Linux filesystem with

cp -a /mnt/partition/* location/

- unmount SD second partition,

- format it with F2FS (what parameters?),

- mount anew (this time as F2FS),

- restore backup earlier created with:

tat -vrzf file.tgz -C /mnt/partition

or copy back the content with:

cp -a location/* /mnt/partition/

- unmount, put back into phone, boot it,

...and Voila??? ;)

And what about first partition of SD card, has it to have fat32 filesystem mandatory, or it can possess F2FS too and Android will normally treat it as external storage for e.g. media etc?

Aqua-M4 E2303, modded MarshMallow, SkyMelon kernel
[Sony Xperia M4 Aqua] valyo_bg:
With this kernel, Ampere report around 220ma and this is acceptable - 2 time lower consummation than before. Seems that problem with battery drain maybe is resolved :) . I will test longer and will report, but so far so good :) . Phone work smoothly like before, even from time to time I see that some cpu cores goes OFF :) .
[Sony Xperia M4 Aqua] ivy.lally:
Indeed, again I can see Ampere readings 150-200mA with the lowest brightness and some apps greenified! :)

It's like before first flash of v8a,

Andy, what have you changed back actually?

Aqua-M4 E2303, modded MarshMallow, SkyMelon kernel
[Sony Xperia M4 Aqua] AndyPhoenix9879:
Fk ton of commits. Check my github branches
[Sony Xperia M4 Aqua] ivy.lally:
And now we can try F2FS, please answer these basic questions:

- can we format second SD partition, for Adoptable, simply as it is, and after restoring its content from backup will the system accept it as Adoptable without any issues?

- can we format first SD partition as F2FS, as external media storage, instead of fat32, and would system see it transparently as if it was fat32?

Aqua-M4 E2303, modded MarshMallow, SkyMelon kernel
[Sony Xperia M4 Aqua] AndyPhoenix9879:
This is something very experimental, so I won't advise everyone to jump on the F2FS bandwagon so fast (and I've been warned by some people that it 'may' cause lost of data suddenly - though me researching this on Google does in fact say it can, but it was 3 years ago lol so might've changed). As for your question :

1) I think, I really have no idea.. sorry :silly: :(

2) Yes. This is possible

Well at least now battery life seemed to be as good as it was in Melon 8. Here's what've changed btw with this new one (I'll reupdate the link soon) :

1) HyperX Governor!

2) Electroactive Governor!

3) F2FS support (duh)

4) Removed a fk ton of commits (mainly schedulers one and also one relating to Qnovo)

5) Interactive_Pro set as default

6) ZEN I/O Scheduler as default

7) GPU VDD fixed
[Sony Xperia M4 Aqua] ivy.lally:
In fact Adopted is third SD partition:

root@E2303:/ # fdisk -l /dev/block/mmcblk1
Found valid GPT with protective MBR; using GPT

Disk /dev/block/mmcblk1: 62521344 sectors, 1856M
Logical sector size: 512
Disk identifier (GUID): 9e621c73-df0d-42fe-9482-************
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 62521310

Number Start (sector) End (sector) Size Code Name
1 2048 46891007 22.3G 0700 shared
2 46891008 46923775 16.0M 0700 android_meta
3 46923776 62521310 7615M 0700 android_expand
root@E2303:/ #

As we can see, the second one is mysterious small, as big as 16MB, 'android_meta' with some info data about third Adopted partition. Question if this info specifies filesystem type too?

Aqua-M4 E2303, modded MarshMallow, SkyMelon kernel

---------- Post added at 02:18 PM ---------- Previous post was at 02:07 PM ----------

Well, so let's start with the first SD partition replacing fat32 with F2FS.

It is good start as this "external SD card" media partition is really very write intensive!

Especially if we use Xposed module XinternalSD!!!!!! ;) (which actually swaps "Internal storage" into first SD partition's folder, it's very nice!)

And the risk is minimal when we back up its content first.

Additional question please, how to format cache partition without TWRP?

Aqua-M4 E2303, modded MarshMallow, SkyMelon kernel
[Sony Xperia M4 Aqua] ivy.lally:
It turns out after formatting the first SD partition from fat32 to F2FS with Apps2SD, system can't see it and in notification bar error message occurs: "SD card corrupt".

root@E2303:/ # fsck.f2fs /dev/block/mmcblk1p1
Error: Failed to open the device!
255|root@E2303:/ # fsck.f2fs /dev/block/mmcblk1p1
Error: Failed to open the device!
255|root@E2303:/ # fsck.f2fs /dev/block/mmcblk1p2
Error: Failed to open the device!
255|root@E2303:/ # fsck.f2fs /dev/block/mmcblk1p3
Error: Failed to open the device!
[Sony Xperia M4 Aqua] ivy.lally:
After doing several various attempts it turns out just second SD partition created by Apps2SD for the purpose of linking applications is accepted by system with F2FS.

It probably means Apps2SD creates partition with F2FS and it uses it. And system itself has hardwired strict definitions which filesystem belongs to which partition, maybe in fstab or something? ;)

Aqua-M4 E2303, modded MarshMallow, SkyMelon kernel
[Sony Xperia M4 Aqua] ivy.lally:
Also have made Adopted with F2FS work! It is possible with Apps2SD but very cumbersome because of instability and unpredictability of doing so.

Aqua-M4 E2303, modded MarshMallow, SkyMelon kernel
[Sony Xperia M4 Aqua] mufhm:
how to format f2fs? if finish always sdcard corrupt :(

use partition tool or adobtable to format? and format for first, two or three what option for file system
[Sony Xperia M4 Aqua] ivy.lally:
Just follow Apps2SD Partition Tool (Adoptable).

As first step chose these options:

Apply it and reboot.

It'll create the both partitions as F2FS, however system can't accept the first one, the fat32 is required for the first partition as mandatory.

After boot, the first partition renders as "corrupt" so you have to format it to fat32 back.

Just do it in this way:

- open terminal emulator

- type "su"

- type:

sm list-volumes

And you'll get output like:

root@E2303:/ # sm list-volumes
private:179,67 mounted d71c1486-8d9a-4a7f-8fe7-f357307c4221
private mounted null
public:179,65 unmountable
...

And you'll need this one:

public:179,65

(in your case the numbers will be different), copy it and type something like:

sm format public:179,65

wait, and then:

sm mount public:179,65

And voila! (It has worked for me)

Aqua-M4 E2303, modded MarshMallow, SkyMelon kernel
[Sony Xperia M4 Aqua] CactusPie:
You may have missed a new release of the kernel, since it's the same version number

https://drive.google.com/file/d/0B4nj3MjAx2wIbGNJQzAtSWhIcnM/view?usp=sharing
[Sony Xperia M4 Aqua] ivy.lally:
[MENTION=239165]cactus[/MENTION] even with the newest kernel version Apps2SD Partition Tool (Adoptable) creates the both partitions as F2FS (can't separate them in this creation).

And system can't accept the first one as F2FS, it demands just fat32.

You will maybe find a solution to crack this requirement, because having the first partition as F2FS would be of much more benefit than Adopted. ;)

[MENTION=7235028]mufhm[/MENTION] try the steps from my previous post and then tell us how it goes ;)

However I have been editing it heavily and incrementally so take care you are reading the present version of it!!! ;)

Aqua-M4 E2303, modded MarshMallow, SkyMelon kernel
[Sony Xperia M4 Aqua] CactusPie:
I've never really used the adoptable storage, I've just symlinked apps to the SD card. But I'll take a look at it later today after work, maybe I'll figure something out ;)
[Sony Xperia M4 Aqua] ivy.lally:
And the problem is with the first partition "external SD" aka "portable storage" aka media storage, and not Adopted !!

Android MM accepts Adopted with F2FS,

however can't accept no F2FS, no Ext4, no exFAT, nor any other filesystem but fat32 for the first partition!

Aqua-M4 E2303, modded MarshMallow, SkyMelon kernel