Saturday, December 25, 2010
Let people choose their aspect ratio
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 ????
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
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
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!
Saturday, May 8, 2010
Upgrading to 10.04? Might need to fix your display settings.
As such I was excited when Ubuntu 10.04 LTS was released just over a week ago. After installing the latest Karmic upgrades, I was presented with a friendly request to upgrade to 10.04 and decided to take it. And as always for Linux, the monetary cost isn't something I need to worry about :).
The Install Process
Installing over my Karmic install was fairly painless, but slow. It had to download about 2.5GB, which surprised me since the install CD's themselves are usually only around 700 MB. The download proceeded smoothly and after a few hours the install began. Again, there wasn't a heck of lot of user interaction on my part, just a few dialogs I needed to answer. After an hour or two more, I was prompted for a reboot to continue.
What the....?
Not sure I was quite prepared for what came next. As you might have seen before in my blog, I have a rather customized Gnome desktop, including a custom Xorg.conf file for extended displays. Upon rebooting, my entire desktop was...rather messed up. It's hard to describe, but the desktop seemed to be flipped 180 degrees, and the icons themselves were inverted. The entire desktop was also completely unresponsive. I couldn't click anything, nor would the keyboard or any of my short cuts respond!
Very strange, though I had an inkling it had to with my various desktop modifications. A close up on the Gnome menu:
What next?
Strange looking, hmmm? That's what I thought. However, this isn't the first time I've totally borked my Gnome desktop, so I knew what I had to do to reset it. I restarted and used grub to enter recovery mode which allowed me to boot into a command line interface (Tip: You can also try CTRL-ALT-F1 to get to a command line).
I then gained root access with a sudo bash command, and made a backup folder. From there, a copied the following four folders: .gnome2, .gconf
, .gconfd and .gnome_private into the backup folder (Tip: You can use cp -r to move directories and their contents recursively).I then used rm -rf to remove each of the folders (Don't do this as root from your / directory lest you delete your entire file system!)
Upon rebooting, Ubuntu decided it needed to do a disk check. Considering my last few hard reboots, this was expected:
After it was finished (~20 minutes), I booted into Gnome. My customized desktop was gone *but* everything was still oddly "inverted":
Still borked, apparently. The only other thing I could think of that might be causing such an odd issue is my custom Xorg.conf file, as these haven't officially been in Ubuntu for a while.
So I booted back into the terminal and removed it. And voila! I was presented with:
First thoughts on 10.04
As Bender would say, we're back baby! I then tried restoring my old Gnome settings from the backup (with the removed Xorg.conf, after backing up the current settings first), though this caused my Gnome to freeze on restart, so I put the old desktop back. Still, if you run into a similar issue, I recommend simply trying to remove your Xorg.conf first before resetting Gnome. I'll spend some time with the new Gnome theme before I decide how I want to customize it. So far it's pretty spiffy, if odd looking, not sure if I'll get used to the window controls being on the left side of the screen! No problems with my wi-fi, connected with no issues. My sound isn't working, though I have yet to figure out why, and I'll need to figure out how to bring back my extended display, such is the price you occasionally pay for trying out the latest and greatest. Still, the OS itself seems solid enough though (blazing fast on this outdated hardware!), and I look forward to playing with it more. Hope this post gives a hand to any others who run into the odd display issue I did!
Wednesday, April 28, 2010
Where are all the Canadian game shows?
Tuesday, April 13, 2010
Exploiting Kernel Null Dereferences
Tuesday, February 9, 2010
Where am I? Lost of course!
Saturday, January 30, 2010
Extending your desktop to TV with Karmic Koala
Ever since I've been using Ubuntu on my original laptop, I've been having great fun poking and prodding with its configuration, getting it to do some pretty fantastic things! My eventual goal is to turn this machine into a full fledged Linux-based HTPC (Home Theatre PC), and have been working on the project on and off to achieve that goal.
I don't have a high definition television, but the laptop comes equipped with a S-video out port, perfect for connecting the PC to my standard definition television. When I used to run openSuse, I had the proprietary ATI drivers installed and could use aticonfig to turn the extended desktop on and off.
Problems
Since switching to Karmic, I haven't quite been able to get this to work. The ATI drivers don't come installed by default, and they aren't open source anyway. I did make an attempt to install the drivers, but the OS seemed to ignore them and continue to use the open source drivers. I didn't want them unless necessary anyway, but the question remained: how to configure extended desktop without ATI config?
...and solutions!
The answer lies in the X Resize and Rotate Extension (RandR), or xrandr. If you run xrandr from Terminal, you should see something that looks like this:
Screen 0: minimum 320 x 200, current 1280 x 800, maximum 1280 x 1280
VGA-0 disconnected (normal left inverted right x axis y axis)
LVDS connected 1280x800+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
1280x800 59.9*+
1280x720 59.9
1152x768 59.8
1024x768 60.0 59.9
800x600 60.3 59.9
640x480 59.9 59.4
On my laptop, LVDS refers to the LCD screen. Listed there are a number of possible resolutions and screen refresh rates.
To activate your S-video out (or VGA), you'll need to add a display mode for it. Use the addmode function of xrandr for this:
xrandr --addmode S-video 800x600
In this case, I want to set an S-video out mode of 800x600 resolution. You should then see the mode if you run xrandr again:
S-video disconnected (normal left inverted right x axis y axis)
800x600 60.3
In order to actually use the S-video out, there are a number of options. The simplest is merely to activate it:
xrandr --output S-video --mode 800x600
But not quite...
This'll clone the desktop onto the S-video out. Unfortunately, since the LCD is running at 1280x800, you'll only see the top-left 800x600 pixels of your LCD display. This isn't particularly useful now is it? You can use the --pos YYYxZZZ option (e.g. --pos 100x100) option to move the output display around, but you'll still always be missing some of the screen.
Unfortunately, it was at this point that I hit a road block. I could clone the output, and move it around, but not get a dedicated output for the S-video out. What I decided to to was alter the command a little, I would turn off the LCD display, set the resolution to 800x600, then send it via the S-video:
xrandr --output LVDS --off --output S-video --mode 800x600
Now, I could have either a 1280x800 desktop on my LCD, or an 800x600 desktop on the TV. Not exactly what I wanted, but still sufficient for watching movies, videos, and even using the desktop on the TV.
Eventually, I realized what had to be done in order to extend the desktop.
- Make the "virtual desktop" (amount of screen area) bigger
- Use the --pos command to move the S-video output to the right of the LCD desktop.
xrandr: screen cannot be larger than 1280x1280
Xorg.conf
Doing some searching, it seems the best advice was to configure the virtual desktop size in the Xorg.conf file (so the virtual screen size would be set while X server was starting). But hold on a moment...Ubuntu did away with Xorg.conf files in version 9.10! What to do? I made a few attempts at writing an Xorg.conf file by hand, but was always missing something causing my machine to reboot in "Low Graphics Mode". And my searches for changing the frame buffer without an xorg.conf, including a post on the Ubuntu forums, revealed no results.
Luckily, I found a post today on how to generate an xorg.conf from your current configuration. Essentially:
1. Reboot. When in grub, select to boot in recovery mode.
2. After logging in to a command prompt, run:
sudo Xorg -configure
4. As root, copy this file into your /etc/X11/ folder (remember: back up the old one if there's already one there!)
5. Rename it to xorg.conf
6. Open your favorite editor (you can run startx now and do this from X Windows if you don't want to from the command line)
7. Find the "screen" module.
8. You'll see listed a number of display sections like so:
SubSection "Display"To the most common ones (or even just the ones you'll use), add the following line:
Viewport 0 0
Depth 24
EndSubSection
Virtual 2080 800
9. Save, and restart.
Upon running xrandr at a command line now, you should see your virtual desktop has changed:
Screen 0: minimum 320 x 200, current 1280 x 800, maximum 2080 x 800.
You can now use the --pos to set your S-video output to 1280x0, which will put the video output to the right of the current desktop and Volia! Extended Desktop! You can now drag windows over to it (such as videos), full screen them, move them, even see your desktop effects!
Wrapping it up
To prevent having to use xrandr all the time, I made a few simple scripts for configuring the TV Out.
1. Go into your home folder. Create a folder called "Scripts".
2. We're going to make three scripts:
One for turning the TV out on in Extended Desktop, One for Clone Mode, and one for turning it off. First the deactivate script:
3. First, deactivate: In gedit (or another editor), paste the following into a text file:
xrandr --output LVDS --mode 1280x800 --output S-video --offThis'll deactivate the S-video and make sure your LCD is the main display. Save it as "Deactivate_TV_Out" or something alone those lines.
4. Now, activate in clone mode:
xrandr --addmode S-video 800x600and save as "Activate_TV_Out_Clone"
xrandr --output LVDS --off --output S-video --mode 800x600
5. Finally, extended mode!
xrandr --addmode S-video 800x600
xrandr --output S-video --mode 800x600 --pos 1280x0
Call it "Activate_TV_Out_Extended"
6. For each file, right click and go to "Properties".
7. Under the permissions tab, click to allow for executing as program.
You can now click each of those to move back and forth between the various mode. Sometimes, you might have to deactivate the TV-out in order to activate it in a different mode. You can make shortcuts to these scripts, or as I did, set keyboard shortcuts:
1. Go to System->Preferences->Keyboard Shortcuts
2. Go to Add.
3. Give the shortcut a name "Activate_TV_Out_Extended", and point command to your script, e.g.
/home/jason/Scripts/Activate_TV_Out_Extended.
4. Do this for each of the other two scripts.
Make sure to use unassigned shortcuts, I used Ctrl-F1, F2 and F3 respectively. I am a bit unsure of including the "xrandr --addmode S-video 800x600" each time the script is run, but it doesn't seem to cause any problems. Without the mode being added, activating the TV out won't work. If I do find a way to keep the mode consistent, I'll update it here. Good luck, I hope others find these instructions useful (provided without any guarantees)! To end my post: something I haven't shown you yet on my blog: Jay's Desktop! I suppose it's about time =P.
Take care everyone!
Monday, January 25, 2010
Tweeting...From...Space!
Wednesday, January 20, 2010
Geeks and Nerds
The article is written from a female's point of view, discussing the merit's of various "personality" types. As a self defined geek, I find the article quite a good read, and something others many benefit from as well so I'm re-posting it here. I also find it quite accurate, though personally I'd pick a can of apple or peach juice over Mountain Dew :).
Enjoy!
In the wide world of dating, there are many options. Do you go for the flashy guy with the smooth smile, or the dude in the corner typing away on his laptop? The following are reasons why I think my fellow females should pay more attention to the quiet geeks and nerds, and less attention to the flashy boys.
1.) While geeks and nerds may be awkward, they’re well-meaning 9 out of 10 times. That smooth dude with the sly grin and the spider hands? Wonder what HIS intentions are… plus, I’ve never had a geek guy not call me when he said he would. Score major points THERE.
2.) They’re useful. In this tech-savvy world, it’s great to have a b/f who can make your laptop, desktop, and just about anything else that plugs into a wall behave itself.
3.) They’re more romantic than they’re given credit for. Ok true, their idea of romance might be to make up a spiffy web-page with all the reasons why they love you, with links to pics of you and sonnets and such… but hey. It lasts longer than flowers, plus you can show your friends.4.) Due to their neglected status, there are plenty to choose from. You like ‘em tall and slender? There are plenty of geeks/nerds who are. You like ‘em smaller with more meat on their bones? Got that too.
5.) They’ve got brains. Come on now, how can intelligence be a bad thing?
6.) Most are quite good at remembering dates. Like birthdates and such, especially if they know it’ll make you happy. Due again to their neglected status, they’re more attentive than guys who “have more options”. Plus, with all that down time without a steady girlfriend, they’ll likely have mental lists of all the things they’d love to do once they GOT a girlfriend.
7.) Sex. Yep. Sex. I’m not really familiar with this myself, but I’ve friends who’ve been intimate with geek guys and it’s raves all around. They say a virgin wrote the Kama Sutra… all that time thinking about sex, imagining sex, dreaming about sex, (they are male after all) coupled with a desire to make you happy? Use your imagination.
8.) They’re relatively low-maintenance. Most can be fueled on pizza, Twinkies and Mt Dew. No complicated dinners needed here, so if you’re not the best cook, eh. Can you order a pizza?
9.) Most frequent bars as often as slugs frequent salt mines. You won’t have to worry much about your geek guy getting his “groove” on with club hotties because, frankly, he’ll be too busy rooting around under his computer wondering where that spare cable went. You won’t have to worry about him flirting with other women because, 9 out of 10 times, he’ll zip right by them in a perfect b-line towards the nearest electronics store. I’ve seen this happen.
Me: “Eww. Victoria Secret’s Models… They’re so skinny. How is that feminine? You can see her ribs!”
Geek Guy: “ooooooo…”
Me: “Hey!” *notices he is staring lustfully towards the computer store*
Geek Guy: “What?”
Me: “Never mind…”10.) Although he may not want to go to every outing with you, you can arrange swaps, as in, you’ll go to his Gamer Con dressed as an elf princess if he’ll take you to the ballet. Plus, if he doesn’t want to go someplace with you, you won’t have to worry much about what he’s up to. You’ll probably come home to find him asleep on his keyboard in a sea of Mt. Dew cans with code blinking from the screen. It’s ok. He’s used to this. Just toss a blanket over him and turn out the light.
11.) His friends aren’t jerks. I can’t stress this enough. You’ll more likely get “Omg! A GIRL!! Can I see?!” than “Hey hot stuff back that ass up here and let me get some grub on…” They’re awkward geeks too and will, 9 times out of 10, treat you with the utmost respect and, more than likely, a note of awe. A cute girl picked one of their clan to date? It could happen to them! Hope! Drag some of your single girlfriends over, open up a pack of Mt. Dew, crack open the DnD set and get working. Nothing impresses geek guys more than a girl who can hack-n-slash (well ok maybe if she can code… a geek can dream).
12.) They’re rarely if ever possessive. They trust you, so you can be yourself around them. You like to walk around the house in a ratty t-shirt for comfort? He won’t care. He does too! They won’t get pissy if you don’t wear make-up or don’t want to bother primping your hair. If you gain a few pounds, they won’t try their best to make you feel like crap.
13.) They’re usually very well educated. Physics majors and the like. See #5. You won’t have to listen to him blathering on about his car (ok maybe a little), he’ll have loads of other interesting things to talk about. Politics, world events, how much the chicken burgers down at the local place rock, so long as you douse them in hot sauce…
14.) You’ll almost never have to hear, “Yaw dawg whazzap!!” plop out of their mouths. Unless it’s in jest. They spell properly, use correct punctuation, and are able to tell the difference between the toilet and the floor. They almost never get “wasted”, so you won’t have to worry about coming home to find him and his friends passed out on the floor amidst a pile of beer bottles. Mt. Dew cans, perhaps…
15.) And the final reason why geeks and nerds make great boyfriends: They actually give a damn about you. Not how you look (though that’s a plus), not how skinny you are, not how much make-up you primp yourself up with, but they like you for you. That kind of thing lasts longer than “DaMN baby you got a fine ass!!!” Believe me.