yashsingh1/xdaforums huggingface dataset:
[Galaxy Ace II Android Development] bebolint98:
It write this:

[WS2401 MCDE Channel]

pixclock: 10016

hbp: 4

hfp: 4

hsw: 4

vbp: 8

vfp: 4

vsw: 8

interlaced: 0
[Galaxy Ace II Android Development] ace2nutzer:
okay that looks good. - The last thing is the Delays.. this is probably the problem..

Check if u can find an sysfs with this content like this:

sleep_out_delay

sleep_in_delay

.........

and try to change all delays from 30 @ 50 .. then it's like on ace2nutzer kernel ..

maybe @ Chrono knows the proper location of that sysfs ... but it's called something like mcde_dealys or lcd_delay ...

just check all folder with "MCDE" .. u'll find it, otherwise Chrono did removed that sysfs ..
[Galaxy Ace II Android Development] bebolint98:
I found a file in /sys/devices/pri_lcd_ws2401/display_settings and in it write this:

power_on_delay=10

reset_delay=10

sleep_in_delay=50

sleep_out_delay=120

sleep_out_delay_1st=5

sleep_out_delay_2nd=120

display_off_delay=0

So I change this 7 value to 50?
[Galaxy Ace II Android Development] ChronoMonochrome:
Nope, change sleep_out_delay_1st to 120. That's why I said I'll reset delays to the defaults. In fact, on most LCDs this delay is unneeded, but as it turns out, in a certain cases it's not true.

Alternatively, you guys can set lcdclk freq to 57Mhz, somehow it works better with a reduced display delays.
[Galaxy Ace II Android Development] ace2nutzer:
echo sleep_out_delay_1st=0 > /sys/devices/pri_lcd_ws2401.0/display_settings
echo sleep_out_delay_2nd=0 > /sys/devices/pri_lcd_ws2401.0/display_settings
echo sleep_out_delay=50 > /sys/devices/pri_lcd_ws2401.0/display_settings
echo reset_delay=50 > /sys/devices/pri_lcd_ws2401.0/display_settings
echo power_on_delay=50 > /sys/devices/pri_lcd_ws2401.0/display_settings
echo display_off_delay=50 > /sys/devices/pri_lcd_ws2401.0/display_settings
[Galaxy Ace II Android Development] bebolint98:
Thanks. [MENTION=5695278]ChronoMonochrome[/MENTION] write that I only need to change sleep_out_delay_1st to 120.

Ok I will wait for the next update.
[Galaxy Ace II Android Development] ace2nutzer:
Try both Variants and see what is better. Check if it fixes and how fast is display on, (from deep sleep) on both variants :)

120 is the original Value .. 100% fail-safe .. but very slow.

Actually nobody had problems with 50.

But i remember only Chrono itself had problems cause his LCD is really half-broken.. (at least in the past... but now he has an new LCD.. so no problem i think) ;)
[Galaxy Ace II Android Development] ChronoMonochrome:
Not a LCD, had to replace touchscreen, after it smashed to pieces after the fall. I probably couldn't afford to replace LCD+touchscreen, since buying a new phone, I believe, would be cheaper :laugh:

As for LCD itself, it's still fine even after several falls and only "bug" I have, is same horizontal lines on the screen as were described, but only after hard reset by 3-key combo, in recovery or in bootloader.
[Galaxy Ace II Android Development] ace2nutzer:
OK. :)
[Galaxy Ace II Android Development] ChronoMonochrome:
New build R4.2 is UP!

What's new:

reverted CAF memory management changes (including adaptive LMK)

removed management of not killable processes for now

proc FS is upstreamed to android-3.4

module: update to android-3.4

security: now is also up to date with android-3.4

workqueue: updates from upstream, with a power efficient workqueues code merged in

async fsync: enabled for F2FS (better I/O perf)

updated ramdisk for CM13 (SergeyL)

fixed screen glitch at the bottom side which appears after unlock

Many people were reporting about slowness of the multitasking on LP, let's see how it goes without CAF updates for memory management and LMK ..

Enjoy this build! :good:
[Galaxy Ace II Android Development] mfawonkpo:
Attempting to install on cm 13 04/02 version, but.. it stuck on the galaxy ace 2 logo :(
[Galaxy Ace II Android Development] ChronoMonochrome:
Yet doesn't boot on CM13 cause I forgot to disable an option which is causing a bootloop.

[MENTION=5371721]Epirex[/MENTION], for sure, janice might have the same issue as here. We and SergeyL found that CONFIG_ABB_FAKE_DFMS_DEVICES is a cause of this. I wrote a fix not to apply this config when booted in system: https://github.com/ChronoMonochrome/Chrono_Kernel-1/commit/fc247ef090cfa43dbd391baca64af7aa15f5822d (will be applied only when booted to a recovery in order not to have an issue with not showed battery percentage)

Tested and works fine on codina. :)
[Galaxy Ace II Android Development] Epirex:
Thanks for notify! I could reach to the bootanimation of CM13 and take a logcat, apparently vold is broken for janice

Right now I'm downloading sources, I apply your patch more later, again thanks :)
[Galaxy Ace II Android Development] shaqman89:
Has anyone tried the latest build on kit Kat?

I kinda feel it's more sluggish then previous one
[Galaxy Ace II Android Development] borkins:
I got one SW reboot, while browsing. I think, the phone hangs a bit more often. :/
[Galaxy Ace II Android Development] ChronoMonochrome:
Ok, I see. Even though I wouldn't desire to keep some changes merged in memory management, it's better to leave it as it's rather than revert it to an unclean state.

P.s. I'm not using multitasking that much, so it's good to have some feedback about how it performs. I'll re-add memory management changes in the next bugfix update.
[Galaxy Ace II Android Development] shaqman89:
Yes, I agree that memory management is way worse in 4.2, compared to 4.11. And since I have a lot of apps (currently 120, and maybe 30 services). It really takes a toll even when I'm not multitasking.

In my case, I haven't experienced any SW reboot, but I did experiene more FC's (lockscreen, UI, etc) and that's kinda annoying

As for now, I'm back at 4.1.1.

PS: Did it work better on LP?
[Galaxy Ace II Android Development] ChronoMonochrome:
I haven't noticed any side effects on EOS 1.0 and generally I was feeling that SystemUI is a bit faster when switching between apps. But apparently there were some problems when is running out of memory, according to the reports here.
[Galaxy Ace II Android Development] ChronoMonochrome:
Bugfix update

Ok guys, bugfix update r4.2.1 is up.

What's fixed in this update:

bring memory managements update back as in r4.1.1

fixed boot up on android 6.0

fixed 7za segfault on android <4.3 (was causing modules and ramdisk not to install as 7za didn't even execute)
[Galaxy Ace II Android Development] shaqman89:
[MENTION=5695278]ChronoMonochrome[/MENTION]

I've been testing 4.2.1 for half a day now. In multitasking, it seems it's better again, but somehow I some get freezes (two so far). One eventually led to a soft reboot.

If I were to inspect logs, which log do you think I should check on this? I'm on 4.2.1-nodebug using VanirKK
[Galaxy Ace II Android Development] borkins:
Another reboot (this time HW), while tried to open a page with too many GIF images. Also process FC sometimes.

Here is the last_kmsg...

Edit: [MENTION=5840412]ace2nutzer[/MENTION], it's zipped ;)
[Galaxy Ace II Android Development] ace2nutzer:
@up

i can't unpack it on lubuntu here .. can u pls provide the log as .zip or .tar.gz ?

Edit: probably Filesystem error. Try this:

Make cwm backup

wipe data, format system and sdcard0 (beware that sdcard0 will not restore from cwm backup .. u've to manually backup)

Then restore the backup and make sure that u're not using dynamic fs sync or async fs. otherwise u'll broke filesystem once again.

Please test and report (again with last_kmsg if reboot.. )
[Galaxy Ace II Android Development] borkins:
:/ What about a TWRP backup?

I'm not using dynamic fs-sync, but is there a way to scan the FS for errors?

EDIT: Actually Dynamic FSync is enabled in CK app. It's said that is not cool to be disabled, because may lead to FS corruption.
[Galaxy Ace II Android Development] shaqman89:
If you switch internal and external, you could scan the memory card through a pc using chkdsk
[Galaxy Ace II Android Development] borkins:
:) I don't have a PC around to check it, but thanks for your advice!

Is there a problem to restore TWRP backup of sdcard0? Don't want to loose it :)

As far as I know it must be formatted as 'vfat'.
[Galaxy Ace II Android Development] mfawonkpo:
Installed on cm 13

Finally I can enjoy your kernel again :) , the last time I instal your kernel succesfuly is the 3.12 version.. :D

Thank you for fixing boot on cm 13 (y)
[Galaxy Ace II Android Development] ChronoMonochrome:
Guys, you don't need to restore backups and FS isn't corrupted. Again, memory management isn't in so clean state, so it results in instabilities(freezes, reboots etc). Can anyone remember which kernel version worked stably? I can temporarily revert memory management to this state until I find a better solution.
[Galaxy Ace II Android Development] shaqman89:
For me, 4.1.1 actually works good.

I can't remember any freezes or reboots on that version.
[Galaxy Ace II Android Development] borkins:
Looks [MENTION=5695278]ChronoMonochrome[/MENTION] is right.

But I already wiped: data, system, '.android_secure'.

The problems are the same - FC, reboots - the log is in the attachments.

I'll try r4.1.1 again, because I'm not so sure. I think it's a little bit older problem - somewhere after r3.12.

Edit: Almost forgot. On r4.2.1 - reboot to recovery (CM11) not work.
[Galaxy Ace II Android Development] ChronoMonochrome:
One yet more bugfix update r4.2.2

[MENTION=5701712]shaqman89[/MENTION], [MENTION=5151049]borkins[/MENTION], thanks for testing and reports.

What I've figured out so far: LMK somehow wasn't working at all triggering OOM when memory is full. Also found a few inconsistences with the upstream android-3.4 in the memory compaction, which likely were causing reboots in the attached here logs. Eventually most of the CAF code was finally dropped again as it appeared not to work properly on our phone, although I left a few useful commits which didn't exist in android-3.4. Those are fixes to a memory compaction, again. Hopefully it'll work fine, as at least now LMK appears to work properly when I was testing it.

P.s. as for not working reboot to recovery, I found that samsung's modules j4fs and param weren't working properly with a generic module code update. Even though I found a work around this, I've dropped this update for now as it appeared to be just a nuisance without actually improving anything.
[Galaxy Ace II Android Development] halcyforn:
How to install this kernel if i dont have any cwm and twrp because they need this kernel.
[Galaxy Ace II Android Development] ChronoMonochrome:
It's already assumed you have a custom one installed, or you use a temporary CWM (can be found on this forum).

P.s. And please don't double posts across different topics.
[Galaxy Ace II Android Development] borkins:
@UP

News:

New OC DDR Scripts update has been detected on this planet! [°0°]

So far only 1-2 FC with r4.2.2, no reboots - It's really better. :)

Edit: Added a little manual in my OC DDR post.

If someone needs a help, please send a PM to me, I'll try to help as soon as I can!
[Galaxy Ace II Android Development] ChronoMonochrome:
By the way, by FC is meant an app being killed by LMK or an app error that lead to closing of it? In first case, if you find the current LMK settings are too aggressive, then change minfree in init.d/20minfree to something less radical; on LP those aggressive LMK setimgs seems to be only way to go.
[Galaxy Ace II Android Development] borkins:
I think it's the LMK. :/
[Galaxy Ace II Android Development] shaqman89:
I could confirm it works flawlessly on kk.

Did a few reboots and some manual trigger through terminal. None has caused a reboot (even with 1100). And haven't experienced any FC for the first hour.

We'll see how well it goes an a prolonged usage.

Great job. [emoji106] [emoji106]
[Galaxy Ace II Android Development] Sidebandit:
No can do for me on the debug version, it wouldn't boot passed the sammy logo screen and backups didn't work. Odin - Stock rom + Temp recovery , reflashed previous release and reinstalled backup.

Heavily debloated stock. Sorry i couldn't give you any more info. Fantastic work with this phone being using your kernels since 2.14
[Galaxy Ace II Android Development] shaqman89:
Chrono, I think 4.2.2 still has similar issues. I'm not sure whether it's LMK not working, or just not aggressive enough. In my case, it works a bit better than 4.2.1, untill I load some hungry RAM apps (eg: Maps). Everytime I load maps, the phone goes unresponsive and finally reboots.

In 4.1.1, the reboots doesn't happens. It does becomes unresponsive for 2-3 seconds, but then loads map normally.
[Galaxy Ace II Android Development] borkins:
I got one reboot yesterday, and another today on r4.2.2, while opening the huge 'Word' app.

Looks the reason is the same. :/
[Galaxy Ace II Android Development] ChronoMonochrome:
R4.2.3

Made a new build based on r4.1.1.

Changelog

lowmemorykiller: reverted changes to r3.12

reset kernel base to r4.1.1

re-applied efficient workqueues patches, async fsync for f2fs and android 6.0 bootloop fix

LMK works fine now(like on previous build and unlike r4.1.1), but I don't have any memory-hungry apps to test actually whether this update fixes hangs, when such app tries to allocate too much memory at once. Can anyone test?
[Galaxy Ace II Android Development] shaqman89:
[MENTION=5695278]ChronoMonochrome[/MENTION]

Testing it in a while.

Thanks. :good:

Update:

Fast test. Switching between hungry ram applications are so much better now. And no reboots happen.

Previously, after two or three apps of hungry ram, it would slow the phone or cause it to a soft reboot after a while.

Testing it on kk. And hopefully it will be good on the long run.
[Galaxy Ace II Android Development] borkins:
Still causes reboots :/

After browsing, I opened the 'Word' app to read some docx, and while scrolling got reboot.

(I have last kmsg to attach, if needed.)

Edit: [MENTION=5701712]shaqman89[/MENTION], [MENTION=5695278]ChronoMonochrome[/MENTION],

The app is Microsoft's Documents editor called "Word" (like on Windows). The app size is ~ 65 MB.

I don't like the most of Microsoft products, but don't know another document editor.

The last kmsg is in the attachments...
[Galaxy Ace II Android Development] shaqman89:
Just out of curiosity, what word app are you using?

And how big is the file?

So far, I have got no reboots. Also oc ddr seems to works Okay as well on this version.
[Galaxy Ace II Android Development] ChronoMonochrome:
Of course it'd be better if you'd attach last_kmsg. I have some guesses regarding this, but let's not make things worse by guessing.
[Galaxy Ace II Android Development] mfawonkpo:
Where is the nodebug version for 4.2.3, i didnt found it in the download server
[Galaxy Ace II Android Development] ChronoMonochrome:
It wasn't yet uploaded. Since it's still considered mostly as bugfix and not "feature" update, I would like to resolve some issues before I'll make versions with disabled debug as well.
[Galaxy Ace II Android Development] shaqman89:
That app is damn heavy. lol. Beats anything I've used so far. Have you tried WPS Office?

Well, anyway I just tried it and could confirm that it does indeed caused a reboot.

Here is log, just in case it's needed. One glimpse of it, and it looks similar to [MENTION=5151049]borkins[/MENTION].

https://drive.google.com/file/d/0Bzo3MSxg_YFCczlFM1ZmU05BbGM/view?usp=sharing
[Galaxy Ace II Android Development] ChronoMonochrome:
For me it's something not that easy to reproduce reboot, trying to keep this app in memory, when LMK kills it almost immediately once app in a background. I was using word found here http://4pda.ru/forum/index.php?showtopic=623762 . Idk, maybe it happens only on heavily overloaded system, I've tried making word and stock browser unkillable to possibly overload the system, but still nothing. Also in such case dmesg gets fully spammed with LMK attempts to kill browser, need to fix that, lol :)
[Galaxy Ace II Android Development] ChronoMonochrome:
New build R4.2.4 is up

Changelog:

attempt to fix memory compaction issue, that leads to reboots

MCDE: reset video modes to stock and reduce an unneeded display wakeup delay

added support for OmniROM 5.1.1

installer code optimizations

Still need to know whether memory compaction issue was eliminated or not, since I can't reproduce that reboot in Word app.
[Galaxy Ace II Android Development] ChronoMonochrome:
Thanks for log. Hmm, I didn't expect ptrace is bugged as well.
[Galaxy Ace II Android Development] saimyounas786:
Have we got stable ddr oc?
[Galaxy Ace II Android Development] ChronoMonochrome:
R4.2.5

Made a new kernel build.

Changelog

merged upstream ptrace bugfix

merged security changes introduced in r4.2

changed LMK logic not to try killing protected tasks(and not to spam dmesg log)

Hopefully it solves problem in last_kmsg above. Also changed LMK a bit, now it won't stupidly try to kill an unkillable tasks all the time, spamming logs. :)
[Galaxy Ace II Android Development] shaqman89:
It seems that it's working now Chrono. Have been playing around with Word, and switching between some heavy apps, and haven't got any single reboots. Great job. :good: :good:

When I was testing it, I was watching kmsg, and it seems something is causing it to not enter deepsleep. I'm not sure if this is just because I've only turn it on, or something else, but this is the suspicious part in the log.

<4>[ 4866.960327] bcmsdh_sdmmc_resume Enter
<4>[ 4866.960327] bcmsdh_sdmmc_resume Enter
<4>[ 4866.966094] Restarting tasks ... done.
<6>[ 4867.577789] ux500_pm_gpio_save_wake_up_status: bank6: 0x01000000
<6>[ 4868.952636] PM: Syncing filesystems ... done.
<4>[ 4868.959625] Freezing user space processes ... (elapsed 0.004 seconds) done.
<4>[ 4868.964233] Freezing remaining freezable tasks ... (elapsed 0.002 seconds) done.
<4>[ 4868.967224] Suspending console(s) (use no_console_suspend to debug)
<4>[ 4868.976013] bcmsdh_sdmmc_suspend Enter
<3>[ 4869.087005] dpm_run_callback(): power_suspend_late+0x0/0x38 returns -11
<3>[ 4869.087005] PM: Device power.0 failed to suspend noirq: error -11
<3>[ 4869.088165] PM: Some devices failed to power down
<4>[ 4869.243560] bcmsdh_sdmmc_resume Enter
<4>[ 4869.243591] bcmsdh_sdmmc_resume Enter
<4>[ 4869.249999] Restarting tasks ... done.
<3>[ 4869.255706] suspend: wakelock suspend_backoff is not enabled because no_suspend_backoff_wakelock=1
<6>[ 4869.632690] ux500_pm_gpio_save_wake_up_status: bank6: 0x01000000
<6>[ 4869.882690] ux500_pm_gpio_save_wake_up_status: bank6: 0x01000000
<6>[ 4870.135345] ux500_pm_gpio_save_wake_up_status: bank6: 0x01000000
<6>[ 4870.419738] ux500_pm_gpio_save_wake_up_status: bank6: 0x01000000
<6>[ 4870.957702] ux500_pm_gpio_save_wake_up_status: bank6: 0x01000000
<6>[ 4871.108856] ux500_pm_gpio_save_wake_up_status: bank6: 0x01000000
<6>[ 4871.571655] ux500_pm_gpio_save_wake_up_status: bank6: 0x01000000
<6>[ 4872.184692] ux500_pm_gpio_save_wake_up_status: bank6: 0x01000000

It keeps on repeating similar entries like so.

Also, I noticed that CPU minimum frequency was set to 800 MHz in CK.

Changing it back to 200 MHz doesn't seem to do anything related to the test.

Now time to test it for a longer period. ;)
[Galaxy Ace II Android Development] ChronoMonochrome:
Thank you and [MENTION=5151049]borkins[/MENTION] for testing too, I probably wouldn't find these bugs without the logs provided. :)

At the first time I though it's bug, but seems that It's normal since I haven't seen upstream fixes for that. -11 error means -EBUSY(I don't know why this is considered as error, ever), so it gets not powered off because something(e.g. WiFi) is preventing the power management code from doing this.

Just wait for some time, normally it should set 200 MHz when device is fully booted. If this is still the problem, please check whether /init.rc has an inclusion of /init.kernel.rc and the latter file looks so:
[Galaxy Ace II Android Development] shaqman89:
I'd say quite stable indeed. With the new script provided by [MENTION=5151049]borkins[/MENTION], I haven't got any reboots related to ddr oc (1100 MHz) at all in the last 3 days. Although sometimes I found its not set at boot all the time when using init.d script, but from the last change logs, it is by design to improve stability.
[Galaxy Ace II Android Development] saimyounas786:
Thanks shaqman89

i appreciate that

people in this community are so gentle
[Galaxy Ace II Android Development] ace2nutzer:
Maybe this?:

/sys/module/dhd/parameters/dhdpm_fast

This is enabled by default and it has something to do with wifi and suspend.

Is this really needed ? Usually during boot cpu freq is all the time @ max 800mhz .. and when media scanner is done .. then it goes down to 200Mhz by itself without forcing this with an script.. or i'm understanding this wrongly ?
[Galaxy Ace II Android Development] ChronoMonochrome:
Nope, those errors in logs appears because of a changes in a power management. Still not sure if it's working 100% properly, but since it doesn't cause too much problems (e.g. too many wakeups or so-called "deadsleep" bug), I'd prefer to leave everything as it's. Power management updates includes an essential changes in kernel freezer, upon which heavily relies kernel scheduler, so I wouldn't like to mess up with this one more time. Normally after these errors PM code just retries to put the phone to sleep until it succeeds(usually after second attempt), so I'm fine to stay with this.

There's no way to set 800 MHz at the very first seconds since the kernel boot, it should boot with 800MHz(or whatever custom freq set in sources or via cmdline). It reduces boot time a bit.
[Galaxy Ace II Android Development] ace2nutzer:
When i open very quickly after boot an app to see actual CPU freq it's running @ 800Mhz.

Bu u mean the CPU freq after the samsung boot logo and till which point it should run at xxxmhz (200Mhz?! ) ?? ??

EDIT:

lol but wait .. isn't it viceversa ?

I can remember me when i was optimizing the defconfig .. i had an case where the cpu was running all the time @ 800Mhz ...

even without load at all .. so i think it'll run always @ its original freq == 800Mhz .. and then later with proper drivers it can switch to 200Mhz .. but not before.

If i remember me correctly, this was the option:

https://github.com/ace2nutzer/Samsu...67c6e0f/arch/arm/configs/codina_defconfig#L88
[Galaxy Ace II Android Development] ChronoMonochrome:
As long as QoS code isn't fully initialized it refuses to change a minimum frequency (check https://github.com/cocafe/i9070_Kernel_CoCore-E/commit/e2fbd46cb4e8621581d819c259f9f6200ce6faad ). In indeed, booting with 800 MHz it's just a micro-optimization , since the time when CPU freq can't be changed is very limited (probably 2-4 seconds).
[Galaxy Ace II Android Development] Noxialis:
4.2.6?

o.O

Going to try that one, tell you how it goes throughout the day.
[Galaxy Ace II Android Development] ace2nutzer:
btw: i've edited my previous post.

But i still don't see the problem.

I've never faced this difference of freq.

If u set performance gov by default then it'll run all the time @ 800mhz till CM sets another gov.

And with dynamic it runs properly with 200/800 ..

it can be easily checked over ADB after booting to Recovery ... it works properly.

I'm still meaning that the default freq is 800Mhz and not 200Mhz ..

When the phone is running in download-mode it drains really much battery .... this is because of high brightness + probably it runs all the time @ 800Mhz ..

unfortunately we can't see if it's 800 or 200 ... but maybe someone with proper hardware .. (Riff-Box , JTAG) can test this ??

Just out of curiosity ... not important :)