Friday, June 22, 2012

Think INSIDE the Box for Once

I can't help it - it's my nature.  All this time with computers and esoteric problems always leads me to a complex and bizarre cause for any issue.  I am the original outside the box thinker: my problem is trying to think inside the box.

It might not be my fault... my dad is the same way with cars.  If I tell him my car is making a slight whirring noise, he tells me that it's probably the transmission.  This must be the transitive property of step-parents.  It operates in both directions, as I developed kidney stones years before he had one.  I figure I passed it up the line.  It also confuses the hell out of the hospital when you tell them that.


Tonight's goal: hook up an older linux laptop with an S-video output to our television.

This was something I wanted to do for a while but never got around to.    I decided to call it a goal so maybe there would be a small chance I would take a shot at it.  Since the wife took the night off crazy, it looked like an interesting project.

To anyone familiar with different video standards, this would not be a big problem.  Of course, the same could be said for heart surgery.

I figured a great place to start would be locating an S-video cable.  This is exactly the kind of detail that normally derails my projects.  S-video cables are mysterious little buggers that are omnipresent.  They're all around the tv area, in the computer room and the kitchen, every day of the week except the day you need one.  By some miracle there happened to be one of the very cables I needed with some other cables. This proves I have successfully outsmarted myself by hiding something in the exact place where it belongs.  By doing this, I virtually guaranteed I'd never find it.

Next up was plugging the cable into the tv and laptop.  Simple enough for even the dog, who is much smarter than me and was off evaluating his options vis-a-vis the trash.  In a perfect world, it is at this point everything would Just Work.  But as we all know, part of the joy of this blog is that I live in a world somewhat far-removed from perfect (to be polite).

Although I've been using linux for a few years, finding out about the S-video output on a laptop is not something that springs immediately to mind.  As usual, a search engine was my friend and off I went. Another thing I learned about linux is that video is generally a huge pain in the posterior.  Since I never needed the S-video output on the laptop, I obviously completely ignored it.

Searching around a bit revealed all sorts of interesting facts about video, S-video, cables and bizarre file modifications necessary to make all this happen.  Also there was something about malfunctions causing fuzz or a black and white picture.

With the help of xrandr, I managed to get the S-video out working.  Apparently the operating system didn't `know' there was an S-video out and it was my job to break the news as gently as possible (airborne laptops tend to become more difficult to operate with time).

Kirsle was of immediate assistance.  He showed me how to inform linux that there was indeed an S-video output like so:

xrandr --output S-video --set load_detection 1     for detecting the output
xrandr --output S-video --set tv_standard ntsc     use NTSC in the USA
xrandr --addmode S-video 1280x800     add this mode
xrandr --output S-video --mode 1280x800     use the specified resolution

For some strange reason, the S-video sprang to life and started appearing on my tv screen.  I was beside myself with joy.  And if you've ever seen me, you definitely don't want to see me beside myself or anywhere near myself.

One of the great parts of playing with xrandr is that it worked without having to play with xorg.conf  Xorg.conf was designed by the Illuminati but after a few years was outlawed by the Geneva Convention as being too cruel even for them.  It is a file that contains specifics of your video configuration.  Messing with it can improve your situation greatly or completely hose your video, requiring you to boot into command line only interface and figure out how to reverse all the damage you just did with a few small keystrokes.

After years of messing with xorg.conf and gaining the slightest knowledge of its structure and operation, some really funny fellow upstream in the Xorg Organization thought it would be kinda neat to do away with the xorg.conf file completely.  Thus the first time anyone had a video problem and went looking for xorg.conf to edit, they got a rather rude surprise, in that the file didn't exist.  And if you tried to use the file, well, you'd have better luck voting libertarian for president.

Heaven help you if you require a proprietary video driver.  You might as well light a candle to Satan and switch to Windows.

It became immediately obvious to me as well as the dog (black and white vision, you know) that the picture on the tv lacked color.  In fact, it lacked just about every color.   Remembering that I saw something about black and white picture, I went back to searching for reasons the picture would lack color.

The fixes varied wildly from further xorg.conf suggestions to driver ideas, all the way down to cable selection.  Of course none of them applied or worked.

I was fairly flummoxed.  At this point it occurred to me to try thinking inside the box.  I pulled the S-video cable from the tv, blew on it, plugged it back in, and beheld Immediate and Glorious Color, just like on my laptop screen!  The picture was fairly stunning, especially as I was expecting to see some crappy streamed internet video blown all the way up to an old 32" flat screen CRT.  Aside from the normal streaming hiccups, the video was almost broadcast quality.

I used a set of external speakers for audio, as I didn't want to make up adapters to get the sound from the computer into the tv.  A project for later this week will be figuring out how to control this all remotely.  This will most likely involve my good friend x11vnc, so I can use the laptop on my actual lap to remote control the laptop across the room that's streaming to the tv.  It's just about the height of laziness and I'm damn proud.

But mostly I wanted this to serve as a reminder to all of us to Sweat the Simple Stuff First, lest you chase all over hell's half acre looking for a solution you'll never find.

Hey - did you plug it in?




===============================

If you like this blog, why not tell a few friends?

No comments:

Post a Comment