linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 2.4.22 APM problems with IBM Thinkpad's
@ 2003-08-13 12:31 Ruben Puettmann
  2003-08-13 13:13 ` Mikael Pettersson
       [not found] ` <20030813131043.GA1112@deimos.one.pl>
  0 siblings, 2 replies; 13+ messages in thread
From: Ruben Puettmann @ 2003-08-13 12:31 UTC (permalink / raw)
  To: linux-kernel


    hy,

cause many problems with acpi I try to get apm running on my ibm
thinkpad R40 ( 2722). But with 2.4.22-pre10 and 2.4.22-pre10-ac1.

Problems which happend:

apm -s don't work with radeonfb usb and so on see my mails on lkm the
last days

If CONFIG_APM_DISPLAY_BLANK is Y the thinkpad freezed on blanking the
display

If CONFIG_APM_REAL_MODE_POWER_OFF is Y or N te thinkpad never power off


        Ruben




-- 
Ruben Puettmann
ruben@puettmann.net
http://www.puettmann.net

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

* Re: 2.4.22 APM problems with IBM Thinkpad's
  2003-08-13 12:31 2.4.22 APM problems with IBM Thinkpad's Ruben Puettmann
@ 2003-08-13 13:13 ` Mikael Pettersson
  2003-08-13 13:31   ` Ruben Puettmann
  2003-08-13 14:11   ` Alan Cox
       [not found] ` <20030813131043.GA1112@deimos.one.pl>
  1 sibling, 2 replies; 13+ messages in thread
From: Mikael Pettersson @ 2003-08-13 13:13 UTC (permalink / raw)
  To: Ruben Puettmann; +Cc: linux-kernel

Ruben Puettmann writes:
 > 
 >     hy,
 > 
 > cause many problems with acpi I try to get apm running on my ibm
 > thinkpad R40 ( 2722). But with 2.4.22-pre10 and 2.4.22-pre10-ac1.
 > 
 > Problems which happend:
 > 
 > apm -s don't work with radeonfb usb and so on see my mails on lkm the
 > last days
 > 
 > If CONFIG_APM_DISPLAY_BLANK is Y the thinkpad freezed on blanking the
 > display

This sounds like a well-known APM/local-APIC clash.

Never ever use DISPLAY_BLANK if you also have SMP or UP_APIC.

With APIC support enabled (SMP or UP_APIC), APM must be constrained:
DISPLAY_BLANK off
CPU_IDLE off
built-in driver, not module

This is because the apm driver does BIOS calls, and many BIOSen
(including the code in graphics cards, e.g. all Radeons it seems)
like to hang if a local APIC timer interrupt arrives.

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

* Re: 2.4.22 APM problems with IBM Thinkpad's
  2003-08-13 13:13 ` Mikael Pettersson
@ 2003-08-13 13:31   ` Ruben Puettmann
  2003-08-13 14:24     ` Mikael Pettersson
  2003-08-13 14:11   ` Alan Cox
  1 sibling, 1 reply; 13+ messages in thread
From: Ruben Puettmann @ 2003-08-13 13:31 UTC (permalink / raw)
  To: Mikael Pettersson; +Cc: linux-kernel

On Wed, Aug 13, 2003 at 03:13:02PM +0200, Mikael Pettersson wrote:
> 
> This sounds like a well-known APM/local-APIC clash.

nice to know ... 
> 
> Never ever use DISPLAY_BLANK if you also have SMP or UP_APIC.

not nice so ;-( how is it with acpi? Same problem?

> With APIC support enabled (SMP or UP_APIC), APM must be constrained:
> DISPLAY_BLANK off
> CPU_IDLE off
> built-in driver, not module

Why will this not be disabled in make *config so that nobody will run in
this problem?

> This is because the apm driver does BIOS calls, and many BIOSen
> (including the code in graphics cards, e.g. all Radeons it seems)
> like to hang if a local APIC timer interrupt arrives.

Yes radeonfb don't like apm -s on this thinkpad. apm -s works but on
resume it freezed some on

modprobe radeonfb;
sleep 10;
rmmod radeonfb;
sleep 10;
modprobe radeonfb;

and thinkpad freezed .


            Ruben

-- 
Ruben Puettmann
ruben@puettmann.net
http://www.puettmann.net

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

* Re: 2.4.22 APM problems with IBM Thinkpad's
       [not found] ` <20030813131043.GA1112@deimos.one.pl>
@ 2003-08-13 13:35   ` Ruben Puettmann
  0 siblings, 0 replies; 13+ messages in thread
From: Ruben Puettmann @ 2003-08-13 13:35 UTC (permalink / raw)
  To: Damian Ko?kowski; +Cc: linux-kernel

On Wed, Aug 13, 2003 at 03:10:43PM +0200, Damian Ko?kowski wrote:
> 
> Please send my your confog for 2.4.22-rc2, so I can help you.
> 
> Take care.
> 
> P.S. Have you run apcid or apmd?
> 
 I have try acpid with an acpi config but acpi is broken see :

http://bugzilla.kernel.org/show_bug.cgi?id=1038

but I hope it will run in the next weeks.

With apm I have running the apmd.

apm config: 

CONFIG_APM=y
# CONFIG_APM_IGNORE_USER_SUSPEND is not set
CONFIG_APM_DO_ENABLE=y
CONFIG_APM_CPU_IDLE=y
# CONFIG_APM_DISPLAY_BLANK is not set
# CONFIG_APM_RTC_IS_GMT is not set
CONFIG_APM_ALLOW_INTS=y
# CONFIG_APM_REAL_MODE_POWER_OFF is not set


        ruben

-- 
Ruben Puettmann
ruben@puettmann.net
http://www.puettmann.net

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

* Re: 2.4.22 APM problems with IBM Thinkpad's
  2003-08-13 13:13 ` Mikael Pettersson
  2003-08-13 13:31   ` Ruben Puettmann
@ 2003-08-13 14:11   ` Alan Cox
  2003-08-13 14:32     ` Mikael Pettersson
                       ` (2 more replies)
  1 sibling, 3 replies; 13+ messages in thread
From: Alan Cox @ 2003-08-13 14:11 UTC (permalink / raw)
  To: Mikael Pettersson; +Cc: Ruben Puettmann, Linux Kernel Mailing List

On Mer, 2003-08-13 at 14:13, Mikael Pettersson wrote:
> With APIC support enabled (SMP or UP_APIC), APM must be constrained:
> DISPLAY_BLANK off
> CPU_IDLE off
> built-in driver, not module

This isnt sufficient because some of the SMM traps off the FN-key 
sequences also crash thinkpads if APIC is enabled. Basically *dont use
local apic* except on SMP.



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

* Re: 2.4.22 APM problems with IBM Thinkpad's
  2003-08-13 13:31   ` Ruben Puettmann
@ 2003-08-13 14:24     ` Mikael Pettersson
  0 siblings, 0 replies; 13+ messages in thread
From: Mikael Pettersson @ 2003-08-13 14:24 UTC (permalink / raw)
  To: Ruben Puettmann; +Cc: linux-kernel

Ruben Puettmann writes:
 > On Wed, Aug 13, 2003 at 03:13:02PM +0200, Mikael Pettersson wrote:
 > > 
 > > This sounds like a well-known APM/local-APIC clash.
 > 
 > nice to know ... 
 > > 
 > > Never ever use DISPLAY_BLANK if you also have SMP or UP_APIC.
 > 
 > not nice so ;-( how is it with acpi? Same problem?
 > 
 > > With APIC support enabled (SMP or UP_APIC), APM must be constrained:
 > > DISPLAY_BLANK off
 > > CPU_IDLE off
 > > built-in driver, not module
 > 
 > Why will this not be disabled in make *config so that nobody will run in
 > this problem?
 > 
 > > This is because the apm driver does BIOS calls, and many BIOSen
 > > (including the code in graphics cards, e.g. all Radeons it seems)
 > > like to hang if a local APIC timer interrupt arrives.

Several reasons:
- The interaction wasn't understood initially, and some problems
  didn't start appearing until late last year. The problems are
  also system & configuration dependent.
  Case in point #1: my P3B-F and P4T-E ASUS mainboards never had
  problems until they started running 2.5 kernels, where HZ==1000
  greatly increased the likelihood of a local APIC timer interrupt
  while in BIOS screen blanking code.
  Case in point #2: my TUSL2-C ASUS mobo (RIP) worked great until
  I switched from a Millenium to a Radeon 8500, and found that it
  hung because of local APIC timer interrupts while in BIOS screen
  blanking code, even in 2.4 kernels.
- Fixing the APM driver would require that someone who understands
  it modifies it to avoid BIOS calls (other than suspend/resume) when
  UP_APIC is active. I'm not that person.
- The problems can be worked around by avoiding misconfigurations.

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

* Re: 2.4.22 APM problems with IBM Thinkpad's
  2003-08-13 14:11   ` Alan Cox
@ 2003-08-13 14:32     ` Mikael Pettersson
  2003-08-14 12:28     ` Ruben Puettmann
  2003-08-14 17:33     ` Jamie Lokier
  2 siblings, 0 replies; 13+ messages in thread
From: Mikael Pettersson @ 2003-08-13 14:32 UTC (permalink / raw)
  To: Alan Cox; +Cc: Ruben Puettmann, Linux Kernel Mailing List

Alan Cox writes:
 > On Mer, 2003-08-13 at 14:13, Mikael Pettersson wrote:
 > > With APIC support enabled (SMP or UP_APIC), APM must be constrained:
 > > DISPLAY_BLANK off
 > > CPU_IDLE off
 > > built-in driver, not module
 > 
 > This isnt sufficient because some of the SMM traps off the FN-key 
 > sequences also crash thinkpads if APIC is enabled. Basically *dont use
 > local apic* except on SMP.

For those Thinkpads a DMI blacklist entry should suffice.
(Just like it solved the Inspiron problems.)

2.6-mm has the "lapic" and "nolapic" options I added so that
P4s no longer are autoenabled, needed for broken ACPI BIOSen.
Perhaps we should require the "lapic" option also for all P6s?

(Strangely, K7 machines seem to have fewer local APIC BIOS issues
than either P6 or P4 machines.)

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

* Re: 2.4.22 APM problems with IBM Thinkpad's
  2003-08-13 14:11   ` Alan Cox
  2003-08-13 14:32     ` Mikael Pettersson
@ 2003-08-14 12:28     ` Ruben Puettmann
  2003-08-14 13:21       ` Mikael Pettersson
  2003-08-14 13:47       ` Alan Cox
  2003-08-14 17:33     ` Jamie Lokier
  2 siblings, 2 replies; 13+ messages in thread
From: Ruben Puettmann @ 2003-08-14 12:28 UTC (permalink / raw)
  To: Alan Cox; +Cc: Mikael Pettersson, Linux Kernel Mailing List

On Wed, Aug 13, 2003 at 03:11:27PM +0100, Alan Cox wrote:
> On Mer, 2003-08-13 at 14:13, Mikael Pettersson wrote:
> > With APIC support enabled (SMP or UP_APIC), APM must be constrained:
> > DISPLAY_BLANK off
> > CPU_IDLE off
> > built-in driver, not module
> 
> This isnt sufficient because some of the SMM traps off the FN-key 
> sequences also crash thinkpads if APIC is enabled. Basically *dont use
> local apic* except on SMP.

sorry but why breaks this all under linux? O.K im not a friend if
windows but on the preinstalled windowsXP it runs all fine.

Is this a problem of manpower or missing spec's? 

        Ruben

-- 
Ruben Puettmann
ruben@puettmann.net
http://www.puettmann.net

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

* Re: 2.4.22 APM problems with IBM Thinkpad's
  2003-08-14 12:28     ` Ruben Puettmann
@ 2003-08-14 13:21       ` Mikael Pettersson
  2003-08-14 13:47       ` Alan Cox
  1 sibling, 0 replies; 13+ messages in thread
From: Mikael Pettersson @ 2003-08-14 13:21 UTC (permalink / raw)
  To: Ruben Puettmann; +Cc: Linux Kernel Mailing List

Ruben Puettmann writes:
 > On Wed, Aug 13, 2003 at 03:11:27PM +0100, Alan Cox wrote:
 > > On Mer, 2003-08-13 at 14:13, Mikael Pettersson wrote:
 > > > With APIC support enabled (SMP or UP_APIC), APM must be constrained:
 > > > DISPLAY_BLANK off
 > > > CPU_IDLE off
 > > > built-in driver, not module
 > > 
 > > This isnt sufficient because some of the SMM traps off the FN-key 
 > > sequences also crash thinkpads if APIC is enabled. Basically *dont use
 > > local apic* except on SMP.
 > 
 > sorry but why breaks this all under linux? O.K im not a friend if
 > windows but on the preinstalled windowsXP it runs all fine.

Because Winblows typically won't attempt to use the local APIC
on uniprocessor machines.

 > Is this a problem of manpower or missing spec's? 

BIOS limitations or bugs (depending on your POV)

It tends to work on desktop machines but break on laptops.

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

* Re: 2.4.22 APM problems with IBM Thinkpad's
  2003-08-14 12:28     ` Ruben Puettmann
  2003-08-14 13:21       ` Mikael Pettersson
@ 2003-08-14 13:47       ` Alan Cox
  1 sibling, 0 replies; 13+ messages in thread
From: Alan Cox @ 2003-08-14 13:47 UTC (permalink / raw)
  To: Ruben Puettmann; +Cc: Mikael Pettersson, Linux Kernel Mailing List

On Iau, 2003-08-14 at 13:28, Ruben Puettmann wrote:
> > This isnt sufficient because some of the SMM traps off the FN-key 
> > sequences also crash thinkpads if APIC is enabled. Basically *dont use
> > local apic* except on SMP.
> 
> sorry but why breaks this all under linux? O.K im not a friend if
> windows but on the preinstalled windowsXP it runs all fine.
> 
> Is this a problem of manpower or missing spec's? 

The system isnt designed to run with APIC enabled it seems. There is no
reason for the BIOS to handle this because its not a normal setup and
given the horrors of SMM BIOS code I suspect they had enough on their
hands anyway.



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

* Re: 2.4.22 APM problems with IBM Thinkpad's
  2003-08-13 14:11   ` Alan Cox
  2003-08-13 14:32     ` Mikael Pettersson
  2003-08-14 12:28     ` Ruben Puettmann
@ 2003-08-14 17:33     ` Jamie Lokier
  2003-08-14 20:03       ` Mikael Pettersson
  2 siblings, 1 reply; 13+ messages in thread
From: Jamie Lokier @ 2003-08-14 17:33 UTC (permalink / raw)
  To: Alan Cox; +Cc: Mikael Pettersson, Ruben Puettmann, Linux Kernel Mailing List

Alan Cox wrote:
> On Mer, 2003-08-13 at 14:13, Mikael Pettersson wrote:
> > With APIC support enabled (SMP or UP_APIC), APM must be constrained:
> > DISPLAY_BLANK off
> > CPU_IDLE off
> > built-in driver, not module
> 
> This isnt sufficient because some of the SMM traps off the FN-key 
> sequences also crash thinkpads if APIC is enabled. Basically *dont use
> local apic* except on SMP.

Is it feasible to disable the APIC during BIOS calls,?

If that's feasible, it could fix the APM problem though not the SMM
trap problem on Thinkpads.

-- Jamie

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

* Re: 2.4.22 APM problems with IBM Thinkpad's
  2003-08-14 17:33     ` Jamie Lokier
@ 2003-08-14 20:03       ` Mikael Pettersson
  2003-08-14 21:40         ` Jamie Lokier
  0 siblings, 1 reply; 13+ messages in thread
From: Mikael Pettersson @ 2003-08-14 20:03 UTC (permalink / raw)
  To: Jamie Lokier; +Cc: Alan Cox, Ruben Puettmann, Linux Kernel Mailing List

Jamie Lokier writes:
 > Alan Cox wrote:
 > > On Mer, 2003-08-13 at 14:13, Mikael Pettersson wrote:
 > > > With APIC support enabled (SMP or UP_APIC), APM must be constrained:
 > > > DISPLAY_BLANK off
 > > > CPU_IDLE off
 > > > built-in driver, not module
 > > 
 > > This isnt sufficient because some of the SMM traps off the FN-key 
 > > sequences also crash thinkpads if APIC is enabled. Basically *dont use
 > > local apic* except on SMP.
 > 
 > Is it feasible to disable the APIC during BIOS calls,?

I don't think so.
One problem is that BIOS calls can be very frequent (one every time
the kernel calls pm_idle, if CPU_IDLE=y, and one each time one of those
battery-monitoring applets feels like polling the battery status).
Each time we'd have to go through a full lapic_suspend/lapic_resume
cycle, like we do now for PM suspends, and each time the local APIC
timer would lose ticks. And in an UP_IOAPIC system we'd better disable
and reenable the I/O-APIC too (or reprogram it to PIC mode, but that's
horrible). Not pretty.

Personally I'd prefer checks in apm.c that cause it to refuse to do
any BIOS calls except at suspend or poweroff.

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

* Re: 2.4.22 APM problems with IBM Thinkpad's
  2003-08-14 20:03       ` Mikael Pettersson
@ 2003-08-14 21:40         ` Jamie Lokier
  0 siblings, 0 replies; 13+ messages in thread
From: Jamie Lokier @ 2003-08-14 21:40 UTC (permalink / raw)
  To: Mikael Pettersson; +Cc: Alan Cox, Ruben Puettmann, Linux Kernel Mailing List

Mikael Pettersson wrote:
> Jamie Lokier writes:
>  > Alan Cox wrote:
>  > > On Mer, 2003-08-13 at 14:13, Mikael Pettersson wrote:
>  > > > With APIC support enabled (SMP or UP_APIC), APM must be constrained:
>  > > > DISPLAY_BLANK off
>  > > > CPU_IDLE off
>  > > > built-in driver, not module
>  > > 
>  > > This isnt sufficient because some of the SMM traps off the FN-key 
>  > > sequences also crash thinkpads if APIC is enabled. Basically *dont use
>  > > local apic* except on SMP.
>  > 
>  > Is it feasible to disable the APIC during BIOS calls,?
> 
> I don't think so.
> One problem is that BIOS calls can be very frequent (one every time
> the kernel calls pm_idle, if CPU_IDLE=y, and one each time one of those
> battery-monitoring applets feels like polling the battery status).
>
> Each time we'd have to go through a full lapic_suspend/lapic_resume
> cycle, like we do now for PM suspends, and each time the local APIC
> timer would lose ticks.

That'll just be another way of losing ticks, then :)

> And in an UP_IOAPIC system we'd better disable
> and reenable the I/O-APIC too (or reprogram it to PIC mode, but that's
> horrible). Not pretty.
> 
> Personally I'd prefer checks in apm.c that cause it to refuse to do
> any BIOS calls except at suspend or poweroff.

I'd prefer that if APM idle or blanking are enabled, the default
interrupt mode is to not use the APIC.

Saving power is pretty desirable on a laptop.

-- Jamie

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

end of thread, other threads:[~2003-08-14 21:40 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-13 12:31 2.4.22 APM problems with IBM Thinkpad's Ruben Puettmann
2003-08-13 13:13 ` Mikael Pettersson
2003-08-13 13:31   ` Ruben Puettmann
2003-08-13 14:24     ` Mikael Pettersson
2003-08-13 14:11   ` Alan Cox
2003-08-13 14:32     ` Mikael Pettersson
2003-08-14 12:28     ` Ruben Puettmann
2003-08-14 13:21       ` Mikael Pettersson
2003-08-14 13:47       ` Alan Cox
2003-08-14 17:33     ` Jamie Lokier
2003-08-14 20:03       ` Mikael Pettersson
2003-08-14 21:40         ` Jamie Lokier
     [not found] ` <20030813131043.GA1112@deimos.one.pl>
2003-08-13 13:35   ` Ruben Puettmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).