Tuesday, December 25, 2007

Radeon DRI Update

I got a response from Minskey on the xwindow-discuss alias regarding my trouble upgrading SXCE with the Radeon driver installed:
I am sorry. I should have mentioned it early. The upgrading install or bfu will override the drm module (/kernel/misc/(amd64)/drm) and consconfig_dact (platform/i86pc/kernel/dacf/(amd64)consconfig_dacf). It is because the consconfig_dact is replaced during upgrading. So, before you upgrade your system, you have to : 1. remove radeon driver by "rem_drv radeon" 2. upgrade your system; 3. re-install radeon driver by install.sh scrip in the tarball; -minskey

Friday, December 21, 2007

SXCE b78, and the Radeon DRI snapshot

This morning I did a live upgrade to SXCE b78, but unfortunately ran into some issues. When booting the system, I got the error: WARNING: consconfig: no screen found Can't find driver for console framebuffer I did compares of /etc/driver_aliases on both BEs, and checked for differences under the /kernel tree. I did find one file, /kernel/misc/drm~11 that certainly looked suspicious. I tried moving that file into it's proper place, /kernel/misc/drm, but still the new b78 BE would not boot. After digging a little further in to the install script, I found another path /platform that contained some x86-specific drivers (likely obvious to all you long-time Solaris admins). Again, I found a file /platform/i86pc/kernel/dacf/consconfig_dacf~11. After finding two files like this with the same extension, I decided to do a simple: find $newBE -name '*~11' > /tmp/filelist.txt This turned up quite a few files. Doing a quick search for relevant files, I came up with the following list:
  • /kernel/misc/drm
  • /platform/i86pc/kernel/dacf/consconfig_dacf
  • /usr/X11/lib/X11/xserver/libdrm.so.2
  • /usr/X11/lib/modules/drivers/ati_drv.so
  • /usr/X11/lib/modules/drivers/atimisc_drv.so
  • /usr/X11/lib/modules/drivers/radeon_drv.so
  • /usr/X11/lib/modules/extensions/libdri.so
After moving all of these files from their *~11 variant to the path listed, I can now boot into b78. Unfortunately, I must not have done everything right, because the display no longer has direct rendering enabled, but I'm sure I can fix that soon enough. At least I've got the system booting again. I've found myself in this position more often than I'd care to admit.

Wednesday, December 19, 2007

Java Generics

My surprise at not being able to bind a table to a List<Weekend> in NetBeans is not at all surprising when I remember that Java Generics are really just compiler notes, not actual generic types. An ArrayList<String> is exactly the same type as an ArrayList<Weekend>.

Monday, December 17, 2007

OpenSolaris DRI Follow-up

Well, ask and you shall receive. I got in touch with the people involved in porting DRI to OpenSolaris, and it turns out they had recently released a snapshot of their efforts. I got that installed this afternoon, but I'm still having some problems. Direct rendering is enabled, but I'm having trouble with AGP support (which may just be a configuration issue, I haven't played with it much yet). Performance still isn't quite where I'd like it, but it's nice to see progress. I'll be following their progress with much interest.

Saturday, December 15, 2007

JEE 5 Development with NetBeans 6 First Impressions

Playing around with Netbeans 6 for writing my trivia software for a couple hours now, and I must say, even with the great tool support this JEE 5 stuff is a relatively slow development process. Particularly frustrating is that it doesn't appear that Netbeans is terribly good at auto-generating a JUnit test that can access the JEE context. I got relatively spoiled with RoR with my last trivia re-write, so I really expect unit testing to be a first-class consideration for any programming environment. If the environment makes it difficult to unit test, then it makes it difficult to develop, end of story. I'm certain that it's possible to get my unit tests set up to actually run, but as a JEE newbie, I'm not sure exactly how to go about it, and I feel time spent figuring out how to make a JEE context available to JUnit is time that's pretty wasted. I'm attempting to add a JSF page for displaying some of my entities, but even that is relatively painful. While the Scaffolding that Rails provides is rarely used in the final deployment of an app, it is very nice to have that structure there from the get-go so that you can hit the ground running. I'm finding in NetBeans that I'm having to build up that scaffolding myself (though it's possible that I just missed some wizard for generating a default interface for managing your entity beans). When I create a Visual JSF page in NetBeans, it creates a ton of (IMO) useless junk in the resulting classes. Also, what's with the ugly SessionBean1, RequestBean1, etc. I see the purpose for the classes, but are they really manditory? If not, why have them created by default? Finally, it was relatively irritating using NetBeans Bind to Data functionality for binding some data to a JSF table. I tried a few times to expose a List<Weekend> (a weekend is the top level entity in my trivia software) and bind the table to that, but it wouldn't appear in the magic Get Data From drop down. Apparently, I have to expose the property as an array (Weekend[]) rather than a generic List. I'm certain that it's possible to code around these issues that I have, but from a first-impression stand-point, NetBeans and JEE 5 aren't really impressing me that much. I do feel that JPA is a vast improvement over EJB 2.1persistence, but I'm really not sold on JSF (I may just go back to straight JSP/Spring MVC for this project) or NetBeans default JEE wizards. Also, the emacs keybindings for NetBeans are atrocious. Ctrl-G should stop the previous incremental search (and turn off highlighting of the results), not bring up a go to line dialog. It doesn't appear that Ctrl-Alt-f and co aren't working. Emacs bindings are more than just Ctrl-a, Ctrl-e, Ctrl-p, Ctrl-n, people. It doesn't appear that there's any notion of a mark, nor a kill ring. Eclipse at least does a very adequate job of emulating these features (though I still run into surprises when using Eclipse). Anyway, that's enough brain dumping for today. Perhaps once I get this initial scaffolding in place for my project I'll start to see some productivity improvements. Also, I've always felt that one of the strongest arguments for using Java over scripting languages is the superior support for debugging and observability, not initial developer productivity.

OpenSolaris for Mobile Development

I generally prefer to use my laptop for all my hobby programming for various reasons. I currently have my laptop set up as a dual boot system with both Windows XP and OpenSolaris (SX?E b77) installed. I've been trying for over a year now to get really comfortable with OpenSolaris as a development OS, but for my particular needs, it is still a somewhat troubling experience. For instance, I've been using NetBeans 6.0 a lot recently (for the JEE trivia app that I've been working on), but NetBeans is painfully slow on my ThinkPad t42p. This may be due to the pretty sluggish performance of GUIs in general since OpenSolaris does not have direct rendering support for my ATI video card (yet), but it is still disappointing that running the most recent Sun IDE on the most recent Sun OS on the most recent Sun JVM leaves much to be desired with respect to productivity. I really want to like this OpenSolaris experience, but the following issues always make me feel like going back to Linux or perhaps even Windows for my development machine. Here's my current wishlist for developing on OpenSolaris on my laptop:
  1. Direct Rendering support for my ATI 9600 Mobility card. The graphics performance on this machine is very noticibly sluggish.
  2. Bluetooth support so that I can use my mobile mouse. This mouse has worked fine for me in Linux, FreeBSD and Windows, but I still cannot get it to work on Solaris.
  3. Proper support for my Synaptics trackpad. Even if I had a working external mouse, I still find the convenience of having the track pad right and mouse buttons right at my fingertips to be very helpful. Right now, it simply works as a default PS2 two-button mouse. No middle mouse button, no scroll-wheel emulation, no disabling of tap-to-click, etc.
  4. A proper upgrade solution for the base OS. Indiana isn't quite there yet (from what I've heard, I've been too busy with other things to actually give it a test run so far), so I'm still using Solaris Express. I've decided to build all my local software packages under my home directory now, since I'm wiping the system partition so often for re-installs. Also, it's a little frustrating to have to download 3+ GB of data, just for incremental updates.
  5. ZFS for the root partition in a way that's upgradable. I did set this up once using the manual procedure, but I was then completely unable to upgrade the OS with the current OpenSolaris install tools (aside from BFU, of course, though I'm not completely sold on going that route, and being resposible for updating each consolidation manually).
  6. Seemless support for suspend, hibernate, resume. I've had this working just fine on Linux and Windows (not FreeBSD last I checked), and it is definitely one of the compelling features of laptop development that I'm missing out on while using OpenSolaris. If I want to shift locations, I have to either close down all my apps, or close the lid while the computer still runs. Also, it's nice to be able to simply hibernate the machine overnight, so the next time I have a few minutes for development time, I can have my environment set up just as I left it, without having to leave the laptop on 24/7.
That said, I should point out that it isn't all bad, of course. There are some good aspects of using OpenSolaris as my dev platform (which is why I haven't wiped it quite yet).
  1. ZFS for my home partition rocks. Being able to send my home partition to another machine, with incremental snapshot upgrades, is great. Setting auto-compression for my source directories helps me save a bunch of space.
  2. Having DTrace (and the other observability tools) available is wonderful, as well as the fact that Java/PostgreSQL both come with DTrace probes enabled on Solaris Express.
  3. Having the latest Gnome is a nice touch. I've been using Gnome for my desktop environment for many years now, so the actual desktop on Solaris Express is extremely familiar.
  4. NWAM has made a wonderful difference in my everyday usage. I can now easily set up my network whether I'm wireless at home, wired at home, or on using the free wireless at my local library and/or Panera. This lets me at least not have to worry about network connectivity while working.
  5. Having a full Unix command line available all the time. This is something that I really miss whenever I have to use Windows. I always install cygwin, but even so, I often have compatibility issues while using it under windows, and I simply cannot be productive without the Unix shell that I've grown to love in the decade since I first installed Linux.
Now, many of the issues that I mentioned in my nit-picking are currently being worked on, but I still get the feeling that the OpenSolaris community isn't the most open (e.g. Why exactly was b78 delayed, and when will it be available? Is there anything the community can do to help the build/deploy process along?), so it is difficult to tell when exactly these enhancements will be released.


The obligatory introductory post. Sputtering Digitized is simply a place for me to capture my own musings on programming. I'm interested in quite a few different topics, from programming languages (Java, C, C++, Objective-C, C#, Erlang, Smalltalk, Lisp, Ruby, etc), to programming environments (Eclipse, NetBeans, Visual Studio, Emacs, Vi) to operating systems (Linux, OpenSolaris, FreeBSD, Windows). Currently, my hobby time is being focused on OpenSolaris, Erlang, JEE 5 and NetBeans. These interests are all stemming around an annual trivia contest that I've been part of for a number of years. I inherited some software for our trivia team, and have been maintaining it for a number of years. I generally use it as an excuse to try building a full solution in different environments. The system started out as a C# app connecting to a MySQL database with a PHP front end. I later ported it to a C# app connecting to web services run by Ruby on Rails with a PostgreSQL database as the backend. This year, I'm attempting to port the whole system to a full JEE stack, with a Swing and JSF front-ends, and EJB/JMS for the backend (though still connecting to my PostgreSQL database).