Bug 553822

Summary: Video mode not initialized correctly on intel 945 GM with external display.
Product: [openSUSE] openSUSE 11.2 Reporter: Schelte Bron <sbron>
Component: X.OrgAssignee: Forgotten User Wum0mkMcd8 <forgotten_Wum0mkMcd8>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <xorg-maintainer-bugs>
Severity: Normal    
Priority: P5 - None CC: sndirsch
Version: RC 2   
Target Milestone: ---   
Hardware: i686   
OS: openSUSE 11.2   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Xorg log file
SaX.log
Output of: hwinfo --gfxcard --monitor
Output of: xdpyinfo
Output of: xrandr
Picture showing the problem
Cloned multihead mode xorg.conf file
Xorg log with xorg.conf after removing Modeline lines
Xorg log file without xorg.conf with dell monitor
Output of xrandr without xorg.conf with dell monitor
Sax logfile with dell monitor
Xorg log file with xorg.conf and dell monitor
Output of xrandr with xorg.conf and dell monitor
Xorg configuration file created by sax2
Output of xrandr with VertRefresh 59-61
Xorg log file with VertRefres 59-61
Output of xrandr using vesa driver
Xorg log file using vesa driver

Description Schelte Bron 2009-11-09 15:14:26 UTC
Created attachment 326284 [details]
Xorg log file

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.4) Gecko/20091016 SUSE/3.5.4-1.1.2 Firefox/3.5.4

When I boot my laptop while it is sitting in its docking station with an external monitor connected, the display on the external monitor is correct until the login screen appears. At that time the monitor complains that the input is out of range and after a few seconds it goes to sleep. The problem remains when I login.

With some earlier SuSE version the situation could be remedied by using the i810 driver (I think) instead of the intel driver.

On OpenSuSE 11.1 the i810 driver was no longer available, so I added the command "xrandr --output VGA --auto" to .xinitrc, which would restore the correct video mode during login.

The xrandr work-around is no longer satisfactory on 11.2, because now the mouse pointer is invisible after I login. It can sometimes be revealed by running some xrandr --output LVDS --off or --auto commands. If that fails I switch to a text screen (Ctrl-Alt-F1) and back to graphics (Ctrl-Alt-F7) to get the cursor back.

Reproducible: Always

Steps to Reproduce:
1. Boot the PC, or restart X
2. Wait for the KDM login screen

Actual Results:  
Monitor briefly shows a distorted image (part of the login screen is visible in the top right-hand part of the screen) and indicates the input is out of range. After a few seconds the monitor goes to sleep.

Expected Results:  
Login screen should be displayed in 1280x1024 60Hz mode.
Comment 1 Schelte Bron 2009-11-09 15:17:24 UTC
Created attachment 326285 [details]
SaX.log

The problem happens both without any xorg.conf file and also when an xorg.conf file has been generated using the command: sax2 -r
Comment 2 Schelte Bron 2009-11-09 15:17:53 UTC
Created attachment 326286 [details]
Output of: hwinfo --gfxcard --monitor
Comment 3 Schelte Bron 2009-11-09 15:18:41 UTC
Created attachment 326287 [details]
Output of: xdpyinfo
Comment 4 Schelte Bron 2009-11-09 15:20:31 UTC
Created attachment 326290 [details]
Output of: xrandr

The attached file shows the result of the xrandr command *after* running "xrandr --output VGA --auto" to restore the display to a usable state.
Comment 5 Stefan Dirsch 2009-11-09 15:22:11 UTC
Sounds like another duplicate.

*** This bug has been marked as a duplicate of bug 544930 ***
Comment 6 Schelte Bron 2009-11-09 15:40:06 UTC
My bug report is intended to address a wrong initial video mode. Bug 544930 is related to an issue with a work-around I used to get things into a more usable state again. I therefor feel this is not a duplicate of 544930.
Comment 7 Stefan Dirsch 2009-11-09 16:04:33 UTC
(In reply to comment #2)
> Created an attachment (id=326286) [details]
> Output of: hwinfo --gfxcard --monitor

Looks like no monitor is detected via DDC. So you would need a rather tricky xorg.conf for a dualhead setup. But I think SaX2 can still create a xorg.conf
file for such a configuration. The idea is to create a clone mode configuration
in SaX2. Let me know if that works. And attach new /etc/X11/xorg.conf.
Comment 8 Schelte Bron 2009-11-09 16:08:48 UTC
Created attachment 326298 [details]
Picture showing the problem

The attached image shows how the login screen is displayed on the monitor. This only lasts a couple of seconds before the monitor gives up trying to display the input signal.
Comment 9 Stefan Dirsch 2009-11-09 16:14:36 UTC
In that case it might be sufficient to remove the ModeLine lines in your xorg.conf.
Comment 10 Schelte Bron 2009-11-09 16:27:41 UTC
Created attachment 326301 [details]
Cloned multihead mode xorg.conf file

Reran sax2 to create a cloned dualhead setup. Resulting xorg.conf file attached. The problem remains pretty much the same, although the resolution of the login screen could have changed to 1024x768 instead of 1280x1024. It's a bit hard to tell.
Comment 11 Schelte Bron 2009-11-09 16:33:35 UTC
Removed the ModeLine lines from xorg.conf with the same result.

Note: Originally the problem happened without any xorg.conf file at all.
Comment 12 Stefan Dirsch 2009-11-09 16:53:36 UTC
(In reply to comment #11)
> Removed the ModeLine lines from xorg.conf with the same result.
> 
> Note: Originally the problem happened without any xorg.conf file at all.

Could you attach /var/log/Xorg.0.log for this setup?
Comment 13 Schelte Bron 2009-11-10 08:22:31 UTC
Created attachment 326440 [details]
Xorg log with xorg.conf after removing Modeline lines
Comment 14 Stefan Dirsch 2009-11-10 09:24:08 UTC
(II) intel(0): Printing DDC gathered Modelines:
[...]
(II) intel(0): Modeline "1280x1024"x0.0  108.00  1280 1328 1440 1688  1024 1025 1028 1066 +hsync +vsync (64.0 kHz)
[...]
(II) intel(0): Output VGA using initial mode 1280x1024

So the monitor can't work reliably with the modeline it provides *itself* via DDC? This is weird and looks like a broken monitor. What you can try is using different modes. Use 'cvt 1280 1024' and 'cvt -r 1280 1024' to generate them. Play around with +-hsync and +-vsync. Maybe this helps. I can't help here any
further. I'm sorry.
Comment 15 Schelte Bron 2009-11-10 10:01:15 UTC
The output of the xrandr command (after logging in without correcting the video mode) does not support the conclusion that the selected mode is 1280x1024:

Screen 0: minimum 320 x 200, current 1024 x 768, maximum 2048 x 2048
VGA connected 1024x768+0+0 (normal left inverted right x axis y axis) 380mm x 300mm
   1280x1024      60.0 +   75.0     60.0
   1152x864       75.0
   1024x768       75.0     70.1     60.0
   832x624        74.6
   800x600        72.2     75.0     60.3
   640x480        75.0     72.8     59.9
   720x400        70.1
   1024x768_60    59.9*
LVDS connected 1024x768+0+0 (normal left inverted right x axis y axis) 285mm x 214mm
   1024x768       60.0*+   50.0
   800x600        60.3     56.2
   640x480        59.9
TMDS-1 disconnected (normal left inverted right x axis y axis)
Comment 16 Stefan Dirsch 2009-11-10 10:14:36 UTC
It's in the list of available modes. Try to switch to it by running

  xrandr --output VGA --mode 1280x1024

Looks like what's happening is that in mirror mode X tries to use the biggest available resolution available for *both* monitors, which is 1024x768 in that case. For the external monitor it uses a mode with 75Hz, which might be too much for your TFT monitor. But why? It claims to support a range of "43-77" Hz. I suggest to change that in xorg.conf to 59-61 and try again, so a different 1024x768 mode using 60Hz is selected.

There appears to be another lie in the logfile 

  (II) intel(0): Output VGA using initial mode 1280x1024

Obviously this is wrong.
Comment 17 Schelte Bron 2009-11-10 13:06:43 UTC
I can switch to 1280x1024 and that gives the correct display (same as when I run xrandr --output VGA --auto). With the distorted display, the monitor claims the input is H=47.6kHz V=60Hz, so again not what the logfile indicates.

As the suspicion was a broken monitor, I borrowed another monitor (Dell 1905FP). Although this monitor is capable of showing the login screen, it is not at the preferred resolution of 1280x1024 either. The monitor reports it is 1280x768 60Hz, contrary to what xrandr reports (1024x768_60).

The same figures were reported by the monitor with or without the attached xorg.conf file.

With the dell monitor I could briefly see a graphics screen with a watch cursor before the login screen appears. I have the strong impression that this intermediate screen is displayed at the correct resolution. Does kdm have some configuration settings that perhaps override the auto detected modes?
Comment 18 Schelte Bron 2009-11-10 13:07:48 UTC
Created attachment 326578 [details]
Xorg log file without xorg.conf with dell monitor
Comment 19 Schelte Bron 2009-11-10 13:08:35 UTC
Created attachment 326579 [details]
Output of xrandr without xorg.conf with dell monitor
Comment 20 Schelte Bron 2009-11-10 13:09:14 UTC
Created attachment 326580 [details]
Sax logfile with dell monitor
Comment 21 Schelte Bron 2009-11-10 13:10:01 UTC
Created attachment 326581 [details]
Xorg log file with xorg.conf and dell monitor
Comment 22 Schelte Bron 2009-11-10 13:10:40 UTC
Created attachment 326582 [details]
Output of xrandr with xorg.conf and dell monitor
Comment 23 Schelte Bron 2009-11-10 13:11:07 UTC
Created attachment 326583 [details]
Xorg configuration file created by sax2
Comment 24 Stefan Dirsch 2009-11-10 19:39:54 UTC
(In reply to comment #17)
> I can switch to 1280x1024 and that gives the correct display (same as when I
> run xrandr --output VGA --auto). With the distorted display, the monitor 
> claim the input is H=47.6kHz V=60Hz, so again not what the logfile indicates.

I can find various modes for 1024x768 in the logfile using 50, 60, 70 and 75 Hz. According to xrandr the one for 75Hz is used. I wouldn't trust what the monitor itself displays via the OSD. But why don't you limit it to 60 Hz as I suggested before?
 
> As the suspicion was a broken monitor, I borrowed another monitor (Dell
> 1905FP). Although this monitor is capable of showing the login screen, it is
> not at the preferred resolution of 1280x1024 either. 

I already explained above (comment #16) why this isn't done in mirror mode.

> The monitor reports it is 1280x768 60Hz, contrary to what xrandr reports 
> (1024x768_60).

I wouldn't trust the OSD of this monitor either.

> The same figures were reported by the monitor with or without the attached
> xorg.conf file.

As already mentioned above. Limit the range for vertical frequency to 60 Hz.

> With the dell monitor I could briefly see a graphics screen with a watch 
> cursor before the login screen appears. I have the strong impression that this
> intermediate screen is displayed at the correct resolution. 

Sounds like wild guessing.

> Does kdm have some configuration settings that perhaps override the auto 
> detected modes?

I don't know. I'm not an KDE expert.
Comment 25 Stefan Dirsch 2009-11-10 19:42:57 UTC
Conclusion: Hardcode your VertRefresh value in xorg.conf to "59-61".
Comment 26 Schelte Bron 2009-11-10 19:51:29 UTC
Sorry. I forgot to mention that I tried that and it made no noticeable difference.
Comment 27 Stefan Dirsch 2009-11-10 20:13:52 UTC
Sorry, can't believe that. I would like to see log file and the output of xrandr for that.
Comment 28 Schelte Bron 2009-11-10 20:57:07 UTC
I will collect the logs for the 59-61 case tomorrow.

One more thing I'm not sure you are aware of: The graphical screens that are being displayed during the boot process show up perfectly.

Also, when I had this problem before with SuSE 11.1 I think I tried the vesa driver. As I remember that also fixed this problem. Would it be helpful to try that setup again?
Comment 29 Stefan Dirsch 2009-11-10 22:20:47 UTC
(In reply to comment #28)
> I will collect the logs for the 59-61 case tomorrow.

Thanks.

> One more thing I'm not sure you are aware of: The graphical screens that are
> being displayed during the boot process show up perfectly.

This is the kernel framebuffer + splash screen. Unrelated to X.Org (driver).

> Also, when I had this problem before with SuSE 11.1 I think I tried the vesa
> driver. As I remember that also fixed this problem. Would it be helpful to try
> that setup again?

The vesa driver is rather slow - compared to the intel driver with 2D/3D support.
I don't think you want to use vesa if you can avoid it.
Comment 30 Schelte Bron 2009-11-11 08:54:00 UTC
I didn't mean to actually use the vesa driver for day to day use. I just thought it might provide some helpful data for locating the source of the problem.

Anyway, I tested the vesa driver and I get a perfect login screen. Although I have to admit that after logging in the screen was way too dark to work with. But all the way through the monitor was happy about the input signal (reported as 1280x1024@60Hz).

Apparently the vesa driver has no problem with the different resolutions of the built-in screen and the external monitor. So my conclusion is that this is a problem in the intel driver.
Comment 31 Schelte Bron 2009-11-11 08:56:17 UTC
Created attachment 326743 [details]
Output of xrandr with VertRefresh 59-61
Comment 32 Schelte Bron 2009-11-11 08:57:33 UTC
Created attachment 326744 [details]
Xorg log file with VertRefres 59-61

I also tried without the Modeline lines with no visible effect.
Comment 33 Schelte Bron 2009-11-11 08:58:15 UTC
Created attachment 326745 [details]
Output of xrandr using vesa driver
Comment 34 Schelte Bron 2009-11-11 08:58:44 UTC
Created attachment 326746 [details]
Xorg log file using vesa driver
Comment 35 Stefan Dirsch 2009-11-11 09:08:07 UTC
(In reply to comment #31)
> Created an attachment (id=326743) [details]
> Output of xrandr with VertRefresh 59-61

Looks much better! All resolutions use 60Hz now. 1280 marked as native resolution (+) and 1024x768 marked as the current resolution (for the reasons given above).

(In reply to comment #33)
> Created an attachment (id=326745) [details]
> Output of xrandr using vesa driver

This might give you the native resolution by default on the external screen. But
since vesa driver cannot support RANDR 1.2 I seriously doubt that you get also
the native resolution on the LCD panel, if anything at all.
Comment 36 Stefan Dirsch 2009-11-11 09:09:59 UTC
Why don't you configure your external monitor in KDE with a resolution of 1280x1024, so everything is fine after login?
Comment 37 Schelte Bron 2009-11-11 10:14:39 UTC
(In reply to comment #35)
> But since vesa driver cannot support RANDR 1.2 I seriously doubt that you get
> also the native resolution on the LCD panel, if anything at all.

I am not really interested in using both screens at the same time. But when the laptop is in its docking station I want to use the 1280x1024 on the external screen. Also, I just wanted to use the vesa driver as a data point to prove the problem is in the intel driver.

(In reply to comment #36)
> Why don't you configure your external monitor in KDE with a resolution of
> 1280x1024, so everything is fine after login?

As I indicated in the initial description, that is the work-around I have been using. But it is a work around. The misbehaving login screen keeps me from doing things like selecting the session type (not to mention the criticism I get from win users when they see the login screen). So, when I found that the problem still had not been fixed in 11.2 I decided to report the bug.

But I respect your opinion that the bug isn't worth fixing and I'll continue to use the work-around. Thank you for your assistance.
Comment 38 Stefan Dirsch 2009-11-11 10:28:25 UTC
Then it's basically the same issue as in Bug #537488. Closing as duplicate.

*** This bug has been marked as a duplicate of bug 537488 ***
Comment 39 Schelte Bron 2010-03-28 13:41:48 UTC
(In reply to comment #38)
I have recently replaced the hard disk in my laptop and reinstalled OpenSuSE 11.2 from scratch (the previous setup was the result from upgrading several times from earlier SuSE versions). I'm happy to report that the problem has cleared since this action. Also the cursor is no longer initially invisible after logging in.

I think the conclusion has to be that there was some setting left behind from some earlier version somewhere that caused the problem. Unfortunately I have no idea which setting. But since it is working now on the same hardware (other than the hard disk), it obviously wasn't a hardware problem.