Audio under QEMU on Ubuntu

I was trying to set up a virtual machine running Windows XP on my Ubuntu Linux desktop under QEMU/KVM to play Starcraft when I ran into a problem. Even after installing an AC97 sound card in the virtual machine and ensuring that Windows had the right driver installed, I wasn’t getting any sound.

It turns out that this is due to a known issue, but it took a surprising amount of log-file-reading and web searching to find it.

When you set up a VM through virt-manager, the default is to connect to it through VNC. Specifically, virt-manager uses gtk-vnc. gtk-vnc does not support tunneling of audio.

Workaround: delete the VNC graphics device on the VM details pane and add an SDL one instead. This solution has shortcomings of its own, but this will get you sound.

It looks like this was identified as a bug by RedHat a while ago, but it’s not clear what progress has been made on it. Given that recent development on virt-manager has added the option to use SPICE instead of VNC, I would hypothesize that VNC will simply be deprecated in the not-too-distant future. Until then, though…switch to SDL if you need audio.

bordeaux rental cars with driver

BPM/Tempo Analysis Software

While preparing for a DJ set at a recent dance event, I wanted to get tempo information for a bunch of songs I was thinking of playing. After a bit of research and advice from a friend, I found a couple of tools that might fit the bill: MixMeister’s BPM Analyzer, and Potion Factory’s Tangerine!.

BPM Analyzer got ruled out pretty much immediately, as it can’t update metadata in AAC files, and actually managed to hang my Mac—a rare feat.

Tangerine!, as advertised, was much more polished. The iTunes integration was slick, and it could update the metadata on the audio files, and fairly quickly at that. After I ran it, though, I found one problem…it’s not very good at finding tempos. :-/. I ended up having to manually time the playlist anyway. It got a few songs right, and a few more it came up with half the right tempo, but the bulk of them were wildly off. It’s not like these were overly “tricky” songs either: most were swinging jazz or gypsy jazz with a very solid beat. I emailed Potion Factory offering to share my playlist if they wanted to improve their product, but so far no response (over a week now).

For now, it seems, we’re stuck with timing or tapping to find our tempos.

Ubuntu 10.04 (Lucid) Netbook Remix on HP Mini 110

I installed Ubuntu 10.04 Netbook Remix on my new HP Mini 110-3000 CTO a couple of days ago. As I’d read, it was nearly seamless.

The one bit that I did struggle with a bit was the wireless networking. Many sites that I found asserted that you have to install the Broadcom STA proprietary driver to get wireless working. After discovering that the Broadcom driver wasn’t seeing any hardware, I did an lspci and discovered that the network card was not a Broadcom at all, but an RaLink RT3090. After visiting the Linux support page on RaLink’s website, getting the drivers for the RT3090, and running make install, I was in business.

The only other complaint that I’ve had so far is the lack of multitouch scrolling and gestures. Articles I’m reading make it sound as though the hardware supports it, but the kernel module only reports “left right middle” capabilities for the touchpad, but no “double” or “triple”. Hardly a deal-breaker, though.

Update:I just realized this morning that sound didn’t work out of the box either. However, after installing the linux-backports-modules-alsa-lucid-generic metapackage and rebooting, that’s resolved.

Droid Incredible: unrevoked forever and running Cyanogen 6.0.2

After getting a tip from a friend that Cyanogen was worth trying out, and being curious about running a more vanilla (specifically, not-tied-to-the-Sense-UI) version of Android, I finally installed it.

I found the full update guide on the CyanogenMod wiki site to be overly and unnecessarily complex. As noted in a previous post, I was running the leaked Android 2.2 w/Sense OTA update image, which meant that I already had fairly up-to-date radio firmware and the ClockworkMod recovery. Instead of backrevving to stock 2.1, I instead:

It was all very straightforward. The only snag that I ran into was the Mail app continuously crashing, which I resolved by removing the included Mail.apk and installing the Mail.apk from the CyanogenMod forums.

So far, I’m pleased. The phone is much snappier. There’s a small but noticeable lag in interface response on the Sense ROM (nowhere near what my old iPhone had) which does not exist in Cyanogen, and it makes using it less frustrating.

Wireless Tether on the Droid Incredible

Staples should hire the dudes who wrote android-wifi-tether, cause, man, that was easy.

I thought this would be a fine evening to get tethering working on my Incredible. One install of android-wifi-tether 2.0.5 pre-release 8 later, I’m no longer in the situation of having to pay Verizon to use the data plan that I already pay them for. No configuration, no nothing (beyond already running 2.2, I mean); just push the big “tether” button. Bam. Off to make a donation now!

Incredible Update to Froyo

Since I finally rooted my Incredible to resolve the mysterious “Low on space: Phone storage space is getting low.” error, I decided it was time to update to Froyo (Android 2.2) as well. This proved to be fairly straightforward following the instructions in the relevant thread on XDA-Developers, though I had a few surprises on the way. I’ll share a few discoveries and clarifications:

  • The “stock” file linked in the XDA-Developers thread is an unrooted Android 2.1+Sense image.
  • When you install the stock image, the phone will turn off, reboot, and then restart the loading process without any warning. This does not mean that the install has gone awry and that you’re about to have a $200 brick. Keep coolie-cool, boy.
  • When you boot into the stock recovery image, what looks like an error screen will come up (an Incredible with a red exclamation point and triangle). That’s normal; you just need to hit Power+Volume Up to get to the menu. (This was a surprise to me, since I’d only seen the ClockworkMod recovery installed by unrevoked3 which boots straight into the menu.)

Also, when you start up using Froyo, you’ll notice that many applications have disappeared from the Market. This is because Market apps, both free and paid, can be marked as “protected”, which means that you have to be using a recognized version of the OS (whether this is app-specific or store-wide, I’m not sure) for the app to show up, and the fingerprint in /system/build.prop in the Incredible Froyo image isn’t recognized. To fix this, update to verizon/voles/sholes/sholes:2.1-update1/ESE81/29593:user/release-keys in /system/build.prop. (See this post on Android Forums if you need detailed instructions on how to update the fingerprint.) This will make your phone appear to be a Droid running Android 2.1-update 1 to the Market (I’m guessing this eliminates 2.2-specific apps; I haven’t looked yet). Go to the dialer, and enter *#*#CHECKIN#*#* to force a checkin so that your changes will take effect. (h/t Geniusdog254 on XDA-Developers for pointing out how to force a checkin.)

Finally, I re-rooted the Incredible using unrevoked3, and disabled CityID (not going to pay for it), Verizon Navigator (why would I pay for this when Google navigation is free, even if I did need voice navigation?), and the 3G Mobile Hotspot (not going to pay $20 a month to use the data plan that I already pay for, thanks!). The last phone project is getting Wireless Tether running, but that’s for another day.

P.S.: if you want to see if you like vanilla (“Senseless” 😉 ) Android 2.2 on your Incredible, check out SkyRaider’s images. I actually installed this before going to the leaked 2.2+Sense image, and it was very snappy. I ultimately decided to go with the Sense image, because I figure that it’s gone through more testing, but if you don’t want to put up with the Sense bloat, this might be an option for you as well.

Droid Incredible: Free At Last

A week or so ago, I started getting the much-mentioned, not-resolved error on my Droid Incredible: “Low on space: Phone storage space is getting low.” After trying a few quick fixes suggested by some Google searches, I finally rooted the phone last night and got to the bottom of it.

As this ZDNet article notes, the error message is confounding, because it’s only supposed to appear when you have less then 10MB of storage free on your “phone memory”, yet you can see in Settings→SD card & phone storage that there are hundreds of MB free. It turns out that the problem is that the “phone storage area” is divided into two partitions. One of these is approximately 748MB, is mounted on /data, and is where user-installed applications are stored. The other is about 150MB, is mounted on /data/data, and is where applications store their data. What the SD card & phone storage settings page shows you is the partition that is mounted on /data, but what was running out of space was /data/data.

So, how do you figure out what’s taking up all the space?

  1. Root your phone. This is now a trivial matter, thanks to unrevoked3. This will install the very useful ClockworkMod recovery image, as well as adding a “Superuser Permissions” app that will allow you to grant root access to applications that request it.
  2. Install the Android SDK.
  3. Connect the phone to your computer via USB, and enable USB debugging (under Settings→Applications→Development).
  4. Reboot your phone into the ClockworkMod recovery image, either by using adb reboot recovery from the Android SDK, or powering the phone on while holding the volume-down button, then selecting “recovery” from the HBOOT screen.
  5. Mount the data partition. In ClockworkMod, go to partitions→mount /data.
  6. Get a root shell on your phone by running adb shell on your computer.
  7. Mount the /data/data partition by running the following command from the shell you have on your phone: mount /dev/block/mtdblock6 /data/data
  8. cd to /data/data, and use du (du -sk * | sort -n is a useful pipeline) to find out what’s taking up all the space. (As an aside, it’s way easier to poke around the filesystem from the recovery image rather than using su to get root when the phone’s running normally. The set of command-line tools provided in Android is very bare-bones—you don’t even have cp—while you’ve got a well-equipped BusyBox in the recovery image.)

In my case, I found that the directory was taking up over 100MB, 90MB of which was in a SQLite database. I had no contacts stored locally, so I just mounted the SD card, copied the directory to that for backup/forensic purposes, and deleted it from /data/data. After rebooting the phone and resyncing my contacts with GMail, the space being used in that directory was cut down by an order of magnitude. I do note that I can no longer sync Facebook contacts, but I’m not certain that that is a result of this—that may not have been working before the “low on space” debacle. If this problem re-occurs, I’ll dig into that SQLite DB to try to find out what was taking up all the space. For the moment, though, the problem is resolved.

Now that I have a rooted phone, I’m very tempted to install the leaked Android 2.2+Sense leaked ROM

Chicago Photos/Videos/History

A bunch of Chicago-related media crossed my path last week. I thought I’d pass on the highlights:

Plus, of course, two great Chicago-related photo pools:

Windows Aggravation #367

Limited numbers of connections via terminal services. From time to time at work, I need to log in to our servers to perform tasks. The initial attempt is often followed immediately by swearing and a post to our common IM chat room begging for someone to release a connection. Unfortunately, sometimes people leave their connections open when they go home…