Getting Dirty

Ubuntu 9.04 was just released, so I upgraded over the weekend and it went fairly smoothly except for two old friends: the sound drivers had to be rebuilt from the ones from Realtek’s site like I had to do before, and Amarok.

Oh, Amarok… This Ubuntu release includes the 2.0 version for the first time, but as far as I can tell, it’s actually a huge step back. There’s an all-new, pretter interface, but a lot of functionality seems to be missing, or is so well-hidden that I couldn’t figure out how to use it. In particular, all of my carefully-crafted smart playlists were gone, with no apparent way to recreate them. It also didn’t help that it kept crashing on me, especially while trying to import my old collection.

I was disappointed enough in it that I tried out some other programs as well, like RhythmBox, but they didn’t even recognize my iPod, since support apparently hasn’t been added for 4th gen Nanos in the library it uses yet.

In the end I removed Amarok 2 entirely and actually went back and completely rebuilt Amarok 1.4.10 from source. It’s literally been years now since I compiled a major program like this manually (just minor utilities), and it took a while just to figure out what it required and get the packages needed to satisfy all of the dependencies, but I finally seem to have Amarok working again.

A Sneaky Bastard

I’ll be trying to set up Internet access for my mother soon, so I went out today to buy a wireless router for her. But as I was researching, I wondered hey, why should she get a better router than me, since most of them are Wireless N and gigabit nowadays and mine wasn’t. So I ended up buying a new one for myself instead and she can have my old one. Hey, she won’t know the difference…

I wound up picking up the Linksys WRT310N, since it’s the easiest one to get hold of around here that’s still hackable. I would have preferred something like the WRT610N, with its dual radios and USB support, but it’s still a work-in-progress for custom firmwares. The 310N’s not supported in Tomato though, so I’m back to using DD-WRT instead. It doesn’t really matter now that DD-WRT has bandwidth monitoring as well, since that was why I switched to Tomato way back when.

The performance is definitely improved over the old one. Wireless, I can get around 40-50 Mbps, versus maybe 25-30 before. And wired I can do 160-200 Mbps, which isn’t coming close to maxing out the Ethernet speed like I could before, but is still a decent improvement over the old 100 Mbps. I might actually be bottlenecked by the SSH encryption speed there. It’ll take a while to see how the reliability is, though. It’s not on the 5 GHz band since I need compatibility with 11g, so I’m still subject to all the same old possible interference. It’ll be nice if I can reliably stream MythTV…

It Only Slightly Sucks Now

I think I finally figured out the problem I was having with syncing my iPod via Amarok. The key seems to be that some other KDE services need to be running in order for the iPod to be fully identified properly. Without those services, it shows up but gets treated like a generic, unidentified iPod and there’s no history for it to sync against.

The thing that made it inconsistent was that I wasn’t always running the full KDE environment. Sometimes I’d export it via X11 to my laptop, and after the recent reinstall I was running Gnome instead of KDE for a while. I should be okay as long as I keep using KDE as my desktop and always run it at the console, which shouldn’t be too big a deal as it’s about the only thing I use the console for nowadays anyway.

(En)Closure

After all the trouble I had with various hard drive enclosures earlier, I’ve finally found one that works well: the Antec MX-100. No problems at all with reliability, speed, or physical construction quality with it so far.

I ordered two, so that I can finally put my offsite backup plan into effect. They’ll each have the same size hard drive in them, formatted as an encrypted filesystem and set up to be the same mount point, but only one of them will be hooked up at a time. The daily backup script will sync everything to the drive, and then once a month or so I’ll disconnect the drive, swap in the other one, and take the old drive to the office and stick it in a desk drawer. That way I’ll be covered even if fire, theft, or some other catastrophic event takes out my system and the currently-attached backup drive at the same time.

Unfortunately they only support SATA drives, and I still have a couple of 500GB and 750GB PATA drives that are still perfectly good, so maybe I’ll throw them into the gaming box. Or put one in one of the sucky old enclosures and hook it up to the PS3. Or play Frisbee…

Musical Crisis

I’ve been using Amarok as my music collection manager for a while now, and it works well for that purpose, but I’m getting increasingly frustrated at trying to use it to sync to my iPod.

The problem is that it often doesn’t seem to recognize when the same device is attached again, and fails to sync back any updated ratings, play counts, or last.fm updates. Sometimes it works, and sometimes it doesn’t, and it’s frustrating to spend two weeks using my iPod and then hook it back up only to have it completely throw out all the updates made through it over those weeks. A huge chunk of my library is still unrated, and I’d much rather rate them on-the-fly as I’m listening to them than to have to sit down and go through the whole list one-by-one.

Amarok just seems to have a poor model of MP3 players as persistent devices, treating them more as just arbitrary filesystems to copy songs to. Playlist syncing is confusing as well, with it being unclear what the functional difference is between ‘Transfer Playlist’ and ‘Sync Playlist’, playlists queued for syncing disappearing for unknown reasons between sessions, podcasts requiring more manual management than expected, the inability to limit playlists by device size…

I’m tempted to just revert back to doing proper iTunes syncing, but then that puts the management software on a different machine than the actual library, scanning of files is less automatic, there’d be a ton of metadata lost or needing to be manually transferred… Ugh.

Karma

My casual carelessness and messy computer area finally bit me in the ass tonight, as a loose side panel on my gaming box suddenly fell off, knocked over a bottle of water I was drinking, and splashed it on my beloved old keyboard. Those old models are usually fairly sturdy, but several keys no longer work now.

Fortunately I happened to get a new keyboard with the Dell system I recently got, so after a bit of rewiring (the new one is USB whereas the old one was PS/2, so I had to switch over to my new USB KVM as well) things are working again. It’ll probably be a temporary measure though, as it’s a rather cheap keyboard that just doesn’t feel right. Time to do a bit of research…

(And on the plus side, the new KVM has a much more sensible set of hotkeys using the Scroll Lock key rather than Ctrl. I’d been meaning to switch over to USB for a while now, but had been held back by not wanting to have to replace the old keyboard.)

Unenclosed

As I’ve been putting the new system together, there have of course been some minor problems popping up.

The fans in it are still noticeable in a quiet room. It’s not as bad as the old system or an Xbox 360, but it’s still a bit louder than I would have liked. The front also has a BLINDINGLY BRIGHT blue LED that sits right at eye level with me when I’m sitting in the living room chair. It’s like a laser trying to burn a hole in my skull. I’m thinking about moving the box down to the rest of the entertainment centre, so maybe it won’t be as bad from an angle. Otherwise, I’m going to need some duct tape…

I set up the audio cables so that everything gets routed through the Linux box, like it was before, but no sound was coming out. I fiddled with cables and mixer settings and all that for quite a while before finally googling it and discovering that other people had similar problems with Intel HD Audio chipsets under Linux. The solution once again was to go to Realtek’s web site and get their latest drivers. It’s annoying that it didn’t work out of the box, but at least Realtek isn’t one of those companies that tries to pretend Linux doesn’t even exist.

And finally, in order to get those old recordings I mentioned before, I had all sorts of fun trying to get USB enclosures working with one of the old SATA drives. I have three such enclosures, but still have yet to get this part done:

  • The first enclosure, from EagleTech, is one that I’ve already mostly destroyed just trying to get the case opened and closed, thanks to a tight fit and lack of grip points. But although it has a SATA data connector, it does not have a SATA power connector, the drive doesn’t have an old Molex power port, and it looks like an adapter between the two is the only little bit of hardware I don’t have in my big pile-o-parts.
  • The second enclosure, some generic brand picked up at Future Shop, wouldn’t even power on. Sigh.
  • And the third enclosure, from Acomdata, freaked out and generated all sorts of kernel errors when the USB driver tried to put it in high speed mode. It bumped it down to “full speed”, which means USB 1.1 at 12Mbps, and although it behaves at that speed, transferring over 600GB of data at that rate would take a week of nonstop copying.

Maybe I don’t need old TV episodes that badly…

Update: Yay, after a bit more scrounging around I managed to find a Molex-to-SATA power adapter after all and the EagleTech enclosure will work after all. The transfer should now only take about 6 hours instead of a whole week.

Back Online

I think I have all of the important stuff transferred over to the new system now, and if you’re reading this then I’ve obviously at least gotten the web services working. It’s also recording TV again, after MythTV reinstalled without a hiccup.

The only major remaining task now is transferring all of the old MythTV recordings from the old drives. That’s complicated slightly by the way I had split the filesystem over two drives, in order to use the extra space I got back on an RMA’d drive. I don’t really want to have to attach two USB enclosures to get at the data, but I think I can ‘dd’ one of them onto a local drive, attach it via loopback, and then switch the other drive into the enclosure.

So, the new setup has two internal 1TB drives, as opposed to the old system’s three drives (two 500GB, one 750GB). It’s not that much more total space, but I don’t trust the 1.5TB drives yet and this time I won’t be using RAID-1, so it’ll all be available. One drive is for the OS and /home, and the other will be solely for MythTV recordings, though I’ve set them up as logical volumes in LVM2 so I can shrink or grow them as needed.

One other new thing I’m trying this time around is having /home and swap be encrypted, roughly following this guide. Not that I have any particular national security secrets on here, but I’ve always been the paranoid type and it gives me a little peace of mind. Encryption often slows things down, but there’s a pretty beefy CPU in this box (a 3GHz E8400 that’s faster than my gaming system, even) and there isn’t too much loss. In some simple benchmarks, I get about 82MB/s off of the raw drive and 73MB/s off of the encrypted partition.

The one annoyance is that I have to manually mount /home after a reboot, since automatically doing it would defeat the purpose of encrypting it, but this system shouldn’t reboot too often anyway. Most of the essential 24/7 and MythTV services live outside of /home and don’t really need to be protected anyway.

Beauty And The Beast

My new Dell system arrived a bit earlier than expected. It’s not as tiny as some of the other HTPC solutions out there, but here it is compared to the behemoth that it’s replacing:

Despite its size, it’s still a pretty heavy little thing. As you’d expect things are pretty tight inside, with cables just barely reaching the spots they’re supposed to, but it was still fairly straightforward to open it up and put my own drives and tuner card in. The drive bays use this nifty mechanism where instead of being screwed into place, it uses the screws to guide you along channels to slide the drive into place and they’re then held with a plastic locking clip.

Installing Ubuntu was also fairly painless. I opted for a fresh install of 8.10 rather than just directly copying over the old install since some fundamental things have changed (e.g., audio support) and I’m not sure my old install was really set up properly by modern standards anymore. The only problem so far is that the built-in Ethernet driver for this chipset had horrible performance, with a lot of dropped packets. Fortunately Realtek had an updated driver on their site, and it works just fine.

So the new system is up and running, but there’s still a lot of work to bring it back into production…

Back…Sort Of

My old Linux box keeled over and died on me on the weekend, I’ve narrowed the problem down to either a bad motherboard or CPU, and it’s far too old to bother replacing individual parts on it, so I’ve gone ahead and ordered a replacement system. I’m kind of tired of assembling my own systems, for once.

It’s hard to find something that perfectly suits my needs: I wanted something that was small, quiet, capable of recording TV, could have lots of storage, had DVI or HDMI video output, and a powerful enough CPU to do some video work (potentially playing HD in the future). There are a lot of options that fulfill *some* of those requirements, but not *all* of them. The Dell Studio Hybrid lacked eSATA or FireWire 800, so storage would have been slow. The HP Slimline only had 100Mbit Ethernet. The Mac Mini is getting old and a potential refresh is too far away. And so on…

I eventually settled on the Dell Vostro 220s. The base spec isn’t perfect, and it’s a bit bigger than the Studio Hybrid, but the inadequacies can be overcome via the PCI/PCIe slots. I upgraded the video card and ordered a low-profile TV tuner card, which takes care of the DVI/HDMI and TV recording. There’s two internal bays, so storage won’t be a problem, and I can add an eSATA card later on if I want fast external storage.

It could be a few weeks before the new system arrives and is set up though, so for now I ripped the main boot/home drive out of the old server and have it running it on my gaming box. It actually booted straight off of a USB enclosure and ran with no major problems (just some device names changing), other than being a little on the slow side…

Double-Whoops

Amarok crashed on me just as it was completing a collection database scan, and it popped up a crash reporter and asked me to fill in some more information about what it was doing. I dutifully filled it out, and noticed that it was going to email the crash dump. I hadn’t configured KMail yet, so I went to the Tools/Configure KMail menu…

And then KMail crashed on me. No bug report for you!

Salvage

I upgraded my Linux server box to Ubuntu 8.10 tonight, and it went smoothly enough. Well, mostly… The big, complicated things like Apache, MySQL, and MythTV actually worked perfectly after the upgrade, and instead the glitches showed up in relatively small things, like the MP3 player. The files themselves were fine, but the collection database didn’t survive the change in version of Amarok, and I lost all of the non-ID3 metadata like ratings, play counts, etc.

I was able to recover some of it, from syncing back from the iPod and the playlist I still had loaded at the time, but it looks like I’ve lost about 2/3rds of the ratings. And I have backups of the MP3 files themselves, but not of the directory where it looks like Amarok stores the metadata, though it’s not clear if that would even help if it’s a version problem. Oh well, at least it’s easier to re-rate them on the fly through the iPod…

I Don’t Got The Power

I used to leave my gaming box running 24/7, partly out of laziness and partly because I would occasionally log into it during the day to kick off some kind of maintenance, or start downloads, or other things that I wanted done before I got home. It was a bit of a waste of power though, so for the last month or so I’ve been leaving it turned off as much as possible.

I got my power bill today, and I am indeed paying less — it was down from $57 to $42, and according to the stats I used 204 kWh this month versus around 260 kWh last month. It was also reflected in a nice little graph that remained fairly steady and then suddenly dropped.

Still, that was only about 21% of my usage and I could probably drop it further. I have a server system as well, and if it draws 200W on average, that’s 144 kWh per month right there. It does have to run 24/7 though, so I’d have to replace it with better parts (as previously discussed) rather than eliminate it, and if doing so saves another $15 per month, then it would pay for itself in a mere…80 months or so. Yeah, I know, I should be doing it anyway just for conservation’s sake. If I think of it like a game, then my min/maxing instincts start kicking in…

Field Test

I’ve put in a couple days of use of my new iPod Nano, and it’s working out well so far.

My main worry was about its ‘pocketfeel’ (hey, if food critics can have ‘mouthfeel’…) so that I can fiddle with it without having to take it out and look at it, and it does have a few quirks there: the shake-to-shuffle feature requires a *really* vigorous shake, which would be kind of embarrassing to perform in public and can’t be done within the confines of a pocket, but using the dial to advance to the next song isn’t a big deal. The ‘hold’ switch is a bit tricky — I can run a finger along the top to turn it off, but have to get the edge of a fingernail and find the switch to turn it back on. And I have to watch out when adjusting the volume. If it’s lying too horizontally, it switches into Cover Flow mode and you can’t adjust the volume there, so I have to make sure it’s tilted a bit upwards before changing the volume. They’re only minor problems, though.

I also managed to get it working with Amarok by installing iTunes on my XP machine and reformatting it with a Windows filesystem. And, as I hoped, it does indeed sync back updated ratings, play counts and times, and updates last.fm. The only quirk is that unmounting it still leaves the iPod saying “you must eject first…” on its screen, but it seems like unplugging it at that point doesn’t cause any harm.

Update: And it turns out I can sync it to both Amarok for music and iTunes for automatic podcast management, if I disable automatic syncing in iTunes and I make sure to sync to Amarok first or the rating and play count updates will be lost.

Update update: Ugh, okay, podcasts have some problems when I do it that way, with multiple copies of them showing up each time I switch between clients. I’ll have to try doing the podcasts from within Amarok as well.

Thin Is In

My iPod Nano arrived today, so here’s the obligatory vanity shot, showing off just how tiny even the retail packaging is:

There are apparently still some kinks to be worked out with its support under Linux, since it’s still brand new, so for now I’ve only fooled around with it in iTunes. I’d prefer to get Amarok working with it though, since the collection database is more easily synced there and I’d rather not have to reenter all of the ratings and such into iTunes.

Oh well, I’ve just filled it up with random songs for now.

You Can Have Too Many Backups

It’s time to wipe and reinstall my Windows box, since the accumulated crud on it is apparently interfering with games, so I’m in the middle of archiving all of the files on it onto the Linux box, since it still has plenty of space.

While setting it all up though, I noticed that one of the directories being copied contained a set of backup files I’d made earlier. And the destination directory also has a couple other archive files from previous incarnations of the system. And some of those archives probably contain other backups within them, leading to backups-within-backups-within-backups…

I could just delete them all, since if I haven’t touched them recently they probably don’t contain anything all that important, but my inner packrat tends to balk at such impulses. I’m always afraid of things like wanting to return to some game that I was mostly finished but whoops, I deleted all the save files inside an old backup… At some point I’m going to have to just expand them all out and merge them into one consolidated set of files, and then pick out the pieces I actually want to keep…

Surrender

Alright, uncle, I give up. I’ve fretted about choosing an MP3 player for far too long, so there’s a shiny new 16GB iPod Nano on its way to me now.

There’s decent support for the iPod under amarok now, so it might be fairly painless to sync it up with my existing library on the Linux server. Or I might experiment with the ‘proper’ iTunes way for a bit too, especially if any of those games catch my eye, though it’ll be a bit more of a pain to keep the library synced then.

Cook That Data

And speaking of SMART, I did a cursory check of the health of the current Linux box’s drives, and discovered that they were running a little warm. Like, 49-52C warm. When the recommended temperature is around 40C.

I guess the ventilation in that box isn’t as good as I thought, so I’ve opened up the case to let it cool off a bit, even though it lets a bit more noise escape, too. It’s dropped the temperatures by a few degrees, at least.

Maybe I should start worrying about replacing it with a better system sooner than I thought…

This Drive is DUMB

Though I might not be about to overhaul my PC setup, I did wind up ordering an external drive enclosure, and it arrived today. Unfortunately it’s not quite working out as well as I’d hoped; it was a tight squeeze getting the drive in, and one of the plugs that had to be undone to remove the drive tray was quite stubborn.

But the disappointing part is that the chipset this enclosure uses doesn’t appear to support the SMART commands. I have three drives left over from the previous Linux box, but I know one of them was going bad, and without the SMART status I can’t tell which one it was. I tried booting up the old box since I still had it lying around, but it shuts off a couple seconds after turning it on. It might be a power supply short, or a motherboard problem, but I’m not going to waste my time troubleshooting an ancient Pentium II system.

Oh well, it was a cheap enclosure and it’ll still serve its purpose as a somewhat more portable drive for data and backups, including the PS3 now.

Daydreaming

I’m not really very happy with my current home theatre/HTPC setup right now, mainly because the HTPC is a big, ugly, noisy, power-hungry tower made out of leftover components of older systems (typically stuff gets ‘handed down’ from my gaming system to the Linux box).

What I sometimes think of doing is replacing the whole thing with a small form factor PC of some sort, like a Mac Mini, which would certainly be much smaller, quieter, and use less power. But, in order for it to fulfill the same duties, some other pieces are needed:

TV capture
Fortunately MythTV and the Linux drivers support some USB capture cards, so I don’t need it built-in to the base system or a free PCI slot.

Storage
I’m currently using a fair bit of storage, and part of the reason the tower works well is that there’s plenty of room for hard drives in it. I have a total of 1.25TB of disk space across three drives right now, which certainly isn’t going to fit inside the Mini or any other SFF box.

So, what am I actually using all that space for? About 350GB of it is ‘personal’ files (pictures, music, non-TV video, documents, archives, etc.), 470GB of it is MythTV recordings, 40GB is backup data, and the rest is mostly free space. That makes things a bit hard to split up, since although I have 500GB and 750GB drives I can reuse, they’re 3.5″ and the internal Mini drive is a 2.5″, which limits me for now to 320GB of internal space (looks like the only 500GB 2.5″ drives right now are slower 5400RPM ones). There are probably other SFF boxes that will take 3.5″ internal drives, but it would take a bit more research.

In any case even if I can fit the 750GB drive into the HTPC, that’s still not enough total space, so some external space would be needed as well. I could slap 4x1TB drives into a Drobo…if I were rich. Since I’m not, a standard USB/FW enclosure will have to do. A 500GB internal drive for the personal files and a 750GB external drive for the MythTV recordings would probably suffice for quite a while (or possibly a double-drive enclosure for the other 500GB drive or future expansion).

There’s still the issue of backups though. There might be enough free space to squeeze them onto one of the above drives, but having them on the same system makes me a bit nervous. It would be better if backups were kept separately, which leads me to…

Networking
My old Linksys router is working fine, but it’s missing gigabit ethernet and Wireless-N, which would be rather nice now that I have systems capable of them (the Wireless-N in particular, since there’s still a fair bit of 2.4GHz interference around here). Both would be provided by something like Apple’s Time Capsule, with the added bonus of being able to do Time Machine backups to it for the laptop, and the ability to add a USB drive to it for some network storage, which could be used for the aforementioned backups.

Audio
It would be nice to clean up the audio mess too, since right now I’m routing the audio through two PCs in order to mix in the consoles and get everything to a single set of PC speakers, which means that I have to have the gaming PC turned on just to get the audio from the PS3. And right now I actually have two sound cards in the HTPC since I want some audio output to go to the TV (i.e., MythTV), and some to go to the computer speakers (everything else). Since I hardly ever actually use the console of the HTPC, I could just let everything route to the TV, and a decent receiver and set of speakers should take care of that.

In the end, the gaming PC would be hooked up directly to the PC speakers, with a headphone switch, and everything else would go to the receiver.

Power
Unfortunately the change to using external components winds up adding three wall warts to the AC power requirements, and it often feels like I’ve got too damn many of the things already. At least total power consumption would still be a bit lower.

Television
And I still need a new TV of some sort. I still need to do more research here, but it doesn’t really affect anything else as long as it has enough inputs (at least one HDMI for the PS3, one VGA for the 360, one component for the Wii, one more DVI/HDMI/VGA for the HTPC, and one or more HDMI/component for a potential future digital cable box, TiVo, or whatever).

Miscellaneous
I’d also probably need a new KVM so that I can continue to use a single keyboard and mouse for both the gaming box and the HTPC. I already have one, but it’s for PS/2 devices, and it’s about time to switch over to USB anyway.

Cost
At the bare minimum, just replacing the HTPC, I’d be looking at $650 for the Mini or comparable SFF box, $170 for the USB TV tuner, $60 for a decent enclosure, and $30 for a bare-bones VGA+USB KVM, for a total of $910. And that’s just to replace something that already works just fine with something that’s just quieter and smaller.

Then add on another $390 for a Time Capsule and another enclosure for the network and backup improvements, for a new total of $1300.

And then here’s where the daydreaming ends, since it would be nice. But not that nice…