Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1514969 - Bug in backlight handling renders system almost unusable
Summary: Bug in backlight handling renders system almost unusable
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 27
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Hans de Goede
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-19 18:41 UTC by Dennis Jacobfeuerborn
Modified: 2018-09-03 23:30 UTC (History)
26 users (show)

Fixed In Version: kernel-4.14.13-300.fc27 kernel-4.14.13-200.fc26
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-01-12 14:43:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
[PATCH] platform/x86: dell-laptop: Filter out spurious keyboard backlight change events (3.14 KB, patch)
2018-01-03 10:24 UTC, Hans de Goede
no flags Details | Diff

Description Dennis Jacobfeuerborn 2017-11-19 18:41:29 UTC
Description of problem:
Every few seconds the brightness of the screen changes slightly and the overlay icon for the keyboard backlight setting appears.
In the journal I see the following:

Nov 19 19:36:01 nexusm pkexec[3276]: gdm: Error executing command as another user: Not authorized [USER=root] [TTY=unknown] [CWD=/var/lib/gdm] [COMMAND=/usr/libexec/gsd-backlight-helper --set-brightness 683]
Nov 19 19:36:01 nexusm org.gnome.SettingsDaemon.Power.desktop[1305]: Error executing command as another user: Not authorized
Nov 19 19:36:01 nexusm org.gnome.SettingsDaemon.Power.desktop[1305]: This incident has been reported.
Nov 19 19:36:33 nexusm pkexec[3282]: gdm: Error executing command as another user: Not authorized [USER=root] [TTY=unknown] [CWD=/var/lib/gdm] [COMMAND=/usr/libexec/gsd-backlight-helper --set-brightness 585]
Nov 19 19:36:33 nexusm org.gnome.SettingsDaemon.Power.desktop[1305]: Error executing command as another user: Not authorized
Nov 19 19:36:33 nexusm org.gnome.SettingsDaemon.Power.desktop[1305]: This incident has been reported.

Version-Release number of selected component (if applicable):
gnome-settings-daemon-3.26.2-1.fc27.x86_64

How reproducible:
Boot the system.

Actual results:
Constant change of screen brightness and pop-up of keyboard backlight indicator.

Additional info:
This is on a Dell XPS 13 (L322X)
In the power settings the setting "Automatic brightness" is set to "off".

Comment 1 Dennis Jacobfeuerborn 2017-11-19 19:41:46 UTC
After some digging I found a workaround:

Create a file /etc/modprobe.d/disable-als.conf with the following content:
blacklist acpi_als
blacklist dell_laptop

After rebooting the problem is gone.

Blacklisting "acpi_als" gets right of the screen brightness changes and log entries and blacklisting "dell_laptop" stops the genome OSD indicator from popping up when the lighting conditions change.

Comment 2 Hans de Goede 2017-11-25 10:44:11 UTC
Hi,

So there seem to be 2 issues here:
1) Brightness changes happening even when "Automatic brightness" is set to "off".
2) Keyboard backlight OSD popping up when lighting conditions change

I'm quite familar with the code behind 2, as I've spend quite some time making 2 work properly, but apparently not properly on your machine.

Can you please remove the blacklisting of dell_laptop (not really necessary, but it will help to check the problem reproduces), and add an /etc/modprobe.d/dell-wmi.conf file with the following in there:

options dell-wmi dyndbg

Then reboot and as soon as the problem happens again run:

dmesg > dmesg.log

And attach the generated dmesg.log file here please?

Thanks & Regards,

Hans

Comment 3 Dominik 'Rathann' Mierzejewski 2018-01-02 21:42:34 UTC
Looks like a duplicate of 1322588 (which I'm also affected by).

Comment 4 Dominik 'Rathann' Mierzejewski 2018-01-02 22:04:10 UTC
For the record, every time the keyboard backlight indicator pops up in GNOME, the following entries appear in dmesg:
[ 4845.080708] dell_wmi: Process buffer (03 00 00 00 0c e0 01 00)
[ 4845.080714] dell_wmi: Key with type 0x0000 and code 0xe00c pressed
[ 4845.651690] dell_wmi: Received WMI event (03 00 00 00 0c e0 01 00 00 00 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00)
[ 4845.651694] dell_wmi: Process buffer (03 00 00 00 0c e0 01 00)
[ 4845.651699] dell_wmi: Key with type 0x0000 and code 0xe00c pressed

Comment 5 Dominik 'Rathann' Mierzejewski 2018-01-02 22:07:59 UTC
And the hardware is Dell XPS 13 9333.

Comment 6 Hans de Goede 2018-01-02 22:17:17 UTC
(In reply to Dominik 'Rathann' Mierzejewski from comment #4)
> For the record, every time the keyboard backlight indicator pops up in
> GNOME, the following entries appear in dmesg:

Thank you for providing this info.

This happens whenever the screen-brightness changes, as the reporter of this bug reported? Or only when actually changing the keyboard backlight brightness?

If this happens whenever the screen-brightness changes, iow this happens when it should not happen, what sort of debugging output do you get from dell_wmi when you actually change the keyboard brightness using the Fn + key combo for that ?

Comment 7 Dominik 'Rathann' Mierzejewski 2018-01-02 23:34:38 UTC
This happens when the user is not doing anything and the machine is just idling for a few seconds. The user says sometimes the screen brightness changes, but not always.

Actually changing the keyboard backlight brightness yields these:
[  288.739903] dell_wmi: Received WMI event (02 00 00 00 0e e0 0e 00 00 00 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00)
[  288.739906] dell_wmi: Process buffer (02 00 00 00 0e e0)
[  288.739909] dell_wmi: Key with type 0x0000 and code 0xe00e pressed
[  290.747733] dell_wmi: Received WMI event (02 00 00 00 0e e0 0e 00 00 00 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00)
[  290.747735] dell_wmi: Process buffer (02 00 00 00 0e e0)
[  290.747737] dell_wmi: Key with type 0x0000 and code 0xe00e pressed
[  323.710382] dell_wmi: Received WMI event (03 00 00 00 0c e0 02 00 00 00 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00)
[  323.710385] dell_wmi: Process buffer (03 00 00 00 0c e0 02 00)
[  323.710390] dell_wmi: Key with type 0x0000 and code 0xe00c pressed
[  326.079341] dell_wmi: Received WMI event (03 00 00 00 0c e0 01 00 00 00 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00)
[  326.079345] dell_wmi: Process buffer (03 00 00 00 0c e0 01 00)
[  326.079350] dell_wmi: Key with type 0x0000 and code 0xe00c pressed
[  327.497195] dell_wmi: Received WMI event (03 00 00 00 0c e0 00 00 00 00 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00)
[  327.497198] dell_wmi: Process buffer (03 00 00 00 0c e0 00 00)
[  327.497202] dell_wmi: Key with type 0x0000 and code 0xe00c pressed

Unfortunately, the bug is difficult to reproduce. I can't trigger it after reboot right now.

Comment 8 Dennis Jacobfeuerborn 2018-01-03 04:08:16 UTC
From what I can tell the "als" in acpi_als stands for "Ambient Light Sensor" and is responsible for the sensor that detects the brightness levels around the laptop. The screen brightness seems to be changing depending on what this sensor detects that is by turning on/off a light in the room or just changing your position in front of the laptop enough to affect this sensor (it seems to be fairly sensitive.)

I still had to blacklist the second module though to make the problem completely go away.

It looks like the sensors generates events when the lighting conditions changed which are then interpreted as if the user hit the backlight brightness keys which makes the indicator icon pop-up.
If the sensor generated events are not distinguishable from the key presses (which seems to be the case from Dominik's output above) then that's a problem as gnome has no way to tell if the change cam from an explicit user action (where the icon should be displayed) or an implicit sensor change (where the icon should not be displayed as this change was not user initiated and happens quite frequently).

Comment 9 Hans de Goede 2018-01-03 10:24:04 UTC
Created attachment 1376247 [details]
[PATCH] platform/x86: dell-laptop: Filter out spurious keyboard backlight change events

Ok, so the WMI events alone are not enough to distuingish between real changes and the false positive WMI "key" events being send on some XPS models.

So I've written a patch which filters out these events when the kbd backlight level is the same as before.

I will also start a scratch kernel build with this patch for you to test.

Comment 10 Hans de Goede 2018-01-03 10:38:10 UTC
Ok, a kernel with this patch is building here:
https://koji.fedoraproject.org/koji/taskinfo?taskID=23980020

Note it will typically take a couple of hours for this to finish. To test this kernel download kernel-core-....x86_64.rpm and kernel-modules-....x86_64.rpm, put them both in a dir and from that dir run:

sudo rpm -ivh kernel-*.x86_64.rpm

Un-blacklist the modules for testing and then reboot into the new kernel.

A tip for reproducing this, I think that if you change the LCD brightness from the gnome3 system-menu (top right corner menu) you will also see the false-postive kbd-backlight OSD. Alternatively enable automatic brightness control in the control-panel power-settings and cover the ambient light sensor with your hand.

Once I get a confirmation that this patch fixes the kbd backlight OSD popping up when it should not I will post this upstream.

Note this only fixes the issue of the kbd backlight OSD popping up and should allow you to un blacklist dell-laptop.

Comment 11 Hans de Goede 2018-01-03 12:39:39 UTC
Ok, the scratchbuild has completed now, so please go ahead and test this.

Comment 12 Dennis Jacobfeuerborn 2018-01-03 21:43:52 UTC
I tested the new kernel and I can no longer reproduce the backlight OSD popping up except when I explicitly use the brightness adjustment keys.

I still see entries in the journal depending on the "Automatic Brightness" setting when I put my hand over the sensor.

Automatic brightness = off shows there entries:
Jan 03 22:33:41 nexusm pkexec[4095]: gdm: Error executing command as another user: Not authorized [USER=root] [TTY=unknown] [CWD=/var/lib/gdm] [COMMAND=/usr/libexec/gsd-backlight-helper --set-brightness 488]
Jan 03 22:33:41 nexusm org.gnome.SettingsDaemon.Power.desktop[1433]: Error executing command as another user: Not authorized
Jan 03 22:33:41 nexusm org.gnome.SettingsDaemon.Power.desktop[1433]: This incident has been reported.

Automatic brightness = on shows these entries:
Jan 03 22:39:24 nexusm pkexec[4670]: gdm: Error executing command as another user: Not authorized [USER=root] [TTY=unknown] [CWD=/var/lib/gdm] [COMMAND=/usr/libexec/gsd-backlight-helper --set-brightness 488]
Jan 03 22:39:24 nexusm org.gnome.SettingsDaemon.Power.desktop[1433]: Error executing command as another user: Not authorized
Jan 03 22:39:24 nexusm org.gnome.SettingsDaemon.Power.desktop[1433]: This incident has been reported.
Jan 03 22:39:24 nexusm pkexec[4671]: pam_systemd(polkit-1:session): Cannot create session: Already running in a session
Jan 03 22:39:24 nexusm audit[4671]: USER_START pid=4671 uid=1000 auid=1000 ses=2 msg='op=PAM:session_open grantors=pam_keyinit,pam_limits,pam_systemd,pam_unix acct="root" exe="/usr/bin/pkexec" hostname=? addr=? terminal=? res=success'
Jan 03 22:39:24 nexusm pkexec[4671]: pam_unix(polkit-1:session): session opened for user root by (uid=1000)
Jan 03 22:39:24 nexusm pkexec[4671]: dennis: Executing command [USER=root] [TTY=unknown] [CWD=/home/dennis] [COMMAND=/usr/libexec/gsd-backlight-helper --set-brightness 1318]

In the "on" case the brightness gets adjusted as expected.

So it seems the new kernel has fixed the main issue and what's left is these "Not authorized" messages in the log.

Comment 13 Hans de Goede 2018-01-04 09:26:32 UTC
(In reply to Dennis Jacobfeuerborn from comment #12)
> I tested the new kernel and I can no longer reproduce the backlight OSD
> popping up except when I explicitly use the brightness adjustment keys.

Ok, so it fixes things for you, that is great news.

I've added the patch to the Fedora kernel packages for F27+, so it will get picked up by the next official Fedora kernel build fixing this.

I've also submitted the patch fixing this upstream.

> I still see entries in the journal depending on the "Automatic Brightness"
> setting when I put my hand over the sensor.

Yes this is a known issue which is tracked already in bug 1322588, this is harmless really, but we should fix it one of these days. If you want to track the issue of these messages showing up in the journal please add yourself to the Cc of bug 1322588.

Comment 14 Dominik 'Rathann' Mierzejewski 2018-01-07 16:31:29 UTC
(In reply to Hans de Goede from comment #13)
> (In reply to Dennis Jacobfeuerborn from comment #12)
> > I tested the new kernel and I can no longer reproduce the backlight OSD
> > popping up except when I explicitly use the brightness adjustment keys.
> 
> Ok, so it fixes things for you, that is great news.

For me as well, thank you!

> I've added the patch to the Fedora kernel packages for F27+, so it will get
> picked up by the next official Fedora kernel build fixing this.
> 
> I've also submitted the patch fixing this upstream.

Excellent news!

> > I still see entries in the journal depending on the "Automatic Brightness"
> > setting when I put my hand over the sensor.
> 
> Yes this is a known issue which is tracked already in bug 1322588, this is
> harmless really, but we should fix it one of these days.

Not entirely harmless, as it fills the logs with useless messages.

Comment 15 Fedora Update System 2018-01-11 12:57:07 UTC
kernel-4.14.13-200.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2018-e6fe35524d

Comment 16 Fedora Update System 2018-01-11 13:08:52 UTC
kernel-4.14.13-300.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-21a7ad920c

Comment 17 Fedora Update System 2018-01-11 23:09:32 UTC
kernel-4.14.13-300.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-21a7ad920c

Comment 18 Fedora Update System 2018-01-11 23:42:56 UTC
kernel-4.14.13-200.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-e6fe35524d

Comment 19 Fedora Update System 2018-01-12 14:43:39 UTC
kernel-4.14.13-300.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 20 Fedora Update System 2018-01-13 23:05:12 UTC
kernel-4.14.13-200.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 21 Daniele Viganò 2018-02-21 20:19:06 UTC
Patch https://src.fedoraproject.org/rpms/kernel/blob/f27/f/0001-platform-x86-dell-laptop-Filter-out-spurious-keyboar.patch included in 4.15.3-300.fc27.x86_64 is actually breaking backlit on my Dell Latitude E5450 as I reported here https://bugzilla.redhat.com/show_bug.cgi?id=1546464#c1

Comment 22 Leonardo Amaral 2018-09-03 23:30:10 UTC
(In reply to Dennis Jacobfeuerborn from comment #1)
> After some digging I found a workaround:
> 
> Create a file /etc/modprobe.d/disable-als.conf with the following content:
> blacklist acpi_als
> blacklist dell_laptop
> 
> After rebooting the problem is gone.
> 
> Blacklisting "acpi_als" gets right of the screen brightness changes and log
> entries and blacklisting "dell_laptop" stops the genome OSD indicator from
> popping up when the lighting conditions change.

I had this issue with my laptop and the blacklist workarround worked.

set 03 18:35:48 manauara kernel: Command line: BOOT_IMAGE=/vmlinuz-4.17.19-200.fc28.x86_64 root=UUID=1fffc5c0-7768-406d-bec3-a5eea368c93d ro rootflags=subvol=root resume=UUID=6d09f50a-c8a4-4ae8-ae98-3a60c81efa94 rhgb quiet loglevel=3 rd.systemd.show_status=auto rd.udev.log_priority=3 LANG=pt_BR.UTF-8 acpi_backlight=vendor acpi_osi=Linux acpi_rev_override=5 nouveau.modeset=0 rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1

set 03 20:11:05 manauara pkexec[10095]: leonardo: Executing command [USER=root] [TTY=unknown] [CWD=/home/leonardo] [COMMAND=/usr/libexec/gsd-backlight-helper --set-brightness 14]
set 03 20:11:11 manauara pkexec[10111]: pam_systemd(polkit-1:session): Cannot create session: Already running in a session
set 03 20:11:11 manauara audit[10111]: USER_START pid=10111 uid=1000 auid=1000 ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_open grantors=pam_keyinit,pam_limits,pam_systemd,
pam_unix acct="root" exe="/usr/bin/pkexec" hostname=? addr=? terminal=? res=success'


Handle 0x0001, DMI type 1, 27 bytes
System Information
        Manufacturer: Dell Inc.
        Product Name: Inspiron 7572

Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
        Vendor: Dell Inc.
        Version: 1.1.7
        Release Date: 07/17/2018

[root@manauara ~]# uname -a
Linux manauara 4.17.19-200.fc28.x86_64 #1 SMP Fri Aug 24 15:47:41 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux


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