I have 20.04.3 upgraded from 20.04.1 and problem still exists:
When i click “power off” > “power off” > and confirm, after pressing the button the shutdown procedure don’t start - i can wait and nothing. Next i click again power off and confirm and later it works and shutdown correctly.
The problem does not occur often, rather 2-3 times (out of 7) a week.
A strange issue you got there. I assume a shutdown -h now from the console would work every time, right? If so, the problem should be somewhere in the GUI layer. Does the console way work?
I searched around a bit about the error messages you got, and it seems those aren’t relevant to the issue at hand.
Do you use the default Gnome desktop, or something else? Did you do any changes to the desktop environment? I’m thinking of advanced settings, not new background or shortcuts.
I would look around in the logs related to Gnome with timestamp that matches the time when you try and not able to turn off the machine with the GUI. You should find a hidden file named .xsession-errors in your home directory, and you could also look into the gdm related logs under /var/log, and check the journal.
This message suggests the system goes to normal shutdown. Did you turn off your machine from the terminal, or the GUI power off was working in this case?
I can’t be sure, but maybe your PCI Express (PCIe) device can’t handle power management requests, yet the kernel is by default configured to enable PCIe power management support, hence the conflict between what the kernel “wants” and what the PCIe device can actually provide or do.
You may want to edit the GRUB default settings file with a text editor such as e.g. Nano:
sudo nano /etc/default/grub
…or Mousepad:
sudo mousepad /etc/default/grub
…or GNOME Edit:
sudo gedit /etc/default/grub
…or any other simple text editor available, and then add pcie_aspm=off as a parameter for GRUB_CMDLINE_LINUX_DEFAULT so GRUB “tells” the kernel that it must disable support for PCIe Architecture Power Management. For instance, replace:
…and then save the file and exit the text editor. Next, update GRUB:
sudo update-grub
Reboot the computer and then observe your system for a while, check if the kernel keeps reporting those error messages into the system logs and how the power off menu item behaves.
Also check if with a different DE (Desktop Environment) the power off call works: maybe this issue is DE-specific. A lightweight one is Xfce (I use XUbuntu and actually prefer it). If you decide to add the Xfce DE, the installation command is:
sudo apt install xubuntu-desktop -y
Then reboot and select Xfce before your next login.