Most times the computer will turn off when I click shut down, but randomly it does not turn off. The screen shot is the output as the computer is trying to shut down. Any ideas of why the system randomly doesn’t turn off? How to fix it?
I think I might put a pin in this one until I do a re-install and put it on the hard drive actually in the computer. Maybe the external drive is causing the problem …
OK I ask as I had an issue which was very similar to what your experiencing, eg. Not always turning off or sleeping instead etc.
I found a solution for me and it was by altering the nvidia-sleep.sh file. From memory I had to insert an _exit 0 () at the top. After doing this never had an issue until nvidia did a driver update.
usr/bin/nvidia-sleep.sh needs to still be deactivated by an immediate exit. Add a line just after the bash header line to cause immediate exit 0 (ie success) from the script:
#!/bin/bash exit 0
This is a link I found. Down around half way.
https://askubuntu.com/questions/1345073/suspend-not-working-properly-cannot-wake-up-on-ubuntu-20-04-with-nvidia
Interesting thought