Bug 73181

Summary: Screen doesn't turn on after DPMS standby and subseqent suspend
Product: xorg Reporter: Alexander Mezin <mezin.alexander>
Component: Driver/intelAssignee: Chris Wilson <chris>
Status: RESOLVED FIXED QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: normal    
Priority: medium CC: andyrtr, rdieter
Version: 7.7 (2012.06)   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
info when backlight is on
none
info when backlight is off
none
Xorg.0.log with UXA
none
Possible fix none

Description Alexander Mezin 2013-12-31 05:35:36 UTC
After 
$ xset dpms force standby && xset dpms force suspend
screen turns off and doesn't turn on back when I move mouse or press keys

Arch Linux, X.org server 1.14.5, Intel driver
The same happens also on Debian Sid
Comment 1 Alexander Mezin 2013-12-31 05:52:53 UTC
Some details:
It happens on laptop HP Pavilion dv6-6179er
Kernel command line includes "acpi_backlight=vendor"
Setting backlight level to 0 also turns off the screen
Comment 2 Jani Nikula 2013-12-31 13:26:41 UTC
(In reply to comment #0)
> After 
> $ xset dpms force standby && xset dpms force suspend

Are both of those actually required to reproduce? The kernel driver basically maps both of those to dpms off.

> screen turns off and doesn't turn on back when I move mouse or press keys

And what about xset dpms force on?
Comment 3 Alexander Mezin 2013-12-31 13:39:37 UTC
Only suspend, only standby or only "force off" works fine - screen turns on after short delay

"xset dpms force on" doesn't help

I only can get backlight back by pressing "increase brightness" key multiple times. It starts increasing from 0.
Comment 4 Chris Wilson 2013-12-31 13:47:24 UTC
What does xrandr --verbose report before/after the blank screen? And cat /sys/class/backlight/*/*

After your wiggle your mouse can you see anything on the screen at all? (shine a light on it and look at an oblique angle.) That will help us figure out if it is just the backlight that is failing to be controlled.
Comment 5 Alexander Mezin 2013-12-31 14:20:05 UTC
Created attachment 91367 [details]
info when backlight is on

xrandr --verbose, cat /sys/class/backlight/*/* when backlight is on
Comment 6 Alexander Mezin 2013-12-31 14:23:31 UTC
Created attachment 91368 [details]
info when backlight is off

xrandr --verbose, cat /sys/class/backlight/*/*
after xset dpms force standby && xset dpms force suspend
Comment 7 Alexander Mezin 2013-12-31 14:26:48 UTC
Just after dpms standby && dpms suspend screen is completely black.
After I moved mouse it isn't blank, just without backlight.
Comment 8 Chris Wilson 2013-12-31 14:40:53 UTC
And your Xorg.0.log?
Comment 9 Chris Wilson 2013-12-31 14:42:58 UTC
Note that there is a fix in 2.99.905 for backlight being set to zero if queried (via xrandr) whilst the screen is off.
Comment 10 Alexander Mezin 2014-01-01 02:20:39 UTC
Tried 2.99.907 - this problem is fixed in it, but only for sna. Could you backport it to uxa too?
Comment 11 Alexander Mezin 2014-01-04 14:17:55 UTC
Created attachment 91484 [details]
Xorg.0.log with UXA
Comment 12 Alexander Mezin 2014-01-04 14:35:21 UTC
Created attachment 91485 [details] [review]
Possible fix

Looks like I've fixed it for UXA by myself
Comment 13 Alexander Mezin 2014-01-04 14:52:46 UTC
Also, maybe in sna_output_dpms "dpms" should be compared with DPMSModeOn instead of DPMSModeOff. I think standby and suspend should be handled in the same way as off. At least, backlight didn't turn on until I changed it in uxa.
Comment 14 Chris Wilson 2014-01-06 14:44:28 UTC
commit 82fa7ec352426c7e3d5210aac8ea1030232cc0f3
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Jan 6 14:30:56 2014 +0000

    uxa: Always treat DPMSModeSuspend/Standby similar to DPMSModeOff
    
    As we assume that Suspend, Standby alias to Off and disable the crtc
    when switching to any mode other than On, we need to also perform the
    backlight updates for Suspend,Standby prior to passing the DPMS value
    onto the kernel.
    
    Suggested-by: Alexander Monakov <amonakov@gmail.com>
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

commit 28a057105b6974803aee0d68c2a71f322095dfde
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Jan 6 14:37:09 2014 +0000

    uxa: Disable updating properties upon reading their values
    
    Backport commit e76b08cad2770015346fd4cd757de3bb3b6ff37c
    Author: Chris Wilson <chris@chris-wilson.co.uk>
    Date:   Tue Oct 15 12:46:09 2013 +0100
    
        sna: Disable updating properties upon reading their values
    
    in order to prevent random screen blanking upon return from DPMS.
    
    Reported-by: Alexander Monakov <amonakov@gmail.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73181
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

commit 0138b38dfcd933d080f86cfd33664eeb3f5558a0
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Jan 6 14:30:56 2014 +0000

    sna: Always treat DPMSModeSuspend/Standby similar to DPMSModeOff
    
    As we assume that Suspend, Standby alias to Off and disable the crtc
    when switching to any mode other than On, we need to also perform the
    backlight updates for Suspend,Standby prior to passing the DPMS value
    onto the kernel.
    
    Suggested-by: Alexander Monakov <amonakov@gmail.com>
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Comment 15 Alexander Mezin 2014-01-07 02:48:19 UTC
Everything is fine except Suggested-by :)) I don't insist on correcting this. Next time I must not be lazy and should send properly formatted patches to mailing list instead...
Comment 16 Chris Wilson 2014-01-07 09:48:57 UTC
Meh, you got suggested-by on the uxa since it was just a cut'n'paste...

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.