2

I have a problem with my power modes in 14.04. When I use:

sudo pm-hibernate

my laptop and monitor display are getting black. After one or two seconds, the laptop and the monitor are showing the things they showed before again. So it doesn't get in hibernate.

The same thing is with:

sudo pm-suspend

I have never had a problem like that before, although I had a 14.04 installation before.

Is there a solution? Hope its not duplicate :) (I have a Nvidia Optimus card and I don't want to install any drivers, because it always crashs my system so I have to reinstall :/)

/var/log/pm-suspend.log is very big so I only post the errors here:

Failed to connect to non-global ctrl_ifname: (null)  error: No such file or dir$

Running hook /usr/lib/pm-utils/sleep.d/95anacron suspend suspend:
stop: Unknown instance:
/usr/lib/pm-utils/sleep.d/95anacron suspend suspend: success.

Fri Nov 28 21:38:14 CET 2014: performing suspend
sh: echo: I/O error
Fri Nov 28 21:38:19 CET 2014: Awake.

Running hook /usr/lib/pm-utils/sleep.d/95led resume suspend:
/usr/lib/pm-utils/sleep.d/95led resume suspend: not applicable.

Here is the whole file.

Maybe, there is another software to use standby mode. Maybe another package which is working ...

EDIT:

I have found out, that the problem is the combination of the nouveau drivers and the latest kernel. Its the bug described here. So maybe I can solve the problem by installing an older driver. Or is there any alternative driver (I tried the NVIDIA drivers, but they arent working, because I have an Optimus graphic card)?

Ron
  • 20,638
Erich
  • 131
  • @KasiyA I did exactly like that but its always getting dark for 1 or 2 seconds, after that it comes back. All of my windows are still open. – Erich Nov 29 '14 at 11:51
  • @Erich Can you check /var/log/pm-suspend.log and see if there is anything informative? – Sparhawk Nov 29 '14 at 13:14
  • @Sparhawk Is there anything specific you want to know? I wrote some error messages in the question. – Erich Nov 29 '14 at 14:06
  • @Erich try copy/pasting the entire file to http://paste.ubuntu.com and then [edit] in the link. They it doesn't clutter up the question, but we have all the info. – Tim Nov 29 '14 at 14:12
  • @Erich The line sh: echo: I/O error is odd. Perhaps this is useful? http://askubuntu.com/questions/496237/sh-echo-i-o-error-on-pm-suspend-ubuntu-14-04 – Sparhawk Nov 29 '14 at 20:48
  • @Sparhawk Thank you, that seems to be a solution, but I dont have a SSD and I dont know which device could be faulty, so I dont know which device I have to delete. Do you have any idea? – Erich Nov 30 '14 at 08:03
  • @Erich Yeah, I'm not sure either. I just searched the web for that string. – Sparhawk Nov 30 '14 at 09:21
  • @Sparhawk There is something, which is an argument against this solution, because it worked on an previous 14.04 installation. So there cant be a faulty device, can it? – Erich Nov 30 '14 at 16:56
  • @Erich To be honest, I really don't know. I don't understand the solution at all. Hopefully someone else can help. – Sparhawk Nov 30 '14 at 21:10

2 Answers2

1

Had the same I/O Error, it was caused by an Intel Network Adapter. Running dmesg | less as suggested by S Imphead in this thread and then searching for 'pm_suspend', I found this:

pci_pm_suspend(): e1000_suspend+0x0/0x20 [e1000e] returns -2
[287908.829615] dpm_run_callback(): pci_pm_suspend+0x0/0x150 returns -2
[287908.829617] PM: Device 0000:00:19.0 failed to suspend async: error -2
[287908.829689] PM: Some devices failed to suspend, or early wake event detected

That lead me to this thread in return. The fix from there is to unload the kernel module e1000e with sudo rmmod e1000e. The author also wrote a script to catch the error and unload the module automatically, but I have not tried that.

The wired (but good) thing is, that the error is gone even if the module is immediately loaded again after unload. So whenever I encounter the problem I just execute this one-liner

sudo rmmod e1000e; sudo modprobe e1000e; sudo pm-suspend

docnoe
  • 11
0

For 16.04 and above:

First, you need to make sure that you enabled suspend mode when the lid is closed. You can see it from Settings-Power enter image description here

After you are sure about this, you need to type some commands.

sudo apt install pm-utils
sudo cp /etc/systemd/logind.conf  /etc/systemd/logind.conf.back
sudo nano /etc/systemd/logind.conf

Here, you download a tool that handles some suspend&hibernate actions. After that you create a backup for logind.conf file just in case.

At last, you will edit the logind.conf file for some changes. When it opens, you will see that all commands are commented with "#" sign. We will remove some "#" from these lines.

HandleSuspendKey=suspend
HandleLidSwitch=suspend
HandleLidSwitchDocked=suspend

remove the # signs from these lines and save it. Reboot the computer and see that if it works.

This solution is worked on me on MacBook Air 2015 with Ubuntu 18.04 on it.

Ege Sucu
  • 556