Fixed
Status Update
Comments
gi...@google.com <gi...@google.com> #2
The solution at the moment is to disable the lightdm service which is only needed for Ubuntu desktop.
sudo systemctl disable lightdm
Full explanation below:
As previously mentioned, if lightdm is stopped, a Ubuntu GCE instance shuts down properly, but if lightdm is started, we get a "Power key pressed" entry but nothing more. Receiving this message allow us to conclude that the ACPI shutdown call sent to the instance is successful.
As you know the current nvidia-384 package installs packages for desktop environment, including lightdm, a X display manager. It uses various front-ends to draw login interfaces, also called Greeters
When lightdm is started, a dialog is sent to confirm logout, restart and shutdown actions to the video output, awaiting for a user input.
That explains why nothing happen after seeing the "Power key pressed" message. The system is waiting for a “shutdown or reboot“ confirmation in the desktop environment.
As shown below, lightdm when started is taking over the power-key:
---
# systemctl start lightdm
# systemd-inhibit --list
Who: NetworkManager (UID 0/root, PID 1193/NetworkManager)
What: sleep
Why: NetworkManager needs to turn off networks
Mode: delay
Who: lightdm (UID 113/lightdm, PID 1731/unity-greeter)
What: handle-power-key
Why: Unity Greeter handling keypresses
Mode: block
Who: lightdm (UID 113/lightdm, PID 1786/unity-settings-)
What: sleep
Why: GNOME needs to lock the screen
Mode: delay
3 inhibitors listed
---
And release it when stopped.
---
# systemctl stop lightdm
# systemd-inhibit --list
Who: NetworkManager (UID 0/root, PID 1193/NetworkManager)
What: sleep
Why: NetworkManager needs to turn off networks
Mode: delay
1 inhibitors listed.
---
With that being said, if one doesn't have to deal with the desktop environment at all, then "systemctl disable lightdm.service" will disable lightdm. This will keep the package install but will no longer start. This will prevent the shutdown situation to reoccur.
sudo systemctl disable lightdm
Full explanation below:
As previously mentioned, if lightdm is stopped, a Ubuntu GCE instance shuts down properly, but if lightdm is started, we get a "Power key pressed" entry but nothing more. Receiving this message allow us to conclude that the ACPI shutdown call sent to the instance is successful.
As you know the current nvidia-384 package installs packages for desktop environment, including lightdm, a X display manager. It uses various front-ends to draw login interfaces, also called Greeters
When lightdm is started, a dialog is sent to confirm logout, restart and shutdown actions to the video output, awaiting for a user input.
That explains why nothing happen after seeing the "Power key pressed" message. The system is waiting for a “shutdown or reboot“ confirmation in the desktop environment.
As shown below, lightdm when started is taking over the power-key:
---
# systemctl start lightdm
# systemd-inhibit --list
Who: NetworkManager (UID 0/root, PID 1193/NetworkManager)
What: sleep
Why: NetworkManager needs to turn off networks
Mode: delay
Who: lightdm (UID 113/lightdm, PID 1731/unity-greeter)
What: handle-power-key
Why: Unity Greeter handling keypresses
Mode: block
Who: lightdm (UID 113/lightdm, PID 1786/unity-settings-)
What: sleep
Why: GNOME needs to lock the screen
Mode: delay
3 inhibitors listed
---
And release it when stopped.
---
# systemctl stop lightdm
# systemd-inhibit --list
Who: NetworkManager (UID 0/root, PID 1193/NetworkManager)
What: sleep
Why: NetworkManager needs to turn off networks
Mode: delay
1 inhibitors listed.
---
With that being said, if one doesn't have to deal with the desktop environment at all, then "systemctl disable lightdm.service" will disable lightdm. This will keep the package install but will no longer start. This will prevent the shutdown situation to reoccur.
Description
- Reproduction steps:
Create a Ubuntu 16.04 machine having a shutdown script, add a GPU, install the driver.
Stop and restart the machine and notice that the script has not been run
[1]