I have my Udoo quad mounted in a box with a motor controller and power supplies for each. I have a main power switch for the power supplies , so the Udoo boots automatically when the power turns on. How can I have the Udoo shutdown cleanly when the power is turned off? For example, if I connect an external battery AND the DC power input, can I configure the OS (Ubuntu 14.04) to shutdown when the DC power goes off? Alternatively, is there a pin header for the Udoo power switch so I can give the Udoo its own switch and simply make sure I turn the Udoo off prior to switching off the power? Any suggestions are much appreciated. Cheers
If you make the SSD 'sync' in fstab, disk i/o seems slower, but there'd be no data losses on a sudden power outage, and perhaps you'd have no need of a proper shutdown.
Well, that is the simplest solution for sure. But is it safe? I'm ok with the performance hit, but this will be installed some place where people are turning it on/off once a day for a couple of months. I don't want it to fail to boot one day...
How safe it is I can't tell, but I've been using this method for my Quad for quite a while, that is, until I connected a timer and used a cron job to schedule a shutdown. Before that I always just removed the power plug, and I never had a situation in which it didn't boot.
Here are 2 older discussions: Use a button to have the udoo shutdown itself and have the users to instruct that they use that button instead of pulling the AC wire out: http://www.udoo.org/forum/threads/hardware-button-for-shutdown.1849/ Alternatively you could also use this solution (use SD read only, write to virtual disk only): http://www.udoo.org/forum/threads/right-way-to-turn-udoo-power-off.1597/
With just unplug power you can't shutdown anything - there is no time. But with some battery back up you could send shutdown signal to udoo which would shutdown regulary. This is something I have in plane for my router with hdd attached.
OK, I think I'm going to use a battery backup and send a shutdown signal to the udoo when AC power is switched off. I want to go the simplest route, which is to connect both an external battery and DC power to udoo. I have another device in the same box which can provide a logic (3v) signal to udoo indicating when AC power is off. Two questions: 1. Is there any issue with connecting an external battery AND dc power at the same time? Will udoo use the dc power and "ignore" the battery? 2. Can anyone recommend a decent battery for the udoo? It will only have to power the udoo for a few seconds every day, but I want it to stay charged for several months. Cheers
Any 12V traction (not start) battery will do. I beleive I somewhere put a link here on the forum to a powersupply that acted as an ups so could power the Udoo and charged a 12V battery. I will try to find it. Edit: Found it http://www.udoo.org/forum/index.php?threads/3060/
Can't you connect the DC with a (couple of) resistor(s) to a UDOO pin? As soon as the signal goes away you'll know to shutdown. Reduces the need for the other device to detect and signal the AC power being shutdown.