Is eMMC safe on instant power off?

If the power is cut off while VIM/Edge is working on eMMC, will it be safe? OS would be Linux not Android.
(I’m considering read-only mode for emmc, though saving unimportant temporal data into sdcard)

I would assume, like any storage type, if a file is open or being written to, problems could result in those files. However, I have multiple times hard shut down by removing power, have seen no adverse effects on Android. Though I do recall having Linux run from SD card, hard shut down then caused some Linux booting issues. Probably depends on what is going on when power is lost.
Doesn’t Linux do a disc check on boot? I think it has some ability to overcome corrupt system files. I am no Linux expert.
Probably best to avoid it when possible.

1 Like

@Sean_Yi as long as the system isn’t writing anything to the disk, you shouldn’t have a problem afak,
i’ve had multiple occasions where I accidentally hit the reset button when the system was running a program(not interacting with disk), and I haven’t faced any sort of corruptions,

suggested tip would to also remove swap usage, but ensuring a proper shutdown in the middle of an operation is much better.

I’d take some notes from this excellent video from Andrew :slightly_smiling_face:

1 Like

Thanks for your reply.
I’ve found some supercapacitor/UPS Hat for RPIs. I don’t know whether it will be suitable for Khadas things. But I think it might be the solution of my issue.

What I plan was to make digital cluster for Tesla model 3. The main issue was how can I turn off the cluster safely when the car power is off.

A user here made a truck dashboard and was faced with the turn off issue. Maybe something they did will offer a solution.

1 Like

Interesting topic. I read the whole thread in a breath.
Anyway, I’m not good at Electricity, (rather I know some programming but.) So I cannot dare try his method. :smiley:
And Tesla Model 3 already has a big enough centre dashboard that the driver needs. Only a small speedometer and battery gauge over the handle for a glance, that’s all I wish. It’s enough to me.

Today morning, an idea came to me suddenly.
I will connect my VIM to some stable Powerbank. The power bank will be charged by car during its usage. And here is a magical trick. The VIM will be connected to the hotspot wlan of a car. When the car is powered off, the WLAN will be disconnected, and I can program its detection and shutdown the VIM.
This approach cannot turn on VIM on the ignition, but I don’t care.

How brilliant I am!!



yes , you are very brilliant :slight_smile: :yum:

Use your phone as the hotspot, when you leave area of the car, VIM shuts down, assuming you can program it for such. Though you may have to get fairly far away from the car.:grinning_face_with_smiling_eyes:

I linked the truck dashboard only to highlight the on/off method they used. If your car has an always on circuit and a key-on circuit, should be doable. Switches are sold that need only power(+/-) and the Key-off, Key-on sensing leads.

Vim3 has gpio pins. You can trigger the shutdown through it.

And by the way, the use case you mentioned has very less probability to corrupt the OS. Even if it does, it will be a software damage which is easily recoverable. No physical damage to emmc

Another option is to buy 2 or 3 cheap sdcards and preload all of them with your OS with same apps and settings.

Flash mainline uboot so vim3 always boots from sdcard

In worst Case, you can just swap the faulty sdcard and keep everything healthy. There is not a major performance hit, usually it is mostly impacted on boot time for 4 or 5 additional seconds otherwise sdcard boot is very fast as well.

This way you never have to worry about getting emmc damaged and you will also know in few weeks whether sdcard os gets corrupted or not hence you can make up your mind regarding doing the same with emmc.