Contribute
Register

HP 240 G5 Brightness keys not working with ELAN driver.

Status
Not open for further replies.
Joined
Jul 19, 2016
Messages
32
Motherboard
HP 240 G5
CPU
Intel Core i5-6200U
Graphics
Intel HD 530
Well, I've been trying to get as much functionality as possible on my laptop, but there's some bugs I still need to iron out.
I'll add my two systems later in the signature + profile.

I have a HP 240 G5 - Intel Core i5-6200U, with Intel HD 520,
1TB disk, 4GB ram (please send me 2x8gb sticks of ddr4)
WiFi + BT RTL8723BE (I know it's not supported).

Right now I got working:
- QE/CI using the plist Rehabman prepared for Intel HD 5xx. (Although I'm not entirely sure what made it work).
- Audio with the help of some clover renaming (not sure which one) and AppleALC
- Battery thanks to the ACPI-Battery by RehabMan
- Brightness using the IntelBacklightInjector.kext and some ssdt edits (It was pretty straightforward, thanks RM)
- Fixed the instant wake after sleep by patching the _prw methods. (RM)
- The lid works somehow

But I still have some problems using the backlight keys (My laptop uses an ELAN touchpad). I've already used the ACPIDebug kext + detecting the ACPI events to notify the emulated PS2Keyboard of the ELAN as the thread. Maybe I got it somewhere wrong.
Also, I noticed that when you boot with the ac adapter connected, the ac connection detection is broken.
 
Well, I've been trying to get as much functionality as possible on my laptop, but there's some bugs I still need to iron out.
I'll add my two systems later in the signature + profile.

I have a HP 240 G5 - Intel Core i5-6200U, with Intel HD 520,
1TB disk, 4GB ram (please send me 2x8gb sticks of ddr4)
WiFi + BT RTL8723BE (I know it's not supported).

Right now I got working:
- QE/CI using the plist Rehabman prepared for Intel HD 5xx. (Although I'm not entirely sure what made it work).
- Audio with the help of some clover renaming (not sure which one) and AppleALC
- Battery thanks to the ACPI-Battery by RehabMan
- Brightness using the IntelBacklightInjector.kext and some ssdt edits (It was pretty straightforward, thanks RM)
- Fixed the instant wake after sleep by patching the _prw methods. (RM)
- The lid works somehow

But I still have some problems using the backlight keys (My laptop uses an ELAN touchpad). I've already used the ACPIDebug kext + detecting the ACPI events to notify the emulated PS2Keyboard of the ELAN as the thread. Maybe I got it somewhere wrong.
Also, I noticed that when you boot with the ac adapter connected, the ac connection detection is broken.

Read FAQ, "Problem Reporting"
https://www.tonymacx86.com/threads/faq-read-first-laptop-frequent-questions.164990/
 
Ok. I think I got it all:

"Salida guardada de la terminal" is terminal's output, Rehabman zip is Patchmatic extract and Piero's MacBook Pro is the IOReg dump.

Edit: Forgot to add the files.
 

Attachments

  • System Report.zip
    564.9 KB · Views: 59
Ok. I think I got it all:

"Salida guardada de la terminal" is terminal's output, Rehabman zip is Patchmatic extract and Piero's MacBook Pro is the IOReg dump.

Edit: Forgot to add the files.

EFI/Clover is missing.
Read "Problem Reporting" again. Carefully.
 
I thought you didn't need it, since the laptop is booting, but here it is anyways. Thanks for being patient with me.
 

Attachments

  • CLOVER.zip
    2.7 MB · Views: 63
But I still have some problems using the backlight keys (My laptop uses an ELAN touchpad). I've already used the ACPIDebug kext + detecting the ACPI events to notify the emulated PS2Keyboard of the ELAN as the thread. Maybe I got it somewhere wrong.

Check that you have the latest ELAN kext, as it seems you likely patched correctly.
You should verify with ACPIDebug that the expected Notifies are running.
Other than that, you're at the mercy of the ELAN kext developer, since, in violation of the APSL, the source was never released.

Also, I noticed that when you boot with the ac adapter connected, the ac connection detection is broken.

Likely due to ACPI problem... you didn't patch correctly (no "OS Check Fix" patch, for example).
You can also debug your AC adapter _PSR method with ACPIDebug.kext.
 
Check that you have the latest ELAN kext, as it seems you likely patched correctly.
You should verify with ACPIDebug that the expected Notifies are running.
Other than that, you're at the mercy of the ELAN kext developer, since, in violation of the APSL, the source was never released.



Likely due to ACPI problem... you didn't patch correctly (no "OS Check Fix" patch, for example).
You can also debug your AC adapter _PSR method with ACPIDebug.kext.

About the AC Adapter, I couldn't reproduce the bug again. I noticed now that when the laptop finishes booting (ie. just before the apple logo) I'm able to adjust brightness with the keys (it also toggles mute volume) but then the keys are reassigned to mute volume (both of them).
EDIT: After further testing, it seems that both Mute and Brightness up/down respectively are being sent but macOS just listens to the mute volume one. I've attached the log of Karabiner-EventViewer.

In my limited knowledge of the internal workings of the PS2 driver, I think that my brightness keys send both PS2 and ACPI events, and so, the kext thought of my backlight keys as mute volume (perhaps redefining the _Q13 method statically) and then overwrites the changes on the _Q13 method. Is there a way to workaround this buggy behavior?

Also, I would like to ask if you could point me in the direction to fix HDMI audio on the laptop.
 

Attachments

  • key_events.txt
    5.4 KB · Views: 177
About the AC Adapter, I couldn't reproduce the bug again. I noticed now that when the laptop finishes booting (ie. just before the apple logo) I'm able to adjust brightness with the keys (it also toggles mute volume) but then the keys are reassigned to mute volume (both of them).
EDIT: After further testing, it seems that both Mute and Brightness up/down respectively are being sent but macOS just listens to the mute volume one. I've attached the log of Karabiner-EventViewer.

In my limited knowledge of the internal workings of the PS2 driver, I think that my brightness keys send both PS2 and ACPI events, and so, the kext thought of my backlight keys as mute volume (perhaps redefining the _Q13 method statically) and then overwrites the changes on the _Q13 method. Is there a way to workaround this buggy behavior?

You're on your own with the PS2 kext you're using. Like I said, it is not open source. It violates the APSL. Good luck.

Also, I would like to ask if you could point me in the direction to fix HDMI audio on the laptop.

See FAQ.
http://www.tonymacx86.com/el-capita...faq-read-first-laptop-frequent-questions.html
 
Status
Not open for further replies.
Back
Top