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.
Created attachment 311184 [details] Log when the display works as expected
Created attachment 311185 [details] Log when the display goes blank
Created attachment 311186 [details] lspci
Created attachment 311187 [details] dmidecode
Created attachment 311189 [details] xorg.conf
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
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.
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)
Patches accepted upstream.
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
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
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
Created attachment 315563 [details] Change the order of disables This patch is for 2.2.1 (RHEL5)
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
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)
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.
Devel ack, patch looks good and is already merged upstream.
Built xorg-x11-drv-i810-1.6.5-9.17.el5 with those two patches included. MODIFIED.
~~ 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.
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