Shutdown Timing When Computer “Ignition” Goes Low
up vote
0
down vote
favorite
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.
power-management shutdown
add a comment |
up vote
0
down vote
favorite
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.
power-management shutdown
I don't have an Ubuntu to check, but you might find something to configure in/etc/systemd/logind.conf
which is part of systemd. Seeman logind.conf
and try settingPowerKeyIgnoreInhibited=yes
for case 1.
– meuh
Nov 13 at 17:18
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
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.
power-management shutdown
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.
power-management shutdown
power-management shutdown
asked Nov 8 at 20:45
Bret Wallach
112
112
I don't have an Ubuntu to check, but you might find something to configure in/etc/systemd/logind.conf
which is part of systemd. Seeman logind.conf
and try settingPowerKeyIgnoreInhibited=yes
for case 1.
– meuh
Nov 13 at 17:18
add a comment |
I don't have an Ubuntu to check, but you might find something to configure in/etc/systemd/logind.conf
which is part of systemd. Seeman logind.conf
and try settingPowerKeyIgnoreInhibited=yes
for case 1.
– meuh
Nov 13 at 17:18
I don't have an Ubuntu to check, but you might find something to configure in
/etc/systemd/logind.conf
which is part of systemd. See man logind.conf
and try setting PowerKeyIgnoreInhibited=yes
for case 1.– meuh
Nov 13 at 17:18
I don't have an Ubuntu to check, but you might find something to configure in
/etc/systemd/logind.conf
which is part of systemd. See man logind.conf
and try setting PowerKeyIgnoreInhibited=yes
for case 1.– meuh
Nov 13 at 17:18
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
The following ended up working.
I created the file /etc/acpi/events/PBTN with the following contents:
event=button/power PBTN 00000080 00000000
action=/etc/acpi/actions/power-button.sh %e
I created the file /etc/acpi/actions/power-button.sh (with execute permission) with the following contents:
halt -p
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
The following ended up working.
I created the file /etc/acpi/events/PBTN with the following contents:
event=button/power PBTN 00000080 00000000
action=/etc/acpi/actions/power-button.sh %e
I created the file /etc/acpi/actions/power-button.sh (with execute permission) with the following contents:
halt -p
add a comment |
up vote
1
down vote
The following ended up working.
I created the file /etc/acpi/events/PBTN with the following contents:
event=button/power PBTN 00000080 00000000
action=/etc/acpi/actions/power-button.sh %e
I created the file /etc/acpi/actions/power-button.sh (with execute permission) with the following contents:
halt -p
add a comment |
up vote
1
down vote
up vote
1
down vote
The following ended up working.
I created the file /etc/acpi/events/PBTN with the following contents:
event=button/power PBTN 00000080 00000000
action=/etc/acpi/actions/power-button.sh %e
I created the file /etc/acpi/actions/power-button.sh (with execute permission) with the following contents:
halt -p
The following ended up working.
I created the file /etc/acpi/events/PBTN with the following contents:
event=button/power PBTN 00000080 00000000
action=/etc/acpi/actions/power-button.sh %e
I created the file /etc/acpi/actions/power-button.sh (with execute permission) with the following contents:
halt -p
answered Nov 19 at 22:57
Bret Wallach
112
112
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1091244%2fshutdown-timing-when-computer-ignition-goes-low%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I don't have an Ubuntu to check, but you might find something to configure in
/etc/systemd/logind.conf
which is part of systemd. Seeman logind.conf
and try settingPowerKeyIgnoreInhibited=yes
for case 1.– meuh
Nov 13 at 17:18