-
Notifications
You must be signed in to change notification settings - Fork 3
Controlling Display and Keyboard Brightness Does not function on 2016 Macbook Pro, TouchBar #1
Comments
I would certainly be open to forking and making a PR to add support. However, I do not entirely understand how to interface with IOKit to interact with the brightness levels, or where to look to find those IO Registry locations on the 2016 MBP. Thanks! |
Hi, Sorry I've been busy for the past few days. I originally found the information on this website: http://osxbook.com/book/bonus/chapter10/light/. Do you still have access to a pre-TouchBar MB ? Otherwise I'll take a look on my MB but I don't have much time until next week. |
Thanks for taking the time to look at this! I understand that you may be busy. Yeah, it appears to be |
Can you try by replacing /**
Open a connection to the LMU controller.
*/
fileprivate func initLMUService() -> Bool {
// let serviceObject = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("AppleLMUController"))
let serviceObject = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("AppleHIDKeyboardEventDriverV2"))
... |
I made that change, and it still failed. However, I got a different error from that function |
I will be able to try out doing some more troubleshooting when I get home from work today. |
With the new suggested changes, the value of the |
Unfortunately I cannot test on a TouchBar MBP but if it works on Linux (see "Keyboard Backlight" section of https://wiki.archlinux.org/index.php/Mac) I can have a look at how it's done in the kernel :) |
According to https://github.com/Dunedan/mbp-2016-linux keyboard backlight control is not yet available on Linux. Maybe by doing diff of all SMC keys using https://github.com/theopolis/smc-fuzzer when changing keyboard backlight we could identify the relevant key. |
Hello,
I am using your LightKit code in a project of mine, and I recently purchased a new 13" 2016 MacBook Pro, and I found that controlling the display and keyboard brightness does not work. I am receiving
nil
when I am initializing LightKit. This code works great on a 2015 MacBook Pro.Here are some snippets showing how I am using your library:
Bringing Keyboard Brightness all the way down and back up:
Bringing Display Brightness all the way down and back up:
Both of my functions being are printing
"Light Sensors and Hooks not Present"
when they are run on my 2016 MacBook Pro with the TouchBar. When they run on my 2015 MacBook Pro, the keyboard and display brightness go down and up as expected. Both systems are running macOS 10.12.4 Beta 4.I understand that you may not have a 2016 MacBook Pro with Touch Bar, so I would be glad to provide any information that you may need. I can get access to the 2016 MBP and take screenshots in IORegistryExplorer if that will help.
Thanks,
Mack
The text was updated successfully, but these errors were encountered: