Thursday, March 15, 2007

X11 mode-line generator

I recently installed NetBSD-current (4.99.12 at the time I did this) inside Parallels Desktop for Mac. Everything went fine except for the configuration of the XFree86 shipped with the base system: I was unable to get high resolutions to work (over 1024x768 if I recall correctly), and I wanted to configure a full-screen desktop. In my specific case, this is 1440x900, the MacBook Pro's native resolution.

It turns out I had to manually add a mode line to the XF86Config file to get that resolution detected. I bet recent X.Org versions do not need this as, e.g. Fedora Core 6 works fine without manual fiddling.

Writing mode lines is not fun, but fortunately I came across an automated generator. In fact, this seems to be just a web-based frontend to the gtf tool provided by NVIDIA. So I entered the appropriate details (x = 1440, y = 900, refresh = 60), hit the Generate modeline button and got:

# 1440x900 @ 60.00 Hz (GTF) hsync: 55.92 kHz; pclk: 106.47 MHz

Modeline "1440x900_60.00" 106.47 1440 1520 1672 1904 900 901 904 932 -HSync +Vsync


After that I had to make the HorizSync and VertRefresh values in my configuration file a bit wider to fulfill this mode's request and everything worked fine. Be extremely careful if you mess with synchronization values though; incorrect ones can physically damage a monitor, although I think this is not a problem for LCDs.

4 comments:

ask said...

I really cannot get the screen resolution of 1440x900 to work on my Macbook Pro with Ubuntu 6.06. Would you be willing to post or email me the content of your xorg.conf file?

Best regards

Julio M. Merino Vidal said...

Are you trying natively (i.e. outside Parallels)? If so, I can't help.

ask said...
This post has been removed by the author.
ask said...

I am trying to get it to work inside Parallels, but unfortunately I misread your blog. I thought you were running Ubuntu - SORRY! I actually had Ubuntu working without adding the modeline but just the 1440x900 info on the appropriate places in the xorg.conf file (it only worked if I did not enable a fixed resolution of 1440x900 in the Virtual Machine Settings in Parallels. For some reason it however stopped working:-(.