[FOCAL][REGRESSION] Intel Gen 9 brightness cannot be controlled

Bug #1861521 reported by Tyler Hicks on 2020-01-31
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Medium
AceLan Kao
Focal
Medium
AceLan Kao
linux-oem-osp1 (Ubuntu)
Undecided
Unassigned
Bionic
Undecided
Unassigned

Bug Description

[Impact]
After Ubuntu-5.4.0-9.12 which introduce DPCD backlight patches, the
backlight control on some platforms fail to work.
It seems using OUI string to map the panels which support DPCD
backlight doesn't work well, it mis-mapped those panel that doesn't
support DPCD backlight, and breaks the backlight control.

[Fix]
The author of the origin DPCD backlight patches recently provides a
DP quirks based on EDID identification.

[Fix]
Verified on the machine with DPCD backlight and also on the machine
which has regression with the OUI quirks, both of them work now.

[Regression Potential]
Low, it introduce a new quirks to list the panels which support DPCD
backlight.

===============================

After upgrading from Eoan (5.3.0-29.31) to Focal (5.4.0-12.15), I no longer have the ability to control the backlight brightness on my HP EliteBook 840 G5. When pressing the brightness hotkeys, the on-screen indicator pops up and shows that the brightness setting is being changed but the actual screen brightness is stuck on the lowest setting.

This laptop has a built-in privacy screen. If I activate the privacy screen (fn-f2), then the actual screen brightness goes to the maximum setting and then I am able to dim and brighten the backlight as long as the privacy screen functionality is turned on.

This is a regression from Eoan's 5.3.0-29.31 kernel where I was able to control the brightness with and without the privacy screen functionality being turned on.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: linux-image-5.4.0-12-generic 5.4.0-12.15
ProcVersionSignature: Ubuntu 5.4.0-12.15-generic 5.4.8
Uname: Linux 5.4.0-12-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu16
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Fri Jan 31 11:42:16 2020
InstallationDate: Installed on 2019-06-24 (221 days ago)
InstallationMedia: Ubuntu 19.04 "Disco Dingo" - Release amd64 (20190416)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: linux-signed-5.4
UpgradeStatus: Upgraded to focal on 2020-01-28 (3 days ago)

Tyler Hicks (tyhicks) wrote :
Tyler Hicks (tyhicks) wrote :

When the privacy screen functionality is enabled, I see the following warnings in the logs:

[188829.782403] hp_wmi: Unknown event_id - 20 - 0x46fe
[188834.848948] hp_wmi: Unknown event_id - 20 - 0x3c00
[188835.624987] hp_wmi: Unknown event_id - 20 - 0x4600

The first warning is when I press the privacy screen button (fn-f2). The second is when I press the brightness down button (fn-f3). The third is when I press the brightness up button (fn-f4).

I do not see similar warnings after the privacy screen functionality is turned off and I press the brightness up or down hotkeys.

Tyler Hicks (tyhicks) wrote :

I rebooted into Eoan's 5.3.0-29.31 kernel, with Focal's userspace, and verified that the screen brightness is still adjustable under that kernel. Additionally, it is worth noting that I saw the same "hp_wmi: Unknown event_id" warnings mentioned in comment 2 so they probably don't have anything to do with this bug.

Dave Chiluk (chiluk) on 2020-02-11
summary: - [FOCAL][REGRESSION] HP EliteBook 840 G5 screen brightness cannot be
- controlled
+ [FOCAL][REGRESSION] Intel Gen 9 brightness cannot be controlled
Dave Chiluk (chiluk) wrote :

I also am hitting this. This looks to be a gen 9 graphics problem, as sforshee with gen 10 graphics appears unaffected.

I'm on a Dell Inspiron 5540 with an i9-9880H

$ glxinfo | grep Device
Device: Mesa DRI Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2) (0x3e9b)

@tyhicks reported on #ubuntu-kernel his affected box was
Device: Mesa DRI Intel(R) UHD Graphics 620 (Kabylake GT2) (0x5917)

It appears that this might be limited to kaby and coffee lake generations of gpu.

Dave Chiluk (chiluk) wrote :

Also I should have mentioned that 5.3.0-24-generic as a workaround also fixed it for me.

Dave Chiluk (chiluk) on 2020-02-11
affects: linux-signed-5.4 (Ubuntu) → linux-5.4 (Ubuntu)
Tyler Hicks (tyhicks) wrote :

Another Gen 9 GPU that I have is not affected by this bug:

 $ glxinfo | grep Device
     Device: Mesa DRI Intel(R) HD Graphics 515 (Skylake GT2) (0x191e)
 $ cat /proc/version_signature
 Ubuntu 5.4.0-12.15-generic 5.4.8

I can increase and decrease the brightness without any issues.

Tyler Hicks (tyhicks) wrote :

I noticed that upstream v5.4.18 allowed me to adjust my screen brightness while Ubuntu-5.4-5.4.0-14.17 does not, which indicates an Ubuntu SAUCE patch as the culprit. I bisected between the two kernels and this was the result:

$ git bisect good
3269788061d24e316633165608259de1c110b801 is the first bad commit
commit 3269788061d24e316633165608259de1c110b801
Author: AceLan Kao <email address hidden>
Date: Thu Dec 12 17:07:44 2019 +0800

    USUNTU: SAUCE: drm/i915: Force DPCD backlight mode on Dell Precision 4K sku

    BugLink: https://bugs.launchpad.net/bugs/1856134

    This platform using DPCD aux to control backlight,
    so adding the first 3 OUI bytes to the quirk.

    Signed-off-by: AceLan Kao <email address hidden>
    Signed-off-by: Seth Forshee <email address hidden>

:040000 040000 5eb20635c698b49ae34aece26e3ee9f24631ca72 0a3389d202d1306745004ff8837731f2ceda317e M drivers

I'm no expert in this area but it looks to me like that commit is being too generic and a more specific device_id is needed to target that Dell device.

Here's the information on my panel:

$ edid-decode /sys/class/drm/card0-eDP-1/edid
edid-decode (hex):

00 ff ff ff ff ff ff 00 26 cf 7f 05 00 00 00 00
00 1b 01 04 a5 1f 11 78 0a 1d 39 a7 50 47 97 27
13 4f 54 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 60 6d 80 c8 70 38 14 40 18 30
a5 00 35 ae 10 00 00 19 00 00 00 fe 00 4d 31 34
30 4e 56 46 37 20 52 30 20 0a 00 00 00 03 00 04
30 ff 05 3c 9d 2b 14 39 9d 00 00 00 00 00 00 03
00 06 18 ff 0f 3c 3b 2a 0b 39 3b 01 01 00 00 ad

----------------

EDID version: 1.4
Manufacturer: IVO Model 1407 Serial Number 0
Made in year 2017
Digital display
8 bits per primary color channel
DisplayPort interface
Maximum image size: 31 cm x 17 cm
Gamma: 2.20
Supported color formats: RGB 4:4:4, YCrCb 4:4:4
First detailed timing includes the native pixel format and preferred refresh rate
Color Characteristics
  Red: 0.6523, 0.3134
  Green: 0.2802, 0.5908
  Blue: 0.1523, 0.0771
  White: 0.3105, 0.3291
Established Timings I & II: none
Standard Timings: none
Detailed mode: Clock 280.000 MHz, 309 mm x 174 mm
               1920 1944 1992 2120 ( 24 48 128)
               1080 1090 1095 1100 ( 10 5 5)
               -hsync -vsync
               VertFreq: 120.069 Hz, HorFreq: 132.075 kHz
Alphanumeric Data String: M140NVF7 R0
Manufacturer-Specified Display Descriptor (0x03): 00 03 00 04 30 ff 05 3c 9d 2b 14 39 9d 00 00 00 ....0..<.+.9....
Manufacturer-Specified Display Descriptor (0x03): 00 03 00 06 18 ff 0f 3c 3b 2a 0b 39 3b 01 01 00 .......<;*.9;...
Checksum: 0xad

Changed in linux-5.4 (Ubuntu Focal):
assignee: nobody → AceLan Kao (acelankao)
Tyler Hicks (tyhicks) wrote :

To provide further verification, I built Ubuntu-5.4-5.4.0-14.17 with a single patch on top that reverts commit 3269788061d2 ("USUNTU: SAUCE: drm/i915: Force DPCD backlight mode on Dell Precision 4K sku"). My screen brightness controls are working again and I can undock from my external monitor without having to forcibly reboot the system due to a blank screen on my built-in monitor (I guess my screen brightness is turned all the way down when I undock and I cannot adjust it).

Tyler Hicks (tyhicks) on 2020-02-25
tags: added: champagne
Tyler Hicks (tyhicks) wrote :

I enabled the KMS debug messages in the drm module:

$ cat /etc/modprobe.d/drm-debug.conf
options drm debug=0x04
$ sudo update-initramfs -u -k $(uname -r) && sudo reboot
...

Unfortunately, it doesn't look like my device_id is set after the drm_dp_read_desc() in drm_dp_read_desc:

$ dmesg | grep -i OUI
[ 1.378026] [drm:drm_dp_read_desc [drm_kms_helper]] DP sink: OUI 38-ec-11 dev-ID HW-rev 0.0 SW-rev 0.0 quirks 0x0000

Hopefully the device_id is set for the Dell platform in bug #1856134 so that commit 3269788061d2 ("USUNTU: SAUCE: drm/i915: Force DPCD backlight mode on Dell Precision 4K sku") can be more specific to that device.

Tyler Hicks (tyhicks) wrote :

Note that the quirks in the debug output from comment #9 are 0x0000 because I've got still got commit 3269788061d2 ("USUNTU: SAUCE: drm/i915: Force DPCD backlight mode on Dell Precision 4K sku") reverted locally.

Chris Wayne (cwayne18) wrote :

FWIW I'm seeing this on a XPS 13 9370 as well

cwayne@groot:~$ glxinfo |grep Device
    Device: Mesa Intel(R) UHD Graphics 620 (KBL GT2) (0x5917)

AceLan Kao (acelankao) wrote :

There is a new patchset switches to use EDID-based DP quirk to list those DPCD backlight panel.
I'll try verifying the new method and submit new SRU patches.
https://patchwork.kernel.org/cover/11376657/

Changed in linux-5.4 (Ubuntu Focal):
status: Confirmed → In Progress
AceLan Kao (acelankao) wrote :

BTW, before the new patch is ready, you can add a kernel cmdline to disable the DPCD backlight
   i915.enable_dpcd_backlight=0

AceLan Kao (acelankao) wrote :

Here is the test kernel and the patches I reverted/applied, could anyone helps me verify it.
This kernel fixes the Dell machine I have which uses the DPCD backlight, I hope this won't introduce regressions you've encountered.

https://people.canonical.com/~acelan/bugs/lp1861521/

Kai-Heng Feng (kaihengfeng) wrote :

This kernel fixes the issue on XPS 9370 at my hand.

AceLan Kao (acelankao) on 2020-03-04
description: updated

On 2020-03-02 07:53:18, AceLan Kao wrote:
> Here is the test kernel and the patches I reverted/applied, could
> anyone helps me verify it.

I can confirm that the new kernel does _not_ regress brightness controls
on the machine that caused me to initially open this bug report.

Thanks!

AceLan Kao (acelankao) on 2020-03-04
no longer affects: linux-5.4 (Ubuntu Bionic)
no longer affects: linux-oem-osp1 (Ubuntu Focal)
Changed in linux-oem-osp1 (Ubuntu Bionic):
status: New → Fix Committed
Changed in linux-oem-osp1 (Ubuntu):
status: New → Invalid

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-focal' to 'verification-done-focal'. If the problem still exists, change the tag 'verification-needed-focal' to 'verification-failed-focal'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-focal
Joe Barnett (thejoe) wrote :

verified fixed with proposed kernel on dell xps15 2-in-1.
Device: Mesa Intel(R) HD Graphics 630 (KBL GT2) (0x591b)

tags: added: verification-done-focal
removed: verification-needed-focal
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-oem-osp1 - 5.0.0-1043.48

---------------
linux-oem-osp1 (5.0.0-1043.48) bionic; urgency=medium

  * bionic/linux-oem-osp1: 5.0.0-1043.48 -proposed tracker (LP: #1867111)

  * All PS/2 ports on PS/2 Serial add-in bracket are not working after S3
    (LP: #1866734)
    - SAUCE: Input: i8042 - Fix the selftest retry logic

  * r8152 init may take up to 40 seconds at initialization with Dell WD19/WD19DC
    during hotplug (LP: #1864284)
    - UBUNTU SAUCE: r8151: check disconnect status after long sleep

  * Miscellaneous Ubuntu changes
    - [Config] Bump the GCC version

 -- Timo Aaltonen <email address hidden> Thu, 12 Mar 2020 11:14:40 +0200

Changed in linux-oem-osp1 (Ubuntu Bionic):
status: Fix Committed → Fix Released
Changed in linux-oem-osp1 (Ubuntu):
status: Invalid → Fix Released
Seth Forshee (sforshee) on 2020-03-25
affects: linux-5.4 (Ubuntu Focal) → linux (Ubuntu Focal)
Changed in linux (Ubuntu Focal):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers