Bug 92943 - backlight turned off after sleep resume
Summary: backlight turned off after sleep resume
Status: CLOSED WORKSFORME
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Intel GFX Bugs mailing list
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-13 17:07 UTC by chrhei
Modified: 2017-07-24 22:44 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
System Information (Manjaro on LENOVO L540) (589 bytes, text/plain)
2015-11-13 17:07 UTC, chrhei
no flags Details
Xorg strace - L540 (43.42 KB, text/plain)
2015-11-14 18:42 UTC, chrhei
no flags Details
strace -f -o x.strace startx (2.41 MB, application/zip)
2015-11-14 22:48 UTC, chrhei
no flags Details
drm.debug=14, dmesg before resume, L540 (135.02 KB, text/plain)
2015-11-16 10:39 UTC, chrhei
no flags Details
drm.debug=14, dmesg after resume, L540 (189.08 KB, text/plain)
2015-11-16 10:40 UTC, chrhei
no flags Details

Description chrhei 2015-11-13 17:07:45 UTC
Created attachment 119648 [details]
System Information (Manjaro on LENOVO L540)

Please see:
https://bugs.archlinux.org/task/45501?project=1&cat[0]=2&string=xf86-video-intel

Description:
After upgrading this package (Manajro package management) and after resuming from sleep and logging back in (from lightdm) the backlight turns off. Switching to a tty doesn't turn it back on. Running commands to increase the brightness like using /sys/class/backlight/intel_backlight/brightness do not help. I know it's just the backlight because if I shine a light on the screen I can make out features and run commands in a terminal.


Additional info:
* Upgrade from 2.99.917-5 to 1:2.99.917+364+gb24e758-1


Steps to reproduce:
* Upgrade xf86-video-intel

Downgrading to 2.99.917-5 fixed it again
Comment 1 MrHaroldA 2015-11-13 18:37:27 UTC
Confirmed on a Lenovo T440. The bug reports on Arch seem to suggest that the bug is mainly present on Lenovo hardware ...
Comment 2 Chris Wilson 2015-11-13 19:11:36 UTC
What does "grep -r . /sys/class/backlight/intel_backlight/" report?
Comment 3 MrHaroldA 2015-11-13 19:25:18 UTC
Before suspend:

/sys/class/backlight/intel_backlight/type:raw
/sys/class/backlight/intel_backlight/brightness:426
/sys/class/backlight/intel_backlight/power/control:auto
/sys/class/backlight/intel_backlight/power/async:disabled
/sys/class/backlight/intel_backlight/power/runtime_enabled:disabled
/sys/class/backlight/intel_backlight/power/runtime_active_kids:0
/sys/class/backlight/intel_backlight/power/runtime_active_time:0
/sys/class/backlight/intel_backlight/power/runtime_status:unsupported
/sys/class/backlight/intel_backlight/power/runtime_usage:0
/sys/class/backlight/intel_backlight/power/runtime_suspended_time:0
/sys/class/backlight/intel_backlight/bl_power:0
/sys/class/backlight/intel_backlight/max_brightness:851
/sys/class/backlight/intel_backlight/actual_brightness:426


After resume:

sys/class/backlight/intel_backlight/type:raw
/sys/class/backlight/intel_backlight/brightness:426
/sys/class/backlight/intel_backlight/power/control:auto
/sys/class/backlight/intel_backlight/power/async:disabled
/sys/class/backlight/intel_backlight/power/runtime_enabled:disabled
/sys/class/backlight/intel_backlight/power/runtime_active_kids:0
/sys/class/backlight/intel_backlight/power/runtime_active_time:0
/sys/class/backlight/intel_backlight/power/runtime_status:unsupported
/sys/class/backlight/intel_backlight/power/runtime_usage:0
/sys/class/backlight/intel_backlight/power/runtime_suspended_time:0
/sys/class/backlight/intel_backlight/bl_power:4
/sys/class/backlight/intel_backlight/max_brightness:851
/sys/class/backlight/intel_backlight/actual_brightness:426


It's purely Xorg by the way; LightDM revives the screen correctly after resume, but after logging in again, the screen is dimmed completely.
Comment 4 chrhei 2015-11-13 23:31:20 UTC
Here are my results from "grep -r . /sys/class/backlight/intel_backlight/":

/sys/class/backlight/intel_backlight/type:raw
/sys/class/backlight/intel_backlight/brightness:958
/sys/class/backlight/intel_backlight/power/control:auto
/sys/class/backlight/intel_backlight/power/async:disabled
/sys/class/backlight/intel_backlight/power/runtime_enabled:disabled
/sys/class/backlight/intel_backlight/power/runtime_active_kids:0
/sys/class/backlight/intel_backlight/power/runtime_active_time:0
grep: /sys/class/backlight/intel_backlight/power/autosuspend_delay_ms: Eingabe-/Ausgabefehler
/sys/class/backlight/intel_backlight/power/runtime_status:unsupported
/sys/class/backlight/intel_backlight/power/runtime_usage:0
/sys/class/backlight/intel_backlight/power/runtime_suspended_time:0
/sys/class/backlight/intel_backlight/bl_power:0
/sys/class/backlight/intel_backlight/max_brightness:4794
/sys/class/backlight/intel_backlight/actual_brightness:958
Comment 5 chrhei 2015-11-14 11:56:44 UTC
And after resume:

/sys/class/backlight/intel_backlight/type:raw
/sys/class/backlight/intel_backlight/brightness:958
/sys/class/backlight/intel_backlight/power/control:auto
/sys/class/backlight/intel_backlight/power/async:disabled
/sys/class/backlight/intel_backlight/power/runtime_enabled:disabled
/sys/class/backlight/intel_backlight/power/runtime_active_kids:0
/sys/class/backlight/intel_backlight/power/runtime_active_time:0
grep: /sys/class/backlight/intel_backlight/power/autosuspend_delay_ms: Eingabe-/Ausgabefehler
/sys/class/backlight/intel_backlight/power/runtime_status:unsupported
/sys/class/backlight/intel_backlight/power/runtime_usage:0
/sys/class/backlight/intel_backlight/power/runtime_suspended_time:0
/sys/class/backlight/intel_backlight/bl_power:4
/sys/class/backlight/intel_backlight/max_brightness:4794
/sys/class/backlight/intel_backlight/actual_brightness:958
Comment 6 Chris Wilson 2015-11-14 16:05:49 UTC
In this case what you probably want to do is strace Xorg across the suspend and resume (and attach the log). Is your system using the xf86-video-intel-backlight-helper?
Comment 7 chrhei 2015-11-14 18:41:12 UTC
O.K., I brought my machine with "systemctl set-default multi-user.targe" to boot to console only. As a user I started "strace -o logfile.log startx" and the result is attached.
Oddly, after resume the display stays very bright for a couple of seconds and goes to normal. But the backlight stays on! It seems to me (just guessing) that the display manager maybe is causing the issues because in this test >lightdm< isn't started. But this is much about my knowledge. THX.
Comment 8 chrhei 2015-11-14 18:42:17 UTC
Created attachment 119663 [details]
Xorg strace - L540
Comment 9 MrHaroldA 2015-11-14 20:22:34 UTC
Is "bl_power:4" of any concern?
Comment 10 Chris Wilson 2015-11-14 20:35:42 UTC
Ok, if you strace startx, please pass -f to strace (i.e. strace -f -o x.strace startx)
Comment 11 chrhei 2015-11-14 22:48:45 UTC
Created attachment 119665 [details]
strace -f -o x.strace startx

I hope the new x.strace is useable but I needed to zip it, it's huge (37MB).
Comment 12 Chris Wilson 2015-11-15 13:39:00 UTC
You have a non-root ddx and so the ddx is using the backlight helper. The backlight helper doesn't set the power sysfs value, and that is being left off across suspend.
Comment 13 chrhei 2015-11-15 19:25:43 UTC
I've looked up DDX and sounds like rocket science to me. Something else I can do to support troubleshooting?
Comment 14 Jani Nikula 2015-11-16 08:15:29 UTC
Please add drm.debug=14 module parameter and attach dmesg from early boot to the suspend resume cycle reproducing the problem.
Comment 15 chrhei 2015-11-16 10:39:30 UTC
Created attachment 119700 [details]
drm.debug=14, dmesg before resume, L540

drm.debug=14, dmesg before resume, L540
Comment 16 chrhei 2015-11-16 10:40:05 UTC
Created attachment 119701 [details]
drm.debug=14, dmesg after resume, L540

drm.debug=14, dmesg after resume, L540
Comment 17 Jani Nikula 2015-11-16 12:26:43 UTC
After resume:

[   63.147738] [drm:intel_edp_backlight_on] 
[   63.147739] [drm:intel_panel_enable_backlight] pipe A
[   63.147742] [drm:intel_panel_actually_set_backlight] set backlight PWM = 1480

bl_power gets set to 0 at this point (that means "on").

And a bit later:

[   63.803210] [drm:intel_backlight_device_update_status] updating intel_backlight, brightness=1441/4794
[   63.803213] [drm:intel_panel_actually_set_backlight] set backlight PWM = 1480
[   63.803219] [drm:intel_edp_backlight_power] panel power control backlight disable

This is a request from userspace to set bl_power to 4 (that means "off"). It's not a kernel issue.
Comment 18 chrhei 2015-11-16 13:34:33 UTC
bug report for lightdm:
https://bugs.launchpad.net/lightdm/+bug/1516622
Comment 19 MrHaroldA 2015-11-16 19:22:54 UTC
Ok, so there's a bug filed against LightDM; but why is it only present with current revisions of the Intel display driver and not with the old one?
Comment 20 chrhei 2015-12-28 05:50:20 UTC
Issue was fixed on Arch with version xf86-video-intel1:2.99.917+519+g8229390-0.1 of the video driver in combination with latest kernel 4.3.3


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.