Bug#273474: APM broken in image-2.6.8-1 version 2.6.8-3, worked in 2.6.8-1

2004-09-29 Thread maks attems
On Wed, 29 Sep 2004, Marcus C. Gottwald wrote:

 maks attems wrote (Tue 2004-Sep-28 23:09:22 +0200):
  could you try to build latest kernel-source-2.6.8
  with belows reverted patch and boot that?
 
 All right, I did:
..
great thanks!
 
 - dmesg shows broken BIOS detected again.
 - Function keys do work again.
 - Resume does work again.
 - vga=773 doesn't work anymore (console remains blank after
   video mode switch); didn't investigate any further.

as this send patch did not fix the issues concerning compaq laptop.
it will be backed out for next kernel-source.
thanks for your feedback

a++ maks





Bug#273474: APM broken in image-2.6.8-1 version 2.6.8-3, worked in 2.6.8-1

2004-09-28 Thread maks attems
On Mon, 27 Sep 2004, Marcus C. Gottwald wrote:
..
 There's a difference in APIC treatment. Here is the part when
 using 2.6.8-1 (APM working fine):
 
   Sep 26 13:06:51 lilith kernel: Dell Latitude with broken BIOS detected. 
 Refusing to enable the local APIC.
   Sep 26 13:06:51 lilith kernel: Built 1 zonelists
   Sep 26 13:06:51 lilith kernel: Kernel command line: auto 
 BOOT_IMAGE=Debian_default ro root=305 acpi=off
   Sep 26 13:06:51 lilith kernel: Initializing CPU#0
 
 Here is the part when using 2.6.8-3:
 
   Sep 26 13:01:45 lilith kernel: Built 1 zonelists
   Sep 26 13:01:45 lilith kernel: Kernel command line: 
 BOOT_IMAGE=Debian_default ro root=305 acpi=off
   Sep 26 13:01:45 lilith kernel: Local APIC disabled by BIOS -- reenabling.
   Sep 26 13:01:45 lilith kernel: Found and enabled local APIC!
   Sep 26 13:01:45 lilith kernel: Initializing CPU#0

i'm a bit confused, but the 2 dmesg that you appended are both
regarding kernel 2.6.8-1.
the difference seems your boot cmdline. in the second case noacpi is not
parsed and therefor acpi enabled. 
AFAIK lilo prepends auto before the whole cmdline what happened to the
second?

so your problem doesn't seem 2.6.8-1 specific.
didn't see an apm change when going through the changelog concerning
2.6.8-3 versus 2.6.8-3-1.

what bootloader are using?

a++ maks
 




Bug#273474: APM broken in image-2.6.8-1 version 2.6.8-3, worked in 2.6.8-1

2004-09-28 Thread Marcus C. Gottwald

maks attems wrote (Tue 2004-Sep-28 22:13:32 +0200):

  There's a difference in APIC treatment. Here is the part when
  using 2.6.8-1 (APM working fine):
  
Sep 26 13:06:51 lilith kernel: Dell Latitude with broken BIOS detected. 
  Refusing to enable the local APIC.
Sep 26 13:06:51 lilith kernel: Built 1 zonelists
Sep 26 13:06:51 lilith kernel: Kernel command line: auto 
  BOOT_IMAGE=Debian_default ro root=305 acpi=off
Sep 26 13:06:51 lilith kernel: Initializing CPU#0
  
  Here is the part when using 2.6.8-3:
  
Sep 26 13:01:45 lilith kernel: Built 1 zonelists
Sep 26 13:01:45 lilith kernel: Kernel command line: 
  BOOT_IMAGE=Debian_default ro root=305 acpi=off
Sep 26 13:01:45 lilith kernel: Local APIC disabled by BIOS -- reenabling.
Sep 26 13:01:45 lilith kernel: Found and enabled local APIC!
Sep 26 13:01:45 lilith kernel: Initializing CPU#0
 
 i'm a bit confused, but the 2 dmesg that you appended are both
 regarding kernel 2.6.8-1.

Yes, correct. The difference is that everything works with the
kernel/modules from version 2.6.8-1 of the package
kernel-image-2.6.8-1-686, but it doesn't work with the
kernel/modules from version 2.6.8-3 of that package. (BTW, this
_is_ confusing, is this the way version numbers are normally
done?)


 the difference seems your boot cmdline. in the second case noacpi is not
 parsed and therefor acpi enabled. 

I never used a noacpi command, always acpi=off. And as far
as I could see, ACPI was never turned on, only the messages
regarding (the local?) APIC were different.


 AFAIK lilo prepends auto before the whole cmdline what happened to the
 second?

I couldn't find out for sure when exactly the auto is
prepended, but I believe it happens when a reboot command is
issued. The auto command has not always been present when the
kernel from kernel-image-2.6.8-1-686=2.6.8-1 was booted.


 so your problem doesn't seem 2.6.8-1 specific.
 didn't see an apm change when going through the changelog concerning
 2.6.8-3 versus 2.6.8-3-1.

Hm, misunderstanding regarding the versions? In bug #272177,
there are two more people with the same problem, at least one
other turned up on the debian-laptop mailing list today. And I
can revert to the working setup by only downgrading
kernel-image-2.6.8-1-686 to version 2.6.8-1.


 what bootloader are using?

lilo/testing.


Cheers, Marcus

-- 
   Marcus C. Gottwald  ·  [EMAIL PROTECTED]  ·  http://cheers.de





Bug#273474: APM broken in image-2.6.8-1 version 2.6.8-3, worked in 2.6.8-1

2004-09-28 Thread maks attems
On Tue, 28 Sep 2004, Marcus C. Gottwald wrote:

 I never used a noacpi command, always acpi=off. And as far
 as I could see, ACPI was never turned on, only the messages
 regarding (the local?) APIC were different.

could you try to build latest kernel-source-2.6.8
with belows reverted patch and boot that?
save the mail and use 'patch -p1 -R´
 

diff -Nru a/arch/i386/kernel/dmi_scan.c b/arch/i386/kernel/dmi_scan.c
--- a/arch/i386/kernel/dmi_scan.c   2004-08-19 12:35:05 -07:00
+++ b/arch/i386/kernel/dmi_scan.c   2004-08-19 12:35:05 -07:00
@@ -162,26 +162,6 @@
 #define NO_MATCH   { DMI_NONE, NULL}
 #define MATCH  DMI_MATCH
 
-/*
- * Some machines, usually laptops, can't handle an enabled local APIC.
- * The symptoms include hangs or reboots when suspending or resuming,
- * attaching or detaching the power cord, or entering BIOS setup screens
- * through magic key sequences.
- */
-static int __init local_apic_kills_bios(struct dmi_blacklist *d)
-{
-#ifdef CONFIG_X86_LOCAL_APIC
-   extern int enable_local_apic;
-   if (enable_local_apic == 0) {
-   enable_local_apic = -1;
-   printk(KERN_WARNING %s with broken BIOS detected. 
-  Refusing to enable the local APIC.\n,
-  d-ident);
-   }
-#endif
-   return 0;
-}
-

 /* 
  * Toshiba keyboard likes to repeat keys when they are not repeated.
@@ -793,30 +773,6 @@
} },
 
/* Machines which have problems handling enabled local APICs */
-
-   { local_apic_kills_bios, Dell Inspiron, {
-   MATCH(DMI_SYS_VENDOR, Dell Computer Corporation),
-   MATCH(DMI_PRODUCT_NAME, Inspiron),
-   NO_MATCH, NO_MATCH
-   } },
-
-   { local_apic_kills_bios, Dell Latitude, {
-   MATCH(DMI_SYS_VENDOR, Dell Computer Corporation),
-   MATCH(DMI_PRODUCT_NAME, Latitude),
-   NO_MATCH, NO_MATCH
-   } },
-
-   { local_apic_kills_bios, IBM Thinkpad T20, {
-   MATCH(DMI_BOARD_VENDOR, IBM),
-   MATCH(DMI_BOARD_NAME, 264741U),
-   NO_MATCH, NO_MATCH
-   } },
-
-   { local_apic_kills_bios, ASUS L3C, {
-   MATCH(DMI_BOARD_VENDOR, ASUSTeK Computer INC.),
-   MATCH(DMI_BOARD_NAME, P4_L3C),
-   NO_MATCH, NO_MATCH
-   } },
 
{ broken_acpi_Sx, ASUS K7V-RM, {  /* Bad ACPI Sx table */
MATCH(DMI_BIOS_VERSION,ASUS K7V-RM ACPI BIOS Revision 
1003A),
diff -Nru a/drivers/acpi/bus.c b/drivers/acpi/bus.c
--- a/drivers/acpi/bus.c2004-08-19 12:35:05 -07:00
+++ b/drivers/acpi/bus.c2004-08-19 12:35:05 -07:00
@@ -590,10 +590,9 @@
 }
 
 
-static int __init
-acpi_bus_init (void)
+void __init
+acpi_early_init (void)
 {
-   int result = 0;
acpi_status status = AE_OK;
struct acpi_buffer  buffer = {sizeof(acpi_fadt), acpi_fadt};
 
@@ -617,7 +616,7 @@
status = acpi_get_table(ACPI_TABLE_FADT, 1, buffer);
if (ACPI_FAILURE(status)) {
printk(KERN_ERR PREFIX Unable to get the FADT\n);
-   goto error1;
+   goto error0;
}
 
 #ifdef CONFIG_X86
@@ -640,12 +639,40 @@
}
 #endif
 
-   status = acpi_enable_subsystem(ACPI_FULL_INITIALIZATION);
+   status = acpi_enable_subsystem(~(ACPI_NO_HARDWARE_INIT | 
ACPI_NO_ACPI_ENABLE));
+   if (ACPI_FAILURE(status)) {
+   printk(KERN_ERR PREFIX Unable to enable ACPI\n);
+   goto error0;
+   }
+
+   return;
+
+error0:
+   disable_acpi();
+   return;
+}
+
+static int __init
+acpi_bus_init (void)
+{
+   int result = 0;
+   acpi_status status = AE_OK;
+   extern acpi_status  acpi_os_initialize1(void);
+
+   ACPI_FUNCTION_TRACE(acpi_bus_init);
+
+   status = acpi_os_initialize1();
+
+   status = acpi_enable_subsystem(ACPI_NO_HARDWARE_INIT | 
ACPI_NO_ACPI_ENABLE);
if (ACPI_FAILURE(status)) {
printk(KERN_ERR PREFIX Unable to start the ACPI 
Interpreter\n);
goto error1;
}
 
+   if (ACPI_FAILURE(status)) {
+   printk(KERN_ERR PREFIX Unable to initialize ACPI OS 
objects\n);
+   goto error1;
+   }
 #ifdef CONFIG_ACPI_EC
/*
 * ACPI 2.0 requires the EC driver to be loaded and work before
@@ -693,7 +720,6 @@
/* Mimic structured exception handling */
 error1:
acpi_terminate();
-error0:
return_VALUE(-ENODEV);
 }
 
diff -Nru a/drivers/acpi/osl.c b/drivers/acpi/osl.c
--- a/drivers/acpi/osl.c2004-08-19 12:35:05 -07:00
+++ b/drivers/acpi/osl.c2004-08-19 12:35:05 -07:00
@@ -71,6 +71,12 @@
 acpi_status
 acpi_os_initialize(void)
 {
+   

Bug#273474: APM broken in image-2.6.8-1 version 2.6.8-3, worked in 2.6.8-1

2004-09-27 Thread Marcus C. Gottwald

maks attems wrote (Mon 2004-Sep-27 15:03:31 +0200):

 On Sun, 26 Sep 2004, Marcus C. Gottwald wrote:
 ..
  After downgrading back to 2.6.8-1 (the deb was still on my
  disk), everything is working again.
 
 please send dmesg?

There's a difference in APIC treatment. Here is the part when
using 2.6.8-1 (APM working fine):

  Sep 26 13:06:51 lilith kernel: Dell Latitude with broken BIOS detected. 
Refusing to enable the local APIC.
  Sep 26 13:06:51 lilith kernel: Built 1 zonelists
  Sep 26 13:06:51 lilith kernel: Kernel command line: auto 
BOOT_IMAGE=Debian_default ro root=305 acpi=off
  Sep 26 13:06:51 lilith kernel: Initializing CPU#0

Here is the part when using 2.6.8-3:

  Sep 26 13:01:45 lilith kernel: Built 1 zonelists
  Sep 26 13:01:45 lilith kernel: Kernel command line: BOOT_IMAGE=Debian_default 
ro root=305 acpi=off
  Sep 26 13:01:45 lilith kernel: Local APIC disabled by BIOS -- reenabling.
  Sep 26 13:01:45 lilith kernel: Found and enabled local APIC!
  Sep 26 13:01:45 lilith kernel: Initializing CPU#0

So I thought I'd tell the kernel to not enable APIC (using
2.6.8-3):

  Built 1 zonelists
  Kernel command line: BOOT_IMAGE=Debian_default ro root=305 acpi=off noapic
  Local APIC disabled by BIOS -- reenabling.
  Found and enabled local APIC!
  Initializing CPU#0

That didn't do it. Told it not to enable LAPIC:

  Built 1 zonelists
  Kernel command line: BOOT_IMAGE=Debian_default ro root=305 acpi=off nolapic
  Initializing CPU#0

But that didn't help either. Attached are the two dmesg outputs
from boot time, both without noapic or nolapic, as shown
first above.

When suspending, I get only these messages related to apm using
2.6.8-1:

  Sep 27 17:57:05 lilith apmd[2165]: Proxy exited with status 1
  Sep 27 17:57:51 lilith apmd[2165]: Suspending now

With 2.6.8-3, the line Proxy exited with status 1 is not
present, the other one is. And it's the last line in syslog
before the restart (after I have to crash the suspended
machine, because it won't resume).


Thanks for any further hints,

Marcus

-- 
   Marcus C. Gottwald  ·  [EMAIL PROTECTED]  ·  http://cheers.de

Sep 26 13:06:50 lilith syslogd 1.4.1#10: restart.
Sep 26 13:06:51 lilith kernel: klogd 1.4.1#10, log source = /proc/kmsg started.
Sep 26 13:06:51 lilith kernel: Inspecting /boot/System.map-2.6.8-1-686
Sep 26 13:06:51 lilith kernel: Loaded 27238 symbols from 
/boot/System.map-2.6.8-1-686.
Sep 26 13:06:51 lilith kernel: Symbols match kernel version 2.6.8.
Sep 26 13:06:51 lilith kernel: No module symbols loaded - kernel modules not 
enabled. 
Sep 26 13:06:51 lilith kernel: Linux version 2.6.8-1-686 ([EMAIL PROTECTED]) 
(gcc version 3.3.4 (Debian 1:3.3.4-7)) #1 Mon Aug 16 03:56:48 EDT 2004
Sep 26 13:06:51 lilith kernel: BIOS-provided physical RAM map:
Sep 26 13:06:51 lilith kernel:  BIOS-e820:  - 0009fc00 
(usable)
Sep 26 13:06:51 lilith kernel:  BIOS-e820: 0009fc00 - 000a 
(reserved)
Sep 26 13:06:51 lilith kernel:  BIOS-e820: 0010 - 1fedc000 
(usable)
Sep 26 13:06:51 lilith kernel:  BIOS-e820: 1fedc000 - 2000 
(reserved)
Sep 26 13:06:51 lilith kernel:  BIOS-e820: feda - fee0 
(reserved)
Sep 26 13:06:51 lilith kernel:  BIOS-e820: ffb8 - 0001 
(reserved)
Sep 26 13:06:51 lilith kernel: 0MB HIGHMEM available.
Sep 26 13:06:51 lilith kernel: 510MB LOWMEM available.
Sep 26 13:06:51 lilith kernel: DMI 2.3 present.
Sep 26 13:06:51 lilith kernel: Dell Latitude with broken BIOS detected. 
Refusing to enable the local APIC.
Sep 26 13:06:51 lilith kernel: Built 1 zonelists
Sep 26 13:06:51 lilith kernel: Kernel command line: auto 
BOOT_IMAGE=Debian_default ro root=305 acpi=off
Sep 26 13:06:51 lilith kernel: Initializing CPU#0
Sep 26 13:06:51 lilith kernel: PID hash table entries: 2048 (order 11: 16384 
bytes)
Sep 26 13:06:51 lilith kernel: Detected 864.094 MHz processor.
Sep 26 13:06:51 lilith kernel: Using tsc for high-res timesource
Sep 26 13:06:51 lilith kernel: Console: colour dummy device 80x25
Sep 26 13:06:51 lilith kernel: Dentry cache hash table entries: 65536 (order: 
6, 262144 bytes)
Sep 26 13:06:51 lilith kernel: Inode-cache hash table entries: 32768 (order: 5, 
131072 bytes)
Sep 26 13:06:51 lilith kernel: Memory: 509960k/523120k available (1542k kernel 
code, 12404k reserved, 684k data, 148k init, 0k highmem)
Sep 26 13:06:51 lilith kernel: Checking if this processor honours the WP bit 
even in supervisor mode... Ok.
Sep 26 13:06:51 lilith kernel: Calibrating delay loop... 1708.03 BogoMIPS
Sep 26 13:06:51 lilith kernel: Security Scaffold v1.0.0 initialized
Sep 26 13:06:51 lilith kernel: Mount-cache hash table entries: 512 (order: 0, 
4096 bytes)
Sep 26 13:06:51 lilith kernel: CPU: L1 I cache: 16K, L1 D cache: 16K
Sep 26 13:06:51 lilith kernel: CPU: L2 cache: 512K
Sep 26 13:06:51 lilith kernel: Intel machine check architecture supported.
Sep 26 13:06:51 lilith kernel: Intel machine check reporting enabled on CPU#0.

Bug#273474: APM broken in image-2.6.8-1 version 2.6.8-3, worked in 2.6.8-1

2004-09-26 Thread Marcus C. Gottwald
Package: kernel-image-2.6.8-1-686
Version: 2.6.8-3

I have been using version 2.6.8-1 just fine on a Dell Latitude
C400 notebook and upgraded to the recent version 2.6.8-3. After
upgrading,

a) the built-in, APM-related function keys (e.g for triggering a
   BIOS-controlled suspend or for entering the BIOS) stopped
   working.

b) a user-initiated suspend (apm --suspend) leads to a suspended
   system, but it won't wake up again. After having pressed the
   power button on a suspended system, a few LEDs blink as
   usual, but the system immediately goes dead/sleeping/...
   again.

After downgrading back to 2.6.8-1 (the deb was still on my
disk), everything is working again.

I'm running a mixed stable/testing system, apmd and libapm1 are
from testing (3.2.2-2).


Cheers, Marcus

-- 
   Marcus C. Gottwald  ·  [EMAIL PROTECTED]  ·  http://cheers.de