yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Original Android Development] Naudiz:
Running freezefix1 Kernel on Nightly 20151125 (yes, I'm lazy with updates) and until now it's still rock-stable.

So far it seems that [MENTION=6592513]Andrea900[/MENTION] is the only one with freezes, maybe they are coming from somewhere else? I still have hope :)
[Galaxy S II Original Android Development] lukss12:
May be you installed another of zeitferne's kernel, please do it carefully and then (if freezes still there) a log would be really helpful. Thanks!

[MENTION=5948587]zeitferne[/MENTION] sometimes my phone hangs like it is going to freeze, the menu and back buttons flash when I touch them just like in a freeze but after 1 minute or a bit more it starts to respond again. Have you experienced that on the fix-kernel?
[Galaxy S II Original Android Development] Andrea900:
Mate, I've checked the right version of kernel... Just enough! XD

And I've already provided a bunch of logs in the previous posts.

Btw, the behaviour that you complain happens to my device, too! But, in my case, it hangs completely, as you already know!

Now I'm testing this heavily battery drain setting: 200/1200mhz with Pegasusq governor. Let's see.

EDIT: another freeze. :confused:

EDIT 2: reverting to malifix kernel.
[Galaxy S II Original Android Development] zeitferne:
To be honest, I am not using my S2 as my main phone anymore, so I can't say anything to that. But [MENTION=5665605]cdrivex4[/MENTION] told me per PM that his phone too slowed down and then even rebooted (as per last_kmsg, this was not caused by the kernel but probably by some watchdog timeout). He said tuning his RAM/OOM settings solved the problem.

Maybe I should upload a version of my last kernel with zRAM disabled to see if that changes anything, but I have no time right now. :( Or I have heard (also in this thread) that there are tools that can do this without creating a new kernel (never used one though).

I never had freezes that frequently, even without the fix. Are you using your phone heavily? Maybe you too are running out of memory.
[Galaxy S II Original Android Development] lukss12:
Hahaha I'm sorry, it's because I'm confused, really confused. I've been using it for 3 days now without a freeze,:eek::eek::eek::eek:

About the logs, zeitferne said they weren't recovered right you could try to use adb during freeze and extract current dmesg.
[Galaxy S II Original Android Development] Andrea900:
No, absolutely no. Phone gets stuck after 5 min from reboot with your last kernel.

I've reinstalled the Malifix one, and now the phone runs smoothly without those crazy freezes... Until the next one. LOL
[Galaxy S II Original Android Development] chrisXL:
[MENTION=5948587]zeitferne[/MENTION] sometimes my phone hangs like it is going to freeze, the menu and back buttons flash when I touch them just like in a freeze but after 1 minute or a bit more it starts to respond again. Have you experienced that on the fix-kernel?[/QUOTE]

+1 for hangs but no freeze!
[Galaxy S II Original Android Development] xhoster:
I didn't test your kernel, yet @zeitferne, but will look through your changes and see what happens (I will disable zRam first).

The last days my cpu was limited to 1000mhz, to see if this changed anything (eliminating the possible 150 value from 1200mhz frequency) and it seemed to run smoother than before (don't know how much of it was placebo). But I still got a freeze after around 80hrs. of uptime and some more after a reboot (sadly I couldn't get any logs, since I havn't been at home).

Without logs, none of this matters and I will try the fixed kernel without zram and see what happens.

Thanks to all working and helping on this!
[Galaxy S II Original Android Development] KickerTom:
Uptime 59 hours, 13 mins and counting. Before I had at least one or two resets per day. So for me, this seems very promissing...

[MENTION=6592513]Andrea900[/MENTION], try checking all your partitions for corruption. I had quite often corrupted filesystem after a crash, and this corruption was then causing other crashes, not related to the kernel problem. I do it manually from TWRP command prompt, as the FS needs to be unmounted.
[Galaxy S II Original Android Development] Andrea900:
Thanks for the advice, but this is not my problem. I've reverted to the previous zeitferne's kernel and the situation has turned good, very good. By the way, a 55h+ of uptime is not indicative, we need almost 150/200h + to be in the safe zone (nobody has reach this value).
[Galaxy S II Original Android Development] cdrivex4:
I tend to have quite a few apps installed. I use cool tools for its floating info thingy with heavy process enabled and free mem , io activity labels also showing.

Prior to a crash there was for me, since the intro of zram v high io activity. Then I would notice that via cool tools free ram would drop below 40mb and the phone would not recover from it.

Try changing oom empty application from default if 120 to 141mb, for me this seems to be the sweet spot. In os menu running processes, for whatever you have running processes and cached processes, running procs could still have plenty free ram to work with, but when cached processes runs out of free mem it all goes a bit wobbly an doesn't recover.
[Galaxy S II Original Android Development] Dark1Angel:
Off topic(as usual as nobody answers elsewhere). With modem is better or what's the difference between XXKI4 and XXMS4/XXMS2?
[Galaxy S II Original Android Development] kudos1uk:
The reason they don't answer is there is no answer, you need to test and see, different countries and networks and all that, no real answer. You need to test them and see which works best with your network, some people recommend quite old modems in their country/network.

Keep on topic!
[Galaxy S II Original Android Development] rINanDO:
I just have freeze right now. I had none for almost a week... (not used WhatsApp that much this week) I'm currently not using any patches of Zeitferne (yet). I was just typing a message in WhatsApp. When the freeze happend I attached the phone to ADB and trying to get the dmesg and logcat. After about 15 minutes cool tool refreshed the actual state of the cpu. You can see that it shows 150Mhz, more than 200MB free memory and CPU 0 at 100% usage. I think there are different crashes/freezes we must identify. I'm going to test with zeitferne's latest patch if I still can get the exact same freeze like this.

See my photo of my frozen phone.

View attachment 3581935
[Galaxy S II Original Android Development] Dr AM:
Now I've been on [MENTION=5948587]zeitferne[/MENTION] patch for two days and no freezes at all + battery still great and deepsleep is perfect, looks promising so far

Thanks :)

Sent from GT-I9100 - 5.1.1
[Galaxy S II Original Android Development] lukss12:
Almost 70 hrs of uptime with [MENTION=5948587]zeitferne[/MENTION] kernel using as daily driver and counting. Will update on this post.

EDIT: 100 hs

It seems to be always the same behaviour CPU0 at 100% usage on 150Mhz and CPU1 idle.(sometimes there are hangs similar to the freeze but the phone recovers itself) Try zeitferne and tell us your experience :D:D:D
[Galaxy S II Original Android Development] lukss12:
It seems to be always the same behaviour CPU0 at 100% usage on 150Mhz and CPU1 idle.(sometimes there are hangs similar to the freeze but the phone recovers itself) Try zeitferne and tell us your experience :D:D:D
[Galaxy S II Original Android Development] lukss12:
--don't look at me.I'm an error--
[Galaxy S II Original Android Development] Klaerchen:
Now 91 hours uptime on both of my S2 with zeitferne's freezefix kernel. One S2 is my daily used phone with many apps and much usage. I don't see log-entries concerning the cpu frequency (is catlog on level info enough?). The system memory usage seems to be confined between 350 and 450 MByte, the free RAM always more than 250 MByte.

Sometimes the phone slows down very much (memory garbage collection?) and afterwards it's running smooth as normal.

Battery usage is moderate, seems to be slightly better than with unpatched kernel.

The second S2 is almost unused (only online with mobile data and checking emails). Its system memory usage lies around 250 MByte. It always appears very smooth.

So I'm still full of hope, that the problem is at least reduced.

Thanks to all devs and testers!
[Galaxy S II Original Android Development] rINanDO:
I will. Applying his patches now :D :D
[Galaxy S II Original Android Development] cyhton:
I read that "Can't turn on screen when dialing"

is it fixed? Wanna flash this ROM
[Galaxy S II Original Android Development] Philipvi:
Zeitferne's kernel has probably fixed my main freeze issue. Since CM 12.1, Cygic navigation would lockup my S2 within the first 30 minutes of navigation.

I've now successfully navigated about 4 hours (+ 4 hours simulated navigation) in the last couple of days. This was not possible with the regular CM 12.1 kernel.
[Galaxy S II Original Android Development] rINanDO:
Hi zeitferne,

Should your patch be ifdef-ed for only exynos 4210? I wonder why this freeze bug only affects our device and not others like the s3. Is it because they have more cores?
[Galaxy S II Original Android Development] Snipars:
Hey guys,

I'm running CM12.1 (from Dec. 1) and I'm having the notorious bug of the video freezing but the sound is still playing bug. I've tried everything from turning the NuPlayer off to reflashing and no result. This mainly happens on FB and on some videos in YouTube, every other video streaming app works fine. Please help
[Galaxy S II Original Android Development] Dark1Angel:
Hi! I've read a lot about file systems and f2fs is better than ext4, but i read that the kernel and rom must be f2fs compatible or something along the lines. What do you think? should I change some partitions to f2fs(on some phones it showed huge improvement, like up to 300%)?
[Galaxy S II Original Android Development] Dr AM:
All my partitions are on ext4 and no issues for me

Sent from GT-I9100 - 5.1.1
[Galaxy S II Original Android Development] makix13:
Same in my case, not issues at all with ext4 [emoji6]

S2 LA Cyanogenmod 5.1.1 [unofficial] [06/17] - Xposed [unofficial romracer's framework] - [rovo's beta 4 apk] - Viper4Android
[Galaxy S II Original Android Development] Dark1Angel:
I know there are no issues. I'm asking if the kernel and rom are compatible with f2fs. I read that if they aren't the phone hardbricks so if i can improve, why not? ;)
[Galaxy S II Original Android Development] ajislav:
I dont think our kernel supports f2fs.

But you could always try formatting e.g. /preload and see if it mounts.
[Galaxy S II Original Android Development] khal_nayak:
can u provide the link to this kernel, want to try it out
[Galaxy S II Original Android Development] the.gangster:
It's already attached in post #2565 http://xdaforums.com/showthread.php?p=64323625
[Galaxy S II Original Android Development] ultravy:
First, we need support of F2FS file system in kernel, also i read that it has much more speed vs ext4. I tested f2fs on i9505 and result was better!
[Galaxy S II Original Android Development] DevisG79:
Do you also have sdcard0 formatted in ext4? I think yes when you write all partitions.

With TWRP stock Kernel?
[Galaxy S II Original Android Development] Dr AM:
Yes my sdcard0 also ext4 :)

Sent from GT-I9100 - 5.1.1
[Galaxy S II Original Android Development] Dark1Angel:
I just repartitioned and was advised to have internal memory(emmc) in vfat, but the phone had so much lag and many apps crashed so I set internal as ext4 too.
[Galaxy S II Original Android Development] Kozmyk:
Running the repartitioned i9100 1GB/4GB pit

Just Installed cm-12.1-20151219-NIGHTLY-i9100.zip; went in fine.

I have TWRP 2.8.7.0 installed ( from stock_kernel_twrp_1020-signed.zip)

I tried to do a TWRP backup but the backup fails. Tried with and without compression,
[Galaxy S II Original Android Development] Dark1Angel:
I found a thread exactly about f2fs on s2: http://xdaforums.com/showthread.php?t=2653462 . I don't think lysergic will bother make an f2fs compatible kernel, but maybe he will for cm13. It would be a huge improvent, and any improvent is good for our old ladies. [MENTION=6159291]Lysergic Acid[/MENTION] any chance on this?
[Galaxy S II Original Android Development] DevisG79:
Maybe you have set the recovery to read only
[Galaxy S II Original Android Development] Kozmyk:
Never had to before.

I shall investigate...
[Galaxy S II Original Android Development] Klaerchen:
CPU has a minimum 500MHz instead of 200 MHz

After an uptime of 130 hours I have come to the situation, where the CPU does not go below 500 MHz (instead of 200 MHz as usual). I think I obsereved this also with CM11 after a similar time of operation. For a test I switched to power saving settings where the phone was really slow(!) and running at 200 MHz. After switching back to normal power settings, the CPUs again run at 500 to 1200 MHz, not going down to 200 MHz. The second CPU is correctly made offline if it's not requiered. What could that be? The logcat does not show anything related to frequencies.

I'm on a nightly of Dec. 09 with [MENTION=5948587]zeitferne[/MENTION]'s freezefix kernel.
[Galaxy S II Original Android Development] Klaus N.:
Wipe cache and dalvik/art and take a look, if it works again.
[Galaxy S II Original Android Development] Klaerchen:
That's not necessary. I know that I simply have to reboot the phone and it will work correctly for the next 120 hours. It's more the question: What changes during runtime that makes the governor (or who else?) unable, to select the lowest frequency.
[Galaxy S II Original Android Development] aleMarvel:
mee too !!

after 1 minute or a bit more it starts to respond again and i have no crash !!

from 3 days !!! :fingers-crossed:
[Galaxy S II Original Android Development] Esk_maghdouni:
I have same problem since long time ago when i switched from stock rom(JB 4.1.2) to Kitkat & then LP custom roms (specially cyanogen base roms , only Kitkat slimroms was ok). To recognizing available wifi ,the solution for me is going to wifi>advance menu>region code>thick one of the options e.g. "Europe" after every booting, this means that The chosen region code cleared during every shut down or booting process. is there any permanent Solution?
[Galaxy S II Original Android Development] aljowen:
Hi,

Im having an issue getting twrp on my device. In the past i have always used cwm recovery but that has now been replaced by the cyangogen recovery which has far more limited options. Since it would seem that cwm has become obsolete now i am trying to flash twrp from the link that was in the op. Whenever i try and "apply update" from within recovery to install twrp i get a message telling me that it has failed with:

E:footer is wrong
E:signature verification failed
Installation aborted

Thanks for any help :)

UPDATE:

I have flashed cwm using odin and things seem to be working again. I may use cwm to flash twrp if i feel like it in the future.
[Galaxy S II Original Android Development] Esk_maghdouni:
I have same problem and after each booting I do this setting:

Go to wifi>advance menu>region code>thick one of options and return( no deference for my cell). now available WIFI s will be detected.
[Galaxy S II Original Android Development] lukss12:
Some time ago I observed that turning on power saving mode manually results on a very very slow experience but when it turns on because of lower battery it doesn't. Strange :what:

The governor decides wheter or not to scale down looking the CPU usage. It could be that any Android's or kernel's maintaining routine grows during runtime. Look on your phone which processes are using your CPU.

Edit: mine is scaling well after 117 hours of uptime.
[Galaxy S II Original Android Development] Dark1Angel:
does flashing one of the nightlies modify the RIL? First i flashed a modem without ril and all went ok, then i wanted to try a modem with ril and then i got no signal.
[Galaxy S II Original Android Development] Lysergic Acid:
If [MENTION=5948587]zeitferne[/MENTION] confirm his patches fix the problems we'll merge on official nightlies for sure. But at this moment I'm not working on CM12.1 anymore, everyone moved to Marshmallow, and just the internal sdcard problem is holding us to start CM13 nightlies ;)

There's a some f2fs patches incoming to stock cm kernel, it's all backported from 3.4 kernels, well, for now we don't want to break even more the device.

That happens for a long time. You can do a fresh reboot, record something in 1080p with the camera, put the phone for sleep and later check the cpu freqs. Your frequency won't go down past 500MHz
[Galaxy S II Original Android Development] kudos1uk:
I always understood you should never flash a modem+RIL combo on a custom ROM, my understanding was you should only flash the modem.

I will stand corrected if I'm wrong but I don't think so, I'm sure the custom ROM has it's own RIL, how you put it right I'm not sure, assume you just flash the ROM again.
[Galaxy S II Original Android Development] lukss12:
Has anyone found a proper explanation for this?
[Galaxy S II Original Android Development] Dark1Angel:
Oh so that was the issue. I was really wondering why a pack ril + modem would fail(as they are supposed to be made for each other) now it makes sense, so as i changed the ril it was no longer compatible with the rom. Flashed the rom again and problem solved.
[Galaxy S II Original Android Development] Klaerchen:
Hi [MENTION=5948587]zeitferne[/MENTION],

I took your patches '0007-...' and '0008-...', is this correct? I want to test it together with the MALI 3-frequency patch http://review.cyanogenmod.org/#/c/125182/ .

Regards, Klaerchen
[Galaxy S II Original Android Development] zeitferne:
You are talking about this patchset? Yes, 7 is the critical one. 8 just adds logging.
[Galaxy S II Original Android Development] spanitzer:
Is this rom stable?

Gesendet von meinem GT-I9100 mit Tapatalk
[Galaxy S II Original Android Development] lukss12:
Why don't you use the searchbox for the word "stable" and read a little like everyone here does?
[Galaxy S II Original Android Development] viperdriver2000:
Hi,

i updatet from cm11 to cm12.1.

i do a fac reset. delete all caches.

downloaded tk-gapps PICO MODULAR PACKAGE Proper DPI Play Services (recommended).

but i get an error and it stops.

after reboot i have no store.

i boot back to recovery (new one) and again i cant flash gapps...

what can i do?
[Galaxy S II Original Android Development] Saber:
Try Opengapps Pico.

Regards, gsstudios
[Galaxy S II Original Android Development] jojobg:
[MENTION=6159291]Lysergic Acid[/MENTION] - Do we have full device encryption working on cm 12.1?
[Galaxy S II Original Android Development] Dr.Fix:
Great news! Just a couple of questions:

- will we be able to update from 12.1 to 13 via OTA directly or will need a manual flash?

- if we'll need a manual flash, would cyanogenmod recovery be enough or we'll need another recovery such as twrp?

Thanks
[Galaxy S II Original Android Development] viperdriver2000:
same problem.

"your device does not hace sufficient space avilable in the system partition to install this gapps."
[Galaxy S II Original Android Development] the.gangster:
In twrp-recovery: Wipe Systempartition and after that install Rom and GApps again. It should fit, if there is no old stuff in there.
[Galaxy S II Original Android Development] Kevin3014:
Should I install the snapshot or the latest nighty?

Can somebody give me a brief difference between the two. Thanks! : )
[Galaxy S II Original Android Development] viperdriver2000:
i only found philz_touch_6.48.4.

now i get a different error.

"the installer detected that your recovery does not support stdin for the tar binary."

where can i found a working twrp-recovery version?
[Galaxy S II Original Android Development] the.gangster:
By reading the OP!!!
[Galaxy S II Original Android Development] viperdriver2000:
sorry you are right.

havent seen it...

now it works.

thx for your help
[Galaxy S II Original Android Development] zeitferne:
Since I have read quite some code in this area while searching for the freeze bug, I would risk the guess that for at least one of the two exynos_cpufreq_lock calls in drivers/media/video/samsung/mfc5x/ (mfc_enc.c:1558 and mfc_dec.c:1913) the matching exynos_cpufreq_lock_free in mfc_dev.c:486 is not called. Anyone want to investigate this?

I think we have enough evidence now that the patch fixes that particular freeze problem. I think it should also be relevant for CM13. (But it should be #ifdefed for exynos4210, since keeping track of onlining CPUs is useless overhead on other phones; see the existing use_clock_down / SW_CLK_DWN checks.)

However, I got PMd by [MENTION=5703164]McB77[/MENTION] (thank you!) with these two logs:

Kernel panic because of a frequency mismatch in exynos_target. The null pointer error is from an oversight in my clock dumping/logging code that is called before I would let the kernel panic anyway. Unfortunately, this means some helpful information is missing. But it probably has something to do with the exynos_cpufreq_lock before going to sleep / suspend,

adb dmesg during freeze. Interestingly, no frequency change is attempted, and there are lots of lines like "<4>[ 6027.625115] c0 Lock missing policy: nId=10, level=4", coming from here.

I won't be able to do anything regarding that in the next time however, at least not until February.

Since [MENTION=5703164]McB77[/MENTION] said he only PMd me instead of posting here because of some forum restrictions, I will quote his description of the crashes below:
[Galaxy S II Original Android Development] lukss12:
After reading LysergicAcid post I had the thought that this was happening somewhere in the code but I dindn't have time to look. I'll invesigate it.

---------- Post added at 12:21 PM ---------- Previous post was at 12:15 PM ----------

It works only on our device because SW_CLK_DWN is defined for it and not for the others that don't need the software to handle scaling down due to idle state.

EDIT: [MENTION=5948587]zeitferne[/MENTION]

Lock seems to be released in mfc_dev.c when calling mfc_released (maybe someone is not using it well?). Where should the mfc device be used from?

Also on mfc_dec.c if a jump is made due to an error like this after locking cpufreq, the error handling section is not releasing it. It's only releasing busfreq lock. (May be they expect a call to release althought an error on init occurs, but is this right?)
[Galaxy S II Original Android Development] bixi:
The kernel of [MENTION=5948587]zeitferne[/MENTION] must be flashed from the recovery?

Now I have the twrp instead the cm recovery
[Galaxy S II Original Android Development] zeitferne:
Yes, it must be flashed from recovery. Flashing from TWRP should also work, but by flashing the kernel you also flash back the CM default recovery (it is impossible to distribute kernels without recoveries for the S2).
[Galaxy S II Original Android Development] bixi:
Why have you chosen the cm recovery?
[Galaxy S II Original Android Development] zeitferne:
I haven't really "choosen" the CM recovery, I just use the Cyanogenmod code & tools for creating the kernel. Naturally, the CM recovery is the only recovery that is supported there out of the box and for a test build I don't care enough about that to learn how to change that.
[Galaxy S II Original Android Development] lukss12:
He is trying to fix kernel problems. He won't bother making all the modifications needed to port TWRP to his kernels. The only purpose of them is to find proper fixes to kernel problems so LA can merge them on the official branch. You can use any of LA's TWRPfied kernels to flash whatever you want an use zeitferne kernel after that to test fixes. :good:

Edit: zeitferne answer wasn't sync on my device when I answered, sorry for the double answer.

---------- Post added at 02:09 PM ---------- Previous post was at 02:01 PM ----------

Missing url for dmesg. :D:D