yashsingh1/xdaforums huggingface dataset:
[Atrix 4G Android Development] clemare:
Ok, I'm testing again with rev00 (flash method).

So far so good. 57% right now (15:56) and start at 8:00am. The phone is not slow, but not as fast as cm7 (which is expected).

Maybe this is a real daily use rom. Let's see more tweaking, but so far very good. No unexpected restart.

Good job!

Clemare
[Atrix 4G Android Development] fdaconta:
[PATCH 17/21] ARM: tegra: add CPU_IDLE driver

Check This out http://lists.infradead.org/pipermail/linux-arm-kernel/2010-December/033780.html

This Might help.
[Atrix 4G Android Development] tonglebeak:
I wonder if there's a handshaking error when I try to wake it up. FWIW, cpu_idle is the driver that the kernel is reporting in use, so that's a plus of course.
[Atrix 4G Android Development] clemare:
Ok, I'm seriously considering this as my daily driver. I have to test some features I need for work (I'm in vacation right now) but the battery is very good now. Right now I got 15% battery left after 12.5 hours with normal use. Cm7 gives me 25~35%.

The only issue I had was a total system freeze and I have to pull the battery to restart. Sometimes when I try to woke up the phone the screen remains in black, I have to power off and power on and it get back working again.

I will continue to use it at least until Monday when I back to work.

I'll let you know it work.

Some strange thing is the battery drops from 15 to 5 while I write this.

Clemare
[Atrix 4G Android Development] tonglebeak:
I'm going to use this as my daily driver too. I'm not sure why yours and sendust's atrix would run great, while I had to tweak the kernel more to get mine to run like a normal phone, which it's doing. Just another update. 14% over 104 minutes while texting a and using a bit of facebook. Not gonna lie, but that's getting very close to what I had on CM10. Can't wait to see how it holds up during a typical workday.
[Atrix 4G Android Development] clemare:
21:22 at 1% :)

Always using juice defender.
[Atrix 4G Android Development] tonglebeak:
Dang, you're getting a good bit of battery out of that. Do you have anything running in the background, such as facebook?
[Atrix 4G Android Development] sendust7:
Here's a discharge graph for a 3.7V, 1800 mAh Lithium Ion battery: http://www.ibt-power.com/Battery_packs/Li_Ion/Lithium_ion_tech.html

Once voltage drops from 4.2V (full charge) to 3.6V (roughly 85%-90% discharged), voltage drops to zero in a hurry.

And since Power = Voltage x Current, power loss is also dramatic on the back end.
[Atrix 4G Android Development] clemare:
I haven't installed Facebook yet, but I'm using LinkedIn, tweetdeck (for Facebook and twitter) , 2 gmail accounts... That's it.

When I went to the supermarket I plug the phone 10 minutes go and 10 back, but with Bluetooth device and Waze map, so the phone didn't charge, it only maintain the amount of battery. With cm7 it charge slowly but charge. I can say that the phone loose the charge when it is working faster than cm7 but when t is suspend it loose charge in a very similar rate.

That's all I know for now.

Clemare, and again, good job.
[Atrix 4G Android Development] fdaconta:
irq event triggers, memory allocation

I think it might have something to do with irq event triggers and memory allocation. it would be good to see a logcat of sleep and wake events. This is pretty deep stuff. I'm in over my head. I saved all the logs from the install of the "leaked" rom and have been working on it since, learning as I go. maybe we could try looking at the uevent.rc, ueventd.olympus.rc and adding/removing some init code. In ueventd.ventana.rc there is some interesting code.

/dev/knvmap	0660	system	system

/dev/nvmap	0666	system	system

/dev/tegra_avp	0660	media	media

/dev/tegra_rpc	0660	media	media

/dev/tegra_sema	0660	media	media

/dev/tegra_mediaserver	0660	media	media

/dev/ov5650	0660	media	camera

/dev/ov2710	0660	media	camera

/dev/sh532u	0660	media	camera

/dev/tegra_camera	0660	media	camera

/dev/camera*	0660	media	camera

/dev/focuser*	0660	media	camera

/dev/torch*	0660	media	camera

/dev/spdif*	0660	system	audio

/dev/video0	0660	media	camera

/dev/video1	0660	media	camera

/dev/tegra_dc*	0660	system	system

/dev/ttyACM* 0660 radio system

/dev/mpu 0640 system system

/dev/mpuirq 0640 system system

/dev/accelirq	0640	system	system

/dev/timerirq	0640	system	system

/dev/nvhdcp0 0666 system system

/dev/nvhdcp1 0666 system system

/dev/nvhost-ctrl	0666	root	root

/dev/nvhost-display	0666	root	root

/dev/nvhost-dsi	0666	root	root

/dev/nvhost-gr2d	0666	root	root

/dev/nvhost-gr3d	0666	root	root

/dev/nvhost-isp	0666	root	root

/dev/nvhost-mpe	0666	root	root

/dev/nvhost-vi	0666	root	root

/dev/tf_driver 0666 system system

/dev/ttyHS1	0664	root	system

/dev/ttyHS2	0660	bluetooth	bluetooth

/dev/ion	0666	system	system

/dev/timerinfo	0444	system	system

take a look at http://lwn.net/Articles/480055/ this refers to android, nvidia memory allocation intorduced in ics

/dev/ion	0666	system	system

/dev/nvmap 0666	system	system

#for Sensors

/dev/mpu 0660 system system

/dev/mpuirq 0660 system system

/dev/accelirq 0660 system system

not in file /dev/compassirq 0660 system system

/dev/timerirq 0660 system system

thats all I could find so far. searching entry by entry
[Atrix 4G Android Development] furkonhesti:
Dear all.can you share your lastest modification ICSROM on zip flashable file..im very interesting to try it..but im very noob...btw thanks for your good works
[Atrix 4G Android Development] sendust7:
Hi there,,, We got a little distracted with CPU settings (my fault), though I think it is a worthwhile study to gain an appreciation of the challenges with ICS.

You can see from the list below (shown for "cpu0", the first of two CPU cores) that the available settings are limited. For example, the minimum and maximum available operating frequencies are 216 MHz and 1000 MHz respectively.

root@olympus:/sys/devices/system/cpu/cpu0/cpufreq # ls *
affected_cpus
cpuinfo_cur_freq
cpuinfo_max_freq
cpuinfo_min_freq
cpuinfo_transition_latency
policy_max_freq
policy_min_freq
related_cpus
scaling_available_frequencies
scaling_available_governors
scaling_cur_freq
scaling_driver
scaling_governor
scaling_max_freq
scaling_min_freq
scaling_setspeed
time_in_state
total_trans
throttle
root@olympus:/sys/devices/system/cpu/cpu0/cpufreq # more *
more *
0
216000
1000000
216000
300000
1000000
216000
0 1
216000 312000 456000 608000 760000 816000 912000 1000000
interactive conservative ondemand userspace performance
216000
tegra
ondemand
1000000
216000
<unsupported>
0

So for now, I am working on eliminating unnecessary processes and trying to optimize others. This involves streamlining the ROM "init" process which is embedded in the ICSROM boot image.

Others (esp. krystianp and mmontuori) are focused on the ICS "kernel" --- the very core of your phone's operating system which interfaces with ROM applications and your phone's hardware (CPU, memory, wifi etc).

Hopefully together we will be able to increase battery life (the main issue with ICS) without loss of performance.

Best.
[Atrix 4G Android Development] clemare:
I can confirm that the phone loses battery at a very similar rate to cm7 when it is suspend, and when it is working it loses battery at a very high speed. The phone turns very hot even with simple tasks like check email or post in this forum ;)

I hope this help.

Clemare
[Atrix 4G Android Development] sendust7:
That ICS GPU acts like an untrained Secretariat blasting out of the gate, lol.

I am reasonably sure this is why ICS is able to render the LXDE desktop of my Ubuntu 12.04 LTS running underneath:

But yes, the GPU could use some tuning.
[Atrix 4G Android Development] sendust7:
Battery Drain Test Script

I wrote a script for testing ICSROM battery drain.

​

I know... battery apps are a dime a dozen. But I like this one because I can see the code.

It is very easy to use and outputs the following at a constant interval:

Date and Time

Current voltage (mV)

Charge Remaining (%)

Temperature (deg C)

I also threw in an Ice Cream treat: Before the “while” loop starts, I power down cpu1 (the second of two cores, cpu0 being the first) before the battery test.

Link: http://www.mediafire.com/?bxezc8jxai54b84

Download to a directory that doesn’t have permissions issues. Make sure you are root and elevate permissions:

chmod 0755 batt-v1.0.sh

Then from Script Manager, Terminal Emulator or other...

sh batt-v1.0.sh {interval-in-seconds}

Or you can "adb shell" into your phone from a computer. [EDIT] There may be less overhead with adb. But your phone would be charging...

I recommend entering a time interval of 10 seconds or more, though you could enter 1 second and watch the output fly.

You MAY need to set your governor to something other than “userspace”. Right now, I have my script running with the governor set to “conservative”.

Experimental. Enjoy.
[Atrix 4G Android Development] upndwn4par:
We tried messing around with CPU frequencies for quite some time with ICSROM.

I tried to "hard code" the frequencies in init.rc and also using CPU Editor (which is why I added init.d support).

Even with cpu1 turned off and the maximum frequency of cpu0 set to 512MHz, there was no significant improvement in battery life.

There are pages of discussion available on the ICSROM thread.

Having said that, I still think there is value in what you are doing with trying to modify the boot image.
[Atrix 4G Android Development] clemare:
What about the GPU? There are ways to control the behavior of the GPU? I think we are done with CPU parameters.

Thanks, great work.

Clemare
[Atrix 4G Android Development] fdaconta:
Technical Reference Manual

The Tegra 2 Family reference manual can be found here if you don't already have it. http://www.chiark.greenend.org.uk/~theom/riscos/docs/Tegra2_TRM_DP04508001v01p.pdf

The Soc chip in our devices is a symetrical multi processor type. I believe it is both hardware and software controlled. I am currenty using CSROM v6.8

/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors are (performance powersaver) governers available in kernel
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governors file is empty (Im think that the cpu is being totally controlled the tegra driver files.)
/sys/devices/system/cpu/cpu0/cpufreq/scaling available frequencies 216000 312000 456000 608000 750000 816000 912000 1000000
/sys/devices/system/cpu/cpu0/cpufreq/time_in_state
216000 344540
312000 121936
456000 29042
608000 14655
912000 4709
1000000 44292
/sys/devices/system/cpu/cpu0/cpufreq/total_trans 44091

The init code contained in init.mapphone_umts.rc and init.mapphone_cdma.rc specifies a governor not even suported by the kernel yet it's still scalling, also notice scaling_min_freq. In addition I believe that these init files are loaded based on init binary file. I think bootloader loads first, then kernel, followed by init.rc then loads one or the other of the umts or cdma rc files based on the hardware and carrier ie Sprint/Verison or AT&T. This is roughly the boot process for our atrix

# Power Management
write /sys/power/sleep_while_idle 1
write /sys/power/enable_off_mode 1
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 250000
write /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold 86
write /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate 46875
write /sys/power/sr_vdd1_autocomp 1
write /sys/power/sr_vdd2_autocomp 1
write /sys/power/enable_abb_mode 1

The real question is how is this even working with the inconsistencies. I will make edits repack boot.img and report back.

I had to remove ICS. no screen tearing but as soon as I lost wi-fi signal the unit overheated and rebooted like crazy. I think the radio logcat said it wasn't releasing flags. There is also an error in the ICS init.rc file path statment. the last two enties are invalid.
[Atrix 4G Android Development] zip103:
Thank you

Cant begin to show my appreciation for your efforts.
[Atrix 4G Android Development] fdaconta:
Boot Logcat ICS leaked ROM no mods applied

This is the system log captured at boot, spaces added to improve readability. Hope this helps. What is the boot time with unmodified boot.img, I think it was about three minutes? We need to benchmark Progress.
[Atrix 4G Android Development] sendust7:
Steady State Boot Time

I think it is better to benchmark boot time in "steady state", i.e. after the system rebuilds cache/data. In Rev00, initial boot time (after "factory reset") is just under three minutes and subsequent boot times are just under one minute.
[Atrix 4G Android Development] fdaconta:
Rev00.img

Thanks for the reply!

After you extracted the boot.img how are you able to work with the kernel? working with the android init files and notpad++ is relatively easy. The hard part knowing the black art of the android init language and making the apporpriate edits. Has there been any significant changes to the init*.rc files yet?
[Atrix 4G Android Development] Aphador:
Sorry, i'm kind lost in here hehe my phone worked pretty well with 1.4.3, except for battery drain, of course. Now, how can i use this fastboot improves? Do I install ICSROM 1.4.6 as usuall and then flash this zip file? my atrix is international, tegrapart 1100. Will this work with ramfix?

Sorry if it's silly questions, and sorry for my bad english hehe.
[Atrix 4G Android Development] sendust7:
No problem, glad to help. I can only say these are tested working on my AT&T Atrix. Not sure about international --- sorry. Battery drain? This is in work by a number of developers, testers and researchers.

Preliminaries:

Rooted phone with unlocked bootloader

CWM Recovery 5.0.2.0 installed (or latest version of TWRP)

Fully charged, healthy battery​

Instructions:

CWM Nandroid backup of current ROM (if you want to save /data and /cache)

CWM "wipe data/factory reset" (leaves existing ROM in place but clears /data and /cache)

CWM flash ICSROM-1.4.6-Rebuild.zip (takes a few minutes)

Do NOT reboot. Power down instead.

Fastboot method: Power up to fastboot and "fastboot flash boot boot-icsrom-146-Rev00.img"

CWM flash method: Power up to Android Recovery and flash boot-icsrom-146-Rev00.zip
​

The following links are posted in my OP:

Fastboot image: http://www.mediafire.com/?bu604jfdm2axfsv

Flashable zip: http://www.mediafire.com/?5qndqe429eu3ltu

Now reboot. Initial boot time should be less than three minutes. Subsequent boots should take less than one minute.

Hope this helps :)
[Atrix 4G Android Development] Aphador:
It helped hehe. Initial boot took less than a minute and half. Altough, my RAM was only 356 mb, so i had to flash ramfix again...and I don't know if boot-icsrom-146-Rev00 changes are still active...is there a way to check this? Maybe, i can't use both ramfix and this boot img =/

EDIT: I do believe boot-icsrom-146-Rev00 changes are working, coz boots are incredible faster than used to be.
[Atrix 4G Android Development] sendust7:
Yes. While booted to ICSROM 146, enter "more /proc/cmdline". This displays the kernel command line which includes RAM allocations.

Here is what I get on mine:

root@olympus:/proc # more cmdline

mem=320M@0M nvmem=192M@320M mem=512M@512M vmalloc=320M video=tegrafb console=null usbcore.old_scheme_first=1 tegraboot=sdmmc tegrapart=mbr:1100:100:800,kpanic:2500:400:800 security=tomoyo mot_prod=1 androidboot.serialno=TA2070GKY6

root@olympus:/proc #

The Rev00 boot image kernel command line is blank. So what you see above is the default in my case.

You could try flashing ramfix right over Rev00, but I cannot guarantee your system will not degrade.

Android System Info is a very good app for determining Max and Free RAM.
[Atrix 4G Android Development] Aphador:
I get just the same of you, except for the "androidboot.serialno". So, does it mean Rev00 changes are ok?
[Atrix 4G Android Development] sendust7:
Here in the US we sometimes hear: "The proof is in the pudding." --- we won't know how good it is until we taste it ;)
[Atrix 4G Android Development] ravilov:
Think about it. There can only ever be one boot image on the device (not counting the recovery which is a system of its own). By flashing Rev00 you've replaced whatever boot image was on your device previously. Applying ramfix won't and can't change that - it sure can't undo flashing Rev00 so that your old boot image would somehow "reappear". In fact, the ramfix is very non-intrusive and thus pretty safe in many cases.
[Atrix 4G Android Development] Aphador:
Thanks! I understand now.

Well, my atrix is booting faster than never, it's running really smooth but it is not as cooler as it used to be with v1.4.3. And I only had two random reboots.
[Atrix 4G Android Development] sendust7:
Update [21 Feb 2013]

The MROM ICS and ICSROM kernels match. However the MROM ICS ramdisk is more compact and better structured than ICSROM ramdisk; which leads to a dilemma:

Plan A: Continue on the incremental path of cleaning Rev00 ramdisk,

OR

Plan B: Use MROM ICS ramdisk as baseline for developing ICSROM boot image Rev01.

I have decided on Plan B...

This morning I pushed MROM’s init to Rev00 ramdisk and was able to get an ADB root session going:

$ adb shell
shell@olympus:/ $ su
root@olympus:/ # mount

rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk0p12 /system ext3 rw,noatime,nodiratime,errors=continue,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p13 /system/vendor ext3 ro,noatime,nodiratime,errors=continue,user_xattr,acl,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p16 /data ext3 rw,nosuid,nodev,noatime,nodiratime,errors=continue,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p15 /cache ext3 rw,nosuid,nodev,noatime,nodiratime,errors=continue,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p3 /pds ext3 rw,nosuid,noexec,relatime,barrier=0,data=ordered 0 0
root@olympus:/ #

though the display hangs at the Big-M boot animation. So I backed out the change.

Honestly I’m not sure how much value continuing this project will add to ICSROM since the main problem is the kernel and since other improvements require modifications of the ROM itself , e.g. http://xdaforums.com/showthread.php?t=2158447

So I will continue with Plan B in background while improving on dual boot… and

maybe

… building my own ROM :D
[Atrix 4G Android Development] Pixelguy:
so where do we stand?

Just getting a bit confused but where do we stand with the latest icsrom you have modified? When I last used icsrom when it first leaked i just had awful battery life and a few random reboots and also the deep sleep/lockscreen delay bug

So what's the current situation? What are the issues we are left with?
[Atrix 4G Android Development] sendust7:
Actually ICSROM belongs to someone else: http://xdaforums.com/showthread.php?t=1930645

All I did was (almost literally) throw together a custom boot image (Rev00) to get ICSROM to boot on my phone. That was two weeks ago. Then I decided to post for the benefit of other users having the same problem.

Battery life remains an issue: 4.x % per hour in sleep mode and significantly higher in display mode. The general consensus is that battery life is related to the kernel.

The deep sleep/lockscreen delay bug is still there for me, but I hardly ever get random reboots with the Rev00 boot image:)
[Atrix 4G Android Development] ivica86:
@sendust7 do you have screen tearing, or you are one of the lucky ones who don't have that problem :)
[Atrix 4G Android Development] sendust7:
UPDATE: GPU Frame Rate Setting

Never had a problem with screen tearing on ICSROM + Rev00 boot image. Then again, I don't really watch videos or play games.

[UPDATE, 21 Feb 2013 2100 PST]: It looks like we can adjust the GPU frame rate in /system/build.prop ...

# Performance
ro.tegra.mode=performance
ro.tegra.gpumode=quality
ro.tegra.debug=0

[COLOR="Blue"]# sendust7 21 Feb 2013
persist.sys.NV_FPSLIMIT=10

[/COLOR]I deliberately chose 10 fps to ensure that the setting did have an effect. And it does, at least on MROM ICS as evidenced by the choppy boot animation and practically unusable UI, lol :D

An optimized value of persist.sys.NV_FPSLIMIT MAY reduce/eliminate tearing, and MAY improve battery life by taming the GPU (though not necessarily for apps).

I have seen settings ranging from 35 FPS to 60 FPS though I am not sure what the defaults are for ICSROM or MROM ICS.
[Atrix 4G Android Development] Lobialkon:
Okay, ive installed this and the only problem so far is the phone keeps warming up as always after a couple minutes of use. The battery life has improved a lot, after 40mins of heavy use i only lost 2% of battery which is nothing, almost the same as in GB or even better.

Great job, i'll try to adjust things with SetCPU to see if i can make the phone run cooler while i use it, if the screen is off and of course im not using it, it runs cool as normal but as soon as i wake it up and start using it, in less than a minute is hot as hell.

Again, nice work and thanks for the hard work! Keep it up!

Goodbye!

PD: Not sure if this info can help you, but im using a Latinamerica Atrix, Tegrapart 1100
[Atrix 4G Android Development] TravisAntonio:
I think it should help since only most of the AT&T works.
[Atrix 4G Android Development] sendust7:
ICSROM 146 + Rev00 Boot Flashable Zip

I received the go-ahead from ICSROM author upndwn4par to roll my Rev00 boot image into ICSROM 1.4.6​

​

Link: http://www.mediafire.com/?5lbdhga26azhmd7

Instructions:

Already on ICSROM 146 with Rev00 boot image? Nothing to do.

Already on ICSROM 146 with original boot image? Simply flash zip... OR flash my Rev00 boot zip linked in OP (faster)

Coming from different ROM? Nandroid backup (unless you don't mind losing /data), then CWM wipe data/factory reset and flash zip

Experimental. Enjoy.

Credits: upndwn4par (ICSROM).
[Atrix 4G Android Development] Beenees:
Do I need to flash vendor as well?
[Atrix 4G Android Development] furkonhesti:
Hi sendust7, Im use int'l atrix.. do i need flash ramfix after flash this rom??
[Atrix 4G Android Development] upndwn4par:
I am always glad to help. :)

Yes, unless you already have it installed.

You can grab Vendor Lite from the ICSROM OP.
[Atrix 4G Android Development] sendust7:
Hi there... Check out this thread by NFHimself: http://xdaforums.com/showthread.php?t=1240310

Next, while booted to ROM, launch an ADB session and enter (as root, just in case): "more /proc/cmdline"

Here is my command string while booted to CWM (though you should boot to ROM instead):

Now I quote from NFHimself:

Hope this helps:)
[Atrix 4G Android Development] furkonhesti:
Sorry im a noob..hehehe..its mean that i just need to flash ramfix.zip after flash your lastest icsrom?thanks
[Atrix 4G Android Development] xyzwqt:
Yes
[Atrix 4G Android Development] fdaconta:
Big M boot animation

Check the default.prop from the extracted boot.img

ro.debuggable=1 if it is ro.debuggable=0 reset to 1 and see if it boots.
[Atrix 4G Android Development] ramanujan20:
i flash the rom but wifi and celluar data didnt work for me. i use MB860 in Turkey. How can i fix this?

Edit: i flashed N_01.77.38P radio and everything works now :)
[Atrix 4G Android Development] TravisAntonio:
Just installed it ago 30 minutes and works very well until now, installing apps, I'm going to test it a little by playing Ingress outside and see how it goes.
[Atrix 4G Android Development] sendust7:
Hi...I tried it this morning but same behavior.

In my Dual Boot Atrix: Simplified and Standalone, I was able to successfully boot CM10 ROMs hosted on SD by replacing "init" with MROM ICS init (ref. CM10 Notes in OP).

I have an idea: I could rebuild ICSROM Rev00 boot with MROM ICS init, and see if we can get an adb session going during boot animation. Then logcat the boot process and see where it's hanging up.

Could you try that for me if I post the image?

Thanks.