Bug 103376

Summary: DPMS fails to turn on after hibernate on Lenovo X230
Product: DRI Reporter: Pedro Ribeiro <pedrib>
Component: DRM/IntelAssignee: Intel GFX Bugs mailing list <intel-gfx-bugs>
Status: CLOSED DUPLICATE QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: normal    
Priority: medium CC: intel-gfx-bugs
Version: XOrg git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard: ReadyForDev
i915 platform: IVB i915 features: display/LVDS, power/suspend-resume
Attachments:
Description Flags
dmesg output of a dpms+hibernate followed by a resume with a dead screen none

Description Pedro Ribeiro 2017-10-20 17:01:56 UTC
If I hibernate my Lenovo X230 after turning off the monitor via DPMS, once I resume from hibernation, the screen doesn't turn on any more. It's not a system crash, as I can use the keys, mute the sound, etc, but the image just doesn't come up.

I've been chasing this bug for over 2 years, but I finally found a way to trigger it reliably. Simply open two terminals in X (or use screen) and in the first one as root enter:
sleep 30 && echo shutdown > /sys/power/disk

Then enter in the second terminal:
xset dpms force off

Wait 30 seconds, and the system will hibernate. Push the power button and start the system again. Once resume is complete, the monitor will come up. This is 100% reliable, happens all the time at least with the following kernels:

- 4.9.56
- 4.12.13

This is on my Lenovo X230 with the latest BIOS, I'm not sure if it's reproducible with another computer. 

Please let me know what you need in order to debug this!
Comment 1 Pedro Ribeiro 2017-10-20 17:06:10 UTC
X.Org X Server 1.19.2
Xorg driver: xserver-xorg-video-intel 2.99.917+git20161206-1
Debian 9.2 (stable) with some Debian Testing packages

Forgot to say that this happens with the internal LVDS monitor, a 1366x768 IPS panel.
Comment 2 Chris Wilson 2017-10-20 22:40:05 UTC
Check the screen brightness, I suspect it may be zero on resume. Starting point for logs would be drm.debug=0xe across the dpms+hibernate.
Comment 3 Pedro Ribeiro 2017-10-21 03:15:10 UTC
Created attachment 134965 [details]
dmesg output of a dpms+hibernate followed by a resume with a dead screen

I've confirmed it's not the screen brightness. Here is the dmesg output of a dpms+hibernate followed by a resume with a dead screen. It's a bit cut off before the 2 second mark, but hopefully that doesn't matter as the full DRM / i915 output can be seen.
Comment 4 Ville Syrjala 2017-10-24 14:25:04 UTC
[   70.749457] [drm:ilk_validate_wm_level.part.22 [i915]] Sprite WM0 too large 56 (max 0)
[   70.749488] [drm:ilk_validate_pipe_wm [i915]] LP0 watermark invalid

These patches might help:
https://patchwork.freedesktop.org/series/32301/
Comment 5 Pedro Ribeiro 2017-10-25 13:01:54 UTC
Awesome, that does fix the problem in drm-tip.

Are these patches portable to 4.9 stable? I've tried applying but had a few fails. It would be useful to have them there are these old computers are more likely to be using older kernels.
Comment 6 Maarten Lankhorst 2017-10-25 13:15:44 UTC
Marking as a dup then. :)

*** This bug has been marked as a duplicate of bug 102373 ***
Comment 7 Pedro Ribeiro 2017-10-25 13:18:10 UTC
Thanks!
Comment 8 Maarten Lankhorst 2017-10-25 13:21:11 UTC
BTW for a backport to v4.9:

https://cgit.freedesktop.org/~mlankhorst/linux/log/?h=v4.9
Comment 9 Pedro Ribeiro 2017-10-25 15:08:23 UTC
Works perfectly in 4.9.58, bug squashed.

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.