Bug 98759 - Backlight settings vanish after some time
Summary: Backlight settings vanish after some time
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Chris Wilson
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-17 09:59 UTC by nico-freedesktop.org
Modified: 2017-02-04 20:53 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
xorg.0.0log (25.83 KB, text/x-log)
2016-11-17 09:59 UTC, nico-freedesktop.org
no flags Details
dmesg (85.89 KB, text/plain)
2016-11-17 09:59 UTC, nico-freedesktop.org
no flags Details
Loop on EINTR (1.93 KB, patch)
2016-11-17 19:23 UTC, Chris Wilson
no flags Details | Splinter Review
xrandr-before-still-working (7.43 KB, text/plain)
2016-11-17 20:56 UTC, nico-freedesktop.org
no flags Details
xrandr-after-no-backlight (7.37 KB, text/plain)
2016-11-17 20:58 UTC, nico-freedesktop.org
no flags Details

Description nico-freedesktop.org 2016-11-17 09:59:27 UTC
Created attachment 128037 [details]
xorg.0.0log

Running xorg on a Lenovo X1 carbon gen4 (skylake) with any recent Linux kernel (currently 4.8.8-1-ARCH), the backlight information vanishes after some time:

Calling "xbacklight" gives an empty result:

[10:56] feder:~% xbacklight 
[10:56] feder:~% xbacklight -set 100
[10:56] feder:~% echo $?
0

However when restarting xorg, it works for some time (some hours).

I first assumed it might be related to suspend, however yesterday it also happened without a suspend in between.


X.Org X Server 1.18.4
Release Date: 2016-07-19
[  3671.610] X Protocol Version 11, Revision 0
[  3671.610] Build Operating System: Linux 4.5.4-1-ARCH x86_64 
[  3671.611] Current Operating System: Linux feder 4.8.8-1-ARCH #1 SMP PREEMPT Tue Nov 15 08:25:24 CET 2016 x86_64
[  3671.611] Kernel command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=22a059b2-d72f-4d45-8da7-c4cc22b9a620 rw cryptdevice=/dev/nvme0n1p3:root quiet
[  3671.611] Build Date: 19 July 2016  05:54:24PM


[10:54] feder:~% pacman -Q | grep ^xorg
xorg-appres 1.0.4-1
xorg-bdftopcf 1.0.5-1
xorg-font-util 1.3.1-1
xorg-font-utils 7.6-4
xorg-fonts-alias 1.0.3-1
xorg-fonts-encodings 1.0.4-4
xorg-fonts-misc 1.0.3-4
xorg-luit 1.1.1-2
xorg-mkfontdir 1.0.7-2
xorg-mkfontscale 1.1.2-1
xorg-server 1.18.4-1
xorg-server-common 1.18.4-1
xorg-setxkbmap 1.3.1-1
xorg-xauth 1.0.9-1
xorg-xbacklight 1.2.1-1
xorg-xdpyinfo 1.3.2-1
xorg-xev 1.2.2-1
xorg-xinit 1.3.4-4
xorg-xinput 1.6.2-1
xorg-xkbcomp 1.3.1-1
xorg-xkill 1.0.4-1
xorg-xmodmap 1.0.9-1
xorg-xrandr 1.5.0-1
xorg-xrdb 1.1.0-2
xorg-xset 1.2.3-1
xorg-xsetroot 1.1.1-2
xorg-xwd 1.0.6-1
xorg-xwininfo 1.1.3-1
Comment 1 nico-freedesktop.org 2016-11-17 09:59:49 UTC
Created attachment 128038 [details]
dmesg
Comment 2 Chris Wilson 2016-11-17 10:03:40 UTC
Can you please attach "xrandr --verbose" from after startup and from when the failure occurs?
Comment 3 Chris Wilson 2016-11-17 19:23:34 UTC
Created attachment 128047 [details] [review]
Loop on EINTR
Comment 4 nico-freedesktop.org 2016-11-17 20:56:32 UTC
Created attachment 128048 [details]
xrandr-before-still-working
Comment 5 nico-freedesktop.org 2016-11-17 20:58:01 UTC
And here is the xrandr output after it doesn't work anymore, though taken from a few minutes ago, before I restarted xorg
Comment 6 nico-freedesktop.org 2016-11-17 20:58:26 UTC
Created attachment 128049 [details]
xrandr-after-no-backlight
Comment 7 Chris Wilson 2016-11-17 21:02:59 UTC
Thanks, that will the (EE) confirm that it should be a failed write causing the backlight to disappear.
Comment 8 Chris Wilson 2016-11-18 16:34:03 UTC
Pushed commit bde946054efbc1c7ae1483b84c3b4fa3c2c7e2ec
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Nov 17 19:22:02 2016 +0000

    backlight: Protect iface writes against signal interruptions

as it should be the right thing to do, regardless of whether it is the root cause here.
Comment 9 nico-freedesktop.org 2016-11-18 16:59:56 UTC
Fun fact:

since restarting xorg yesterday, I cannot yet reproduce the problem. Neither suspend, nor connecting / disconncting external output seem to reliable cause the problem.

Things I have changed since the first report:

- upgraded from linux 4.8.8-1 to linux 4.8.8-2 (should not change anything, only enabled / added the randomization flag)

- removed /etc/udev/rules.d/90-backlight.rules that I used for modesetting driver+acpibacklight, which contained:

SUBSYSTEM=="backlight", ACTION=="add", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness"
SUBSYSTEM=="backlight", ACTION=="add", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"

I do not assume that either of both should have interfered with xorg and I am also in the group video, as can be seen below.


[17:54] feder:~% id
uid=1000(nico) gid=1000(nico) groups=1000(nico),14(uucp),90(network),91(video),92(audio),93(optical),98(power),100(users),150(wireshark),992(docker)

However I also remember having some days *with* backlight being present and then vanishing - thus I'll report again, as soon as it vanishes.
Comment 10 Chris Wilson 2017-02-04 20:53:07 UTC
I'm presuming it was the interrupted write causing us to disable the backlight...


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.