14

My notebook with Intel+Nvidia card can't resume after suspend. I have Kubuntu 17.04 installed with 4.10.0-19 kernel. I'm using Intel GPU (Nvidia driver is not even installed). This issue has been existing with 16.10, too.

When I try to resume after suspend, everything freezes at the half visible login screen. Even keyboard doesn't work (when I press CapsLock or NumLock, LEDs doesn't light up)

Any help with examining the issue is appreciated.

Edit: Suspend log can be found here: https://pastebin.com/Ere0JRwF

Edit: dmesg | less output can be found here: https://pastebin.com/zx3QQYVG

omerfarukdogan
  • 544
  • 2
  • 6
  • 18
  • Hi. Can you open a terminal and run pastebinit /var/log/pm-suspend.log and then edit your question to include the link that generates. – sempaiscuba May 06 '17 at 13:31
  • @sempaiscuba It gives me the error "there is no such file or directory" (although it just happened 1-2 days ago when I accidentally put my computer to sleep) – omerfarukdogan May 06 '17 at 13:41
  • OK, that's no problem. Just run sudo PM_DEBUG=true pm-suspend and that should create the file. Note that this will suspend your computer, so you'll probably see the problem again. The pm-suspend.log log-file should be there when you re-start. – sempaiscuba May 06 '17 at 13:50
  • 1
    The Ubuntu Wiki has a lot of background on debugging KernelSuspend – sempaiscuba May 06 '17 at 13:52
  • Did your machine attempt to resume after suspend on this occasion? – sempaiscuba May 06 '17 at 14:35
  • @sempaiscuba I don't know what you mean but I'll explain what I did. I used the command that you gave and the computer went into sleep. And then I pressed power button and the last frame before suspending was displayed in the screen (it was the terminal window, it should've been the login screen). And I couldn't move cursor or do anyting. – omerfarukdogan May 06 '17 at 15:12
  • I have the same problem with a Thinkpad Yoga 14. It also has NVIDIA and Intel graphics, so basically the same situation. I experience this since one of the latest updates of Ubuntu 16.04 (I think 16.04.2). Also, this is only a problem when on battery mode (for me at least). – verpfeilt May 07 '17 at 12:15
  • @verpfeilt What does battery mode mean? – omerfarukdogan May 07 '17 at 13:59
  • So the Intel GPU will allow you to resume from hibernation but the nVidia GPU will not? Are you able to SSH into your computer by any chance after you have resumed your PC? – Steve May 07 '17 at 14:11
  • @Steve No, nvidia driver is not even installed. I haven't tried SSH but I think it will not work, even the keyboard is not responding with LEDs. – omerfarukdogan May 07 '17 at 14:30
  • @sempaiscuba I'm trying to debug using ubuntu wiki now. Can you tell me what they mean by "perform a pm_trace". – omerfarukdogan May 08 '17 at 10:02
  • @Steve I have tried the steps in this answer: https://askubuntu.com/a/436389/403301. It resumes fine at step 4 but in the step 5 when I press Ctrl+Alt+F7 everything freezes. Does that mean it is a problem with my graphics card? – omerfarukdogan May 08 '17 at 12:46
  • @farukdgn I meant when my laptop is using the battery. I said battery mode because thats how tlp calls this mode when using optimizations. Weirdly, I can't reproduce this error since today. It happened for the last few months, though. I did not change anything except that I followed some instructions to fix my touchscreen (wacom). You don't have one, do you? I don't think it's related, though. I'll come back to you if I have a better understanding of whats going on. – verpfeilt May 08 '17 at 16:33
  • @verpfeilt No, I don't have a touchscreen. Thanks. – omerfarukdogan May 08 '17 at 19:09
  • What nVidia drivers are you using? Also, what's the make and model of your notebook, sometimes they use modified cards so their setup is a little exotic, being a notebook I assume it's capable of suspending – Steve May 09 '17 at 23:42
  • @Steve I don't have any nVidia drivers installed currently (I even removed xserver-xorg-video-nouveau package and "lspci | grep VGA" shows only the integrated Intel card. It's Lenovo Z50-70. – omerfarukdogan May 10 '17 at 15:31
  • I'd recommend installing the nvidia binary driver. tht's how I fixed it. – tatsu May 11 '17 at 09:49
  • 1
    "I can't wake up from sleep" would make a better title :D – Anwar May 13 '17 at 06:57

2 Answers2

5

As a first step, to diagnose problems with suspend, you will want to look at details in the log-file /var/log/pm-suspend.log


If the log-file /var/log/pm-suspend.log doen not exist, just run sudo PM_DEBUG=true pm-suspend in a terminal window. NOTE: This will suspend your computer, so you're probably going to see the problem again, however, the pm-suspend.log log-file should be there when you eventually re-start.


The file should contain a series of

[...] service [servicename] suspend suspend 

statements (together with hook status messages & other useful stuff), followed by a series of

[...] service [servicename] suspend resume success

statements.

However, somewhere along the way, one or more of these will probably return an error and at that point suspend is inhibited. You may see a series of suspend changes being rolled back. To locate the problem you'd normally just need to identify which service call is throwing the error.

In this case, the log file doesn't seem to have any service [servicename] suspend resume statements, so as a next step, can you suspend the notebook again, and try to resume by pressing the power button. Give it a couple of minutes, and if it fails to re-start re-boot by holding the power button down for 5 seconds. When you re-start, open a terminal and run dmesg | less. Please update the original question to include the output from dmesg | less.

I'd also suggest verifying that your swap-partition is correctly set, and in particular that it is at least at big as your installed RAM. This is a handy FAQ on Swap.


UPDATE: The output from dmesg | less that you posted includes the line:
[    1.197601] PM: Hibernation image not present or could not be loaded.

(line 574 in the file) Again, this suggests a problem with hibernation (suspend-to-disk), but if you're sure that your problem is actually with suspend (i.e. suspend-to-RAM) then that can't be it. I also can't see any reported problems with your Intel/NVIDIA graphics.

sempaiscuba
  • 1,433
5

Solution: Upgrade to kernel 4.13.1.

I was struggling with this issue on my Lenovo G40 laptop since 2 years. Recently I upgraded to the latest kernel 4.13.1. The problem solved 100%. Works perfectly. Tested with Ubuntu 16.04, Ubuntu 17.04, CentOS 7, Fedora 26, Linux Mint 18.2, OpenSuse 42.3. All OS work perfectly with kernel 4.13.1. When I close and open the laptop lid, it wakes up from suspend smoothly.


ukuu --- Ubuntu Kernel Upgrade Utility:

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

http://www.teejeetech.in/p/ukuu-kernel-upgrade-utility.html