My problem is similar to this one: Ubuntu 18.04, my PC doesn't enter sleep mode. I will try to provide a bit more details.
When I try to suspend the computer (by closing the lid, pushing the power button or using keyboard shortcut), it has a good chance of not working. Sometimes it works fine, but it is maybe one time out of ten. Here is what happens when it does not work:
- First, the displays turn off. My screen is black, but the computer does not enter sleep mode (the fans are turning, the LEDs are on...)
- When I move the mouse or press a key, the screens turns on again. I can see the battery icon and the "application" icon (top right and top left of screen), but can not see the task bar. My wallpaper is also missing, replaced by only purple. Cursor moves but clicks have no effects.
- Ctrl-Alt-F1 prompts the login screen, but I am back to the previous situation after entering my credentials.
- I could enter a terminal session (ctrl-alt-F3 for instance) and log in. I then tried to use the "shutdown" or "reboot" commands, but both output the message "Failed to power off/reboot system via logind: there's already a shutdown or sleep operation in progress"
- Using shutdown -c does not seem to work on this "sleep operation in progress"
- When I try "sudo shutdown -f", the terminal freezes (does not ask for password) and I have to maintain power button to shut down. It actually does it even if I only type "sudo".
- If I try "startx", the screen turns black for 30 seconds more or less then comes back to the terminal session.
Eventually the only way I have to reboot is to maintain power button to force shutdown.
My configuration : MSI GS60 with Ubuntu 18.04 64bit, Intel® Core™ i7-4720HQ CPU @ 2.60GHz × 8, Intel® Haswell Mobile (graphic chipset). I also have a Nvidia 970M, but I deactivated it (I only use it on windows). I have a dual boot with windows 10. edit: 16G RAM
Thanks in advance for any solution one could provide :)