Sunday, January 30, 2011

Gandalf Vs Dumbledore: The Great Debate (Warning: Strong Language!)

Hello folks!

Read this the other day on the wonderfully funny Failbook and just thought it was too funny not to share. I paraphrased it slightly, but you can find the original post here. Special thanks to the fellow with the Batman(?) avatar.

Warning: Strong language!


































You have been warned.


Gandalf Vs Dumbledore

Lemme break it down for you. Dumbledore is pretty sweet. he runs a school where all sorts of crazy shit goes down. He has a bird that spontaneously com-busts and a pretty sweet office. Oh and he dies helping to save the world. No doubting: Dumbledore is pretty bad ass.

But then there's Gandalf

First, he finds the root of all evil, and lays out a plan to save the world. When he gets shit on by his buddy Saruman, he escapes by TALKING TO A MOTH, so that the moth can go get his buddy A GIANT FUCKING EAGLE to fly him off the roof of Saruman's tower. Then he hooks back up with Frodo and the gang. But wait, HE DIES. It is important to note however that he dies FIGHTING A GIANT FLAME DAEMON with a MOTHERFUCKING WHIP. Now, normally, dying would be a problem for most people.

FUCK THAT.

Gandalf just shrugs it off LIKE A BOSS and comes back to finish what he started. He also decided to update his wardrobe with some pimpin' white robes. Now fully pimped out, he tells everybody the plan then dips for a minute to handle some shit elsewhere, cause that's how Gandalf motherfucking rolls.

Then right when shit starts hitting the fan at Helm's Deep, he shows up WITH A GIANT FUCKING ARMY. Oh, and did I mention he shows up on the KING OF HORSES....RIDING BAREBACK?!?! So, not only does Gandalf have figurative balls of steel, he undoubtedly has ACTUAL BALLS OF STEEL.

Finally, after cleaning shit up at Minas Tirith, he peaces out and lets all the hobbits and humans enjoy a world PURGED OF ALL EVIL.

So, to recap,

Dumbledore: mentors the younger generation, sacrifices his live for the greater good.

Gandalf: Talks to animals, gives death the middle finger, constantly saves everybody else's ass, and then when it's all said and done, just leaves everyone else with all the spoils of war.

Gandalf WINS.

Saturday, January 29, 2011

LIRC module disable by update

Good evening everyone,

The other day I ran my system updates and one of the packages that got updated was a package called "lirc-modules-source".

Unfortunately, as a result of this update, my remote control and IR blaster was disabled.

Apparently, the kernel module I used for my infrared equipment, lirc_zilog, was removed in the update. The source file for the module was still available, but all traces of the *.ko weren't to be found.

In addition, I could no longer build the kernel module due to some changes in the newest Ubuntu version. I still intend to do some more research on *why* the update removed the module, but fortunately due to a very helpful blogger I found a very simple set of instructions to repair it:

* sudo bash
* apt-get remove lirc-modules-source
* rm -rf /usr/src/lirc-0.8.6/
* apt-get install lirc-modules-source
* cd /usr/src/lirc-0.8.6
* wget http://bobkmertz.com/blog-files/zilog-for-lucid.diff
* patch -p0 < zilog-for-lucid.diff
* dpkg-reconfigure lirc-modules-source

The last step will build the source and install the *.ko files. The original blog post can be found here with some more information, or if you are still having trouble: http://notepad.bobkmertz.com/2010/06/pvr-150-ir-blaster-on-mythbuntu-1004.html

I did this successfully on my HVR-1600 running regular Ubuntu 10.04. Full LIRC support returned after I modprobe'd the driver.

Otherwise, my MythTV-based DVR continues to work wonderfully. I'm making great progress on my complementary auto startup and shutdown problems I'm developing and will hopefully post them on line when they are complete. In the meantime, just wanted to pass along this info in case someone runs into similar issues! And also, it's a good idea to do a quick review of the system updates before you install them.

Protip: If you do see wonky behavior from any of your software after an update, you can review what packagers were recently updated with Synaptic. Just launch Synaptic and go to File->History and check the logs. This is how I ultimately deduced the culprit to the missing LIRC behavior.

All the best!

Saturday, December 25, 2010

Let people choose their aspect ratio

I can't count the number of times I've sat down to watch a movie with a friend or family member, and as soon as the movie starts, I hear "please tell me those black bars aren't going to be there the whole movie!"

Surely you are familiar with letter boxing. It's been evident on many movies watched at home since the early 90's (perhaps earlier, but I haven't been watching movies that long).

What causes letter boxing?

Letter boxing is related to something called the "aspect ratio". This refers, simply, to the ratio of the width of an image compared to it's height:

So if an image is 16 centimetres wide, and 9 centimetres high, then it is said to have an aspect ratio of 16x9. Often, for easy comparison, these are a reduced to a fraction of X:1, for example, 16x9 is approximately 1.78:1

When a movie or TV film is being produced, it is decided which aspect ratio it'll be filmed in. Three common aspect ratios (though by no means all), are 1.33:1 (4x3), 1.78:1 (16x9) and 2.35:1. Your TV screen also has an aspect ratio. Thus, letter boxing (which can be both horizontal and vertical) occurs when the aspect ratio of the picture your watching does not match the aspect ratio of your screen. For example:


TV content is generally filmed in 4x3 and 16x9 aspect ratios, while movies tend to be 16x9 or 2.35x1. TV and computer monitors are generally 4x3 or 16x9. Another popular screen size (especially on laptops) is 16x10.

I remember renting movies and watching them on VHS tapes. Just before the movie would start, you would see a friendly message on the screen stating "This film has been modified from it's original version. It has been formatted to fit this screen."

I never used to understand what it meant (though I also used to think the quick FBI warnings said "If you watch this tape backwards you will lose your memory") until my brother explained to me one time that "it means you won't get those stupid black bars on the top and bottom".

Later on, we began to rent more and move movies which had the so called "stupid black bars", and every shot, someone would complain about it at the beginning of the movie.

Usually however, once the movie began you didn't notice it as much, but that still didn't mean we liked it. In the early 2000's, the switch was made to DVD's which often, nicely, provided both "wide screen" and "full screen" versions, the wide screen usually referring to a 16x9 aspect ratio, and the full screen referring to 4x3. My Dad used to say that "wide screen" should be called "narrow screen" since half of it was missing. Some DVD's would even have both versions on the same screen, allowing you to choose on the disc. Eventually (around 2006 and much to my dismay) I believe DVD's stopped coming in both formats and came in wide screen only. And, 16x9 was rare, most DVD's were now only available in their native, filmed format of 2.35x1.

This meant that if you had a 4x3 TV, 2.35:1 wasn't just wide screen, it was really wide screen. You needed to upgrade your TV to a 16x9 model, just to lessen (but not remove) the letter boxing. When we had 4:3 TV's, you had to deal with 16x9 letter boxing, and when we got 16x9 TV's, you had to deal with 2.35:1 letter boxing! It's a no win situation, and getting worse with the advent of HDTV's (1080p/i is 16x9 in case you are wondering).

Now, not everyone (unlike my family members) hates letter boxing. Some argue that they prefer to see the movie as it was shown in theaters, as the director intended it, for artistic reasons. They argue that it's actually the cropping that cuts out "half the movie", and not watching it in "wide screen".

That's fine and dandy, if they want to watch the movie that way, let them. But personally, I believe in giving people the choice of aspect ratio they'd like to watch the movie in. And I think the solution to this is much simpler then you might think.

Solving letter boxing

It might seem like the only way to avoid letter boxing would be with some sort of projector, or having a TV of every possible ratio! But there are other solutions.

Many TV's now have the ability to "scale" the image. That is, they take the 2.35x1 image and stretch it to take up all of the 16x9 screen (or same with the 2.35x1 on a 4x3 screen). Personally, I don't like this option, as much as I dislike letter boxing, I dislike even more seeing the movie distorted:


Another option is cropping. Often, your player will have the ability to "zoom" in on the image. This can work to some success, but the problem here is that sometimes you cut out important things on the screen.


Some DVD's player support a "pan and scan" option which allows you to actually sweep across the entire image as it's playing, but I don't really want to have to manually control this while watching a movie either.

Couldn't we simply get them to agree?

Fat chance. There are multiple motivations for choosing an aspect ratio for a program or film, both artistic and financial. It's highly unlikely that we'll ever see an agreed upon aspect ratio for all video content. In addition, it's impractical to produce a different physical version for every aspect ratio. And even then, if you had the 4x3 version but decided later to get a 16x9 TV, suddenly your 4x3 version is obsolete.

And why should we? We're asking for the freedom to watch in the aspect ratio we wish. The creators, really, should be allowed to produce in any aspect ratio we wish. So how do we find common ground?

The solution is actually surprisingly simple, and, it's entirely software based. All we need to do is provide one copy of the video content, in whatever aspect ratio the creator wishes. Then, we use an automatic (on the fly) combination of zooming and scaling to nicely format the image into the desired aspect ratio to watch.

For example, let's say I'm watching a 2.35:1 movie on my 4:3 TV. Along with the single video file would be a text file that mapped what part of the image should be displayed at what time to my aspect ratio. For example, from 5:34 to 6:02 in the movie, the top left of the 4:3 "view window" should be 100 pixels down and 43 pixels over, then from 6:02 to 6:40, it should be 300 pixels over and 90 pixels down.

It's like the zoom method mentioned above, but instead of the entire film being zoomed onto the same spot within the larger image, the player would read from the text file and move zoomed section around the movie, seamlessly (e.g. during pans or transitions) to keep the most relevant sections in frame. Further more, this text file could be easily set up like a table, to have different mappings on my 16x9 TV for the exact same 2.35:1 source film (or have a different file for a different aspect ratio). In some extreme cases, we could also use scaling on parts of the image, but then add it with the zooming to prevent distortion.

Would be this be a lot of work to add to video content? I don't believe so, certainly no more work then doing a "full conversion" for a different aspect ratio like what used to be done. This is essentially the same thing as that conversion, the difference being in the old method the various "crops" were cut together to make a new version of the movie, since the electronics from the older analog display methods (VHS for example) weren't sophisticated enough for this. But with the age of digital media, this is entirely possible. The player merely needs to be updated to read from these cropping files and display the correct part of the source image.

And, as long as the protocol was open and usable by anyone, this could be a community driven effort. It only takes one person a little bit of time to cut their movie from the source into the aspect ratio of their choice, then publish it for others to use. Then, the next person searches a database for the "crop" file for their movie in their aspect ratio, feeds it to their player and watches away. Don't like the cropping decisions they made? Make your own, if you wish, then publish it for others to use. People could rate them and leave comments, which could ultimately result in a final "best" copy. Or, you can easily hit a button and, like magic, the original, non cropped version will play.

In fact, the cropping process itself might even be able to be automated with software (though I still like the idea of being able to do it yourself in case you don't like the decisions the software makes)

So there you go, a nice, laid out solution to matching aspect ratios between source images and display devices! No more letter boxing necessary. Will studios/equipment manufactures pick up on this idea? Perhaps not...but we can dream. It's certainly not an unsolvable problem, alas, for the time being we'll just have to muddle along.

Tuesday, December 7, 2010

Building a Ubuntu HTPC - Day ????

I've made tons of progress getting my HTPC in a fully functional state, I'd stay it's at least 85% done of the functionality I want. I just haven't been updating the blog...well these things happen :)

Highlights:

1. Sound "crackle" problems are now fixed. Turns out, when you modprobe the cx18 driver, you can select the tuner type. My HVR-1600 was a Phillips tuner of type 43. It had been just using some "default" tuner type which wasn't reading the audio input correctly. This also fixed ivtv-tune not being able to get high signal strength or pick up channels.

In short:

1. Create a file in "/etc/modprobe.d" called "cx18.conf" (as root)
2. Add the following line: options cx18 tuner=43 radio=0 (your tuner # may be different)
3. Save the file and restart. The module should now be loaded with the correct options and the cracking should be gone for good.

Reference:
http://www.linuxquestions.org/questions/showthread.php?p=4164862

2. Lirc: Lirc support is now fully functional, both blaster and receiver. You have to put your own lirc from source, and modprobe the kernel driver, but it should work fine.

The main recipe I got to work is here: http://ubuntuforums.org/showpost.php?p=9548142&postcount=9

Don't forget to modprobe the driver! You can add it to /etc/modules in Ubuntu 10.04 to have it load on boot.

Additional References you may find helpful:
http://www.blushingpenguin.com/mark/blog/?p=24
http://www.gossamer-threads.com/lists/mythtv/users/442250
http://wilsonet.com/?p=40
http://www.mythtv.org/wiki/Hauppauge_HVR-1600

I had some trouble at first getting the remote to work with MythTV. Make sure your lirc socket (e.g. /dev/lirc0) has a+rw permissions (e.g. chmod a+rw /dev/lirc0)

In addition, if you follow the instructions above, the lirc socket you connect will *not* be /dev/lirc0, but rather /var/run/lirc/lircd. This is what you must configure MythTV to connect to in order to get it to work. You can find a sample .lircrc file for MythTV here, and modify it to your needs. One thing I did is make an entry to start MythTV with the Go button:

begin
button = Go
prog = irexec
repeat = 0
config = "/home/jason/Scripts/startmyth"
end

The contents of my startmyth script:

#!/bin/sh
# Run MythTV front end on display 1
export DISPLAY=:0.1
mythfrontend

You can use the DISPLAY variable to decide what X-session you want MythTV to start if you use a Dual-Head setup, like me.

Also, you'll want to start the lircd daemon on start. Here's my start lirc script:

mkdir /var/run/lirc
/home/jason/Development/lirc-0.8.6/build/sbin/lircd --device=/dev/lirc0 --logfile=/home/jason/Development/lirc-0.8.6/build/lircd.log
chmod a+rw /dev/lirc0

To run as root on boot, add it to your /etc/init.d/rc.local

3. I've cleaned up the video output a bit. Using a longer, single cable has helped but there's still a bit of interference.

4. I'm working on getting a custom Start up and Shut down program working. I've done some tests with ACPI_Wake and hit seems to work, just nailing down the details with the mythtv database, similarly, I also working on a shutdown application to turn off the computer at points after recording. I should be posing back after I get them running!

Tuesday, November 2, 2010

Smallest of the Small

Disclaimer: This article is merely intended to be a speculative thought experiment, and shouldn't be mistaken for an actual research paper (in case using Wikipedia as my primary reference didn't already make that clear).


Throughout history, speculation on the fundamental building blocks of matter have been rampant within scientific curiosity. As early as 350-450 BCE, it was believed that all matter was made up of building blocks of four basic elements, Earth, Air, Fire, and Water. It was speculated that all matter could be broken down into these constituent 'elements'. Even today, though they may be a lot more elements listed on the periodic table, the idea is essentially unchanged. Matter consists of massive groups of molecules, which is subsequently made up of varying types of atoms (elements), which in turn consist of neutrons, elections, and protons, which are further subdivided into even more sub-subatomic particles, for example quarks and other types of leptons.


As of current understanding, quarks and leptons are the most elementary form of fermion (traditional matter) particles known. For a particle to truly have no substructure, it must be considered to be the most fundamental particle, the one from which all other matter is built.


It is only natural to ask the question, are these the most fundamental particles or do they have substructure? Quarks are not identical after all, they have different masses, charges, so is it not unreasonable to concluded they might be composed of yet smaller blocks? There have been many ideas on the existence of 'preons', particles considered to be building blocks of quarks. For our purposes here, we are going to indeed make the assumption that quarks do indeed have a yet-undefined substructure. Furthermore, what ever this substructure is, let's assume that it can furthermore broken into an n-particle limit, that is, subdivided and subdivided to a finite level of substructure. The question then becomes, what is the last level? What is the smallest of the small?


We are going to step into a thought experiment, and assume this fundamental particle exists, which we will simply refer to as Particle X. What can we infer about this particle? Assuming that it exists, a few properties seem to be logical extensions of it: 1) All of the particles are identical but unique; 2) They are infinitesimally small, most likely on the order of Planck Length; 3) They exist for only infinitesimal periods in time;


That is, the smallest particle would also be related to the smallest units of time, size, mass, as well as being zero-dimensional. Zero-dimensional you say? I know that can be hard to imagine, given that we normally experience a three dimensional physical universe. If it helps, here's how I visualize N-dimensions (borrowed heavily from arrays in my main vocation, with is computer science). First, imagine a single point, alone, in a vast void. Since there exists no other points, there's no reference with which to differentiate it from another, therefore if we were to try and give coordinates for it, there wouldn't be any. This is the 0th dimension. Now, imagine that we take an infinite number of those points and arrange them in a line. Now, we can refer to a specific point by giving a single coordinate, X if you like, it's position in the line. Using a single coordinate to reference it's position, this is the 1st dimension. Now, imagine that we take an infinite number of those lines and lay them parallel to each other, forming a plane. To refer to a specific point, we need two coordinates, the line it's on (Y), and the particle in that line (X). This is the 2nd dimension. Then, we take take an infinite number of these planes and stack them on top of one another, creating a cube of sorts, using a third coordinate (Z) to reference a single point, basically three dimensions. Then, we could take an infinite number of of these “cubes” and lay them “besides” each other, now using a 4th coordinate to differentiate between the various cubes, creating a forth spatial dimension, and continuing so on in that fashion for any number of dimensions we want.


Of course, an obvious contraction seems to rouse it's head. We assume that all of the particles would have to be identical, since, if two fundamental particles were different, it would imply that they have a substructure which differentiates them, and we've already said that our particle X is the last level. But if they are all identical, how could they possibly come together to form different higher level particles? That is, they would have to be both identical and unique, which doesn't seem correct.


There are two other aspects of Particle X that haven't been considered yet, namely it's location, and it's motion, or amount of energy. Gauge bosons are currently considered elementary bosons, or units of energy. There may in fact also be a fundamental unit of energy, in essence, possibly even grand unification energy, in analogy with the fundamental particle. Here is the basic model as I'm envisioning it: all fundamental particles are physically identical, for each particle is an associated unit of a unique amount of energy. It is the differing amount of energy which separates different particles. This is where we tie in another necessary smallest, size. What I propose is that the energy level of each particle is dependent on it's location in space-time, and vice versa. My speculation is that there could be a one-to-one relationship between a particle's location in time and space, and the amount of energy it has. This relationship isn't all that much of a stretch. An object will move in a vacuum so long as it has kinetic energy and nothing to interfere with that motion. If something collides with it, or slows it motion, its kinetic energy will lessen and become potential energy.


Consider the Big Bang. We might now think of it as an element of Particle X, with the highest possible energy level (the first location). As time went on, the energy level decreased. This corresponded to the initial expansion of the universe. For a useful analogy, think of cell division. The first Particle X's energy level decreased, creating more particle's out of one, whose level decayed into new particles, and so on. Each new 'generation' is associated with a unique instant in time. The individual energy level of each Particle X is different. That is, each moment of time is 'frozen' where each particle has a unique energy level. But if we were to examine a particle from our point of view, it would appear as though the energy of it was changing over time. The change in time however is relative, if we were to examine two particles, we would notice a consistent change in their energy over time (it should be decreasing), however the two particles would also have a different energy due to their location in space. The difference in the spacial component of their energy would remain the same (assuming they were stationary with respect to one another), relative to their change in temporal energy. So as the universe moves forward in time, the energy decreases, but stays the same relative to other particles in that instant.


So the property that differentiates one particle from another is it's location, and subsequently it's energy. If that were the case, what would allow groups of this particle to differentiate substructures or high structure particles that they form? Since the only property unique to the particle is its location or energy, let's infer that is the property we seek. In essence, it's possible that the differentiating factor is the difference in the collective energy of one group of Particle X's compared to another group. Since the difference in the energy level of two particles stays the same relative to one another over time, this would allow higher level particles to exist, over time. As an analogy, imagine we could take the average of the energy level of a group of Particle X. A certain group of particles may have a mean energy level, different from the mean energy level of another group of particles. For example, one mean may correspond to an 'up' quark, whereas another mean may correspond to a 'down' quark. Given this model, it is possible that all sub atomic particles develop in this way, which is how the most basic substructures are formed.


Another analogy for the location-energy relationship is that of electrons in an atom. It thought that the distance an electron is from the nucleus of an atom is directly dependent on it's energy level (see Electron Shells). That is, the more energy it has, the further from the nucleus it exists. It has also been conjectured, if not proven, that electrons may jump orbits without even moving through the space in between, which alone has spectacular implications.


So let's continue to extend this idea to our Particle X. The 'nucleus' in this case would be the center/beginning of the universe in space time, the big bang. The particles are like the electrons moving around it. Though in this case, it seems it may be more logical to have the situation reversed. The big bang was a massive amount of energy, so in order for particles further from it to have higher energy, it seems like we would be violating the law of conservation of energy. So instead let's reverse it: units of the particle have higher energy as we wind the 'universe's film' (like a movie film) backwards to the big bang, which was a single unit of the particle with the total amount of energy in the universe. Then as the universe expanded, the energy was divided among newly formed particles, which would still be continuing today. But to what end?


The ultimate fate of the universe would then seem to depend on these particles, whether or not the universe eventually contracts or expands indefinitely. Three outcomes are theorized, either 1) the universe doesn't stop expanding, and eventually the thermodynamic energy is equally divided in the universe (heat death); 2) The universe eventually contracts back to a single point; 3) The universe stops expanding but doesn't contract. It may be simply that the “evening out” of fundamental energy as I've describe here works out be the heat death described in the model.


So what happens when I move my hand though the air? Or more precisely, when any sort of body moves through space? In the model as I've described it, every Particle X should have a unique, fixed energy level. Over time, it appears to us that the particle's energy is changing, but staying the same relative to its spacial position. So how does something move, in standard kinematics, given this model? Imagine a ball being thrown, and let's pretend that we have an ultimate high resolution camera with which can take a photo down to the level of Particle X once every Planck second. If we were to analyze each photo, what would see happening to the energy level of each Particle X in the ball, as well as the air it is displacing? First, lets just consider the front end of the ball, without the air. Would our fundamental particle still be present in a vacuum? I would have to venture a “yes” guess, at the very least in the form of virtual particles. Indeed, the fundamental Particle X should permeate all of existence, there shouldn't be anywhere which can exist without it at a corresponding energy level. So either way, with the air or not, the particles in the ball should be displacing other particles just the same.


The balls moves through the air, but the particles can't move though one another. Obviously the particles in the air molecules are be displaced by the particles in the ball's molecules. Since location is depended on energy level, by changing the ball's location, the energy level of its particles must also be changing as a result of the movement. The Particle X's of the ball would either give up or accept energy depending on the direction of the motion (spatially, away from the universe origin point), but of course the precise energy level would always be decreasing, unless the ball was moving backwards in time. Energy level in the ball's particles are thus being swapped particle by particle with the energy of the air molecules it's moving through. Thus, any movement can be generalized as a particle by particle swapping this of fundamental energy among various Particle X's. This could also explain why there is a universal 'curtain' speed limit, for example if a Particle X took such an amount of time to swap an amount of energy with it's neighboring particle (in order to move), perhaps at the speed of light is the fastest this swapping could occur.


Keeping in mind that the preceding argument was all just a speculative thought experiment, if any of it were real, might it be at all useful to us? Assuming this idea is correct, at least in principle it could be useful, but the actual engineering would be extraordinarily complex, if at all possible. The idea is to create a device capable of artificially changing the energy of a group of these particles. With enough energy, we would be able to move an object to any point in space-time, instantly. We wouldn't actually be moving faster then light, in terms of classical mechanics, the mass was motionless the whole time, but rather it is more like a leap, much like the electron jumping orbits, without going through the space in between. Sound like a useful form of transportation? Additionally, we would be able to change the molecular structure of matter at a fundamental level, the ultimate recycling, since the substructure of a complex particle is just the differencing energy level. Whether or not the technology could practically exist to change the energy level of the particle is unknown, but there would be no shortage of applications. We change the energy of a particle all the time by simply moving an object, so what we want to be able to do is the opposite.


Though it also raises the question, if we could artificially change the location of a mass by changing its energy, what would happen to the mass (particles) that are already in the position where we placed the mass? We know that the total amount of energy is constant, so the most logical conclusion seems to be that, for instance, the energy needed to be added to a mass to move it would be directly subtracted from the energy of the place we are relocating it. Since location is dependent on that energy, whatever was previously occupying that point in space time would then take the place of the original object we wanted to move, in effect they would be swapped, without disturbing anything in between. For an example, imagine two cubes, A and B. We know the relative difference in the energy between them, so we know how much energy needs to be added to (or subtracted from) A to give it the location of B. When we apply it, the cubes would swap places, with the A cube taking the place of the B cube, and vice versa.


In conclusion, the 'fundamental particle' we have conjectured may actually be something already conceived, superstrings. Likewise, the energy level we have attributed to our particle may be the vibration of these strings, which is driven by what we have come to call grand unification energy. Let me reiterate, this is all just speculation. There is no experimental evidence for my ideas at the present time, though I feel this is a truly fascinating topic to explore. I've done my best to properly infer my conclusions logically, and hope you enjoyed my take on it. By all means, feel free to leave a comment and share your own thoughts as well.

Thursday, October 14, 2010

Building a Ubuntu HTPC - Day Two

Greetings to the blogging world!

I'm on "Day Two" of my DVR setup (even though a few days have passed since Day One...sue me).

I'm happy to report that progress is proceeding steadily....if not entirely as smoothly as day one. Here's a recap of what's been going on so far:

The good:

* Did I mention just how fast this thing can boot? I go from a cold start to a usable desktop in under 20 seconds! The Ubuntu load screen only flashes for less then a second, then bang, it's there.

* Skype is working well. I can make and receive calls and am getting good reception for audio calls. However, the Skype I installed from the Ubuntu repositories wasn't working, but rather was hanging every time I tried to sign in. Rather, I download and installed the .deb file form Skype itself (they state it's for 8.10+) and that one is working much better.

The bad:

* Despite my sound initially working when I first tried it, I have run into a few minor issues. Namely, I can't get the back audio jack and the headphone jack to work as I'm used too. Initially, plugging in the head phones would mute the rear speakers, but not give me any sound through the headphones. The volume was also quite low. I installed the "Alsa backport" which helped with the volume issues, though the audio still mutes whenever I plug in the headphones. It seems I can only have both jacks working at the same time, or both muted. Here are a few links I've been following on this issue.
**http://www.paralaptop.com/ubuntu/fix-ubuntu-10-04-lucid-lynx-headphone-jack-sense-problem.html
**http://playingwithsid.blogspot.com/2010/06/headphone-jack-sense-problem-in-ubuntu.html (headphone port doesn't mute audio)
* My web cam isn't quite working the way I want. I can an image using Cheese, but it's very dark and looks grainy. I also can't get an image through with Skype.
* TV-out was not working initially. First, I couldn't get the TV to show up at all in nvidia-settings, though I later did by plugging it into my AV adapter, rather then my DVD recorder. Still, I was getting no video on the screen. Eventually I was able to get an image on the screen by turning on the output with nvidia settings, having an Xorg.conf file, then adding the following two lines to the Screen section:

Option "TVOutFormat" "SVIDEO"
Option "TVStandard" "NTSC-M"

Since the video card also seems to be capable of of Component output via a 7-pin to S-video adapter, my hypothesis is that it was trying to use a component signal by default. Some links I used to help me resolve this are:
* https://help.ubuntu.com/community/NvidiaTVOut
* http://us.download.nvidia.com/XFree86/Linux-x86/173.14.09/README/chapter-16.html

* There is still an additional problem with the video out, I get two wavy "bands" moving slowly up the screen. I think this may be a problem with refresh rate, but I don't seem to be able to change the refresh rate beyond 59.94 Hz (e.g. using regular 60 Hz), even from Xorg.conf. It's highly noticeable on still images, though less so on video, so that's good. It doesn't seem to be being caused the by the cable or TV since I can use the same with my W7 laptop with no lines. I'll continue to investigate.

Ubuntu HTPC - Day One

Earlier in the week I received delivery of my new tower that I ordered with which I'm working on constructing my Ubuntu HTPC.

The primary focus of this machine will be to use as a PVR and HTPC, though I'll also be using it for general IM/Email/Web browsing, as well as some Linux Gaming, Wine usage and video editing.

I'll be starting off with some basic hardware, and expanding as I need too, though hopefully I already have much of what I need. The system hardware as it stands now is:

* AMD Athlon X2 250 @ 3.0Ghz
* ASUS motherboard with USB 3.0 and HD Audio
* 2 GB DDR3 ram # 1333 mhz
* Nvidia GeForce 9400GT @ 1GB Ram (VGA, DVI, S-video/Component ouputs). This card was selected with S-video output since I don't own a HDTV, nor plan to by one in the future. My monitor is high definition, for which I'm using the DVI and still have the spare VGA for my laptop.
* Hauppage HVR-1600 tuner card
* 320 GB SATA drive @ 7200 rpm
* Multi-card reader
* 21.5 inch High Definition Fluid LCD @ 1920x1080 resolution
* Sony external USB 2.0 DVD RW drive.
* Logitech wireless keyboard/mouse, gamepad, webcam, etc.

I also purchased a 2TB USB 3.0 External drive for backup and storage. Ubuntu was selected for the operating system since I to use MythTV as my PVR software and due to the high customization potentials. I considered installing Ubuntu 10.10, but ultimately decided to stick with 10.04 LTS since I figured there would be more community support for it, and I don't necessarily want to need to upgrade in six months. I also want to significantly increase my Linux knowledge as much as possible. I decided against using Mythbuntu, but may decide to use the "one-click-switch" if I have trouble configuring MythTV as an external package.

Install of Ubuntu was exceptionally painless, it formatted and installed the OS rapidly. So far, everything has worked out of the box, including sound and the DVI-port at a high resolution, though I haven't tried installing some things yet such as the Webcam, and TV tuner card.

I have installed the Nvidia proprietary drivers easily with the Ubuntu Hardware Drivers menu, and now and am enjoying desktop effects and hardware acceleration. I've also watched some high definition Flash videos on YouTube on full screen with no issues. Email and IM are setup and working well so far, though I'm using AllTray to minimize Evolution to the system tray since it doesn't seem to have the function itself. Temperature and noise of the machine have been quite reasonable so far, though I'll be keeping an eye on it.

My main setup upcoming tasks are as followed:

* Configure the video out and audio outputs to my TV
* Setup the tuner card and MythTV
* Setup my webcam for use with Skype
* Copy personal data to my primary drive and sync with backup

I'll hopefully be updating my blog as I go along with tips and tricks as I discover them. Stay tuned!