Bug 56661 - Framebuffer on boot causes brightness to go to minimum on HP laptop
Summary: Framebuffer on boot causes brightness to go to minimum on HP laptop
Status: CLOSED CODE_FIX
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Video (show other bugs)
Hardware: All Linux
: P1 low
Assignee: Lan Tianyu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-15 19:35 UTC by Dan Dart
Modified: 2013-11-13 02:10 UTC (History)
5 users (show)

See Also:
Kernel Version: any
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg (104.98 KB, text/plain)
2013-04-17 07:32 UTC, Jani Nikula
Details
A patch to enable the backlight on startup on HP Pavilion g6 laptops (594 bytes, patch)
2013-05-24 03:52 UTC, Ash Willis
Details | Diff

Description Dan Dart 2013-04-15 19:35:45 UTC
Hi, FYI:

On my Pavilion G6 going into framebuffer causes the screen to dim to lowest brightness setting.
I can manually increase it after this time using the buttons if I install the modules (which all distros bundle).

Caused when going into framebuffer for the first time on boot.
Resolves itself sometimes when going into X.

product: HP Pavilion g6 Notebook PC (A9W47EA#ABU)
Display section of lshw:
       *-display
             description: VGA compatible controller
             product: 2nd Generation Core Processor Family Integrated Graphics Controller
             vendor: Intel Corporation
             physical id: 2
             bus info: pci@0000:00:02.0
             version: 09
             width: 64 bits
             clock: 33MHz
             capabilities: msi pm vga_controller bus_master cap_list rom
             configuration: driver=i915 latency=0
             resources: irq:42 memory:c0000000-c03fffff memory:b0000000-bfffffff ioport:4000(size=64)

Not a regression afaik as I've always noticed it.
Low priority as easily worked around (just confusing why it happens).
Happens on any kernel (ubuntu, debian, homebuilt up to 3.6 - not tested on 3.7+).

Cheers
Comment 1 Jani Nikula 2013-04-16 05:49:36 UTC
(In reply to comment #0)
> Caused when going into framebuffer for the first time on boot.

Would that be when the i915 driver is loaded?

Please provide dmesg all the way from boot with drm.debug=0xe module parameter.
Comment 2 Dan Dart 2013-04-16 19:30:33 UTC
dmesg content:
https://gist.github.com/dandart/5398812

The actual resetting appears to be on line 711 with:
[    9.867926] [drm:intel_panel_actually_set_backlight], set backlight PWM = 0

after two tries to get the i2c dp_aux_ch status (707-710):

[    9.865314] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003f
[    9.865321] [drm:intel_dp_i2c_aux_ch], aux_ch failed -110
[    9.867860] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5143003f
[    9.867866] [drm:intel_dp_i2c_aux_ch], aux_ch failed -110

Is this sufficient to take a stab at the cause?
Cheers
Dan
Comment 3 Jani Nikula 2013-04-17 07:32:02 UTC
Created attachment 98941 [details]
dmesg

dmesg from comment #2
Comment 4 Jani Nikula 2013-04-17 07:36:19 UTC
(In reply to comment #3)
> dmesg from comment #2

Hmm, only realized now that this is running 3.2 kernel. Please attach dmesg running a more recent kernel.
Comment 5 Jani Nikula 2013-04-30 06:24:00 UTC
Dan, please attach dmesg running a more recent kernel.
Comment 6 Dan Dart 2013-05-01 21:20:42 UTC
Here we are with a 3.9 kernel from git (close to defconfig tbh so might be a little off):
https://gist.github.com/dandart/5498460
Comment 7 Ash Willis 2013-05-24 03:52:57 UTC
Created attachment 102371 [details]
A patch to enable the backlight on startup on HP Pavilion g6 laptops

Hi Dan, I've got a g6 and it's exhibiting the same behaviour. I'm assuming when you say the backlight is on its minimum setting, you mean it's completely turned off? That's the behaviour I'm seeing anyway.

You're right. It seems that there is something up with the HP bios. It does not correctly report its previous brightness setting so the driver makes the mistake of 'resuming' it to 0 on initialisation. Please find the attached patch which will disable the bios check and instead set it to maximum brightness.

A more elegant fix would be to determine how to get some sense out of the bios but at least this patch should enable the displays of g6 users.

Cheers,

Ash
Comment 8 Daniel Vetter 2013-05-24 19:58:04 UTC
Since we can quirk this in the acpi driver, it must be an acpi bug ;-)
Comment 9 Dan Dart 2013-05-26 17:16:49 UTC
Thanks, the patch works on 3.10-rc1 from git.
Comment 10 Lan Tianyu 2013-05-28 02:47:08 UTC
Hi Ash:
       Your patch in the comment7 fixs this bug and so please send it to acpi maillist.
Comment 11 Ash Willis 2013-05-29 01:33:50 UTC
Thanks for testing, Dan. Lan, I've forwarded this patch to the acpi list as requested :)
Comment 12 Lan Tianyu 2013-05-29 02:51:32 UTC
Patch has sent to ACPI maillist.
https://patchwork.kernel.org/patch/2627471/.
Comment 13 Aaron Lu 2013-06-17 03:04:07 UTC
commit 780a6ec640a3fed671fc2c40e4dd30c03eca3ac3
Author: Ash Willis <ashwillis.kernel@gmail.com>
Date:   Wed May 29 01:27:59 2013 +0000

    ACPI / video: ignore BIOS initial backlight value for HP Pavilion g6

Commit upstream.
Comment 14 Aaron Lu 2013-11-13 01:15:04 UTC
acpidump please, I would like to see if it is the same firmware problem I've recently saw a lot and the following patch should quirk them all:
http://www.spinics.net/lists/linux-acpi/msg47212.html
Comment 15 Aaron Lu 2013-11-13 01:29:31 UTC
And the patch to fix all these problems is:

commit 2c62333a408f5badd2d2ffd7177f95deeccc5ca4
Author: Aaron Lu <aaron.lu@intel.com>
Date:   Wed Nov 6 09:07:10 2013 +0800

    ACPI / video: Quirk initial backlight level 0

It is now in Rafael's linux-next branch:
http://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git

Please kindly give it a test, thanks.
Comment 16 Aaron Lu 2013-11-13 02:10:50 UTC
For easy testing, I've prepared a branch for you:
https://github.com/aaronlu/linux acpi_video_dmi

It is based on Rafael's linux-next branch(thus it already has the above mentioned fix patch), with only one patch on top:
Remove the affected system from the DMI table to test if the above mentioned fix patch can work for it.

Note You need to log in before you can comment on or make changes to this bug.