XFree86 and the CT65545

NOTE: The information is out of date - since I wrote this, newer versions of XFree86 have been released which have better support for this chipset. I no longer own any sort of laptop. There's not much point in asking me questions about the information on this page, I won't be able to help you.

Starting with XFree86 3.1.1, the XF86_SVGA server contains rudimentary support for the CT65545, a video chipset common in high end laptops. There are several problems with the driver: this document aims to help you get an X server up at least to 640x480x256 resolution, and maybe better.

This document was written based on the experience of running XFree86 on a NEC Versa P laptop with an 800x600 active matrix LCD. It seems that the behaviour of the CT65545 depends in part on the particular machine: as such, these observations may not apply to other machines. I also have more information on Linux and the NEC Versa.

Interested parties should also check out Ken Raeburn's page on the ct65xxx: he knows more about technical details than I do, and is coordinating a hacking effort. And there's another page about Linux and X on notebooks that contains useful docs, more technical.

Feel free to look at my XF86Config, but it's better if you don't copy it - use it for a guide. Mine has some odd stuff in it.

DISCLAIMER: XFree86 makes it possible to hurt your hardware with software: in particular, you could potentially damage the LCD, the chipset, or an external monitor. The author of this document has no responsibility for any damage you might inflict on your computer. Be careful.

Summary

640x480x256 on the LCD should work just fine, no trouble. If you have a higher resolution LCD, 800x600x256 should also work, although you might need to turn the LCD off and on once after the server is started to resync. 800x600x256 should also work fine on an external monitor: resolutions higher than that seem possible, but there's some question about what dot clocks XFree86 supports.

Dot clocks

In theory, the CT65545 is capable of a dot clock up to 65MHz, good enough to drive 1024x768x256 at a reasonable refresh rate. Unfortunately, XFree86 can't actually program the dot clock to that rate: this appears to be a deficiency in the SVGA server. With the LCD on, XFree86 sees only two dot clocks: 25.2 and 28.3. With the LCD off, XFree86 sees 25.2, 28.3, and 40.0.

Note that the commercial XInside server supports the CT65545 better: in particular, it can program the dot clock up to the full 65MHz.

Using the LCD

If you just want to use the LCD, then it's fairly easy to configure XFree86. In particular, it appears that all the sync pulses are just ignored. I've gotten by with this modeline (and equivalents).
Modeline "640x480" 28.3 640 640 640 640 480 480 480 480
If you prefer to do it right, this mode line seems to sync roughly correctly on a normal monitor as well:
Modeline "640x480"       28.3   640 664 760 800 480 491 493 525

Things get a bit more interesting if you try to use an LCD that's bigger than 640x480. On my NEC Versa P, I found that I could go up to 704x600 with no trouble, and if I ran a server at 800x600 it also worked, but I had to turn the LCD off and on once after the server started (via Fn-F3 or by closing the cover). Weird, but it works.

Simultaneous Display

Simultaneous display is a bit more of a trick. Basically, you just configure XFree86 to the resolution of your LCD, at the 28.3 dot clock, but tune the sync parameters as if you were programming a normal SVGA card. If things futz out, try turning the LCD off and on. Note the Versa P has three modes: LCD only, external monitor only, and both on. With a bit of care, I've been able to get 800x600x256 simultaneous, using this modeline:
ModeLine "800x600" 28.3 800 816 856 920 600 600 601 618

External monitor only

If you have the LCD off entirely, XFree86 gets a different view of your chipset. In particular, it will find a 40MHz clock where it didn't before. 800x600 works pretty nice with the modeline listed above: presumably it would benefit from a 40MHz clock, too.

It's possible to drive the CT65545 to resolutions greater than 800x600 when the LCD is turned off. Program the horizontal resolution in increments of 16, and you can get pretty far: I've run 880x680, 1024x600, etc. None of these modes are particularly usable, though: most aren't square, and they flicker pretty badly. 1024x768 fails entirely. From what I've seen it seems that you just have to have a 65MHz clock or better to do 1024x768, which would explain these problems.

Sometimes, some other program will set up the CT65545 in a state so that XFree86 will then find a 65MHz dot clock. For instance, the Accelerated X demo will do this for you, and there might be some way to exit Windows and boot Unix, leaving the dotclock programmed. If that happens to you, then you can use 1024x768 mode at a 65MHz dot clock with this mode line:

ModeLine "1024x768" 65 1024 1064 1208 1344 768 771 777 806 -hsync -vsync
Again, this requires a 65MHz dot clock, which XFree86 itself cannot generate. Here's the opportunity for a good video programmer to make him or herself at least moderately famous.


XFree86 3.1.1 screenblank bug

A minor thing: XFree86 3.1.1 had a bug where the screen saver would make the screen go white, not black. That bug appears to have been fixed in XFree86 3.1.2: as near as I can tell, that's the only change made to the CT65545 support in XFree86 3.1.2.


Nelson Minar <nelson@santafe.edu>
Last modified: Tue Jan 21 16:19:27 EST 1997