yashsingh1/xdaforums huggingface dataset:
[Nexus 4 Original Android Development] _motley:
Ok, this was my concern since I haven't been keeping up on what other devs are doing. Is there a reset kernel he provides that you can flash? If not, maybe you can use faux's reset kernel to get back to stock. If a kernel dev removes these daemons or other binaries, they should provide a way to reset back to stock. Other devs with kernels that disable these stock daemons, or change out the PowerHAL, are going to make it tougher to flash over to other custom kernels that rely on them, or back to the stock kernel.

Mostly likely I will eventually need to supply /system/bin/mpdecision, /system/bin/thermald and the PowerHAL binary because other devs are likely removing or renaming these binaries upon flashing their kernel. I'll see if I can put a zip together that might help reset back to stock and replace these daemons. It will be good to have a zip like this in my thread anyhow.
[Nexus 4 Original Android Development] _motley:
Great to hear. Thanks for the quick feedback!
[Nexus 4 Original Android Development] richteralan:
Install Faux's reset kernel and then flash Motley's
[Nexus 4 Original Android Development] Imppy:
May I know how much UV is done in this kernel?
[Nexus 4 Original Android Development] morfic:
The kernel of the rom is the "reset kernel".

Good day.
[Nexus 4 Original Android Development] stab244:
If I'm on stock do I just flash the boot image one or do I need to flash the regular one then the boot image?
[Nexus 4 Original Android Development] _motley:
You can just flash the regular one, but if you want an insecure boot you can install the boot.img. Either one will work fine. If you want the best security, just use the regular one.
[Nexus 4 Original Android Development] sideeffects:
Thanks for update! Just flashed no issues so far using Paranoid Android beta7 and was using build 29 previously. I can notice the colour change I think it looks better. Voltage was stable by default but I took it down another 6 x 12.5 steps to 975Mv without issue as with last build.

Performance seems similar to build 29, very slightly slower in synthetic benchmarks with ondemand and SIO. Faster results with Interactive and deadline.
[Nexus 4 Original Android Development] yonpa:
Faux reset kernel works :)

Now it is fast

Thank you
[Nexus 4 Original Android Development] _motley:
Yes, this is true...until folks start renaming mpdecision, thermald and replacing the PowerHAL binary upon flashing etc. I haven't been keeping up on what everyone has been doing, so I don't know if we are dealing with this kind of stuff or not yet.

Thx
[Nexus 4 Original Android Development] _motley:
Awesome, thanks for reporting back.
[Nexus 4 Original Android Development] morfic:
Not using mpdecision will allow the kernel to adhere to the cpu policy the user chose without limiting in their frequency choices below stock.

You will chase mpdecision and try to find a way to prevent it from doing things instead of just taking control of what the kernel does.
[Nexus 4 Original Android Development] _motley:
Yeah I'm with you on that...if you want a completely generic and controllable solution (free from QualComm), this is the way to go. I'm still learning in this area so I am keeping it closer to stock for now. Are you using "sed" during the AnyKernel install to comment out the lines that start of the daemons? I hope this is how folks are doing it so that it doesn't affect the /system folder with file renames and replaced binaries etc. With PowerHAL involved in communicating to mpdecision, contamination outside the boot.img is unavoidable unless you just let the PowerHAL communication to mpdecision fail...that wouldn't been be good for the Android log or performance though.
[Nexus 4 Original Android Development] richteralan:
I sense that's a huge amount of work.
[Nexus 4 Original Android Development] _motley:
It's not going to be too bad for those that have walked this path before. I have a good sense of what I would need to do since there are a few MSM kernels that have went this way before and the source is posted for all to see. However, if I can get what I want from the stock setup for the most part, I haven't decided I want to venture this way yet. I do however want to understand what others are doing since folks jump back and forth between kernels and ROMs etc. For example, if CM or AOKP adopts a kernel without mpdecision and thermad daemons starting in their init, this leaves me supporting stock or having a specialized installation to support and target these flavors. This is where there aren't enough standards between devs so that we have good ways of inter-operating with each other. Not saying that anyone is doing anything incorrectly, its just that having certain ways of doing things would make things easier for others that might deal with a situation afterwards. Hope this makes sense.
[Nexus 4 Original Android Development] farhanito:
Re: [KERNEL][Feb 25][b40] _motley kernel for the N4 (smp patches back for 4.2.2)

Here's my setup..

[N⁴][Motley][CarbonRom]
[Nexus 4 Original Android Development] :
Hi,

Just a little feedback / settings about this kernel :)

After trying a lot of kernel (no name :D), I will stay for a long time with _motley kernel, the best for me that suits my needs in term of performance / battery (even if I don't really care about battery life) / tweaks.

I'm currently testing some settings, not for battery life since I don't care much about that, but for speed and smoothess.

Governor -> Ondemand:

- down-differential -> 15

- Ignore_nice_load -> 0

- io_is_busy -> 0

- optimal_freq -> 1026000

- powersave_bias -> 0

- sampling_down_factor -> 2 (testing 5)

- sampling_rate -> 10000

- sync_freq -> 1026000

- up_trheshold -> 60 (testing 40)

CPU freq -> 304 Mhz / 1.51 Ghz

I'm currently testing sync_freq and optimal_freq for both at 1026000 or one at 1026000 and the other stock (304000) and vice versa.

I/O scheduler -> sio or deadline with 2048 read ahead buffer size.

Absolutely no undervolt expect that is come with the kernel.

Fsync -> off

CPU temp limit -> 80°C

CPU Temp Limit Min Freq -> 1242000

These settings are MINE, nothing mathematic or proved to be the best settings for all or for a dev who know the best kernel / CPU settings ;)

For sure these settings are (or maybe) not battery friendly but that I want is a fast, fluid, smooth, etc... phone :D

Absolutely no lags here or there with my settings, at last for my use (even XDA app have no lags :D).

Maybe you'll find these settings counterproductive in term of battery life but you know my goal... :D

So in general UI it's perfect, in benchs too: with these settings and AOKP PUB (no overclock) I have about 21600 in Antutu and about 6300 in Quadrant.

And battery life in all that you tell me? :D

Always in 3G, no sync (no use), 50 % brightness, mostly internet, sms, some calls (about 1 hour, I have no friends :silly: :p :D)... I have about 20 hours with about 3 H 30 / 4 H 00 screen on time (it depends if I do some benchs :D).

I love this kernel for all the tweaks available for the user, the support from _motley and, I don't know, the feeling maybe... Tired to use the "blockbusters" kernel, need something new... :D.

It lacks just the ability to overclock the GPU (via Sys Interface for example / Tickster Mode which include the possibility in her app)... _motley :D:D:D ;).

And to control the kernel I use Trickster Mode.

I think that's all for now :), I'm still currently testing some settings for the Ondemand governor and today I'll test with another rom (also with Bionic / Krait optimizations but without linaro stuff): Mako Vanilla Rootbox.

I do not encourage you to use these settings nor I recommend them, it's just my feedback about my settings and my tests, you can test but please do not tell "my battery life is horrible" or "my phone heating".

Maybe the best settings are these who comes with the kernel, it depends of what you want, but since I like to play a little... :D
[Nexus 4 Original Android Development] nessonic:
This worked! However, I had add the rw and noperm options. One or both of those allowed the folder to show up.
[Nexus 4 Original Android Development] :
Re,

@ _motley, What do you think?

It seems very good, right? Any plan to add it?

You can check the Twitter of Faux to see the future app and sound enhancements...

:)
[Nexus 4 Original Android Development] more2come:
@viking37

An up_threshold of 40-60 is quite aggressive! :D

But I go a similar way, I do care more about performance and smoothness than about battery life. That's why I emulate a typical mpdecision behaviour with this kernel by setting the touchboost-duration to 3 secs, using interactive governor. Guarantees epic smoothness!

For a little more performance increase, maybe you should set I/O-operations to be considered as CPU-load?
[Nexus 4 Original Android Development] :
Hi,

He he :D, thanks, finally someone who is more concerned with performance than the battery (being relative of course) :)

Yes my up_treshold is agressive, I think I'll stay at 60 because I don't really see any difference between 40 / 60...

I'll have to test the Interactive governor, I stay with Ondemand since a while it also requires that I change :D Thanks for the tip about touchboost-duration ;)

I don't understand what you mean, can you explain?

Thanks ;)
[Nexus 4 Original Android Development] nextelbuddy:
I have trickster mod and would love to use those settings with thie kernel.

how can i use those values?

I read in this thread something about scripts and init.d

so I need another app that can run scripts? or does trickster do that?

the values you posted, would you say that I just copy/paste those values into a text file and rename it something and paste it in a specific folder?
[Nexus 4 Original Android Development] more2come:
I guess this line:

means that if set to 1, the system considers data reads and writes as CPU load. Theoretically, if I got that right, considering I/O as CPU load COULD improve data throughput rates.
[Nexus 4 Original Android Development] meangreenie:
I find a down_differential of 30+ smooths things right out, i have up_threshold set at 70

still get 6-7hours browsing internet by wifi battery time
[Nexus 4 Original Android Development] :
Hi,

You can use Trickster Mode, take a look in the thread there is a Beta of the app wich support _motley kernel interface (only with the Beta at this time), or check the OP the dev have a Google + and you'll find the Beta here.

Re,

Ah thanks ;), I didn't know about this, will test... Right, with a little Google search LOL, I never thought this setting. Thank you verry much, I test ;)

Running Vanilla Rootbox since a few hours, awesome, smoother than AOKP PUB!!!

:)
[Nexus 4 Original Android Development] :
Re,

Does the kernel or at least the b40 can affect data speed in 3G / H ?

Because before, with b35 I had almost 7 Mbps down and now I barely have 1,5 Mbps :eek:

I have reflashed my Nandroid backup with AOKP PUB with _motley b35 and my data speed is fine. Re flashed Vanilla Rootbox with _motley b40 and again my data speed are horrible :eek:

I tried with 27 / 33 / 39 radios and it's the same thing with b40, if I go back to my Nandroid with b35 and also testing with these three different radios all is fine...

I don't understand here :confused:

Or does a rom can affect the data speed (there is no build.prop tweaks or init.d script tweaks regarding the internet stuff)?

Weird :confused:

Thanks :)
[Nexus 4 Original Android Development] Remoteconcern:
Re: [KERNEL][Feb 25][b40] _motley kernel for the N4 (smp patches back for 4.2.2)

Can you try just flashing the kernel? Changing entire ROM means there are lots of variables.

I think it's possible the kernel is the cause but I don't have this problem. So we need to do more testing!
[Nexus 4 Original Android Development] thracemerin:
My speed seems about the same with the normal variability that happens with any 3G connection, unless I'm mistaken b35 and b40 have the same patches from CAF, Google did add some things to their 4.2.2 kernel that may also affect data that weren't in the b35 (4.2.1) version, but I don't think those would cause a significant different in data speed, and if it did, it would affect stock as well.
[Nexus 4 Original Android Development] soundwave123:
Re: [KERNEL][Feb 25][b40] _motley kernel for the N4 (smp patches back for 4.2.2)

Soundwave superior starscream inferior. ;)
[Nexus 4 Original Android Development] chrone:
dear _motley,

i just got auto reboot when invoking the refresh_screen from windows terminal while charging too. the last_kmsg is attached.

perhaps the refresh_screen command should not be triggered when usb charging? hehe

i'm running build b40 on stock rom.

after a day of usage and couple of reboots, the most noticable thing is the UI micro stuttering when opening app center from home screen after waking from deep sleep.

i need to enable "disable hw overlay" and enable "force gpu rendering" to make it smooth.

also, here's an init.d script for faux123 "almost 2.2 gamma across the board except purple still @ 2.0 gamma" preset and it worked on boot, yay! :D

#!/system/bin/sh
# faux preset almost 2.2 across the board except purple still at 2.0
echo "316 0 100 118 0 0 0 48 48 2" > /sys/devices/platform/mipi_lgit.1537/kgamma_red
echo "316 0 100 118 0 0 0 48 48 2" > /sys/devices/platform/mipi_lgit.1537/kgamma_green
echo "316 0 100 118 0 0 0 48 48 2" > /sys/devices/platform/mipi_lgit.1537/kgamma_blue

#Set the complimentary RGB values for this calibration
echo "178 178 178" > /sys/devices/platform/kcal_ctrl.0/kcal
echo 1 > /sys/devices/platform/kcal_ctrl.0/kcal_ctrl

# Show the current configuration and the checksum
echo "Verify that the values are written correctly..\n"
echo "RGB values:"
cat /sys/devices/platform/kcal_ctrl.0/kcal
echo "\nRed gamma values:"
cat /sys/devices/platform/mipi_lgit.1537/kgamma_red
echo "\nGreen gamma values:"
cat /sys/devices/platform/mipi_lgit.1537/kgamma_green
echo "\nBlue gamma values:"
cat /sys/devices/platform/mipi_lgit.1537/kgamma_blue
echo ""

#values tweaked by faux123
#script by _motley & jazzboyrules
#translated by chrone for Nexus 4 batch 212K HW rev. 11.

those are the values to put in trickster mod beta app build 20130225. :D
[Nexus 4 Original Android Development] :
Re,

Sorry for the inconvenience about my "issue" which was not one :confused:

I do not know what happened between my first test when I've realized I had a bad data speed, then flashed my Nandroid, then tested 3 radios, then re flashed Vanilla Rootbox, then tested the three radios again and now, but I have correct data speeds again :p

It makes me take about a total of 45 minutes of testing with bad / good data speed which coincided in each case to a change of radio / rom... :confused:

My carrier play with my heart just at the moment where I'm playing with my new combo rom / kernel, not very nice :D

False alarm :D

Thanks for the replies ;)
[Nexus 4 Original Android Development] starscream92:
Hey guys, sorry if off-topic, but is there a good guide on how to make a recovery flashable zip? I wanna make a zip to put my init.d scripts in /system/etc/init.d/ since I update my ROM pretty often.

I'm able to put files in a given path, but what about changing file access modes (chmod)? Thanks in advance :)
[Nexus 4 Original Android Development] gianton:
Download the attached zip I'm using for my scripts

Open the zip file with 7z don't extract it

Delete the 3 files in /system/etc/init.d folder while in 7z

Add copy/paste your files in /system/etc/init.d folder while in 7z

Done
[Nexus 4 Original Android Development] _motley:
You can also check out my anykernel zip from b40, I have the init.d folder install and permissions tucked into the updater-script. All you would need to do inside the zip file is: (1) place in your scripts inside the /system/etc/init.d/ folder (2) remove the kernel flash part of the script and associated folder.

Thanks for sharing your setup. I''ll check out the refresh_display method.

As far as microlags, which governor do you use? I thought I saw you using OnDemand when you posted earlier. This works pretty well, but I still recommend interactive as the default since it includes my own three tier implementation of project butter. You can control the boostpulse duration by tuning the Interactive governor if you wish.

On interacting with the device:

Custom PowerHAL --> calls boostpulse --> interactive gov --> calls boostpulse --> auto_hotplug

If you decide to stick with OnDemand permanently, I would flash the "Inert PowerHAL" from the OP to stop the communication from the PowerHAL in the chain above...since interactive is not in use, it would make no sense to allow the communication.

Glad you got it sorted, thanks for posting back.
[Nexus 4 Original Android Development] starscream92:
Thanks! This will do! Opening the update-script file, I can see how it's done.

But I wanna learn this! How do you know all the commands like set_perm? What's the update-binary file for? All these questions, Googling doesn't really answer it. Is there a program that can generate flashable zips for you?

Edit: Sorry for being off-topic again! We can drop this!
[Nexus 4 Original Android Development] jarayn:
Hi. I really like the smoothness and battery on this. I have some issue with wifi though. It seems to fail to connect to the public wifi unless I restart the phone. Seems fine at home though.

I know it's not a lot of detail but could that be a kernel issue?

Thanks
[Nexus 4 Original Android Development] dougiefresh36:
Re: [KERNEL][Feb 25][b40] _motley kernel for the N4 (smp patches back for 4.2.2)

I got a question am supposed to have two different kgamma_ values for every color? I tried deleting but can't even with root permissions.
[Nexus 4 Original Android Development] IAmAN00bie:
I think it might be because Motley's supports both Franco's and Faux's gamma interfaces.
[Nexus 4 Original Android Development] jassycliq:
Re: [KERNEL][Feb 25][b40] _motley kernel for the N4 (smp patches back for 4.2.2)

Its actually Motleys implementation. The ones with just the single letter are fauxs interface. Motleys init.d interface uses full names. Francos implementation is in a totally different path (/sys/class/misc/gammacontrol)
[Nexus 4 Original Android Development] chosen14u:
My N4 over heats well, gets at least 35c just installing apps or using my phone On stock it does not go that high sticks around 28c, trying this with deoxed-stock rom 4.2.2.

Flashed in recovery first 37 rebooted into android, flashed 40 in recovery . I did wipe both caches when needed.

overall just makes it run hotter than stock, I only change a few settings in trickster,run only 2 cores online, Ondemand/Interactive,westwood,row, 2048, no changes to any GPU settings.
[Nexus 4 Original Android Development] starscream92:
My phone runs quite cool with Motley's kernelGParted (one of the deal makers for me). Use an app like CPU Spy or Trickster MOD to monitor CPU states.

You can also use the Developer Options' feature "Show CPU Load" which does exactly that: CPU load in the past 1, 5, and 5 minutes. It also shows what space/level the CPU time is in (i.e. green for userspace, red for kernel, and yellow for I/O interrupt).

Use these tools to see if your CPU steps up/down correctly.

It's weird because stock kernel should almost always run hotter than most custom kernels. Thanks to MPDecision!
[Nexus 4 Original Android Development] veyka:
Re: [KERNEL][Feb 25][b40] _motley kernel for the N4 (smp patches back for 4.2.2)

Nothing inside /sys can be deleted, as they are not a file per say, but part of the kernels interface (everything in Unix is a "file", so that's why you see them as such in a file manager)

That's not even warm, overheating is 79deg ish on this device!

A better way of measuring it would be to see how much over ambient template it is, as maybe it was a colder day when it was 28.

As mpdesision has been replaced, this kernel should (and has in my exp) keep the phone cooler.

Try not changing any cpu governor settings in tricksters and see what happens.
[Nexus 4 Original Android Development] chrone:
whoa, i learn new thing everyday here. kudos to the great documentation! :)

i switched back to interactive governor and tweaked it a bit as follows using init.d script after asking veyka what's his settings to get 5h+ screen on time. :P

#!/system/bin/sh

[B]#set max cpu code to 2
echo 2 > /sys/module/auto_hotplug/parameters/max_online_cpus[/B]

#enable fsync
echo 1 > /sys/class/misc/fsynccontrol/fsync_enabled

#disable dynamic fsync
echo 0 > /sys/kernel/dyn_fsync/Dyn_fsync_active

#stock vibration intensity
echo "70" > /sys/class/timed_output/vibrator/amp

[B]#set highspeed to 810mhz
echo "810000" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq[/B]

#Eliminate unnecessary debug
echo 0 > /sys/module/lge_touch_core/parameters/debug_mask

#TCP Congestion
echo "westwood" > /proc/sys/net/ipv4/tcp_congestion_control

#Disable Fast Charge
echo 0 > /sys/kernel/fast_charge/force_fast_charge

#read ahead
echo 512 > /sys/block/mmcblk0/queue/read_ahead_kb

i managed to get the UI smoother by enabling developer option, checked usb debugging mode, and then disabled developer option again. the options inside developer options somehow still shows it's enabled though it's been disabled before, just as exactly as it was enabled the first time from tapping 7 times on the build number long long time ago. reboot the phone still makes the UI smooth right now after doing the above.

i don't know what was causing this UI micro stuttering/lag bug, but toying around with developer options seems fix it at the moment. fyi, battery temperature never reach 40C though. it's always stay between 30-35C range, which is very cool here in Indonesia :D

thanks for the tweak, veyka! works like a charm here. will report back for the battery life tonight. haha
[Nexus 4 Original Android Development] veyka:
Re: [KERNEL][Feb 25][b40] _motley kernel for the N4 (smp patches back for 4.2.2)

More than welcome, the debug one I nicked from someone else, dunno who :p, its somewhere in this thread!

As far as the highspeed tweak, its the frequency that the phone goes to when you touch the screen, or load gets to high, so don't put it to low or you will get lag scrolling, etc ;)
[Nexus 4 Original Android Development] chrone:
aha! that could explain the micro stutterring. :D

i'll switch it back to 1026000 then and see what will happen.
[Nexus 4 Original Android Development] IAmAN00bie:
I know this is a shot in the dark, but @motley, I wanted to know your thoughts on maybe implementing a separate boostpulse_freq parameter and using that as the frequency that the boostpulse goes to rather than hispeed_freq. The reason I ask this is because I have my set up to mimic somewhat mimic mpdecision, but because of this the CPU will spend an inordinate amount of time on the hispeed_freq because not only does it boost there on touch inputs, but also because of the CPU load. I think having a separate boostpulse_freq and hispeed_freq would allow us to have even more fine control on how the CPU scales (I remember Franco's kernel on the Galaxy Nexus had this option, I don't know if it still does though). Of course, this parameter should be defaulted to the same frequency as hispeed_freq. I just wanted to hear your thoughts on this and if this is possible or something that you would be willing to look into.
[Nexus 4 Original Android Development] veyka:
Re: [KERNEL][Feb 25][b40] _motley kernel for the N4 (smp patches back for 4.2.2)

I find 900mhz (or w/e the exact step is) seems to work well for me, but ymmv ;)
[Nexus 4 Original Android Development] chrone:
i've set it to 710mhz back then and the stuttering often appeared.

bumped it to 810mhz reduce this a lot.

so yeah, you're right! :)

forgot to say nice finding on the "/sys/module/lge_touch_core/parameters/debug_mask" :good:

update:

ui micro stuttering still sometimes happens even on the highspeed_freq set to 1026000. i'm guessing the culprit is set the max core to 2, it switches on and off all the core 1, 2, and 3, while it should only allow core 0 and 1.