Contribute
Register

[Help] internal USB keyboard ACPI remap

Status
Not open for further replies.
Joined
Jun 3, 2017
Messages
174
Motherboard
Motherboard OR System make and model names > See Forum Rules!
CPU
> Need full CPU model name > See Rules!
Graphics
> Need model name or version number > See Forum Rules!
Mac
  1. iMac
  2. MacBook
  3. MacBook Air
  4. MacBook Pro
  5. Mac mini
  6. Mac Pro
Classic Mac
  1. 128K
  2. 20th Anniv. Mac
  3. 512K
  4. Apple
  5. Centris
  6. Classic
  7. Color Classic
  8. eMac
  9. iBook
  10. iMac
  11. LC
  12. Lisa
  13. Performa
  14. Plus
  15. Portable
  16. Power Mac
  17. PowerBook
  18. Quadra
  19. SE
  20. Workgroup Server
  21. XL
  22. Xserve
  23. SE/30
Mobile Phone
  1. Android
  2. iOS
  3. Other
Hi! So I've got an issue. My device, an ASUS FX503VD doesn't seem to have a PS2 keyboard. I've checked in Windows, as well as IOREG, and it appears that my device is on the USB bus. Also, my functions keys appear to be nonstandard for ASUS devices, as my brightness keys are f7 and f8, instead of f5 and f6. As such I have no _Q0E _Q0F keys in ACPI, rendering any brightness patch useless.
I've attempted to manually patch the methods with values IANE 0x20 and 0x10 (from the patches), to no avail, as well as modifying a lot of other keys with no effect. Karabiner sees the fn presses, however FN+Function presses don't seem to show up, which leads me to beleive that it is indeed somewhere in the ACPI.
Is it possible that since it is not PS2 related, there are ACPI values in a different area i need to change?
Any help appreciated.
 

Attachments

  • debug_32202.zip
    2.5 MB · Views: 196
Hi! So I've got an issue. My device, an ASUS FX503VD doesn't seem to have a PS2 keyboard. I've checked in Windows, as well as IOREG, and it appears that my device is on the USB bus. Also, my functions keys appear to be nonstandard for ASUS devices, as my brightness keys are f7 and f8, instead of f5 and f6. As such I have no _Q0E _Q0F keys in ACPI, rendering any brightness patch useless.
I've attempted to manually patch the methods with values IANE 0x20 and 0x10 (from the patches), to no avail, as well as modifying a lot of other keys with no effect. Karabiner sees the fn presses, however FN+Function presses don't seem to show up, which leads me to beleive that it is indeed somewhere in the ACPI.
Is it possible that since it is not PS2 related, there are ACPI values in a different area i need to change?
Any help appreciated.

Method _Q11 and _Q12 look to be related to brightness keys:
Code:
        Method (_Q11, 0, NotSerialized)  // _Qxx: EC Query
        {
            Store (0x11, P80H)
            If (LGreaterEqual (OSYS, 0x07DC))
            {
                If (CondRefOf (\_SB.PCI0.PEG0.PEGP.EDP1))
                {
                    Notify (^^^PEG0.PEGP.EDP1, 0x87)
                }
                Else
                {
                    BRTN (0x87)
                }
            }

            Return (Zero)
        }

        Method (_Q12, 0, NotSerialized)  // _Qxx: EC Query
        {
            Store (0x12, P80H)
            If (LGreaterEqual (OSYS, 0x07DC))
            {
                If (CondRefOf (\_SB.PCI0.PEG0.PEGP.EDP1))
                {
                    Notify (^^^PEG0.PEGP.EDP1, 0x86)
                }
                Else
                {
                    BRTN (0x86)
                }
            }

            Return (Zero)
        }

Notify codes 0x86 and 0x87 are those used by Windows for brightness keys.
 
Thanks. Is there a way to determine what codes lower/raise brightness? I've tried the following for _Q11, but none have made any difference.
Code:
^^^^ATKD.IANE (0x87)
Notify (^^^PEG0.PEGP.EDP1, 0x87)
^^^^ATKD.IANE (0x20)
Notify (^^^PEG0.PEGP.EDP1, 0x20)

I've also looked at ATKD and IANE, as well as GFX0 in an SSDT, none of which give it away..
Additionally, EDP1 doesn't exist in any other ACPI file other than DSDT.dsl, which just uses an External.
 
ok. I've used ACPIDebug, and it appears that none of the Function keys are called. The only output of ACPIDebug into log is
Code:
2018-08-07 11:18:12.694665-1000 0xc6       Default     0x0                  0      kernel: (kernel) ACPIDebug: Version 0.1.4 starting on OS X Darwin 16.7.
2018-08-07 11:18:12.798897-1000 0x85       Default     0x0                  0      kernel: (kernel) ACPIDebug: "EC _Q20 enter"
2018-08-07 11:18:12.813026-1000 0xda       Default     0x0                  0      kernel: (kernel) ACPIDebug: "EC _Q20 exit"
2018-08-07 11:18:28.579926-1000 0x601      Default     0x0                  0      kernel: (kernel) ACPIDebug: "EC _Q81 enter"
2018-08-07 11:18:28.580028-1000 0x601      Default     0x0                  0      kernel: (kernel) ACPIDebug: "EC _Q81 exit"
I've tried pressing the function keys, and applied the Win10 _OSI patch, which doesn't seem to change anything. Debug files attached.
 

Attachments

  • debug_31019.zip
    2.5 MB · Views: 161
ok. I've used ACPIDebug, and it appears that none of the Function keys are called. The only output of ACPIDebug into log is
Code:
2018-08-07 11:18:12.694665-1000 0xc6       Default     0x0                  0      kernel: (kernel) ACPIDebug: Version 0.1.4 starting on OS X Darwin 16.7.
2018-08-07 11:18:12.798897-1000 0x85       Default     0x0                  0      kernel: (kernel) ACPIDebug: "EC _Q20 enter"
2018-08-07 11:18:12.813026-1000 0xda       Default     0x0                  0      kernel: (kernel) ACPIDebug: "EC _Q20 exit"
2018-08-07 11:18:28.579926-1000 0x601      Default     0x0                  0      kernel: (kernel) ACPIDebug: "EC _Q81 enter"
2018-08-07 11:18:28.580028-1000 0x601      Default     0x0                  0      kernel: (kernel) ACPIDebug: "EC _Q81 exit"
I've tried pressing the function keys, and applied the Win10 _OSI patch, which doesn't seem to change anything. Debug files attached.

Why did you place the RMDT calls inside the If:
Code:
        Method (_Q11, 0, NotSerialized)  // _Qxx: EC Query
        {
            If (ATKP)
            {
                \RMDT.P1 ("EC _Q11 enter")
                ^^^^ATKD.IANE (0x87)
                \RMDT.P1 ("EC _Q11 exit")
            }
        }

Should be:
Code:
        Method (_Q11, 0, NotSerialized)  // _Qxx: EC Query
        {
                \RMDT.P1 ("EC _Q11 enter")
            If (ATKP)
            {
                ^^^^ATKD.IANE (0x87)
            }
                \RMDT.P1 ("EC _Q11 exit")
        }
 
I've applied the instruments patch from your acpidebug repo (not inside if anymore!), but no difference.
_Q20 still shows up in log, but not anything else.. (keypress or not)
Why does asus have to make this so difficult? They appear to make it as difficult as possible to customize the ACPI :(

Code:
2018-08-07 11:50:47.691910-1000 0xc6       Default     0x0                  0      kernel: (kernel) ACPIDebug: Version 0.1.4 starting on OS X Darwin 16.7.
2018-08-07 11:50:47.795808-1000 0x85       Default     0x0                  0      kernel: (kernel) ACPIDebug: "EC _Q20 enter"
2018-08-07 11:50:47.808950-1000 0xdc       Default     0x0                  0      kernel: (kernel) ACPIDebug: "EC _Q20 exit"
 

Attachments

  • debug_27774.zip
    2.6 MB · Views: 163
The only other reference to _Q11 is in _SB.ATKD.WMNB,
Code:
                        If (LEqual (IIA1, 0x10))
                        {
                            Store (0x10, P80H)
                            ^^PCI0.LPCB.EC0._Q11 ()
                            Return (Zero)
                        }
which I can't figure what it does other than execute _Q11.. I added a rmdt.p1 to it in a previous debug archive, but again, there was no output.

Following this https://www.tonymacx86.com/threads/guide-patching-dsdt-ssdt-for-laptop-backlight-control.152659/,
It's possible that it's disabled somewhere? Moving on, I can't find a NEVT, and the given support link for GPE methods doesn't work http://www.tonymacx86.com/yosemite-...-laptop-backlight-control-44.html#post1100377
 
Last edited:
The only other reference to _Q11 is in _SB.ATKD.WMNB,
Code:
                        If (LEqual (IIA1, 0x10))
                        {
                            Store (0x10, P80H)
                            ^^PCI0.LPCB.EC0._Q11 ()
                            Return (Zero)
                        }
which I can't figure what it does other than execute _Q11.. I added a rmdt.p1 to it in a previous debug archive, but again, there was no output.

Following this https://www.tonymacx86.com/threads/guide-patching-dsdt-ssdt-for-laptop-backlight-control.152659/,
It's possible that it's disabled somewhere? Moving on, I can't find a NEVT, and the given support link for GPE methods doesn't work http://www.tonymacx86.com/yosemite-...-laptop-backlight-control-44.html#post1100377

Make sure you're pressing the right keys.
Check in Windows so you're certain you know which keys those are.
 
I can confirm that Fn+F7 and Fn+F8 control brightness, in windows. F6 turns either off or on.
Fn+F2 and Fn+F3 are the volume keys, which strangely work in MacOS. So does the mute button (Fn+F1)

Using karabiner, Fn and any other function key combination result in no scan codes, while f1,f2,f3 (the volume keys) do. I wanted to assign brightness to fn+f7 in karabiner... but again, it's as if the keys don't exist.
 
Status
Not open for further replies.
Back
Top