I'm running ubuntu 18.04.1 LTS on an embedded "automotive" computer that's powered with 12VDC (no AC!). It has 3 power inputs: Power (12V), Ground and something labeled "ignition." When "ignition" goes low, I need the computer to immediately (within 10 seconds) start its shutdown because the 12V will go away shortly (after 30 seconds or so). I assume "ignition" is like a soft power button or maybe laptop closed or something similar.
I used to run Fedora Core 20 and the computer DID automagically shutdown when ignition went low exactly like I needed it to.
With ubuntu 18.04.01, this generally doesn't work in that the shutdown process doesn't happen either at all or at least not until the 12V goes away and the computer shuts off ungracefully without getting to shutdown first.
There are 3 cases with ubuntu 18.04.1 on my computer: 1. Monitor attached, logged in: a dialog with the message "The system will power off automatically in 60 seconds" pops up and starts counting down the 60 seconds. Unfortunately, there's only power for about 30, so it powers off ungracefully without shutting down. 2. Monitor attached, not logged in: computer starts shutdown and shuts down after a few seconds as desired when ignition goes low. 3. Monitor not attached: shutdown doesn't happen (prior to 12VDC going away).
I specifically need to get it to work for case (3.) (Monitor not attached) since there can't be a monitor in the actual embedded application.
Because it works for case (2.), it must be possible but I have no idea what config files to look at or what to change.