Bug 12439

Summary: [intel] samsung 205BW display results in flicker
Product: xorg Reporter: flocchini <flocchini>
Component: Driver/intelAssignee: Hong Liu <hong.liu>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: eric, hong.liu
Version: unspecifiedKeywords: patch
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 13027    
Attachments:
Description Flags
xorg.0.log as requested
none
xrandr --verbose output
none
patch to try none

Description flocchini 2007-09-16 02:04:01 UTC
monitor 205BW has strange flickering in half top with xorg-server <=1.4 and xf86-video-intel >=2.0.0 Suspect DDC problems like 225BW, maybe workaround needed in Xf86EdidModes.c or somewhere else

Turning off DDC (Option "NoDDC") results in strange resolutions, no way to get correct 1680x1050
Comment 1 Eric Anholt 2007-09-17 11:38:53 UTC
Xorg.0.log with Option "ModeDebug" "YES" in your driver section required to actually help.  Output of xrandr --verbose may also help.
Comment 2 flocchini 2007-09-17 13:08:06 UTC
Created attachment 11606 [details]
xorg.0.log as requested

xorg.0.log as requested
Comment 3 flocchini 2007-09-17 13:09:00 UTC
Created attachment 11607 [details]
xrandr --verbose output 

xrandr --verbose output as requested

Thank you for assistence :)
Comment 4 Eric Anholt 2007-10-22 13:21:14 UTC
Your log shows you getting the correct mode detected and chosen for your monitor.  You should also be getting an appropriate clock chosen I think.  Not sure what's going on here, but DDC seems fine.

Can you describe the flicker better?  Is it happening on a bare X Server?
Comment 5 flocchini 2007-10-25 03:52:00 UTC
It happens on clean Xserver, on kde, on gnome... Flickering is just flickering,the window "vibrate" like my frequencies are wrongs in top half of my screen (or 1/3 top)

All clear with <2.* drivers
Comment 6 flocchini 2007-10-25 03:53:02 UTC
It happens on clean Xserver, on kde, on gnome... Flickering is just flickering,the window "vibrate" like my frequencies are wrongs in top half of my screen (or 1/3 top)

All clear with <2.* drivers
Comment 7 Michael Fu 2007-11-01 17:34:56 UTC
we happen have this monitor. IIRC, though we have some issue with it, but didn't see this weird behavor... 

 re-assign to Hong.
Comment 8 flocchini 2007-11-01 18:41:51 UTC
ask me whatever you need and I will post it... I'm currently stuck with 1.7.4 driver because of this flickering with >=2.0
Comment 9 Hong Liu 2007-11-01 19:00:36 UTC
(In reply to comment #8)
> ask me whatever you need and I will post it... I'm currently stuck with 1.7.4
> driver because of this flickering with >=2.0
> 

what is your monitor saying about the mode (there should be somewhere in your monitor OSD menu).

Thanks,
Hong
Comment 10 flocchini 2007-11-02 03:15:15 UTC
On my OSD info:

with 1.7.4 driver

Analog
65KHz 60Hz PP
1680x1050

Kilohertz changes randomly every time I boot up, sometimes is 65, sametimes is 64.7 but no problem at all

With 2.0 driver

Analog
64.7KHz 60Hz NP
1680x1050

Every time 64.7 with 2.0 driver, but I don't know what this "NP" means
Comment 11 Hong Liu 2007-11-04 17:35:32 UTC
(In reply to comment #10)
> On my OSD info:
> 
> with 1.7.4 driver
> 
> Analog
> 65KHz 60Hz PP
> 1680x1050
> 
> Kilohertz changes randomly every time I boot up, sometimes is 65, sametimes is
> 64.7 but no problem at all
> 
> With 2.0 driver
> 
> Analog
> 64.7KHz 60Hz NP
> 1680x1050
> 
> Every time 64.7 with 2.0 driver, but I don't know what this "NP" means
> 

PP: +hsync +vsync
NP: -hsync +vsync
Seems we need to add a quirk to your monitor.

Would you please add a new modeline and try if it works?

#xrandr --newmode 1680x1050_60 146.2 1680 1784 1960 2240 1050 1053 1059 1089 +hsync +vsync
#xrandr --addmode VGA 1680x1050_60
#xrandr --output VGA --mode 1680x1050_60

(The only change of this mode is use +hsync.)

Thanks,
Hong
Comment 12 flocchini 2007-11-05 02:17:09 UTC
still no luck :(

sovereign flocchini # xrandr --newmode 1680x1050_60 146.2 1680 1784 1960 2240 1050 1053 1059 1089 +hsync +vsync
X Error of failed request:  BadName (named color or font does not exist)
  Major opcode of failed request:  156 (RANDR)
  Minor opcode of failed request:  16 ()
  Serial number of failed request:  16
  Current serial number in output stream:  16
sovereign flocchini # xrandr --addmode VGA 1680x1050_60
sovereign flocchini # xrandr --output VGA --mode 1680x1050_60

I paste exactly what you wrote, as user or root, flicker remains and my osd info now shows:

 Analog
 65KHz 60Hz NN
 1680x1050

Not the expected "PP"

I also tried to change to -hsync -vsync (same flicker problem, NN) and +hsync -vsync. With +hsync -vsync I only get 1400x1050, no flicker, PN, but if I force it to 1680x1050 (xrandr -s 1680x1050) flicker returns
Comment 13 Stefan Dirsch 2007-11-05 02:35:47 UTC
For whatever reasons using xrandr doesn't work for you. I suggest to add the modeline manually to Section "Modes" of your /etc/X11/xorg.conf.

# 1680x1050 @ 60.00 Hz (CVT)
#   field rate 59.95 Hz; hsync: 65.29 kHz; pclk: 146.25 MHz
Modeline "1680x1050_60.00"  146.25  1680 1784 1960 2240  1050 1053 1059 1089
+HSync +Vsync

("Modeline..." is one line; stupid Bugzilla!)

Then make sure that your Section "Monitor" is referenced properly in Section "Device". And that Section "Modes" is again referenced in Section "Monitor". Something like this.

Section "Monitor"
  Identifier "Monitor[0]
  [...]
  UseModes     "Modes[0]"
EndSection

Section "Modes"
  Identifier   "Modes[0]"
  [...]
  # must be one line!
  Modeline "1680x1050_60.00"  146.25  1680 1784 1960 2240  1050 1053 1059 1089
  +HSync +Vsync
EndSection

Section "Device"
  [...]
  Option "monitor-VGA" "Monitor[0]"
  [...]
EndSection
Comment 14 flocchini 2007-11-05 03:42:21 UTC
it doesn't work. I still get flickering and my osd still shows 

Analog
64.7KHz 60Hz NP
1680x1050
Comment 15 Stefan Dirsch 2007-11-05 05:39:17 UTC
Well, I forgot one important thing. Add the ""1680x1050_60.00" mode to the appropriate Subsection of Section "Screen".
Comment 16 flocchini 2007-11-05 06:09:40 UTC
wooooooooooow now it works! :D

I didn't notice previous mistake in xorg.conf because I usually define modeline in different way instead of your "Modes" section. I checked and even modifying my standard xorg.con works like a charm.

My current Monitor section:

Section "Monitor"
        # Block type: 2:0 3:fd
        # Block type: 2:0 3:fc
        Identifier "Desktop Monitor"
        Option "DPMS"
        VendorName "SAM"
        ModelName "SyncMaster"
        DisplaySize     433 270
        # Block type: 2:0 3:fd
        HorizSync 30-81
        VertRefresh 56-75
        # Max dot clock (video bandwidth) 160 MHz
        # Block type: 2:0 3:fc
        # Block type: 2:0 3:ff
        # DPMS capabilities: Active off:yes  Suspend:no  Standby:no

        Mode    "1680x1050"     # vfreq 59.954Hz, hfreq 65.290kHz
                DotClock        146.250000
                HTimings        1680 1784 1960 2240
                VTimings        1050 1053 1059 1089
                Flags   "+HSync" "+VSync"
        EndMode
        # Block type: 2:0 3:fd
        # Block type: 2:0 3:fc
        # Block type: 2:0 3:ff

Option              "PreferredMode" "1680x1050"
        Option              "DPMS"
        Option              "NoDDC"
        Option              "ModeValidation" "NoMaxPClkCheck"

EndSection

Thank you all very much
Comment 17 Michael Fu 2007-11-05 16:29:42 UTC
The inf file provided by Samsung for windows has this in it:

[SM205BWa.AddReg]
HKR,"MODES\1680,1050",Mode1,,"30-81,56-75,+,+"
HKR,,ICMProfile,0,"SM205BW.icm"

[SM205BWd.AddReg]
HKR,"MODES\1680,1050",Mode1,,"30-81,56-75,+,+"
HKR,,ICMProfile,0,"SM205BW.icm

Any hint we can get from it?
Comment 18 Hong Liu 2007-11-05 17:10:41 UTC
(In reply to comment #17)
> The inf file provided by Samsung for windows has this in it:
> 
> [SM205BWa.AddReg]
> HKR,"MODES\1680,1050",Mode1,,"30-81,56-75,+,+"
> HKR,,ICMProfile,0,"SM205BW.icm"
> 
> [SM205BWd.AddReg]
> HKR,"MODES\1680,1050",Mode1,,"30-81,56-75,+,+"
> HKR,,ICMProfile,0,"SM205BW.icm
> 
> Any hint we can get from it?
> 

It seems the 1680x1050 mode of this monitor always requires +hsync +vsync.
Comment 19 Hong Liu 2007-11-07 01:34:43 UTC
Created attachment 12379 [details] [review]
patch to try

Please try the attached patch which added a quirk to the samsung 205BW monitor to use +h +v for the  edid detailed mode.

Your monitor should work without the modeline hack to xorg.conf.

Thanks,
Hong
Comment 20 flocchini 2007-11-07 05:59:10 UTC
works on xorg 7.3 (xorg-server 1.4-r1)

 ;)
Comment 21 Michael Fu 2007-11-25 22:36:36 UTC
mark fixed. 
Comment 22 Michael Fu 2008-01-02 17:24:16 UTC
reopen for discussion, as the patch was reverted from tip...
Comment 23 Eric Anholt 2008-01-09 09:05:24 UTC
Oh, this one was not about flipping polarities, just setting both to positive.  Re-commit it, I guess.
Comment 24 Hong Liu 2008-01-09 17:37:13 UTC
(In reply to comment #23)
> Oh, this one was not about flipping polarities, just setting both to positive. 
> Re-commit it, I guess.
> 

Eric, can you help to commit it to xorg? I don't have the commit right.

Thanks,
Hong
Comment 25 Wang Zhenyu 2008-01-22 21:43:48 UTC
patch pushed, close this one.

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.