Fedora 24 on MacBook Pro 11,4 and 11,5 – suspend and brightness fix

I have a great news for those of you with a MacBook Pro 15″ 2015 (MacBook 11,4 and 11,5)!

As you might have noticed, when running Linux on this machine, it can’t be suspended, shut down, and you can’t even control brightness of the display. These issues have been reported a while ago, and yes, there are some patches, but they didn’t make it to the production code.

Suspend and shutdown: https://bugzilla.kernel.org/show_bug.cgi?id=103211#c172
Brightness: https://bugzilla.kernel.org/show_bug.cgi?id=105051#c32

So I took those patches, applied them to the kernel in Fedora and built it in my Copr project.

How to make it running on your machine? First, download and install Fedora 24. Then you just need to enable my Copr project and install the patched kernel:

$ sudo dnf copr enable asamalik/MacBook-kernel
$ sudo dnf install kernel-4.6.6-300.AdamsMacBookSleepBrightness.fc24

Reboot your machine with the patched kernel, and that’s it!

I will try to keep the repo updated, so you will be able to update kernel as usual.

21 thoughts on “Fedora 24 on MacBook Pro 11,4 and 11,5 – suspend and brightness fix

    1. Adam Šamalík Post author

      Probably similar way like Fedora. I do not have experience with ubuntu packaging. But you should be able to use the same patches with ubuntu kernel package and rebuild it.

      Reply
  1. Hervé Rilos

    Thanks for the patch. It works very well. Hope they’ll package it soon into the main repository.

    Reply
    1. Adam Šamalík Post author

      I think it breaks something on a hardware that is not in the MacBook – more details in the kernel bug report. So it might not make it into the main repo.

      Reply
      1. Jarl André

        I might actually have taken the kernel version from memory so it might be 4.7.2 is the current kernel… 😉 but anyway. I think … That shutdown is not working. Works sometimes but mostly not. Suspend always works. Good job anyway because why should you restart or stop. And if you need just hold down power to shutdown. Also with never Linux versions they should be able to hot patch kernel.

        Reply
        1. Adam Šamalík Post author

          Yes, I have noticed that the shutdown doesn’t work always… But at least we have suspend and brightness control working! And it’s not my work, I just applied patches found in kernel bugzilla :-)

          Reply
      2. Jon Walton

        How do I install the 4.7.2 build?

        If I try sudo dnf install 4.7.2-201.AdamsMacBookSleepBrightness.fc24 I get an error saying the package is not available.

        Reply
        1. Adam Šamalík Post author

          In this example you are writing here you missed “kernel”. The following command should work.

          $ sudo dnf install kernel-4.7.2-201.AdamsMacBookSleepBrightness.fc24

          Reply
  2. Jarl André

    Oh, and a ncie tip is to disable kernel updates in /etc/dnf/dnf.conf with adding exclude=kernel* to avoid sudden and unexpected updates of the kernel.

    Reply
  3. Steve

    I’m having trouble with the copr repo. I suspect I’m doing something stupid:


    $ sudo dnf install kernel-4.6.6-300.AdamsMacBookSleepBrightness.fc24
    Last metadata expiration check: 0:20:58 ago on Wed Sep 7 08:50:31 2016.
    Error: Unable to find a match.

    $ sudo dnf list asamalik/MacBook-kernel
    Last metadata expiration check: 0:21:16 ago on Wed Sep 7 08:50:31 2016.
    Error: No matching Packages to list

    $ uname -r
    4.7.2-201.fc24.x86_64

    Any ideas?

    Reply
      1. Steven Webb

        Yes. No luck.


        $ sudo dnf copr enable asamalik/MacBook-kernel
        ...
        Repository successfully enabled.
        $ sudo dnf install kernel-4.6.6-300.AdamsMacBookSleepBrightness.fc24
        Last metadata expiration check: 2:24:08 ago on Tue Oct 4 06:34:45 2016.
        No package kernel-4.6.6-300.AdamsMacBookSleepBrightness.fc24 available.
        Error: Unable to find a match.

        Reply
        1. Steven Webb

          Finally got it working using the updated package name. Not sure why I had so much trouble the first time.

          Thanks Adam.

          Reply
  4. Rocky

    I was trying to compile the https://github.com/patjak/bcwc_pcie kernel module so that I could use the webcam, but I ran into the following error. I’m not sure where to turn for help:


    bcwc_pcie$ make
    make -C /lib/modules/4.7.2-201.AdamsMacBookSleepBrightness.fc24.x86_64/build M=/XXX/bcwc_pcie modules
    make[1]: *** /lib/modules/4.7.2-201.AdamsMacBookSleepBrightness.fc24.x86_64/build: No such file or directory. Stop.
    Makefile:12: recipe for target 'all' failed
    make: *** [all] Error 2

    Thanks for this kernel though, it does fix my power/suspend and brightness problems!

    Reply
  5. Dennis

    Would you share your build process with me maybe? I’m trying to apply the apple-gmux patch myself, but I can’t seem to find the apple-gmux.c file.

    It’s not in kernel-devel it seems.. Any pointers on where to get the source from would be very welcome! Thank you for your work btw :)

    Reply
  6. Roy

    Adam,
    Great work! I am hesitant to put linux back on my Mac as I don’t have the time ringt this moment to troubleshoot more issues. The big issue for me is the Force Touch trackpad. Have you seen a solution where right-click works like in OSX?

    Thanks

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>