wayne piekarski

interesting information about linux
       wayne:     home     |     phd thesis     |     publications     |     linux     |     fun stuff     |     research:   tinmith mobile AR     |     arquake     |     hog3d     |     wearable lab

 

I've been hacking on Linux stuff since 1994 when I installed my first Slackware distribution with kernel 1.1.59 on my 486. There have been times when I've had to work on problems that I could not find the solution to on any forums, and so I have put this page together with a few interesting bits and pieces which others may find useful. I hope you enjoy reading my ramblings.


linux conf au presentations

I have given presentations at the Linux Conferences which have been held across Australia from 2000 onwards basically. Each year I present different topics related to my research work to encourage developers to think "outside of the box" and come up with new and interesting ideas.

In Adelaide in 2004 and in Canberra in 2005 I gave tutorials on doing 3D graphics and hardware development at home. The tutorial was titled "Hacking Your Own Virtual and Augmented Reality Apps for Fun and Profit!". I prepared an extensive set of notes, example code, and slides which are available from this web site. In particular, there were detailed discussions on the following topics:

  • Configuring a Linux distribution for 3D acceleration and development
  • Configuring Firewire and USB video camera devices and libraries
  • Developing applications in OpenGL using live video input
  • Using libraries such as ARToolKit for vision tracking
  • Developing custom hardware that interfaces to the parallel and serial ports

The main page for the tutorial is at http://www.tinmith.net/wayne/lca2005, and the 2004 version is also available. The notes are available in either HTML or PDF. The slides are available in PDF. I have also included some GPL'ed example programs which you can modify to get started. Information and scripts for configuring 1394 support under Linux is available here.


debian linux

Over the years I've used various Linux distributions with the goal of trying to find a system which is easily upgradable and maintanable, and supports my research work. I really don't want to have to reinstall my machines and learn how to do it all over again every time - it seems like configuration files and scripts are always moving around and its impossible to get a machine to setup easily without piles of messing around.

Over time I have used Slackware, Redhat, Knoppix, Debian, and Ubuntu - in that order. Of all the distributions I've used, the Debian-based ones are the best. The packaging system works really well and is easy to use. Slackware doesn't really do packages and I've been burned by RedHat in the past so much that I refuse to touch anything using RPMs any more. Knoppix looked promising because everything just worked, but over time the packages become out of date and there is no proper upgrade path. Debian is quite good but the stable releases are not very frequent and the testing releases tend to break quite a lot. So I have settled on using Ubuntu these days. Ubuntu is really the most fantastic thing to happen to Linux - they have a frequent release cycle and so you can target your applications to a particular release and be sure that things will not change on you over time. The releases also include binary firmware blobs and all the little things so that you don't have to do these things yourself.

So don't mess with any other Linux distributions. Ubuntu is the only one worth considering at the current moment. I use it on my mobile AR systems and on my laptops and desktops and it works great for everything.


my custom debian apt repository (last updated 2006)

So I have done a lot of work lately trying to build an almost automatic Debian and Ubuntu install that I can go from a blank machine to a system that is ready to begin developing on, with minimal fuss and trying to remember obscure commands and download locations. So I have settled on using Ubuntu, which is very recent and has more packages available than most other distributions. However, I do find that the standard system doesn't really have what I need to do development. So the typical thing is that you spend half a day compiling your software and installing the dependencies until everything all works. I really don't have time to do this because I have a lot of machines that I need to maintain (and build new ones all the time) and so I have prepared a set of meta-packages which have enough dependencies so that you just install them and APT takes care of the rest. Its kinda like rolling your own distro but its very painless - I was impressed at how easy it was to do once I worked out the packaging process.

These custom packages are available from my web site, simply edit your /etc/apt/sources.list file and add the following line:
      deb http://www.tinmith.net/debian ./

Make sure you run apt-get update to refresh your APT database before trying my packages. Use apt-cache search tinmith and it will bring up a list of packages that I have built. Some of them are useful only to me, but there are a few which you will find interesting:

  • If you want to setup a very compact but powerful X desktop environment, apt-get install tinmith-dapper-desktop
  • If you want to develop 3D applications with video capture support (including firewire), apt-get install tinmith-dapper-devel

So to get developing quickly, just install the Ubuntu Dapper CD and then add these packages on top. I would advise against using any older releases. (Please note these packages are always being updated and possibly broken - if you are using them please email me so I know!)


linux and 3d support (last updated in 2006)

Getting 3D to work under Linux can be a real pain at times. I think it is the greatest thing in the world - one day hopefully XFree86 will be written to be purely accelerated OpenGL calls via DRI. Many people have 3D hardware but don't know how to configure it or even realise if it is working!

My 3D hardware of choice is Nvidia. They have the best drivers and they just always work. I've been using Nvidia hardware ever since Dell brought out the awesome Inspiron 8100 laptop series, and I've never ever had a problem with the drivers crashing or acting unexpectedly. The nice part is that the drivers work on all Nvidia hardware from TNT2 upwards, and they use the same config files. So I have one XF86Config-4 which I share between all my systems, and use xchanger which is described below. Just for the record in case anyone is googling for info, the Nvidia drivers do not compile properly with kernel 2.6.4 - it seems like the kbuild script has some kind of wierd dependency issue. The Nvidia 6111 series driver works well with 2.6.8 kernel, so if you are having problems with compilation at least try that! Nowadays Ubuntu includes all the Nvidia drivers so you don't have to compile anything, I would recommend this option as being the easiest.

I have a Radeon 9000 in my IBM Thinkpad T40p right now, and this works straight out of the box running Knoppix with no changes required - I was very impressed. The Radeon DRI driver is not as good as the Nvidia one, I have been able to crash it quite easily when playing with resolutions and settings in my XF86Config-4 file, which was quite annoying. The driver also doesn't support dual head at the same time as 3D acceleration! We have also used the ATI binary drivers on another laptop and had no end of problems with them as well. For now I've got the DRI stuff working but it was a bit of a pain and I don't want to keep messing around with this. For those googling for info on Radeon DRI problems, you must make sure you are not running the frame buffer modules! So make sure radeonfb.o and anything else with fb on it is not running. I haven't worked out how to disable modules from running, so make sure you either delete the module file or recompile your kernel so there is no FB support at all. The FB and DRI support do not mix!

But in summary, if you want to do really high end 3D on Linux, the Nvidia driver is the only way to go. We refuse to buy ATI hardware in the lab any more, the drivers just don't work.


linux laptops (last updated in 2006)

I've previously used a Dell Inspiron 8100 on our backpack, and Linux supported all the hardware inside perfectly. We still use the Dell 8100 on our old Tinmith 2004 backpack, even though we have toasted the firewire ports on it - see our Project Oxcart page for cool pics of the repairs that we made to it :) The old Dell is on the way out though, the backpack is not kind to equipment and after many good years of service it is starting to wear out.

Toshiba make reasonably good laptops these days. The lab has been buying quite a few Tecra M-series laptops and they have nice Nvidia 3D support and are quite compact. Everything inside works under Ubuntu except for the Bluetooth and SD reader until the most recent Dapper release.

I also used to use an IBM Thinkpad T40P laptop. I bought it for my personal use and it has a lot of features and has one of the longest battery lifes around. Another motivation was that a lot of top Linux kernel hackers like Ted T'so use one, and so I figured if I had the same gear as them I would be able to take advantage of any bug fixes and patches they make :) As mentioned above, the Radeon 9000 chip works ok under Linux but it was a bit of playing around to get it all going. I didn't have to do anything special to make the hardware in the laptop work, everything is pretty much auto-detected with the latest Ubuntu distros.

Lately I have become a Mac user however. So I now use the Mac for my day to day work as well as some occasional coding. I still use Linux as my primary development platform for our research systems however, and also Linux and FreeBSD machine as file servers for reliability. Linux allows an infinite level of control that you just cannot achieve with Windows or Mac OS X. I am really impressed with the Mac as a machine for day to day use however, the platform is superior to Windows and with the new Intel-based machines out they are now even faster!


xchanger (last updated in 2006)

One thing that has always annoyed me is there is no nice way of resizing your X desktop without editing config files. And no, Ctrl Alt +/- on the numeric keypad only adjusts the virtual resolution, not the actual desktop size! I've heard of extensions such as the new XRandR (X Rotate and Resize) but this does not work with all the different X servers out there, and not always with 3D support either.

So I've developed a little program called xchanger. You prepare an XF86Config-4 file and place in #ifdef statements to switch in and out various features. I have written a little shell script using dialog to allow you to specify resolutions for your laptop LCD and external display, select dual head or cloned mode, and specify the type of external display. So you bring up the tool, configure the new options, and then hit Ctrl-Alt-Backspace to restart the X server and you are in the new resolution. This is really useful when you are giving presentations on your laptop and need to quickly jump between resolutions to make it work on the projector.

Xchanger is available via the GNU GPL and a tar ball can be downloaded here. It works on both Linux and FreeBSD, and with both XFree86 and XOrg. You can also install the easy Debian/Ubuntu package by following my above APT instructions and then apt-get'ing the tinmith-xchanger package which will fully install it for you. I've prepared templates that are designed to work on Nvidia and Radeon cards that I have, and should be pretty generic for you to use without having to play around with anything!


rsync and cygwin windows time zone problems

I have developed a backup system which uses rsync to mirror all my machines so that I have redundant copies of my data, including incremental file changes. Some of my machines run WinXP with Cygwin to support Rsync, and whenever there is a daylight savings change Rsync tries to resync about 50% of the files. The time zone code in all versions of Windows is completely broken, and it incorrectly calculates the offset from GMT depending on the current time of the system rather than the time being tested. It seems as though this problem happens with FAT file systems in particular, I think it works ok with NTFS but I'm not sure and I've heard conflicting reports.

If you would like to know more about this problem, I encourage you to read my posting to the Cygwin and Rsync mailing lists. It explains all the tests that I did and a summary of how to fix the problem. The short answer is that you can fix it by disabling time zone support in Windows, but then you get a few other problems such as your emails having a 1 hour off time stamp. Oh well, this is the best compromise I was able to come up with for the time being.

 

 

 


Contact Wayne Piekarski via email wayne AT tinmith.net for more information

Last Updated February 2010