Archive for the 'Geek Traps' Category

Part 2: Connections and Configuration

February 3rd, 2009 by peasleer

In part one of this series, I covered the hardware and basic operating system installation for a home theater PC running Mythbuntu. In other words, part one covered the easy stuff. Running the audio cables between the PC and the TV is actually a more complicated affair than I had imagined, yielding three major issues that had to be overcome before ending up with an acceptable configuration.

The blue lights are very subtle, but neat in the dark

The blue lights are very subtle, but neat in the dark

1. Audio

I should clarify that connecting the cables isn’t the problem, it is the technical limitations and configuration issues accompanying their connection that poses challenges. My audio connection is straight stereo-out to stereo-in via a 10 foot 3.5mm interconnect. Upon plugging it in and turning on the TV however, no audio was present. The reason behind the problem ended up being with how ALSA was loading modules, and was easily fixed with a configuration change. If you copy my setup and are using a Creative Audigy 2 sound card with an Ubuntu variant, try the following:

  1. Run ‘alsamixer’ on the command line and verify your Master and PCM channels are turned up.
  2. Verify you have your cable plugged in to the correct slot on your sound card.
  3. My fix: another sound device (my motherboard’s onboard sound) was stealing ALSA’s focus. Adding the following to /etc/modprobe.d/blacklist and rebooting fixed my problem: blacklist snd_intel8x0

2. Video – Analog Connection via DSUB15

The Viera has an analog mini-DSUB 15 port for hooking up a PC directly to the TV. I had never had an issue with signal quality before on smaller monitors, so I didn’t forsee any problems with hooking a ten foot VGA cable from the computer to the TV. There are a multitude of issues with this setup, however.

First, read the specifications for the Viera carefully (in the manual, I couldn’t find the information anywhere else), and Panasonic states the TV is capable of producing a maximum resolution of 1280×1024@60hz. This is a slight problem, because in order to display content at 1080p, 1080 lines of vertical resolution are needed. Furthermore, with a 10′ run of analog signal 1024×768 is clean, but pushing 1280×1024 causes a significant amount of signal and color bleeding.

The pits of this is that if you stick with an analog connection, you are really stuck with these problems. You can clean up the signal by running a shorter cable from the HTPC and the TV, but that limits the placement of the machine. The resolution limitation is the real kicker, as spending all of that money on a HDTV capable of producing 1080p becomes a complete waste if you can only fully display 720p content. I refused to believe that the TV couldn’t produce its native resolution of 1920×1080 from a computer source, so the next fix comes from addressing that issue.

3. Video – Digital Connection via DVI -> HDMI (and More Audio Solutions)

The TV is capable of producing 1080p from a source connected through component or HDMI cables, displaying at 1920×1080. My solution to the problems found in section two of this post was to then find a way to get my HTPC’s video output to an HDMI cable. HDMI is really only DVI with added support for sound, so another $15 purchase of a DVI -> HDMI cable and a week of waiting was all I needed to make the connection. The benefit was immediate – being digital, there is no signal bleeding or interference. The drawbacks presented themselves just as quickly, however. I found that my analog audio connection had cut out, I could no longer produce sound on the TV. Additionally, the HTPC was displaying at 1920×1080, but the TV was only displaying a portion of it, with my mouse going off-screen to access common menus.

The video display was the most immediately annoying part. Reading many online forums suggested that it was a problem with overscanning, and there were even guides on how to access the service menus of the Viera to grant a 1:1 pixel match (effectively disabling overscanning). I haven’t found this documented anywhere else, so I want to say it clearly: ADJUSTING YOUR VIERA’S OVERSCAN SETTINGS IS UNNECESSARY (is it still bad design to use marquee and blink tags? I’m tempted to use them here). The easy and smart fix is documented in the service manual (not the user manual), and is as easy as the following:

  1. Plug in your DVI -> HDMI cable, ensure your source HTPC is on and change the TV’s video input so the HTPC’s screen is visible.
  2. On your remote, press “Menu,” then go to “Picture”
  3. Scroll down to the second screen, and go to “Advanced Picture”
  4. Go to the last option, “HD size,” and change it from “1″ to “2″

That fixed it for me. Restarting Xorg and a change of the resolution to 1920×1280@55hz had me running in full high-def glory. But without sound.

The sound issue was a nuisance. HDMI normally carries a digital audio signal with the digital video feed, so the Viera is nice enough to automatically ignore all analog audio input sources when your display comes from an HDMI source. Unfortunately, getting audio spit out over DVI was more difficult than I cared to pursue (with a lot of forums claiming the task impossible), and buying a DVI + analog audio -> HDMI converter is in excess of 200 euros. Again, the simpler and smarter solution is again in the Viera service manual (not the user manual), and can again be done by following these steps:

  1. Plug in your HTPC and get it set up again so the screen is visible.
  2. On your remote, press “Menu,” then go to “Audio”
  3. Select “Advanced audio”
  4. Go to “HDMI 1 in” (or to whichever port your HTPC is plugged in to)
  5. Scroll over until the port your audio source is in is selected (I selected “PC”)

You should now have overridden the default of using the digital signal from your HDMI cable to now use the analog input.

For me, these three steps resolved the major issues (and relieved the major headaches) I encountered while setting up my HTPC. I sincerely hope that these steps will help people avoid making the mistakes I did, and save them the many days spent polling forums looking for answers to these issues. In part three of this series of posts, I will address setting up the system to make retrieving media especially easy, and some other configuration tweaks that make my system an easy-to-use content retrieving monster. Subscribing to my RSS feed will ensure you don’t miss it.

I’m off to watch The Dark Knight in 1080p – until next time!

Mac Vs. PC

September 30th, 2008 by peasleer

You know all those Mac vs. PC ads that Apple has been running? Well I’ve got a good retort for Microsoft’s counter-campaign:

“Vista: IT DOESN’T GIVE YOU CANCER.”

More here [zdnet].

(It should be noted that I doubt this is really limited to Apple products. A lot of new plastics come with factory toxins hitching a ride – that new car smell is another offender. I just saw low-hanging fruit and took it.)

Filed under the “geek traps” category, and tagged with the brand-new “Using computers will eventually kill you” tag. I think both are appropriate ;)

“qemu-img: error while writing”

January 4th, 2008 by peasleer

When converting a raw image (such as an image created using dd) to a VMWare vmdk image in Windows using Qemu’s qemu-img utility, I came across an error. The command I used is as follows:

qemu-img convert -f raw L:\\VMtmp\\winImage.img -O vmdk D:\\vmtmp\\xp.vmdk

Which works fine until the output image reached 2GB in size, at which point it exits with this error:

qemu-img: error while writing

Yay for descriptive error messages! I hunted through the qemu-devel mailing lists, as this is an apparently undocumented feature. The cause behind the error is that the Qemu binaries were compiled for Windows with MinGW, which apparently doesn’t have large file support built in. So the solution to the problem is to either compile your own version of Qemu for Windows using Cygwin (which has had large file support for some time), or do what I do – use linux. The Qemu binaries in linux aren’t affected by this problem, and you can create files of whatever size you desire.

Geek Trap: Your Body and How to Abuse It

August 20th, 2007 by peasleer

If you are a geek, you probably find that your hands are on your list of top 5 favorite body parts. And they should be! They allow you to code, solder, and… well, hands do a lot. Unfortunately those highly valued appendages aren’t indestructible, and after spending a large amount of time at a keyboard they will deteriorate. That is right: I’m talking about repetitive strain injuries, or RSIs.

I’ve gone through it: wrist pain, tingly fingers, and joint aches caused by long hours at the keyboard for work and pleasure. You can find many pages on the subject, but none of them say what I have discovered about the condition.

It sucks.

The sites on RSI all tell you not to work through the pain, but to address the pain and take steps to remedy it as soon as possible. That might work if I weren’t a young male with a mild case of a testosterone induced invincibility complex. I initially tried to just keep clacking away on the keyboard, not wanting to forfeit time at home on my individual projects, and not wanting to be unproductive at work. It was a bad idea. I reached the point where I had a constant pain in my wrist and a tingling sensation in my thumb. It probably would have gone away if I had eased off for a bit to heal.

Those well informed sites will also tell you to take breaks regularly to give your body a break. I had always thought of taking breaks as a sign of weakness (thanks RIT!), so I dutifully ignored the suggestion. What I learned when I did start to take breaks was that our academic institutions were hiding that breaks can be fun. I’ve learned that if you plan your work around your breaks, about one 10-15 minute break every 90-120 minutes depending on how well you are concentrating on a particular day, you can increase productivity. This time range blocks your time into ‘productivity pockets’ (my term, don’t steal it) that are highly recommended by concentration ninjas. So just as I start to feel the productivity decline of mental exhaustion, I go bother a co-worker or refill my coffee cup – sometimes both. My hands appreciate it, my brain re-energizes, and I hit my next productivity pocket (seriously, that phrase is my invention) I’m refreshed and ready to go.

And as far as “exercise” goes, it really does help. I tried a couple things, like holding my palms outstretched and trying to push down and then up on a horizontal surface. I looked kind of silly. I instead recommend what I feel has really made the greatest difference in healing my RSI: power putty. I’m not product placing or anything, the stuff works for a couple reasons. First, it gives you something dynamic to do with your hands. Squeezing those metal spring-resistance devices might work, but they bore me nearly to nap time. Squeezing a putty gives your hand something to do that you can’t really predict, so it doesn’t get old. Second and more importantly: it doesn’t look stupid while you do it at your desk. This greatly increases the odds that I’ll actually use it. And I guess third, it comes in a container shaped like a little fist, which could be used as a symbol of a political uprising or revolution, whichever comes first.