Bug 68355

Summary: [HSW ULT] eDP backlight regression at 1920x1080
Product: DRI Reporter: Trevor Bortins <enabfluw>
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: rjw
Version: XOrg git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
dmesg for failing rc2 kernel with drm.debug=6
none
xorg log for failing rc2 kernel none

Description Trevor Bortins 2013-08-20 20:59:24 UTC
Created attachment 84358 [details]
dmesg for failing rc2 kernel with drm.debug=6

System environment:
-- chipset: HSW ULT
-- system architecture: 64-bit
-- xf86-video-intel:
-- xserver:
-- mesa:
-- libdrm:
-- kernel: 3.11.0-031100rc2-generic
-- Linux distribution: Linux Mint 15 Olivia
-- Machine or mobo model: Acer Aspire S3-392-9460
-- Display connector: eDP1

Reproducing steps:
1. Install 3.11.0-rc1, reboot, watch it work
2. Install 3.11.0-rc2, reboot, watch it fail
3. Install 3.11.0-996.201308070456, reboot, watch it work
4. Install 3.11.0-996.201308080456 (notice the date is just the next day), reboot, watch it fail
5. Install any kernel after rc1 or the 996.20130807, reboot, watch it fail.

Additional info:
GRUB_CMDLINE_LINUX="drm.debug=6 acpi_backlight=vendor"

I can get native 1920x1080 resolution to work on a "failing" kernel by doing the following:
1. Boot any "failing" kernel
2. Watch everything go black
3. Blindly log into X and open a terminal
4. xrandr -s 800x600 (or some other lower resolution than 1920x1080)
5. Watch the screen flash for a millisecond and then remain black
6. Ctrl+Alt+F7 to a tty, see it switch to 1920x1080
7. Ctrl+Alt+F8 to get back to X, see it switch to the xrandr'd resolution
8. xrandr -s 1920x1080 and watch it work correctly!

More logs to come...
Comment 1 Trevor Bortins 2013-08-20 21:00:07 UTC
Created attachment 84359 [details]
xorg log for failing rc2 kernel
Comment 2 Jani Nikula 2013-08-21 05:34:23 UTC
(In reply to comment #0)
> 1. Install 3.11.0-rc1, reboot, watch it work
> 2. Install 3.11.0-rc2, reboot, watch it fail

Presumed broken by the ACPI pull ea45ea70b6131fa0b006f5b687b9b1398b24f681, which caused regressions. The problematic changes were reverted in v3.11-rc3 by 

commit 8e5c2b776ae4c35f54547c017e0a943429f5748a
Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Date:   Thu Jul 25 21:43:39 2013 +0200

    Revert "ACPI / video / i915: No ACPI backlight if firmware expects Windows 8

The related bug is: https://bugzilla.kernel.org/show_bug.cgi?id=51231

> 3. Install 3.11.0-996.201308070456, reboot, watch it work
> 4. Install 3.11.0-996.201308080456 (notice the date is just the next day),
> reboot, watch it fail
> 5. Install any kernel after rc1 or the 996.20130807, reboot, watch it fail.

I don't know what these are. linux-next? Please try upstream v3.11-rc6 first.

Two things to try, separately, running v3.11-rc6:

1) What if you drop acpi_backlight=vendor from the kernel parameters?

2) What if you add acpi_osi="!Windows 2012" to the kernel parameters?
Comment 3 Trevor Bortins 2013-08-21 06:12:18 UTC
All of the kernels I used are from the ubuntu kernel ppa.  Here's some links to the ones I mentioned:

* http://kernel.ubuntu.com/~kernel-ppa/mainline/drm-next/2013-08-07-saucy/
* http://kernel.ubuntu.com/~kernel-ppa/mainline/drm-next/2013-08-08-saucy/
* http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.11-rc1-saucy/
* http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.11-rc2-saucy/

They have the relevant commit info in those directories as well.

I've tried rc3, rc4, and rc5, as well as today's "daily", and they all exhibit the rc2 issue.  I'll try rc6, and the other boot options right now and get back to you shortly.
Comment 4 Trevor Bortins 2013-08-21 06:27:20 UTC
On rc6 without acpi_backlight=vendor, the backlight won't come on at all at 1920x1080, but it will at lesser resolutions.  It won't even respond to my switching resolutions "trick".

The acpi_osi="!Windows 2012" command gave me back my keyboard brightness controls, which is nice, so thanks for that one.  :)  But it didn't magically make the backlight work at 1920x1080.
Comment 5 Daniel Vetter 2013-08-21 08:58:04 UTC
(In reply to comment #4)
> On rc6 without acpi_backlight=vendor, the backlight won't come on at all at
> 1920x1080, but it will at lesser resolutions.  It won't even respond to my
> switching resolutions "trick".

Sounds like we're dealing with a tricky timing issue. The bisect result would help a lot I hope. Can you please try to bisect where exactly the regression has been introduced between -rc1 and -rc2?

See https://wiki.ubuntu.com/Kernel/KernelBisection section "How do I bisect the upstream kernel?" for a howto.
Comment 6 Trevor Bortins 2013-08-21 21:04:58 UTC
Oh, and FYI, the 996 kernels are from drm-next, and is from Dave Airlie's repo, as described here: https://wiki.edubuntu.org/Kernel/MainlineBuilds

...working on the git bisect.
Comment 7 Trevor Bortins 2013-08-22 21:27:26 UTC
Here's the results of the bisect:

c04c697cf1fe8f0962ccd3c2392a9b637a5307aa is the first bad commit
commit c04c697cf1fe8f0962ccd3c2392a9b637a5307aa
Author: Matthew Garrett <matthew.garrett@nebula.com>
Date:   Tue Jul 16 17:08:16 2013 +0000

    ACPI / video: Always call acpi_video_init_brightness() on init
    
    We have to call acpi_video_init_brightness() even if we're not going
    to initialise the backlight - Thinkpads seem to use this as the
    trigger for enabling ACPI notifications rather than handling it in
    firmware.
    
    [rjw: Drop the brightness object created by
     acpi_video_init_brightness() if we are not going to use it.]
    Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

:040000 040000 cd4ce0b293e303c610af578ffd39c1b63decac3a c16757184ad041a368b13952e00e05998f3298fc M	drivers
Comment 8 Rafael J. Wysocki 2013-08-22 21:39:05 UTC
On Thursday, August 22, 2013 09:27:26 PM bugzilla-daemon@freedesktop.org wrote:
> https://bugs.freedesktop.org/show_bug.cgi?id=68355
> 
> --- Comment #7 from Trevor Bortins <enabfluw@gmail.com> ---
> Here's the results of the bisect:
> 
> c04c697cf1fe8f0962ccd3c2392a9b637a5307aa is the first bad commit
> commit c04c697cf1fe8f0962ccd3c2392a9b637a5307aa
> Author: Matthew Garrett <matthew.garrett@nebula.com>
> Date:   Tue Jul 16 17:08:16 2013 +0000
> 
>     ACPI / video: Always call acpi_video_init_brightness() on init
> 
>     We have to call acpi_video_init_brightness() even if we're not going
>     to initialise the backlight - Thinkpads seem to use this as the
>     trigger for enabling ACPI notifications rather than handling it in
>     firmware.
> 
>     [rjw: Drop the brightness object created by
>      acpi_video_init_brightness() if we are not going to use it.]
>     Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
>     Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> :040000 040000 cd4ce0b293e303c610af578ffd39c1b63decac3a
> c16757184ad041a368b13952e00e05998f3298fc M    drivers

If reverting that commit helps, I think we can revert it for 3.11 easily.
Comment 9 Trevor Bortins 2013-08-22 23:00:17 UTC
I compiled the latest from the master branch, with the offending commit reverted, and it appears to work.

Any ideas why?  Since I'm not part of the project, I don't know what that code does.
Comment 10 Rafael J. Wysocki 2013-08-22 23:06:19 UTC
On Thursday, August 22, 2013 11:00:17 PM bugzilla-daemon@freedesktop.org wrote:
> https://bugs.freedesktop.org/show_bug.cgi?id=68355
> 
> --- Comment #9 from Trevor Bortins <enabfluw@gmail.com> ---
> I compiled the latest from the master branch, with the offending commit
> reverted, and it appears to work.
> 
> Any ideas why?  Since I'm not part of the project, I don't know what that code
> does.

It causes some code that was previously skipped with the acpi_backlight=vendor
command line option to be executed on your machine.  That code, in turn,
executes AML methods that modify the platform backlight settings.
Comment 11 Trevor Bortins 2013-08-22 23:11:40 UTC
I should add that it only works with the acpi_backlight=vendor option.  Taking that out results in no display at 1920x1080, but it still works at other resolutions.
Comment 12 Trevor Bortins 2013-08-24 21:47:14 UTC
What are the next steps to take on this?
Comment 13 Rafael J. Wysocki 2013-08-25 13:13:24 UTC
On Saturday, August 24, 2013 09:47:14 PM bugzilla-daemon@freedesktop.org wrote:
> https://bugs.freedesktop.org/show_bug.cgi?id=68355
> 
> --- Comment #12 from Trevor Bortins <enabfluw@gmail.com> ---
> What are the next steps to take on this?

The commit in question has been reverted from the mainline kernel, so the
problem should be gone in 3.11-rc7.
Comment 14 Daniel Vetter 2013-08-25 13:29:41 UTC
(In reply to comment #13)
> On Saturday, August 24, 2013 09:47:14 PM bugzilla-daemon@freedesktop.org
> wrote:
> > https://bugs.freedesktop.org/show_bug.cgi?id=68355
> > 
> > --- Comment #12 from Trevor Bortins <enabfluw@gmail.com> ---
> > What are the next steps to take on this?
> 
> The commit in question has been reverted from the mainline kernel, so the
> problem should be gone in 3.11-rc7.

Thanks for taking care of this Rafael.
Comment 15 Trevor Bortins 2013-08-25 17:32:38 UTC
(In reply to comment #14)
> (In reply to comment #13)
> > On Saturday, August 24, 2013 09:47:14 PM bugzilla-daemon@freedesktop.org
> > wrote:
> > > https://bugs.freedesktop.org/show_bug.cgi?id=68355
> > > 
> > > --- Comment #12 from Trevor Bortins <enabfluw@gmail.com> ---
> > > What are the next steps to take on this?
> > 
> > The commit in question has been reverted from the mainline kernel, so the
> > problem should be gone in 3.11-rc7.
> 
> Thanks for taking care of this Rafael.

Wonderful, thank you!

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.