yashsingh1/xdaforums huggingface dataset:
[Nexus 5X Original Android Development] jollaman999:
Checking again with per-process reclaim.

Pokemon Go is realesed in 24 in my country.

And when I switched to chatting app, Pokemon Go had been terminated.

I know this is really annoying problem.

So, I'm testing again with this feature and it's really effective.

Googling again, and according to this message, the high zram usage is normal.

I'm not sure. Because I'm not an expert.

But it seems per-process reclaim uses swap space.

http://lkml.iu.edu/hypermail/linux/kernel/1606.2/01105.html

It really shows game app + 2apps are still alive.

Also I was compared squased commits with LineageOS and it looks same.

So I will merge again if this function is not draining the battery.

Thank you. :)
[Nexus 5X Original Android Development] mr.ace:
Please test sched patches for battery and smoothness too

just like to know about effect of this patches not a request
[Nexus 5X Original Android Development] edoardotavecchio:
I agree with you, maybe some battery patches can be helpful, this is the weak point of this device but don't hope in sched patches because [MENTION=5996255]jollaman999[/MENTION] already said he'll not merge them.
[Nexus 5X Original Android Development] Mrcactuseater:
For once you have a suggestion that isn't too trash, the schedule patches so make a difference, but I'm pretty sure [MENTION=5996255]jollaman999[/MENTION] said he wouldn't merge them, presumably to keep things inline with Google? However some cpuidle patches or wakelock blockers would be excellent, my standby time just isn't what it used to be, especially on LTE.
[Nexus 5X Original Android Development] mr.ace:
I think he lost his faith about patches this is the only reason for a near stock kernel GitHub source
[Nexus 5X Original Android Development] TheLoller221:
I noticed that kernel is more easily to heat up when i'm playing some games or using the phone when is charging (nothing big, only browsing or chatting).

I have msm_thermal and core_control active.

Is it normal?
[Nexus 5X Original Android Development] khanjui:
Of course it is normal.
[Nexus 5X Original Android Development] TheLoller221:
But other kernels don'to do that.

Why?
[Nexus 5X Original Android Development] khanjui:
Proof please. Also stock thermal throttling is different from this kernel. In jolla, phone charges much faster when using it. Stock thermal settings are throttling the CPU and GPU to lowering the temperatures too early. More heat = longer high performance. And I can say that in daily usage, phone is much cooler without sacrificing performance with this kernel.
[Nexus 5X Original Android Development] stifmaster81:
This kernel is useful for aosp ?

Enviado desde mi Nexus 5X mediante Tapatalk
[Nexus 5X Original Android Development] khanjui:
You can use it with any ROM.
[Nexus 5X Original Android Development] nirogu325:
Weak battery? Subjective. I have excellent battery. You can't blame it on the kernel as there are dozens of variables that impact battery life no matter what kernel you use.

Sent from my Nexus 5X
[Nexus 5X Original Android Development] edoardotavecchio:
Can you provide your own kernel tuning? anyway, I wasn't complaining about kernel but battery Power itself. 2700mah it's a little low but I know that this isn't a really high end device so I expected It, I was suggesting about that just because maybe there are some patches that could fill this gap a little
[Nexus 5X Original Android Development] nirogu325:
Kernel tuning? None. I don't toy around with settings nor install too much Google bloat or Greenify/Naptime. Android and kernel development are no longer in their Froyo days where devices needed so much tinkering to get decent battery life. It all depends on the user and his usage patterns. I just found when you tinker way too much, devices tend to get picky. It's better to keep things simple and there are several kernel developers who agree with this.

Sent from my Nexus 5X
[Nexus 5X Original Android Development] ndarkside93:
I've got to give to props [MENTION=1166502]jolla[/MENTION]man99 For a while there I was using other kernels because version 14 had simply become to bloated, and I found better performance elsewhere. But after I saw your latest release and saw you had teased and started from scratch(v15) I gave it another try and I can say I'm loving it. Thank you for all the hard work and dealing with the community in a polite and professional manner
[Nexus 5X Original Android Development] jollaman999:
Thank you so much. :)
[Nexus 5X Original Android Development] leolawliet:
[MENTION=5996255]jollaman999[/MENTION] v15.2 is working wonderfully on my end. It definitely feels like a cleaner and smoother user experience after you started from scratch. I also wanted to thank you for that personally and tell others as well not to feel discouraged about using this kernel just because stuff was removed. Some users just don't understand what a big problem a messy source can be, I used to compile from source years ago and I always liked to keep things plain and simple with the least amount of tweaks I could possibly apply. Things conflict, that's why simplicity is best.

I look forward to your future updates. You got a great balance of power and performance on this kernel and I hate to compare (I don't wanna mention which one) but the kernel I used before this one was starting to feel pretty sluggish after less than a week and this one kernel has fixed that issue for me :good:

Edit: I totally forgot to mention that the fingerprint sensor is way more responsive now than it was before, that made me pretty happy. I'm using Drunksauce profile with Ex Kernel Manager and my device hasn't been sluggish regardless of how battery friendly this profile is.
[Nexus 5X Original Android Development] leolawliet:
If anyone has doubts about battery life, check this out. I've had my device screen on and in use for an entire hour nonstop since unplugged and you can see with the SoT it drained very little. I think that's pretty decent considering if I keep up with the same routine I could stretch out the SoT to an even higher rate effortlessly throughout the entire day.
[Nexus 5X Original Android Development] Smacksmack206:
only ones i enabled are slide to sleep or double tap to sleep

---------- Post added at 11:23 AM ---------- Previous post was at 11:13 AM ----------

I just reflashed rom and didnt enable the other gestures and changed the timeout from default to 4 and SOCV works again
[Nexus 5X Original Android Development] :
Thanks for the 15.x complete rewrite, Jolla! It's so fast and smooth! :o just want to ask one thing, what do you think in disabling the wakelocks (ipa_ws, etc.)? :highfive:

---------- Post added at 04:10 AM ---------- Previous post was at 04:09 AM ----------

what's your settings? :)
[Nexus 5X Original Android Development] leolawliet:
I just use Drunksauce, nothing else is needed.
[Nexus 5X Original Android Development] Giorgos Chatziioannou:
Hello, if you guys dont mind me asking, has anyone tried f2fs and sdcardfs? Which one seemed better/smoother?
[Nexus 5X Original Android Development] ndarkside93:
You misunderstood. You can use them together. I've id's the underlying filesystem the partition I'd formatted in. Sdcardfs is a replacement for FUSE designed by

Samsung for making files available over USB while you are using your phone(MTP)
[Nexus 5X Original Android Development] Giorgos Chatziioannou:
Oh i see, indeed i confused them as i believed sdcardfs was google's "reply" to samsung's f2fs. I feel happy that android is being optimized in all fronts :)
[Nexus 5X Original Android Development] ndarkside93:
I understand it's gets very confusing. I try to help where I can. F2FS as built by the Linux community, and not by either Google or Samsung. I think that clears up everything Perry will now. Best of luck
[Nexus 5X Original Android Development] :
I was watching Netflix then stopped and flip it back on again later and screen is black but can hear audio and no video is visible. Here's a log I grabbed using logcat app. Anyone else have this happen? This is on AICP 1-29 build and latest Jolla kernel and Drunksauce profile on Ex kernel manager. No extra mods or anything...

(Video play didn't start until probably 3/4 through log just a heads up...)

Log:

https://drive.google.com/file/d/0B2M-8kbDp-fUVGZlOG5EMTVyX2c/view?usp=drivesdk

Restored stock boot.img and Netflix plays fine. Weird that it played on Jolla then hour later didn't and wouldn't anymore. I removed all themes and all rebooted and still black screen. Restored stock boot.img plays fine. I want Jolla!! :eek:

(Edit)
[Nexus 5X Original Android Development] edoardotavecchio:
I can't record videos using Instagram or any camera app other than Snapchat. Log attached, with flash kernel I didn't have this problem so I think it's kernel side :)

The log is registered trying to take a video using Google Camera app

Edit: The problem seems to be solved by reflashing vendor
[Nexus 5X Original Android Development] Lossyx:
If you have root, try hiding it.
[Nexus 5X Original Android Development] :
Works fine with Root on stock kernel...
[Nexus 5X Original Android Development] jugoslavpetrovic:
Is init.d supported in this kernel?
[Nexus 5X Original Android Development] m4r0v3r:
any chance of SFOS support in multirom? It was available on the Nexus 5
[Nexus 5X Original Android Development] zurik:
How to change theme on twrp 3.0.3.0?
[Nexus 5X Original Android Development] jollaman999:
I will check it. Thanks.
[Nexus 5X Original Android Development] jollaman999:
Removed. Cause of permission denial at selinux in Nougat.

You can use 3rd party init.d emulation.

There are some apps that support init.d emulation and Kernel Adiutor also has this function.
[Nexus 5X Original Android Development] jollaman999:
That is not my subject. :rolleyes:
[Nexus 5X Original Android Development] jollaman999:
Sorry but I can't test with this. I should be pay for watch something.

Is this also happened in other kernels except stock?
[Nexus 5X Original Android Development] leolawliet:
Any idea if su.d scripts will work through Magisk? I think I managed to get init.d scripts to run when I dropped them into this directory. Weird cuz the sysctl init.d script I ran worked, then again this was with a different kernel. I'll double check just to be sure.

/magisk/phh/su.d
[Nexus 5X Original Android Development] :
No. Elemental and Franco and Racer all play video fine on Netflix app..
[Nexus 5X Original Android Development] jugoslavpetrovic:
Right, but unsuccessful with Aduitor and Universal init.d app.
[Nexus 5X Original Android Development] jollaman999:
Create '/system/etc/init.d' folder if it dosen't exist. Then try again.
[Nexus 5X Original Android Development] jollaman999:
Then could you give me some logs with logcat and dmesg?
[Nexus 5X Original Android Development] jugoslavpetrovic:
I have that folder created already and 4 files in it.
[Nexus 5X Original Android Development] jollaman999:
Hmm...then I have no idea.

Is init.d emulation enabled in Kernel Adiutor?
[Nexus 5X Original Android Development] j-a-d-z:
Hello jollaman999,

only one problem here: I installed your kernel once with charging LED enabled. Works like it should be. Now I wanted to disable the charging LED. But how? Restore of the stock kernel -> Charging LED off; new install of jolla 15.2 -> Charging LED on. Even with no checkmark in the charging LED option checkbox of the installer.

Here is my jolla install log:
[Nexus 5X Original Android Development] jollaman999:
You should flash your rom again to restore system files.

Then flash jolla-kernel.
[Nexus 5X Original Android Development] khanjui:
Freeze while browsing on Chrome. I noticed that Wi-Fi icon is disappeared when phone is freeze. I had to reboot it manually.
[Nexus 5X Original Android Development] leolawliet:
I thought I was the only one.
[Nexus 5X Original Android Development] jollaman999:
According to log, if it only happens with Chrome, I think it's permission related problem.
[Nexus 5X Original Android Development] jollaman999:
Same happens to you?
[Nexus 5X Original Android Development] jollaman999:
I will release new version today.

No problem with my daily usage.

So if it happens again in new version, tell me again.

Thank you.
[Nexus 5X Original Android Development] jollaman999:
[bullhead-v15.3]

[bullhead-v15.3]

== Kernel ==

- Built with Linaro gcc 6.3.1

- tty: Fix hang at ldsem_down_read()

- mm: Per-Process Reclaim

- power: bcl: Re-evaluate hotplug for unexpected cpu online

- jolla-kernel_defconfig: Disable WLAN_UDP_RESPONSE_OFFLOAD

- jolla-kernel_defconfig: Disable WLAN_FEATURE_RX_WAKELOCK

- msm_thermal: Remove duplicated index checks

- msm_thermal, msm8992: Remove unused line

- msm_thermal: Fix frequencise are set to max after resumed at high temperatures

- msm_thermal: Remove useless variables

- Revert "PCI: Avoid unnecessary CPU switch when calling driver .probe() method

- kgsl: convert some workqueues to use kthreads

- mdss: move to a kthread for vsync_retire_work_handler

== AIO ==

- Revert "ramdisk: Remove per-process reclaim lines"

- ramdisk: Reduce per-process reclaim's per_swap_size to 512

== Recovery ==

- Built with Linaro gcc 6.3.1

- jolla-kernel_bullhead_II-v15.3 applied
[Nexus 5X Original Android Development] leolawliet:
Yeah only seems to happen with Chrome or Snapchat. This happened with Flash Kernel as well.
[Nexus 5X Original Android Development] jollaman999:
Okay. I will also check it. Please notice it to me when it occurred again in v15.3.
[Nexus 5X Original Android Development] leolawliet:
I'll definitely let you know.
[Nexus 5X Original Android Development] leolawliet:
Hey [MENTION=5996255]jollaman999[/MENTION] just out of curiosity I wanted to ask if you included the Linaro optimizations in v15.2, I noticed you added that with the changelog for the v15.3 update. I'm noticing improvements with this update right away. Excellent work man :D
[Nexus 5X Original Android Development] jollaman999:
Yes. It is applied in Makefile.

Thank you.
[Nexus 5X Original Android Development] khanjui:
Why max frequencies are locked to these values? I'm not able to change them. Phone is cool (40 celsius). [MENTION=5996255]jollaman999[/MENTION]
[Nexus 5X Original Android Development] jollaman999:
Oh.. It seems I was missed something while I fixing the code.

I will fix it soon.
[Nexus 5X Original Android Development] jollaman999:
[bullhead-v15.4]

[bullhead-v15.4]

== Kernel ==

- tcp: fix 0 divide in __tcp_select_window()

- crypto: arm64/aes-blk - honour iv_out requirement in CBC and CTR modes

- Revert "msm_thermal: Remove useless variables"

(This makes a problem that frequency is not restored to max.)

== Recovery ==

- jolla-kernel_bullhead_II-v15.4 applied
[Nexus 5X Original Android Development] Mrcactuseater:
The attached screenshot shows my usage during school all of which was on LTE, which was pretty damn light in comparison to a normal day. Am i doing something wrong because ever since 14.1 am I seeing battery life that is exponentially worse, but performance that is exponentially better. I haven't changed anything from my setup and the results, if the screenshot uploads, are almost saddening :(
[Nexus 5X Original Android Development] edoardotavecchio:
Yeah I've found It too. Latest kernel version drain a really lot of battery
[Nexus 5X Original Android Development] leolawliet:
My device is starting to overheat faster all of a sudden. Performance is amazing, but it's not feeling very battery friendly. I'm using the same exact settings I always use for optimal battery and performance.
[Nexus 5X Original Android Development] Mrcactuseater:
Well I'm glad I'm not the only one! Regardless, we can persevere and hope that [MENTION=5996255]jollaman999[/MENTION] can come to our aid with some schedule/cpuidle patches (I know he said he wouldn't but we really need em)
[Nexus 5X Original Android Development] Lord_Flaya:
I used multirom manager to update to recovery 170203, but even tho it says installation was successful, I'm still stuck on 170202.
[Nexus 5X Original Android Development] leolawliet:
My device stopped overheating. It starts locking onto the max frequencies on every core when it runs even in the background.
[Nexus 5X Original Android Development] :
Well in on latest Jolla and Screw'd ROM and Netflix works fine. :good:

Only thing I did notice was battery isn't too good.. Kernel flies though!!
[Nexus 5X Original Android Development] edoardotavecchio:
that's my battery usage per two days including night (I had ti charge the phone multiple times). 1.94per hour only overnight with airplane mode activated

brightness was never set to more than 30%, backlight dimmer activated. CPU profile drunksauce, zram activated with swappiness set to 30 (@jollaman999 does swappiness affect battery Life?), maple scheduler. I mainly used WhatsApp and listened to music, just browsing a Little.
[Nexus 5X Original Android Development] jollaman999:
There was a bug in lowmemorykiller and process-reclaim.

Two drivers have similar operations and it makes race condition and there was a deadlock when managing same process.

This makes system lags and freezes also it makes overheat. I just added lock to prevent this problem.

And it seems the problem is now solved.

Also, I added zram, lowmemorykiller, and some memory related patches from CAF.

Now, the memory usage is fine and I see that I can open 3 to 4 apps without killing the processes.

Checking the battery and thermal continuously.

It's hard to adjust for balancing.

More performance make heat and draining.

More battery make worse performance.

I will find good values to get more battery with smooth performance.

Thank you.
[Nexus 5X Original Android Development] ndarkside93:
Thank you for the update. My device had continuously gotten caught in the race condition and it's killing my battery. I am looking forward to the next release. I had to switch kernels temporarily.
[Nexus 5X Original Android Development] khanjui:
Sometimes big cores are going offline. Phone is cool. Restart is the only solution. Check the attached file for screenshots and logs. [MENTION=5996255]jollaman999[/MENTION]
[Nexus 5X Original Android Development] jollaman999:
Big cores are fine and working normally.

It's because selinux permission problem. So, some of apps can't get big cores online status after turned off an turned on again.

You can see the denied messages in the kernel log like this.

[45850.769903] type=1400 audit(1486224612.752:841): avc: denied { read } for uid=10106 pid=28838 comm="exkernelmanager" name="cur_freq" dev="sysfs" ino=13620 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0

I'm using floating monitor app. Same symptoms with this.
[Nexus 5X Original Android Development] jollaman999:
*per process-reclaim : https://lwn.net/Articles/548431/

I will make a conclusion of per process-reclaim.

Yes, you know and I also know that it is effective to launch more apps without killing.

But with this, it makes system lags and freezes frequently.

I did a so many tests and spend a whole day to fix this problem.

Here are my stories.

First, I think it was ZRAM problem. Because per process-reclaim stopped after ZRAM's free usage is nearly to 0.

And when turn off the ZRAM, the system is back to normally.

So, I performed tests with no ZRAM. But it is not related with ZRAM.

Because it also stopped without it.

Second, I analyzed sources of lowmemorykiller and per process-reclaim.

I found that two drivers have similar codes and it looks there will be a race and deadlock.

Because when those drivers managing same processes. There will be no choice to get free memory or kill the process.

So, I just add a same lock to both drivers. But the problem is still exist.

Third, I tried to merge those two drivers. Because the main codes are almost same.

And I tried to get free memory first then kill the app that eats high memory.

But it shows same problem.

Fourth, no per process-reclaim and no ZRAM.

I saw the kernel messages.

No problem. But it shows so many process killing.

So, I will end up this tests and I will disable per process-reclaim.

It is really really annoying that we have only 2G memory!!

But don't be disappointed.

Still good and smooth with ZRAM with lots of CAF patches. Also CAF's lowmemorykiller and some memory related patches.

Thank you for all of supports. :)
[Nexus 5X Original Android Development] khanjui:
I believe 786 MB zRAM is much better than 512 MB. Swappiness is 60%. I think you can set that as default value if you find it useful. [MENTION=5996255]jollaman999[/MENTION] I'm planning to use 1024 MB in next year or so if I don't upgrade this phone. Because apps and system is becoming heavier over years. Sadly, manufacturers and app developers don't care about RAM management because adding more physical RAM is easier...
[Nexus 5X Original Android Development] Mrcactuseater:
Disappointing choice, but after all that testing is hard to disagree with ya! I use default zram config with swappiness at 15% or 768mb at 60%, either works great with no oom situations :)
[Nexus 5X Original Android Development] zacharias.maladroit:
Don't forget to remove

per-process reclaim

from your OP, after you've caught some breath :)

We've ran into a similar issue over at Xperia Z5 (heating, slowing down, potential instabilities, etc.)
[Nexus 5X Original Android Development] jollaman999:
Tested with 768MB. But I think it's too big.

Because lowmemorykiller killing the apps despite there are free memory in zram.

And there will more cpu loads cause of zram.
[Nexus 5X Original Android Development] jollaman999:
Absolutely... :p
[Nexus 5X Original Android Development] jollaman999:
Thank you for notice it to me.

They said they are use in their products. But it seems Qualcomm has uncompleted source and it's hard to see the products that using this function.
[Nexus 5X Original Android Development] charlesco29.cc:
Guys, anyone knows which super su should work with this kernel? I just used LZ4 compression and i my super su flashable isn't working at all - keeps aborting during installation
[Nexus 5X Original Android Development] pitt93:
in order.

Flash stock boot.img> flash super su > flash jolla with lz4
[Nexus 5X Original Android Development] Mrcactuseater:
Ahh I see. Instead of removing it completely however, would it be possible to just disable it by default and then leave it up to the user to enable or disable at their will?
[Nexus 5X Original Android Development] edoardotavecchio:
I'm looking forward to the new update, I've seen in Github that you Just modified the label in Jolla bullhead 16.0 :victory: so this means that the update's near
[Nexus 5X Original Android Development] zacharias.maladroit:
Something of the sort, even only a small zram IMO would be better than nothing cause there are some issues with memory handling when swap is absent entirely from the system,

looking back at the patchsets I tracked 3 years ago linux' vm wasn't even aware of zram [not sure if Android kernel source also was that clueless],

e.g. "[RFC 0/3] make vm aware of zram-swap".

[MENTION=5996255]jollaman999[/MENTION]

In the case you want to go swapless the following patch perhaps might help:

https://github.com/zachariasmaladro...mmit/ac86609a2da393068c833e2f5ce88bf7998899ef [PATCH] mm: prevent page thrashing for non-swap

I've carried it along since beginning of 2015, used it in my early kernels but haven't really stress-tested it.

Feel free to give it a beating and see whether it helps in a swapless setup +/- per-process reclaim enabled :)

Also take a look at https://github.com/zachariasmaladro...fter=Y3Vyc29yOjst9n5aZEa6EKJBYBO2OTpI8qTTKzY5

commits:

da0ee5977c5c36a7a89598b3bb0aa3c24535c312 to 0324e72b618e219545a58e7676592f3798be9bf8

(derp merge fix: https://github.com/zachariasmaladro...mmit/56de35431ea12fd444181c7770e00c35e8e3f708 )

had totally forgotten to use them in recent kernels, they are supposed to help minimize memory fragmentation which should help in our embedded situation ...

Edit:

some of it seems to have meanwhile gotten merged already ... interesting :)
[Nexus 5X Original Android Development] 78jimm:
versions 15.0, 15.1, 15.2 are great but 15.3 and 15.4 have alot of idle battery drain.