[Gigabyte M57SLI-S4] Ubuntu 12.10 immediately wakes up after suspend

Bug #1133835 reported by David Tombs
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Linux
Unknown
Unknown
linux (Ubuntu)
Incomplete
Low
Unassigned

Bug Description

Since upgrading from 12.04 to 12.10 my computer immediately wakes up after suspend.

WORKAROUND: echo 0 > /sys/power/pm_async
(added to /etc/rc.local to be permanent)

I have tested:
* Stock Precise 3.2.0-23.36-generic: NOT reproducible
* Stock Precise 3.5.0-18.29-generic: reproducible
* Stock Quantal 3.5.0-25-generic: reproducible
* Stock Raring 3.8.0-29-generic: reproducible
* Mainline 3.8.6-030806-generic: NOT reproducible (suspend works fine)
* Mainline 3.8.7-030807-generic: reproducible
* Stock Saucy 3.11.0-12-generic: reproducible

Adding 'no_console_suspend' parameter and suspending from command line per [0] makes no difference.

Suspicious dmesg lines:

[ 109.856369] ata3.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[ 109.856377] ata3.00: failed command: STANDBY IMMEDIATE
[ 109.856383] ata3.00: cmd e0/00:00:00:00:00/00:00:00:00:00/a0 tag 0
[ 109.856383] res 40/00:01:00:00:00/00:00:00:00:00/40 Emask 0x4 (timeout)
[ 109.856389] ata3.00: status: { DRDY }
[ 109.856395] ata3: hard resetting link
[ 109.856396] ata3: nv: skipping hardreset on occupied port
[ 110.324159] ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[ 113.133280] ata3.00: configured for UDMA/133
[ 113.133284] ata3.00: device reported invalid CHS sector 0
[ 113.133291] ata3: EH complete
[ 113.133303] sd 3:0:0:0: [sda] START_STOP FAILED
[ 113.133305] sd 3:0:0:0: [sda]
[ 113.133307] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 113.133309] sd 3:0:0:0: [sda]
[ 113.133311] Sense Key : Aborted Command [current] [descriptor]
[ 113.133314] sd 3:0:0:0: [sda]
[ 113.133315] Add. Sense: No additional sense information
[ 113.133327] dpm_run_callback(): scsi_bus_suspend+0x0/0x20 returns 134217730
[ 113.133335] PM: suspend of drv:sd dev:3:0:0:0 complete after 34232.562 msecs
[ 113.133340] PM: Device 3:0:0:0 failed to suspend async: error 134217730
[ 113.133377] PM: Some devices failed to suspend

[0] https://wiki.ubuntu.com/DebuggingKernelSuspendHibernateResume

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: linux-image-3.5.0-25-generic 3.5.0-25.38
ProcVersionSignature: Ubuntu 3.5.0-25.38-generic 3.5.7.4
Uname: Linux 3.5.0-25-generic x86_64
ApportVersion: 2.6.1-0ubuntu10
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC2: david 3568 F.... pulseaudio
 /dev/snd/controlC0: david 3568 F.... pulseaudio
 /dev/snd/controlC1: david 3568 F.... pulseaudio
CRDA: Error: command ['iw', 'reg', 'get'] failed with exit code 1: nl80211 not found.
Date: Tue Feb 26 21:34:29 2013
HibernationDevice: RESUME=UUID=4654b040-659b-4861-9aa0-cef295981b15
IwConfig:
 eth0 no wireless extensions.

 lo no wireless extensions.
MarkForUpload: True
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcFB: 0 radeondrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.5.0-25-generic root=UUID=cb832714-a26f-4f20-a85f-de2b92164bcb ro no_console_suspend
RelatedPackageVersions:
 linux-restricted-modules-3.5.0-25-generic N/A
 linux-backports-modules-3.5.0-25-generic N/A
 linux-firmware 1.95
RfKill:

SourcePackage: linux
UpgradeStatus: Upgraded to quantal on 2013-02-24 (2 days ago)
WpaSupplicantLog:

dmi.bios.date: 02/10/2010
dmi.bios.vendor: Award Software International, Inc.
dmi.bios.version: FHm
dmi.board.name: M57SLI-S4
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.board.version: x.x
dmi.chassis.type: 3
dmi.modalias: dmi:bvnAwardSoftwareInternational,Inc.:bvrFHm:bd02/10/2010:svn:pn:pvr:rvnGigabyteTechnologyCo.,Ltd.:rnM57SLI-S4:rvrx.x:cvn:ct3:cvr:

Revision history for this message
David Tombs (dgtombs) wrote :
Revision history for this message
David Tombs (dgtombs) wrote :

Actually, it seems to work rarely. Here's a dmesg log from a successful (but slow) suspend. Still complaining about one of my disks.

---
Ubuntu Bug Squad volunteer triager
http://wiki.ubuntu.com/BugSquad

Revision history for this message
Brad Figg (brad-figg) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote : Re: Ubuntu 12.10 immediately wakes up after suspend

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v3.8 kernel[0] (Not a kernel in the daily directory) and install both the linux-image and linux-image-extra .deb packages.

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream'.
Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.8-raring/

Changed in linux (Ubuntu):
importance: Undecided → Medium
Revision history for this message
David Tombs (dgtombs) wrote :

Possibly related to bug 1065840 as we both use sata_nv.

Revision history for this message
David Tombs (dgtombs) wrote :

Suspend works as expected when booting into 3.2.0-38-generic leftover from my 12.04 install. Will try the upstream kernel shortly.

Revision history for this message
David Tombs (dgtombs) wrote :

Suspend also works as expected with mainline linux-image-3.8.1-030801-generic.

I also tested my normal kernel 3.5.0-25-generic without my normal virtualbox drivers but it still doesn't suspend properly.

David Tombs (dgtombs)
tags: added: kernel-fixed-upstream
penalvch (penalvch)
tags: added: regression-release
tags: added: kernel-fixed-upstream-v3.8
removed: kernel-fixed-upstream
Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
David Tombs (dgtombs) wrote :

Well, I could reproduce it in saucy but unfortunately I had no network connectivity in saucy so I couldn't run apport-collect. Is there anything else I can do to help?

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
penalvch (penalvch)
tags: added: saucy
Revision history for this message
David Tombs (dgtombs) wrote :

I can also reproduce this in Raring with linux 3.8.0-29-generic (mapping to mainline 3.8.13.5) so it would seem this problem is Ubuntu-specific.

---
Ubuntu Bug Squad volunteer triager
http://wiki.ubuntu.com/BugSquad

Revision history for this message
David Tombs (dgtombs) wrote :

Well this is interesting. I _can_ reproduce the issue with mainline 3.8.13-03081305-generic. I'll update the description with all the tests I have run.

---
Ubuntu Bug Squad volunteer triager
http://wiki.ubuntu.com/BugSquad

penalvch (penalvch)
tags: added: raring
tags: added: latest-bios-fhm
David Tombs (dgtombs)
description: updated
Revision history for this message
penalvch (penalvch) wrote :

David Tombs, the next step is to bisect the kernel from Precise to Quantal, in order to identify the offending regression commit. Could you please do this following https://wiki.ubuntu.com/Kernel/KernelBisection ?

tags: added: needs-upstream-testing
Changed in linux (Ubuntu):
status: Confirmed → Incomplete
tags: added: needs-bisect
Revision history for this message
David Tombs (dgtombs) wrote :

OK, working on it.

description: updated
description: updated
Revision history for this message
David Tombs (dgtombs) wrote :

It seems like linux 3.8 started out OK but broke at 3.8.11. I will bisect 3.8.10 and 3.8.11 to find the commit.

description: updated
Revision history for this message
DiegoRivera (diego-rivera) wrote :

This bug appears to be present in Saucy, using kernel 3.11.0-13 on x86_64 (x79 chipset).

Suspend works well for the most part, but sometimes it goes "stubborn" and wakes immediately after suspend is requested (I can confirm that there are no scripts returning non-zero from pm's sleep.d and such).

When it does work, it works like a charm (mostly, USB sometimes doesn't come back properly, but that's another story).

Revision history for this message
penalvch (penalvch) wrote :

DiegoRivera, if you have a bug in Ubuntu, the Ubuntu Kernel team, Ubuntu Bug Control team, and Ubuntu Bug Squad would like you to please file a new report by executing the following in a terminal while booted into a Ubuntu repository kernel (not a mainline one) via:
ubuntu-bug linux

For more on this, please read the official Ubuntu documentation:
Ubuntu Bug Control and Ubuntu Bug Squad: https://wiki.ubuntu.com/Bugs/BestPractices#X.2BAC8-Reporting.Focus_on_One_Issue
Ubuntu Kernel Team: https://wiki.ubuntu.com/KernelTeam/KernelTeamBugPolicies#Filing_Kernel_Bug_reports
Ubuntu Community: https://help.ubuntu.com/community/ReportingBugs#Bug_reporting_etiquette

When opening up the new report, please feel free to subscribe me to it.

Please note, not filing a new report would delay your problem being addressed as quickly as possible.

No need exists to comment here at this time. After reading the above documentation in it's entirety, if you have further questions or comments, you are welcome to redirect them to the appropriate mailing list or forum via http://www.ubuntu.com/support/community/mailinglists , or you may contact me directly.

Thank you for your understanding.

summary: - Ubuntu 12.10 immediately wakes up after suspend
+ [Gigabyte M57SLI-S4] Ubuntu 12.10 immediately wakes up after suspend
David Tombs (dgtombs)
description: updated
Revision history for this message
David Tombs (dgtombs) wrote :

It turned out mainline 3.8.10 was unreliable but 3.8.1 is still reliably good so all I know is something changed between 3.8.1 and 3.8.11.

In better news, I am confident that this is upsteam bug 48951. I also have an nvidia mcp5x controller and the workaround to disable async suspend (echo 0 > /sys/power/pm_async) has fixed this for me on stock Ubuntu kernel 3.8.0-34-generic.

So I'm calling this bug confirmed but the upstream bug is "won't fix" due to an unresponsive sata_nv maintainer. Please do whatever makes sense with this bug. Thank you.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
penalvch (penalvch)
description: updated
Revision history for this message
penalvch (penalvch) wrote :

David Tombs, it still would be immensely helpful to know which commit precisely caused this problem, as this typically gives developers more of a clue on how to fix it. Would this be ok?

Changed in linux (Ubuntu):
importance: Medium → Low
status: Confirmed → Incomplete
Revision history for this message
David Tombs (dgtombs) wrote :

Well, the upstream bug listed this commit as introducing the bug: 966f1212e1ac5fe3ddf04479d21488ddb36a2608

I think there are other commits that make it more or less likely to occur but it's very hard to track down. It's not consistently reproducible and very well might be a race condition since we're talking about an asynchronous process here.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
penalvch (penalvch) wrote :

David Tombs, could you please execute the following at a terminal, boot into the kernel, and advise to the results (the expectation is that this will not produce the problem):
cd ~/Desktop && git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-stable && cd linux-stable && git checkout 6015ff103133c7e50a753c198c69bcabc3a5e3b0 && cp /boot/config-`uname -r` .config && yes '' | make oldconfig && make-kpkg clean && CONCURRENCY_LEVEL=`getconf _NPROCESSORS_ONLN` fakeroot make-kpkg --initrd --append-to-version=-custom2 kernel_image kernel_headers && cd .. && sudo dpkg -i *.deb

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
David Tombs (dgtombs) wrote :

OK. Is it OK if I compile with CONFIG_DEBUG_INFO=n? I usually do.

Revision history for this message
penalvch (penalvch) wrote :

David Tombs, if you wouldn't mind, I would just perfrom the command verbatim, with no modifications in syntax.

Revision history for this message
David Tombs (dgtombs) wrote :

Oops, I already compiled it by time you replied without CONFIG_DEBUG_INFO and have been testing since. Suspend seems to work fine with this build. I'm curious, where did you come up with that commit?

I'll leave this as Incomplete per your previous comment. If you want me to rebuild with completely the same config I will.

Revision history for this message
penalvch (penalvch) wrote :

David Tombs, thank you for testing the requested kernel. Now, could you please delete the .deb files you recently created, and execute the following via a terminal (the expectation is that this kernel would demonstrate this problem):
cd ~/Desktop/linux-stable && git checkout 966f1212e1ac5fe3ddf04479d21488ddb36a2608 && cp /boot/config-`uname -r` .config && yes '' | make oldconfig && make-kpkg clean && CONCURRENCY_LEVEL=`getconf _NPROCESSORS_ONLN` fakeroot make-kpkg --initrd --append-to-version=-custom3 kernel_image kernel_headers && cd .. && sudo dpkg -i *.deb

Revision history for this message
David Tombs (dgtombs) wrote :

Actually, I don't expect to demonstrate the problem with that commit since v3.8.1 is fine. That commit just made the problem _possible_, everything else just makes it more or less likely. As the upstream report says, "I found that reverting
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=966f1212e1ac5fe3ddf04479d21488ddb36a2608
on top of linux 3.5.5 fixes the problem."

So I think a real test would be compiling the current stock Ubuntu kernel (3.8.0-34-generic), demonstrating the problem, then reverting that commit and showing that it fixes the problem.

But I'm building 966f1212e1ac5fe3ddf04479d21488ddb36a2608 now per your instructions.

Revision history for this message
David Tombs (dgtombs) wrote :

Hey, is your intent to confirm that the upstream bug is the same or to find the specific commit that caused the bug Or something else?

David Tombs (dgtombs)
description: updated
David Tombs (dgtombs)
description: updated
David Tombs (dgtombs)
description: updated
Revision history for this message
David Tombs (dgtombs) wrote :

Hi Christopher, would you mind answering my question above about your intent?

I haven't tested yet with my 966f1212e1ac5fe3ddf04479d21488ddb36a2608 build and am trying to find the mainline 3.8.x version where suspend broke for me.

David Tombs (dgtombs)
description: updated
Revision history for this message
David Tombs (dgtombs) wrote :

It seems this broke in mainline 3.8 between 3.8.6 and 3.8.7. I am running with 3.8.6 now and have not had a suspend failure yet.

That said, Christopher, I don't think I have any more time to debug this, especially if you are unwilling to work with me on on finding the right strategy. I feel like I am spinning my wheels now. I suppose we can just let this bug expire since the upstream bug is "won't fix" anyway.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.