public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* wakeup_pmode_return jmp failing?
@ 2004-12-03 15:22 Mike Waychison
  2004-12-03 17:07 ` Bill Davidsen
  2004-12-06 13:34 ` Pavel Machek
  0 siblings, 2 replies; 8+ messages in thread
From: Mike Waychison @ 2004-12-03 15:22 UTC (permalink / raw)
  To: Linux kernel

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

Hello,

Not sure who to direct this to.  I've been trying to get acpi s3 to work
on my pentium M laptop (tecra m2).  Without the nvidia driver loaded, I
can echo 3 > /proc/acpi/sleep and the machine does indeed suspend (power
light throbs and all).  However, when I try to wake up the thing, it
would flash the bios screen and throw me back to grub.

I've been investigating the code at arch/i386/kernel/acpi/wakeup.S, and
have discovered that if I place a busy wait directory before the ljmpl
to wakeup_pmode_return, that I indeed do see 'Lin' on the screen instead
of the bios screen.

The joke is, if I place a busy wait first thing after the
wakeup_pmode_return label, it never gets executed and I get a regular boot.

It would appear as though the jump from 16bit code into the 32bit code
is failing and the bios is kicking in with a regular startup.

Anybody have any suggestions?

- --
Mike Waychison
Sun Microsystems, Inc.
1 (650) 352-5299 voice
1 (416) 202-8336 voice

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTICE:  The opinions expressed in this email are held by me,
and may not represent the views of Sun Microsystems, Inc.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBsIS0dQs4kOxk3/MRAjlMAJ9HZus6LJ7oTj/OYpzn+D9nle0fsACghVot
tpOzjmA3Klxvyig/SIMr+xo=
=LvHT
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: wakeup_pmode_return jmp failing?
  2004-12-03 17:07 ` Bill Davidsen
@ 2004-12-03 17:04   ` Mike Waychison
  2004-12-05  3:04     ` Matthew Garrett
  2004-12-05  2:56   ` Matthew Garrett
  2004-12-06 13:36   ` Pavel Machek
  2 siblings, 1 reply; 8+ messages in thread
From: Mike Waychison @ 2004-12-03 17:04 UTC (permalink / raw)
  To: Bill Davidsen; +Cc: Linux kernel

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

Bill Davidsen wrote:
> Mike Waychison wrote:
> 
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Hello,
>>
>> Not sure who to direct this to.  I've been trying to get acpi s3 to work
>> on my pentium M laptop (tecra m2).  Without the nvidia driver loaded, I
>> can echo 3 > /proc/acpi/sleep and the machine does indeed suspend (power
>> light throbs and all).  However, when I try to wake up the thing, it
>> would flash the bios screen and throw me back to grub.
>>
>> I've been investigating the code at arch/i386/kernel/acpi/wakeup.S, and
>> have discovered that if I place a busy wait directory before the ljmpl
>> to wakeup_pmode_return, that I indeed do see 'Lin' on the screen instead
>> of the bios screen.
>>
>> The joke is, if I place a busy wait first thing after the
>> wakeup_pmode_return label, it never gets executed and I get a regular
>> boot.
>>
>> It would appear as though the jump from 16bit code into the 32bit code
>> is failing and the bios is kicking in with a regular startup.
>>
>> Anybody have any suggestions?
> 
> 
> Install a 2.4 kernel with apm enabled and use that.
> 
> That's serious, I have an IBM, Tecra, Dell, and Acer, and 5-6 friends
> running Linux on laptops. Every one (other than the Acer) works with
> "apm -s" and recovers. Some work with "apm -S". The Acer never had a 2.4
> kernel, and I haven't rebuilt with apm on 2.6 (or even looked to see if
> it was supported). All of these suspend fine with ACPI, none ever wakes up.

FWIW, my last attempts (months ago) at getting suspend to work with acpi
on 2.4 appeared to fail the same way.  That is, when I could get the
machine to boot properly with acpi enabled.

> 
> Is suspend even supposed to be generally functional? I thought it was a
> WIP not expected to work except on certain models which have been hand
> tuned by the developers. In fact I have a message somewhere saying you
> have to get out of X to a text console, manually shutdown the network,
> and then it might work. Then start everything up again.
> 

Well, I'm doing this with no X, no network, no usb.  Like I said, it
appears to suspend fine, but fails in the early wakeup code.

- --
Mike Waychison
Sun Microsystems, Inc.
1 (650) 352-5299 voice
1 (416) 202-8336 voice

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTICE:  The opinions expressed in this email are held by me,
and may not represent the views of Sun Microsystems, Inc.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBsJyWdQs4kOxk3/MRAvm0AKCaMgXg5KZDi6h8bOjWlwml+HlzlQCfRjzV
1rLlgYtJ4dY4e3N1EsQmOsg=
=qtoe
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: wakeup_pmode_return jmp failing?
  2004-12-03 15:22 wakeup_pmode_return jmp failing? Mike Waychison
@ 2004-12-03 17:07 ` Bill Davidsen
  2004-12-03 17:04   ` Mike Waychison
                     ` (2 more replies)
  2004-12-06 13:34 ` Pavel Machek
  1 sibling, 3 replies; 8+ messages in thread
From: Bill Davidsen @ 2004-12-03 17:07 UTC (permalink / raw)
  To: Mike Waychison; +Cc: Linux kernel

Mike Waychison wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hello,
> 
> Not sure who to direct this to.  I've been trying to get acpi s3 to work
> on my pentium M laptop (tecra m2).  Without the nvidia driver loaded, I
> can echo 3 > /proc/acpi/sleep and the machine does indeed suspend (power
> light throbs and all).  However, when I try to wake up the thing, it
> would flash the bios screen and throw me back to grub.
> 
> I've been investigating the code at arch/i386/kernel/acpi/wakeup.S, and
> have discovered that if I place a busy wait directory before the ljmpl
> to wakeup_pmode_return, that I indeed do see 'Lin' on the screen instead
> of the bios screen.
> 
> The joke is, if I place a busy wait first thing after the
> wakeup_pmode_return label, it never gets executed and I get a regular boot.
> 
> It would appear as though the jump from 16bit code into the 32bit code
> is failing and the bios is kicking in with a regular startup.
> 
> Anybody have any suggestions?

Install a 2.4 kernel with apm enabled and use that.

That's serious, I have an IBM, Tecra, Dell, and Acer, and 5-6 friends 
running Linux on laptops. Every one (other than the Acer) works with 
"apm -s" and recovers. Some work with "apm -S". The Acer never had a 2.4 
kernel, and I haven't rebuilt with apm on 2.6 (or even looked to see if 
it was supported). All of these suspend fine with ACPI, none ever wakes up.

Is suspend even supposed to be generally functional? I thought it was a 
WIP not expected to work except on certain models which have been hand 
tuned by the developers. In fact I have a message somewhere saying you 
have to get out of X to a text console, manually shutdown the network, 
and then it might work. Then start everything up again.

-- 
bill davidsen <davidsen@tmr.com>
   CTO TMR Associates, Inc
   Doing interesting things with small computers since 1979

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: wakeup_pmode_return jmp failing?
  2004-12-03 17:07 ` Bill Davidsen
  2004-12-03 17:04   ` Mike Waychison
@ 2004-12-05  2:56   ` Matthew Garrett
  2004-12-06 13:36   ` Pavel Machek
  2 siblings, 0 replies; 8+ messages in thread
From: Matthew Garrett @ 2004-12-05  2:56 UTC (permalink / raw)
  To: Bill Davidsen, linux-kernel

Bill Davidsen <davidsen@tmr.com> wrote:

> That's serious, I have an IBM, Tecra, Dell, and Acer, and 5-6 friends 
> running Linux on laptops. Every one (other than the Acer) works with 
> "apm -s" and recovers. Some work with "apm -S". The Acer never had a 2.4 
> kernel, and I haven't rebuilt with apm on 2.6 (or even looked to see if 
> it was supported). All of these suspend fine with ACPI, none ever wakes up.

Most modern hardware doesn't have APM support any more. Tracking these
bugs down is important, otherwise we'll never be able to support
anything that people can actually buy.

For what it's worth, ACPI suspend/resume seems to work on most machines
as of 2.6.9 - the major sticking point is restoring video state, and the
small number of pieces of hardware that still have basic suspend/resume
issues (a lot of VIA-based hardware, at least one HP device). Based on
my tests so far, around 70% of machines ought to have a semi-reasonable
chance of working ACPI S3 nowadays.

-- 
Matthew Garrett | mjg59-chiark.mail.linux-rutgers.kernel@srcf.ucam.org

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: wakeup_pmode_return jmp failing?
  2004-12-03 17:04   ` Mike Waychison
@ 2004-12-05  3:04     ` Matthew Garrett
  0 siblings, 0 replies; 8+ messages in thread
From: Matthew Garrett @ 2004-12-05  3:04 UTC (permalink / raw)
  To: Mike Waychison, linux-kernel

Mike Waychison <Michael.Waychison@Sun.COM> wrote:

> FWIW, my last attempts (months ago) at getting suspend to work with acpi
> on 2.4 appeared to fail the same way.  That is, when I could get the
> machine to boot properly with acpi enabled.

ACPI suspend on 2.4 certainly won't work. There's no significant amount
of support for device suspend/resume.

> Well, I'm doing this with no X, no network, no usb.  Like I said, it
> appears to suspend fine, but fails in the early wakeup code.

It would be interesting if you have any luck in tracking this down. I'm
having vaguely similar issues with another piece of hardware (S3 works
fine on my Thinkpad), though it seems to reboot before any 16 bit code
is run. http://bugzilla.kernel.org/show_bug.cgi?id=3691 is the bugzilla
entry for that one.

-- 
Matthew Garrett | mjg59-chiark.mail.linux-rutgers.kernel@srcf.ucam.org

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: wakeup_pmode_return jmp failing?
  2004-12-03 15:22 wakeup_pmode_return jmp failing? Mike Waychison
  2004-12-03 17:07 ` Bill Davidsen
@ 2004-12-06 13:34 ` Pavel Machek
  2004-12-07  3:39   ` Mike Waychison
  1 sibling, 1 reply; 8+ messages in thread
From: Pavel Machek @ 2004-12-06 13:34 UTC (permalink / raw)
  To: Mike Waychison; +Cc: Linux kernel

Hi!

> Not sure who to direct this to.  I've been trying to get acpi s3 to work
> on my pentium M laptop (tecra m2).  Without the nvidia driver loaded, I
> can echo 3 > /proc/acpi/sleep and the machine does indeed suspend (power
> light throbs and all).  However, when I try to wake up the thing, it
> would flash the bios screen and throw me back to grub.
> 
> I've been investigating the code at arch/i386/kernel/acpi/wakeup.S, and
> have discovered that if I place a busy wait directory before the ljmpl
> to wakeup_pmode_return, that I indeed do see 'Lin' on the screen instead
> of the bios screen.
> 
> The joke is, if I place a busy wait first thing after the
> wakeup_pmode_return label, it never gets executed and I get a regular boot.
> 
> It would appear as though the jump from 16bit code into the 32bit code
> is failing and the bios is kicking in with a regular startup.

See archives of linux-acpi lists.
								Pavel
-- 
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: wakeup_pmode_return jmp failing?
  2004-12-03 17:07 ` Bill Davidsen
  2004-12-03 17:04   ` Mike Waychison
  2004-12-05  2:56   ` Matthew Garrett
@ 2004-12-06 13:36   ` Pavel Machek
  2 siblings, 0 replies; 8+ messages in thread
From: Pavel Machek @ 2004-12-06 13:36 UTC (permalink / raw)
  To: Bill Davidsen; +Cc: Mike Waychison, Linux kernel

Hi!

> Is suspend even supposed to be generally functional? I thought it was a 
> WIP not expected to work except on certain models which have been
> hand 

Suspend to work should work, only thing that needs to be hand-tuned is
video resume. But when he sees "Lin", video is not problem for him.

								Pavel
-- 
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: wakeup_pmode_return jmp failing?
  2004-12-06 13:34 ` Pavel Machek
@ 2004-12-07  3:39   ` Mike Waychison
  0 siblings, 0 replies; 8+ messages in thread
From: Mike Waychison @ 2004-12-07  3:39 UTC (permalink / raw)
  To: Pavel Machek; +Cc: Linux kernel, Hiroshi 2 Itoh

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

Pavel Machek wrote:
> Hi!
> 
> 
>>Not sure who to direct this to.  I've been trying to get acpi s3 to work
>>on my pentium M laptop (tecra m2).  Without the nvidia driver loaded, I
>>can echo 3 > /proc/acpi/sleep and the machine does indeed suspend (power
>>light throbs and all).  However, when I try to wake up the thing, it
>>would flash the bios screen and throw me back to grub.
>>
>>I've been investigating the code at arch/i386/kernel/acpi/wakeup.S, and
>>have discovered that if I place a busy wait directory before the ljmpl
>>to wakeup_pmode_return, that I indeed do see 'Lin' on the screen instead
>>of the bios screen.
>>
>>The joke is, if I place a busy wait first thing after the
>>wakeup_pmode_return label, it never gets executed and I get a regular boot.
>>
>>It would appear as though the jump from 16bit code into the 32bit code
>>is failing and the bios is kicking in with a regular startup.
> 
> 
> See archives of linux-acpi lists.
> 								Pavel

FYI, Hiro's patch that copies the GDT to the resume page did the trick:

http://marc.theaimsgroup.com/?l=acpi4linux&m=109813262218004&w=2

Thanks,

- --
Mike Waychison
Sun Microsystems, Inc.
1 (650) 352-5299 voice
1 (416) 202-8336 voice

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTICE:  The opinions expressed in this email are held by me,
and may not represent the views of Sun Microsystems, Inc.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBtSXydQs4kOxk3/MRAlYIAJ9iDnQArL4Bo+GQYCPGrxM8bU36bwCdEhjD
LcoeEeWMkWcNynBARz/nKsU=
=Zcxz
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-12-07  3:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-03 15:22 wakeup_pmode_return jmp failing? Mike Waychison
2004-12-03 17:07 ` Bill Davidsen
2004-12-03 17:04   ` Mike Waychison
2004-12-05  3:04     ` Matthew Garrett
2004-12-05  2:56   ` Matthew Garrett
2004-12-06 13:36   ` Pavel Machek
2004-12-06 13:34 ` Pavel Machek
2004-12-07  3:39   ` Mike Waychison

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox