yashsingh1/xdaforums huggingface dataset:
[HTC EVO 3D] mrg666:
I have updated the JB kernel with 1002 build. You can find the download link in OP. I am also taking memory-map mod back to internal testing. So that is not included in the latest 1002 build.
[HTC EVO 3D] dreccon:
I'm in the pleasant position to confirm that USB OTG works on stock ROM with this kernel. I tested a flash drive and a regular external hard drive by attaching a POWERED usb adapter and they both worked perfectly!

Thanks for this great kernel!

Sent from the 3rd dimension!
[HTC EVO 3D] mrg666:
I also tested usb mouse and keyboard.
[HTC EVO 3D] mrg666:
Sultanxda (android1234567) has improved the memory map mod and I have been testing his latest patch with CM10.2 since last 3 days (CDMA version of course). The available RAM for user space is 848MB, up 50MB from 798MB. There were no reboots, instability, no problems. Here is the test kernel for JB.

http://www.mediafire.com/download/dzvkz197a2cho71/MiRaGe_shooter_u_test_kernel_1012_jb.zip

Give it a try if you want to test and post here your feedback. Please don't bother ROM developers with the problems in this test kernel.

Thank you, Sultan.
[HTC EVO 3D] magic_dj:
Please add s2w to kernel
[HTC EVO 3D] mahg:
Tried out this kernel and everything goes fine.

The only 'complaint' is about battery life. It seems that this kernel 'eats' more electrons -about 20% less battery duration-
[HTC EVO 3D] jcsy:
Thanks for all your contribution

-----------------------------------------------------

HTC EVO 3D GSM

JB4.3.1 | 17 October 2013

Mirage Stock | Deadline

-----------------------------------------------------
[HTC EVO 3D] Yndi:
Thank you so much for this kernel!

Made my phone awesome again :)
[HTC EVO 3D] ngochuy:
Thanks a lot, we can test for u, please keep developing this kernel. It's so far so good.
[HTC EVO 3D] sdeft:
Many thanks for this great kernel mrg. Need to buy a Samsung now!
[HTC EVO 3D] mrg666:
I have updated the builds in the OP.

- made sure interactive is the default governor after two reports at the CDMA forum

- added a fix for a seemingly harmless kernel message about failing to set the cpu voltage.

Please test and let me know
[HTC EVO 3D] Revertron:
mgr666, thanks for a great kernel! But, can you please add insmod for tun device after boot? The VPN is not working, unless I make insmod for tun.ko manually :(
[HTC EVO 3D] mrg666:
You can try an app to insert the module such as the one below

https://play.google.com/store/apps/details?id=com.aed.tun.installer

or you can also do this in the user init script.

Since there are very few people using the tun module, it is not fair to keep it in the memory all the time.
[HTC EVO 3D] Revertron:
I think that VPN functionality is fundamental, added by google on purpose, and it is unfair to kill it.
[HTC EVO 3D] mrg666:
It is not killed, it is there and you will just install a small app to start it. How difficult is that?

Plus it is not added by Google. TUN module comes with Linux source code.
[HTC EVO 3D] D3ViLWithiN:
I do understand how you want to keep it minimal. But us people in pakistan or even middle east get to face various internet censorship between corporate battles. No youtube, facebook sometimes twitter and they are now trying to pass a law to block whatsapp and skype in the name of terrorism. So vpn is our very basic need which never allowed me to use your kernel except an unpacking platform to flash other insecure kernels. I just loaded the tun.ko module but my hotspot shield still doesnot connect. Please reconsider our humble request. Thanks

Just connected actually. *scratches head*
[HTC EVO 3D] mrg666:
LOL
[HTC EVO 3D] 1ackass:
Could there be any hope for this remap to come to the ics version?:rolleyes:
[HTC EVO 3D] mrg666:
Can you explain why you are rolling your eyes sarcastically?

The memory mapping have been tried and tested with ICS. The stock sense ROM has 3D video/image capabilities in addition to HDMI output that AOSP ROMs dont support. New memory map conflicts with 3D capabilities and I have no way of testing HDMI capability. So it is not going to be included with the ICS kernel until those problems are resolved.
[HTC EVO 3D] 1ackass:
Sorry, I didn't mean any sarcasm :p I just did not know why there was no memory remap for ics,but now I know :)

Btw, smileys look different on phone and the website. On the phone version, this smiley :rolleyes: looks more like confused and thinking than sarcastic lol.
[HTC EVO 3D] mrg666:
I have edited my post. Sorry for being harsh.
[HTC EVO 3D] 1ackass:
No problem, I will use less confusing smileys next time :D
[HTC EVO 3D] Sultanxda:
[MENTION=4203114]mrg666[/MENTION] Pull request sent for the ICS remap :)
[HTC EVO 3D] mrg666:
I have pulled the patch and rebuilt a test kernel.

link removed

Everyone, please test this kernel if you want to help, especially,3D video recording and playing in the stock ICS ROM . It would be great if you can also test the HDMI output.

Many thanks to Sultan.

Edit: I have linked to the CDMA kernel by mistake. It is corrected now. Please download again if you have downloaded earlier.

Edit 2: I have removed the kernel after testing showed that latest memory map patch is still not working.
[HTC EVO 3D] Qron:
Tested with Sense 4+

When entering 3D mode on camera, screen enters 3D mode but goes black. Still possible to take 3D photo and view it.

When HDMI cable connected phone freezes and reboots.

Unable to read logs :eek: EDIT: Doesn't depend on kernel. My bad.

All above worked with previous versions of Mirage kernel or akernel.
[HTC EVO 3D] mrg666:
Thank you for testing. Your feedback is consistent with my testing with the previous patch. Please revert back to the stable build in the OP. I will remove the download link.
[HTC EVO 3D] Sultanxda:
Hold on, I need memory usage statistics while using 3D camera to debug it. I need to know how much memory ADSP is using while the 3D camera is open.
[HTC EVO 3D] mrg666:
Thanks for willingness to fix it. Here is the test kernel

http://www.mediafire.com/download/kl2lv2xtl4ptqp6/MiRaGe_shooter_u_test_kernel_11272013.zip

Everyone, 3D functions and HDMI are not working in this kernel. I have uploaded only to help Sultan for debugging. Please only use if you will work with Sultan while fixing the memory map.

Happy Thanksgiving!
[HTC EVO 3D] Sultanxda:
I have no idea why yesterday I said I needed memory statistics from the remapped kernel :eek: I must've been half asleep. I need ADSP memory usage statistics from the regular, working kernel when the 3D camera is open. If the preview isn't showing on the remapped kernel then ADSP is probably using very little memory, so we'll only get false statistics.

Happy Thanksgiving to you as well!
[HTC EVO 3D] TheBootloader:
How exactly can I help you with this? Which commands?

"cat /proc/meminfo" is probably not enough, right?
[HTC EVO 3D] Sultanxda:
1. Install the regular, non-remapped kernel

2. Plug in your phone to a computer you can use ADB on

3. On your computer, open a command prompt and perform the usual process to use ADB

4. Run the command "adb shell" (without quotes)

5. On your phone, open the camera application and set it to 3D mode

6. Set the picture resolution to the maximum, 5MP

7.

While the camera is still open in 3D mode @5MP

, on your computer run this command in the ADB shell command prompt you opened earlier:

cat /sys/kernel/pmem_regions/pmem_adsp/bits_allocated

Running this command will give output similar to this:

id: 1
bitnum	index	quanta allocated	in MB
0	0	1	0. 3
1	1	1	0. 3
2	2	1	0. 3
3	3	1	0. 3
4	4	1	0. 3
5	5	1	0. 3
6	6	1	0. 3
7	7	1	0. 3
8	8	1	0. 3
9	9	1	0. 3
10	10	1	0. 3
11	11	1	0. 3
12	12	1	0. 3
13	13	1	0. 3
14	14	1	0. 3
15	15	1	0. 3
16	16	1	0. 3
17	17	1	0. 3
18	18	113	0.441
19	131	113	0.441
20	244	113	0.441
21	357	113	0.441
22	470	113	0.441
23	583	113	0.441
24	696	113	0.441
[COLOR="Red"][B]Total usage: 0x329000 (3.160 MB)[/B][/COLOR]
Total allocated pmem size: 0x1800000 (24.0 MB)

The information I need is the Total usage. I have highlighted it in red and bolded it in the above sample output. So I need something like this:
[HTC EVO 3D] TheBootloader:
I use my own fork ( https://github.com/TheBootloader/android_kernel_shooter ) which is basically the same thing as the latest Mirage kernel for ICS, except that I use older WiFi-drivers and have another backlight-brightness-patch. No changes anywhere else, so that should be ok.

Oh and instead ADB, I used SSH. ;)

Idling at homescreen:

id: 1
bitnum	index	quanta allocated	in MB
Total usage: 0x0 (0.0 MB)
Total allocated pmem size: 0x239c000 (35.609 MB)

2D camera:

id: 1
bitnum	index	quanta allocated	in MB
0	0	1	0. 3
1	1	1	0. 3
2	2	1	0. 3
3	3	1	0. 3
4	4	1	0. 3
5	5	1	0. 3
6	6	1	0. 3
7	7	1	0. 3
8	8	1	0. 3
9	9	1	0. 3
10	10	1	0. 3
11	11	1	0. 3
12	12	1	0. 3
13	13	1	0. 3
14	14	1	0. 3
15	15	1	0. 3
16	16	1	0. 3
17	17	1	0. 3
Total usage: 0x12000 (0.70 MB)
Total allocated pmem size: 0x239c000 (35.609 MB)

3D camera:

id: 1
bitnum	index	quanta allocated	in MB
0	0	1	0. 3
1	1	1	0. 3
2	2	1	0. 3
3	3	1	0. 3
4	4	1	0. 3
5	5	1	0. 3
6	6	1	0. 3
7	7	1	0. 3
8	8	1	0. 3
9	9	1	0. 3
10	10	1	0. 3
11	11	1	0. 3
12	12	1	0. 3
13	13	1	0. 3
14	14	1	0. 3
15	15	1	0. 3
16	16	1	0. 3
17	17	1	0. 3
18	18	102	0.398
19	120	102	0.398
20	222	102	0.398
21	324	203	0.792
Total usage: 0x20f000 (2.58 MB)
Total allocated pmem size: 0x239c000 (35.609 MB)

I hope this will help you. :)
[HTC EVO 3D] Sultanxda:
This is very strange... ADSP is using very little memory. Perhaps surfaceflinger is the source of broken 3D functions. That would explain why on ICS the SF allocation in the kernel was massive (64MB; twice the size of the SF allocation on the Sensation for ICS)
[HTC EVO 3D] TheBootloader:
Not sure if you can do something with this, but I got the following stuff from "cat /proc/130/status":

Homescreen:

Name:	surfaceflinger
State:	S (sleeping)
Tgid:	130
Pid:	130
PPid:	1
TracerPid:	0
Uid:	1000	1000	1000	1000
Gid:	1003	1003	1003	1003
FDSize:	256
Groups:
VmPeak:	139816 kB
VmSize:	39784 kB
VmLck:	0 kB
VmHWM:	22492 kB
VmRSS:	8724 kB
VmData:	23544 kB
VmStk:	136 kB
VmExe:	4 kB
VmLib:	13192 kB
VmPTE:	124 kB
VmSwap:	0 kB
Threads:	22
SigQ:	0/6376
SigPnd:	0000000000000000
ShdPnd:	0000000000000000
SigBlk:	0000000000000000
SigIgn:	0000000000000000
SigCgt:	00000000000094e8
CapInh:	0000000000000000
CapPrm:	0000000000000000
CapEff:	0000000000000000
CapBnd:	ffffffffffffffff
Cpus_allowed:	3
Cpus_allowed_list:	0-1
voluntary_ctxt_switches:	1314999
nonvoluntary_ctxt_switches:	215624

2D camera:

[...]
VmPeak:	139816 kB
VmSize:	39784 kB
VmLck:	0 kB
VmHWM:	22492 kB
VmRSS:	15780 kB
VmData:	23544 kB
VmStk:	136 kB
VmExe:	4 kB
VmLib:	13192 kB
VmPTE:	146 kB
VmSwap:	0 kB
[...]

3D camera:

[...]
VmPeak:	141368 kB
VmSize:	39784 kB
VmLck:	0 kB
VmHWM:	22492 kB
VmRSS:	9508 kB
VmData:	23544 kB
VmStk:	136 kB
VmExe:	4 kB
VmLib:	13192 kB
VmPTE:	158 kB
VmSwap:	0 kB
[...]

//edit:

Also, my phone crashes sometimes when I switch to 3D, not sure what causes that:

One time it froze for 10 seconds, killed my SSH connection, and then worked normal.

Another time (a few minutes ago) it caused a hard-reboot. Usually I only get soft-reboots for -any- problem, but this time the kernel got hit too, haha
[HTC EVO 3D] wenna.speedy:
Sometimes, I have data drop with this kernel. I use MIUI rom. Other kernels are ok...
[HTC EVO 3D] Sultanxda:
If your phone crashes when switching to 3D mode then that makes the surfaceflinger heap all the more suspicious. 3D mode is probably requesting a lot of SF memory to render the 3D image, so much that the SF heap in the remapped kernel got completely filled up and subsequently crashed the phone due to lack of memory (SF is used by the ROM in many other places). HTC might've also moved most of the memory being allocated during camera usage to the SF heap rather than ADSP, which would explain why ADSP is only using a few MB of RAM.

HTC's programmers are so lazy when it comes to mapping memory... They used a generic map with little modifications for most of their MSM8660 devices. They mapped the memory on the HTC One so inefficiently that userspace only had about 1500MB of RAM out of 2GB (my Nexus 5 has 1860MB of RAM out of 2GB for userspace).
[HTC EVO 3D] CodenameZeus:
I can confirm on gsm ics 4.0.3 with stock rom ans s-on the wifi will not switch on :/
[HTC EVO 3D] mrg666:
WiFi is working. The only problem could be flashing the wifi module. Use latest 4ext recovery or manually copy the kernel modules to /system/lib/modules.
[HTC EVO 3D] CodenameZeus:
Edit##

Managed to get 4ext recovery working :) installed kernel with it and Wi-Fi is now working. Also overclocked to 1.7Ghz. I actually managed to get 11476 with antutu benchmark :) ****in sweet job man.

+1
[HTC EVO 3D] tom0769:
Maybe the same problem I had.
[MENTION=4176083]CodenameZeus[/MENTION] check the kernel version in settings if the kernel got installed at all.

If not, you have to use the FlashGUI mentioned in the 1st post if you're still on stock rom.
[HTC EVO 3D] CodenameZeus:
Possibly. It's all sorted now thanks Tom0769. Turns out flashing the recovery on the device itself instead of via fastboot got it working. Strange and now it's working well. Except the browser crashes on lloyds bank website and the ui and default lock screen crashes when I use pages manager lol but that's no big deal :)
[HTC EVO 3D] mhnx:
Can someone message me how can I get swap working on this kernel without commands on startup please?? :o
[HTC EVO 3D] mrg666:
Swap is not supported in MiRaGe kernel
[HTC EVO 3D] Kuato:
The vibration intensity is too high for me, how to decrease vibration intensity? Im on latest Mirage JB kernel wth Cm10.2 by Jhony, any clue?

Hatese efo tridi
[HTC EVO 3D] mrg666:
I have backported two significant changes I have done for the mako kernel.

- I have eliminated the load calculation in autosmp (my hotplug driver). Instead autosmp follows the cpu governor's frequency settings which is a function of load average. This change eliminates extra load average calculation, improves the consistency of autosmp with the cpu governor, and hotplug events become more consistent. See the the changes here

- backported the important changes from Linux 3.13-rc for /dev/random which made a significant improvement in the entropy pool for mako kernel

The difficulty is that these are blind builds since I don't have the device anymore. So I am posting the builds as test builds here. Save your working kernel packages in the SD card before flashing this test build. Please let me know how it goes. I will move these to OP after confirmation

ICS kernel:http://www.mediafire.com/download/3j7xpctyrs7bp5r/MiRaGe_shooter_u_test_kernel_01072014.zip

JB kernel (in case there are still users of JB): http://www.mediafire.com/download/dewejo9geij22hw/MiRaGe_shooter_u_jb_test_kernel_01072014.zip

Cheers!
[HTC EVO 3D] TheBootloader:
Thanks for the update!

I just booted without any problem so far. :)
[HTC EVO 3D] Yndi:
Great, Johnny will probably port it for kitkat if possible.

Thanks
[HTC EVO 3D] wenna.speedy:
New build is ****in awesome! I am on original 1750mAh 2 years old battery almost 2 days with 49% of battery.
[HTC EVO 3D] dreccon:
I'm on YAS4 v10 ROM and with the latest test kernel my second core remains offline no matter what.

Sent from the 3rd dimension!
[HTC EVO 3D] mahg:
The same here.

That's because you probably had MIN CPU SPEED set to 192 MHz.

I don't know if there is an alternative way to get CPU1 working again but in my case I needed to reflash butteredtoast again.

Try it and then set CPU MIN to 384 before flash this kernel.
[HTC EVO 3D] dreccon:
Flased back the latest stable version and both cores work as they should.

Hmmm, I have a hunch why wenna.speedy has such good battery life!

Sent from the 3rd dimension!
[HTC EVO 3D] mrg666:
What is the cpu governor? I would appreciate if somebody can test with the stock rom and let me know if the second core is always offline.
[HTC EVO 3D] jcsy:
Now I wonder what ROM, and whether its just single CPU

Lol

-----------------------------------------------------

HTC EVO 3D GSM

JB4.3.1 | 27 October 2013

Johnny 798 RAM | Deadline

-----------------------------------------------------
[HTC EVO 3D] Yndi:
I recognized the same behavior when I still was using CoolSense(Sense 3.6 ROM)(about two months ago) and set Minimum Frequency to 192MHz with "Android Tuner".

I did not change the govenour. And as you I was unable to get CPU1 back on. My thought was it might be an app bug and now I'm on kitkat.
[HTC EVO 3D] dreccon:
I saw only two governors, interactive and (if I remember well) ondemand. Tried both. No difference. Haven't tried on stock ROM.

Sent from the 3rd dimension!
[HTC EVO 3D] mrg666:
There was an incompatibility in the cpufreq driver and because of that the cpufreq_get was always returning zero. I fixed the problem with the great help from sketchystunts at the CDMA forum and the second core is now turning on and off as expected. Here are the fixed kernels.

Also, the toolchain is now gcc 4.8 based latest linaro toolchain.

ICS kernel: http://www.mediafire.com/download/vjdc0cy5kkyxekk/MiRaGe_shooter_u_test_kernel_01092014.zip

JB kernel: http://www.mediafire.com/download/ld0y9lr2j8cv7v1/MiRaGe_shooter_u_jb_test_kernel_01092014.zip
[HTC EVO 3D] dreccon:
Yes, both cores work now. Thanks!

Sent from the 3rd dimension!

---------- Post added 10th January 2014 at 12:02 AM ---------- Previous post was 9th January 2014 at 11:09 PM ----------

Why does Kernel Tuner say that this kernel doesn't support Mpdecision and Thermald when it does?

Sent from the 3rd dimension!
[HTC EVO 3D] mrg666:
There is no mpdecision in MiRaGe. That function is done by a completely different code (autosmp). Thermald also is also a different code than kernel tuner expects. Kernel tuner isn't needed with my kernels and I don't support it.
[HTC EVO 3D] jcsy:
7th Jan build also running single core , CM10.2

9th Jan both cores work :)

Edit : month wrong, Im still living in 2013

-----------------------------------------------------

HTC EVO 3D GSM

JB4.3.1 | 27 October 2013

Johnny 798 RAM | Deadline

-----------------------------------------------------
[HTC EVO 3D] ngochuy:
I flashed this kernel to [ROM][PMEM+ION] CyanogenMod 10.2 - Jellybean 4.3.1 - 27-December then i couldn't boot the phone. Does it because of something like "[PMEM+ION]" ? The kernel which is original used in this rom is the MiRaGe date 27/12/2013.
[HTC EVO 3D] milestone97:
Why do you use gcc, instead of clang?

The Kernel should be written in C++, am I right?

(No hate, just want to know why)
[HTC EVO 3D] mrg666:
Don't use use JB kernel with CM11 which is KitKat.

Kernel code is standard C not C++.
[HTC EVO 3D] jcsy:
Is the OOM memory settings correct

Seems rather low, or I felt it was low when multiple apps open

-----------------------------------------------------

HTC EVO 3D GSM

JB4.3.1 | 27 October 2013

Johnny 798 RAM | Deadline

-----------------------------------------------------
[HTC EVO 3D] ngochuy:
I used it with JB CM 10.2 (android 4.3.1) but it didn't work. I have to flash the rom again to boot my phone.
[HTC EVO 3D] jcsy:
Well mine does. Probably its a December 27 build which is specific as mine is 27 October

And it works

-----------------------------------------------------

HTC EVO 3D GSM

JB4.3.1 | 27 October 2013

Johnny 798 RAM | Deadline

-----------------------------------------------------
[HTC EVO 3D] mrg666:
Based on the two instability reports at CDMA forum, I have reverted the toolchain to the previous version. There cannot be any reason to deal with the code anymore since the two changes I made will not cause this instability. In addition the rest of the code base has been proven to be stable since a very long time. So the only reason could be the new gcc-4.8 based toolchain which had problems before. I thought it would have been improved by now, apparently hasn't. So here are the last test builds. I will not delete the previous test builds, feel free to continue with them if they are working fine for you.

In short 0109 and 0111 test builds are the same code built with different toolchains

ICS kernel: http://www.mediafire.com/download/a41qiwk8cyzj9sv/MiRaGe_shooter_u_test_kernel_01112014.zip

JB kernel: http://www.mediafire.com/download/7ddjnsbld3767pl/MiRaGe_shooter_u_jb_test_kernel_01112014.zip
[HTC EVO 3D] Arbelzapf:
What were these reports about? I experienced the phone locking up and freezing two times. The screen would not turn on for a very long time, as if I was in for a reboot. But it always came back working normally. If that's in line with the other reports, I'll probably flash the one with the old toolchain

Edit : never mind, I read up myself. Guess it's worth trying
[HTC EVO 3D] Dixxhead:
I can confirm random lock ups, sometimes followed up by a soft reboot. (Using yas v10, which itself already has some reboot problems, but itt didnt happen as frequently with 19112013 build)

Now, the kernel is extremely snappy and checking with micro cpu monitor it turns on the 2nd cpu for almost everything. Is that intended behaviour? It turns it on when going left or right on the homescreen or when pulling down notifications). Gonna try the new build and report.
[HTC EVO 3D] mrg666:
Yes that is the intended behavior. As soon as the cpu freq on the first core goes above 900 MHz, the second core comes online to help with the cpu load.
[HTC EVO 3D] Dixxhead:
I see, it seems to draw quite a bit more power than the last stable build (19112013). Unfortunatly today I ended up in a soft-reboot loop after trying to play Asphalt 8 again.

Now I don't know if this is the kernels fault oder the Rom's, since I couldn't get Asphalt 8 to run anytime on YAS 4v10, but this was the first time I was stuck in a Soft-Reboot loop even after removing the battery (couldn't, turn phone off let alone create a log since it soft-rebooted before completeing the shutdown). Had to restore my Backup with the last stable build but will try the test-FW again once I don't need my Phone so frequently. Higher power-draw is a given due to increased CPU1 activity I assume? :cyclops:
[HTC EVO 3D] mrg666:
Let's defer the power draw discussion until you can keep your phone running without reboots.

Regarding reboots, can you tell which test kernel you are using, did you flash the latest test kernel built with gcc 4.7? Are you sure it is soft reboot or hard reboot. Soft reboots are generally due to problems in the OS not kernel.
[HTC EVO 3D] Snoob25:
With yas rom unfortunately few users (including me) suffers of random reboots/soft reboots, other users instead don't have any problem (howpathetic for example). We still need to figure it out, but i don't have yet my phone back from assistance and howpathetic can't replicate the reboots, so debugging is stuck for the moment!

i made this little offtopic to explain that best rom to test a kernel is a stock rom, or an extremely stable and well known custom one! follow mrg666's indications :highfive:

i hope that phone will come back soon, i really want to try latest kernels :o
[HTC EVO 3D] Dixxhead:
Your Rom crashed less often on me than the Stock-rom and Kernel though, it's not like HTC's Stuff is super stable. I'll probably not revert back to the Stock-ICS though, since it really ain't up to snuff compared to YAS4.

Either way,it was definetly a Soft-Reboot. The Phone started up, "loading" the Dashboards and then got back to that white HTC- Quietly Brilliant animated screen (no blackscreen). Probably Rom problem, so I'll give the test kernel another shot.