5

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:

  1. 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...)
  2. 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.
  3. Ctrl-Alt-F1 prompts the login screen, but I am back to the previous situation after entering my credentials.
  4. 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"
  5. Using shutdown -c does not seem to work on this "sleep operation in progress"
  6. 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".
  7. 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 :)

  • Hi, could you provide some additional information? First, did you set up a swap partition? If so, how large is it? I think for suspend to disk to work your swap must be active and at least as large as the amount of ram that you have. Run the command swapon and paste the output. Some of the other errata you're seeing seem to indicate you might have a bad ACPI config. Unfortunately, those are closed source and vendor locked :( – guyfleeman May 22 '18 at 20:15
  • Hi, yes I do have a swap, here is the output of swapon : NAME TYPE SIZE USED PRIO /dev/sda5 partition 6,5G 0B -2 – Philippe Cotte May 23 '18 at 8:28
  • Are you trying to suspend to RAM or to disk? If it's to disk you need more swap space. – guyfleeman May 23 '18 at 18:56
  • I have the same issue I believe, compared to Ubuntu 17.10 the new version is very unstable. I'm thinking of installing 17.10 again. – szx Jun 18 '18 at 14:05
  • @guyfleeman Your tip seems to have helped OP to solve the problem. Consider posting an answer. – Melebius Jan 8 at 9:35
0

After formatting and setting a bigger swap, the problem is solved. I used the same size as my RAM, 16G.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.