Bug 748723 - no resume after suspend
Summary: no resume after suspend
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: pm-utils
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jaroslav Škarvada
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-25 07:19 UTC by jurek.bajor
Modified: 2011-12-07 20:55 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 750755 (view as bug list)
Environment:
Last Closed: 2011-12-07 20:55:20 UTC
Type: ---


Attachments (Terms of Use)
good suspend but resume failed log (3.46 KB, text/plain)
2011-10-25 07:21 UTC, jurek.bajor
no flags Details
good suspend and good resume (4.62 KB, text/plain)
2011-10-25 07:23 UTC, jurek.bajor
no flags Details
system messages log at time of both failed and good suspend/resume runs (101.92 KB, text/plain)
2011-10-25 07:28 UTC, jurek.bajor
no flags Details
/var/log/pm-suspend.log for F16 RC4 (6.79 KB, text/plain)
2011-11-02 08:25 UTC, jurek.bajor
no flags Details
/var/log/messages for F14 crash on hibernate (72.66 KB, text/plain)
2011-11-02 14:20 UTC, jurek.bajor
no flags Details

Description jurek.bajor 2011-10-25 07:19:45 UTC
Description of problem:
The system does not resume after suspend.
Note: it happens occasionally (every few days) after overnight suspend.
 
Version-Release number of selected component (if applicable):
$ rpm -q pm-utils
pm-utils-1.3.1-4.fc14.i686

How reproducible:
menu: System - Shut Down... - Suspend

Steps to Reproduce:
1. as above
2.
3.
  
Actual results:
System can not resume after suspend.

Expected results:
After suspend, a good resume.

Additional info:

Comment 1 jurek.bajor 2011-10-25 07:21:54 UTC
Created attachment 530017 [details]
good suspend but resume failed log

Comment 2 jurek.bajor 2011-10-25 07:23:05 UTC
Created attachment 530018 [details]
good suspend and good resume

Comment 3 jurek.bajor 2011-10-25 07:28:13 UTC
Created attachment 530019 [details]
system messages log at time of both failed and good suspend/resume runs

Comment 4 Jaroslav Škarvada 2011-10-25 07:41:58 UTC
The pm log seems good. In the syslog it seems to hang after the b44, but it doesn't mean anything. Try to debug according to:
http://fedoraproject.org/wiki/KernelCommonProblems#Suspend.2FResume_failure
Also please note the F14 is near EOL, could you upgrade and retest with newer kernel?

Comment 5 jurek.bajor 2011-11-02 08:23:47 UTC
I changed this BZ Report to F16 (I am testing F16 RC4 Live-CD LXDE).

I added pm-suspend.log-F16 attachment.

1.
I think you should change the order (reverse numbering) of dhclient and
NetworkManager.
It is:
-  on suspend
...
/usr/lib/pm-utils/sleep.d/55NetworkManager suspend suspend:success.
...
/usr/lib/pm-utils/sleep.d/56dhclient suspend suspend:success.
...
- on resume
...
/usr/lib/pm-utils/sleep.d/56dhclient resume suspend:success.
...
/usr/lib/pm-utils/sleep.d/55NetworkManager resume suspend:success.
...

The reason for changing order is:
- on suspend you can not bring down NM and interfaces and still have dhclient
  active
- on resume you should let NM bring up interfaces first and then let dhclient
  request IPs, etc
 
2.
Please change the corresponding line grouping and spacing so the log is easier
to read.

It is:
...
/usr/lib/pm-utils/sleep.d/49bluetooth suspend suspend: success.
Running hook /usr/lib/pm-utils/sleep.d/55NetworkManager suspend suspend:
Having NetworkManager put all interfaces to sleep...Done.

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

and it would be better:
...
/usr/lib/pm-utils/sleep.d/49bluetooth suspend suspend: success.

Running hook /usr/lib/pm-utils/sleep.d/55NetworkManager suspend suspend:
Having NetworkManager put all interfaces to sleep...Done.
/usr/lib/pm-utils/sleep.d/55NetworkManager suspend suspend: success.

Running hook /usr/lib/pm-utils/sleep.d/56atd suspend suspend:
...

JB

Comment 6 jurek.bajor 2011-11-02 08:25:34 UTC
Created attachment 531285 [details]
/var/log/pm-suspend.log for F16 RC4

Comment 7 Jaroslav Škarvada 2011-11-02 10:05:34 UTC
(In reply to comment #5)
> 1.
> I think you should change the order (reverse numbering) of dhclient and
> NetworkManager.
>
The dhclient hook is provided by dhcp package, not the pm-utils.

I think it should work as is, because the dhclient hook only processes interfaces that are not handled by NetworkManager (see the 56dhclient source), thus the ordering shouldn't matter. Also CCing dhcp maintainer if he has any comments about this.

I think your problem is somewhere else. Please try to bypass the pm-utils, by suspending from command line with command:
# echo mem > /sys/power/state
or hibernating with command:
# echo disk > /sys/power/state
Try it several times from a) graphical target (e.g. something previously called the runlevel 5) and also b) text mode (runlevel 3). If only a) fails it is probably the X org driver, if b) only fails it is probably the kernel.

> 2.
> Please change the corresponding line grouping and spacing so the log is easier
> to read.
> 
Good point, I will clone this and I will fix it in rawhide (and also post upstream).

Comment 8 Jaroslav Škarvada 2011-11-02 10:12:26 UTC
> 2.
> Please change the corresponding line grouping and spacing so the log is easier
> to read.
> 
Cloned as bug 750755.

Comment 9 jurek.bajor 2011-11-02 14:19:15 UTC
(In reply to comment #7)
> ... 
> I think your problem is somewhere else. Please try to bypass the pm-utils, by
> suspending from command line with command:
> # echo mem > /sys/power/state
> or hibernating with command:
> # echo disk > /sys/power/state
> Try it several times from a) graphical target (e.g. something previously called
> the runlevel 5) and also b) text mode (runlevel 3). If only a) fails it is
> probably the X org driver, if b) only fails it is probably the kernel.
> ...

Well, it happened, but on the notebook with F14:
Installed Packages
pm-utils.i686                   1.3.1-4.fc14                @updates

While in Gnoem, on 3rd try with '# echo disk > /sys/power/state' it crashed
with ABRT reporting:
Package:    	kernel
Latest Crash:	Wed 02 Nov 2011 02:42:33 PM 
Command:    	not_applicable
Reason:     	BUG: sleeping function called from invalid context at arch/x86/mm/fault.c:1079
Comment:    	None
Bug Reports:	

I also got quite a lot of messages in Gnome terminal following that hibernate
entry.
Next the system just shutdown and I had to restart it as usually (without any
hibernation process effects).
The /var/log/messages contained the crash messages as in messages.crash-f14
attachment, starting approx with:
...
Nov  2 14:42:05 localhost kernel: [26753.941110] Restarting tasks ...
Nov  2 14:42:05 localhost kernel: [26753.945535] BUG: sleeping function called from invalid context at arch/x86/mm/fault.c:1079
...

and followed by my normal reboot messages.

Despite the fact that this is F14 and near EOL, perhaps the code is common to
F16, so please take a look at it.
I tried on another notebook with F16 RC4 but all was OK.
JB

Comment 10 jurek.bajor 2011-11-02 14:20:42 UTC
Created attachment 531360 [details]
/var/log/messages for F14 crash on hibernate

Comment 11 Jaroslav Škarvada 2011-12-07 17:42:18 UTC
> BUG: sleeping function called from invalid context at arch/x86/mm/fault.c:1079
>
This is probably consequence of the previous problem and not the problem itself. 

Is it reproducible with f16 kernel?

Comment 12 jurek.bajor 2011-12-07 19:12:35 UTC
This is an up-to-date F16.
I tested 3 times all cases as requested in Comment 7.
No problems.

Comment 13 Jaroslav Škarvada 2011-12-07 20:55:20 UTC
Thanks for info, I am closing this as it seems fixed in f16. Feel free to reopen if the problem persist.


Note You need to log in before you can comment on or make changes to this bug.