5-15-2012: Further down in this post are workarounds for an a500 ICS screen auto rotate problem.
The primary symptom is a g-sensor/accelerometer hang which prevents automatic screen rotation/orientation. This is accompanied by MLUpdateData error (code 26) messages in logs. If you are here for that, scroll down to the section titled: "MOTION SENSOR INITIALIZATION PROBLEM." If not, the following section may help you resolve a number of app issues affecting ICS.
#########################
GENERAL APP AND SYSTEM ISSUES
You may have arrived here with other problems (because of the somewhat ambiguous title), and may not have observed the auto rotate problem. There may be something here for you also, and I've moved that to the top of this post, so please read on. The sensor problem and associated tips are still in the lower portion of this post.
What follows are more general tips to help alleviate numerous problems that people are seeing.
There have been numerous complaints relative to ICS on that a500 on various forums about problematic system behavior -- app crashes, wifi problems, display flashes, slow response, and general instability. After using ICS on the a500 for over two weeks now, seeing solutions to numerous problems posted, and based on considerable testing I've done, I'm convinced that most problems seen with ICS are caused by apps that are not entirely compatible with ICS on the a500. I've also noticed that app fixes for ICS are still coming in, and that many similar issues have occurred with other devices upon migration to ICS. This is to be expected considering that there are thousands of apps available, and these are written by thousands of developers. The following tips may be useful in helping you solve your particular problems. If your problem is not caused by some app that you have installed, you are likely in a very small minority of users.
Many users are having success in working around various problems by simply removing unused apps. I've noticed that many are accomplishing this by using the factory data reset option, which clears out all apps. They then merely reload fewer apps, and reduce the risk of running problematic ones. Fewer apps installed appears to correlate with higher stability.
Use of this tip may significantly reduce the number of problems people are encountering with their A500, A200, and possibly A100 tablets.
To avoid sending your tablet into Acer for a factory data reset (something you can do at home anyway), try the following:
* remove any apps that are force closing or otherwise crashing
* remove apps that you don't use. Having fewer apps installed reduces the risk of having problems.
* avoid parking Dolphin or the stock browser in the background with open tabs. Close tabs and exit the browser when you are done. If you often "temporarily" park your browsers in the background as I do, and this seems like a very typical/normal user behavior, consider installing Watchdog to see when browsers start to consume significant CPU resource in the background. If you monitor for this, you can deal with it. If you ignore it, you may not understand what is happening when other symptoms occur -- and several that I have seen have been severe.
* don't kill apps
* remove app managers, task killers, performance improver apps, anything that kills apps (if you still want to watch your system resources, use OS Monitor or Watchdog, but don't use the app/process kill functions, use the reset button if something is hung).
* use the hardware reset button (or at least lock screen rotation via the switch) if your system slows, wifi stops working well, screen rotation hangs, etc.
#########################
CONTROLLED FACTORY DATA RESET
If the solutions noted above don't work, your best bet is a controlled factory data reset. This appears to have helped many after the ICS update, myself included. By "controlled," I mean you should follow the instructions below to methodically determine which apps have been causing problems on the system.
If you have backed up your important data, then there is nothing to lose by doing the factory data reset. If you have not backed up important data, it is very likely that you are going to lose those anyway, and when you least expect it, or when you can least tolerate it ...so simply plug in a USB flash stick, and copy your valuable data from the internal "sdcard" to the stick. Use ES File Manager or a similarly reliable app. You can alternately/also backup easily to a PC using the mini USB adapter cable that came with your tablet (you may have to install the a500 USB driver from the Acer site). With ES File Manager, you can even back up most of your installed app APK files for future reference or use, in which case, you can put those on your backup also.
If you already have good backups of your important data, then it takes less time to do the factory reset than to ask or even think about it. It will: remove everything from the built-in "sdcard" flash memory, remove every app, configure all settings to defaults, etc. It restores your device to the system that Acer apparently used to test the ICS release. It will not restore to an older version of Android than you are currently running, so if you are running ICS, you get a fresh factory image of ICS. It's like getting a brand new tablet.
Here's how you do the factory data reset (after you have backed up your data on your PC or an other form of external storage):
1.) Go to Settings->Backup & Reset->Factory Data Reset. Follow the prompts to accept the reset.
2.) When the factory data reset completes in a few seconds, and the system boots up, set up your wifi
3.) When you are prompted to login to your google account, do not turn on the Google automatic app/data restore feature. Decline that option when asked. That setting is used to restore apps automatically and if left on, may restore the problem(s) you were having. If you miss the prompt, immediately go into settings/backups & reset and uncheck Automatic Restore. You must do this before starting Google Plat, and before Google Play starts to restore apps and app data, so it does not simply reinstall the problem(s) you were having. (If you miss this step, start over and repeat the factory data reset.)
4.) After the tablet setup is complete, use Google Play to update the built in apps only. Do not install any apps until you have tested your tablet with the built-in browser, email, etc.
5.) For at least 24 hours, test with only the built in apps, or if you feel things are going very well, and are willing to tolerate more risk (of having to start over) proceed slowly with adding apps.
6.) If you determine that the tablet works OK now without all of your other apps installed, then you need to methodically eliminate the bad app or apps that were causing problems.
If you do the factory reset, and then just reload all of the same apps again, then you can expect the problems to return. That is likely why some report that the factory data reset does not work for them -- i.e., because they just reloaded all of the same apps which caused the same problems.
After factory data reset:
* Be very selective in choosing apps to install, especially while testing ICS with your tablet.
* Screen apps by reading app reviews for your tablet (in GooglePlay reviews, select newest instead of most helpful, also select for this tablet only)
* Install apps slowly and methodically, at a rate of no more than 1-2 per day if possible. Keep track of the order in which you install apps.
* Test each app carefully. When you install a new app, verify that other problems are not starting to occur. When problems do occur start removing apps in the opposite order in which you loaded them, to isolate bad apps. Keeping track of the order of installation facilitates this process.
#######################################################
MOTION SENSOR INITIALIZATION PROBLEM
The MPU initialization does fail as a result of a race condition as I suspected, but the race was not nearly as close as I thought.
I have been able to reproduce the InvenSense MPU-3050 initialization failure at will, and can also _prevent_ it now over 95% of the time. The problem appears to be the result of the MPU-3050 not shutting down entirely until a significant period of time has passed after an a500 power down. This effect can often be seen by powering down the tablet, and then immediately powering it back up, where all MPU-3050 sensors are then unavailable, and associated features like automatic screen rotation do not function. The condition persists until manually cleared by the user as described below.
I've observed that there are two ways to clear the MPU initialization failure condition, and one way that usually prevents it, but as I write in a followup post is not quite 100% effective:
** To clear the condition in less than 30 seconds, just press the hardware reset button (pinhole). The hardware reset appears to shorten the associated MPU-3050 shutdown period, possibly by shorting down residual voltage that may be delaying restart. It's hard to determine the precise cause without having more detailed specs on a500 internals, but this seems to be a reasonable theory.
** An alternate way to clear the condition is to power off the a500, and wait at least 5 minutes before powering back up. This may allow residual voltage on the MPU to drain prior to restart, and thus permit normal initialization of sensors at power up. Again, a theory, but a reasonable one based on past experience with other systems.
** To reduce the chances of encountering the problem, do not power the a500 back on until at least 5 minutes after power down. I would not be surprised to learn that some a500s take less time, and others take more. It appears that many a500s may rarely if ever exhibit the problem. I actually saw some good restarts at power cycle intervals closer to 1 minute. I just got to a point where I thought I was splitting hairs, became bored with the repeated testing, and settled on 5 minutes.
The method I suggest for prevention -- i.e., not using short power up/down cycles -- is probably the natural behavior for most users, and one reason why many report never seeing the problem. I can't rule out that there may be subtle differences in hardware between a500 owners either, because I've only tested this so far on my own tablet, so some users may not be able to reproduce the problem at all.
Apparently then, a500 owners like me who have been seeing this problem more regularly, have possibly been testing for this or other problems, and actually increasing the frequency by performing that specific test -- i.e., the short power up/down cycle. I first saw this sensor problem while repeatedly powering up/down to diagnose problems that I was seeing with certain apps after the ICS update. Others who have detected this problem are possibly behaving similarly while working on other tasks where they perform short power down/up cycles.
It seems possible that the root XDA build that cryptonym tried merely had some other problem with MPU initialization, and that the cause for his error code 26 issue with that ROM installed may have a different origin. Maybe, maybe not. It could be that it is the same problem, and the boot is just that much faster regardless of whether the reset or power button is used.
Android ICS did come with some code changes relative to the MPU though -- specifically in the use of the gyro to reduce latency and smooth output for the gravity sensor, the linear acceleration sensor, and the rotation vector sensor. This may or may not have anything to do with the problem, but seems worth mentioning.
I can now prevent the problem more effectively, but it is clearly a bug in the a500 OS, and one that appears to have been delivered with ICS.
################################################
Below is a continuation of the original post on the motion sensor (MPU) error:
(I am a little concerned about not separating this entire post into two posts, because this talks about two issues -- i.e., more general app management practices, and this specific sensor error condition. I'm leaving it as one though because I see it is being referenced more lately, and readers may be expecting to see one or both issues under the current title.)
An obvious early symptom is the loss of automatic screen orientation (auto rotate). Power off/on will not always clear this. Locking the screen orientation by sliding the lock switch to the right will pause the errors.
What happens: Power up boots of the a500 in this version of ICS intermittently fail to initialize the MPU 3050 sensor device, and the log then shows a constant stream of MLUpdateData error (code 26) messages. The "aLogcat" app from the Market is handy for seeing errors like this. There may be an impact to system resources while the errors are occurring, but I have not determined how significant the direct impact is. The associated sensor errors are posted to the log every 50ms... that's 20 times each second. Again, sliding the auto rotate switch to the locked position apparently suspends the sensor error condition, and reduces some symptoms as long as the switch stays locked. Unlocking causes the rapidly repeating MLUpdateData errors to immediately resume.
If I never power the unit off after a hardware reset (pressing the pinhole button, not the "factory data reset"), I never see the problem occur. One workaround then is to avoid powering the unit down, and then when you occasionally do, use the reset button after power up if symptoms appear.
The condition only starts immediately after a power off /on cycle. I observed that with a clean factory data restore, and no other apps installed, I could reproduce the problem more often by powering down immediately within 2-3 seconds after powering up, proving that this can be triggered without installing any applications beyond those provided in the OS package by Acer.
Beyond the loss of automatic screen rotation, symptoms of the g-sensor error problem can be relatively mild, and at times, unnoticeable. I suspect that many users are generally satisfied with the performance of their tablet with this error occurring because they may not notice it.
#####################
#####################
Below is an example of the MPU sensor error problem from logs on my a500. I've included part of the boot log output from a failed MPU init sequence, followed by log entries showing the E/Sensor MLUpdateData errors, and then finally a clean boot after a hardware reset with no MPU sensor errors.
At power up, this problem always shows up in the system log with this error: E/Sensors ( 141): could not open the mpu irq device node
The kernel log shows the actual start of the problem, where the mpu3050 does not respond to the probe.
The MPU fails to initialize. This only appears to happen at power up, and not a during a hardware reset as otherwise initiated by the pinhole button.
You can then see the MLUpdateData errors repeating every 50ms (20 times a second).
When I flip the screen rotation lock switch to locked, another error is printed for MPL-mlstates.
Flipping the switch to locked also "pauses" the errors, so this may be a handy temporary remedy if you are not ready to reset the device. Flipping it back to unlock allows the errors to continue, and the symptoms return.
This appears then to be a problem with code using the InvenSense MPL (Motion Processing Library) driver/software in this version of ICS for the A500. It may be a timing problem, or some other problem with the initialization methods used in the code. Power off/on does not typically clear this, and as I have now concluded after more exhaustive testing, appears to be the final trigger for the problem.
You can typically clear this condition temporarily after it has been triggered by pressing the hardware reset button (pinhole, lower right below the USB port). You can pause the errors and the associated performance impacts by setting the screen orientation lock switch to locked position. After a hardware reset, the condition then stays clear until the device is powered down and then back up.
There may be some intermediate stimulus involving timing of actions by the user, because the device occasionally powers up without causing the problem. What I have found though is that after apps have been installed, the power off/on action tends to cause the problem about 50% of the time.
############################################
############################################
POWER ON BOOT EXAMPLE WHERE MPU FAILS TO INITIALIZE:
In the kernel log excerpt below, look at time 2.609914. The i2c_readl() call by i2c-tegra.c|tegra_i2c_isr() returns 0x8 (I2C_INT_NO_ACK) while attempting to read status from the mpu3050, and so mpu3050_probe fails because the mpu3050 is apparently just not ready to respond when this happens.
KERNEL LOG EXCERPT:
...
<6>[ 2.608737] compass sensor is AKM8975 0x48
<6>[ 2.608899] i2c i2c-0: mpu3050: +kxtf9
<6>[ 2.608989] i2c i2c-0: Installing Accel irq using 343
<6>[ 2.609272] i2c i2c-0: mpu3050: +ak8975
<6>[ 2.609434] i2c i2c-0: Installing Compass irq using 301
<4>[ 2.609706] i2c i2c-0: mpu3050: No Pressure Present
<4>[ 2.609914] tegra-i2c tegra-i2c.0: I2c error status 0x00000008
<4>[ 2.610004] tegra-i2c tegra-i2c.0: no acknowledge from address 0x68
<4>[ 2.610163] tegra-i2c tegra-i2c.0: Packet status 0x00010009
<3>[ 2.611283] mldl_cfg:/home/pandora/pandora_build_root/main_rom/android/PicassoV041_A500_mdrr/kernel/drivers/misc/mpu3050/inv_330/mldl_cfg.c|MLDLPowerMgmtMPU|579 returning 135
<3>[ 2.611520] mldl_cfg:/home/pandora/pandora_build_root/main_rom/android/PicassoV041_A500_mdrr/kernel/drivers/misc/mpu3050/inv_330/mldl_cfg.c|mpu3050_open|1225 returning 135
<3>[ 2.611684] i2c i2c-0: Unable to open mpu3050 135
<6>[ 2.611770] misc compassirq: Unregistering compassirq
<6>[ 2.612052] misc accelirq: Unregistering accelirq
<3>[ 2.612250] i2c i2c-0: mpu3050_probe failed -19
<4>[ 2.612489] i2c-core: driver [mpu3050] using legacy suspend method
<4>[ 2.612577] i2c-core: driver [mpu3050] using legacy resume method
<7>[ 2.612741] mpu_init
...
SYSTEM LOG EXCERPT:
...
05-04 12:03:49.330 82 82 I dalvikvm: System server process 145 has been created
05-04 12:03:49.330 82 82 I Zygote : Accepting command socket connections
05-04 12:03:49.490 145 145 E BatteryService: usbOnlinePath not found
05-04 12:03:49.510 145 145 I sysproc : Entered system_init()
05-04 12:03:49.510 145 145 I sysproc : ServiceManager: 0x12f4788
05-04 12:03:49.510 145 145 D SensorService: nuSensorService starting...
05-04 12:03:49.590 145 145 V Sensors : sysapi object at 0x5afd6a1c
05-04 12:03:49.590 145 145 V Sensors : sysapi getBiases func at 0x5afd176d
05-04 12:03:49.590 145 145 E Sensors : could not open the mpu irq device node
05-04 12:03:49.590 145 145 E Sensors : could not open the accel irq device node
05-04 12:03:49.590 145 145 I MPL-mlsl: MLSLSerialOpen: /dev/mpu
05-04 12:03:49.590 145 145 I MPL-mlsl: I2C Error: could not bind address 68: -1
05-04 12:03:49.590 145 145 E Sensors : Fatal Error : could not open MPL serial interface
05-04 12:03:49.590 145 145 E MPL-mlstates: Error : illegal state transition from ML_STATE_SERIAL_CLOSED to ML_STATE_DMP_OPENED
05-04 12:03:49.590 145 145 E MPL-dmp : vendor/invensense/Invensense330/libsensors/mlsdk/mllite/mldmp.c|MLDmpOpen|82 returning 25
05-04 12:03:49.590 145 145 E Sensors : Fatal Error : could not open DMP correctly.
05-04 12:03:49.590 145 145 E Sensors : could not open MPL calibration file
05-04 12:03:49.600 145 145 E MPL-mldl: DmpFeatureSupported : sGetAddress is NULL
05-04 12:03:49.610 145 145 W MPL-9_sup: 9 axis sensor fusion not available - No compass detected.
05-04 12:03:49.610 145 145 E Sensors : Error : Bias update function could not be set.
05-04 12:03:49.610 145 145 E Sensors : Error : could not set motion interrupt
05-04 12:03:49.610 145 145 E Sensors : Error : could not set fifo interrupt
05-04 12:03:49.610 145 145 E Sensors : Fatal error: MLSetFIFORate returned 26
05-04 12:03:49.610 145 145 E Sensors : Error : Motion callback could not be set.
05-04 12:03:49.610 145 145 E Sensors : Error : Processed data callback could not be set.
05-04 12:03:49.610 145 145 E Sensors : Fatal error: FIFOSendAccel returned 26
05-04 12:03:49.610 145 145 E Sensors : Fatal error: FIFOSendQuaternion returned 26
05-04 12:03:49.610 145 145 E Sensors : Fatal error: FIFOSendLinearAccel returned 26
05-04 12:03:49.610 145 145 E MPL-fifo: vendor/invensense/Invensense330/libsensors/mlsdk/mllite/mlFIFO.c|FIFOSendGravity|1000 returning 26
05-04 12:03:49.610 145 145 E Sensors : Fatal error: FIFOSendGravity returned 26
05-04 12:03:49.610 145 145 E Sensors : Fatal error: FIFOSendGyro returned 26
05-04 12:03:49.610 145 145 V Sensors : MPLSensor::getFd returning -1
05-04 12:03:49.610 145 145 V Sensors : MPLSensor::getAccelFd returning -1
05-04 12:03:49.610 145 145 V Sensors : MPLSensor::getTimerFd returning 34
############################################
############################################
REPEATING E/SENSOR ERRORS IN LOGS AFTER FAILED MPU INIT
(the sensor does not work at all when this condition is present
and must be reset by pressing the switch in the pinhole)
...
[ 05-04 06:51:48.520 141:0x99 E/Sensors ]
MLUpdateData error (code 26)
[ 05-04 06:51:48.570 141:0x99 E/Sensors ]
MLUpdateData error (code 26)
[ 05-04 06:51:48.620 141:0x99 E/Sensors ]
MLUpdateData error (code 26)
[ 05-04 06:51:48.670 141:0x99 E/Sensors ]
MLUpdateData error (code 26)
[ 05-04 06:51:48.680 1329:0x531 D/TestLog ]
start
[ 05-04 06:51:48.720 141:0x99 E/Sensors ]
MLUpdateData error (code 26)
[ 05-04 06:51:48.780 141:0x99 E/Sensors ]
MLUpdateData error (code 26)
[ 05-04 06:51:48.780 1329:0x533 D/dalvikvm ]
GC_CONCURRENT freed 934K, 12% free 8123K/9159K, paused 2ms+7ms
[ 05-04 06:51:48.810 1329:0x531 D/TestLog ]
end
[ 05-04 06:51:48.830 141:0x99 E/Sensors ]
MLUpdateData error (code 26)
############################################
############################################
REPEATING E/SENSOR ERRORS PAUSE WHILE SCREEN ORIENTATION LOCK
SWITCH IS SLID RIGHT TO THE LOCKED POSITION
(the errors resume when the switch is again unlocked)
...
[ 05-04 06:51:48.860 141:0x98 V/Sensors ]
handle : 14 en: 0 mEnabled:00004000
[ 05-04 06:51:48.860 141:0x98 V/Sensors ]
sensor state change what=14
[ 05-04 06:51:48.860 141:0x98 V/Sensors ]
enabled_sensors: 0 dmp_started: 1
[ 05-04 06:51:48.860 141:0x98 V/Sensors ]
Stopping DMP
[ 05-04 06:51:48.860 141:0x98 E/MPL-mlstates ]
Error : illegal state transition from ML_STATE_SERIAL_CLOSED to ML_STATE_DMP_OPENED
[ 05-04 06:51:48.860 141:0x98 E/MPL-dmp ]
vendor/invensense/Invensense330/libsensors/mlsdk/mllite/mldmp.c|MLDmpStop|161 returning 25
[ 05-04 06:51:48.860 141:0x98 E/Sensors ]
error: unable to stop DMP (retcode = 25)
[ 05-04 06:51:49.260 1329:0x544 D/PersistentEventStore/putEvent ]
Row ID: 319, Event ID: 319
...
############################################
############################################
POWER ON BOOT EXAMPLE IMMEDIATELY AFTER HARDWARE RESET (PINHOLE) WHERE MPU STARTS AND OPERATES NORMALLY:
...
I/dalvikvm( 82): System server process 141 has been created
I/Zygote ( 82): Accepting command socket connections
E/BatteryService( 141): usbOnlinePath not found
I/sysproc ( 141): Entered system_init()
I/sysproc ( 141): ServiceManager: 0x163da10
D/SensorService( 141): nuSensorService starting...
V/Sensors ( 141): sysapi object at 0x59414a1c
V/Sensors ( 141): sysapi getBiases func at 0x5940f76d
I/MPL-mlsl( 141): MLSLSerialOpen: /dev/mpu
I/ ( 141): mpu3050_suspend: suspending sensors to 0000
I/ ( 141): mpu3050_suspend: Will resume next to 03ff
D/MPL-storeload( 141): 00(00) 01(00) 02(00) 03(24)
D/MPL-storeload( 141): 04(00) 05(05) 06(ce) 07(1a)
D/MPL-storeload( 141): 08(00) 09(00) 10(7c) 11(ff)
D/MPL-storeload( 141): 12(00) 13(00) 14(ab) 15(df)
D/MPL-storeload( 141): 16(ff) 17(ff) 18(15) 19(a1)
D/MPL-storeload( 141): 20(ff) 21(ff) 22(f9) 23(68)
D/MPL-storeload( 141): 24(ff) 25(ff) 26(f6) 27(ec)
D/MPL-storeload( 141): 28(ff) 29(ff) 30(f4) 31(28)
D/MPL-storeload( 141): 32(b5) 33(42) 34(79) 35(df)
V/Sensors ( 141): MPLSensor::getFd returning 34
V/Sensors ( 141): MPLSensor::getAccelFd returning 35
V/Sensors ( 141): MPLSensor::getTimerFd returning 36
...
The primary symptom is a g-sensor/accelerometer hang which prevents automatic screen rotation/orientation. This is accompanied by MLUpdateData error (code 26) messages in logs. If you are here for that, scroll down to the section titled: "MOTION SENSOR INITIALIZATION PROBLEM." If not, the following section may help you resolve a number of app issues affecting ICS.
#########################
GENERAL APP AND SYSTEM ISSUES
You may have arrived here with other problems (because of the somewhat ambiguous title), and may not have observed the auto rotate problem. There may be something here for you also, and I've moved that to the top of this post, so please read on. The sensor problem and associated tips are still in the lower portion of this post.
What follows are more general tips to help alleviate numerous problems that people are seeing.
There have been numerous complaints relative to ICS on that a500 on various forums about problematic system behavior -- app crashes, wifi problems, display flashes, slow response, and general instability. After using ICS on the a500 for over two weeks now, seeing solutions to numerous problems posted, and based on considerable testing I've done, I'm convinced that most problems seen with ICS are caused by apps that are not entirely compatible with ICS on the a500. I've also noticed that app fixes for ICS are still coming in, and that many similar issues have occurred with other devices upon migration to ICS. This is to be expected considering that there are thousands of apps available, and these are written by thousands of developers. The following tips may be useful in helping you solve your particular problems. If your problem is not caused by some app that you have installed, you are likely in a very small minority of users.
Many users are having success in working around various problems by simply removing unused apps. I've noticed that many are accomplishing this by using the factory data reset option, which clears out all apps. They then merely reload fewer apps, and reduce the risk of running problematic ones. Fewer apps installed appears to correlate with higher stability.
Use of this tip may significantly reduce the number of problems people are encountering with their A500, A200, and possibly A100 tablets.
To avoid sending your tablet into Acer for a factory data reset (something you can do at home anyway), try the following:
* remove any apps that are force closing or otherwise crashing
* remove apps that you don't use. Having fewer apps installed reduces the risk of having problems.
* avoid parking Dolphin or the stock browser in the background with open tabs. Close tabs and exit the browser when you are done. If you often "temporarily" park your browsers in the background as I do, and this seems like a very typical/normal user behavior, consider installing Watchdog to see when browsers start to consume significant CPU resource in the background. If you monitor for this, you can deal with it. If you ignore it, you may not understand what is happening when other symptoms occur -- and several that I have seen have been severe.
* don't kill apps
* remove app managers, task killers, performance improver apps, anything that kills apps (if you still want to watch your system resources, use OS Monitor or Watchdog, but don't use the app/process kill functions, use the reset button if something is hung).
* use the hardware reset button (or at least lock screen rotation via the switch) if your system slows, wifi stops working well, screen rotation hangs, etc.
#########################
CONTROLLED FACTORY DATA RESET
If the solutions noted above don't work, your best bet is a controlled factory data reset. This appears to have helped many after the ICS update, myself included. By "controlled," I mean you should follow the instructions below to methodically determine which apps have been causing problems on the system.
If you have backed up your important data, then there is nothing to lose by doing the factory data reset. If you have not backed up important data, it is very likely that you are going to lose those anyway, and when you least expect it, or when you can least tolerate it ...so simply plug in a USB flash stick, and copy your valuable data from the internal "sdcard" to the stick. Use ES File Manager or a similarly reliable app. You can alternately/also backup easily to a PC using the mini USB adapter cable that came with your tablet (you may have to install the a500 USB driver from the Acer site). With ES File Manager, you can even back up most of your installed app APK files for future reference or use, in which case, you can put those on your backup also.
If you already have good backups of your important data, then it takes less time to do the factory reset than to ask or even think about it. It will: remove everything from the built-in "sdcard" flash memory, remove every app, configure all settings to defaults, etc. It restores your device to the system that Acer apparently used to test the ICS release. It will not restore to an older version of Android than you are currently running, so if you are running ICS, you get a fresh factory image of ICS. It's like getting a brand new tablet.
Here's how you do the factory data reset (after you have backed up your data on your PC or an other form of external storage):
1.) Go to Settings->Backup & Reset->Factory Data Reset. Follow the prompts to accept the reset.
2.) When the factory data reset completes in a few seconds, and the system boots up, set up your wifi
3.) When you are prompted to login to your google account, do not turn on the Google automatic app/data restore feature. Decline that option when asked. That setting is used to restore apps automatically and if left on, may restore the problem(s) you were having. If you miss the prompt, immediately go into settings/backups & reset and uncheck Automatic Restore. You must do this before starting Google Plat, and before Google Play starts to restore apps and app data, so it does not simply reinstall the problem(s) you were having. (If you miss this step, start over and repeat the factory data reset.)
4.) After the tablet setup is complete, use Google Play to update the built in apps only. Do not install any apps until you have tested your tablet with the built-in browser, email, etc.
5.) For at least 24 hours, test with only the built in apps, or if you feel things are going very well, and are willing to tolerate more risk (of having to start over) proceed slowly with adding apps.
6.) If you determine that the tablet works OK now without all of your other apps installed, then you need to methodically eliminate the bad app or apps that were causing problems.
If you do the factory reset, and then just reload all of the same apps again, then you can expect the problems to return. That is likely why some report that the factory data reset does not work for them -- i.e., because they just reloaded all of the same apps which caused the same problems.
After factory data reset:
* Be very selective in choosing apps to install, especially while testing ICS with your tablet.
* Screen apps by reading app reviews for your tablet (in GooglePlay reviews, select newest instead of most helpful, also select for this tablet only)
* Install apps slowly and methodically, at a rate of no more than 1-2 per day if possible. Keep track of the order in which you install apps.
* Test each app carefully. When you install a new app, verify that other problems are not starting to occur. When problems do occur start removing apps in the opposite order in which you loaded them, to isolate bad apps. Keeping track of the order of installation facilitates this process.
#######################################################
MOTION SENSOR INITIALIZATION PROBLEM
The MPU initialization does fail as a result of a race condition as I suspected, but the race was not nearly as close as I thought.
I have been able to reproduce the InvenSense MPU-3050 initialization failure at will, and can also _prevent_ it now over 95% of the time. The problem appears to be the result of the MPU-3050 not shutting down entirely until a significant period of time has passed after an a500 power down. This effect can often be seen by powering down the tablet, and then immediately powering it back up, where all MPU-3050 sensors are then unavailable, and associated features like automatic screen rotation do not function. The condition persists until manually cleared by the user as described below.
I've observed that there are two ways to clear the MPU initialization failure condition, and one way that usually prevents it, but as I write in a followup post is not quite 100% effective:
** To clear the condition in less than 30 seconds, just press the hardware reset button (pinhole). The hardware reset appears to shorten the associated MPU-3050 shutdown period, possibly by shorting down residual voltage that may be delaying restart. It's hard to determine the precise cause without having more detailed specs on a500 internals, but this seems to be a reasonable theory.
** An alternate way to clear the condition is to power off the a500, and wait at least 5 minutes before powering back up. This may allow residual voltage on the MPU to drain prior to restart, and thus permit normal initialization of sensors at power up. Again, a theory, but a reasonable one based on past experience with other systems.
** To reduce the chances of encountering the problem, do not power the a500 back on until at least 5 minutes after power down. I would not be surprised to learn that some a500s take less time, and others take more. It appears that many a500s may rarely if ever exhibit the problem. I actually saw some good restarts at power cycle intervals closer to 1 minute. I just got to a point where I thought I was splitting hairs, became bored with the repeated testing, and settled on 5 minutes.
The method I suggest for prevention -- i.e., not using short power up/down cycles -- is probably the natural behavior for most users, and one reason why many report never seeing the problem. I can't rule out that there may be subtle differences in hardware between a500 owners either, because I've only tested this so far on my own tablet, so some users may not be able to reproduce the problem at all.
Apparently then, a500 owners like me who have been seeing this problem more regularly, have possibly been testing for this or other problems, and actually increasing the frequency by performing that specific test -- i.e., the short power up/down cycle. I first saw this sensor problem while repeatedly powering up/down to diagnose problems that I was seeing with certain apps after the ICS update. Others who have detected this problem are possibly behaving similarly while working on other tasks where they perform short power down/up cycles.
It seems possible that the root XDA build that cryptonym tried merely had some other problem with MPU initialization, and that the cause for his error code 26 issue with that ROM installed may have a different origin. Maybe, maybe not. It could be that it is the same problem, and the boot is just that much faster regardless of whether the reset or power button is used.
Android ICS did come with some code changes relative to the MPU though -- specifically in the use of the gyro to reduce latency and smooth output for the gravity sensor, the linear acceleration sensor, and the rotation vector sensor. This may or may not have anything to do with the problem, but seems worth mentioning.
I can now prevent the problem more effectively, but it is clearly a bug in the a500 OS, and one that appears to have been delivered with ICS.
################################################
Below is a continuation of the original post on the motion sensor (MPU) error:
(I am a little concerned about not separating this entire post into two posts, because this talks about two issues -- i.e., more general app management practices, and this specific sensor error condition. I'm leaving it as one though because I see it is being referenced more lately, and readers may be expecting to see one or both issues under the current title.)
An obvious early symptom is the loss of automatic screen orientation (auto rotate). Power off/on will not always clear this. Locking the screen orientation by sliding the lock switch to the right will pause the errors.
What happens: Power up boots of the a500 in this version of ICS intermittently fail to initialize the MPU 3050 sensor device, and the log then shows a constant stream of MLUpdateData error (code 26) messages. The "aLogcat" app from the Market is handy for seeing errors like this. There may be an impact to system resources while the errors are occurring, but I have not determined how significant the direct impact is. The associated sensor errors are posted to the log every 50ms... that's 20 times each second. Again, sliding the auto rotate switch to the locked position apparently suspends the sensor error condition, and reduces some symptoms as long as the switch stays locked. Unlocking causes the rapidly repeating MLUpdateData errors to immediately resume.
If I never power the unit off after a hardware reset (pressing the pinhole button, not the "factory data reset"), I never see the problem occur. One workaround then is to avoid powering the unit down, and then when you occasionally do, use the reset button after power up if symptoms appear.
The condition only starts immediately after a power off /on cycle. I observed that with a clean factory data restore, and no other apps installed, I could reproduce the problem more often by powering down immediately within 2-3 seconds after powering up, proving that this can be triggered without installing any applications beyond those provided in the OS package by Acer.
Beyond the loss of automatic screen rotation, symptoms of the g-sensor error problem can be relatively mild, and at times, unnoticeable. I suspect that many users are generally satisfied with the performance of their tablet with this error occurring because they may not notice it.
#####################
#####################
Below is an example of the MPU sensor error problem from logs on my a500. I've included part of the boot log output from a failed MPU init sequence, followed by log entries showing the E/Sensor MLUpdateData errors, and then finally a clean boot after a hardware reset with no MPU sensor errors.
At power up, this problem always shows up in the system log with this error: E/Sensors ( 141): could not open the mpu irq device node
The kernel log shows the actual start of the problem, where the mpu3050 does not respond to the probe.
The MPU fails to initialize. This only appears to happen at power up, and not a during a hardware reset as otherwise initiated by the pinhole button.
You can then see the MLUpdateData errors repeating every 50ms (20 times a second).
When I flip the screen rotation lock switch to locked, another error is printed for MPL-mlstates.
Flipping the switch to locked also "pauses" the errors, so this may be a handy temporary remedy if you are not ready to reset the device. Flipping it back to unlock allows the errors to continue, and the symptoms return.
This appears then to be a problem with code using the InvenSense MPL (Motion Processing Library) driver/software in this version of ICS for the A500. It may be a timing problem, or some other problem with the initialization methods used in the code. Power off/on does not typically clear this, and as I have now concluded after more exhaustive testing, appears to be the final trigger for the problem.
You can typically clear this condition temporarily after it has been triggered by pressing the hardware reset button (pinhole, lower right below the USB port). You can pause the errors and the associated performance impacts by setting the screen orientation lock switch to locked position. After a hardware reset, the condition then stays clear until the device is powered down and then back up.
There may be some intermediate stimulus involving timing of actions by the user, because the device occasionally powers up without causing the problem. What I have found though is that after apps have been installed, the power off/on action tends to cause the problem about 50% of the time.
############################################
############################################
POWER ON BOOT EXAMPLE WHERE MPU FAILS TO INITIALIZE:
In the kernel log excerpt below, look at time 2.609914. The i2c_readl() call by i2c-tegra.c|tegra_i2c_isr() returns 0x8 (I2C_INT_NO_ACK) while attempting to read status from the mpu3050, and so mpu3050_probe fails because the mpu3050 is apparently just not ready to respond when this happens.
KERNEL LOG EXCERPT:
...
<6>[ 2.608737] compass sensor is AKM8975 0x48
<6>[ 2.608899] i2c i2c-0: mpu3050: +kxtf9
<6>[ 2.608989] i2c i2c-0: Installing Accel irq using 343
<6>[ 2.609272] i2c i2c-0: mpu3050: +ak8975
<6>[ 2.609434] i2c i2c-0: Installing Compass irq using 301
<4>[ 2.609706] i2c i2c-0: mpu3050: No Pressure Present
<4>[ 2.609914] tegra-i2c tegra-i2c.0: I2c error status 0x00000008
<4>[ 2.610004] tegra-i2c tegra-i2c.0: no acknowledge from address 0x68
<4>[ 2.610163] tegra-i2c tegra-i2c.0: Packet status 0x00010009
<3>[ 2.611283] mldl_cfg:/home/pandora/pandora_build_root/main_rom/android/PicassoV041_A500_mdrr/kernel/drivers/misc/mpu3050/inv_330/mldl_cfg.c|MLDLPowerMgmtMPU|579 returning 135
<3>[ 2.611520] mldl_cfg:/home/pandora/pandora_build_root/main_rom/android/PicassoV041_A500_mdrr/kernel/drivers/misc/mpu3050/inv_330/mldl_cfg.c|mpu3050_open|1225 returning 135
<3>[ 2.611684] i2c i2c-0: Unable to open mpu3050 135
<6>[ 2.611770] misc compassirq: Unregistering compassirq
<6>[ 2.612052] misc accelirq: Unregistering accelirq
<3>[ 2.612250] i2c i2c-0: mpu3050_probe failed -19
<4>[ 2.612489] i2c-core: driver [mpu3050] using legacy suspend method
<4>[ 2.612577] i2c-core: driver [mpu3050] using legacy resume method
<7>[ 2.612741] mpu_init
...
SYSTEM LOG EXCERPT:
...
05-04 12:03:49.330 82 82 I dalvikvm: System server process 145 has been created
05-04 12:03:49.330 82 82 I Zygote : Accepting command socket connections
05-04 12:03:49.490 145 145 E BatteryService: usbOnlinePath not found
05-04 12:03:49.510 145 145 I sysproc : Entered system_init()
05-04 12:03:49.510 145 145 I sysproc : ServiceManager: 0x12f4788
05-04 12:03:49.510 145 145 D SensorService: nuSensorService starting...
05-04 12:03:49.590 145 145 V Sensors : sysapi object at 0x5afd6a1c
05-04 12:03:49.590 145 145 V Sensors : sysapi getBiases func at 0x5afd176d
05-04 12:03:49.590 145 145 E Sensors : could not open the mpu irq device node
05-04 12:03:49.590 145 145 E Sensors : could not open the accel irq device node
05-04 12:03:49.590 145 145 I MPL-mlsl: MLSLSerialOpen: /dev/mpu
05-04 12:03:49.590 145 145 I MPL-mlsl: I2C Error: could not bind address 68: -1
05-04 12:03:49.590 145 145 E Sensors : Fatal Error : could not open MPL serial interface
05-04 12:03:49.590 145 145 E MPL-mlstates: Error : illegal state transition from ML_STATE_SERIAL_CLOSED to ML_STATE_DMP_OPENED
05-04 12:03:49.590 145 145 E MPL-dmp : vendor/invensense/Invensense330/libsensors/mlsdk/mllite/mldmp.c|MLDmpOpen|82 returning 25
05-04 12:03:49.590 145 145 E Sensors : Fatal Error : could not open DMP correctly.
05-04 12:03:49.590 145 145 E Sensors : could not open MPL calibration file
05-04 12:03:49.600 145 145 E MPL-mldl: DmpFeatureSupported : sGetAddress is NULL
05-04 12:03:49.610 145 145 W MPL-9_sup: 9 axis sensor fusion not available - No compass detected.
05-04 12:03:49.610 145 145 E Sensors : Error : Bias update function could not be set.
05-04 12:03:49.610 145 145 E Sensors : Error : could not set motion interrupt
05-04 12:03:49.610 145 145 E Sensors : Error : could not set fifo interrupt
05-04 12:03:49.610 145 145 E Sensors : Fatal error: MLSetFIFORate returned 26
05-04 12:03:49.610 145 145 E Sensors : Error : Motion callback could not be set.
05-04 12:03:49.610 145 145 E Sensors : Error : Processed data callback could not be set.
05-04 12:03:49.610 145 145 E Sensors : Fatal error: FIFOSendAccel returned 26
05-04 12:03:49.610 145 145 E Sensors : Fatal error: FIFOSendQuaternion returned 26
05-04 12:03:49.610 145 145 E Sensors : Fatal error: FIFOSendLinearAccel returned 26
05-04 12:03:49.610 145 145 E MPL-fifo: vendor/invensense/Invensense330/libsensors/mlsdk/mllite/mlFIFO.c|FIFOSendGravity|1000 returning 26
05-04 12:03:49.610 145 145 E Sensors : Fatal error: FIFOSendGravity returned 26
05-04 12:03:49.610 145 145 E Sensors : Fatal error: FIFOSendGyro returned 26
05-04 12:03:49.610 145 145 V Sensors : MPLSensor::getFd returning -1
05-04 12:03:49.610 145 145 V Sensors : MPLSensor::getAccelFd returning -1
05-04 12:03:49.610 145 145 V Sensors : MPLSensor::getTimerFd returning 34
############################################
############################################
REPEATING E/SENSOR ERRORS IN LOGS AFTER FAILED MPU INIT
(the sensor does not work at all when this condition is present
and must be reset by pressing the switch in the pinhole)
...
[ 05-04 06:51:48.520 141:0x99 E/Sensors ]
MLUpdateData error (code 26)
[ 05-04 06:51:48.570 141:0x99 E/Sensors ]
MLUpdateData error (code 26)
[ 05-04 06:51:48.620 141:0x99 E/Sensors ]
MLUpdateData error (code 26)
[ 05-04 06:51:48.670 141:0x99 E/Sensors ]
MLUpdateData error (code 26)
[ 05-04 06:51:48.680 1329:0x531 D/TestLog ]
start
[ 05-04 06:51:48.720 141:0x99 E/Sensors ]
MLUpdateData error (code 26)
[ 05-04 06:51:48.780 141:0x99 E/Sensors ]
MLUpdateData error (code 26)
[ 05-04 06:51:48.780 1329:0x533 D/dalvikvm ]
GC_CONCURRENT freed 934K, 12% free 8123K/9159K, paused 2ms+7ms
[ 05-04 06:51:48.810 1329:0x531 D/TestLog ]
end
[ 05-04 06:51:48.830 141:0x99 E/Sensors ]
MLUpdateData error (code 26)
############################################
############################################
REPEATING E/SENSOR ERRORS PAUSE WHILE SCREEN ORIENTATION LOCK
SWITCH IS SLID RIGHT TO THE LOCKED POSITION
(the errors resume when the switch is again unlocked)
...
[ 05-04 06:51:48.860 141:0x98 V/Sensors ]
handle : 14 en: 0 mEnabled:00004000
[ 05-04 06:51:48.860 141:0x98 V/Sensors ]
sensor state change what=14
[ 05-04 06:51:48.860 141:0x98 V/Sensors ]
enabled_sensors: 0 dmp_started: 1
[ 05-04 06:51:48.860 141:0x98 V/Sensors ]
Stopping DMP
[ 05-04 06:51:48.860 141:0x98 E/MPL-mlstates ]
Error : illegal state transition from ML_STATE_SERIAL_CLOSED to ML_STATE_DMP_OPENED
[ 05-04 06:51:48.860 141:0x98 E/MPL-dmp ]
vendor/invensense/Invensense330/libsensors/mlsdk/mllite/mldmp.c|MLDmpStop|161 returning 25
[ 05-04 06:51:48.860 141:0x98 E/Sensors ]
error: unable to stop DMP (retcode = 25)
[ 05-04 06:51:49.260 1329:0x544 D/PersistentEventStore/putEvent ]
Row ID: 319, Event ID: 319
...
############################################
############################################
POWER ON BOOT EXAMPLE IMMEDIATELY AFTER HARDWARE RESET (PINHOLE) WHERE MPU STARTS AND OPERATES NORMALLY:
...
I/dalvikvm( 82): System server process 141 has been created
I/Zygote ( 82): Accepting command socket connections
E/BatteryService( 141): usbOnlinePath not found
I/sysproc ( 141): Entered system_init()
I/sysproc ( 141): ServiceManager: 0x163da10
D/SensorService( 141): nuSensorService starting...
V/Sensors ( 141): sysapi object at 0x59414a1c
V/Sensors ( 141): sysapi getBiases func at 0x5940f76d
I/MPL-mlsl( 141): MLSLSerialOpen: /dev/mpu
I/ ( 141): mpu3050_suspend: suspending sensors to 0000
I/ ( 141): mpu3050_suspend: Will resume next to 03ff
D/MPL-storeload( 141): 00(00) 01(00) 02(00) 03(24)
D/MPL-storeload( 141): 04(00) 05(05) 06(ce) 07(1a)
D/MPL-storeload( 141): 08(00) 09(00) 10(7c) 11(ff)
D/MPL-storeload( 141): 12(00) 13(00) 14(ab) 15(df)
D/MPL-storeload( 141): 16(ff) 17(ff) 18(15) 19(a1)
D/MPL-storeload( 141): 20(ff) 21(ff) 22(f9) 23(68)
D/MPL-storeload( 141): 24(ff) 25(ff) 26(f6) 27(ec)
D/MPL-storeload( 141): 28(ff) 29(ff) 30(f4) 31(28)
D/MPL-storeload( 141): 32(b5) 33(42) 34(79) 35(df)
V/Sensors ( 141): MPLSensor::getFd returning 34
V/Sensors ( 141): MPLSensor::getAccelFd returning 35
V/Sensors ( 141): MPLSensor::getTimerFd returning 36
...