September 2006 Archives

Thu Sep 14 23:52:53 CDT 2006

Solaris Desktops

I recently upgraded my work desktop to Solaris 10. At the same time, i attempted to get a Tatung U30 (really a Sun AXi board) running as a new desktop. I've been using a Sun SPARC-5 (170 MHz) running NetBSD for at least 4 years now... Sun are my preferred desktop because they run Unixy OSes, and because i'm totally used to the Sun type-5 keyboard. I've been using it for about 10 years now. The only reason i needed to upgrade was i could get a modern web browser to run at an acceptable speed on the SPARC-5. Netscape 3.01 ran great on a SPARC-5 back in 1998, but... times have changed and browsers have gotten a hell of a lot fatter. Last time i tried, compiling Mozilla and the myriad libraries it requires on a SPARC-5 took over 72 hours, which is three times longer than it took to compile the operating system!

I enjoy running NetBSD on most of my other machines, so first i installed NetBSD 3.0.1 on the Sun AXi. It installed well and performance seemed quite crisp. But there were a couple of serious problems. First, while the OS seems stable there are reports of problems with threads and 64/32-bit issues. Second firefox core dumped when i tried to run it. Third, i couldn't figure out how to get XFree86 to work with two ATI "3DCharger" (something like Rage II+) video cards. It'd work wonderfully with one, but if i added the second card to the machine, X wouldn't start. (It wouldn't even configure.)

Next, i tried FreeBSD 6.1, from the FreeBSD distribution CD-ROMs. FreeBSD has switched to the Xorg X11 GUI environment (from XFree86). This X server had exactly the same problem with the two video card configuration as well. And firefox also coredumped, both the binary from the second FreeBSD 6.1 sparc64 CD-ROM, as well as a version i compiled from /usr/ports.

If i was a good programmer, perhaps i could have fixed the problems with the respective X servers, but i am a bad programmer. So what to do?

Well, as little as i like it, it's back to the world of SunOS 5 (AKA Solaris). What Sun didn't put in /usr/sfw (SFW="Sun FreeWare") i installed from NetBSD's pkgsrc. There were some things that i normally use that i haven't gotten to compile out of pkgsrc yet, but overall, pkgsrc saves me a ton of time.

There were some un-obvious things i had to do to get X to work nicely with the ATI video cards, so i'm going to list them here. Hopefully i haven't forgotten too many of the details from when i did most of the work over the last few days.

Stuff for a two-headed display

  • mkdir -p /etc/dt/config cp /usr/dt/config/Xservers /etc/dt/config/Xservers
  • edit /etc/dt/config/Xservers and change the last line to something like this:

    :0 Local [email protected] root /usr/openwin/bin/Xsun :0 -nobanner -dev /dev/fb0 left defdepth 8 -dev /dev/fb1 right defdepth 8

  • Use /usr/sbin/m64config to dork with the resolution of the card.

    m64config -prconf will tell you what the current setting is, and also give you a list of support resolutions.

    use the "-dev" argument to specify which card m64config should talk to.

  • Note that there are other configuration programs like fbconfig or pgxconfig that should be used to manage other video cards (AKA Frame buffers).
  • Last, and perhaps most important, it seems to take around 5-10 seconds for these ATI 3DCharger video cards to actually adjust after i ran the m64config program. I spent a long time trying to change the resolution like this:

    m64config -dev /dev/fb0 -res 1152x864x75

    ... and then checking it immediately with

    m64config -dev /dev/fb0 -prconf

    .. only to be disappointed, because nothing seemed to be changing. Then i discovered that if i waited about 5 seconds and checked again, the video card seemed to have made the switch.

    I also restarted X like so:

    /etc/init.d/dtlogin stop ; /etc/init.d/dtlogin start make sure i was getting the refreshed setting. Note that restarting X (well, dtlogin, which is xdm, which is X :) will completely wipe out all open windows (sessions, etc.) on the console. So it might be a good idea to login over the 'net and do the work from there.

That's all for now. Back to getting a DPMS-aware xlock built!

Posted by johan | Permanent link | File under: unixlike