Problems with restoring after suspension (sleep or hibernate)

Hi. I’m new to openSUSE. I just started using it regularly in October.
But I’m having a problem with getting my computer to wake up after I suspend it to RAM.
I can wake the computer up with the power button but none of my peripheral devices work once I wake it up.
They aren’t turned on and are not responding when I click or reconnect them to the computer.

Also, when suspending to disk (hibernate), the computer doesn’t turn itself off. I have to do it manually.
When I turn the computer on after that, I notice my session wasn’t saved either. It just skips the GRUB menu and goes to the login screen, as if I rebooted instead of hibernating.

How do I solve this?
I am still using version 11.4 and I’m unsure if spending my time preparing an upgrade will change anything.

A lot comes down to the ACPI support for your computer, and sometimes problematic hardware/drivers complicate the suspend/resume process further.

To start with, have a look at /var/log/pm-suspend.log for any messages that might indicate what the problem is.

Here’s a guide:

SDB Pm-utils - openSUSE

Firstly, thanks a lot for the immediate response. It’s usually my reason for avoiding forums.
Well, the only thing I noticed was the ‘NetworkManager’ failing to put all inter(f?)aces to sleep.

Initial commandline parameters:
Wed Dec 28 18:41:34 EST 2011: Running hooks for suspend.
Running hook /usr/lib/pm-utils/sleep.d/00logging suspend suspend:
suspend initiated: Wed Dec 28 18:41:34 EST 2011

Linux linux-e64j 2.6.37.6-0.9-default #1 SMP 2011-10-19 22:33:27 +0200 i686 i686 i386 GNU/Linux
kernel command line: ‘root=/dev/disk/by-id/ata-WDC_WD1600AAJB-22WRA0_WD-WCAS2C245529-part2 resume=/dev/disk/by-id/ata-Maxtor_6Y060L0_Y2T2S9SE-part1 splash=silent quiet vga=0x31a edd=off’
Module Size Used by
microcode 13057 0
af_packet 20106 0
mperf 1271 0
snd_pcm_oss 47887 0
snd_mixer_oss 16849 1 snd_pcm_oss
snd_seq_midi 5900 0
snd_seq_midi_event 6627 1 snd_seq_midi
snd_opl3_synth 12509 0
snd_seq_midi_emul 6418 1 snd_opl3_synth
snd_seq 57361 4 snd_seq_midi,snd_seq_midi_event,snd_opl3_synth,snd_seq_midi_emul
ip6t_REJECT 4192 3
nf_conntrack_ipv6 8286 2
nf_defrag_ipv6 9402 1 nf_conntrack_ipv6
ip6table_raw 1203 1
xt_NOTRACK 864 4
ipt_REJECT 2200 3
iptable_raw 1294 1
iptable_filter 1466 1
ip6table_mangle 1636 0
nf_conntrack_netbios_ns 1334 0
nf_conntrack_ipv4 8584 2
nf_defrag_ipv4 1281 1 nf_conntrack_ipv4
ip_tables 13096 2 iptable_raw,iptable_filter
xt_conntrack 2480 4
nf_conntrack 75199 5 nf_conntrack_ipv6,xt_NOTRACK,nf_conntrack_netbios_ns,nf_conntrack_ipv4,xt_conntrack
ip6table_filter 1407 1
ip6_tables 13372 3 ip6table_raw,ip6table_mangle,ip6table_filter
x_tables 18215 11 ip6t_REJECT,ip6table_raw,xt_NOTRACK,ipt_REJECT,iptable_raw,iptable_filter,ip6table_mangle,ip_tables,xt_conntrack,ip6table_filter,ip6_tables
fuse 71829 5
dm_mod 75400 0
snd_cmipci 32637 2
gameport 9678 1 snd_cmipci
snd_pcm 87993 2 snd_pcm_oss,snd_cmipci
snd_page_alloc 7897 1 snd_pcm
snd_opl3_lib 11136 2 snd_opl3_synth,snd_cmipci
snd_timer 21844 3 snd_seq,snd_pcm,snd_opl3_lib
ppdev 7851 0
snd_hwdep 6038 1 snd_opl3_lib
snd_mpu401_uart 6913 1 snd_cmipci
sr_mod 14696 0
floppy 58469 0
snd_rawmidi 21943 2 snd_seq_midi,snd_mpu401_uart
usb_storage 43225 0
parport_pc 33251 0
shpchp 27107 0
joydev 9551 0
serio_raw 4314 0
parport 33974 2 ppdev,parport_pc
cdrom 38053 1 sr_mod
pcspkr 1662 0
i2c_sis96x 4554 0
snd_seq_device 6646 5 snd_seq_midi,snd_opl3_synth,snd_seq,snd_opl3_lib,snd_rawmidi
uas 8458 0
pci_hotplug 27726 1 shpchp
snd 66158 18 snd_pcm_oss,snd_mixer_oss,snd_seq_midi,snd_opl3_synth,snd_seq_midi_emul,snd_seq,snd_cmipci,snd_pcm,snd_opl3_lib,snd_timer,snd_hwdep,snd_mpu401_uart,snd_rawmidi,snd_seq_device
sis900 19413 0
soundcore 6854 1 snd
sg 28094 0
preloadtrace 71482 2
ext4 371995 2
jbd2 75515 1 ext4
crc16 1419 1 ext4
usbhid 44269 0
hid 70521 1 usbhid
nouveau 561878 2
ttm 63307 1 nouveau
ata_generic 3015 0
ohci_hcd 29856 0
ehci_hcd 53789 0
drm_kms_helper 32719 1 nouveau
drm 189610 4 nouveau,ttm,drm_kms_helper
i2c_algo_bit 5402 1 nouveau
pata_sis 9594 5
i2c_core 27418 5 i2c_sis96x,nouveau,drm_kms_helper,drm,i2c_algo_bit
rtc_cmos 10609 0
rtc_core 17445 1 rtc_cmos
rtc_lib 2457 1 rtc_core
video 14370 1 nouveau
output 2111 1 video
button 5465 1 nouveau
libata 202402 2 ata_generic,pata_sis
usbcore 181694 6 usb_storage,uas,usbhid,ohci_hcd,ehci_hcd
fan 2575 0
thermal 13090 0
processor 36104 0
thermal_sys 14726 4 video,fan,thermal,processor
hwmon 2012 1 thermal_sys

         total       used       free     shared    buffers     cached

Mem: 1284476 717584 566892 0 45916 582464
-/+ buffers/cache: 89204 1195272
Swap: 2859004 0 2859004

/usr/lib/pm-utils/sleep.d/00logging suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/00powersave suspend suspend:

/usr/lib/pm-utils/sleep.d/00powersave suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/02rtcwake suspend suspend:
rtcwake alarm not enabled in /etc/pm/config.d/rtcwake.config, doing nothing…

/usr/lib/pm-utils/sleep.d/02rtcwake suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/06autofs suspend suspend:
Shutting down automount …done

/usr/lib/pm-utils/sleep.d/06autofs suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/30s2disk-check suspend suspend:

/usr/lib/pm-utils/sleep.d/30s2disk-check suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/45pcmcia suspend suspend:
ejecting PCMCIA cards…

/usr/lib/pm-utils/sleep.d/45pcmcia suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/49bluetooth suspend suspend:

/usr/lib/pm-utils/sleep.d/49bluetooth suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/50rcnetwork suspend suspend:

/usr/lib/pm-utils/sleep.d/50rcnetwork suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/55NetworkManager suspend suspend:
Having NetworkManager put all interaces to sleep…Failed.

/usr/lib/pm-utils/sleep.d/55NetworkManager suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/75modules suspend suspend:

/usr/lib/pm-utils/sleep.d/75modules suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/75ndiswrapper suspend suspend:

/usr/lib/pm-utils/sleep.d/75ndiswrapper suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/80acpi-fan suspend suspend:

/usr/lib/pm-utils/sleep.d/80acpi-fan suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/80videobios suspend suspend:

/usr/lib/pm-utils/sleep.d/80videobios suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/90clock suspend suspend:

/usr/lib/pm-utils/sleep.d/90clock suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/94cpufreq suspend suspend:

/usr/lib/pm-utils/sleep.d/94cpufreq suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/95led suspend suspend:

/usr/lib/pm-utils/sleep.d/95led suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/95packagekit suspend suspend:

/usr/lib/pm-utils/sleep.d/95packagekit suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler suspend suspend:
Kernel modesetting video driver detected, not using quirks.

/usr/lib/pm-utils/sleep.d/98video-quirk-db-handler suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/99Zgrub suspend suspend:

/usr/lib/pm-utils/sleep.d/99Zgrub suspend suspend: success.
Running hook /etc/pm/sleep.d/99at suspend suspend:

/etc/pm/sleep.d/99at suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/99info suspend suspend:

/usr/lib/pm-utils/sleep.d/99info suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/99video suspend suspend:

/usr/lib/pm-utils/sleep.d/99video suspend suspend: success.
Wed Dec 28 18:41:35 EST 2011: performing suspend
INFO: using built-in quirks database from HAL.
INFO: S2RAM_OPTS from HAL quirks: ’ '.

I have no idea if there was something I missed because as I said I am quite the novice.

And that’s unusual because my BIOS actually has an option for ACPI suspension (which was turned on) and it worked when I had Windows XP on this computer.

Turn that off.

So, the difference between it being on and off
On:

  • I see a verbose log been written
  • After it has completed, the computer stops running; blinking power LED
  • Cannot restore with mouse or keyboard
  • Mouse, keyboard and monitor are still inactive after restoring (with the power button)
  • All keyboard lights go on after restore, but can’t be turned off (So that probably means power was sent to them but it’s hanging)
    Off:
  • No log seen/Black screen with a non-blinking cursor
  • It seems like it might have suspended but the computer is still running loudly; blinking power LED
  • Mouse and keyboard go off immediately with the black screen
  • Cannot restore with mouse or keyboard
  • Mouse, keyboard and monitor are still inactive after restoring (with the power button)
  • Keyboard lights are still off after restoring

Ultimately, turning it off did not fix the problem.

Hmmm… I have seen previous reports occasionally that the ohci_hcd and ehci_hcd modules can be problematic with hibernation and suspending. They can be removed at hibernation time, and restored on thawing again. There is a way to do this automatically by creating your own hooks (as described in the guide I linked to). Maybe worth a try.

SDB Pm-utils - openSUSE: Creating your own hooks

I tried figuring out how to do that on my own but I don’t think I did it properly.

(Sorry, I should have said I’m new to GNU/Linux in general)

I tried figuring out how to do that on my own but I don’t think I did it properly.

That’s ok. It can be a tricky process, because you have to be comfortable creating/editing a bash script (made executable and saved to /etc/pm/sleep.d/ directory), and experiment with the suspected problem drivers. The general approach would normally be to experiment first by manually unloading the suspected problem driver first with the ‘modprobe -r …’ command, then try suspending of hibernating. On waking again, the module needs to be loaded again manually. However, if playing with some of the usb drivers, you may be left with no functioning keyboard to do this :slight_smile:

As well as this, the drivers have to be discrete kernel modules, rather than compiled as part of the kernel, and for many modules this simply isn’t the case, so this approach cannot always be relied upon.

Anyway, saving the script to /etc/pm/sleep.d/ directory requires root privileges, so you could use an editor like this for KDE users

kdesu kwrite /etc/pm/sleep.d/50usb

or for Gnome users

gnomesu gedit /etc/pm/sleep.d/50usb
#!/bin/bash

. $PM_UTILS_LIBDIR/functions

case "$1" in
        hibernate|suspend)
                        modprobe -r ohci_hcd
                        modprobe -r ehci_hcd
                ;;
        thaw|resume)
                        modprobe ohci_hcd
                        modprobe ehci_hcd
                ;;
        *)
                ;;
esac

exit 0

It then gets made executable with

chmod +x  /etc/pm/sleep.d/50usb

As you can see it can be a convoluted process, and it can take a lot of effort to figure out which modules may be the problem (if any). It may just be due to particular hardware - its not always a trivial matter to resolve.

File a bug report if you need to…

http://en.opensuse.org/openSUSE:Submitting_bug_reports

Thanks for the info! :slight_smile:

It looks like adding the hook didn’t really solve the problem.
(Keep in mind, the monitor doesn’t turn on either)

Ok, time to file a bug report then. It is the only way it will get fixed. When you’ve done that, post the link to it here.

Sorry, it took a while.
https://bugzilla.novell.com/show_bug.cgi?id=742757

Thank you very much.
It works on my Dell E6520 with Mandriva 2011 64-bit.
uname -a
Linux localhost.localdomain 2.6.39.4-5.1-desktop #1 SMP Wed Jan 4 14:50:33 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Glad it was of help to you. :slight_smile:

I filed this bug as #716905 which the revised bugzilla says doesn’t exist! Here is the email from bugzilla about it:

From: bugzilla_noreply@novell.com
To: linxt@comcast.net
Subject: [Bug 716905] After installing OS 12.1-M5 (build0250) the only item in menu.lst is windows
Date: Thu, 15 Sep 2011 12:42:21 +0000

https://bugzilla.novell.com/show_bug.cgi?id=716905

https://bugzilla.novell.com/show_bug.cgi?id=716905#c1

Jiri Srain <jsrain@suse.com> changed:

       What    |Removed                     |Added

         Status|NEW                         |NEEDINFO
   InfoProvider|                            |linxt@comcast.net
     AssignedTo|jsrain@suse.com             |snwint@suse.com

— Comment #1 from Jiri Srain <jsrain@suse.com> 2011-09-15 12:42:20 UTC —
Please, attach the installation logs (whole /var/log/YaST2 directory) so that
we can see what went wrong.

%%%%%%%%%%%%%
The current bug # is 717155 in bugzilla. Please add your comments to this bug so we can get it fixed.

Tom

On 2012-02-04 22:26, tommyttt wrote:
>
> I filed this bug as #716905 which the revised bugzilla says doesn’t
> exist!

It does exist, I had a look at it.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

I’m not sure if this post belongs here, much less the bug.

On another note,

Was there a reason you wanted me to post the link? I don’t think my bug has even been looked at yet.

Was there a reason you wanted me to post the link? I don’t think my bug has even been looked at yet.

Just so others were aware of it, and could refer or add to it if necessary.