yashsingh1/xdaforums huggingface dataset:
[HTC EVO 3D] mrg666:
Android1234567 (sultanxda@github) graciously donated a brilliant patch for the shooter kernel that increases the RAM available for Android to 876MB (from 798MB) by more efficiently allocating the memory used by the kernel. I have merged the patch and tested briefly. Everything seems to be working fine. The only caveat is that HDMI output has been disabled which is not working in AOSP anyway. The test kernel for AOSP/JB is below.

http://www.mediafire.com/download/00jcidqhptoroo8/MiRaGe_shooter_test_kernel_992_jb.zip

Please test and let me know if you find any problems since this is a very critical patch.

Also, please go to Android1234567's thread and give him a thank you. He truly deserves a kudos for this.

I have not tried this patch with the ICS/Sense kernel yet since I am not sure if it is okay with everyone to lose the HDMI output capability. Let me know if you have any objections/comments so that I can decide what to do with ICS/Sense kernel.

There is nothing specific for the mms functionality in the kernel. You had a problem unrelated to kernel.
[HTC EVO 3D] Obeezy562:
I am in, I never have used the hdmi out function on my phone at all, it's useless to me. More RAM would be even better count me in the ics kernel. +1
[HTC EVO 3D] SketchyStunts:
bad ass!
[HTC EVO 3D] wigginst:
Running new test now and everything seems OK. Not being a big techy what sort of difference should this make for us?
[HTC EVO 3D] gonk24:
Good grief. I swear my phone is possessed by the angry spirit of a deceased HTC factory worker. Flashed the new JB kernel and upon boot I had to go through set up as if I hadn't used it before. Once through that and into android, most of my apps are missing, rings and notifications are reset, Gmail had to be signed into, other stuff

I know it's not the kernel. Phone just hates me
[HTC EVO 3D] mrg666:
That is about 10% more memory for Android. To begin with the benefits of extra RAM, lowmemorykiller will work less, for example.
[HTC EVO 3D] Sultanxda:
Some extra information to those of you testing the new memory map: leave your phone on as long as possible with this test kernel in order to check for random reboots. The surfaceflinger allocation is smaller than before so it is crucial that you test the long-term stability of the kernel. If there are random reboots being caused by surfaceflinger being too small then they can be fixed at a price of 5MB of RAM. If there is a Sense ROM with HDMI working (I don't think there are any) then HDMI functionality can be kept in the ICS kernel with the new memory map at a price of 10MB of RAM. Either way, you'll still get about 70-79MB of extra RAM compared to before :)
[HTC EVO 3D] Hedied4me:
Do we flash in recovery once having flashed already in Image Flash?
[HTC EVO 3D] mrg666:
Yes for s-off.
[HTC EVO 3D] t3khe4d:
using hdmi here :(
[HTC EVO 3D] mrg666:
I will not disable HDMI in the ICS/Sense kernel since Stock ICS ROM supports it.
[HTC EVO 3D] Obeezy562:
Will you still be implementing android1234567's patch to the ics kernel?
[HTC EVO 3D] Sultanxda:
I'll adapt my memory map for the ICS kernel so that it has HDMI :)
[HTC EVO 3D] mrg666:
Thank you, Sultan. :angel:
[HTC EVO 3D] Sultanxda:
After converting all those framebuffer math equations into hex, it turns out that I can add HDMI support without taking any RAM from userspace. That means that the ICS kernel will also have 876MB of RAM :)

Also, ICS has lower surfaceflinger requirements than Jelly Bean, so the new memory map can be used on ICS without worrying about random reboots from surfaceflinger.
[HTC EVO 3D] mrg666:
Looking at those base and size numbers, I can see why ion replaced pmem. Do you have a link to a reference that explains the mem stack or structure? If not, maybe you can post a guide about allocation of ram in the kernel for android devices which would be so helpful to all developers.
[HTC EVO 3D] Sultanxda:
I don't have a link to any resource explaining static memory mapping :(. Everything I know about memory allocation came from the trial and error of over 500 kernels (each with different memory maps) that I built and tested on my device (HTC Sensation). Using the information on how each change I made influenced the phone, I was able to create a mental model of how the memory map works, which now allows me to freely manipulate the memory maps of practically any Qualcomm device :)

I haven't thought about creating a guide to remapping memory as it is fairly complex, and every device is different, so teaching people how to remap memory on their devices wouldn't be easy.
[HTC EVO 3D] mrg666:
Your commits and repo can still be a good reference.

Thanks a lot for the commit. I have merged it, tested with ICS kernel, and left a note at Github. It needs a small fix I think for the 3D pictures and videos. I can't ask for more time of yours, so I will try fixing it tomorrow.

Cheers!
[HTC EVO 3D] SketchyStunts:
Been running this latest AOSP test kernel for the last 23hrs with lots of screen time with no reboots. Sprint, S-Off, 1.4eng, HW002, Hood Pope, Killjoy script, Viper FX.
[HTC EVO 3D] wigginst:
Running same setup as sketchy. No reboots last night but have had a couple today.
[HTC EVO 3D] mrg666:
Can you post last_kmsg or tell what were you doing before reboot?
[HTC EVO 3D] wigginst:
Reboots came during a couple of app updates so wondering if something is just happened during that. Had no issues last night and had been fine the last couple of hours.
[HTC EVO 3D] Sultanxda:
With my new memory map I see... I'll revise it.
[HTC EVO 3D] wigginst:
Walked in the house after being out and phone rebooted again.
[HTC EVO 3D] mrg666:
Thank you, sultan!

Everyone,

I think we are done with testing the 992 build and I have deleted it. After fixing the memory map the next test kernel will be uploaded. Thanks to all for the feedback. Please go back to stable 991 build.
[HTC EVO 3D] kinurabi:
Hello

Hi mrg666

I am on Johnny's ROM and I think he uses your kernel in his ROM's. Now considering that the performance of the phone is dramatically improved the battery life too, I dont want to switch to another kernel so I posting my problem (which I dont know if it even is a kernel problem). The phone often happens not to unlock when i press the power button (stays black). It takes another Off/On to wake the screen. How can I fix this? Is it a voltage issue....

Thanks
[HTC EVO 3D] SketchyStunts:
28hrs in on 992 with no reboots here. I'm going to stick with it cause I like it :)
[HTC EVO 3D] mrg666:
Thanks to Sultan, here is his second iteration of kernel memory allocation mod which should fix reboots.

http://www.mediafire.com/download/xcdeq17l9cmdauo/MiRaGe_shooter_test_kernel_993_jb.zip

Please test and let us know.

Hi, I don't think that power-on lag is kernel related since I don't see such a problem with the other ROMs I have here with MiRaGe. Having said that, Johnnyslt is building the kernel from his own repo now. Although we are closely collaborating, I wouldn't want to interfere with his development. So, the kernel that comes with the CM10.2 (GSM) is Johnny's kernel and he is better qualified to answer such questions.
[HTC EVO 3D] SketchyStunts:
OK, it rebooted in my pocket a second ago. Lol
[HTC EVO 3D] mrg666:
Please be specific. Are you still using 992? Or are you reporting reboot of 993?
[HTC EVO 3D] SketchyStunts:
I'm sorry, was reporting off my last post on 992. Just flashed 993 5min ago. Will run it hard & if any issues arise I'll provide a log. Thank you Sir!
[HTC EVO 3D] Hedied4me:
993 is running great. Fantastic battery life.
[HTC EVO 3D] mrg666:
Of course! it is 993!

[youtube]dH0bH9h0PY4[/youtube]
[HTC EVO 3D] SketchyStunts:
"Disclaimer" Irish accent not included.
[HTC EVO 3D] jlmancuso:
Installed on pacman milestone 1 tonight will charge and test tonight and tomorrow.
[HTC EVO 3D] muziling:
One question , does support 2-way record
[HTC EVO 3D] Obeezy562:
What's in the new 10.13.13 release ?? My phone has been running super smooth like there's no lag ! O.O thanks for the updates mrg!! :D
[HTC EVO 3D] TrofeoSC:
Where do I find the 10132013 Kernel?

Thanks
[HTC EVO 3D] Obeezy562:
In the op , it's for ics not jb. There is a jb version. It's all in the op.
[HTC EVO 3D] TrofeoSC:
All I find in the OP is the CDMA version for ICS. If I go down a bit further, I find the link to the ROM. On that page, I find the only mention of JB version is the link that leads me to the 991 kernel.

A link to the download of the new JB version would be most helpful.

Thank you.
[HTC EVO 3D] Jmodix:
Agreed.

I checked the Kernel noted in this post - http://xdaforums.com/showpost.php?p=45770048&postcount=680

Downloaded and flashed it, version number still reads the same as the one from 10/7

We need a link to the new JB version in the original post plz :D
[HTC EVO 3D] mrg666:
I haven't built the JB version of MiRaGe yet since an experimental build (993) is being tested right now. If the new memory map is proven to be stable, I will include it in the next build. Without the new memory map there would be only Linux 3.0.99-100 patch and it is nothing significant.

The ICS version of MiRaGe has a MAC address fix in the WiFi driver in addition to the Linux 3.0.99-100 patch.

Please check my repo for the details of the changes following the link in the OP.
[HTC EVO 3D] Jmodix:
Ah OK! The thread title was updated and made us think the JB version was also update "AOSP-JB - 3.0.100 - 10132013"

We'll wait for the update. Thanks for all your awesome work! :good:
[HTC EVO 3D] gonk24:
Running JB 992 Saturday and found my phone to be completely powered off when I went to use it.

On 993 since Saturday night and this morning I took a pic and sent a text. Phone sat for 20 minutes and was again powered off when I picked it up

Battery life and overall function is otherwise fantastic

last_kmsg below

https://db.tt/64uIEfGJ
[HTC EVO 3D] mrg666:
Thanks for the feedback and the log. The last_kmsg doesn't belong to MiRaGe; it is a 2.6.35 kernel, probably recovery. I will not consider this as a kernel crash yet. There might be some app on your phone causing recovery boot.
[HTC EVO 3D] SketchyStunts:
I'm on 993 & I woke up last night at 4am & phone was powered off. I just powered it back on & went back to bed.
[HTC EVO 3D] mrg666:
Power off sounds more like battery drain than kernel crash. Please also post last_kmsg, if you can.
[HTC EVO 3D] SketchyStunts:
it was plugged in charging
[HTC EVO 3D] muziling:
First ,after a phone call, screen can not be wake up ,and then ,system auto reboot, but is strange, no errors in last_kmesg

Second, alarm clock not alarm me this morning, sleep too deep? will test again tomorrow morning.
[HTC EVO 3D] mrg666:
Assuming that you are running 993 with the new memory map, I think we will need to scratch it as well. Let's wait for another day for other reports. You can always go back to 991 to be safe. Thanks for testing.
[HTC EVO 3D] gonk24:
Mine was also plugged in and charging with around 85% battery
[HTC EVO 3D] mrg666:
Thanks for letting me know. Since the same problem is reported with two different phones, I will consider this as a problem with the 993 build. Can you please go back to 991 and check if this power off is specific to 993? I will give 993 two more days of testing before deleting it.
[HTC EVO 3D] jlmancuso:
993 build no power off issues. Charged phone and played a couple movies so far it is fine.
[HTC EVO 3D] wigginst:
Was on the road driving with phone in and charging and had a couple of reboots of 993 as well (couldn't get ksmsg while driving).
[HTC EVO 3D] Sultanxda:
Seems like the memory map needs one last adjustment (PMEM is a pain to work with :P). I moved ADSP to the SMI region so now it's being allocated with the MEMTYPE_SMI allocation flag when instead it should be using MEMTYPE_EBI0.
[HTC EVO 3D] mrg666:
Thank you so much, Sultan. You are very helpful. Please let me know when you have the next patch ready. I will build the kernel and post for testing.

I have done some memory remapping for the icon kernel as follows. It is working fine but I would appreciate if you can let me know if you have any comments/improvements for that patch. As you said earlier, it was very easy with ION.

https://github.com/mrg666/android_kernel_icon/commit/88bb9abdef1092e5f8d0c149227d1a4e23106b65

BTW, I have generalized the autosmp for all architectures and moved it into arch/arm/kernel. It does not have any msm dependency anymore. You can get it if you are interested.

https://github.com/mrg666/android_kernel_shooter/commit/d0a046bd891d12a7ba9a52dcb83ecdf4a56873f1
[HTC EVO 3D] Sultanxda:
Pull request sent :) I'll add your new autosmp to my kernel; thank you :D

As for the icon kernel, there are a lot of garbage PMEM parts that Samsung left lingering, making it harder to understand the memory mapping (and the values are scattered in the board.c file; it's more convenient to have them in the board header). As for the memory mapping itself, have you tried reducing the size of ADSP more? I didn't see any SMI allocation code so I think Samsung stuck the SMI region into the ADSP allocation, which would explain why the ADSP size is so large for a device with a 5MP camera and only 480P video capture; if that's the case then I don't think you can further reduce the size of the ADSP allocation. Also, if your device isn't msm7x30_fluid then you can remove that fluid code and the fix_sizes option entirely (unless there are different variants of the device with msm7x30_fluid and just plain msm7x30, in which case that code should be kept).
[HTC EVO 3D] mrg666:
Thanks! I have merged your changes and rebuilt the next experimental kernel.

http://www.mediafire.com/download/xjap6t026jbwsdt/MiRaGe_shooter_test_kernel_1001_jb.zip

I have tried smaller ADSP sizes and camera stops functioning below the size I have used. The device is actually not fluid but removing the fluid part didn't make any difference. You should have seen the mess Samsung had left in that kernel. It was horrible and crippling the device which has only 768MB physical RAM and trying to run JB.
[HTC EVO 3D] gonk24:
Flashing the new kernel in a few minutes. I'll report back
[HTC EVO 3D] Hedied4me:
Been running since you uploaded and as smooth as ever. No reboots but then again I haven't experienced those on your kernel.

Thanks again for keeping us updated.
[HTC EVO 3D] SketchyStunts:
Been running great on 1001. Zero issues thus far.
[HTC EVO 3D] wigginst:
So far as it ten hours on new kernel with no issues or reboots.
[HTC EVO 3D] mrg666:
Keep pushing it, guys. We need to know if it crashes before calling it done. Try big games, record videos, take lots of pictures, open many apps, abuse that kernel.
[HTC EVO 3D] gonk24:
Just had a random power off on 1001 while it was sitting here on the desk. No last kmsg present to provide. I assume it's not there because it just shut off as opposed to rebooting. No apps were open, just sitting there idle. Using ondemad gov with speeds set at 384/1188.

Also getting the "can't play this video" message with gallery for both 480 and 720 recordings.
[HTC EVO 3D] mrg666:
Thank you for testing again. This is getting a little too tricky. I suspect there is some memory address hard coded in one of the multimedia/gpu driver files. I am voting for giving up at this point and going back to stable configuration. I don't think we can ask more of his time; if android1234567 also agrees, I will build 3.0.100 based jb kernel without the new memory allocation and call this experiment practically over.
[HTC EVO 3D] Alanman13:
Re: [KERNEL] MiRaGe - for HTC stock ICS ROM - 3.0.70

Ok so I checked and superuser said it is granting permission, so I went back to flash and it worked this time. Not sure what that was all about, but it's installed now and I'm glad.
[HTC EVO 3D] mrg666:
Enabling CONFIG_SCHED_AUTOGROUP caused boot loops. Since I have seen something similar happening before with the encore kernel (nook color), I tried to recompile the kernel with linaro gcc 4.6.3 instead of gcc 4.7.3 without changing anything else. And the kernel booted with gcc 4.6.3. After this, I tried disabling the CONFIG_CC_OPTIMIZE_FOR_SIZE (autogroup is still enabled). With the standard -O2 optimization, gcc 4.7.3 compiled kernel booted but it was unstable - crashed once. gcc 4.6.3 compiled kernel was still completely stable with -O2 optimization.

I couldn't get the kernel messages with non-booting gcc 4.7.3 kernel since it was crashing at a very early stage. The only change that is triggering instability with gcc 4.7.3 is enabling the autogroup option that comes with the Linux kernel by default (not even a patch). I think this is a strong indication that the problem is not the kernel code but the compiler. It gets really difficult to test kernel patches while the compiler is adding more variables. I will just keep using gcc 4.6.3 that was also more reliable for my previous kernels.

Please let me know if you have any insights. I can test your suggestions. Thanks for stopping by.

EDIT: Thanks to your question, I went back to the problem and resolved it :) CONFIG_RT_GROUP_SCHED was the problem. CONFIG_RT_GROUP_SCHED does not work with CONFIG_SCHED_AUTOGROUP, at least with gcc 4.7.3. I have disabled CONFIG_RT_GROUP_SCHED and testing the kernel with gcc 4.7.3 CONFIG_SCHED_AUTOGROUP enabled.

EDIT2: HTC kernel comes with this patch already applied. There must be some remaining bugs in the kernel not fixed yet or gcc 4.7.3 is not able to handle the combination of CONFIG_RT_GROUP_SCHED and CONFIG_SCHED_AUTOGROUP. These two should be excluded in Kconfig, imho, but even Kernel 3.8 does not exclude these two options from each other.

Thanks for the comments. I think sweep2wake feature is not a good idea since it can cause accidental wakeups. I also don't the want kernel checking the touch sensor while it is supposed to sleep for saving the battery.
[HTC EVO 3D] bigwillyg:
Re: [KERNEL] MiRaGe - for HTC stock ICS ROM - 3.0.70

Well, glad I could inadvertently help :) good things happen when people help each other out.
[HTC EVO 3D] mrg666:
Sure, please let me know anytime if I can help anyway. Thanks!
[HTC EVO 3D] mrg666:
I have updated the kernel (yes again) to include the followings

- disabled rt group scheduler which was not playing well with autogroup scheduler

- switched back to gcc 4.7.3

- backported important updates for mach-msm/hotplug system from coudeaurora msm-3.4 kernel to improve the latency and responsiveness of the system while switching the second core on and off.

There seems to be some improvement in the system performance with the above changes. And no more updates for a week, promise.
[HTC EVO 3D] hossman:
Re: [KERNEL] MiRaGe - for HTC stock ICS ROM - 3.0.70

??????
[HTC EVO 3D] Meowdib:
Try it from your PC
[HTC EVO 3D] mrg666:
Sorry, that was my fault. I uploaded the wrong file and corrected it now. The MD5sum of the correct package is e32cd26eae6431da890a60be8f06a1a1.
[HTC EVO 3D] Meowdib:
Good update. The kernel seems to struggle to wake up from sleep though. I push the power button and the status button shows up, then the unlock ring will show up most times, sometimes it doesn't and I have to hit the power button again and wake it up, but there is always a delay for the unlock ring to show up. Anyone else getting this? I clocked down the cpu to 1.2ghz.

Edit: I'm gonna try flashing again.
[HTC EVO 3D] bigwillyg:
Re: [KERNEL] MiRaGe - for HTC stock ICS ROM - 3.0.70

You may want to make sure that your minimum cpu speed is set to at least 384.
[HTC EVO 3D] Meowdib:
I don't see the option in kernel tuner under Misc, which is where I think it should be.
[HTC EVO 3D] mrg666:
Please download again and reflash. You might have downloaded the package before I corrected it. As Bigwilly commented, if you have changed the minimum frequency, make sure it is 384 at least. It is set at 384 by default. Also, since android is very busy with setting up the system right after booting, there can be stuttering and brief hangs for a couple of minutes. It should be smooth after that.
[HTC EVO 3D] mrg666:
I don't support kernel tuner. Use No-frills CPU Control, it works.
[HTC EVO 3D] bigwillyg:
Re: [KERNEL] MiRaGe - for HTC stock ICS ROM - 3.0.70

It would be under cpu in kernel tuner.

---------- Post added at 09:21 AM ---------- Previous post was at 09:20 AM ----------

Yes, with anthrax and buttered toast, for example, it is recommended to let it sit for 10 minutes or so and then reboot to ensure it is ready. May want to try that with this one also.
[HTC EVO 3D] ZWYATT:
Re: [KERNEL] MiRaGe - for HTC stock ICS ROM - 3.0.70

Loving this kernel man. So far it's the only aftermarket that doesn't break my wifi on vm stock 2.95 rom.

Thank you very much. :thumbup:
[HTC EVO 3D] mrg666:
I have found that RT scheduler improves the kernel performance on android. So removing it was not optimal. I have added it back to the kernel and updated the build again. In the mean time I have backported several more updates for cpuidle and pm code from codeaurora msm-3.4 kernel.

I had said I was not going to post any more updates for a week today. And I am not going to ... after this :)
[HTC EVO 3D] ZWYATT:
Re: [KERNEL] MiRaGe - for HTC stock ICS ROM - 3.0.70

Dloading..... now. :thumbup:

---------- Post added at 09:45 PM ---------- Previous post was at 09:38 PM ----------

Latest build flashed. Fired right up.
[HTC EVO 3D] Meowdib:
I don't think anyone minds... :good:
[HTC EVO 3D] mrg666:
The recent mach-msm updates were "a little" tricky but I think they paid off; the stock ICS is so smooth now. We should stay with this kernel for a while at least until my development side starts craving again or we find something wrong.
[HTC EVO 3D] hossman:
Re: [KERNEL] MiRaGe - for HTC stock ICS ROM - 3.0.70

Smooth as butter here on vm latest ota/firmware
[HTC EVO 3D] Sultanxda:
Incorrect memory mapping generates a random reboot, not a random power off. Random power off happens when the battery can't handle large power draw, and it has even happened to me with my old battery when playing Temple Run 2 or taking a picture with flash. A memory map issue generates a random reboot with no evidence in the last_kmsg that a reboot happened (e.g. no stacktrace).
[HTC EVO 3D] gonk24:
Phone has been idle with screen off and no apps open every time, one time it was charging. Battery is new, purchased about 3 weeks ago. Name brand battery not a cheapo. I don't know anything about kernel builds, I'm just reporting what happened. Could very well be something different entirely. Another user did have the same thing, could be coincidence.
[HTC EVO 3D] mrg666:
You are most probably right about the power off. But "can't play this video" error message seems like a memory map problem to me.

Everyone, I have uploaded the 1002 build without the memory map. I think it will be less confusing if I test the memory map myself. I will post the kernel again if we can resolve the problems with android1234567.
[HTC EVO 3D] Obeezy562:
Will there be an ics test of the memory map ?
[HTC EVO 3D] mrg666:
Not until we can make it work with JB.
[HTC EVO 3D] Hedied4me:
Would you like us to continue to test 1001 or move on to 1002?
[HTC EVO 3D] SketchyStunts:
1002 more than likely.

On 1001 just a few minutes ago my phone just shut down while transferring some stuff to my SD Card. Not sure what cause it but I just flashed & booted 1002. Thanks for sharing :)
[HTC EVO 3D] mrg666:
I appreciate that you asked. Please use 1002 from now on. Thanks to everyone for testing and reporting the problems so far.
[HTC EVO 3D] gonk24:
1002 flashed right after it was posted. Running excellent so far. Only trouble I've had is recorded video playback through gallery. MX Player plays them fine
[HTC EVO 3D] jonsama585:
Just wanted to thank Meg for making this awesome kernel and also making it available to the public ty.
[HTC EVO 3D] mrg666:
Since MX player plays the video but the gallery fails, there should be an incompatibility in the API. Gallery app in 4.3 is probably using the latest API, while MX player should be using an older API for broader compatibility. Let me check if I can do something about this.
[HTC EVO 3D] gonk24:
I'm on Dirty Unicorns which is 4.2.2 if that makes any difference.