yashsingh1/xdaforums huggingface dataset:
[Galaxy S 4 i9505 Android Development] devsnor:
First of all thank you for your work, it's exactly what I like in a kernel - plenty of options to experiment with. I just flashed MarkEight this morning (coming from Imperium 4.6 on Lollirom 9.0) and got a reboot whilst clearing notifications from Twitch.tv official app. I'm new to xda but not really new to flashing anything on my android phone, if you could tell me what you need to find the culprit, and how can I provide that for you I would be grateful. I use close to stock (well, your stock) kernel config, the only things I change are governor, scheduler and hotplug driver, that's respectively intelliactive, deadline, intelliplug. Cheers!
[Galaxy S 4 i9505 Android Development] robcore:
Hi! If you haven't rebooted since then, retrieving your last kmesg would be great. I put a button in the synapse logs section, and it even tells you where it's saved in a toast message.
[Galaxy S 4 i9505 Android Development] robcore:
[MENTION=7737372]devsnor[/MENTION] I recommend against deadline for the scheduler though, it creates a deadline for tasks and doesn't play nice if an app does too much work on the main thread. Also, i seriously updated/altered cfq for real-time/flash-storage use.

FYI my next project is a highly experimental algorithm called split-scheduling.
[Galaxy S 4 i9505 Android Development] jantdroid:
Hi! I just installed Thor S7, so to install your rom all I need to do is flash slim's kernel cleaning script and then flash your kernel? thanks! I really wanna try your kernel :) I haveGT-i9505 btw
[Galaxy S 4 i9505 Android Development] robcore:
You only need to flash slim's zip if coming from another custom kernel. If coming from stock my installer will be enough. Make sure to install busybox on rails from the play store though!
[Galaxy S 4 i9505 Android Development] Corduroysack:
Thor is really heavily modded it would be interesting to see what results you get. I've got my boy till 2 so hoping to try 8 out on imperial
[Galaxy S 4 i9505 Android Development] sonickles9:
Please, let me know if you have freezes and random reboots on GPU-heavy apps like browsers and games. I had them while on Thor and WizCyan, so I had to switch to lollirom :/

Enviado de meu GT-I9505 usando Tapatalk
[Galaxy S 4 i9505 Android Development] devsnor:
There. Hope you can help.
[Galaxy S 4 i9505 Android Development] petre22:
Hi robcore,y instaled markEiht and y not heave cpu frequency and much more ...

PS:Solved busybox on rails instaled and no activated,sory :D
[Galaxy S 4 i9505 Android Development] robcore:
That helped immensely actually, thanks!

msm_hsic is my KHAAAAAAAAAAAAN. Someone please help me find an upstreamed patch, and I will swear less in my git commits.
[Galaxy S 4 i9505 Android Development] robcore:
Hsic kernel oops update.

Initiate rant sequence, Jarvis.

[Insert angry curse words here]

#thisiswhylinusswearslikeasailor

Patches like these: https://github.com/CyanogenMod/lge-kernel-mako/commit/052643f9ba3f9d7fc704afc654ad9a0511480da1

were meant to fix Qualcomm's hsic wake lock problem, but "surprisingly" caused crashes instead.

I wonder why.

Just kidding, I don't wonder.

There are FOUR power states used by msm power management in its drivers. WFI (wait-for-interupt), retention, standalone-powercollapse, and powercollapse.

The two that are the most effective are wfi and powercollapse, the shallowest and deepest idle/suspend modes respectively. The other two are far less relevant, though retention can arguably be useful for hotplugging non-boot cpus, as full powercollapse can be an expensive sequence for cpus that are constantly entering/exiting idle states.

STANDALONE POWER COLLAPSE has been OBSOLETE since it was discovered to be a battery drainer even dating back to the bloody galaxy s2 skyrocket!!! So whoever decided that fixing an hsic wakelock problem using it instead of retention or powercollapse can s@$& my b@$&$, because it is perpetually trying (and failing) to enter an idle state that has been deprecated since 20-bloody-13.

THIS is what happens when maintainers focus primarily on their own subsystem without taking five minutes to check for updates to the subsystems they interact with. This is classic "right hand doesnt know what the left hand is doing.

This is shrapnel in my chest, and today I build an arc reactor.

Rant sequence complete. Someone get me a whisky (jd, neat), and a keyboard.
[Galaxy S 4 i9505 Android Development] sonickles9:
lol

that's informative

Enviado de meu GT-I9505 usando Tapatalk
[Galaxy S 4 i9505 Android Development] robcore:
Lol

"Hi, I'm Samsung! I know we explicitly reference standalone power collapse in the hsic driver that's responsible for modem suspend, but in the power management driver we've decided to block alllll usage of standalone power collapse. On top of that, we designed the hsic driver to panic when it can't find the right suspend mode! Why? Because we hate you. Good luck!"
[Galaxy S 4 i9505 Android Development] sonickles9:
I get a few graphical glitches everywhere (the whole screen darkening a bit then brightening a bit again, like when you use different Samsung color modes) very quickly when I'm using the phone. It's minor but it is annoying when I'm playing games... I don't know if its a ROM issue, but it could be kernel related too.

By the way, I'm in Lollirom.

Enviado de meu GT-I9505 usando Tapatalk
[Galaxy S 4 i9505 Android Development] robcore:
I'm not sure what that's all about, on lollirom with the fps build.prop lines removed, I've never had issues.
[Galaxy S 4 i9505 Android Development] chiruscan:
I love the sound drivers on this kernel but the battery drain is still pretty pronounced. Im using battery friendly governors and still losing a lot.
[Galaxy S 4 i9505 Android Development] robcore:
The tunables are all in your hands : )
[Galaxy S 4 i9505 Android Development] robcore:
On that note, I will implement it in synapse next release, but for now throw this in an init.d script:

echo Y > /sys/module/workqueue/parameters/power_efficient and you'll see battery life increase.
[Galaxy S 4 i9505 Android Development] Corduroysack:
will this init.d addition work on any TW rom?
[Galaxy S 4 i9505 Android Development] devsnor:
Okay im on 9 already, synapse does keep my settings on this one after reboots, and ive not experienced a single random reboot yet, nice one!

Ive always liked the ideas behind noop and deadline(well, the simplicity of them) , ive been using the latter after I noticed how noop sometimes chokes on heavier workloads. Can you share what you tweaked in cfq please? Perhaps im wrong thinking that both cfq and bfq are too complex for a flash drive and better used on a standard spinning storages. Thanks in advance.
[Galaxy S 4 i9505 Android Development] sonickles9:
My device panics a lot on markNine... Here are the logs to help

http://cloud.tapatalk.com/s/57e008531e9d9/dmesg-2016-09-19.12.10.16.txt

http://cloud.tapatalk.com/s/57e0085a457cc/last_kmsg-2016-09-19.12.10.18.txt

http://cloud.tapatalk.com/s/57e008624946f/logcat-2016-09-19.12.10.15.txt

Enviado de meu GT-I9505 usando Tapatalk
[Galaxy S 4 i9505 Android Development] devsnor:
Just got a RR again, here's some good read for whenever you feel like you know.. Reading. Thanks.

PS: about OC in the future kernels, big fan right here. ; )

PS2: why is my kmsg so huge compared to every one elses? Is my phone a bloody mess? Ive got a very limited set of apps (like maybe 25 over lilliroms stock), I don't do any gaming on my phone and I hoover it on a biweekly basis with sdmaid. Wtf.

//edit

I know nothing (Jon Snow) about android logs but these do look like there is something going really wrong under the hood. Or its not as bad as one might think? Also, what is that mmc1 cmd 52 timeout thingy? My logs full of it.
[Galaxy S 4 i9505 Android Development] sonickles9:
My logs are full of them too

I think this is somehow related to that hsci driver thing lol

Enviado de meu GT-I9505 usando Tapatalk
[Galaxy S 4 i9505 Android Development] robcore:
I don't see why not, it's strictly a kernel function.
[Galaxy S 4 i9505 Android Development] robcore:
The cfq/bfq changes are simplistic as they default to settings for non-rotational disks such as ours. I like cfq fair queuing personally because they are closest in line with android's application-management memory model.

I'm getting closer to the hsic fix, and markten should see some improvements thanks to an upgrade to the ramdisk, (thanks to slim) and general ramdisk fixes. As far as hsic(rr's) goes, its the same crash I'm seeing in all the logs, pm runtime/rpm issues. I'm doing what I can! Trust me, I've been scouring the interwebz for a solution because it's ticking me off.

[MENTION=6018519]sonickles9[/MENTION] Cmd 52 timeout is unrelated to hsic. It's a harmless mmc timeout due to crc-related junk that can be safely ignored.

I recommend against sdmaid, but that's just personal preference...
[Galaxy S 4 i9505 Android Development] robcore:
Your boot scripts are special ; ) and I'm guessing your init freqs are too low.
[Galaxy S 4 i9505 Android Development] sonickles9:
lol is 1134mhz too low?

Well, actually my RR's stopped completely (apparently) once I disabled LMK tweaking on my performance mod, Watson... and they returned as soon as I reactivated them. Seems your kernel doesn't like my scripts lmao

Enviado de meu GT-I9505 usando Tapatalk

---------- Post added at 12:13 AM ---------- Previous post was at 12:10 AM ----------

does sdmaid do that sort of thing?

Enviado de meu GT-I9505 usando Tapatalk
[Galaxy S 4 i9505 Android Development] Helloziro:
thanks you so much

Please new features ;)
[Galaxy S 4 i9505 Android Development] robcore:
Just released an update with cpu hardlimit and fine-grained colour control yesterday ;)
[Galaxy S 4 i9505 Android Development] robcore:
Lol Lmk tweaks are...generally something I've avoided since my gs2 days with the neato turbocharger. On the s4 (across various roms and kernels), I'm usually satisfied by the stock values.

As far as sdmaid goes, I've used it a couple times with somewhat sketchy results to my app data, but no cmd 52 isn't related. It's a useless mmc (almost don't) command that I found a patch to stop ages ago but haven't found again yet. It's been in all of my lollipop kernel logs regardless of which ones I've used. I just wish I could remember where that patch is!
[Galaxy S 4 i9505 Android Development] robcore:
A glimpse into the future:
[Galaxy S 4 i9505 Android Development] Helloziro:
Thanks...
[Galaxy S 4 i9505 Android Development] Andycar:
Hey, I've got something I can't hey rid of on markNine... it's a SystemUI FC when I press recent menu button. In logcat I see this:

09-20 14:30:21.431 E/AndroidRuntime(6262): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.systemui/com.android.systemui.recents.RecentsActivity}: java.lang.ClassCastException: android.graphics.drawable.StateListDrawable cannot be cast to android.graphics.drawable.BitmapDrawable
...

Previously, on markEight I was able to overcome this by simply wiping ART cache. Now this doesn't help anymore.... must be doing something wrong. .. help?! ;)

I'm on HPG1 odexed debloated.

Отправлено с моего GT-I9505 через Tapatalk
[Galaxy S 4 i9505 Android Development] robcore:
That has to be a modified systemui. I'm guessing a stock rom with a systemui mod? That exception is clearly one that comes from an improperly coded apk...that would easily cause a memory leak and performance slowdown overtime if left unchecked. I can't, in good conscience, cause a regression in memory management code to accommodate improper coding. My suggestion would be to show that to the developer of your systemui mod...
[Galaxy S 4 i9505 Android Development] FlorianSSJ:
Yesterday flashed MarkNine, ok great performances and battery, but still screen flicker... reverted back to Imperium. I guess is caused by Panel settings...
[Galaxy S 4 i9505 Android Development] devsnor:
Regarding battery life, for some reason I lose around 10 to 15 percent over night, on imperium it was 1 to 3 (greenify + powernap) and the only thing that changed is the kernel. Also i got 2 more rrs today, and I wasn't even using the phone when both of them happened. Wish i could provide logs but I was busy at the time and restarted my phone since then to see if the issues persist on your default kernel settings. Don't take it wrong, im a beta tester because my inner nerd chose to, I only want to help get it to better stability levels cause other than those huge logs and random reboots its blazing fast and satisfies my need to tweak all the tunables you provided - and there is much more of those here than in anything ive tried so far. ; ) So im impatiently waiting for MarkTen and will be back with logs should any rrs occur on default settings. Thanks.
[Galaxy S 4 i9505 Android Development] Andycar:
Thanks, that actually did the trick; I've changed SystemUI.apk and no more FC.

ADDED: Oh, and you guessed right, I'm was on the stock ROM with a modded SystemUI.
[Galaxy S 4 i9505 Android Development] robcore:
Hehe for once I got something right! Speaking of which, i removed the "otg hack" and fixed up the hsic code, and I think the rr's are over with.

Your battery request is a tricky one, I might not be good enough a coder yet!
[Galaxy S 4 i9505 Android Development] robcore:
I think I've figured out this issue. Mark Ten will have a nifty workaround using sqlite to toggle rom-implemented screen dimming in Synapse. I had forgotten that ages ago I disabled it because I hated it, so no wonder I don't have the issue. This way, hardware and settings won't be constantly fighting eachother
[Galaxy S 4 i9505 Android Development] Andycar:
Hey, thanks for updates. But why did you remove otg hack? I was going to try it... was it somewhat improperly implemented?

I wonder if I can charge my S4 with an OTG Y-cable while connected to my USB DAC at the same time...

Отправлено с моего GT-I9505 через Tapatalk
[Galaxy S 4 i9505 Android Development] robcore:
That's what this was supposed to do, but without it both battery drain and hsic rr's are fixed. The hack was for the same SoC but they use different usb/charging hw for the port, so i had to adapt it for ours and...well the results have been the overall cause of instability and battery drain. To use a Spockism, in this case "the needs of the many outweigh the needs of the few."
[Galaxy S 4 i9505 Android Development] Pho3nX:
[MENTION=4763308]robcore[/MENTION], good job, i was a S4 test addict in the past but now i have a S7 Edge... But i promise you to test/feedback as soon as install your great kernel on the devices of my parents (2 x S4 lol)

Cheer
[Galaxy S 4 i9505 Android Development] robcore:
Ah what I wouldn't give for something newer, like a note 4 even!

Hold off until I release MarkTen, this baby's coming out of beta.
[Galaxy S 4 i9505 Android Development] robcore:
Do you think you guys will be happy with this kind of battery usage?
[Galaxy S 4 i9505 Android Development] devsnor:
How much sot do you get on one charge? Also, can't wait for #10.
[Galaxy S 4 i9505 Android Development] robcore:
So far between 4-6 hours, pending on my usage and screen brightness.

Speaking of the next release, are you or any of the other guys up for a little sqlite fact-finding mission for me? Lol it's sending me a .db or using sqlite debugger from the play store to find some stock values that I can use for synapse button, flicker fixing.
[Galaxy S 4 i9505 Android Development] Andycar:
I'm in, but how can we find these values?

Отправлено с моего GT-I9505 через Tapatalk
[Galaxy S 4 i9505 Android Development] robcore:
Thanks you're awesome! Buuut I already cleared out all my settings data to see for myself and found that a) there are even more sqlite things I have to do and b) i HATE setting up touchwiz from default settings. What a pain in the butt! AND SO SLOW. I run such a minimalistic bunch of settings, and have some sqlite changes I always make, no wonder my battery life and performance are so good.

For example, did you know that samsung has its own adaptive_fast_charging "feature" that interferes with kernel fast charge?
[Galaxy S 4 i9505 Android Development] Andycar:
No, I didn't know that... But I can easily imagine this is a fact by knowing other facts such as DVFS :)

Отправлено с моего SM-A510F через Tapatalk
[Galaxy S 4 i9505 Android Development] robcore:
Haha great example. The dvfs problem, luckily for us, is widespread and popular enough to have easy fixes in place. Wanam xposed+disabling it in the kernel means "you have no power here, dvfs!"
[Galaxy S 4 i9505 Android Development] devsnor:
Got a RR on MarkTen whilst waking the phone. Logs included, thanks. ; )

//edit

Battery life does seem to be a lot better! Nice one.
[Galaxy S 4 i9505 Android Development] Andycar:
Hey [MENTION=4763308]robcore[/MENTION] you know what - we both guessed wrong! The frozen Google Search app caused this... It's because I have this 'tweak' to show a search icon in recents...:p

SystemUI apk is fine...

That said, thanks for markTen, man! It's flying :)

What's be your recommendation to reset fuel gauge - before or after charging?
[Galaxy S 4 i9505 Android Development] Andycar:
Dear robcore, regarding this:

If I may add ;) This Sqlite table is in the app "Setting storage" (com.android.providers.settings package) - settings.db / 'system' table.

This may be obvious to a dev like you, but a novice like me ;) may spend some time in Sqlite editor before the actual table to edit is found on the system :p

BTW: Man, that's an interesting table to study!
[Galaxy S 4 i9505 Android Development] FlorianSSJ:
MarkTen, waited it so anxiously. As allways super battery and performance, but STILL SCREEN FLICKER (even deleting .prop things and setting screen to Standerd)... so bad i will revert to other kernels ?
[Galaxy S 4 i9505 Android Development] robcore:
Look at the screen flicker fix on page two. I need to update it to mention its in "settings storage," but its simple enough.

As far as reverting to other kernels, you really don't have to keep mentioning it. I'll say this once: I couldn't care less about which kernel you choose to use. I don't wake up in the morning wondering which kernel you are running.

The fix for your issue has been identified and there is a simple workaround in post 2.
[Galaxy S 4 i9505 Android Development] FlorianSSJ:
Why you allways be so rude, like i have insulted you? I said the kernel is good, there is not any issue besides the flicker, which is so bad. So, again, why so rude? Where is the respect?
[Galaxy S 4 i9505 Android Development] robcore:
Do you know how rude it is to post, after every release, that you are "reverting to another kernel" because of the same issue over and over, even after a suitable workaround has been made available?
[Galaxy S 4 i9505 Android Development] FlorianSSJ:
Well, i'm sorry if i say it everytime, i haven't noticed it btw, but i was trying to say what i was doing such as "a normal user would have do", to help you, somewhat. So, i'm trying to apply the fix.
[Galaxy S 4 i9505 Android Development] robcore:
All good, I apologize for getting snappy. I'm definitely not a morning person.

Fyi the battery and vibration "fixes" are more tweaks than anything. Though both have improved my phone so I had to put them in there.
[Galaxy S 4 i9505 Android Development] robcore:
Lol the phone sleeps VERY deeply eh? Give it a day or two to settle and it should be fine. It happened to me at first too but waiting for like 30 seconds and letting it wake up slowly helps. Then after a day or so it settled.
[Galaxy S 4 i9505 Android Development] robcore:
Thanks for all your feedback Andy!

Fuelguage: there are various schools of thought out there on this subject, and I wish I had a definitive answer to give you. I usually let it drain to like 50 percent right before going to bed, then i reset fuelguage and battery drops to like 17-20 percent, then charge it overnight and it's pristine. Some say charge it to 100 and then do it. So...shrug? Lol.

Sqlite: Agreed! It is VERY interesting. Be careful though, it's also very screw-upable (as you can tell I speak from experience here) ;)

I tried every sqlite sequence I could, but could not come up with a synapse solution that worked because the db is SUPER protected from command line usage, hence the recommendation to use a third-party solution. While my aim is to make synapse a one stop shop, their are some areas in which java api's just can't be beat, and I'd rather not reinvent the wheel.
[Galaxy S 4 i9505 Android Development] devsnor:
Like i said battery life is pretty amazing. Check this out, 2h20m of sot and still 63% left. ; ) Not even imperium gave me such awesome results. That's without UC/UV. One question about GPU governor, do you recommend simple or ondemand for battery life? In theory simple should have the edge here but I noticed it doesn't go all the way down to 128mhz as often as ondemand does.
[Galaxy S 4 i9505 Android Development] robcore:
I'm very pleased with not only the stability, but the happy side effect of improved power efficiency (battery life) that came from removing the useless otg hack. Truth be told, I kept it around for so long because it seemed to actually help with the rr's i got while charging like 8 months ago. Then once i got all the charging and timer code fixed, the otg hack became the source of the very issue I was using it to avoid. :silly:

I want to acknowledge that slow, reboot-inducing wake up from deepsleep issue again, because I think I've found a pretty great fix for it. Hardlimit control has a "wakeup kick" feature that has proven useful in this case. After you mentioned the issue, I went ahead and investigated of course. What I found was that maxing the wake up kick to 1890 mhz has made waking up ridiculously speedy. It only lasts 3 seconds, so power drain isn't an issue. I will make it default for future releases, but for now setting that in Synapse is a great workaround for autosleep/powersuspend's dedication to deep sleep.

For GPU, I've noticed that the actual act of polling the frequency causes it to jump. Just swipe away from the gpu tab and then back to it and you'll see that split second 128 mhz level jump to 320 mhz with either gov. I don't like this aggressive behavior one bit and am gonna study the code. I've included a youtube video (with extreme, not recommended tunables) showing the dynamic nature of simple gov and you will sort of see what I mean. I might add Franco's interactive gov for MarkEleven for us to experiment with. What do you tthink?

[youtube]ud0Tg5pFZ-A[/youtube]
[Galaxy S 4 i9505 Android Development] devsnor:
Thanks for the explanation. And sure, the more stuff to fiddle with the better, as far as im concerned. XD
[Galaxy S 4 i9505 Android Development] Corduroysack:
Very good, which rom are you on?
[Galaxy S 4 i9505 Android Development] devsnor:
Lollirom 9, MarkTen, tuned hellsactive governor, thermal limit set to 70/60, greenify, powernap. ; )

//edit

About hispeed_freq parameter in interactive based governors... Is it the absolute max any core can boost frequency to or is it like a soft cap and the CPU will still go to max on heavy load? My observation suggests the latter but its for a split second so im not 100% sure if it is a glitch or not. Ty in advance.
[Galaxy S 4 i9505 Android Development] robcore:
Second one :)
[Galaxy S 4 i9505 Android Development] Andycar:
About powernap: I experienced RR's because of that module once on my Note4. Never used it since then.

Can you share the tunes for hellsactive? Thanks!

Отправлено с моего SM-G935F через Tapatalk
[Galaxy S 4 i9505 Android Development] devsnor:
I experienced that too, a long time ago when one had to join some google alpha testers group to download it. It's fine now, however it might be that I now know a little more than I did back then, and I added some crucial system stuff to the whitelist in the program.

And my hellsactive settings:
[Galaxy S 4 i9505 Android Development] robcore:
I'm bored and tinkering with stuff.