Samsung 225BW with xorg on Ubuntu Linux

as promised, i better start writing this before more people came over and found nothing. I noticed from 103bees and nuffnang there are quite some searches for samsung 225BW configuration with linux, so here we are, the wahlau how-to on getting sweet 1680x1050 with your Samsung 225BW. :)

the following steps should work on most distribution, but only tested on an IBM thinkpad t43 with Ubuntu Edgy 6.10 Linux, xorg 7.1.1 (standard i assume). use dpkg -l xserver-xorg to find out.

1) buy a Samsung 225BW
yeah, before you ever try this how-to, you need to buy a Samsung 225BW. :) heheh but seriously, this how-to should work with other monitor and resolution too, since it uses DDC and xorg to get the right parameters out... So you can skip this step and move on if you already have another type of TFT monitors :)

so once you have your TFT connect to your computer, we can move on. 

2) make backup
make a copy of backup for your xorg.conf. just in case something went wrong, you always can get your old working configuration back. For those who have no idea how, run the following command:

   sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup 

3) Edit your xorg.conf
now open xorg.conf with your favourite text editor, i will use vi, you can of course use others or even gedit

   sudo vi /etc/X11/xorg.conf

for gedit

   gksudo gedit /etc/X11/xorg.conf

go through the file until you find Section "Monitor" (or something that denotes your monitor), change it to this:

Section "Monitor"
   Identifier      "SyncMaster 225BW"
   Option          "DPMS"
EndSection

this step attempts to let ddc module to auto detect the modeline parameters and others. I am not sure why can't xorg just use it to configure resolution directly, but that is another question here. To make sure this step works, you must also check right on top of xorg.conf whether you have ddc enabled.

Section "Module"
        Load    "i2c"
        Load    "bitmap"
        Load    "ddc"
        Load    "dbe"
...

then you are ready for the next step. 

4) test the modeline values
there are two ways to do this. The hard way is to switch to console mode and restart gdm (beware, any opened software or session at your current login will be terminated!). Another that i read on some forum postings/sites say you can open second x session using xinit like following

sudo xinit -- :2

when you issue this at the terminal window, you will get a new session started (at CTRL-ALT-F9). to switch back to your original session you can press CTRL-ALT-F7, which will transport you back to your normal session. I have no idea how to stop it, so i use CTRL-ALT-backspace to kill it. Don't worry, CTRL-ALT-backspace only kill of active X session. so your original session should stay as long as you press CTRL-ALT-backspace at the new X session.

ok, no matter which way you use, the trick is to (re)start x server using the modified xorg.conf and read the modeline values out of the log file. If you use the hardway, press now CTRL-ALT-F1, and login at the black console screen. do this

sudo /etc/init.d/gdm restart

when done, check out the log file

vi /var/log/Xorg.0.log

you will find many non-comprehendable texts in the file, but fear not. search for the word "h_active" (under vi, you can press "/" then key-in "h_active" then press enter, then you will be sent to the searched keyword). you should see something like the following:

...
(II) I810(0): Supported additional Video Mode:
(II) I810(0): clock: 146.2 MHz   Image Size:  474 x 296 mm
(II) I810(0): h_active: 1680  h_sync: 1784  h_sync_end 1960 h_blank_end 2240 h_border: 0
(II) I810(0): v_active: 1050  v_sync: 1053  v_sync_end 1059 v_blanking: 1089 v_border: 0
(II) I810(0): Ranges: V min: 56  V max: 75 Hz, H min: 30  H max: 81 kHz, PixClock max 170 MHz
(II) I810(0): Monitor name: SyncMaster
(II) I810(0): Serial No: HS9P206963
... 

Main thing is to decipher the modeline values. when you look carefully, you will see them above. to make things clearer, i put those information down here:

(II) I810(0): clock: 146.2 MHz   Image Size:  474 x 296 mm
(II) I810(0): h_active: 1680  h_sync: 1784  h_sync_end 1960 h_blank_end 2240 h_border: 0
(II) I810(0): v_active: 1050  v_sync: 1053  v_sync_end 1059 v_blanking: 1089 v_border: 0
(II) I810(0): Ranges: V min: 56  V max: 75 Hz, H min: 30  H max: 81 kHz, PixClock max 170 MHz 

note done the values. you will need them for the next step. if you use the second X session method, the log file should be /var/log/Xorg.2.log instead. else, use Xorg.0.log :)

5) use the right values
as mentioned earlier, xorg needs to understand the right modeline values to push the output to the right resolution. 

so now change your xorg.conf at the section "Monitor" to the following:

Section "Monitor"
   Identifier      "SyncMaster 225BW"
   Option          "DPMS"
DisplaySize     474 296
HorizSync       30.0 - 81.0
VertRefresh     56.0 - 75.0
Modeline        "1680x1050"     146.2 1680 1784 1960 2240 1050 1053 1059 1089
EndSection

you will notice the value for HorizSync, VertiRefresh and Modeline are just values taken from the log file. To make it obvious i highlight them as follow:

(II) I810(0): clock: 146.2 MHz   Image Size:  474 x 296 mm
(II) I810(0): h_active: 1680  h_sync: 1784  h_sync_end 1960 h_blank_end 2240 h_border: 0
(II) I810(0): v_active: 1050  v_sync: 1053  v_sync_end 1059 v_blanking: 1089 v_border: 0
(II) I810(0): Ranges: V min: 56  V max: 75 Hz, H min: 30  H max: 81 kHz, PixClock max 170 MHz 

when you have updated your xorg.conf with the right values, save it.

6) Screen settings change
last change for your xorg.conf. you need to add the new desired resolution in. in my settings i have now this

Section "Screen"
       Identifier      "Default Screen"
        Device          "Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller"
        Monitor         "SyncMaster 225BW"
        Option          "MonitorLayout" "CRT"
        DefaultDepth    24
        SubSection "Display"
                Depth           1
                Modes           "1680x1050" "1280x1024" "1024x768"
        EndSubSection
        SubSection "Display"
                Depth           4
                Modes           "1680x1050" "1280x1024" "1024x768"
        EndSubSection
        SubSection "Display"
                Depth           8
                Modes           "1680x1050" "1280x1024" "1024x768"
        EndSubSection
        SubSection "Display"
                Depth           15
                Modes           "1680x1050" "1280x1024" "1024x768"
        EndSubSection
        SubSection "Display"
                Depth           16
                Modes           "1680x1050" "1280x1024" "1024x768"
        EndSubSection
        SubSection "Display"
                Depth           24
                Modes           "1680x1050" "1280x1024" "1024x768"
                ViewPort        0 0
        EndSubSection
EndSection

you don't really need that many SubSections, but no need to remove them too :) most important of all, put in the 1680x1050 values in the Modes parameter. The ViewPort setting i only followed the how-to in ubuntuforum, no idea whether is it a must. The Monitor value should match the Identifier value under the Section Monitor in step 3 and 5 above.

7) use 915resolution for widescreen settings
yup, you might be surprise why certain resolutions cannot be displayed at all. Some video card bios do not carry the widescreen settings, but you can use 915resolution to change it. It is not permanent, so you will need to redo it every time you reboot. Some suggest to put that in gdm or at the start of /etc/init.d/rcS. i myself made a shell script that does the resolution change as follow:

#!/bin/bash
915resolution 3a 1680 1050 8 2240 1089
915resolution 4b 1680 1050 16 2240 1089
915resolution 5a 1680 1050 32 2240 1089

again you can see the values from the log are used, as highlighted below:

(II) I810(0): h_active: 1680  h_sync: 1784  h_sync_end 1960 h_blank_end 2240 h_border: 0
(II) I810(0): v_active: 1050  v_sync: 1053  v_sync_end 1059 v_blanking: 1089 v_border: 0

the parameter 3, 4b and 5a are the modes unused in Bios which can be rewrote. to find out what your computer has, use

sudo 915resolution  -l

10) restart gdm now.
make sure you have changed the bios setting using 915resolution, if you wish to use say the widescreen settings. then restart gdm. If everything goes well, you will see the expect resolution in front of your eyes :) if thigns do not work out. don't worry. read through the steps again, and repeat them. Most of the time it might be a typo or you have missed a line here or there. Feel free to leave a message here, and i will try to answer your question if i can.

i will come back and edit this later, just in case if i miss out anything. Else you are ready to use your new xorg settings and your spanking new widescreen TFT monitor! enjoy.

links
1. http://ubuntuforums.org/showthread.php?t=203905&page=4 - forum entry that explains basically what i explained on top

2. http://www.geocities.com/stomljen/ - the site on 915resolution.

: Thanks for your votes!

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Help?

Thanks for the guide, it has certainly given me a number of clues, but I still can't get it working!

 

What is your complete xorg.conf file?

 

Do you have the laptop screen switched off when you execute the steps?

 

Thanks 

Working!

Never mind, got it working! Here is the link to my full method:

 

http://ubuntuforums.org/showthread.php?p=2702458 

good job!

well, at least you got that part right - i usually bootup with the monitor connected, hence i only have external display on. perhaps that makes the difference from pressing fn+f7 (or other key combinations for some notebooks) after booting up with the LCD itself

i really wish to see xorg to work as easy as windows one day (soon). Then we do not need all these troubles anymore...

have fun with your widescreen monitor... cheers.

Thank you

This tip finally allowed me to drive my non-widescreen external LCD from my HP Pavilion dv4000, something I had almost given up on. The stickiest part is that the recognized name of my external monitor is 'CMC 17" AD' which has a double quote in it ... I can't find any docs suggesting that it is possible to escape double-quote values in xorg.conf (I tried backslash-escaping it, but then X wouldn't start).

 What I don't know is what happens when I try to switch back to the laptop's LCD. Fingers are still crossed on that one.

I should add that what I did

I should add that what I did to get around the double-quote issue was just to leave the double quote out of the monitor name. I'm not really sure whether it's just matching because it's the only monitor, or what.

congrates

one thing i believe is that the name of the monitor is just for us to recognize the monitor. you can even put ABCDE as monitor name, it won't change anything. The refresh rate values are more important than the name you use to identify the monitor.

i might be wrong though...

stuck again

Thanks for that info, yep, I'm a n00b so I still don't grok xorg.conf. I can't seem to come up with a conf that will drive the laptop screen *and* the external monitor without forcing the monitor into a stretched widescreen resolution (ick) ... the dual-head configs I've seen on the web don't work for me. I don't get how xorg picks which mode to use or how to make it depend on whether or not the external monitor is plugged in. Any advice?

do tell

do tell me what kind of settings you wish to use all the time. I might be able ot hack a xorg.conf for you, after this weekend, of course :)

Thank you!

Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you!!!!!!!!!!!!!!!!!!!!!

 BTW it worked for me! 

welcome!

glad to hear that from you. Do share about what you have done and achieved. Then we can all learn and share the knowledge.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.