Re: Backlight and Brightness function

43 views
Skip to first unread message
Message has been deleted
Message has been deleted
Message has been deleted

Fortiz

unread,
Oct 8, 2016, 12:05:25 PM10/8/16
to Linux on Macbooks
Hi, it seems like the patch not match with the version of apple-gmux.c... 
1) What kernel version you are trying to patch?
2) The best place to get some kernel file is kernel.org, but you can use the src package of you distro (e.g in Debian like you can use deb-src repos)

El sábado, 8 de octubre de 2016, 10:48:31 (UTC-3), 888mrcho...@gmail.com escribió:
Hello fellow macbook / linux afficionados/ettes!!

Tim - firstly, thank you so much for combining these resources.

I am running debian and trying to get the brightness controls working, and would very much appreciate some help.

Regarding apple_gmux.c
https://github.com/ah-/gmux/blob/master/apple_gmux.c
is this the best place to get this file, or can someone direct me to the place to get it?!


Display Backlight Workaround Bug 105051 Radeon or apple_gmux driver sets incorrect max_brightness value breaking GNOME backlight control. Workaround: Reverting this commit fixes the issue.

this part from Tims page
https://teamsammut.com/blog/2015/09/apple-macbook-pro-linux-issue-tracking.html
I would like some help with how to revert the commit please.

I have tried following the instructions in comment 34 from the bug 105051 but didn't get very far

Felipe Ortiz 2016-06-08 20:23:31 UTC
(In reply to Gabriel from comment #33)
> Can anyone please provide a link on how to patch the apple-gmux.c driver or
> tell me how it can be done.
> Using 4.4 kernel. Would be very nice

Ok, this is (I believe) the easiest way:

1.- Get the apple_gmux.c from kernel source
2.- Put it in a directory and use the patch (patch apple-gmux.c < file.patch)
3.- Create a Makefile with this:

obj-m += apple-gmux.o

all:
    make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

clean:
    make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean

4.- make
5.- Test it: (as root)
    Remove the old module rmmod apple-gmux
    Insert your patched module: insmod ./apple-gmux.ko
6.- If works copy your module to /lib/modules/(KERNEL_VERSION)/kernel/drivers/platform/x86/

Note: When you load your module the brightness controls should appear, but sometimes not working, in this case copy your module to /lib/modules... and reboot ;)


Can someone please tell me how to patch the apple-gmux.c file and them compile this file!??

Thanks,
Frank
Message has been deleted
Message has been deleted
Message has been deleted

Alex Wilkerson

unread,
Oct 29, 2016, 11:07:13 PM10/29/16
to Linux on Macbooks
I'm still having this issue on 4.8.4.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages