All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Len Brown <lenb@kernel.org>,
	Jeff Chua <jeff.chua.linux@gmail.com>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	Linux-pm mailing list <linux-pm@lists.linux-foundation.org>
Subject: Re: Occasional (too common) suspend problem
Date: Sat, 22 Jan 2011 11:10:17 +0100	[thread overview]
Message-ID: <201101221110.17786.rjw@sisk.pl> (raw)
In-Reply-To: <AANLkTikv55eQfNaCGLm-2pA3Ndyi9ZEzb4xn64D3u0ww@mail.gmail.com>

On Saturday, January 22, 2011, Linus Torvalds wrote:
> On Fri, Jan 21, 2011 at 4:23 PM, Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
> >
> > Or - and perhaps more likely - it's connected to the lid event, and
> > how that interacts with user space and then eventually triggers the
> > sleep event (which is quite likely - as mentioned, I think I've only
> > ever seen the problem when I'm physically at the machine).
> 
> .. but with the 'test' suspend (echo core ..), the lid event is all
> good too. And going back to non-testing (echo none ..), it works too.
> 
> Which really does seem to get me back to the whole "if it fails, it
> seems to fail on the first suspend" thing. Don't ask me why. I have no
> idea. But I just suspended that machine 100+ times using the test
> thing (60 times at the gdm prompt, 60 times while logged in and with
> glxgears running to verify dri/thermal interfaces), and then a couple
> of times with the lid, and it all worked.
> 
> But I bet that if I rebooted the machine a few times, it would
> eventually fail on the first suspend.
> 
> Some initialization issue, perhaps?

Very likely.

I have a theory, which is that on failing runs your system doesn't even try
to enter S3 and it's trying to enter a bogus S1 instead.

The reason why I think so is that the "Back to C!" message is not present in
the failing log and there's nothing in particular that can really fail in
acpi_enter_sleep_state() (I don't really expect register writes or reads to
fail, which is about the only thing that might cause this function to return
an error code).  Moreover, I'd expect the system to come back from S1 after a
key press.

A couple of things may be done to verify this.  First, before suspending for
the first time after a reboot, you can check if there's "standby" in
/sys/power/state (it shouldn't be there, because your "good" dmesg says S1
isn't supported).  Second, after a failing run that was revived by a key press
you can check if there's S1 instead of S3 in the "ACPI: Preparing to enter
system sleep state ..." message.  Finally, which I suspect is the case, it is
possible that we don't even try to enter S1, but something confuses the BIOS
which thinks it should go into S1 although it's told to go into S3.

Now, if the BIOS is confused, I have no idea what may be the reason, but I
think it would be good to rule out the change from ioremap() to
ioremap_cache() in ACPI (as I said before, it's sufficient to modify
include/linux/acpi_io.h for this purpose so that ioremap() is called by
acpi_os_ioremap() - unless you have done that already in which case sorry for
the noise).

Rafael

  reply	other threads:[~2011-01-22 10:10 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-21  4:50 Occasional (too common) suspend problem Linus Torvalds
     [not found] ` <AANLkTi=LyufFJ-zqMWdGnSnZ-iW+ONbQ8mLfTn1O5WVi@mail.gmail.com>
2011-01-21  5:26   ` Lin Ming
2011-01-21  5:26   ` [linux-pm] " Lin Ming
2011-01-21 16:28     ` Linus Torvalds
2011-01-21 17:09       ` [linux-pm] " Jeff Chua
2011-01-21 17:09       ` Jeff Chua
2011-01-21 20:54       ` [linux-pm] " Rafael J. Wysocki
2011-01-21 20:54       ` Rafael J. Wysocki
2011-01-21  7:26 ` Zhang Rui
2011-01-21  7:26 ` Zhang Rui
2011-01-21 21:00 ` Len Brown
2011-01-21 21:08   ` Rafael J. Wysocki
2011-01-21 21:08   ` Rafael J. Wysocki
2011-01-21 22:25   ` Len Brown
2011-01-21 22:33     ` Linus Torvalds
2011-01-21 22:42       ` Rafael J. Wysocki
2011-01-21 22:55         ` Linus Torvalds
2011-01-21 23:16           ` Rafael J. Wysocki
2011-01-21 23:16           ` Rafael J. Wysocki
2011-01-21 23:28             ` [linux-pm] " Rafael J. Wysocki
2011-01-21 23:28             ` Rafael J. Wysocki
2011-01-22  0:23             ` Linus Torvalds
2011-01-22  0:23             ` Linus Torvalds
2011-01-22  0:31               ` Rafael J. Wysocki
2011-01-22  0:56                 ` Linus Torvalds
2011-01-22  0:56                 ` Linus Torvalds
2011-01-22  0:31               ` Rafael J. Wysocki
2011-01-22  1:14               ` Linus Torvalds
2011-01-22  1:14               ` Linus Torvalds
2011-01-22 10:10                 ` Rafael J. Wysocki [this message]
2011-01-22 15:11                   ` Linus Torvalds
2011-01-22 15:11                   ` Linus Torvalds
2011-01-22 16:27                     ` Linus Torvalds
2011-01-22 16:27                     ` Linus Torvalds
2011-01-22 17:13                       ` Jeff Chua
2011-01-22 18:22                         ` Linus Torvalds
2011-01-22 18:22                         ` Linus Torvalds
2011-01-22 17:13                       ` Jeff Chua
2011-01-22 19:17                       ` Rafael J. Wysocki
2011-01-22 19:42                         ` Linus Torvalds
2011-01-22 19:42                         ` Linus Torvalds
2011-01-23 21:29                           ` Rafael J. Wysocki
2011-01-23 21:29                           ` Rafael J. Wysocki
2011-01-23 21:47                             ` [linux-pm] " Rafael J. Wysocki
2011-01-23 21:47                             ` Rafael J. Wysocki
2011-01-24  7:22                             ` Linus Torvalds
2011-01-24  8:09                               ` Zhang Rui
2011-01-24  8:09                               ` Zhang Rui
2011-01-24  9:43                                 ` Linus Torvalds
2011-01-24  9:43                                 ` Linus Torvalds
2011-01-24  7:22                             ` Linus Torvalds
2011-01-22 19:17                       ` Rafael J. Wysocki
2011-01-23  1:02                       ` Dave Airlie
2011-01-23  1:02                       ` Dave Airlie
2011-01-22 10:10                 ` Rafael J. Wysocki
2011-01-21 22:55         ` Linus Torvalds
2011-01-21 22:42       ` Rafael J. Wysocki
2011-01-21 22:33     ` Linus Torvalds
2011-01-21 22:25   ` Len Brown
2011-01-21 21:00 ` Len Brown
  -- strict thread matches above, loose matches on Subject: below --
2011-01-21  4:50 Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201101221110.17786.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=jeff.chua.linux@gmail.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.