Bug 16952

Summary: Doublescan modes preferred and invalid
Product: xorg Reporter: Pekka Paalanen <ppaalanen>
Component: Server/GeneralAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: skliarie
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
X log
none
X log with ModeDebug
none
xorg.conf none

Description Pekka Paalanen 2008-08-01 14:21:03 UTC
Created attachment 18068 [details]
X log

I'm not sure when, but I recently found that X is generating a lot of bad modes. This is xrandr output:

Screen 0: minimum 320 x 200, current 1280 x 1024, maximum 1400 x 1400
VGA-0 connected 1280x1024+0+0 (normal left inverted right x axis y axis) 338mm x 270mm
   1280x1024      60.0*+   75.0     60.0* 
   1400x1050      60.0  
   1280x960       60.0  
   1152x864       75.0  
   1024x768       85.0     75.0     70.1     60.0  
   832x624        74.6  
   800x600       130.0    120.0     85.1     85.1     72.2     75.0     60.3     56.2  
   700x525       149.5    120.0  
   640x512       150.0    120.0  
   640x480       120.0     85.0     75.0     72.8     75.0     66.7     59.9  
   720x400        85.0     70.1  
   640x400        85.1  
   576x432       150.0  
   640x350        85.1  
   512x384       170.0    150.1    140.1    120.0  
   416x312       149.3  
   400x300       170.5    144.4    150.2    120.6    112.7  
   320x240       170.4    145.6    150.0    120.1  
   360x200       170.1  
   320x200       170.5  
   320x175       170.5  

This is a flat panel, and I'm quite sure it cannot accept modes above 85Hz, maybe even lower. Furthermore, according to the log, there are lots of doublescan modes. When anything switches to 800x600 mode, X picks a doublescan mode, which won't work. If I manually do 'xrandr -s 800x600 -r 60' the mode is good.

Additionally, the included X log contains a line like the following for every mode switch:

(II) NOUVEAU(0): Modeline "(null)"x0.0  108.00  1280 1328 1440 1688  1024 1025 1028 1066 +hsync +vsync (64.0 kHz)

which is clearly a NULL dereference, but the gnu vsnprintf is so cool it doesn't crash.

I'm running xorg-server and nouveau from git as of 1.8.2008.
Comment 1 Pekka Paalanen 2008-08-16 08:44:19 UTC
After discussion with malc0 and stillunknown, I'm reassigning this to xorg-server.

EDID reported monitor freq ranges: V min: 50 V max: 85 Hz, H min: 30 H max: 82 kHz, PixClock max 140 MHz. There are several doublescan modes that actually fit into the freq ranges, especially 800x600@65D. Xrandr reports doublescan modes by showing the refresh rate as double, which can be seen in the xrandr output in the previous comment. As higher refresh rates are automatically favoured, this means doublescan modes get priority. E.g. 800x600@65D is in randr1.2 speak 800x600@130, which is then preferred over all normal 800x600 modes. As the monitor cannot deal with doublescan modes, I don't get a picture by default.
Comment 2 Pekka Paalanen 2008-08-16 08:49:37 UTC
Created attachment 18319 [details]
X log with ModeDebug

Perhaps a better log with ModeDebug enabled. Contains X startup, xrandr -s 800x600 and xrandr -s 0.
Comment 3 Pekka Paalanen 2008-08-16 09:04:55 UTC
Created attachment 18321 [details]
xorg.conf

I tried adding TargetRefresh, but the only effect is the message:
(WW) NOUVEAU(0): Option "TargetRefresh" is not used
Comment 4 Pekka Paalanen 2008-12-21 14:07:38 UTC
Changing the bug summary a little more descriptive.
Comment 5 Pekka Paalanen 2009-01-05 12:58:52 UTC
Something has changed, xrandr does not list doublescan modes anymore:

$ xrandr 
Screen 0: minimum 320 x 200, current 800 x 600, maximum 1280 x 1280
VGA-0 connected 800x600+0+0 (normal left inverted right x axis y axis) 338mm x 270mm
   1280x1024      60.0 +   75.0     60.0  
   1152x864       75.0  
   1024x768       85.0     75.0     70.1     60.0  
   832x624        74.6  
   800x600        85.1*    72.2     75.0     60.3     56.2  
   640x480        85.0     75.0     72.8     66.7     59.9  
   720x400        70.1  

The xorg.log used to list doublescan modes, now they are gone. My guess is that either updating xorg-server or Nouveau from git did this. The xrandr application is still 1.2.2.

Therefore I'm marking this as fixed, although I cannot pinpoint the fix.
Comment 6 Marcin Slusarz 2010-10-13 10:48:33 UTC
*** Bug 19214 has been marked as a duplicate of this bug. ***

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.