Bug 81438

Summary: [945gm] no intel_backlight on macbook 2,1 with kernel 3.15
Product: DRI Reporter: jens stein <jens.s.stein>
Component: DRM/IntelAssignee: Intel GFX Bugs mailing list <intel-gfx-bugs>
Status: CLOSED FIXED QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: normal    
Priority: medium CC: intel-gfx-bugs, yvan
Version: XOrg git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Xorg.0.log
none
dmesg
none
kern.log using 3.15.5 and 3.16.1
none
dmesg (drm.debug=0xe)
none
patch to apply 'quirk_backlight_present' quirk none

Description jens stein 2014-07-16 18:57:26 UTC
Created attachment 102937 [details]
Xorg.0.log

From kernel 3.15, my macbook 2,1 (2007) doesn't have intel_backlight in /sys/class/backlight/ anymore. In 3.14, everything works great.
The issue is similar to this one: https://bugzilla.kernel.org/show_bug.cgi?id=77831. But the kernel which reportedly fixes it for macbook 4,1 does not fix the issue for macbook 2,1.
apple_backlight which is provided by the apple_bl module is still present in /sys/class/backlight/.

lspci -v:
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03) (prog-if 00 [VGA controller])
	Subsystem: Intel Corporation Device 7270
	Flags: bus master, fast devsel, latency 0, IRQ 16
	Memory at d0380000 (32-bit, non-prefetchable) [size=512K]
	I/O ports at 20e0 [size=8]
	Memory at c0000000 (32-bit, prefetchable) [size=256M]
	Memory at d0400000 (32-bit, non-prefetchable) [size=256K]
	Expansion ROM at <unassigned> [disabled]
	Capabilities: [90] MSI: Enable- Count=1/1 Maskable- 64bit-
	Capabilities: [d0] Power Management version 2
	Kernel driver in use: i915
	Kernel modules: i915

00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)
	Subsystem: Intel Corporation Device 7270
	Flags: bus master, fast devsel, latency 0
	Memory at d0300000 (32-bit, non-prefetchable) [size=512K]
	Capabilities: [d0] Power Management version 2

Linux distribution: Fedora 20
Architechture: i686
Kernel: 3.15.5-200.fc20.i686+PAE
xf86-video-intel version: xorg-x11-drv-intel.i686 2.21.15-7.fc20 (am I correct that this is Fedora's rename of xf86-video-intel)
libdrm version: 2.4.54-1.fc20
Comment 1 jens stein 2014-07-16 18:58:19 UTC
Created attachment 102938 [details]
dmesg
Comment 2 Jani Nikula 2014-09-08 16:01:33 UTC
Please try reverting:
commit c675949ec58ca50d5a3ae3c757892f1560f6e896
Author: Jani Nikula <jani.nikula@intel.com>
Date:   Wed Apr 9 11:31:37 2014 +0300

    drm/i915: do not setup backlight if not available according to VBT

and see if it helps.

Please attach /sys/kernel/debug/dri/0/i915_opregion

Please attach dmesg with drm.debug=0xe module parameter.

Side note, the attached dmesg has a gpu hang in it. You could file a separate bug on that.
Comment 3 Yvan Masson 2014-09-14 16:57:09 UTC
Hi,

I don't know if it can help, but running the same laptop (MacBook 2,1), I'm having the same issue with kernel 3.16-1-686-pae (Debian version 3.16.2-3).

Can it be the cause of my problems ? :
  - "xbacklight -dec 10" returns "No outputs have backlight property"
  - backlight does not power on after a resume

I also have the "GPU HANG" in my kernel.log : I just filled a bug report at https://bugs.freedesktop.org/show_bug.cgi?id=83851

Thanks,
YvanM
Comment 4 Yvan Masson 2014-09-18 12:29:27 UTC
Hi,

After reverting the commit c675949ec58ca50d5a3ae3c757892f1560f6e896 on kernel 3.15.5 from kernel.org, boot fails on kernel panic with this message (I don't know how to catch the kernel panic log, so I juste write the lines I think interesting here) :

Code: .......
EIP: [<f878d93b>] __intel_set_cpu_fifo_underrun_reporting+0x2b/0x2d0 [i915] SS:ESP 0068:f5407ef0
CR2: 000000000000088c
---[ end trace ... ]---
Kernel panic - not syncing: Fatal exception in interrupt
Kernel Offset: 0x0 from 0xc1000000 (relocation range: 0xc0000000-0xf81fdfff)
...

However, it also happens rarely an other kernel panic, but with no "intelligible" message.

It makes me think of a similar message I have at boot with kernels 3.15.5 from kernel.org and 3.16.1 from Debian :
[drm:i915_irq_handler] *ERROR* pipe A underrun
[drm:i915_irq_handler] *ERROR* pipe A underrun
[drm] GPU HANG: ecode -1:0x00000000, reason: Command parse error, iir 0x00008000, action: continue

I attach my kern.log : it includes boots with kernels 3.15.5 and 3.16.1
Comment 5 Yvan Masson 2014-09-18 12:30:28 UTC
Created attachment 106500 [details]
kern.log using 3.15.5 and 3.16.1
Comment 6 jens stein 2014-10-26 21:25:03 UTC
reverting c675949ec58 on a checkout of the v3.15 tag of the kernel.org source from git fixes the issue. intel_backlight is back in /sys/class/backlight and xbacklight works again.
/sys/kernel/debug/dri/0/i915_opregion is empty. i don't know if that is expected or if i'm supposed to do something to have something logged there. debugfs is mounted on /sys/kernel/debug.
i'm attaching a dmesg with the drm.debug=0xe parameter.
Comment 7 jens stein 2014-10-26 21:26:10 UTC
Created attachment 108477 [details]
dmesg (drm.debug=0xe)
Comment 8 Jani Nikula 2014-10-27 12:17:57 UTC
Presumed fixed in v3.16 by
commit 56c4b63aaf4c2cd91966b2a5e69e5367bea60bbe
Author: Jani Nikula <jani.nikula@intel.com>
Date:   Tue Jun 17 15:47:05 2014 +0300

    drm/i915: default to having backlight if VBT not available

Please try v3.16, as v3.15 is no longer supported, and the fix won't be backported.
Comment 9 jens stein 2014-10-27 19:47:22 UTC
i was actually already aware of that commit. unfortunately it doesn't seem to work on the 2,1 macbook. it also seems to have been backported to 3.15 in the fedora kernel: https://bugzilla.redhat.com/show_bug.cgi?id=1118969
i haven't tested 3.16 specifically but 3.17 still has the problem.
i looked around and some other devices with the same problem seem to have quirks applied. i'm attaching a patch which applies the 'quirk_backlight_present' for the 2,1 macbook. i hope this is the proper way to do it.
Comment 10 jens stein 2014-10-27 19:48:29 UTC
Created attachment 108528 [details]
patch to apply 'quirk_backlight_present' quirk
Comment 11 Jani Nikula 2014-10-28 08:48:25 UTC
(In reply to jens stein from comment #10)
> Created attachment 108528 [details]
> patch to apply 'quirk_backlight_present' quirk

Please send this to intel-gfx mailing list with proper Signed-off-by. Thanks.
Comment 12 Jani Nikula 2014-10-29 08:36:49 UTC
Fix pushed to drm-intel-fixes as
commit b2a9601c587dbc5536546aa54009d1130adedd72
Author: jens stein <jens.s.stein@gmail.com>
Date:   Tue Oct 28 20:25:53 2014 +0100

    drm/i915: Ignore VBT backlight check on Macbook 2, 1

Thanks for the report, and the fix! :)

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.