Bug 16484 - Backlight stays disabled after resume
Summary: Backlight stays disabled after resume
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Video(DRI - Intel) (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_video-dri-intel@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-30 13:13 UTC by Zdenek Kabelac
Modified: 2010-12-16 14:56 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.35-rc6
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Kernel config options (86.03 KB, text/plain)
2010-07-30 13:45 UTC, Zdenek Kabelac
Details
kernel dmesg (69.00 KB, text/plain)
2010-07-30 13:47 UTC, Zdenek Kabelac
Details
intel_reg_dump with disable backlight after resume (10.37 KB, text/plain)
2010-07-30 13:49 UTC, Zdenek Kabelac
Details

Description Zdenek Kabelac 2010-07-30 13:13:59 UTC
Hi

I've been occasionally noticing that after suspend/resume my machine has been left with black screen and only white background was slightly visible. I've searched Internet and found few interesting bugzillas - this one seems to be closest:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/598645


My machine is T61/C2D/4GB - with Intel graphics - when I do suspend and close lid before the machine suspend - then the resume has high probability it will give me screen with disabled background.

When I do some tests - it seems that within 10 suspend/resume cycles there is 100% chance the screen will remain 'black' (though machine normally works)

My idea here is - that while some Intel registers are saved before machine goes to suspend - closing lid disabled backlight - and registers are saved with disabled backlight - and restored somehow incorrectly.

I've made another experiment - I've tried to resume with lid 'closed' (just slightly opened to be able to press 'Fn' key to trigger resume wakeup) - and I've not been able to get black screen this way (though I'm not saying it's 100% working).

So in my case - workaround is - to not close lid while suspend is in progress and just wait till the laptop is actually suspend. 

But still I'd like to see this properly fixed in kernel driver.
I'm experiencing this problem for quite some time - but until today never tried to check for the real problem (as it doesn't happen all that often - as I usually do not close lid before suspend :))

I'll attach dump of Intel registers - but they do not seems to show the reason why the backlight is off.

Also I've tried various ideas from:

http://www.thinkwiki.org/wiki/Problem_with_display_remaining_black_after_resume

or
https://fedoraproject.org/wiki/Common_F12_bugs#Display_cannot_be_reactivated_if_it_enters_sleep_mode_with_laptop_lid_closed

but I've never  been able to restore backlight until next reboot - so nothing with xrandr helped with restoring backlight.
Comment 1 Zdenek Kabelac 2010-07-30 13:45:47 UTC
Created attachment 27299 [details]
Kernel config options
Comment 2 Zdenek Kabelac 2010-07-30 13:47:37 UTC
Created attachment 27300 [details]
kernel dmesg
Comment 3 Zdenek Kabelac 2010-07-30 13:49:28 UTC
Created attachment 27301 [details]
intel_reg_dump with disable backlight after resume
Comment 4 Zdenek Kabelac 2010-11-07 19:38:54 UTC
As additional information for this report - it looks like disabling  drm_kms_helper polling thread it fixes also this problem.

So I think it is related to bug 19052  (see my comment 3).
(Eventually RHBZ https://bugzilla.redhat.com/show_bug.cgi?id=617809)

There is probably something wrong with this thread and it's hardware access. Via google it also seems to be actually causing mostly problem to Radeon - but in my case - Intel driver is affected as well.

My current kernel is vanilla 2.6.36 - and with options drm_kms_helper poll=0
suspend and resume seems to work much more reliable - it's not "black" roulette any more.... :)
Comment 5 Chris Wilson 2010-12-16 14:56:41 UTC
This works on my t61, so I presume is related to the:

commit c5027dec02c96964847fa68d512318ee5f6f7a19
Author: Keith Packard <keithp@keithp.com>
Date:   Fri Nov 26 10:45:59 2010 -0800

    drm: record monitor status in output_poll_execute
    
    In order to correctly report monitor connected status changes, the
    previous monitor status must be recorded in the connector->status
    value instead of being discarded.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>


commit bf9dc102e284a5aa78c73fc9d72e11d5ccd8669f
Author: Keith Packard <keithp@keithp.com>
Date:   Fri Nov 26 10:45:58 2010 -0800

    drm: Set connector DPMS status to ON in drm_crtc_helper_set_config
    
    When setting a new crtc configuration, force the DPMS state of all
    connectors to ON. Otherwise, they'll be left at OFF and a future mode set
    that disables the specified connector will not turn the connector off.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

and related userspace fixes.

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