Contribute
Register

Clevo p370em backlight keyboard

Status
Not open for further replies.
Joined
Feb 24, 2012
Messages
175
Motherboard
HP ProBook 470 G5 (Clover)
CPU
i7-8550u
Graphics
UHD 620
Mac
  1. Mac Pro
Mobile Phone
  1. Android
Hi guys!
Have a "strange" idea!
On my lappy I have a backlight keyboard, it is on, only off after sleep. In windows there is an app to controll colors of keyboard, in mac not, ok.
The idea is to set this colors somewhere in dsdt....For now I have default ugly blue dark color, would like to change it to white.
Rehabman, I've installed yours ACPIDebug and ApplePS2Keyboard kexts.
ApplePS2Keyboard give me this kind of output:

Aug 16 01:00:08 rikos-clevo-pro kernel[0]: ApplePS2Keyboard: sending key 2a=38
Aug 16 01:00:08 rikos-clevo-pro kernel[0]: ApplePS2Keyboard: sending key 1e=0
Aug 16 01:00:09 rikos-clevo-pro kernel[0]: ApplePS2Keyboard: sending key 2e=8
Aug 16 01:00:10 rikos-clevo-pro kernel[0]: ApplePS2Keyboard: sending key 19=23
Aug 16 01:00:10 rikos-clevo-pro kernel[0]: ApplePS2Keyboard: sending key 17=22
Aug 16 01:00:12 rikos-clevo-pro kernel[0]: ApplePS2Keyboard: sending key 2a=38
Aug 16 01:00:12 rikos-clevo-pro kernel[0]: ApplePS2Keyboard: sending key 20=2
Aug 16 01:00:12 rikos-clevo-pro kernel[0]: ApplePS2Keyboard: sending key 12=e
Aug 16 01:00:13 rikos-clevo-pro kernel[0]: ApplePS2Keyboard: sending key 30=b
Aug 16 01:00:13 rikos-clevo-pro kernel[0]: ApplePS2Keyboard: sending key 16=20
Aug 16 01:00:13 rikos-clevo-pro kernel[0]: ApplePS2Keyboard: sending key 22=5

Does nothing when I change liminosity of keyboard with combination of FN+(+/-). +/- are the second key to increase or decrease the luminosity.
All FN+combinations work fine.
ACPIDebug doeas nothing...apart:
Aug 16 00:42:30 rikos-clevo-pro com.apple.kextcache[5307]: kext com.rehabman.driver.ACPIDebug 1009000 is in exception list, allowing to load

Any idea how to find methods that control backlight of my keyboard?
Thank you!
 
Hi guys!
Have a "strange" idea!
On my lappy I have a backlight keyboard, it is on, only off after sleep. In windows there is an app to controll colors of keyboard, in mac not, ok.
The idea is to set this colors somewhere in dsdt....For now I have default ugly blue dark color, would like to change it to white.
Rehabman, I've installed yours ACPIDebug and ApplePS2Keyboard kexts.
ApplePS2Keyboard give me this kind of output:

Aug 16 01:00:08 rikos-clevo-pro kernel[0]: ApplePS2Keyboard: sending key 2a=38
Aug 16 01:00:08 rikos-clevo-pro kernel[0]: ApplePS2Keyboard: sending key 1e=0
Aug 16 01:00:09 rikos-clevo-pro kernel[0]: ApplePS2Keyboard: sending key 2e=8
Aug 16 01:00:10 rikos-clevo-pro kernel[0]: ApplePS2Keyboard: sending key 19=23
Aug 16 01:00:10 rikos-clevo-pro kernel[0]: ApplePS2Keyboard: sending key 17=22
Aug 16 01:00:12 rikos-clevo-pro kernel[0]: ApplePS2Keyboard: sending key 2a=38
Aug 16 01:00:12 rikos-clevo-pro kernel[0]: ApplePS2Keyboard: sending key 20=2
Aug 16 01:00:12 rikos-clevo-pro kernel[0]: ApplePS2Keyboard: sending key 12=e
Aug 16 01:00:13 rikos-clevo-pro kernel[0]: ApplePS2Keyboard: sending key 30=b
Aug 16 01:00:13 rikos-clevo-pro kernel[0]: ApplePS2Keyboard: sending key 16=20
Aug 16 01:00:13 rikos-clevo-pro kernel[0]: ApplePS2Keyboard: sending key 22=5

Does nothing when I change liminosity of keyboard with combination of FN+(+/-). +/- are the second key to increase or decrease the luminosity.
All FN+combinations work fine.
ACPIDebug doeas nothing...apart:
Aug 16 00:42:30 rikos-clevo-pro com.apple.kextcache[5307]: kext com.rehabman.driver.ACPIDebug 1009000 is in exception list, allowing to load

Any idea how to find methods that control backlight of my keyboard?
Thank you!

Use ACPIDebug to instrument your EC query methods. You will see the patch in the ACPIDebug repo. See if one of the methods is called when you press the keys for keyboard backlight.
 
Read the README for setting up ACPI debug in MaciASL: https://github.com/RehabMan/OS-X-ACPI-Debug

Done! Thank you!
For backlight control I have only 4 combinations, for 2 of them (fn+/ (cicling color or luminosity, dont know exactly) and for fn+* (on/off backlight)) in Console I have :

16/08/14 09:06:06,000 kernel[0]: ACPIDebug: "EC _Q50 enter"
16/08/14 09:06:06,000 kernel[0]: ACPIDebug: "EC _Q50 exit"

Another 2 (fn+"+" (increase luminosity) and fn+"-" (decrease luminosity)) I have no output to Console.
What eslse can I do?
Thank you!
This is my DSDT:
 

Attachments

  • DSDT.dsl.zip
    38.4 KB · Views: 98
Done! Thank you!
For backlight control I have only 4 combinations, for 2 of them (fn+/ (cicling color or luminosity, dont know exactly) and for fn+* (on/off backlight)) in Console I have :

16/08/14 09:06:06,000 kernel[0]: ACPIDebug: "EC _Q50 enter"
16/08/14 09:06:06,000 kernel[0]: ACPIDebug: "EC _Q50 exit"

Another 2 (fn+"+" (increase luminosity) and fn+"-" (decrease luminosity)) I have no output to Console.
What eslse can I do?
Thank you!
This is my DSDT:

Are you certain that all of your keys don't generate _Q50. It looks like _Q50 is setup to handle many different events...

Code:
           Method (_Q50, 0, Serialized)  // _Qxx: EC Query
            {
                \RMDT.P1 ("EC _Q50 enter")
                P8XH (Zero, 0x50)
                Store (OEM4, Local0)
                Name (T_0, Zero)
                Store (Local0, T_0)
                If (LEqual (T_0, 0x9E))
                {
                    P8XH (Zero, 0x9E)
                    Store (0x9E, ^^^^WMI.EVNT)
                }
                Else
                {
                    If (LEqual (T_0, 0x9F))
                    {
                        P8XH (Zero, 0x9F)
                        Store (0x9F, ^^^^WMI.EVNT)
                    }
                    Else
                    {
                        If (LEqual (T_0, 0x80))
                        {
                            P8XH (Zero, 0x80)
                            Store (0x83, ^^^^WMI.EVNT)
                        }
                        Else
                        {
                            If (LEqual (T_0, 0x81))
                            {
                                P8XH (Zero, 0x81)
                                Store (0x81, ^^^^WMI.EVNT)
                            }
                            Else
                            {
                                If (LEqual (T_0, 0x82))
                                {
                                    P8XH (Zero, 0x82)
                                    Store (0x82, ^^^^WMI.EVNT)
                                }
                                Else
                                {
                                    If (LEqual (T_0, 0xDB))
                                    {
                                        P8XH (Zero, 0xDB)
                                        Store (0xA3, ^^^^WMI.EVNT)
                                    }
                                    Else
                                    {
                                        If (LEqual (T_0, 0xC7))
                                        {
                                            P8XH (Zero, 0xC7)
                                            Store (0xC7, ^^^^WMI.EVNT)
                                        }
                                        Else
                                        {
                                            If (LEqual (T_0, 0xC8))
                                            {
                                                P8XH (Zero, 0xC8)
                                                Store (0xC8, ^^^^WMI.EVNT)
                                            }
                                            Else
                                            {
                                                If (LEqual (T_0, 0xC9))
                                                {
                                                    P8XH (Zero, 0xC9)
                                                    Store (0xC9, ^^^^WMI.EVNT)
                                                }
                                                Else
                                                {
                                                    If (LEqual (T_0, 0xCA))
                                                    {
                                                        P8XH (Zero, 0xCA)
                                                        Store (0xCA, ^^^^WMI.EVNT)
                                                    }
                                                    Else
                                                    {
                                                        If (LEqual (T_0, 0xCF))
                                                        {
                                                            P8XH (Zero, 0xCF)
                                                            Store (0xCB, ^^^^WMI.EVNT)
                                                        }
                                                        Else
                                                        {
                                                            If (LEqual (T_0, 0xD0))
                                                            {
                                                                P8XH (Zero, 0xD0)
                                                                Store (0xCC, ^^^^WMI.EVNT)
                                                            }
                                                            Else
                                                            {
                                                                If (LEqual (T_0, 0xA8))
                                                                {
                                                                    P8XH (Zero, 0xA8)
                                                                    Store (0x9A, ^^^^WMI.EVNT)
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }

                Notify (WMI, 0xD0)
                \RMDT.P1 ("EC _Q50 exit")
            }
 
Are you certain that all of your keys don't generate _Q50. It looks like _Q50 is setup to handle many different events...

Code:
           Method (_Q50, 0, Serialized)  // _Qxx: EC Query
            {
                \RMDT.P1 ("EC _Q50 enter")
                P8XH (Zero, 0x50)
                Store (OEM4, Local0)
                Name (T_0, Zero)
                Store (Local0, T_0)
                If (LEqual (T_0, 0x9E))
                {
                    P8XH (Zero, 0x9E)
                    Store (0x9E, ^^^^WMI.EVNT)
                }
                Else
                {
                    If (LEqual (T_0, 0x9F))
                    {
                        P8XH (Zero, 0x9F)
                        Store (0x9F, ^^^^WMI.EVNT)
                    }
                    Else
                    {
                        If (LEqual (T_0, 0x80))
                        {
                            P8XH (Zero, 0x80)
                            Store (0x83, ^^^^WMI.EVNT)
                        }
                        Else
                        {
                            If (LEqual (T_0, 0x81))
                            {
                                P8XH (Zero, 0x81)
                                Store (0x81, ^^^^WMI.EVNT)
                            }
                            Else
                            {
                                If (LEqual (T_0, 0x82))
                                {
                                    P8XH (Zero, 0x82)
                                    Store (0x82, ^^^^WMI.EVNT)
                                }
                                Else
                                {
                                    If (LEqual (T_0, 0xDB))
                                    {
                                        P8XH (Zero, 0xDB)
                                        Store (0xA3, ^^^^WMI.EVNT)
                                    }
                                    Else
                                    {
                                        If (LEqual (T_0, 0xC7))
                                        {
                                            P8XH (Zero, 0xC7)
                                            Store (0xC7, ^^^^WMI.EVNT)
                                        }
                                        Else
                                        {
                                            If (LEqual (T_0, 0xC8))
                                            {
                                                P8XH (Zero, 0xC8)
                                                Store (0xC8, ^^^^WMI.EVNT)
                                            }
                                            Else
                                            {
                                                If (LEqual (T_0, 0xC9))
                                                {
                                                    P8XH (Zero, 0xC9)
                                                    Store (0xC9, ^^^^WMI.EVNT)
                                                }
                                                Else
                                                {
                                                    If (LEqual (T_0, 0xCA))
                                                    {
                                                        P8XH (Zero, 0xCA)
                                                        Store (0xCA, ^^^^WMI.EVNT)
                                                    }
                                                    Else
                                                    {
                                                        If (LEqual (T_0, 0xCF))
                                                        {
                                                            P8XH (Zero, 0xCF)
                                                            Store (0xCB, ^^^^WMI.EVNT)
                                                        }
                                                        Else
                                                        {
                                                            If (LEqual (T_0, 0xD0))
                                                            {
                                                                P8XH (Zero, 0xD0)
                                                                Store (0xCC, ^^^^WMI.EVNT)
                                                            }
                                                            Else
                                                            {
                                                                If (LEqual (T_0, 0xA8))
                                                                {
                                                                    P8XH (Zero, 0xA8)
                                                                    Store (0x9A, ^^^^WMI.EVNT)
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }

                Notify (WMI, 0xD0)
                \RMDT.P1 ("EC _Q50 exit")
            }

Shure I'm not certain! :) Just verifyed all keys, the only another one that give EC _Q50 is CapsLock...
Thank you!
 
Shure I'm not certain! :) Just verifyed all keys, the only another one that give EC _Q50 is CapsLock...
Thank you!

But in your previous post you wrote:
and for fn+* (on/off backlight)) in Console I have :

16/08/14 09:06:06,000 kernel[0]: ACPIDebug: "EC _Q50 enter"
16/08/14 09:06:06,000 kernel[0]: ACPIDebug: "EC _Q50 exit"

Seems to conflict with what you just wrote about "_Q50 is CapsLock".

Which is it?

Under what conditions is _Q50 called?

You have to be very clear about what EC methods are called with each keypress and which keypresses create PS2 codes. Otherwise, you have no hope of figuring it out.

You should also instrument GPE events...
 
Rehabman, you must excuse my english, I'm still learning!

Anyway, I said:
For backlight control I have only 4 combinations, for 2 of them (fn+/ (cicling color or luminosity, dont know exactly) and for fn+* (on/off backlight)) in Console I have :

16/08/14 09:06:06,000 kernel[0]: ACPIDebug: "EC _Q50 enter"
16/08/14 09:06:06,000 kernel[0]: ACPIDebug: "EC _Q50 exit"

the only another one/key that give EC _Q50 is CapsLock.

So they are 3 in total:
CapsLock
fn+/=cicling color or luminosity
fn+*=on/off backlight

Thank you!

Edit: ps2 debug gives me output only for audio +/- and on/off combinations of fn+:
16/08/14 16:00:52,000 kernel[0]: ApplePS2Keyboard: sending key e020=4a
16/08/14 16:00:56,000 kernel[0]: ApplePS2Keyboard: sending key e02e=49
16/08/14 16:00:56,000 kernel[0]: ApplePS2Keyboard: sending key e030=48

No other output for fn+ combinations.
 
Rehabman, you must excuse my english, I'm still learning!

Anyway, I said:
For backlight control I have only 4 combinations, for 2 of them (fn+/ (cicling color or luminosity, dont know exactly) and for fn+* (on/off backlight)) in Console I have :

16/08/14 09:06:06,000 kernel[0]: ACPIDebug: "EC _Q50 enter"
16/08/14 09:06:06,000 kernel[0]: ACPIDebug: "EC _Q50 exit"

the only another one/key that give EC _Q50 is CapsLock.

So they are 3 in total:
CapsLock
fn+/=cicling color or luminosity
fn+*=on/off backlight

Thank you!

If the keys don't generate EC query calls, then they are handled some other way. You will not be able to make the keys work until you figure out how they are handled.

Try GPE.
 
Status
Not open for further replies.
Back
Top