Kasperian Moving Parts

kinda like Batman, but with a wife and 3 kids

Modeline Generation and Xinerama Info


So, I’m trying to think positively about the 3-hour battle I just had with X. I learned 2 new things today, which I didn’t really want to learn but yay nonetheless.

First, Xinerama. I’m going to be doing multiple monitor stuff for work, which should be really interesting if I can keep my self-imposed stress level down. I have never had more than a single monitor to use on any given desktop or laptop until I started working at VMware, and as such I am currently less than clueful with how all of this stuff works in X. (As an aside, if anyone can refer me to some really good documentation or multi-head/multi-screen/multi-monitor/multi-display Linux/X resources, I’d greatly appreciate it!) So today I was looking into a bug report that had to do with a Twinview side-by-side display configuration, and I discovered that “xdpyinfo -ext XINERAMA” will tell you what the screen topology looks like currently. For example, my normal Twinview cloned 1680×1050 setup looks like this:

XINERAMA version 1.1 opcode: 158
head #0: 1680×1050 @ 0,0

… whereas if I change it to a side-by-side 1680×1050 configuration, I believe it will show this:

XINERAMA version 1.1 opcode: 158
head #0: 1680×1050 @ 0,0
head #1: 1680×1050 @ 1600,0

(I can’t be certain since apparently in all of my fiddling, I disabled Xinerama in my /etc/X11/xorg.conf file and currently, it shows me this: XINERAMA version 1.1 opcode: 158 head #0: 3360×1050 @ 0,0 *sigh*) This is coolness that I’m sure I’ll be needing to use frequently in the coming months.

Secondly, Modelines. Now, honestly, it’s been years since I’ve had to worry about manually putting Modelines into my XF86Config/xorg.conf files. X has gotten much better since those bad old days and things have pretty much Just Worked (TM). Although I still do fondly remember the days of working with some hard-core X hackers in trying to get my laptop display drivers working (like 10 years ago??) But somewhere between my Ubuntu 8.04 installation and my current OpenSUSE 11 installation, X no longer thinks that it should allow me to output a 1680×1050 resolution to my external monitor (a Dell 2007FPb). I disagree strongly. =;D Unfortunately, my Lenovo T61 laptop looks like crap unless it displays in its native resolution of 1680×1050, so in Ubuntu Hardy, I became accustomed to doing the cloned twinview 1680×1050 thing. Like I said, something broke this when I went to OpenSUSE 11. I’m guessing it’s a newer X version. But anyway, after a whole lotta Google action, I came across a post that suggested another dude use the “gtf” command to find a good X11 Modeline. Wow, cool!! Here’s what it does:

$ gtf 1680 1050 60

# 1680×1050 @ 60.00 Hz (GTF) hsync: 65.22 kHz; pclk: 147.14 MHz
Modeline “1680x1050_60.00”   147.14   1680 1784 1968 2256    1050 1051 1054 1087   -HSync +Vsync

Awesome!!! I don’t know if this little tool didn’t exist back in the bad old days when X required you to enter this or if I just didn’t know about it, but this would have saved me lots of agony over the years had I known about it. =:) I copied/pasted that into my /etc/X11/xorg.conf inside the Monitor section for my Dell 2007FP, restarted X, and now nvidia-settings will kindly let me use 1680×1050 resolution again. YAY!

Author: Jason 'vanRijn' Kasper

My name is Jason 'vanRijn' Kasper. I am the ring leader of the amazing Kasper family. I am unashamedly a Christian Nerd. These are our stories....


Leave a Reply

Required fields are marked *.


This site uses Akismet to reduce spam. Learn how your comment data is processed.