Bug 240964

Summary: failure to wakeup from suspend - HP Compaq nx7300 notebook
Product: [Fedora] Fedora Reporter: Valent Turkovic <valent.turkovic>
Component: kernelAssignee: Richard Hughes <richard>
Status: CLOSED CURRENTRELEASE QA Contact: Brian Brock <bbrock>
Severity: urgent Docs Contact:
Priority: medium    
Version: 8CC: chris.brown, jeffutter, jonstanley, linville, luigi.tarenga, rmo
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 2.6.21-1.3213.fc8 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-01-16 23:08:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
xorg.conf
none
lspci
none
suspend log with kernel 2.6.21-1.3175.fc7
none
dmesg - here is the current log none

Description Valent Turkovic 2007-05-23 14:32:15 UTC
Description of problem:
Failure to wake up from suspend

Version-Release number of selected component (if applicable):
kernel 2.6.21-1.3175.fc7

How reproducible:
always

Steps to Reproduce:
1. suspend laptop
2. wake it up
3.
  
Actual results:
laptops shuts down ok, but during resume it freezes

Expected results:
laptop should wake up

Additional info:
this laptop also runs OpenSuse 10.2 and to get suspend and resume working there
I needed to add a few options to s2ram config file. These are:
S2RAM_OPTS="-f -p -m"

    -f, --force:      force suspending, even on unknown machines.
    -p, --vbe_post:   VBE POST the graphics card after resume
    -m, --vbe_mode:   get VBE mode before suspend and set it after resume

Fedora 7 uses pm-suspend but has some similar options:
    --quirk-vbe-post
    --quirk-vbemode-restore

but using command:
pm-suspend --quirk-vbe-post --quirk-vbemode-restore

makes my laptop resume ok, only with screen off! - I can see hdd diode blinking
if I issue 'find /' command.

using 'pm-suspend --quirk-vbemode-restore' is the same, screen is dead but
laptop works - ie. hdd led blinks after typing 'find /'

quirk guide isn't very helpful:
http://people.freedesktop.org/~hughsient/quirk/quirk-debug.html
because it insists on using "--quirk-s3-bios" or "--quirk-s3-mode" none of which
make my laptop not freeze. In my case for step no.15. the answer should be "You
might need to use --quirk-vbemode-restore"

any ideas on how to persue this further?

I got my laptop not to freeze on waking up - but still I get no picture on my
laptop screen.

Thank you.

Comment 1 Mihai Harpau 2007-05-23 15:08:23 UTC
maybe you could try --quirk-vbestate-restore instead of --quirk-vbemode-restore

Comment 2 Valent Turkovic 2007-05-23 15:11:34 UTC
ps. all testing od pm-suspend are done in console only. I issue "single"
parameter to grub and then test out different 'pm-suspend' commands.

If I use the same commands ie. "pm-suspend --quirk-vbemode-restore" under gnome
my laptop freezes on resume!

Comment 3 Valent Turkovic 2007-05-23 15:18:06 UTC
I get the same result with '--quirk-vbestate-restore' - black screen and laptop
resumes ok - I can run 'find /' and see hdd led blinking.

Comment 4 Valent Turkovic 2007-05-23 15:20:23 UTC
I didn't mention this also, but before issuing any pm-suspend command I remove
iwp3945 module with 'rmmod iwl3945' command.

Comment 5 Mihai Harpau 2007-05-23 15:31:32 UTC
maybe you could try also --quirk-dpms-on

Comment 6 Fabio Comolli 2007-05-23 15:49:41 UTC
Also you can have a look at this page:
http://www.linux.com/article.pl?sid=06/05/24/1716222

Comment 7 Valent Turkovic 2007-05-23 15:52:54 UTC
I tried "--quirk-dpms-on" and the screen is still off.

Comment 8 Valent Turkovic 2007-05-23 15:56:31 UTC
for comment #6:

cat /sys/power/state
mem disk

and regarding the rest of the article - it is not uptodate with Fedora 7 and new
pm-suspend command so I don't see how relevant it is - correct me if I'm wrong.

Comment 9 Valent Turkovic 2007-05-23 16:10:37 UTC
here is what I have tested and how:

1. boot to kernel 2.6.21-1.3175.fc7 with "single" parameter added to grub

2. edited /etc/pm/config.d/unload_modules and added a line
"SUSPEND_MODULES="iwl3945"

3. tested different quirks:

pm-suspend 
# single - screen off, command 'find /' works

pm-suspend --quirk-dpms-on
# single - screen off, command 'find /' works

pm-suspend --quirk-vbestate-restore --quirk-dpms-on
# single - screen off, command 'find /' works

pm-suspend --quirk-vbemode-restore
# single - screen off, command 'find /' works
# gnome - freez

pm-suspend --quirk-vbestate-restore
# single - screen off, command 'find /' works

pm-suspend --quirk-vbemode-restore --quirk-dpms-on --quirk-vbe-post
# single - screen off, command 'find /' works

pm-suspend --quirk-vbemode-restore --quirk-dpms-on
# single - screen off, command 'find /' works
# gnome - freez


Comment 10 Richard Hughes 2007-05-23 16:23:03 UTC
(In reply to comment #2)
> ps. all testing od pm-suspend are done in console only.

Try in X and on console. What video driver are you using?


Comment 11 Valent Turkovic 2007-05-23 16:55:13 UTC
I'm using intel video driver

I updated my tests. "sigle" means it is console only, and "gnome" means that I
booted into gnome as normal user and issued the pm-suspend command.

under gnome I allways get frozen laptop, under console I get it working
sometimes but with screen still black!

I think I abused my laptop enough to prove I'm not slacking off and really want
to find the issue why my laptop isn't resuming from suspend.


# single - screen off, command 'find /' works
# gnome - freeze
pm-suspend 

# single - freeze
# gnome - freeze
pm-suspend --quirk-s3-mode

# single - freeze
pm-suspend --quirk-s3-bios

# single - screen off, command 'find /' works
pm-suspend --quirk-dpms-on

# single - screen off, command 'find /' works
pm-suspend --quirk-vbestate-restore --quirk-dpms-on

# single - screen off, command 'find /' works
# gnome - freez
pm-suspend --quirk-vbemode-restore

# single - screen off, command 'find /' works
# gnome - freeze
pm-suspend --quirk-vbestate-restore

# single - ekran ugasen, radi 'find /'
pm-suspend --quirk-vbemode-restore --quirk-dpms-on --quirk-vbe-post

# single - screen off, command 'find /' works
# gnome - freez
pm-suspend --quirk-vbemode-restore --quirk-dpms-on

# single - ekran ugasen, radi 'find /'
pm-suspend --quirk-vbe-post --quirk-vbemode-restore

# single - freez
pm-suspend --quirk-vbe-post --quirk-vbestate-restore

# single - freez
pm-suspend --quirk-vbe-post --quirk-vbemode-restore --quirk-s3-bios



Comment 12 Jeremy Katz 2007-05-24 00:40:14 UTC
iwl3945 has suspend problems.  May be resolved with the 3191 kernel, but haven't
rebooted into it yet

Comment 13 Valent Turkovic 2007-05-24 08:03:58 UTC
I just updated my kernel to 2.6.21-1.3189.fc7 but with it the situation is worse.

Even quirks that worked unser console only (single) don't now.

I'll attach my xorg and lspci files.

Comment 14 Valent Turkovic 2007-05-24 08:04:52 UTC
Created attachment 155318 [details]
xorg.conf

xorg.conf

Comment 15 Valent Turkovic 2007-05-24 08:05:18 UTC
Created attachment 155319 [details]
lspci

lspci

Comment 16 Valent Turkovic 2007-05-24 08:10:40 UTC
Created attachment 155321 [details]
suspend log with kernel 2.6.21-1.3175.fc7

this dmesg log of one failed suspend/resume under X
I tried to resume but laptop didn't went shutdown, it just turned screen to
black for a second and then returned back to working gnome session - and here
is the log of that.

Comment 17 Richard Hughes 2007-05-24 08:29:55 UTC
>Stopping user space processes timed out after 20 seconds (1 tasks refusing to
freeze):
> hald-addon-stor

If you do (as root):

killall hald-addon-storage

then try suspending, does it work?

Comment 18 Valent Turkovic 2007-05-24 09:16:22 UTC
No.

I killed hald-addon-storage and checked with 'ps aux' that it was killed and
still it freezes.

Comment 19 Richard Hughes 2007-05-24 09:31:23 UTC
Can you attach a dmesg output after killing the addon, before and after the
suspend pls. Thanks.

Comment 20 Valent Turkovic 2007-05-24 09:32:08 UTC
Created attachment 155326 [details]
dmesg - here is the current log

I followed the instructions on:
http://people.freedesktop.org/~hughsient/quirk/quirk-advanced.html

so I booted to fedora 7 test 4 with kernel 2.6.21-1.3189.fc7, then I switched
to console 1 with ctrl-alt-f1, then logged on as a root.

# sync
# rmmod iwl3945
# echo 1 > /sys/power/pm_trace
# pm-suspend

then I try to resume but laptop is freezed!

I power off the laptop and on next restart I do
# dmesg > dmesg.txt

- hope this gives some insight to inner workings of my laptop.

Comment 21 Valent Turkovic 2007-05-24 10:48:41 UTC
Is there any other way to capture kernel and other log messages during suspend
and resume - even if my laptop freezes?

Comment 22 Richard Hughes 2007-05-24 11:01:15 UTC
>drivers/rtc/hctosys.c: unable to open rtc device (rtc0)

You're getting the same error as me

I'll try to fix this today.

Richard.


Comment 23 Richard Hughes 2007-05-24 11:36:44 UTC
(In reply to comment #22)
> >drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
> 
> You're getting the same error as me

Nope, I've checked the code and this isn't a problem. As you are getting no
"hash match device" then I don't think you have any dodgy modules. Have you
tried with noapic?

Richard.


Comment 24 Valent Turkovic 2007-05-24 12:03:30 UTC
my grub entry looks like this:

title Fedora (2.6.21-1.3189.fc7)
        root (hd0,9)
        kernel /boot/vmlinuz-2.6.21-1.3189.fc7 ro root=LABEL=/12 rhgb quiet
        initrd /boot/initrd-2.6.21-1.3189.fc7.img

I'll do a restart with "nolapic" option now.

Comment 25 Valent Turkovic 2007-05-24 12:10:22 UTC
correction: noapic

Comment 26 Valent Turkovic 2007-05-24 12:24:46 UTC
with 'noapic' option my laptop freezes during boot.

Comment 27 Valent Turkovic 2007-05-24 18:37:35 UTC
Ok, it seams I have some bios problem issues!

I wen't back to OpenSuse 10.2 in which I claimed suspend works - and it did work
before - now it doesn't work anymore!

I had to upgrade my bios in order to get Intel VT option in bios - and that
FINALLY enabled me to run Xen virtualisation! But it seams that this new bios
now has some other issues so not even OpenSuse which worked doesn't now :(

First time I tried to suspend under OpenSuse 10.2 it freezed, and second time it
started to wakeup but some really strange noises came from the HDD that FREAKED
me out! I powered it off as soon as possible - and everything worked fine on
power up!

Do you have any information, does Intel virtualisation have any thing to do with
suspend/resume? Does it need to be disabled in order for suspend/resume to work?

Does anyone have some more experience testing new laptops with Intel VT technology?

Comment 28 Valent Turkovic 2007-05-24 19:57:46 UTC
I disabled Intel Virtualisation in Bios, and OpenSuse 10.2 suspends and resumes
ok again.

Fedora still freezes!

I tried these quirks:

pm-suspend
pm-suspend --quirk-s3-mode
pm-suspend --quirk-s3-bios
pm-suspend --quirk-vbe-post --quirk-vbemode-restore

and they all freeze my laptop

Comment 29 Richard Hughes 2007-05-25 22:12:17 UTC
(In reply to comment #28)
> Fedora still freezes!

What kernel version is opensuse using?

Comment 30 Valent Turkovic 2007-05-26 13:49:06 UTC
under OpenSuse 10.2:

> uname -a
Linux navi 2.6.18.8-0.3-default #1 SMP Tue Apr 17 08:42:35 UTC 2007 i686 i686
i386 GNU/Linux


Comment 31 Valent Turkovic 2007-05-26 15:29:00 UTC
I copied binary s2ram from OpenSuse to Fedora and suspended Fedora 7 with:

s2ram -f -p -m

again it freezes during resume :(

Comment 32 Valent Turkovic 2007-05-27 13:05:38 UTC
I got suspend to work! But I only got it working with Rawhide Live CD 20050517 !

Rawhide Live CD 20050517 uses kernel 2.6.21-1.3163 and suspend/resume work
flawlessly with these quirks:

rmmod iwl3945
pm-suspend --quirk-vbe-post  --quirk-vbemode-restore

I'll send out an email to hal team informing them about this quirks.

I suspected my fedora 7 test 4 was the problem when I managed to get
suspend/resume working on a few laptops with not too much trouble with rawhide
live cd. I guess that kernel it to blame or my installation got tainted in some
way. So I decided that my laptop also deserves sterile test environment.

So to conclude:
- rmmod iwl3945 (if you don't remove this module first there is no way to
suspend/resume your system)
- don't test with Fedora 7 test 4 installed on your hdd
- instead use Fedora 7 live CD for suspend/resume troubleshooting
- live cd is much easier on the hardware because freezing a running system with
mounted partitions can potentially cause data loss and errors on your partitions 
- disable Virtualisation in bios if you have it
- quirks page is not that bad as I bashed it in the beginning, sorry Richard :)

this got my system to suspend/resume - but still installed version doesn't
resume from suspend. I'll wait for official Fedora 7 and try it then again.

Comment 33 Valent Turkovic 2007-05-28 10:33:21 UTC
I can try installing 3163 kernel on my existing fedora7 test 4 installation and
see what happens...

But I can't find 3163 kernel anywhere, just a bunch of dead links.
http://www.google.com/search?q=kernel-2.6.21-1.3163.fc7.i686.rpm&hl=en

Can you help me out? Where can I download older kernels for F7?

Comment 35 Valent Turkovic 2007-05-28 13:35:42 UTC
Ok, I managed to install 3163 kernel from koji:
http://koji.fedoraproject.org/packages/kernel/2.6.21/1.3163.fc7/i686/kernel-2.6.21-1.3163.fc7.i686.rpm

and after reboot and quirks in place my fedora 7 test 4 still freezes on resume!
It suspends ok - power led blinks, but can't resume.

I did this:

rmmod iwl3945
pm-suspend

with these quirks in place:

$ lshal|grep quirk
  power_management.quirk.vbe_post = true  (bool)
  power_management.quirk.vbemode_restore = true  (bool)

any ideas?

Comment 36 Richard Hughes 2007-05-28 15:39:52 UTC
(In reply to comment #35)
> rmmod iwl3945
> pm-suspend
> 
> with these quirks in place:
> 
> $ lshal|grep quirk
>   power_management.quirk.vbe_post = true  (bool)
>   power_management.quirk.vbemode_restore = true  (bool)

pm-suspend does not read the quirk database - it's the other way round. If you
use gnome-power-manager (or anything that uses hal) then the quirks get set,
else no quirks are used unless you use --config-options.

Richard.


Comment 37 Valent Turkovic 2007-05-28 18:54:17 UTC
ok, my bad. I wrote "pm-suspend" but I actually did go to Power Manager and
clicked on suspend. It is just easier for me to write "pm-suspend" and I didn't
know that pm-suspend doesn't catch hal config files... ok, I'll retry the
suspend again for each case...

Comment 38 Valent Turkovic 2007-05-28 21:04:38 UTC
I just finished installing, updating, testing, rebooting... and after 5 hours of
testing I can claim that the current F7 kernel 3194 has a major bug preventing
laptops to resume.

I installed Fedora Live CD 20070517 with kernel 3163 on my HP Compaq nx7300
laptop and suspend works great with quirks (I just sent patches for HAL
regarding this). After updating to latest updated version of all packages except
kernel suspend/resume still works great.

When I update kernel to 3194 suspend works great but resume freezes the laptop.
There. :)

If you need more proof please tell me.

Comment 39 John W. Linville 2007-05-30 18:13:08 UTC
Please try this:

   echo "blacklist iwl3945" > /etc/modprobe.d/blacklist

Then reboot into 3194 or later kernel and do _not_ load the iwl3945.  Are you 
able to suspend/resume the laptop?

Comment 40 Valent Turkovic 2007-05-31 08:16:09 UTC
I tied, booted to 3194 and still it freezes on resume - suspend still works ok.

# lsmod |grep iwl
#

as you can see - module was successfully blacklisted.  

Comment 41 Valent Turkovic 2007-05-31 08:42:03 UTC
I tried devel kernel - 2.6.21-1.3209.fc7
the same issue - suspends ok, freezes on resume (with iwl3945 module blacklisted).

Comment 42 Valent Turkovic 2007-05-31 11:13:45 UTC
I tested one more thing with 3209 kernel, I added init=/bin/bash as a kernel
parameter. I guess that it to isolate X as an issue.

so when booted to console (with iwl3945 blacklisted) I tries:

pm-suspend
- suspend ok, on resume it freezes

pm-suspend --quirk-vbe-post --quirk-vbemode-restore
- suspend ok, on resume it freezes

so we can rule out X as an issue, right?

Comment 43 John W. Linville 2007-05-31 14:37:01 UTC
Sounds like problem is more general than simply iwl3945.

Comment 44 Valent Turkovic 2007-05-31 14:50:31 UTC
I never suspected that iwl3945 was the quilty party... because I can suspend and
resume ok with 3163 kernel - I thought that that was clear by my comments, but
iwl3945 needs to be blacklisted anyway. 

Comment 45 Dipankar Saha 2007-06-03 21:49:23 UTC
I was having the same problem with as mentioned. I found that the hibernation or
suspend does not work with Network connection on. I solved the problem by
turning on the Networnmanager and NetworkmangerDispatcher daemons on, which
automatically turns off the Networn connection before suspend and hibernation,
except that you need to reconnect the netowork connection after wake up. In
addition to above, for the case of suspend, I found that even if it wakes up the
screen is blank. At that time just do a switching like Ctrl+F2 and then come
back to Ctrl+F7. I get back the graphical window. This solves the problem with
suspend. 

Comment 46 Valent Turkovic 2007-06-04 07:40:04 UTC
Dipankar, do you have also HP Compaq nx7300 laptop? My laptops freezes on
resume, and you say your doesn't freeze on resume - but you just get a blank
screen...
To me your issues seams to be easily dealt with some pm-suspend quirks and mine
issues doesn't seam as trivial. So I guess that you have completely different
hardware and completely different issue... am I right?

Comment 47 Valent Turkovic 2007-06-09 09:44:32 UTC
I tested kernel 2.6.21-1.3213.fc8 and guess what -  suspend and resume works ok!
please check this bug:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=241310

Comment 48 Jon Stanley 2008-01-05 02:29:04 UTC
*** Bug 312981 has been marked as a duplicate of this bug. ***

Comment 49 Jon Stanley 2008-01-05 02:35:50 UTC
In the bug that I just closed as a duplicate of this, if you unload b44 prior to
suspend things work normally.  Please confirm that is the case here, and update
if it is, if you are still having the problem.

Comment 50 Valent Turkovic 2008-01-10 21:49:32 UTC
On fedora 8 with latest updates suspend and resume JustWork without any extra
hacking.

Comment 51 Valent Turkovic 2008-01-10 21:52:46 UTC
Bug 312981 if for postef for 64bit platform so maybe there is some difference
between these two bugs.

Comment 52 Christopher Brown 2008-01-16 23:08:44 UTC
Hello,

I'm reviewing this bug as part of the kernel bug triage project, an attempt to
isolate current bugs in the Fedora kernel.

http://fedoraproject.org/wiki/KernelBugTriage

This issue appears to resolved as per comment #47. Please re-open if this is not
the case -thank you for taking the time to file the original bug.

Comment 53 Valent Turkovic 2008-01-17 13:43:09 UTC
no problem