Contribute
Register

[solved] Asus UX410U - Hot patch keyboard backlight

Status
Not open for further replies.
EC is easy to fix, but how to fix offset? I don't know anything about it
 
I see that in your static battery patch for asus (from your repo), it doesn't use anything related to offsets. So why do I have to patch offsets?

It refers to the original fields (patched) in the EC, which of course have the correct offsets.
 
So what I have to do is add the correct offset, like this?
OperationRegion (XCOR, EmbeddedControl, Zero, 0xFF)
Field (XCOR, ByteAcc, Lock, Preserve)
{
Offset (0xC4),
XC30, 8,
XC31, 8,
Offset (0xF4),
B0S0, 8,
B0S1, 8,
Offset (0xFC),
B1S0, 8,
B1S1, 8
}

OperationRegion (XSMX, EmbeddedControl, 0x18, 0x28)
Field (XSMX, ByteAcc, NoLock, Preserve)
{
Offset (0x22),
BA00,8,BA01,8,BA02,8,BA03,8,
BA04,8,BA05,8,BA06,8,BA07,8,
BA08,8,BA09,8,BA0A,8,BA0B,8,
BA0C,8,BA0D,8,BA0E,8,BA0F,8,
BA10,8,BA11,8,BA12,8,BA13,8,
BA14,8,BA15,8,BA16,8,BA17,8,
BA18,8,BA19,8,BA1A,8,BA1B,8,
BA1C,8,BA1D,8,BA1E,8,BA1F,8,
}

Field (XSMX, ByteAcc, NoLock, Preserve)
{
Offset (0x04),
T2B0, 8,
T2B1, 8
}
Am I wrong?
 
So what I have to do is add the correct offset, like this?
OperationRegion (XCOR, EmbeddedControl, Zero, 0xFF)
Field (XCOR, ByteAcc, Lock, Preserve)
{
Offset (0xC4),
XC30, 8,
XC31, 8,
Offset (0xF4),
B0S0, 8,
B0S1, 8,
Offset (0xFC),
B1S0, 8,
B1S1, 8
}

OperationRegion (XSMX, EmbeddedControl, 0x18, 0x28)
Field (XSMX, ByteAcc, NoLock, Preserve)
{
Offset (0x22),
BA00,8,BA01,8,BA02,8,BA03,8,
BA04,8,BA05,8,BA06,8,BA07,8,
BA08,8,BA09,8,BA0A,8,BA0B,8,
BA0C,8,BA0D,8,BA0E,8,BA0F,8,
BA10,8,BA11,8,BA12,8,BA13,8,
BA14,8,BA15,8,BA16,8,BA17,8,
BA18,8,BA19,8,BA1A,8,BA1B,8,
BA1C,8,BA1D,8,BA1E,8,BA1F,8,
}

Field (XSMX, ByteAcc, NoLock, Preserve)
{
Offset (0x04),
T2B0, 8,
T2B1, 8
}
Am I wrong?

You have the right idea, but...

Your offset for BAxx is wrong.
Correct math:
Code:
            OperationRegion (SMBX, EmbeddedControl, 0x18, 0x28)
            Field (SMBX, ByteAcc, NoLock, Preserve)
            {
                PRTC,   8, //18
                SSTS,   5, //19
                    ,   1, 
                ALFG,   1, 
                CDFG,   1, 
                ADDR,   8, //1a
                CMDB,   8, //1b
                BA00,   8, //1c
 
Oh, I forgot that it was hex, not decimal
 
Oh, I forgot that it was hex, not decimal

Note that my code(offsets) are assuming you define the fields based on a zero-based OperationRegion.
(you only need one EmbeddedControl OperationRegion).

If you're actually creating multiple OperationRegions with non-zero starting offsets, as the original DSDT has, then:
Code:
        OperationRegion (XSMX, EmbeddedControl, 0x18, 0x28)
        Field (XSMX, ByteAcc, NoLock, Preserve)
        {
            Offset (4),
            BA00,8,BA01,8,BA02,8,BA03,8,
            BA04,8,BA05,8,BA06,8,BA07,8,
            BA08,8,BA09,8,BA0A,8,BA0B,8,
            BA0C,8,BA0D,8,BA0E,8,BA0F,8,
            BA10,8,BA11,8,BA12,8,BA13,8,
            BA14,8,BA15,8,BA16,8,BA17,8,
            BA18,8,BA19,8,BA1A,8,BA1B,8,
            BA1C,8,BA1D,8,BA1E,8,BA1F,8,
        }
 
Still failing. Note that I have removed some unnecessary patch (SMB2, RDBB, WRBB)
 

Attachments

  • ASUS UX410.zip
    2.8 MB · Views: 87
Still failing. Note that I have removed some unnecessary patch (SMB2, RDBB, WRBB)

Because your laptop has ECDT, you cannot rename EC0 -> EC.
Your patchmatic output does not disassemble: iasl -da -dl DSDT.aml SSDT*.aml
Result:
Code:
ACPI Error: [_QCD] Namespace lookup failure, AE_ALREADY_EXISTS (20161210/dswload-462)
ACPI Exception: AE_ALREADY_EXISTS, During name lookup/catalog (20161210/psobject-310)
 
Status
Not open for further replies.
Back
Top