Laptop selectively will/will not wake up from suspend on Ubuntu 18.04.3

My laptop is an Acer predator.

When it goes to sleep mode, sometimes it does not wake up from sleep. By that, I mean the keyboard backlight comes on and the laptop's power light goes on as well and it looks like the laptop wakes up from sleep. But only screen is black so I can't see anything then I will be forced to hold down the power button for 5 secs..

It happens 1 out of 4 times when laptop goes to sleep. Could someone please help?

here is my var/log file i don't really understand were us the error, maybe someone could do please?... log file


Solution 1:

February 18, 2020 update

Log file has been posted and when system suspends at 17:00 the next action is reboot at 20:00 (rather than resume):

Feb 17 16:25:30 neon-Predator-PH315-51 systemd-sleep[1430]: Suspending system...
Feb 17 16:25:30 neon-Predator-PH315-51 kernel: [32444.683507] PM: suspend entry (deep)
Feb 17 20:09:33 neon-Predator-PH315-51 systemd-modules-load[527]: Inserted module 'lp'
Feb 17 20:09:33 neon-Predator-PH315-51 kernel: [    0.000000] microcode: microcode updated early to revision 0xca, date = 2019-10-03
Feb 17 20:09:33 neon-Predator-PH315-51 kernel: [    0.000000] Linux version 5.3.0-7625-generic (buildd@lgw01-amd64-052) (gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)) #27~1576774585~18.04~c7868f8-Ubuntu SMP Thu Dec 19 20:37:47 UTC  (Ubuntu 5.3.0-7625.27~1576774585~18.04~c7868f8-generic 5.3.13)
Feb 17 20:09:33 neon-Predator-PH315-51 kernel: [    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.3.0-7625-generic root=UUID=7db19782-809c-409f-9ac5-e76d1cf84345 ro quiet splash nouveau.runpm=0 vt.handoff=1

This is similar to:

  • Laptop reboots instead of resuming from systemd suspend when on battery power (suspending on AC power works)
  • Dell XPS 15 (9550) rebooting after suspend

You need to find the error message(s) that are occurring during resume from suspend. Once you know the error then you can fix it.

When your resume breaks and you restart your system open the terminal and type gedit /var/log/syslog. Then scroll to the section where the system suspended and resumed. For example, my system suspended at 5:52 am before going to work and resumed at 16:56 (4:56 pm) when returning home:

Jan 27 05:52:11 alien kernel: [1305328.821795] PM: suspend entry (deep)
Jan 27 05:52:11 alien kernel: [1305328.821797] PM: Syncing filesystems ... done.
Jan 27 05:52:13 alien acpid: client 1428[0:0] has disconnected
Jan 27 16:56:19 alien kernel: [1305331.145883] Freezing user space processes ... (elapsed 0.003 seconds) done.
Jan 27 16:56:19 alien kernel: [1305331.148954] OOM killer disabled.
Jan 27 16:56:19 alien kernel: [1305331.148955] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.

Look through your own log file using this example until you find an error message and perform a google search on the error.

Use this same technique for all problems you encounter, not just suspend / resume errors.

Solution 2:

There are couple things you could do.

If the only thing, that is missing is graphical interface you can open virtual console, login and start it from there:

Ctrl+Alt+F1 - will open first virtual console. Your GUI usually lives either in F1 or F7, but you can choose any of virtual desktops from F1 to F7

Once you open virtual console, you will see a full-screen terminal and you will be able to login. Once you have, you can start GUI by typing: startx

Caution: Do not try sudo startx - you will end up with more problems, than you have started with :)

If that helped and you now see your favorite desktop environment - good. If not - you need to keep looking on what is causing your problem and since this seems to be a phantom bug - it's not going to be trivial

Updating kernel

If you are not afraid of messing with your system - keep reading. Often, when I buy a new hardware and it doesn't work as expected, the first thing I try before long and tedious investigation, is upgrading kernel to its latest version. It's not hard and it's likely, that newer kernel will have better support for newer hardware. This is especially true for laptops

In order to do that, go to: https://kernel.ubuntu.com/~kernel-ppa/mainline/ and download latest and greatest kernel. You will find it in the bottom of the page. Today it is v5.5, whcih includes number of tweaks to power management and graphics. Avoid using those with rc in the name, like v5.5-rc7 - this one still goes through testing.

Once you have located the latest kernel, check, that you are not already running one, by running uname -sr. This will show you the kernel you are running

If you are not running the latest version already - you may proceed with upgrading. Follow the link with the latest version. You will see the page with bunch of links to deb files. In 99% of the cases, you will need files from Build for amd64 succeeded section. These are the files you need to download (highlighted with red rectangles):

enter image description here

You can download them from your browser, save them in a new folder, navigate to that folder from command line and upgrade it from there. You could also run similar commands:

mkdir -p ~/Downloads/kernel
cd ~/Downloads/kernel
rm -rf ~/Downloads/kernel/*
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.5/linux-headers-5.5.0-050500_5.5.0-050500.202001262030_all.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.5/linux-headers-5.5.0-050500-generic_5.5.0-050500.202001262030_amd64.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.5/linux-image-unsigned-5.5.0-050500-generic_5.5.0-050500.202001262030_amd64.deb
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.5/linux-modules-5.5.0-050500-generic_5.5.0-050500.202001262030_amd64.deb

Now, all you need to do to install a new kernel is run:

sudo dpkg -i *.deb

Now you can reboot your machine and hopefully enjoy new kernel

Update kernel from GUI

If you want to update kernel, but you don't want to do it from command line for whatever reason, you could install and run UKUU (Ubuntu Kernel Upgrade Utility):

sudo add-apt-repository ppa:teejee2008/ppa
sudo apt-get update
sudo apt-get install ukuu
sudo ukuu-gtk

Then you can upgrade the kernel from simple graphical user interface

If, for whatever reason, the kernel doesn't work for you - you can always restart your machine and change the kernel from grub menu. So, only delete old kernel, once you have confirmed, the new one works for you

I hope this guide helps