How to Fix Ubuntu Freezing or Hanging on Shutdown or Reboot

Clicking Power Off or issuing a restart command in Ubuntu should cleanly terminate active applications, unmount local storage partitions, and signal the hardware motherboard to cut power. However, encountering a condition where Ubuntu hangs indefinitely with a static manufacturer logo, a blinking cursor, or an alert reading “A stop job is running for…” forces users to hold down physical power buttons. Shutdown hangs occur when background user daemons refuse SIGTERM signals, proprietary GPU drivers fail power-state unloads, or ACPI power management tables clash with Linux kernel microcode. Resolving this issue involves reducing systemd timeout limits, modifying GRUB boot flags, and troubleshooting power-state parameters.

Reduce systemd Stop Job Timeout Limits

By default, systemd allows unresponsive background services and user sessions up to 90 seconds (and sometimes longer) to exit cleanly before sending a forceful SIGKILL signal.

  1. Open a terminal window (press Ctrl + Alt + T).
  2. Open the core systemd configuration file in the nano editor:
    sudo nano /etc/systemd/system.conf
  3. Locate the following timeout settings (they are typically commented out with a #):
    #DefaultTimeoutStopSec=90s
    #DefaultTimeoutAbortSec=90s
  4. Uncomment both lines by removing the hash symbol and change their values from 90s to 10s:
    DefaultTimeoutStopSec=10s
    DefaultTimeoutAbortSec=10s
  5. Repeat this configuration for user services by editing the user manager configuration:
    sudo nano /etc/systemd/user.conf
  6. Uncomment and set DefaultTimeoutStopSec=10s.
  7. Save changes with Ctrl + O and exit with Ctrl + X. Systemd will now terminate stubborn background processes within ten seconds.

Modify GRUB ACPI Kernel Parameters

Advanced Configuration and Power Interface (ACPI) conflicts between modern UEFI firmware and the Linux kernel frequently prevent the power delivery controller from cutting power.

  1. Open the default GRUB configuration file:
    sudo nano /etc/default/grub
  2. Locate the line beginning with GRUB_CMDLINE_LINUX_DEFAULT. By default, it contains:
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
  3. Append the ACPI power-off parameter:
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi=force"
  4. If acpi=force does not resolve the freeze on certain motherboards, try replacing it with reboot=pci or reboot=bios.
  5. Save the file and update the GRUB bootloader:
    sudo update-grub

Identify Hanging Services During Shutdown

Temporarily removing the “splash” boot screen allows you to see live console messages scrolling during shutdown, pinpointing the exact daemon that hangs.

  1. In /etc/default/grub, remove the words quiet splash so the line reads:
    GRUB_CMDLINE_LINUX_DEFAULT=""
  2. Run sudo update-grub.
  3. Trigger a shutdown via terminal: sudo poweroff.
  4. Watch the terminal output. The exact line where the scrolling stops reveals the responsible process (e.g. systemd-udevd, NetworkManager, or a virtual machine service).

Update or Reinstall Proprietary Graphics Drivers

Outdated NVIDIA or AMD proprietary display drivers frequently deadlock when transitioning the GPU into ACPI D3cold power standby states.

  1. Identify your current display driver:
    ubuntu-drivers devices
  2. Ensure the latest stable proprietary driver is installed:
    sudo ubuntu-drivers autoinstall
  3. If using NVIDIA, verify that the power management systemd services are enabled:
    sudo systemctl enable nvidia-suspend.service nvidia-hibernate.service nvidia-resume.service
  4. Reboot the system to commit driver power management hooks.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.