Bug 14736 - Toshiba P305D unhandled ACPI Interrupt
Summary: Toshiba P305D unhandled ACPI Interrupt
Status: CLOSED CODE_FIX
Alias: None
Product: ACPI
Classification: Unclassified
Component: Config-Interrupts (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Zhang Rui
URL:
Keywords:
: 12873 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-12-04 20:39 UTC by Kenney Phillis Jr.
Modified: 2010-10-02 02:06 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.32 - Git
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Latest Linux git test results. (511.67 KB, application/octet-stream)
2009-12-04 20:39 UTC, Kenney Phillis Jr.
Details
custom DSDT (429.75 KB, application/octet-stream)
2009-12-09 02:43 UTC, Zhang Rui
Details
Kernel result with custom dsdt (116.70 KB, text/plain)
2009-12-09 20:38 UTC, Kenney Phillis Jr.
Details
patch: don't invoke _PSW in boot phase (969 bytes, patch)
2009-12-10 01:10 UTC, Zhang Rui
Details | Diff
lspci -vvxxx (188.52 KB, text/plain)
2009-12-10 16:11 UTC, Kenney Phillis Jr.
Details
patch: disable Windows Vista compatibility for Toshiba P305D (1.13 KB, patch)
2009-12-22 05:46 UTC, Zhang Rui
Details | Diff
System Log from 2.6.32 with failed resume. (241.71 KB, text/plain)
2010-06-29 03:16 UTC, Kenney Phillis Jr.
Details
2.6.35-rc3 dmesg log with default detection. (73.22 KB, text/plain)
2010-07-02 03:46 UTC, Kenney Phillis Jr.
Details
2.6.35-rc3 dmesg log with acpi set to avoid using windows 2006 params. (102.32 KB, text/plain)
2010-07-02 04:03 UTC, Kenney Phillis Jr.
Details

Description Kenney Phillis Jr. 2009-12-04 20:39:06 UTC
Created attachment 24029 [details]
Latest Linux git test results.

This is pretty much a continuation of bug 12873. I couldn't reopen the bug, due to how it was closed somehow. This attached file includes the testing results against the latest kernel git. A patch already exists which handles the acpi interrupt, and all that is left is a few fixes to the suspend (some resume bug involving ext4), hibernate ( radeon resume failure).

The Quick Results:
acpi_osi="Windows 2006" has the irq ignored.
acpi_osi="Linux" has the irq working.
acpi_osi="!Windows 2006" acpi_osi="!Windows 2006 SP1" has the irq working.

s2ram tests with init=/bin/bash show fully working suspend and resume, however, it takes a acpi mode 1 or 3 or for one to post the video card for video to return.
Comment 1 Zhang Rui 2009-12-09 02:43:50 UTC
Created attachment 24109 [details]
custom DSDT

please try this custom DSDT and see if it helps.
In order to override the DSDT, you just need to follow the step 5,6,7 at
http://www.lesswatts.org/projects/acpi/overridingDSDT.php

Note you need to do the test without any acpi_osi parameters.
Comment 2 Kenney Phillis Jr. 2009-12-09 20:38:14 UTC
Created attachment 24122 [details]
Kernel result with custom dsdt

the custom dsdt works on irq being handled, however the suspend/resume still hangs a bit. The hang is a driver issue from what i can tell.
Comment 3 Zhang Rui 2009-12-10 01:10:39 UTC
Created attachment 24125 [details]
patch: don't invoke _PSW in boot phase

okay, problem is clear now,
IMO, it's caused by commit 729b2bdbfa19dd9be98dbd49caf2773b3271cc24.
you can try the patch attached to see if it fixes the problem for you, no extra kernel parameter, no custom dsdt this time. :)

the bug is caused by this piece of code:

Method (_PSW, 1, NotSerialized)
{
  Store (Arg0, \_SB.PCI0.SMB.WOLE)
  If (LEqual (TPOS, 0x40))
  {
    Store (Arg0, \_SB.PCI0.SMB.WOLF) /* everything goes well if we don't execute this AML code */
  }
}

without commit 729b2bdbfa19dd9be98dbd49caf2773b3271cc24, Linux won't invoke this _PSW method during boot phase.
with the _OSI strings, TPOS is set to something else that doesn't equal 0x40.

So the problem is clear, but I don't know what should be the right fix for this problem.
reverting 729b2bdbfa19dd9be98dbd49caf2773b3271cc24?
_OSI dmi quirks for this TOSHIBA laptop?
Comment 4 Zhang Rui 2009-12-10 01:11:44 UTC
*** Bug 12873 has been marked as a duplicate of this bug. ***
Comment 5 Len Brown 2009-12-10 04:34:06 UTC
> The Quick Results:
> acpi_osi="Windows 2006" has the irq ignored.
> acpi_osi="Linux" has the irq working.
> acpi_osi="!Windows 2006" acpi_osi="!Windows 2006 SP1" has the irq working.

acpi_osi=Linux appears to be a "red herring" on this system.
Rather than enable any specific Linux support, it is effectively
disabling explicit Windows 2006 and Windows 2006 SP1 support:

                    If (\_OSI ("Windows 2006"))
                    {
                        Store (0x40, ^OSTB)
                        Store (0x40, ^TPOS)
                    }

                    If (\_OSI ("Windows 2006 SP1"))
                    {
                        Store (0x01, OSSP)
                        Store (0x40, ^OSTB)
                        Store (0x40, ^TPOS)
                    }

                    If (\_OSI ("Linux"))
                    {
                        Store (0x01, LINX)
                        Store (0x80, ^OSTB)
                        Store (0x80, ^TPOS)
                    }

Assuming that  Windows 2006 and 2006/SP1 work properly on this box,
what this means is that Linux compatibility with Win2006 on this
box is broken.

The possible exception to this may be the this:
                If (LEqual (TPOS, 0x80))
                {
                    Store (One, \_SB.PCI0.SMB.MT3A)
                }
which is done at init and _WAK time only if acpi_osi=Linux
This writes a byte to PCI configuration space that is
otherwise uninitialized.
Comment 6 Zhang Rui 2009-12-10 05:05:52 UTC
kenney,
please attach the lspci -vvxxx output of your laptop.
Comment 7 Kenney Phillis Jr. 2009-12-10 16:11:23 UTC
Created attachment 24138 [details]
lspci -vvxxx

Here's the lspci results requested... not exactly sure how this will help though.
Comment 8 Zhang Rui 2009-12-11 01:20:43 UTC
It tells me what chipset is using so that I can figure out what does "Store (Arg0, \_SB.PCI0.SMB.WOLF)" mean.
But the lspci output shows that it's using an AMD chipset...

Len,
When _OSI(Windows 2006) is true, the AML code pokes an PCI register during boot and this triggers the unhandled interrupts.
As we don't know what the PCI register stands for, I don't think we can debug further.

what do you think we should do now?
Comment 9 Kenney Phillis Jr. 2009-12-11 02:36:55 UTC
I know that AMD has released the 780 chipset register documentation available for public use, so this might be of use.... look at the Developer Guides & Manuals for further reference...

http://developer.amd.com/documentation/guides/Pages/default.aspx#chipset
Comment 10 Zhang Rui 2009-12-22 05:46:44 UTC
Created attachment 24254 [details]
patch: disable Windows Vista compatibility for Toshiba P305D

I'm not sure if this is the right fix.
But this seems like a Windows Vista compatibility issue and I'm sure this patch works for you.
Comment 11 Kenney Phillis Jr. 2010-01-14 09:17:48 UTC
i did a few tests with fglrx on kernel 2.6.31 and found that the broken suspend after the irq was not ignored is related to the kernel mode setting and radeon drivers.

disabling the vista support removed support for various special function keys that should be supported, like Suspend and hibernate. Although, the special function keys for brightness control work.

here's a small bit of kernel errors and warnings when vista compatibility is disabled:
[ 1052.575579] atkbd.c: Unknown key pressed (translated set 2, code 0x55 on isa0060/serio0).
[ 1052.575594] atkbd.c: Use 'setkeycodes 55 <keycode>' to make it known.
[ 1052.967989] atkbd.c: Unknown key pressed (translated set 2, code 0xa6 on isa0060/serio0).
[ 1052.968003] atkbd.c: Use 'setkeycodes e026 <keycode>' to make it known.
Comment 12 Kenney Phillis Jr. 2010-06-29 03:16:40 UTC
Created attachment 26965 [details]
System Log from 2.6.32 with failed resume.

I am still having resume and suspend problems with 2.6.32 using the flgrx driver (to help with getting the video back on resume.)
Comment 13 Kenney Phillis Jr. 2010-07-02 03:45:02 UTC
The suspend and resume work properly now, however the code fix is not in linus's or the linux-acpi trees, so i am having to reopen the bug.


tested with linus tree, commit:
9fbd7f9d112e50dc7649d13de37bc92cb50c3905

I'll attach the latest test results shortly.

also as a quick note, the tests involed a quick patch where i reverted  a commit mentioned in bug 16325.
Comment 14 Kenney Phillis Jr. 2010-07-02 03:46:59 UTC
Created attachment 26995 [details]
2.6.35-rc3 dmesg log with default detection.
Comment 15 Kenney Phillis Jr. 2010-07-02 04:03:40 UTC
Created attachment 26996 [details]
2.6.35-rc3 dmesg log with acpi set to avoid using windows 2006 params.

This is the log with avoiding using windows 2006, and as a quick note, this is showing the results of what happens after a suspend, however, the system does not crash after two suspends and is fully functional.

also as a side note, forcing linux acpi results with similar corruption messages on suspend and resume.
Comment 16 Zhang Rui 2010-07-02 05:08:26 UTC
no,
the procedure is that
1. the bug is marked as Resolved as we have a patch available to fix this issue.
2. Len will look at the Resolved bugs in bugzilla and pick up the patches that
   should go upstream.
3. Len will CLOSE the bug when the patch hit upstream.

so I think we should mark it as Resolved for now.

please feel free to re-open it if you still have any questions.
Comment 17 Len Brown 2010-09-29 02:51:29 UTC
> the broken suspend
> after the irq was not ignored is related to the kernel mode setting and
> radeon
> drivers.

okay, since Linux does not have compatibility with that Vista ATI driver,
I've applied a refreshed version of the DMI patch in comment #10 to acpi-test.
Comment 18 Len Brown 2010-10-02 02:06:01 UTC
commit 337279ce3aa85d81d34c0f837d1c204df105103b
Author: Zhang Rui <rui.zhang@intel.com>
Date:   Tue Sep 28 22:48:55 2010 -0400

    ACPI: Disable Windows Vista compatibility for Toshiba P305D

shipped in 2.6.36-rc6-git2
closed

Note You need to log in before you can comment on or make changes to this bug.