Bug 19555

Summary: [KMS] Getting out of DPMS doesn't work
Product: DRI Reporter: Bernhard Rosenkraenzer <bero>
Component: DRM/otherAssignee: Jesse Barnes <jbarnes>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium Keywords: NEEDINFO
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Bernhard Rosenkraenzer 2009-01-14 06:16:31 UTC
On a Compaq Presario CQ70 notebook (graphics chip 8086:2a42, LVDS only, no external displays connected), when the screen was blanked using DPMS, getting back into X doesn't work.

Trying to get it out of DPMS shows a text mode screen and the error messages

pci 0000:00:02.0: DVI-D-2: no EDID data
pci 0000:00:02.0: DVI-D-2: no EDID data
pci 0000:00:02.0: DVI-D-2: no EDID data
pci 0000:00:02.0: DVI-D-2: no EDID data
[drm:i915_get_vblank_counter] *ERROR* trying to get vblank count for disabled pipe 0


You do get back into X by switching to a text mode tty and back (Ctrl+Alt+F1, Alt+F7) at that point.

This extra step isn't necessary without kernel modesetting.
Comment 1 Jesse Barnes 2009-01-15 09:46:19 UTC
This may be due to the fact that when KMS is enabled the 2D driver uses KD_TEXT mode (this is good for debugging but maybe not for normal use).  Can you try this patch?

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 3e27b07..d368d3d 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1228,7 +1228,6 @@ i830SetHotkeyControl(ScrnInfoPtr pScrn, int mode)
  * DRM mode setting Linux only at this point... later on we could
  * add a wrapper here.
  */
-#include <linux/kd.h>

 static Bool i830_kernel_mode_enabled(ScrnInfoPtr pScrn)
 {
@@ -1254,8 +1253,6 @@ static Bool i830_kernel_mode_enabled(ScrnInfoPtr pScrn)
     if (ret)
        return FALSE;

-    ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT);
-
     return TRUE;
 }
 #else
Comment 2 Jesse Barnes 2009-01-26 10:30:31 UTC
This fixed in the upstream xf86-video-intel driver by

commit 253b8db298f38676e47dc902534465054f7b58b8
Author: Jesse Barnes <jbarnes@virtuousgeek.org>
Date:   Wed Jan 21 09:02:13 2009 -0800

    Don't run in KD_TEXT mode even with KMS

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.