Bug 100041
Summary: | MacbookPro12,1 (early 2015): intel i915 iris 6100 with eDP : acpi_video backlight exists and is broken | ||
---|---|---|---|
Product: | Drivers | Reporter: | Tormen (tormen) |
Component: | Video(DRI - Intel) | Assignee: | intel-gfx-bugs (intel-gfx-bugs) |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | aaron.lu, intel-gfx-bugs, jwrdegoede, tormen |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 4.0.4 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: |
drivers/acpi/video.c
Working patch (kernel 4.0.4) for the described problem. |
Description
Tormen
2015-06-17 13:23:18 UTC
CC Aaron, Hans This should be fixed by this commit which is queued up for merging into 4.2 : https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/?h=linux-next&id=7f5c1882add891f7420a327e908f206fafed3670 Super. Thanks for the quick feedback ! I'll try the patch and report back ! Tormen Hi. Compiling the kernel, it complained about missing function "video_enable_native_backlight". As all the other exceptions used "video_disable_native_backlight", I gave this a shot. But this does not fix the problem: Using the new kernel while removing the kernel cmdline parameter "acpi_backlight=vendor", brings back: /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight/brightness /sys/devices/pci0000:00/0000:00:02.0/backlight/acpi_video0/brightness Was this function maybe added in a more recent kernel version than 4.0.4 ? Not sure if important, but dmidecode shows 2 "Product Names": Handle 0x0006, DMI type 1, 27 bytes System Information Manufacturer: Apple Inc. Product Name: MacBookPro12,1 Version: 1.0 Serial Number: C02PP2V8FVH8 UUID: 25EF0280-EC82-42B0-8FB6-10ADCCC67C02 Wake-up Type: Power Switch SKU Number: Family: MacBook Pro Handle 0x0007, DMI type 2, 17 bytes Base Board Information Manufacturer: Apple Inc. Product Name: Mac-E43C1C25D4880AD6 Version: MacBookPro12,1 Serial Number: C0251830058GDVN1K Asset Tag: Features: Board is a hosting board Location In Chassis: Chassis Handle: 0x0008 Type: Motherboard Contained Object Handles: 0 Hi, If you want to build a kernel with the patch fixing this you will also need this patch as per-requisite: https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/drivers/acpi/video.c?h=linux-next&id=64491882d399011bb0a4603e8cf481b65f0d3c5d Regards, Hans Hi and thanks a lot again for the quick reply. Unfortunately I think there is a 3rd patch missing: drivers/acpi/video.c: In function ‘video_enable_native_backlight’: drivers/acpi/video.c:423:31: error: ‘NATIVE_BACKLIGHT_ON’ undeclared (first use in this function) use_native_backlight_dmi = NATIVE_BACKLIGHT_ON; ^ drivers/acpi/video.c:423:31: note: each undeclared identifier is reported only once for each function it appears in scripts/Makefile.build:281: recipe for target 'drivers/acpi/video.o' failed Tormen Hi, (In reply to Tormen from comment #6) > Hi and thanks a lot again for the quick reply. > > Unfortunately I think there is a 3rd patch missing: > > drivers/acpi/video.c: In function ‘video_enable_native_backlight’: > drivers/acpi/video.c:423:31: error: ‘NATIVE_BACKLIGHT_ON’ undeclared (first > use in this function) > use_native_backlight_dmi = NATIVE_BACKLIGHT_ON; Ah yes, just change the NATIVE_BACKLIGHT_ON to 1 that should do the trick. Regards. Hans Hi, Thanks again for your ultra-fast reply ! :)) Tried it... but it does not work. I'll attach my video.c file. Do you need maybe: kernel config ? dmesg ? lspci -vvvnk ? cat /proc/cmdline \boot\vmlinuz-4.0.4-desktop-banana05 ro root=UUID=7446ae27-f2a4-41a0-b8d3-fdce0e298a30 hid_apple.iso_layout=0 quiet splash=silent initrd=boot\initrd-4.0.4-desktop-banana05 find /sys -name brightness /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight/brightness /sys/devices/pci0000:00/0000:00:02.0/backlight/acpi_video0/brightness /sys/devices/platform/applesmc.768/leds/smc::kbd_backlight/brightness I am not sure about the different kernel parameters: For me I could fix the problem using "acpi_backlight=vendor". But the patch I think is based on: video.use_native_backlight ? I guess I could try forcing this parameter to a certain value first ? I think I read that there are the possible values: 0, 1 and -1 ? Tormen Created attachment 180301 [details]
drivers/acpi/video.c
Hi, (In reply to Tormen from comment #8) > Hi, > > Thanks again for your ultra-fast reply ! :)) > > Tried it... but it does not work. Ah right, my bad you really need that third patch, this one to be specific: https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/drivers/acpi/video.c?h=linux-next&id=ff92cfe7cbc05c6c62f5b06c7d9090f4c853cd51 And you need to apply them in reverse order as I gave them to you, so in this order: https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/drivers/acpi/video.c?h=linux-next&id=ff92cfe7cbc05c6c62f5b06c7d9090f4c853cd51 https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/drivers/acpi/video.c?h=linux-next&id=64491882d399011bb0a4603e8cf481b65f0d3c5d https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git/commit/drivers/acpi/video.c?h=linux-next&id=7f5c1882add891f7420a327e908f206fafed3670 Regards, Hans Hi, Success :) Any idea when this will be accepted upstream ? (kernel version ?) find /sys -name brightness /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight/brightness /sys/devices/platform/applesmc.768/leds/smc::kbd_backlight/brightness cat /proc/cmdline \boot\vmlinuz-4.0.4-desktop-banana05 ro root=UUID=7446ae27-f2a4-41a0-b8d3-fdce0e298a30 hid_apple.iso_layout=0 quiet splash=silent initrd=boot\initrd-4.0.4-desktop-banana05 So with all 3 patches it works. To make life easier for people having the same problem I'll upload my patch (integrating the 3) that applies to a 4.0.4 kernel. Thanks a lot, Tormen Created attachment 180311 [details]
Working patch (kernel 4.0.4) for the described problem.
This patch integrates the 3 patches that Hans had pointed to.
(In reply to Tormen from comment #11) > Hi, > > Success :) Good. > Any idea when this will be accepted upstream ? (kernel version ?) The patches are queued up in linux-pm for merging into 4.2 Regards, Hans |