Contribute
Register

T440P Fixes to do before proceeding with the Guide

Sniki

Moderator
Joined
Jan 5, 2016
Messages
2,150
Motherboard
HP Elite 8300 SFF
CPU
i7-3770
Graphics
Intel HD3000
Mac
MacBook Pro
Mobile Phone
iOS
@RehabMan since i do see a lot of T440P users requesting help from my L440 guide i think it would be a good idea for me to create a T440P Guide because i noticed that the hardware is almost identical with some ACPI Structure differences which i think i did patch correctly most of them and with your help and some hints im sure we can complete it.
The remaining fixes for me to do are:
  • Brightness not working,i added the SSDT-PNLF to the Hotpatch #Include folder and created the Master SSDT-T440P but when trying to dissasemble the Rehabman Patchmatic ACPi Tables it shows an error related to Brightness (IGD5) but i don't know how to spot issues from iasl extract output, can you please point where the problem is.(is it just a necessary change on SSDT-PNLF or on the ACPI.
  • Battery Status: There's the Static Patch already for T440P on your repo but i would like to have some hints on how to implement it with Hotpatch/where to start with it, i tried to check the differences with DiffMerge and what i managed to catch with my brain is that the OperationField ECOR is the one that has the Multiplebytes registers and then we need to add the methods needed to read,etc like B1B2,etc. But i honestly don't know where to begin,i would like to have just some small starting points/hints and what should i begin with,it will make it much easier after.
  • We also need to add the LED Blink Fix after wake (which the led still keeps blinking), you did tell somewhere that it's there on _SST and i found it:
Code:
        Method (_SST, 1, NotSerialized)  // _SST: System Status
        {
            If (LEqual (Arg0, 0x00))
            {
                \_SB.PCI0.LPC.EC.LED (0x00, 0x00)
                \_SB.PCI0.LPC.EC.LED (0x0A, 0x00)
                \_SB.PCI0.LPC.EC.LED (0x07, 0x00)
i do see it and the code that i saw the others adding is this one:
Code:
# add these lines into method _WAK after NVSS
            \_SB.PCI0.LPC.EC.LED (Zero, 0x80)
            \_SB.PCI0.LPC.EC.LED (0x0A, 0x80)
they simply add it there to fix it:
Code:
   If (LEqual (Arg0, 0x03))
        {
            NVSS (Zero)
            \_SB.PCI0.LPC.EC.LED (Zero, 0x80)
            \_SB.PCI0.LPC.EC.LED (0x0A, 0x80)
            Store (\_SB.PCI0.LPC.EC.AC._PSR (), PWRS)
            If (OSC4)
            {
                PNTF (0x81)
            }
So in our case we need it with Hotpatch method so without first asking where and how to add it i want to ask you:
Is the method that others fix it "adding below NVSS (Zero) correct ? or you can simply replace the line from:
Code:
        Method (_SST, 1, NotSerialized)  // _SST: System Status
        {
            If (LEqual (Arg0, 0x00))
            {
                \_SB.PCI0.LPC.EC.LED (0x00, 0x00)
                \_SB.PCI0.LPC.EC.LED (0x0A, 0x00)
                \_SB.PCI0.LPC.EC.LED (0x07, 0x00)
to:
Code:
        Method (_SST, 1, NotSerialized)  // _SST: System Status
        {
            If (LEqual (Arg0, 0x00))
            {
                \_SB.PCI0.LPC.EC.LED (Zero, 0x80)
                \_SB.PCI0.LPC.EC.LED (0x0A, 0x80)
                \_SB.PCI0.LPC.EC.LED (0x07, 0x00)
im just curious since you pointed to check on _SST and that kinda confused,are both methods correct or adding it after NVSS is correct and replacing it in _SST is wrong ?

Considering we solved that confusion of mine lets go back to Hotpatch, where should i add this small line of code to fix led blink ?
Should i add it to SSDT-PTSWAK ? or a hex Replace of \_SB.PCI0.LPC.EC.LED (0x00, 0x00) to \_SB.PCI0.LPC.EC.LED (Zero, 0x80) and \_SB.PCI0.LPC.EC.LED (0x0A, 0x00) to \_SB.PCI0.LPC.EC.LED (0x0A, 0x80)
or we can add only a small SSDT for it ?
 

Attachments

Last edited:

RehabMan

Moderator
Joined
May 3, 2012
Messages
188,949
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Brightness not working,i added the SSDT-PNLF to the Hotpatch #Include folder and created the Master SSDT-T440P but when trying to dissasemble the Rehabman Patchmatic ACPi Tables it shows an error related to Brightness (IGD5) but i don't know how to spot issues from iasl extract output, can you please point where the problem is.(is it just a necessary change on SSDT-PNLF or on the ACPI.
Mistake seems obvious:
Code:
SPEEDY-NUC:hotpatch include (SNIKI) rehabman$ grep IGD5 *.dsl
SSDT-PNLF.dsl:        OperationRegion(IGD5, PCI_Config, 0, 0x14)
SSDT-PNLF.dsl:        Field(^IGD5, AnyAcc, NoLock, Preserve)
SSDT-T440P.dsl:        OperationRegion (IGD5, PCI_Config, Zero, 0x14)
SSDT-T440P.dsl:        Field (^IGD5, AnyAcc, NoLock, Preserve)
Obviously SSDT-T440P.dsl already includes SSDT-PNLF code, no need for SSDT-PNLF.

Battery Status: There's the Static Patch already for T440P on your repo but i would like to have some hints on how to implement it with Hotpatch/where to start with it, i tried to check the differences with DiffMerge and what i managed to catch with my brain is that the OperationField ECOR is the one that has the Multiplebytes registers and then we need to add the methods needed to read,etc like B1B2,etc. But i honestly don't know where to begin,i would like to have just some small starting points/hints and what should i begin with,it will make it much easier after.
The general procedure is covered in my hotpatch guide.
It is not easy (especially your first time).

We also need to add the LED Blink Fix after wake (which the led still keeps blinking), you did tell somewhere that it's there on _SST and i found it:
See SSDT-PTSWAK.dsl for ideas.
It is basic "rename/replace/delegate" pattern.

im just curious since you pointed to check on _SST and that kinda confused,are both methods correct or adding it after NVSS is correct and replacing it in _SST is wrong ?
_SST is fully documented in the ACPI spec.
Have you read it?

Considering we solved that confusion of mine lets go back to Hotpatch, where should i add this small line of code to fix led blink ?
Should i add it to SSDT-PTSWAK ? or a hex Replace of \_SB.PCI0.LPC.EC.LED (0x00, 0x00) to \_SB.PCI0.LPC.EC.LED (Zero, 0x80) and \_SB.PCI0.LPC.EC.LED (0x0A, 0x00) to \_SB.PCI0.LPC.EC.LED (0x0A, 0x80)
I would just call _SST with the appropriate param (from _WAK).
 

Sniki

Moderator
Joined
Jan 5, 2016
Messages
2,150
Motherboard
HP Elite 8300 SFF
CPU
i7-3770
Graphics
Intel HD3000
Mac
MacBook Pro
Mobile Phone
iOS
Obviously SSDT-T440P.dsl already includes SSDT-PNLF code, no need for SSDT-PNLF.
Ok... i guess what you mean is that he added SSDT-PNLF into patched even though i added the code of PNLF to SSDT-T440P ?
The general procedure is covered in my hotpatch guide.
It is not easy (especially your first time).
Yes that's true and im fully aware of that,but thankfully an idea came into my mind to check your U430 and Probook Repos and i did find some useful reference on where to begin with it i think.
See SSDT-PTSWAK.dsl for ideas.
It is basic "rename/replace/delegate" pattern.
So i should add it to SSDT-PTSWAK.dsl, i will have to read the hotpatch guide one more time.
_SST is fully documented in the ACPI spec.
Have you read it?
No i actually didn't, i should definitely read the whole ACPI spec when i find some time for it, im sure it will help me a lot here & in the future if do plan to help others too.
I would just call _SST with the appropriate param (from _WAK).
i will analyze the Hotpatch guide a bit more and see if i can pull it together with a working patch, after i write it,will upload results here so:
i would like to have a confirmation/greenlight from you that the patch/patches are ready for testing so i can give to T440P users to test, if they report positive feedback that X & Y is working now, will start writing the guide.
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
188,949
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Ok... i guess what you mean is that he added SSDT-PNLF into patched even though i added the code of PNLF to SSDT-T440P ?
Probably.

So i should add it to SSDT-PTSWAK.dsl, i will have to read the hotpatch guide one more time.
Or create your own _WAK replacement (SSDT+patch).
 

Sniki

Moderator
Joined
Jan 5, 2016
Messages
2,150
Motherboard
HP Elite 8300 SFF
CPU
i7-3770
Graphics
Intel HD3000
Mac
MacBook Pro
Mobile Phone
iOS
Probably.



Or create your own _WAK replacement (SSDT+patch).
Ok will try to add that later.
Another thing that i noticed is that in his IOREG i can still see VID instead of iGPU even though the Patch was applied, could that PNLF somehow have messed it up or i need 1 more patch for it,i tried to examine more his ACPI so what i found on DSDT is:
Code:
    2587:              Device (VID)

00002E44:  5B 82 4D AE 56 49 44 5F     "[.M.VID_"
should this device be renamed to IGPU ? like replace with 5B 82 4D AE 49 47 50 55 ?
Also:
Code:
   4807:                              {
    4808:                                  Notify (VID, 0x80)

00004CD2:  86 56 49 44 5F 0A 80 ...    ".VID_.."

etc
Is it okay to simply replace every .VID to .IGPU instead ?
Comment: Change VID to IGPU
Find: 56 49 44 5F
Replace 49 47 50 55

Or the reason of VID showing up on ioreg might have been caused by the PNLF Error, could that also be a possibility ?
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
188,949
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Ok will try to add that later.
Another thing that i noticed is that in his IOREG i can still see VID instead of iGPU even though the Patch was applied, could that PNLF somehow have messed it up or i need 1 more patch for it,i tried to examine more his ACPI so what i found on DSDT is:
Code:
    2587:              Device (VID)

00002E44:  5B 82 4D AE 56 49 44 5F     "[.M.VID_"
should this device be renamed to IGPU ? like replace with 5B 82 4D AE 49 47 50 55 ?
Also:
Code:
   4807:                              {
    4808:                                  Notify (VID, 0x80)

00004CD2:  86 56 49 44 5F 0A 80 ...    ".VID_.."

etc
Is it okay to simply replace every .VID to .IGPU instead ?
Comment: Change VID to IGPU
Find: 56 49 44 5F
Replace 49 47 50 55

Or the reason of VID showing up on ioreg might have been caused by the PNLF Error, could that also be a possibility ?
Note that two patches required for VID->IGPU.
See plists linked by my guide.
You want to rename PCI0.VID, but not other VID (such as those for discrete graphics).
 

Sniki

Moderator
Joined
Jan 5, 2016
Messages
2,150
Motherboard
HP Elite 8300 SFF
CPU
i7-3770
Graphics
Intel HD3000
Mac
MacBook Pro
Mobile Phone
iOS
Note that two patches required for VID->IGPU.
See plists linked by my guide.
You want to rename PCI0.VID, but not other VID (such as those for discrete graphics).
Yes i saw them, but i thought that only one of them should be applied.
i tried to match the second one by analyzing ACPI tables and hex code didn't seem to match so that's why i thought it's unnecessary to add the second one (maybe no discrete GPU Present) only Intel
Or it is necessary to have both of them no matter if Discrete GPU present or not ?

BTW when i went to his XHC Controller in IOREG, i noticed it does have same id as my L440 : pci8086,8c31
Is it possible since its same controller that the same Custom USB Port Injector used on my L440 can work on his T440P as well ?
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
188,949
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Yes i saw them, but i thought that only one of them should be applied.
i tried to match the second one by analyzing ACPI tables and hex code didn't seem to match so that's why i thought it's unnecessary to add the second one (maybe no discrete GPU Present) only Intel
Or it is necessary to have both of them no matter if Discrete GPU present or not ?
Keep in mind patches apply to both DSDT.aml and SSDT*.aml.

BTW, I found one match for the second patch in the DSDT.aml you provided in origin.zip.
Why do you think the second one didn't match anything?

BTW when i went to his XHC Controller in IOREG, i noticed it does have same id as my L440 : pci8086,8c31
Is it possible since its same controller that the same Custom USB Port Injector used on my L440 can work on his T440P as well ?
It depends on the specifics.
What was your XHC device-id?
Are the ports and port addresses (that need to be enabled) the same?
 

Sniki

Moderator
Joined
Jan 5, 2016
Messages
2,150
Motherboard
HP Elite 8300 SFF
CPU
i7-3770
Graphics
Intel HD3000
Mac
MacBook Pro
Mobile Phone
iOS
Keep in mind patches apply to both DSDT.aml and SSDT*.aml.
From Patchmatic Extract i think i found that the issue is in SSDT-1 (from the patchmatic extract).
(attached the SSDT-1 from patchmatic extract.
But where the error comes from: not so sure, my thoughts:
-Either due to the missing second patch that you mentioned
-Either another rename needed
-Either PEGP needs to be disabled with the SSDT-Disable_DGPU.dsl:
Code:
// For disabling the discrete GPU

DefinitionBlock("", "SSDT", 2, "hack", "D-DGPU", 0)
{
    External(_SB.PCI0.PEG0.PEGP._OFF, MethodObj)
    External(_SB.PCI0.PEGP.DGFX._OFF, MethodObj)

    Device(RMD1)
    {
        Name(_HID, "RMD10000")
        Method(_INI)
        {
            // disable discrete graphics (Nvidia/Radeon) if it is present
            If (CondRefOf(\_SB.PCI0.PEG0.PEGP._OFF)) { \_SB.PCI0.PEG0.PEGP._OFF() }
            If (CondRefOf(\_SB.PCI0.PEGP.DGFX._OFF)) { \_SB.PCI0.PEGP.DGFX._OFF() }
        }
    }
}
//EOF
-So that way i completely Ditch SSDT-PTSWAK and use SSDT-Disable_DGPU.dsl and at the same time create my own SSDT-WAK so i can include the LED Blink Fix code too ?
It depends on the specifics.
What was your XHC device-id?
Are the ports and port addresses (that need to be enabled) the same?
For some reasons his camera & Bluetooth are not being injected into XHC.
USB Port limit patch 100 series is present and enabled (from 10.12 sierra common unsolved problems post)
but i guess somehow its not written properly since i dont see the full range of XHC ports like i did on my L440.
Have to debug, like you mentioned on my own L440 post just a few minutes ago.
After i set debug=True, where can i actually see the debug report ?

If he install FakePCIID_XHCMUx.kext i can see his camera and bluetooth being injected into EH01 & EH02 controllers.
it has to be wrong USB port limit patch ?

The XHC device id of my L440 is 8c31 same as on the T440P of @godwayne305

Ioreg Comparison.png
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
188,949
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
From Patchmatic Extract i think i found that the issue is in SSDT-1 (from the patchmatic extract).
(attached the SSDT-1 from patchmatic extract.
But where the error comes from: not so sure, my thoughts:
-Either due to the missing second patch that you mentioned
Implement both patches.
I created the two patches (both expected to be needed) based on existing Thinkpad data I had at hand.

-Either PEGP needs to be disabled with the SSDT-Disable_DGPU.dsl:
Separate topic really. You would need ACPI files/ioreg from a machine that has discrete graphics.

-So that way i completely Ditch SSDT-PTSWAK and use SSDT-Disable_DGPU.dsl and at the same time create my own SSDT-WAK so i can include the LED Blink Fix code too ?
Disabling the GPU is somewhat separate from _PTS/_WAK (you only need to call _ON from _PTS, _OFF from _WAK if testing actually shows it is necessary).
Focus on one thing at a time.
If you want to hook both _PTS and _WAK to make things easier should you need to in the future that's fine.

For some reasons his camera & Bluetooth are not being injected into XHC.
A user with the machine must go through the SSDT/UsbInjectAll guide).

USB Port limit patch 100 series is present and enabled (from 10.12 sierra common unsolved problems post)
but i guess somehow its not written properly since i dont see the full range of XHC ports like i did on my L440.
Not really possible to verify anything without USBInjectAll.kext installed.
And full "Problem Reporting" files in that scenario.

Have to debug, like you mentioned on my own L440 post just a few minutes ago.
After i set debug=True, where can i actually see the debug report ?
They are written to the screen during boot.

If he install FakePCIID_XHCMUx.kext i can see his camera and bluetooth being injected into EH01 & EH02 controllers.
it has to be wrong USB port limit patch ?
FakePCIID_XHCIMux.kext will route those HSxx ports normally on XHC to EHCI.
That's all it does.

The XHC device id of my L440 is 8c31 same as on the T440P of @godwayne305
Since they share the same ID, but perhaps not the same port layout, you will need separate UIAC data for each.
Like in the ProBook guide where I include a different USB customization depending on model.
 
Top