X11 in a jail with NVidia hardware

Just before christ­mas I decid­ed I will spend the “immense” amount of 40 EUR for a graph­ic card for a sys­tem which was with­out one. The sys­tem is sup­posed to replace my dying home-server. I already moved every­thing, except my Desktop-in-a-Jail (actu­al­ly it is my home-cinema-jail).

The old sys­tem had a Radeon 9200SE, and it was enough for what I used it for. Now… for a few bucks you can get a lot more horse­pow­er today. After look­ing around a lit­tle bit I decid­ed to buy a NVidia card. I made this deci­sion because it looks like I can get bet­ter dri­ver sup­port for it. So I got a GeForce GT 520 with 1 GB of RAM (I doubt I will be able to use that much RAM) and with­out a fan.

With the Radeon 9200SE I was not able to get the 3D stuff acti­vat­ed (at least in the jail, I did not try with­out), Xorg com­plains about a miss­ing agp­gart mod­ule but I have AGP in the ker­nel (no /dev/agpgart out­side the jail). I did not spend time to inves­ti­gate this, as the main pur­pose – play­ing movies – worked. Now with the NVidia card I decid­ed to give the 3D part a try again.

After adding the NVidia device entries to the jail, and a lit­tle bit of fight­ing with the Xorg-HAL inter­ac­tion, I got a work­ing desk­top. The biggest prob­lem to ver­i­fy that 3D is work­ing was, that I did not had xdri­in­fo installed. After installing it, I noticed that it does not work with the NVidia dri­ver.  🙁  Next stop nvidia-settings: runs great, dis­plays a nice FreeBSD+NVidia logo, and … tells me that OpenGL is con­fig­ured. Hmmm… OK, but I want to see it!

As I decid­ed to switch from Gnome to KDE 4 at  the same time (I was using KDE when it was at V 0.x, switched to Gnome as it looked nicer to me, and now I switch back after read­ing all the stuff in the net that KDE 4 is “bet­ter” than Gnome 3), I was a lit­tle bit out of knowl­edge how to see the 3D stuff in action. So I quick­ly went to the set­tings and searched for some­thing which looks like it may use 3D. To my sur­prise, it was already using 3D stuff. Nice. I ful­ly real­ized how nice, when play­ing a video and using Alt-Tab to switch win­dows: the video was play­ing full speed scaled down in the window-switcher-thumbnail-view.

That was too easy. I am hap­py about it.

Now that I have a work­ing set­up of X11-in-a-jail for Radeon and GeForce cards, I want to cleanup my changes to the ker­nel and the con­fig files (devfs.rules) and have a look to get this com­mit­ted. A big part of this work is prob­a­bly writ­ing doc­u­men­ta­tion (most prob­a­bly in the wiki).

I still want to see some fan­cy 3D stuff now. I tried to install x11-clocks/glclock, but the build fails with an unde­fined ref­er­ence to ‘glPoly­gonOff­se­tEXT’. 🙁 Any rec­om­men­da­tion for a fan­cy 3D dis­play? My pri­or­i­ty is on “fancy/nice” with as less vio­lence as pos­si­ble. Most prob­a­bly I will look at it once and then dein­stall it again, so it should be avail­able in the Ports Col­lec­tion (or includ­ed in KDE 4).

Solaris 10 update 9: the not so nice things about it

I updat­ed some work­sta­tions of the client to Solaris 10 update 9. Upon installing my xorg.conf (dual-screen set­up) I had to notice that it does not work any­more. The prob­lem is, that the NVidia dri­ver does not con­tain sup­port for the graph­ic card we use.

Nor­mal­ly this is not a big deal, this can hap­pen… but in this case this is about SUN Ultra 20 work­sta­tions with SUN pro­vid­ed NVidia Quat­tro FX (NV37GL) cards. Ok, they are not the most recent ones, they where bought 4 – 5 years ago, but still, they just work as need­ed here and the cur­rent Solaris release has no out-of-the-box sup­port for them. I would expect this to work already in a fresh install (yes, I was not able to get the nv dri­ver to work with two screens on this graph­ic card, it seems the nv dri­ver has not sup­port for this).

Solu­tion for me: down­load the old dri­ver from NVidia and inte­grate it into Jump­start (but still, some hours are lost because of first try­ing to get a work­ing dual-screen set­up with the nv dri­ver before tak­ing an old NVidia dri­ver and using it like before in xorg.conf).

Anoth­er glitch a co-worker dis­cov­ered is that StarOf­fice is not includ­ed any­more. That is again some­thing which will cause some loss of time. I will have to have a look how to han­dle it. Prob­a­bly it is best to install it on the serv­er and mount it via NFS on the work­sta­tions. I will see soon if this is can be done (instal­la­tion of OO into a spe­cif­ic place which can be shared) or not.

A desk­top envi­ron­ment in a jail.

Yeah! Final­ly I got time to fin­ish my work to put a desk­top envi­ron­ment (in this case GNOME) into a jail. At least I have a proof of con­cept (I write this with fire­fox run­ning in my “desk­jail”). No, I don’t do this for addi­tion­al secu­ri­ty (there’s more secu­ri­ty than in a non-jailed set­up, but less secu­ri­ty than in an ordi­nary jail, as you have to allow access to a lot more devices than in an ordi­nary jail), I do this for addi­tion­al flex­i­bil­i­ty: Mov­ing my desk­top is now only the install of FreeB­SD on a new machine and rsync­ing the jail over to it. As the machine will also be a host of sev­er­al jails where I have some com­mon users with the same UID in each jail, I don’t pol­lute the jail-host with the desk­top stuff and I have every­thing nice­ly separated.

With­out a ker­nel patch and good devfs rules you will not get Xorg up and run­ning in a jail (at least I did­n’t man­aged to let it rec­og­nize my graph­ic card with­out the ker­nel patch). Now I have to beef up the patch a lit­tle bit and ask for review (it weak­ens up the secu­ri­ty a lit­tle bit like the sysctl security.jail.sysvipc_allowed=1 or security.jail.allow_raw_sockets=1).

But first I have to fin­ish the move of all my ser­vices I use at home to the jail-host now.

Text why pro­pri­etary or no hard­ware docs hurt the manufacturer

I stum­bled about a text which describes why it is ben­e­fi­cial to dis­close hard­ware pro­gram­ming docs and why it does­n’t help in keep­ing this infor­ma­tion away from the com­pe­ti­tion. I don’t repeat it here, so go and read it.

It’s a lit­tle bit old (last mod­i­fied in 2003), but IMO still up-to-date. If some­one approach­es a com­pa­ny for hard­ware docs, please pro­vide this link to them!

Unfor­tu­nate­ly it fails to men­tion that it would even be nice to get docs for obso­lete or not sup­port­ed any­more hard­ware (if your com­pe­ti­tion learns even stuff from your hard­ware which is 3 – 4 gen­er­a­tions old, it is not real­ly a com­pe­ti­tion and you most prob­a­bly are lead­ing because of inno­va­tion, if not you either are too expen­sive and open­ing the docs would be a rea­son to buy regard­less, or your soft­ware devel­op­ment is not good enough and open­ing the docs would allow users to fix this prob­lem them­selves). This could be a first step for a com­pa­ny to “test the water”. It would be an invest­ment with­out any mon­ey in return (the com­pa­ny does­n’t sell such hard­ware any­more), but it would show the com­pa­ny how it affects their image, how much they have to invest and what they can get in return (when peo­ple do cre­ative things with your obso­lete hard­ware you haven’t imag­ined before, you can bet they can do the same with your cur­rent hard­ware too… you may get an entire­ly new mar­ket “for free”).

If you apply some more thoughts about this top­ic and for exam­ple graph­ic cards, you even notice that any infor­ma­tion the com­pe­ti­tion may get by look­ing at freely avail­able hard­ware docs for graph­ic cards (instead of reverse engi­neer­ing it), can only be used 2 – 3 inno­va­tion cycles lat­er. This is caused by the short turn around times between new graph­ic cards. When a new graph­ic card hits the mar­ket, a devel­op­ment team already works at the sec­ond next gen­er­a­tion (and the next gen­er­a­tion is most prob­a­bly not only in fea­ture freeze but at the bug fix­ing and per­for­mance enhance­ment step). Now, how much val­ue does the com­pe­ti­tion gain from this? I would say only the mon­ey need­ed for the reverse engi­neer­ing. At the same time you gain mon­ey from hard­ware sales from those peo­ple which use (the result of) your hard­ware docs. And the com­pe­ti­tion is required to open their docs too (see below for the “com­put­er freaks” part), so you can safe the mon­ey for the reverse engi­neer­ing lat­er too.

For sound­cards this is a lit­tle bit dif­fer­ent. There you don’t have such short cycles, but cur­rent­ly there you have a pub­lished stan­dard (HDA) and you have Cre­ative with no docs at all on the oth­er side. Hey, Cre­ative, if you stum­ble upon this, what about kick­ing Microsoft in the ass by pro­vid­ing your hard­ware doc­u­men­ta­tion to any­one and ben­e­fit­ing from a lot of peo­ple which are pissed off because their shiny Creative-gear does­n’t work on Vista? I’m sure a lot of peo­ple are will­ing to spend their free time to find a way to make your hard­ware use­able on Vista (and on oth­er OS’) with­out get­ting mon­ey from you. And I’m sure peo­ple will find a way to get stuff out of your hard­ware which makes your eyes fall out of your head (and increas­es hard­ware sales). Oh… yes… hey, VIA, what about the docs for your soundgear too? There’s no mar­ket for sell­ing hard­ware docs, but a huge mar­ket to sell sound hard­ware. And those peo­ple which play around with non-mainstream soft­ware are those peo­ple (com­put­er freaks) which rec­om­mend hard­ware to peo­ple (mom, dad, neigh­bors, friends) which don’t play around but just use main­stream soft­ware. Those “ordi­nary” peo­ple may not depend on your hard­ware docs, but the com­put­er freaks will more like­ly rec­om­mend stuff which works not only on the main­stream stuff (just in case some­one wants to try some non-mainstream stuff).

The same (com­put­er freaks rec­om­mend­ing hard­ware) is true for cable TV / satel­lite TV / … stuff.