Wednesday, June 25, 2008

Mythbuntu 8.04 Configuration & Review

For the past 16 months I have been using a simple home theater PC as a podcast aggregator, bittorrent client, and media center. The system consists of the following:
  • Shuttle SN21G5 barebones kit
  • AMD Athlon64 3200+ CPU
  • 512MB DDR400 RAM
  • 500GB SATA HD
  • nVidia 7600GS GPU (w/heatsink only for silent operation)
  • 8x DVD Burner
  • Sharp 720p HDTV
Running Ubuntu, this system has performed admirably and despite the humble specs can play anything I have thrown at it. As an interface I used the Avant Window Navigator (think OSX dock) to simplify the GUI and help me get around the overscan that is unavoidable on my HDTV. This still left me using a wireless mouse and Apple wireless keyboard to manage and play my media.

I explored using my PS3 as a media center and using my HTPC as a DLNA server; but the PS3's codec support is abysmal, especially when trying to stream content to it. Giving up on that option, I found some info about Mythbuntu and decided to try it out with my existing setup.

Mythbuntu is based on the Xubuntu, but all the superfluous parts (OpenOffice, GIMP, etc) have been removed and MythTV added; a customized installer and configuration editor round out the experience. The big advantage of Mythbuntu is that it handles a lot of the backend configuration on its own and provides a solid base for your HTPC experience.

After installing Mythbuntu I set about achieving the following objectives:
  1. enable SPDIF sound output
  2. connect to Apple wireless keyboard
  3. correct overscan issues
  4. configure remote control interface to work with Logitech Harmony 520
SPDIF
I wanted to use SPDIF because it is digital and allows for multichannel audio. Xubuntu's built-in audio mixer, while providing the correct options for SPDIF operation, did not function properly. To resolve this I installed the gnome-media package from the repository; this includes the Gnome audio mixer and sound recorder among other handy plug-ins. After installation I was able to use my SPDIF output by checking the IEC958 box and setting the IEC958 slider to 0 in the gnome-volume-control.

Apple Wireless Keyboard
One of the downsides to Mythbuntu's minimalist installation is its lack of many common software utilities. In this case the absence of any bluetooth related applications prevented me from following my own tutorial for syncing my keyboard to my HTPC. In order to get around this I installed Blueman. It is a very solid bluetooth manager and I successfully connected my keyboard without issue.

Overscan
Probably everyone who has ever connected their computer to a television has had to deal with overscan. This annoying feature that cuts off the outside edges of the screen can be turned off on some HDTVs. Unfortunately mine does not offer this feature and so I have had to find other ways of getting around this.

The first fix involves setting screen margins in the Workspaces and Margins utility. This restricts window sizes so that full screened windows do not extend out of view. I set my left and right margins to 32 pixels and my top and bottom margins to 16 pixels.

The second and more important fix sets similar margins within the MythTV application itself. Inside the Utilities/Setup-Setup-Appearance menu there is are options for GUI width & height sizes as well as GUI X & Y offsets. I used the following settings to compensate for my HDTV's overscan:
  • GUI width = 1220px
  • GUI height = 690px
  • GUI X offset = 30px
  • GUI Y offset = 15px
Remote Control
According to the Mythbuntu website regarding recommended remote controls, "I recommend the Windows Media Center (MCEUSB2) remote. It is a great remote and if you don't have one, then get one." Based on this I determined that a WMC remote was the way to go. Browsing around Newegg I found one that looked promising with multiple customer reviews stating its compatibility with MythTV. Using the Mythbuntu Control Center I checked the Enable a Remote Control box and selected the Windows Media Center remotes (new version) option from the drop-down box.

Once I had the Anyware GP-IR02BK remote working I set about configuring my Logitech Harmony 520 to match. In the Harmony software I performed the following, Add Device-Computer-Media Center PC-Anyware GP-IR02BK. Then I added this device to my existing HTPC activity (which sets my HDTV & Receiver to the correct inputs) and customized the buttons to match the Anyware remote as much as possible. The only issue I ran into was that the Back button does not work, however the Stop button performs the same functionality so I just modified my Harmony configuration. Now I can control my whole setup with one remote.

Review
Thus far I have been very impressed with Mythbuntu's capabilities as a media center. The installer is well designed and does its job quickly. The interface is snappy and very usable. The Video & Music Players are decent, but I wish the browser tree was a little more customizable. My only major criticism is that the file browser does not automatically update when files are moved, deleted, or added. Overall Mythbuntu is a vast improvement over my previous setup and I am pleased with my decision to switch.

Labels:

Tuesday, June 24, 2008

OpenSUSE 11.0 Impressions

OpenSUSE 11.0 was released last week and I have been trying it out on my Dell XPS m1330 using the Gnome & KDE LiveCDs as well as installing it on my Athlon64 based desktop. As far as features go I really like openSUSE. The DVD installer is particularly good, allowing the user to pick exactly which packages they wish to install. This is something I wish Ubuntu did as well. I also liked openSUSE's implementation of Compiz-Fusion desktop effects. Instead of relying solely on the comprehensive but confusing Advanced Compiz Configuration application like Ubuntu, openSUSE has another much simpler Desktop Effects application that provides simple check boxes and drop down menus to configure the most commonly used options.

Aside from these high points I was fairly disappointed with openSUSE. The navigation menus in both Gnome & KDE are overly cluttered, confusing, and often redundant. Why have a menu item for Internet with a sub-menu labeled Web Browser that only contains one entry for Firefox? If the distribution had multiple browsers installed I could understand their reasoning; but why not leave this sort of configuration to the user as Ubuntu does? The KDE interface is especially clunky, to the point of being almost unusable. I have never been a fan of KDE and I realize that KDE 4 is far from finished but nothing I have seen has come close to swaying my view that Gnome is still the best GUI for Linux. Similar to my views on Gnome vs KDE, my opinion of non Debian based distributions of Linux has also not changed. The combined benefits of broad support and flexibility are unsurpassed as evidenced in the absence of very common software packages from the openSUSE repositories. OpenSUSE also did not resolve any of the issues I had with Ubuntu 8.04, namely the CPU scaling issue. While the suspend-resume worked fine, the second CPU core still runs at full speed when the system is resumed.

While openSUSE 11.0 is certainly not a bad distribution of Linux, it just isn't for me. The quality and level of detail afforded by the installer make this a better choice for a more customized application, such as a server, than for a desktop. The DVD installer includes whole sections of server software for just such a task. The hardware support was very good and was at least comparable to Ubuntu 8.04.

Labels:

Saturday, June 21, 2008

Rockbox Video Playback

I have been running the Rockbox firmware on my Sansa e280 for almost a year now and I like it a lot. Recently I was finally able to get the video playback feature to work and the following is a brief summary of how I accomplished this.

The Rockbox MPEG Player Plugin page describes how to use the cross platform program WinFF to encode files not only for the Sansa but also some of the other players that Rockbox supports. It warns, however, that depending on your Linux distribution the version of FFMPEG installed may not support MP3 audio and that you have to compile your own version that does support MP3 in order for WinFF to function properly. This can be an enormous pain to do. Luckily there is a much easier way to get around this. The FFMPEG Wiki has a repository listing for an alternate version of FFMPEG with MP3 support already built-in.

After adding this listing to my APT repository I installed FFMPEG and WinFF and have been successfully converting files to play on my Sansa ever since. WinFF is a nice little program. It has preset encoding settings for use with Rockbox and the Sansa (presets are also included for other players) as well as support for batch conversions, so you can tell it to convert several videos and come back later when they're done.

Labels:

Monday, May 19, 2008

Dell XPS M1330n w/ Ubuntu 8.04 Review



Ever since Dell started selling systems with Ubuntu, I considered buying one as a show of support for the pre-installed Linux market. I have been playing with Ubuntu since version 5.04 (Hoary) and have used it regularly since version 6.06 (Dapper). For the past 6 months I had been running 7.10 (Gutsy) primarily on my Lenovo Thinkpad T61, but I decided I wanted a smaller, lighter, and more portable workstation. Consequently last week I purchased a Dell XPS M1330.

The specs are as follows:

  • 2GHz Core 2 Duo
  • 2GB RAM
  • 160GB hard drive
  • nVidia 8400m GS graphics w/ 128MB onboard memory
  • DVD burner
  • 10/100 NIC
  • Intel 3945 ABG wireless
  • Bluetooth
  • Firewire
  • SD card reader
  • 2x USB
  • HDMI & VGA video out
  • VGA Webcam
  • 13.3” screen with LED backlight
  • 4.5 lbs (with the 6-cell battery)
As shown in the picture, the system comes with a slip case, manual in binder, Ubuntu 7.10 CD, Webcam application CD (for Windows), and a small 65W AC adapter.

Although I ordered my new laptop with Ubuntu 7.10 installed, I wanted a dual-boot setup with Windows XP for gaming and Ubuntu 8.04 (Hardy) for everything else. Consequently I removed all of the partitions that Dell had setup on the machine, which include a recovery partition which can be used to reinstall the system (you can also download Dell's custom Ubuntu DVD image). I setup my new partitions as follows: 40GB NTFS (XP), 25 GB ext3 (/), 80GB ext3 (/home), 4GB (swap). As you can see I setup my system with a separate /home partition which is very handy for reinstalling your OS without losing any of your data or settings.

The following is a list of what works out of the box after installing Ubuntu 8.04:

  • Wifi (I connected to my router using WPA encryption without issue)
  • Bluetooth (I successfully connected to my cell phone but have not really played with this too much)
  • Suspend/Hibernate – Resume
  • Webcam & Built-in Microphone (installed Cheese and I can take pictures and video with the webcam, make sure you set your Digital Input Source in the Alsa Mixer to Digital Mic in order for the webcam's built-in microphone to work)
  • Headphone Jacks, Speakers, & Microphone Jack (in order for the 2nd Headphone Jack to work you need to enable the Surround output in the Alsa Mixer and Unmute it, to use the Microphone Jack set the Digital Input Source to Analog Inputs, set Input Source to Front Mic and make sure you check the Capture recording levels in the Alsa Mixer)
  • SD Card Reader (works with SD and SDHC cards)
  • USB ports
  • DVD Burner
  • 10/100 NIC
  • Firewire (mounted external hard drive without issue)
  • HDMI and VGA video outputs (works perfectly using the nVidia Settings application which can be installed with Apt)
  • Media Control Buttons (volume & eject buttons work well, but the play/pause, stop, next, and previous buttons only work with certain applications)

The following is a list of of tweaks and fixes that I made to get my system working as close to perfect as I could:

  • Hard Drive Load Cycle Bug fix (without this I experienced some rather disturbing clicks every so often due to the hard drive parking its read heads too often, which can shorten the life of the hard drive)
  • Add Dell's Personal Package Archive into Apt
  • Blueman bluetooth manager (adds functionality not present in the built-in bluetooth application)
  • Wifi activity LED fix (without this the Wifi LED does not turn on regardless of Wifi state)
  • CPU Scaling (set your CPU to run lower speeds while idle and on battery power)
  • Temperature Monitor (keep track of your CPU's temperature)
  • Configure Logitech Mouse (enable all those special buttons' custom abilities)
  • Firefox 3 custom bookmark icons (this was necessary because firefox's bookmark icons do not match the applied icon theme and instead default to the horrible root icon set, to remedy this create a custom userChrome.css file in your home directory's /.mozilla/firefox/~.default/chrome folder)
  • Configure the Home button using the System-Preferences-Keyboard Shortcuts application

Problems I have yet to find solutions for:

  • After Resume from Suspend the 2nd CPU core goes into performance mode, staying constantly at the maximum clock speed (Update - 6/28/08 - this appears to have been fixed in one of the recent kernel updates)
  • Screen Brightness adjustment is not very sensitive, one button press (Fn+Down) takes the screen from full to half brightness
  • There doesn't seem to be a way to turn off the Bluetooth radio other than the wireless switch (which also turns off the Wifi) except in the bios

Additional helpful websites:

Overall I have been very pleased with this system. It has a fantastic form factor which is light and thin. The keyboard is very good and in many ways I actually prefer it to the Thinkpad's. The LED backlit screen is very sharp and has considerably better contrast, brightness and viewing angles than the Thinkpad's. The glare due to the reflective coating is also minimal. I do wish that the touchpad were larger (a gripe I shared with the Thinkpad) but it works fine in general, and I use a wireless mouse primarily anyway. I am most pleased that this machine runs cooler than the Thinkpad and with considerably better battery life, most likely due to the much smaller screen and more efficient backlight. So far I have been able to get around 4 hours of use with the wireless off and the screen set to half brightness and over 3 hours of general use with the wireless on.

Labels:

Monday, March 10, 2008

Arduino (Part 2)

Having never dealt with the Arduino's software package before, I wasn't sure what to expect. It is a simplistic Java application which provides a very user friendly environment to write your programs (or sketches as they are called) in. The programming syntax used is similar to C, but the environment has many useful functions already built in so it's very easy to do simple tasks such as set a pin as an output or toggle an output on & off. As someone who has used other languages, PICBasic for example, I can attest to how intuitive these functions are when compared to manually setting register ports in BASIC. Like in C you can also create your own functions and call them, making this a very powerful language despite its simplicity.

The installation of the Arduino software is fairly straightforward, even on Linux, and I encountered no issues. In Ubuntu it entails downloading the application from the Arduino Software page and following their well written instructions. These mainly involve installing Java and removing a package which inadvertently thinks the Arduino is a braille reading device and grabs your computer's USB port. Left out of the instructions is an issue which caused me some problems; the Arduino software should be run with root privileges in order to gain access to the USB port and consequently the Arduino board. This is done by opening the terminal and executing the following commands:

cd /home/username/Arduino-0010
(navigates to the Arduino software's folder)
sudo ./arduino
(runs the Arduino software script with root permissions)

The application will now launch. Once running I selected my board under Tools - Board - Arduino Diecimila (currently the newest board design and bootloader) and picked my USB port under Tools - Serial Port - /dev/ttyUSB0. Since I built my Arduino from scratch, my ATMega168 did not come pre-burned with the Arduino Diecimila bootloader. The bootloader functions as a sort of operating system for the microcontroller, allowing you to transfer files over a serial port instead of having to re-burn the entire firmware every time you change your program, thus simplifying the entire process. In order to burn the bootloader I plugged my AVR programmer into the 6 pin ISP header on the board and selected Tools - Burn Bootloader - w/ USBtinyISP. The software displays its progress on the bottom of the screen and lets you know when it has finished burning the file to the chip. To check if the bootloader is running properly follow this guide (since the various bootloaders behave differently). Next I wrote a simple LED flasher sketch and after plugging in the FTDI cable I successfully uploaded the sketch to the board and it ran perfectly.

Labels: , ,

Friday, November 30, 2007

Play Sirius Internet Radio on Linux Computer

I am posting this because I finally found a solution to a problem that I have been unable to solve for some time. The Sirius Internet Radio player uses an ActiveX plugin to stream audio over the internet. Since computers that use Linux do not have this ActiveX plugin, I thought it was impossible to use Sirius' Internet player. I have since seen some crazy hacks in the Ubuntu forums where people bend over backwards to get it working. Recently though I found a very simple solution which uses a Mozilla Firefox Extension to redirect the audio stream to a media player within Linux and it works perfectly.

These instructions are a slightly modified version of what is found in the Ubuntu Guide which is a very useful resource for setting up an Ubuntu installation.

Enable Sirius Internet Radio for Firefox

After authenticating, you will now be able to select which stream to play. Selecting the stream will launch VLC automatically (if you have configured the plugin to do so).

Labels:

Saturday, November 17, 2007

Apple Wireless Keyboard Setup (Ubuntu 7.10)


Last week I purchased a Apple Wireless Keyboard for use with my home theater PC. I had wanted to get a wireless keyboard for a while and the new Apple keyboards are super thin and the wireless one uses Bluetooth, so it has exceptional range. As is sometimes the case with Linux, this device is not as plug and play as we might like. Even though Ubuntu 7.10 (Gutsy) has more built-in Bluetooth utilities than previous versions, it still requires some more advanced setup to get properly synced with the computer. The following tutorial is mostly taken from an Ubuntu Forum Thread, but I have edited it to include some additions from replies to the original thread and for clarity.

Note: the expression XX:XX:XX:XX:XX:XX represents your particular keyboard's device address and it should be inserted wherever else it appears in the tutorial. This tutorial worked for me for the new aluminum style wireless keyboard pictured, I have not tried it with the older style keyboard.

  • Install the package bluez-gnome
Code:

user@ubuntu:~$ sudo apt-get install bluetooth bluez-gnome

Restart your desktop session by logging out and logging in again. This will automatically start the bluetooth applet which will help you enter the PIN during the bluetooth pairing process.


  • Find out the Bluetooth Hardware Device Address of the Apple Keyboard
Code:

user@ubuntu:~$ hcitool scan

Scanning ...

XX:XX:XX:XX:XX:XX Apple Wireless Keyboard


  • Edit the file /etc/bluetooth/hcid.conf

Code:

user@ubuntu:~$ sudo gedit /etc/bluetooth/hcid.conf

Enter the following stanza at the end of the file:

device XX:XX:XX:XX:XX:XX {

name "Apple Wireless Keyboard";

auth enable;

encrypt enable;

}

Save the file and close gedit.


  • Enable HID-support at start-up:

Code:

user@ubuntu:~$ sudo gedit /etc/default/bluetooth

Change "HIDD_ENABLED=1"

Save the file, close gedit


  • Restart the Bluetooth subsystem

Code:

user@ubuntu:~$ sudo /etc/init.d/bluetooth restart

* Restarting Bluetooth services... [ ok ]

Notice that this will terminate any active bluetooth connections. However, reconnecting should not be a problem


  • Complete the device pairing

Restart the keyboard again using the switch on the side to make it discoverable. Do not hit any keys on your Apple Keyboard unless this tutorial says so. It might cause all sorts of strange trouble during the pairing procedure. Right after restarting the keyboard, run the following command:

Code:

user@ubuntu:~$ sudo hidd --connect XX:XX:XX:XX:XX:XX

Ubuntu will now try to connect to the keyboard without showing any progress bar or other output. Enter the PIN 0000 and hit the enter key (both on your Apple Keyboard). Right after hitting enter, a notification window should pop up on your desktop asking you for the PIN you just entered. Enter it. "hidd" should finish without further outputs. You should now be set up.

Labels:

Friday, August 10, 2007

Music Management in Linux

Recently I have been dealing with my music collection a lot more than usual after I purchased a Sandisk Sansa e280 MP3 player. This player works with linux (unlike many other MP3 players) because it can be set to interact with a computer the same way a usb thumbdrive does, as a universal mass-storage device. I had considered a couple other players that also operate in this manner, but the Sansa is the best value for the money due to its built in MicroSD slot for easy expansion. With this new piece of hardware in hand I decided it was finally time to get my music files in order. As you may or may not know MP3 files have a tagging system built into them that allows you to provide MP3 playing software and devices information about the song being played (artist, album, track, song title, year recorded, etc.) beyond that provided by the filename itself. Since most of my music library I did not copy and encode from CDs myself, the tags in each file are not consistent in quality. This creates a problem when songs are loaded onto an MP3 player or into library based music software (iTunes, Songbird, Amarok, Rhythmbox, etc.). For example I have a folder of music by The Beatles; but the artist tags for these files range from Beatles, to The Beatles, to Beatles, The. So instead of one band listing, I have three; definitely not a desirable situation. I also wanted to find some good music ripping, encoding, and converting software for linux to deal with any new CDs I want to add to my collection. After a fair amount of research on the web I found a lot of very useful programs built into the Ubuntu Linux repositories that can perform all the tasks I need.

Tagging Tools
EasyTag - Scans your music folder(s) and can use simple scripts or CD databases to fill in missing tag information

Tag Tool - Similar to EasyTag, but with a simpler interface, faster performance and less features

Since the Sansa does not easily support playlists when used in UMS mode (just try a Google search and see the insanity people have gone through to try to get this to work), I need to get my MP3 tags in order because this is how the player organizes the music placed in it. Not being tied to playlists also frees me up to use better music playing software that automatically updates it's database without requiring me to make a new master playlist (like I would have had to do in WinAmp or XMMS, etc.)

Ripping/Encoding, Converting Tools
Sound Juicer- Installed in Ubuntu by default, can encode to FLAC and OGG Vorbis out of the box, can't encode CDs to MP3 format without additional libraries installed, fast

SoundConverter - I use this to convert FLAC to MP3, very simple to use, reasonably fast

You may be wondering why I don't just rip my CDs directly to MP3. FLAC (Free Lossless Audio Codec) is an open-source compression technique that maintains the audio quality of the original CD while being smaller in file size. By ripping CDs to FLAC I then have the flexibility to later convert them to whatever format I wish without having to re-rip the CD. I had considered another music player that plays OGG Vorbis files (an open-source alternative to MP3), however, the overall value of the Sansa won me over.


Update (9/14/07)
I recently tried the Rockbox open source firmware for my Sansa. It is head and shoulders above the original default firmware on the player. Check out my other blog for my article detailing my experience with it. It is very easy to setup (regardless of OS) and improves the player in every aspect.

Labels: