Bug 213259 - i915 dpcd backlight brightness control stopped working with kernel v5.12
Summary: i915 dpcd backlight brightness control stopped working with kernel v5.12
Status: RESOLVED MOVED
Alias: None
Product: Drivers
Classification: Unclassified
Component: Video(Other) (show other bugs)
Hardware: Intel Linux
: P1 normal
Assignee: drivers_video-other
URL: https://gitlab.freedesktop.org/drm/in...
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-28 12:12 UTC by André Najda
Modified: 2021-11-09 08:01 UTC (History)
2 users (show)

See Also:
Kernel Version: 5.12
Tree: Mainline
Regression: No


Attachments
bisect 'log' (36.04 KB, text/plain)
2021-05-28 12:12 UTC, André Najda
Details
dmesg (75.87 KB, text/plain)
2021-05-28 12:21 UTC, André Najda
Details
xorg.conf (446 bytes, text/plain)
2021-05-28 12:22 UTC, André Najda
Details
kernel config (139.17 KB, text/plain)
2021-05-28 12:24 UTC, André Najda
Details
dmesg with drm.debug=0x116 log_buf_len=15M v5.13.0-rc5 (723.17 KB, text/plain)
2021-06-09 19:55 UTC, André Najda
Details
dmesg with drm.debug=0x116 log_buf_len=15M v5.10 without dpcd_backlight parameter (1.39 MB, text/plain)
2021-06-09 19:56 UTC, André Najda
Details
dmesg with drm.debug=0x116 log_buf_len=15M v5.10 with dpcd_backlight parameter (681.17 KB, text/plain)
2021-06-09 19:57 UTC, André Najda
Details
dmesg v5.13.0-rc5 without acpi vendor without dpcd_backlight parameter (897.03 KB, text/plain)
2021-06-09 20:12 UTC, André Najda
Details

Description André Najda 2021-05-28 12:12:08 UTC
Created attachment 297021 [details]
bisect 'log'

So this is a clevo based laptop P65_67HSHP 

XC1507v2 ~ # lspci | grep -i vga
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 630 (rev 04)
01:00.0 VGA compatible controller: NVIDIA Corporation GP104BM [GeForce GTX 1070 Mobile] (rev a1)

where the NVIDIA is the dGPU.

To have backlight brightness control working I have to set:

XC1507v2 ~ # cat /proc/cmdline 
root=UUID=c90317de-bed0-4a71-beaf-b5acfbc3d98f crypt_root=UUID=73cc64d2-e973-4e6e-bbf8-31c1d00f6ad8 resume=UUID=1c793108-f3db-4a52-99de-cf24b894dd0b dolvm luks rw initrd=\intel-uc.img initrd=\initramfs-5.12.7.img acpi_backlight=vendor keymap=de i915.enable_dpcd_backlight=1

where the dpcd thing is the important part.

When I updated from kernel v5.11 to a kernel v 5.12 I discovered the backlight brightness control not working anymore. I then did a bisect, but unfortunately I had to skip a few commits because the kernel won't build since make throws errors.

See the attachment for a "bisect log".

As far as I can see and understand the commits I read there seems to be several changes in the way the i915 driver addresses the backlight control mechanism.

I also tried enable_dpcd_backlight with the option 2 and 3 as it was mentioned in one of the commits.

I'm kind of lost at this point and I'm looking for help to solve this. Thank you.
Comment 1 André Najda 2021-05-28 12:21:26 UTC
Created attachment 297023 [details]
dmesg
Comment 2 André Najda 2021-05-28 12:22:15 UTC
Created attachment 297025 [details]
xorg.conf
Comment 3 André Najda 2021-05-28 12:24:05 UTC
Created attachment 297027 [details]
kernel config
Comment 4 André Najda 2021-05-28 12:26:07 UTC
XC1507v2 ~ # get-edid 
This is read-edid version 3.0.2. Prepare for some fun.
Attempting to use i2c interface
No EDID on bus 1
No EDID on bus 2
No EDID on bus 3
2 potential busses found: 0 4
Will scan through until the first EDID is found.
Pass a bus number as an option to this program to go only for that one.
Bus 0 doesn't really have an EDID...
256-byte EDID successfully retrieved from i2c bus 4
��������R�C50 ▒�"x���XT�'PT�q��p8>@l0�X�▒�q��p8�Dl0�X�▒�AUO
         �B156HTN05.2 
Looks like i2c was successful. Have a good day.


Let me know if I can help any further in providing information or testing. :]
Comment 5 EDEADLINK 2021-06-08 00:02:33 UTC
I have the same issue on my clevo P65_67HSHP.
I ran a more limited bisect:
$ git bisect start v5.12 v5.11 -- drivers/gpu/drm/i915/display/ 
And found this commit as the first bad one:  

fe7d52bccab674a22776a2f31236bf4232e85410 - drm/i915/dp: Don't use DPCD backlights that need PWM enable/disable  

https://patchwork.freedesktop.org/patch/415303/


The clevo P65_67HSHP can not control the brightness using PWM only.
Maybe it needs a mix of AUX and PWM, maybe that patch is just BAD.
Comment 6 Lyude Paul 2021-06-09 18:03:59 UTC
Sorry it's taken me so long to get back to this, this week and last have been extremely busy.

Have you tried a kernel from drm-tip or directly from Linus's tree? As well, if that doesn't fix your issue could you try getting me more logs with the following kernel parameters added:

drm.debug=0x116 log_buf_len=15M

(Also, please make sure to remove the i915.enable_dpcd_backlight setting you added or set it to -1 as I'd like to see what i915 thinks your system actually uses for backlight controls)
Comment 7 André Najda 2021-06-09 19:55:22 UTC
Created attachment 297265 [details]
dmesg with drm.debug=0x116 log_buf_len=15M v5.13.0-rc5
Comment 8 André Najda 2021-06-09 19:56:11 UTC
Created attachment 297269 [details]
dmesg with drm.debug=0x116 log_buf_len=15M v5.10 without dpcd_backlight parameter
Comment 9 André Najda 2021-06-09 19:57:48 UTC
Created attachment 297271 [details]
dmesg with drm.debug=0x116 log_buf_len=15M v5.10 with dpcd_backlight parameter
Comment 10 Lyude Paul 2021-06-09 20:00:49 UTC
Wait. have you tried this without the acpi_backlight=vendor string in your kernel cmdline? You really shouldn't need that these days, and I'm actually kind of suspicious there's a chance that might be causing the problems here
Comment 11 EDEADLINK 2021-06-09 20:12:03 UTC
acpi_backlight=vendor can't be it, I don't use it and have the same issue.
Comment 12 André Najda 2021-06-09 20:12:15 UTC
Created attachment 297273 [details]
dmesg v5.13.0-rc5 without acpi vendor without dpcd_backlight parameter

Thanks for taking your time. Unfortunately backlight still is at 100%.
Comment 13 André Najda 2021-06-09 20:21:03 UTC
I removed the acpi_backlight=vendor string and it still works with v5.10.
Comment 14 Lyude Paul 2021-06-09 20:32:16 UTC
(In reply to André Najda from comment #13)
> I removed the acpi_backlight=vendor string and it still works with v5.10.

So just to confirm - your backlight does work on v5.10, and it works by default on v5.10 without i915.enable_dpcd_backlight=1? Or did you have to manually enable dpcd backlight controls there as well?
Comment 15 André Najda 2021-06-09 20:36:40 UTC
(In reply to Lyude Paul from comment #14)
> (In reply to André Najda from comment #13)
> > I removed the acpi_backlight=vendor string and it still works with v5.10.
> 
> So just to confirm - your backlight does work on v5.10, and it works by
> default on v5.10 without i915.enable_dpcd_backlight=1? Or did you have to
> manually enable dpcd backlight controls there as well?

No.

It works without acpi_backlight=vendor but i915.enable_dpcd_backlight=1 is still needed.

So no dpcd_backlight string no joy.
Comment 16 André Najda 2021-06-09 20:38:09 UTC
Just to clarify: It doesn't work  with kernel >=v5.12 as reported neither with dpcd_backlight=1 nor with dpcd_backlight=-1
Comment 17 Lyude Paul 2021-06-09 20:40:49 UTC
(In reply to André Najda from comment #15)
> (In reply to Lyude Paul from comment #14)
> > (In reply to André Najda from comment #13)
> > > I removed the acpi_backlight=vendor string and it still works with v5.10.
> > 
> > So just to confirm - your backlight does work on v5.10, and it works by
> > default on v5.10 without i915.enable_dpcd_backlight=1? Or did you have to
> > manually enable dpcd backlight controls there as well?
> 
> No.
> 
> It works without acpi_backlight=vendor but i915.enable_dpcd_backlight=1 is
> still needed.
> 
> So no dpcd_backlight string no joy.

ugh sorry I forgot to ask one last question - is this problem affected at all by the fact that you're loading the nvidia driver? I doubt this is the case, but I'd like to just confirm because unfortunately your laptop is breaking quite a number of assumptions about intel backlight configs :(.

Also - is this a System76 machine?
Comment 18 André Najda 2021-06-09 20:50:04 UTC
(In reply to Lyude Paul from comment #17)

> ugh sorry I forgot to ask one last question - is this problem affected at
> all by the fact that you're loading the nvidia driver? I doubt this is the
> case, but I'd like to just confirm because unfortunately your laptop is
> breaking quite a number of assumptions about intel backlight configs :(.
> 
> Also - is this a System76 machine?

No, it's not. I once tried especially not to taint the kernel but the issue is the very same. If it's of any help I could provide a dmesg w/o the nvidia-blob.

No, this is not a System76 machine.


It would just work if I'd disable the intel gpu and go for the nvidia dGPU, only. But battery becomes an issue there.
Comment 19 Jani Nikula 2021-06-22 13:19:00 UTC
Please let's try to bring all the drm/i915 bugs over at fdo gitlab; basically nobody in the i915 team has been looking at kernel.org bugzilla for years.

https://gitlab.freedesktop.org/drm/intel/issues/new

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