Bug 454305 - Blank screen using "intel" xorg driver with i845G when switching resolution
Blank screen using "intel" xorg driver with i845G when switching resolution
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xorg-x11-drv-i810 (Show other bugs)
5.1
All Linux
high Severity high
: rc
: ---
Assigned To: Adam Jackson
desktop-bugs@redhat.com
: OtherQA
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-07-07 12:18 EDT by Olivier Fourdan
Modified: 2013-03-03 21:47 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-20 16:27:53 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Log when the display works as expected (85.71 KB, text/plain)
2008-07-07 12:20 EDT, Olivier Fourdan
no flags Details
Log when the display goes blank (85.99 KB, text/plain)
2008-07-07 12:21 EDT, Olivier Fourdan
no flags Details
lspci (6.61 KB, text/plain)
2008-07-07 12:22 EDT, Olivier Fourdan
no flags Details
dmidecode (14.92 KB, text/plain)
2008-07-07 12:22 EDT, Olivier Fourdan
no flags Details
xorg.conf (597 bytes, text/plain)
2008-07-07 12:23 EDT, Olivier Fourdan
no flags Details
Add quirk_pipea_force quick for i855GM and i845 (622 bytes, patch)
2008-08-11 07:43 EDT, Olivier Fourdan
no flags Details | Diff
Disable VGA plane even if QUIRK_PIPEA_FORCE is set (2.33 KB, patch)
2008-08-11 07:46 EDT, Olivier Fourdan
no flags Details | Diff
Add quirk_pipea_force quick for i845 (patch for 2.4.0) (482 bytes, patch)
2008-08-11 07:47 EDT, Olivier Fourdan
no flags Details | Diff
Change the order of disables (2.29 KB, patch)
2008-09-02 11:23 EDT, Olivier Fourdan
no flags Details | Diff
Add quirk_pipea_force quick for i855GM and i845 (intel-2.2.1) (1.00 KB, patch)
2008-09-02 11:25 EDT, Olivier Fourdan
no flags Details | Diff
Change the order of disables (patch for intel-2.4.1) (2.29 KB, patch)
2008-09-02 11:27 EDT, Olivier Fourdan
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
FreeDesktop.org 17756 None None None Never

  None (edit)
Description Olivier Fourdan 2008-07-07 12:18:01 EDT
Description of problem:

Using the "intel" driver with a i845G chipset on RHEL 5.1, when the user logs in
 with a non-native resolution is set in gnome-display-properties, the screen
goes blank at times (this does not happen all the times, just 3 out of 13 times
according to the customer).

The display itself is not in stand by but it seems that the backlight is off.
Switching to a display console works, but the display is still black when
switching back in X.

Version-Release number of selected component (if applicable):

xorg-x11-drv-i810-1.6.5-9.13.el5
kernel 2.6.18-78.el5

How reproducible:

The issue occurs approximately 25% of the times (3 out of 13 tests, according to
the customer).

Steps to Reproduce:

1. Set a non native resolution in gnome-display-properties, e.g. 1024x768
instead of 1280x1024
2. Display works in gdm with resolution set to its default 1280x1024
3. Log in, the resolution switches to the 1024x768 and the display goes black
  
Actual results:

The display is black, no image is visible on the monitor.

Expected results:

The resolution changes and the display remains visible.

Additional info:

Logs were captured when the issue was occurring (Xorg.0.log-c308784-fault) and
when the display is fine (Xorg.0.log-c308784-ok), but there is very few
difference and no error is visible in the log.

Currently trying to gather more information about the harware. Meanwhile, lspci
and dmidecode are attached.
Comment 1 Olivier Fourdan 2008-07-07 12:20:50 EDT
Created attachment 311184 [details]
Log when the display works as expected
Comment 2 Olivier Fourdan 2008-07-07 12:21:48 EDT
Created attachment 311185 [details]
Log when the display goes blank
Comment 3 Olivier Fourdan 2008-07-07 12:22:14 EDT
Created attachment 311186 [details]
lspci
Comment 4 Olivier Fourdan 2008-07-07 12:22:31 EDT
Created attachment 311187 [details]
dmidecode
Comment 5 Olivier Fourdan 2008-07-07 12:23:05 EDT
Created attachment 311189 [details]
xorg.conf
Comment 9 Olivier Fourdan 2008-08-11 07:43:13 EDT
Created attachment 313951 [details]
Add quirk_pipea_force quick for i855GM and i845

The entry for i855GM is from version 2.4.0 of the intel driver
Comment 10 Olivier Fourdan 2008-08-11 07:46:20 EDT
Created attachment 313952 [details]
Disable VGA plane even if QUIRK_PIPEA_FORCE is set

This patch applies on 2.2.1, 2.3.x and 2.4.0.
Comment 11 Olivier Fourdan 2008-08-11 07:47:46 EDT
Created attachment 313953 [details]
Add quirk_pipea_force quick for i845 (patch for 2.4.0)

This patch is for 2.4.0 (only added for the record)
Comment 12 Adam Jackson 2008-08-11 12:12:28 EDT
Patches accepted upstream.
Comment 13 Issue Tracker 2008-09-01 13:27:34 EDT
There was a few problems in the previous patches and test packages:

1) Driver 2.2.x did not support "any" as a system vendor (SUBSYS_ANY) so
that the quirks added previously were ignored in the particular version of
the driver we ship in RHEL5.

2) A logical bug was introduced (fixed upstream by Jesse Barnes with git
commit 22918f62c89a4314fb5d01c58f22fee5b9a15a27).

3) And the previous patch did not go far enough by just disabling VGA
plane, we need to disable display plane also otherwise the display may
remain black when the X server starts at first (ie the patch did fix the
problem with xrandr but,  by doing repeated X server restarts, I could
reproduce the problem the customer has reported whith the test package).

I have updated the patches (for both intel 2.2.1 for RHEL5 and the latest
2.4.1) and built a test package, I plan to leave it running all night long
to make sure if I did not introduce any regression over the previous fix
and, if it's ok, I'll upload the test package to IT and the patches to
BZ)

Olivier.
  


This event sent from IssueTracker by ofourdan 
 issue 188981
Comment 14 Issue Tracker 2008-09-02 03:57:51 EDT
Unfortunately, the tests show that disabling the display plane reintroduces
the initial issue with xrandr...

So the problem seems to be caused by this portion of code (i830_display.c,
i830_crtc_dpms(), case DPMSModeOff):

        [...]

        /* Disable display plane */
        temp = INREG(dspcntr_reg);
        if ((temp & DISPLAY_PLANE_ENABLE) != 0)
        {
            OUTREG(dspcntr_reg, temp & ~DISPLAY_PLANE_ENABLE);
            /* Flush the plane changes */
            OUTREG(dspbase_reg, INREG(dspbase_reg));
            POSTING_READ(dspbase_reg);
        }

        if (!IS_I9XX(pI830)) {
            /* Wait for vblank for the disable to take effect */
            i830WaitForVblank(pScrn);
        }

        [...]

- If this is executed every time, startup is fine but we get a black
screen sometimes with xrandr (this is original case)

- If this is not executed, xrandr works fine but we get a black screen
sometimes at startup (this is the patch)

Olivier.


This event sent from IssueTracker by ofourdan 
 issue 188981
Comment 15 Issue Tracker 2008-09-02 11:16:19 EDT
I do not have the PRM for the i830, but the Intel 965 Programmer’s
Reference Manual, volume 3, is available from Intel website.

Obviously, it is not the same hardware, but reading the code of the
driver, the i830 and the i965 seem have quite a lot in common, so I'll do
a rough extrapolation and try to use that documentation.

In chapter 2.2.2 "Mode Switch Programming Sequence", page 32 of the PDF,
it says the disable sequence prior to do a mode switch should be (among
other things):

 - Disable planes (VGA or hires)
 - Disable pipe
 - Disable VGA display in 0x71400 bit 31

This is not what seems to be done in i830_display.c, i830_crtc_dpms():

 - Disable VGA display
 - Disable planes
 - Disable pipe

Since this functions is called before a mode switch with DPMSModeOff, I
guess the sequence should be as documented. Additionally, I'd add a call
to i830WaitForVblank() because the documentation says we should also wait
for the pipe to be turned off (we cannot really check the status of the
pipe as documented in the PRM because we don't turn it off when
QUIRK_PIPEA_FORCE is set, so we just wait for a vblank like do do
elsewhere in the code).

I made a patch for 2.2.1 and another one for 2.4.1. Initial testing of
this approach seem encouraging, I have not encountered any black screen
for a while. As before, I'll let it run all night long and if it's fine,
I'll upload my patches and prepare a test package for the customer.

Olivier.



This event sent from IssueTracker by ofourdan 
 issue 188981
Comment 16 Olivier Fourdan 2008-09-02 11:23:10 EDT
Created attachment 315563 [details]
Change the order of disables

This patch is for 2.2.1 (RHEL5)
Comment 17 Olivier Fourdan 2008-09-02 11:25:29 EDT
Created attachment 315564 [details]
Add quirk_pipea_force quick for i855GM and i845 (intel-2.2.1)

This patch is for 2.2.1 (RHEL5) - Previous patch did not implement "any" as a system vendor (SUBSYS_ANY) so that teh quirk was ignored in 2.2.1
Comment 18 Olivier Fourdan 2008-09-02 11:27:57 EDT
Created attachment 315565 [details]
Change the order of disables (patch for intel-2.4.1)

This patch applies to intel-2.4.1 (latest released from upstream)
Comment 19 Olivier Fourdan 2008-09-03 03:34:12 EDT
Good news, I've been running a test for the last 12 hours, changing the resolution every second and there've been no black screen. 

I cannot reproduce the random black screen at startup either, so this looks pretty good so far.

Olivier.
Comment 22 Adam Jackson 2008-10-03 10:55:39 EDT
Devel ack, patch looks good and is already merged upstream.
Comment 34 Adam Jackson 2008-10-15 11:12:48 EDT
Built xorg-x11-drv-i810-1.6.5-9.17.el5 with those two patches included.  MODIFIED.
Comment 39 Chris Ward 2008-11-28 02:02:02 EST
~~ Attention ~~ We Need Testing Feedback Soon ~~

We're nearing the end of the Red Hat Enterprise Linux 5.3 Testing Phase and this bug has not yet been VERIFIED. This bug should be fixed in the latest RHEL53 Beta Snapshot. It is critical that we receive your feedback ASAP. Otherwise, this bug is at risk of being dropped from the release. 

If you encounter any new issues, CLONE this bug and describe the new issues you are facing. We are no longer excepting NEW bugs into the release, bar critical regressions and blocker issues.

If you have VERIFIED this fix, add CustomerVerified to the Bugzilla Keywords, along with a description of the test results.
Comment 43 errata-xmlrpc 2009-01-20 16:27:53 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-0160.html

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