Skip to contentSkip to conversation

In-kernel swsusp broken

2.6.10-rc2 Joshua Kwan 1 participant 4 messages Nov 19, 2004 – Dec 4, 2004 3 messages not in the archive Sound

lore
Share & tools
lore
#0 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

It seems that as of 2.6.10-rc2 my laptop no longer is able to suspend to disk with an echo disk > /sys/power/state. It goes to freeing memory, and then blanks the screen. Usually, the screen will turn on again, it will write data to the swap partition then power off by itself, but instead, the screen stays off, the CPU starts going wild, and a hard reset is necessary. It used to work in 2.6.10-rc1.

Is there any help I can provide with this? It looks like I will have to binary search between rc1 and rc2, but I won't have time for that until next week...

Thanks

- --
Joshua Kwan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iQIVAwUBQZ3CTKOILr94RG8mAQJLORAApFCdXmypSd01waNJIoL+p+mkqVo3CR7N Y/234lWewXAOODjdpAPafjD3LFa9ycQCcxuGXB9dkYI2OHVCHxREGdyRVeFiPb5j jN5hJp8JtDfLeionmdQr3yBSks+u4EjWpF4qWW75eK8pzPDoDsOp8xc3qhMvLFly mXLcGq2irLiLJ3blXCEmA1iM7RKFSsk60stMuCLJd/lbncIkeocu+HWUKz0P0Va1 9EEnfhcMNLTqj8idUcnQItEFDZFGagEIdGv4/8ISSTMfLhihObs35i6t1ub/Ay8e 1SzU2Ne7EzkDrV8Na2bm5AtVhh5thS3ekdn+n76k+hnlIHifa3lLG6a/EycDOYCP e0NGGqi0fy1QlVaX/ro+OQOsWIvfqwQusI5kNxBWnvdgx9kIO4HW4vm1elJaKaGp xDnJOAmFIKbrNmdTlxU6trbwRZ1nBHhPf58Nfkj97XS2kTBRhjXxeOmj288pVO87 teEwZAQFzovq0gW9T95pRSiiT+9guvRlGBTwpFPEZ940oVun9R+aqZpaxpRMC6Cn bgzoUpPe/OOtWQqYcaL5hbXXvAZ+8M10LXp7+GLYjKKQ1/QcSDdjbfDCEqb2ugGk iAQRLqd/Z85UP133xQeq9XYmk/qovsEOPppFuX48RQvb+wSC3yQUJ098nXRUKXjE ygG4nhUhrg0=
=peP5
-----END PGP SIGNATURE-----

#2 lore raw
In reply to a message not in the archive

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andrew Morton wrote:

| Joshua, any progress on this one?
|
| Thanks.

Yes, I've run through the BK snapshots and have discovered that something between 2.6.10-rc1-bk14 and 2.6.10-rc1-bk15 killed swsusp for me. I'm reviewing the interdiff now, which I've put up for reading convenience at

http://people.debian.org/~joshk/bk14-bk15.diff.bz2

Stay tuned.. I might find something!

- --
Joshua Kwan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iQIVAwUBQbEpbKOILr94RG8mAQJvGhAAy57ywx68+UwcoGdxa/hBRpfoZWvlPRpP 5Rg0tV/40Dz6tOmJ39NPZZi6+jKQqfOwRtFGA9xSQNm83T7Dd7EhpXEZQguCAAx8 8Jc3APwQVGa4mRpvif73gtZpjiP19uAzsKgXHAUbDeP9smJsAj18AY5/K96Mzm1y 3Gw3W68fn5e1C1Ae3B0DUdhkUey+NjFce6FZahrL4/NalACd7AP+sYf88FRJEiTG HW+5kvPpuM93ofAfx7pZD9rK/z2mAw+YHyM8I8CgJKL7hnSZTcSSBJqkY7QfXRyB IEtnqp7C9JzWtL+CmqBhV56DcZr8rlwTtI0hymMr3VFCVNazvC7HWg8rO/mddOAf EWONfNVWh260MUi+/DNZbTx10Z0vtuHNMmp0NOiCd4f/dnyLlYH1W2MUwWOm3zYK VYebrqUpZP/BGsdMFiN15yHTYJrJMowtY8aB52vA9MN7pqS/7SxYAsz81QJeT0EW jkuVNxEu0CMt96pbIXQ7WBeYo69ezPIB26v3nnk32xnBtqSTkpECN6Wi3gQh2Rml uJ5x2vJU845zyxVJYf6gQM17usMaIYTtcbQ8C34O6zGSEyFR/FyW4r7hK43f7FN3 v0oF/CdeHaZtJgjVe8AYuxyLvs4R3N35ibVvPdQV9ED2024V7ZbQLSQGj7nC1+G7 m7uIRi845+8=
=fwzq
-----END PGP SIGNATURE-----

#4 lore raw
In reply to a message not in the archive

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andrew Morton wrote:

|>Stay tuned.. I might find something!
|
|
| Cool, thanks.  I'll hold my breath ;)

Got it:

http://linux.bkbits.net:8080/linux-2.6/[email protected]

Reverting the bit of this that affects pci-driver.c fixes bk15 for me. 2.6.10-rc2 with this reverted also works.

Anything else you need? Could it be that a certain driver has a bad suspend function which is causing the hang? I'll try and come up with some debugging code to figure out where the hang is happening but I first have to disable PM for my framebuffer without breaking other things.

Hope this helps.

- --
Joshua Kwan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iQIVAwUBQbFKTaOILr94RG8mAQKBQQ//SGQxQh+EgiVhNUWQQMYWyss8/z+AFrO2 +7Y4TVU0L+CA9C3bYrPKUVXBIVHrASzJXoC6ayFVjxyBozV1gi7lX8PG0i8hGnL2 btoPdXOzDpwM99yyiQoPtkbUh5JLOstf+puX6QUPx9meJjXnrW6vsASuz6EEO/uG 2IKxLBi84eKMiQ4CwBFqHt881AYNfBl81HchzKkTdA3qs5XXdf3cy6z7nvGHOGWO nJvLBPNP4UzteC7cHqHseAVF9pUctTgwY6wBcsQKXuhVPcl+ITFVGhDMijKif485 WdKSbXVCtxaA/qQPQbLuWhpz4lEzmW0WQa1A4JfsNWCStiO92CVOqAo2wUwxsZgI zGiV9BipBChnA4GgvwBJgDlhSqwQsTvKGPLZMmAkNwiCyvm9PwiAEh1E1ZH5zpab Ce4nbp3Z0IWzriPY0UlN/eMBt8sxTInUw2yla/6qdV2Is1oS5gclWC5YACNcapLR j9OWTDV0JQRD+iM6i3VYYinqTvmochf8yC1CEhyuhl+aFErwYu69ZZESnHG+BEqJ wna2B+ktDFzPypmzTeYSNfHjbDu8SVVh3gpsZk6zx2/Lw0LJiCSzDeQ5E84RI26W 2kQMQIa1i6UiJae9Z42PSwiWSUTryl0UkHd0RExX7nFvkNkpl1XYHN8wandhU4IP tI20hnrtUG0=
=6DhP
-----END PGP SIGNATURE-----

Signature · 1 line
Joshua Kwan
#6 lore raw
In reply to a message not in the archive

[CC:ing Jaroslav, solution involving ALSA code is attached.]

Quoted 3 lines · Andrew Morton

Yes, if you could apply something like the below and see if we can see which driver is causing the problem? Make sure that CONFIG_PCI_NAMES is set...

Yeah, did that (didn't use yours), and apparently all the suspend functions return 0 but it died after pcibios_set_master on several devices - the last call succeeded (it was my intel8x0 sound card) and thereafter the hang occurred.

I noticed a recent -mm patch added

pci_disable_device(chip->pci);

in sound/pci/intel8x0.c -> intel8x0_suspend. Looks like that didn't help; I also had to add a pci_save_state(chip->pci) above that for suspend to work, mimicking the way USB seemed to handle suspending, and that worked! Had to do that for intel8x0m.c as well. I looked for other instances of disable_device in sound/pci and saw many pci_set_power_state(pdev, 3). Would that have a similar effect to saving the state? Should I have used that instead? Well, you be the judge...

I'm not really sure what to send a diff against, but I figure -rc3 is best so that other people can take advantage of the fix without having to patch to -mm first.

Signature · 1 line
Joshua Kwan
sound/pci/intel8x0.c renamed from sound/pci/intel8x0.c~ +2 -0
@@ -2279,6 +2279,8 @@
 	for (i = 0; i < 3; i++)
 		if (chip->ac97[i])
 			snd_ac97_suspend(chip->ac97[i]);
+	pci_save_state(chip->pci);
+	pci_disable_device(chip->pci);
 	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
 	return 0;
 }
sound/pci/intel8x0m.c renamed from sound/pci/intel8x0m.c~ +2 -0
@@ -1091,6 +1091,8 @@
 		snd_pcm_suspend_all(chip->pcm[i]);
 	if (chip->ac97)
 		snd_ac97_suspend(chip->ac97);
+	pci_save_state(chip->pci);
+	pci_disable_device(chip->pci);
 	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
 	return 0;
 }