Edgy USB bug

Today I discovered an extremely inconvenient bug in Kubuntu Edgy. It's a problem with a USB mass storage device that only occurs under the 2.6.17 kernel.

I have this USB flash drive that I bought this summer. It's a little unusual in that it came with two partitions on it. One is a bootable (I think) 1.4MB partition and the other is allocated the remainder of the 1GB drive capacity. On Windows, the boot partition is detected as a USB floppy drive, while the main data partition is picked up as a standard USB mass storage device. In Kubuntu Dapper, both partitions were detected as USB mass storage volumes and mounted when the drive was inserted.

When I plugged that drive into my external USB hub today, it didn't work. And by "didn't work," I mean it didn't work at all. No auto-mount, no desktop icon - udev didn't even create a freakin' device node. I checked the output of dmesg and lshal, and it seems that the drive was detected as some kind of generic USB device. In fact, dmesg only reported a "new full speed USB device using uhci_hcd and address 12." No mention of any device nodes, drivers, or anything else. Just a notice that the device was not plugged into a high-speed hub.

I don't yet know what the problem is, but it seems to be at least partly in the kernel. How do I know this? Because, on a hunch, I tried rebooting and running with the 2.6.15 kernel I still had installed from Dapper. When I did that, the device worked. It seemed a little slow, but it worked.

It's important to note that this problem only occurs with the one drive. I have an old single-partition 32MB Lexar flash drive and that functions perfectly under Edgy with kernel 2.6.17. I'm guessing the problem is something about that weird two-partition setup. I don't know why that would cause a problem, but it's all I can think of at the moment.

Keyboard config with keyTouch

As you may recall, yesterday I mentioned that I had some keyboard problems in Edgy. I have now solved them thanks to a little program called keyTouch.

By way of background, I have a Microsoft Natural Multimedia keyboard. It's a very comfortable split-keyboard model with lots of extra internet and multimedia keys. The problem is getting all those extra keys to work under Linux. Many of them are not detected by X.org and, in fact, many are not detected by the 2.6 kernel keyboard driver. So, to make them work, I needed to mess around with the setkeycodes command and xmodmap. Not fun, and I still had problems getting some of them to work.

KeyTouch takes all the pain out of it. My keyboard is supported out of the box and setting actions for the keys is incredibly easy. In fact, the interface is simply a list of the special keys and a choice of pre-set actions or custom commands. It even includes a fairly reasonable set of defaults. In particular, I found the default AMixer command for the volume buttons to be much better than KMix, because the volume display is much smaller and less intrusive. Plus the mute function works with AMixer.

Of course, the down side is that now I need to configure hotkeys in two place - keyTouch for the special keys and KHotKeys for everything else. I also have to run a separate daemon for keyTouch to work. I would much rather have everything in one place, but it's a small price to pay. KeyTouch just plain rocks.

It finally worked!

I upgraded to Kubuntu 6.10, Edgy Eft, this evening. I was shocked by the results - it worked flawlessly!

I started using Kubuntu with Hoary and this is literally the first time I've had an uneventful upgrade. Every other time something has gone wrong and left my system partially, if not totally, borked. But not this time. The upgrade instructions were simple and complete, unlike the upgrade to Breezy, and there was no massive breakage, unlike the upgrade to Dapper. Everything was nice and smooth.

The weird part is that I'm very ambivalent about my reaction to the smooth upgrade. Part of me wants to say, "Well done, Kubuntu team! Keep upthe good work!" However, another part of me wants to say, "It's about freaking time! Why did it take so long to get non-sucky upgrades?"

Apart from the nice upgrade, I have yet to see anything truly remarkable in the new version. Things look slightly nicer and now I have Digikam, which seems pretty nice. That's about it.

I have noticed one problem, though. Some of my hotkeys are no longer working. I had all my multimedia keys set up in KHotKeys, but two of them have stopped working. KDE and X.org still recognize the keys, but pressing them doesn't run the desired command. I have other key combinations for the same commands, so it's not critical, but it is annoying, as those are the two I use most often (the keys for Konqueror and Konsole).

Plus I see that KMixer still can't mute my sound card, a CMI8738 chipset. I don't think it's ever worked on this system and I don't know why. I must admit I'm a little curious, but I almost never need mute and when I do I just hit the power button on my speakers, so it hasn't been worth the effort to figure it out.

That was easy

The replacement for the laptop keyboard that was destroyed by the cat came in today. It's now installed and working perfectly.

As is often the case, my main problem was getting the damned case opened. I don't know why I always have trouble with that. On more than one occasion, I've spent significantly more time getting the case open than actually working inside it. The last time this happened was with a last-generation Gateway desktop at work. It had thumb screws and a semi-hidden button that you need to push to release the case latch. I spent 20 minutes figuring out how to open the case and less than 5 taking out the PCI card I needed.

Fortunately, a quick Google search yielded a link to the eletronic version of the service manual for my laptop. Once I had that, it was quite easy to find the instructions to get the keyboard out and install the new one. It certainly took a lot less time than sending the system to Dell would have.

Cat attack!

Well, that'll teach me to leave my laptop sitting on the table with the cord not taped down to the floor. I'm now two keys short!

It could have been much worse. I left the laptop on the dining room table, which was covered with a table cloth, and had the cord stretched a little to plug it in. I get up for two minutes, and one of the cats apparently pulled on the chord, which pulled the laptop, which pulled the table cloth, and dumps to laptop on my chair. The damage, as far as I can see, consists of broken 'G' and '6' keys. Annoying, but not serious.

Fortunately, I was quickly able to find a replacement keyboard at powerbrixx.com. Now I just have to see if I can replace it when the new keyboard comes in. It shouldn't be too hard - just a bit harder than working on a desktop.

Encrypted DVDs and Kaffeine

So what's the deal with Kaffeine and libdvdcss2? Why won't they play nice together?

Here's the problem: some encrypted DVDs won't play in Kaffeine. The DVD starts to load, but at some point I get an error message saying that it's probably encrypted. It only seems to happen with some DVDs, though. Others work perfectly.

The standard fix would be to install libdvdcss. But I've already got the libdvdcss2 package from the PLF repository. Furthermore, the DVD plays in MPlayer, so apparently the CSS library does work. I guess something in Kaffeine or libxine isn't using libdvdcss2 properly, but I don't know what.

For the time being, I guess I'll just wait and see if this gets fixed in Edgy. I've got better things to do. It's not critical and at least it works in MPlayer (though the MPlayer UI does really suck).

Digg users are morons

It's official: the Digg userbase is full of losers and morons. Of course, we all knew that already, but here I have photographic evidence. Observe:
Digg "YouTube down" article in Akregator

That's right: over 300 people voted for a "story" that was nothing more than a statement that YouTube wasn't working for half an hour or so. Better yet, it wasn't even a story: if you look at the URL, it was link spam for somebody's Counter Strike site!

Isn't it nice to know you can trust the Digg user community to carefully examine each story and weed out the garbage? Much better than those lazy, incompetent editors over at Slashdot! For example, take that time earlier this year when Slashdot had all those links to that crack-pot junk "science" site, rebelscience.org. The good users at Digg got the same submissions and -- oh, wait, the Digg community voted up a bunch of those links too. Well, at least the people at OSnews -- hold on, they published at least one of the same links. Hmmm... I guess democtatic, user driven sites can publish just as much garbage as sites controlled by a small group of editors. The only difference seems to be the the user-driven sites can publish greater volumes of junk in less time.

And for reference

And now, because I thought it would be nice to have a point of reference for yesterday's low-quality picture (and because I like animal photos), here's a shot from the same zoo, taken at comparable distance with a real digital camera.
Two Siberian tigers

This one was taken with my Canon Power Shot A70. It's not the greatest camera in the world, but it's good enough for me. (I wouldn't know how to use a really good one anyway.) It's 3.2 mega-pixels with an actual optical zoom. By contrast, the digital camera only has software zoom, and only at the lower quality settings.

What I'd really like is to have a digital camera with a telephoto lens and enough speed to capture action shots. However, I don't want to pay that much for a camera (upwards of $500 according to my brother, who is a professional artist), particularly given that I know nothing about photography. And, really, unless you're sickeningly rich and have money to burn, it's silly to spend that much on a camera.

And as long as I'm at it, here's another of my favorite zoo shots:
Giant Flemish rabbit
This is the giant Flemish rabbit we saw in the Toronto zoo. It was keeping the wallaby company. (Seriously, that's what the sign said.) It's hard to tell in the picture, but this rabbit is the size of a small dog, i.e. upwards of 20 pounds. Apparently you can breed them and keep them as pets. Just imagine having the Easter bunny hopping around your living room. How cool would that be?

When you need a camera...

First, a little tip: BitPIM doesn't like prelinking. I tried to download some pictures from my camera phone today and got an error about the Python zipimporter. It turns out that this is caused by prelink messing with the binary. Apparently prelink actually breaks BitPIM in the process of trying to make it load faster. The solution was simply to add "-b *bitpim*" to /etc/prelink.conf and reinstall BitPIM, which is annoying, but not difficult.

Second, the picture I was downloading. I went to the zoo with my brother yesterday and we got a really good look at the wolves. How good? Well, this is the picture I took with my phone (click for full-size).
Gray wolves
Sadly, that's the best I could do. Neither of us had a real camera at the time, so it was the camera phone or nothing. It didn't help that the observation room windows were really dirty.

As an interesting side note, the wolf habitat is divided into two sections. One side has had gray wolves ever since I can remember. The other side used to have red wolves, but they've since had to remove them. This summer, they filled in that half of the habitat with (get ready for it): white-tail deer. That's right, they put the deer right next to the wolves. It's like some kind of sick joke on the wolves. But I guess it at least gives them something to do.

Blocking IntelliTXT

Here's a handy little IntelliTXT-blocking User JavaScript for you Opera users out there. I've been using this at work for some time and just noticed the other day that I didn't have it on my laptop, so I figured I'd post it for posterity.

If you're not familiar with IntelliTXT, just browse through the forums on Tek-Tips.com and you'll see what I mean. The adds are added by a JavaScript which highlights certain keywords that it finds on the page. When you mouse over these words, it pops up an obnoxious little semi-transparent DIV with an ad in it. The actual ads look really nice, but they're really annoying, especially given that it's very easy to inadvertently mouse over one of the keywords and pop up an ad over the text you're trying to read.

The actual code for the script is below, for those who are interested. You can also just download the script and drop it in your UserJS folder, if you're feeling lazy. // Block those annoying IntelliTXT adds. window.opera.addEventListener('BeforeExternalScript', function (e) { if( e.element.getAttribute('src').match(/intellitxt/i) ) { e.preventDefault(); } }, false );

Update KDE config

Note to self: remember about kbuildsycoca.

I already knew about updating the desktop and file manager configuration with kfmclient configureDesktop and kfmclient configure, but I never stopped to think that there was a similar command for KDE in general.

But then, a KDevelop error message reminded me of SyCoCa, the KDE System Configuration Cache, and pointed out the kbuildsycoca command. Basically, is just regenerates the configuration cache. This includes updating the start menu (or K menu, or whatever the hell you want to call it). Very handy when you just installed something two seconds ago and want to bring up it up without resorting to the command line.

One MPIO problem down

Tonight I finally sat down and fixed one of the problems with my MPIO software. This was just a small configuration issue and there are still lots of others, but it's better than nothing.

The problem was that, on Kubuntu 6.06, I could only connect to my MPIO FL100 as root. This never used to be a problem.

Turns out that the issue was with hotplug. In particular, it seems Ubuntu Dapper doesn't use hotplug anymore. Apparently everything is done with udev now, so the configuration files under /etc/hotplug/ are no longer used.

The solution? Convert the hotplug script and usermap to udev rules. You can grab the file here and drop it in /etc/udev/rules.d/ to make it work. I just used the libgphoto2 rules file as a template, assigning the MPIO devices to the plugdev group so that regular users can read and write to it.

Now I just have to figure out why I have to unplug the player before I can reconnect, hack the code to support my player's SD card slot, and write a better GUI. On the up side, it gives me a good excuse to brush up on my C and get into KDE programming in C++.