[SOLVED] Fail to suspend and hibernate

Kernels & Hardware, configuring network, installing services

[SOLVED] Fail to suspend and hibernate

Postby vincent- » 2018-10-04 07:10

Hello,

I have a fresh and updated installation of Debian Stretch on my HP Pavilion dv5, and I cannot figure out why I cannot suspend or hibernate using the following commands:

Code: Select all
systemctl suspend

Code: Select all
systemctl hibernate


Here are the logs for suspend:

Code: Select all
$ journalctl -r -u suspend.target
-- Logs begin at Wed 2018-10-03 13:03:19 BST, end at Thu 2018-10-04 08:36:16 BST. --
Oct 04 08:35:58 hp systemd[1]: suspend.target: Job suspend.target/start failed with result 'dependency'.
Oct 04 08:35:58 hp systemd[1]: Dependency failed for Suspend.


Code: Select all
$ systemctl list-dependencies -a suspend.target
suspend.target
● └─systemd-suspend.service (red)
●   ├─system.slice (green)
●   │ └─-.slice (green)
●   └─sleep.target (gray)


Code: Select all
$ journalctl -r -u systemd-suspend.service
-- Logs begin at Wed 2018-10-03 13:03:19 BST, end at Thu 2018-10-04 08:39:21 BST. --
Oct 04 08:35:58 hp systemd[1]: systemd-suspend.service: Failed with result 'exit-code'.
Oct 04 08:35:58 hp systemd[1]: systemd-suspend.service: Unit entered failed state.
Oct 04 08:35:58 hp systemd[1]: Failed to start Suspend.
Oct 04 08:35:58 hp systemd[1]: systemd-suspend.service: Main process exited, code=exited, status=1/FAILURE
Oct 04 08:35:25 hp systemd-sleep[3173]: Suspending system...
Oct 04 08:35:25 hp systemd[1]: Starting Suspend...


Code: Select all
$ systemctl status systemd-suspend.service
● systemd-suspend.service - Suspend
   Loaded: loaded (/lib/systemd/system/systemd-suspend.service; static; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2018-10-04 08:35:58 BST; 7min ago
     Docs: man:systemd-suspend.service(8)
  Process: 3173 ExecStart=/lib/systemd/systemd-sleep suspend (code=exited, status=1/FAILURE)
 Main PID: 3173 (code=exited, status=1/FAILURE)

Oct 04 08:35:25 hp systemd[1]: Starting Suspend...
Oct 04 08:35:25 hp systemd-sleep[3173]: Suspending system...
Oct 04 08:35:58 hp systemd[1]: systemd-suspend.service: Main process exited, code=exited, status=1/FAILURE
Oct 04 08:35:58 hp systemd[1]: Failed to start Suspend.
Oct 04 08:35:58 hp systemd[1]: systemd-suspend.service: Unit entered failed state.
Oct 04 08:35:58 hp systemd[1]: systemd-suspend.service: Failed with result 'exit-code'.


Here are the logs for hibernate:

Code: Select all
$ journalctl -r -u hibernate.target
-- Logs begin at Wed 2018-10-03 13:03:19 BST, end at Thu 2018-10-04 08:54:21 BST. --
Oct 04 08:54:06 hp systemd[1]: hibernate.target: Job hibernate.target/start failed with result 'dependency'.
Oct 04 08:54:06 hp systemd[1]: Dependency failed for Hibernate.


Code: Select all
$ systemctl list-dependencies -a hibernate.target
hibernate.target
● └─systemd-hibernate.service (red)
●   ├─system.slice (green)
●   │ └─-.slice (green)
●   └─sleep.target (gray)


Code: Select all
$ journalctl -r -u systemd-hibernate.service
-- Logs begin at Wed 2018-10-03 13:03:19 BST, end at Thu 2018-10-04 08:55:27 BST. --
Oct 04 08:54:06 hp systemd[1]: systemd-hibernate.service: Failed with result 'exit-code'.
Oct 04 08:54:06 hp systemd[1]: systemd-hibernate.service: Unit entered failed state.
Oct 04 08:54:06 hp systemd[1]: Failed to start Hibernate.
Oct 04 08:54:06 hp systemd[1]: systemd-hibernate.service: Main process exited, code=exited, status=1/FAILURE
Oct 04 08:53:39 hp systemd-sleep[12194]: Suspending system...
Oct 04 08:53:39 hp systemd[1]: Starting Hibernate...


Code: Select all
$ systemctl status systemd-hibernate.service
● systemd-hibernate.service - Hibernate
   Loaded: loaded (/lib/systemd/system/systemd-hibernate.service; static; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2018-10-04 08:54:06 BST; 1min 51s ago
     Docs: man:systemd-suspend.service(8)
  Process: 12194 ExecStart=/lib/systemd/systemd-sleep hibernate (code=exited, status=1/FAILURE)
 Main PID: 12194 (code=exited, status=1/FAILURE)

Oct 04 08:53:39 hp systemd[1]: Starting Hibernate...
Oct 04 08:53:39 hp systemd-sleep[12194]: Suspending system...
Oct 04 08:54:06 hp systemd[1]: systemd-hibernate.service: Main process exited, code=exited, status=1/FAILURE
Oct 04 08:54:06 hp systemd[1]: Failed to start Hibernate.
Oct 04 08:54:06 hp systemd[1]: systemd-hibernate.service: Unit entered failed state.
Oct 04 08:54:06 hp systemd[1]: systemd-hibernate.service: Failed with result 'exit-code'.


I remember in my old OS (Gentoo), with a kernel 4.4.x I was able to hibernate (but not suspend). Any kernel >=4.5.0 made hibernation not possible.

Please help. Thanks!
Last edited by vincent- on 2018-10-14 08:44, edited 1 time in total.
vincent-
 
Posts: 4
Joined: 2018-10-04 06:38

Re: Fail to suspend and hibernate

Postby vincent- » 2018-10-12 10:06

Adding more information to this topic.

I downloaded the latest version of the 4.4.x Linux kernel series (at the moment of writing this post is 4.4.160) and I followed these steps to build Debian packages for it:

- Download the kernel tarball
- Unpack it in /usr/src/
- Copy the config file of the kernel I'm currently using from /boot/ to /usr/src/linux-4.4.160/
- Run "make oldconfig". Some options that exist in 4.9.x don't exist in 4.4.x so I see questions about what to do. I choose always the default option.
- I build the kernel and the Debian packages by running "make deb-pkg"
- The resulting packages are kept in /usr/src/. I install all of them using "ls /usr/src/*.deb | xargs dpkg -i".
- I regenerate the grub config file so new options to boot that kernel are added to the menu by running "grub-mkconfig -o /boot/grub/grub.cfg"
- I boot Debian using that kernel, then I try to hibernate using "systemctl hibernate" and it works.
vincent-
 
Posts: 4
Joined: 2018-10-04 06:38

Re: Fail to suspend and hibernate

Postby debiman » 2018-10-12 15:00

vincent- wrote:
Code: Select all
$ systemctl list-dependencies -a suspend.target
suspend.target
● └─systemd-suspend.service (red)
●   ├─system.slice (green)
●   │ └─-.slice (green)
●   └─sleep.target (gray)

it seems that in both cases the sleep.target is the culprit (if i interpret the colors that you added correctly)?
User avatar
debiman
 
Posts: 3064
Joined: 2013-03-12 07:18

Re: Fail to suspend and hibernate

Postby vincent- » 2018-10-14 07:33

I have built an even older kernel version and then tried to suspend. It failed as well, but this time it displayed a message in the console:

Code: Select all
ahci 0000:00:1f.2: BIOS update required for suspend/resume
pci_legacy_suspend(): ahci_pci_device_suspend+0x0/0x60 [ahci] returns -5
dpm_run_callback(): pci_pm_suspend+0x0/0x160 returns -5
PM: Device 0000:00:1f.2 failed to suspend async: error -5
PM: Some devices failed to suspend, or early wake event detected


I think I'm going to follow the advice and update the BIOS.
vincent-
 
Posts: 4
Joined: 2018-10-04 06:38

Re: [SOLVED] Fail to suspend and hibernate

Postby vincent- » 2018-10-14 08:45

I have updated my laptop's BIOS and now both suspend and hibernate work fine using the latest Debian kernel.
vincent-
 
Posts: 4
Joined: 2018-10-04 06:38


Return to System configuration

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable