Technology

Rear View Mirror Initial Release

I just released the 0.8 beta of Rear View Mirror

Rear View Mirror is a C# Application that connects to a web camera device and displays a window whenever motion is detected. It is intended to be a “Rear View Mirror” in my cubical so people can’t sneak up on me.

It’s my first released open source C# application for Windows.

Diagnostics and the Infinite Loop

About a month ago I attempted to setup my primary Gentoo Linux machine to have two keyboards, two mice and two video cards. There would be two X sessions running and a separate login screen for each monitor. In essence it would seem like I had two computers even though both of them were running off the same box. With computers becoming insanely powerful as they have, it seemed only appropriate.

I started using my regular GeForce 6800 card combined with an old GeForce 4 MX card a friend of mine lent me. Using a modification of the configurations I found in a Linux Gazette article combined with some configuration information using the new evdev driver (I can’t remember the site but I think it was in the Gentoo forms) I setup a working xorg.conf and custom gdm configuration that gave me two stable login screens.

I had to use the non-3D “nv” driver for the GeForce 4 since the GeForce 4 uses legacy 3D drivers that can’t be installed in Linux alongside the current drivers for the GeForce 6800 without doing some hacking and driver renaming.

So in attempt to get 3D on both screens, I bought a PCI-E GeForce 6600 under the false assumption that a 16x PCI-E card would fit into a 1x slot with all the extra pins just hanging off the end (I could have swore I read that somewhere!). Yea that didn’t work, so now I had a spare PCI-E card.

I then bought a GeForce FX PCI card. I wanted two graphically accelerated desktops, although I knew the PCI card would be much slower than the PCI-E card. That’s when I started running into stability problems.

I had to revert to the GeForce 4 card using the non-3D driver. Eventually I tried the GeForce FX again in non-3D mode. After running stable for a while I tried once again to enable 3D on both cards. Amazingly it worked and was stable for well over a week. A random crash forced me to reboot and suddenly the stability problem reappeared (along with a nasty evdev driver bug from the 1.2 release that was reverted the next day by the Gentoo team, but not in time for something similar to Command Line Fu happening with me during my date with Alex).

I struggled with the stability problem, turning off 3D on one device and then the other. Eventually I looked at possible problems with ACPI and the BIOS. I may have had a buggy ACPI implementation or interrupt problems. I attempted a BIOS update on my Abit AL8-V board. Using the BIOS update tool, I didn’t use the BAT file that came with it. I just ran the EXE and didn’t realize there were about eight or nine command line argument that went after it. The BIOS update failed. It booted to a “failed checksum” and would only allow me to boot to a floppy (I did the previous BIOS update from a CD). I have run into this before on an old Tyan board.

I made a late night trip to the evil Wal-Mart, which I had successfully boycotted until I needed a floppy drive at 9pm at night. I restarted the flash update using the bat file which set all the correct arguments. It was looking good, the update was proceeding. I went to my kitchen, came back and the screen was blank and the system would never boot again. It also turns out that my Abit AL8-V, being less than two years old, was all ready out of warranty.

I bought a Abit AB9-QuadGT board which wouldn’t boot anything when I first got it. One BIOS update later (and having to repurchase the floppy drive I returned to Wal-Mart), it would randomly crash and segfault in both Windows and Linux. I sent it back and exchanged it for a Gigabyte GA-P35-DS3P. I installed the board and it wouldn’t turn on. I couldn’t believe I had gotten two bad boards in a row. Well I hadn’t. The board was fine, but the power supply, only a few months old, was dead.

A trip to a local store for an overpriced 450W the next day got me up and running again. The system booted, and after a quick kernel compile, I had networking, sound and everything once again, and now I had two 16x PCI-E slots so I could use that old 6600 I bought earlier.

Then, it started locking up again. It made no sense. The system ran stable for over a week before I got into this whole mess and I had replaced the motherboard and video card! It wasn’t a hardware problem. I started tracking back to my emerge logs to try to find the real cause. My systems automatically pull all their updates from Gentoo portage each morning at 4am.

I though it may have been a problem with the evdev driver. Several downgrades and upgrades later, I moved onto the nvidia drivers. Downgrading the drivers meant also downgrading xorg which led to dependency hell. I did notice one thing, xorg refused to compile with different ntpl use flags settings as mesaGL. The older nvidia drivers refuse to compile at all claiming my kernel configuration was corrupt.

Eventually I unmasked everything and upgraded everything back to their current versions. Taking a chance I reloaded X. It has been stable for several hours!

The only thing I can think of is that xorg problem with MesaGL. They weren’t configured with the right use flags to work with each other as far as threading was concerned (ntpl). I did have ntpl set in my make.conf, but looking at Mesa, it turns out ntpl isn’t support on my amd64 platform. I have no idea how xorg correctly emerged without an error the first time.

So after nearly three weeks and lots of parts upgrades, I have the exact same system with an extra PCI-E card, a slightly better motherboard and no significant performance increases other than video. At least I can watch HD movies on both monitors now and I could go up to a Quad Core, like I’d ever need one.

I’m a few weeks behind on several other things including my thesis, but putting all this time into the current problem has also helped me focus at work as well as when I get home. My apartment is a mess and the energy rush I’ve had all week has turned into sleeping in until about 1pm today. I’m trying desperately not to think about the fact that all of this was caused by a software upgrade. It’s almost enough for me to jump the Gentoo ship…but not quite yet.

Laura E Walker

I just finished up another website, lauraewalker.com, for a photographer. It’s my first commercial Ruby on Rails application. I still have some tweaks left here and there but for the most part it is complete.

Chattanooga Dance Inc Redesign

I just finished my redesign of Chattanooga Dance Inc. It’s been using the default Drupal theme since I originally established the website over a year ago.

I had been meaning to create a custom theme for the site for a while, however Drupal provided to be a very frustrating piece of software to work with. This theme took about two weeks and all the photos and graphics I did myself except for the logo which was provided by the national USA Dance organization.

I’ve started working on some other web sites, some for personal and others for professional use. I hope to have a web portfolio of my designs up soon.

MplayerBuddy 0.51 Release

This release fixes the issue with mplayer not exiting with the application of it happens to be paused. I also added a check so you can’t add the same file twice. Other small exceptions handlers have been added as well.

MplayerBuddy 0.5 Beta Release

I’ve just released my first open source C#/.NET application. It’s written with mono/linux being the intended target. It’s called MplayerBuddy and it’s a media bookmarking utility designed to keep track of your place in videos. It’s great for people like me with limited attention spans who continually flip between different videos.

Projects Back On-line

I’ve finally put my projects back up on the website. They were taken off Freshmeat.net a few years back when I took my old professional website down. I’m currently working on some new open source applications including one written in C#/Mono.NET/Gtk# that works on Linux and MacOS. More details soon

Uninstalling U3 from Flash Drives

Recently I purchased a 2GB SanDisk U3 Flash Drive. It was on sale and I honestly have never owned a USB flash drive. I’ve always used either a network connection or CD-Rs to transport data. With the prices dropping on flash drives so dramatically, I though it might as well be time to purchase one. However when I plugged it into my computer I was surprised to find this wasn’t an ordinary flash drive.

The USB controller showed two drives when you plugged the stick in, one being a CD-Rom drive. It had an autorun that would install proprietary software for running mini-applications straight from the flash drive as well as encrypting the data on it. It seems like a neat idea in concept, except that I didn’t purchase a crappy application on a stick. I purchased a flash drive. It showed this useless CD-rom drive in MacOS and Linux, and in windows it required the user to be logged in as administrator in order to even gain access to the flash drive, making it completely useless on public PCs such as in libraries.

After doing some research I found a forum topic which discussed the issue at length. After several complaints, U3 publicly released a U3 removal tool to flash the firmware on these devices so that they are once again, simple and easy to use plain old flash drives.

Assignment Updates

I’ve finally gotten around to updating the assignments page with last semester’s work as well as several of my undergraduate class work. It’s not entirely up to date, but it’s on its way there. The projects and web portfolio should be up shortly as well.

RAID 5 Rebuild

At one time my personal files were split between several hard drives. As most nerds do, as I needed more space I added extra drives. The cost of this method is the inevitable drive failure leaving oneself with the loss of irrecoverable precious media. Hard drives are physically unreliable and so over a year ago, I decided to build a RAID 5 array.

The most economical solution at the time utilized six 320GB drives. The total total space with redundancy factored in was approximately 1.5 TB. Using the software RAID support built into the Linux kernel, the array worked perfectly for well over a year. A few weeks ago one of the hard drives had several errors and the operating system marked it as bad and removed it from the array. The array still worked and there was no loss of data, however I needed to replace the bad disk as a RAID 5 array can only lose one drive before permanent data loss occurs.

I ordered a new drive as I didn’t want to wait for the warranty on the current one to be processed, and within a week I had a new drive which was the exact same size and had the same number of logical blocks as the old one. I removed the old drive, placed the new one in and used the Linux mdadm tool to rebuild my array.

After using fdisk to create a RAID partition on the new hard drive, I used the following command to rebuild the array: mdadm -a /dev/md0 /dev/sdb where md0 was my raid device and sdb the hard drive that had failed.

By reading the contests of /proc/mdstat I could actually watch the hard drive slowly being rebuilt.

Personalities : [raid5] [raid4] 
md0 : active raid5 sdb1[6] sdg1[5] sdf1[4] sde1[3] sdd1[2] sda1[1]
      1562842880 blocks level 5, 256k chunk, algorithm 2 [6/5] [_UUUUU]
      [==========>..........]  recovery = 53.0% (165942648/312568576) finish=145
.3min speed=16814K/sec
      
unused devices: <none>

The FexEx delivery van pulled up with the new hard drive as I was about to leave for work. I decided to be a few minutes late so I could go ahead and install the new drive. It took less than twenty minutes and when I got home at the end of the day, the array was fully restored.