Thursday, January 31, 2008

Building a linux gaming PC: Update 2

I received my wireless keyboard and mouse! Still waiting for the graphics card. Once that arrives I can start putting things together and start playing games :-). The GPU was shipped but I probably will receive it on Feb 4. Will have to wait and see...

Freevo 2.0 and Evas

I decided to start working on Freevo 2.0. I compiled and installed evas in a local space with the following commands:

./configure --enable-gl-x11 --prefix=~/workspace/usr/local
make
make install

Now I had to export the lib path using LD_LIBRARY_PATH. I prefer to run everything in a subshell with the proper environment variables set. So I write this small script called setup-subshell (modified it from project pigment's subshell):

#!/bin/bash -i
#
# Set up environment.
#
PROJECT='newvo'

LD_LIBRARY_PATH=/home/chandanp/workspace/usr/local/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
export LD_LIBRARY_PATH

# Common env vars
export PKG_CONFIG_PATH=/home/chandanp/workspace/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
export PYTHONPATH=/home/chandanp/workspace/python/kaa-lib/lib/python2.5/site-packages/:$PYTHONPATH

# If we got a command, run it and exit
if test ! -z "$1";
then
$@
exit $?
fi

# Set up a prompt helping us remember we're in a subshell
tmp=`mktemp -t bashrc.XXXXXXXX`
echo source $HOME/.bashrc >> $tmp
echo PS1=\'[$PROJECT] $PS1\' >> $tmp
SHELL_OPTIONS="--init-file $tmp"

# Start the shell
echo Entering interactive $PROJECT shell $SHELL.
$SHELL $SHELL_OPTIONS

# Remove temporary file
if test ! -z "$tmp"
then
rm $tmp
fi

echo Thank you for using $PROJECT.


Launched the subshell and installed kaa using the following command

python setup.py install --prefix=/home/chandanp/workspace/python/kaa-lib

However I found that beacon is not being installed because it thinks imlib2 is not installed. So I installed imlib2-dev and went one step further. Now the problem is that pysqlite2 is not installed. So I installed pysqlite2 and was able to install kaa.beacon but when I tried to run it, there was another problem. It could not find kaa.db. I have to find out why kaa.db failed to install. May be tomorrow :-)

Wednesday, January 30, 2008

Q on Mac: Part III

I got everything ready. Kubuntu is running well in Q on my macbook pro. However it does not mean anything. The real test is to see if it is really usable. My plan is to start working on Freevo2 on the virtual kubuntu PC. But even before I start working on it the first question is I am not sure if I should be working on writing Freevo 2 from ground up to fit to my needs. Or should I simply use elisa (fluendo) and write a freevo plugin so that I can access all my movies and music that have been prepared for freevo (fxd file et al). I tried elisa. It is really cool I mean the UI and smooth graphics and such. But I was not able to use it to play any content. The problem seems to be with some code in elisa that twisted python does not recognize. Long story short, a ticket was opened in elisa (see https://code.fluendo.com/elisa/trac/ticket/961) to resolve the problem. Not sure if is effecting others users. May be it is my Gentoo distro. I will probably give it a try on my kubuntu machine.

Anyway I decided to try out the svn code from freevo first. But svn is not installed on kubuntu by default. But the shell prompted how I can get it. All I need to do is install subversion using sudo apt install subversion. I am starting to like kubuntu. I tried doing that but kubuntu chocked saying it could not find subversion in the repository. Since I know very little about debian/kubuntu I decided to go with some UI tools instead of commandline. I fired up adept and searched for subversion. Nothing. I understood that the software source is wrong. I fixed it by checking all options in "Adept > Manage Repository > Kubuntu software". I was then able to find subversion and installed it from adept.

Now svn worked. I checked out kaa package from Freevo. Next I needed to compile evas (download.enlightenment.org). I downloaded the source and ran "./configure". The configure failed. A quick look at the config.log revealed that the gcc could not compile simple c code. The reason is "/usr/bin/ld: crt1.o: No such file: No such file or directory" error. I have no idea what it means. A quick search on Google got me going. All I had to do was install libc6-dev. A few seconds later I was on my way.

But not too far. Now the configure script complained that I do not have pkg-config. Installed that too. Once again configure complained that I did not have freetype2 fonts. I am pretty sure I have them. So one more Google search later I find myself installing libfreetype6-dev. Now configure is happy.

I was able to do "make". It took some time to compile but I had no problem. Now to install kaa.

Tuesday, January 29, 2008

Building a linux gaming PC: Update 1

Today I received my 1GB memory, the upgrade I require to transform my media center desktop PC into a moderately powerful gaming PC. I am still waiting for the nvidia 8800 GT and the wireless keyboard & mouse to be shipped.

QEmu on Mac: Part II

So after a bit of thought I decided not to use Gentoo, because as it is Q is very slow and I did not want to compile all of Gentoo. Instead I decided to go the easy route with kubuntu. All I had to do was to download the image and start a new virtual PC with the install image as the virtual cd. Booting the virtual PC from the CD image launched Kubuntu. So far so good.

Installing kubuntu was very easy but slow because of Q. It probably took about an hour until the installation was complete. Now I have linux in Mac. Sweet. Restarting the virtual PC and selecting boot drive to the virtual harddisk boots into the installed kubuntu. It is slow, but still usable. I can live with it.

Now to test internet. D'oh. No internet. A ping reveals that even domain is not being resolved. ipconfig reveals that an IP is not assigned to eth0. After tweaking the network settings to make use of dhcp I now have an IP. A ping resolved the domain name, however my browser still says error -- page cannot be loaded. Is there a firewall in kubuntu that is preventing access to internet? Hmm not sure what happened but restarting the virtual machine got me my internet. Almost there...

Finally time to install all my IDEs and tools.

Q on Mac

With my failure to run VirtualBox on Leopard, I decided to go with Q (http://www.kju-app.org/kju/). Here are some notes about my adventures with Q on mac.

1. I downloaded the mac release and the install was a breeze.
2. Created a new Virtual machine. Named it Gentoo, gave it 512MB memory and 10.00GB harddisk and the cd-rom is the gentoo install image. Everything looks good so far.
3. Set to boot from the cd and launched the virtual machine "Gentoo".
4. Wohoo I see linux booting. But it is very slow. 1 CPU on my mac book pro is maxed out but the booting was going very slow. Well I guess that is what you get with an emulator but somehow I remember VirtualBox on linux to be much faster. Anyway continuing further
5. I got my shell prompt. hdparm -tT /dev/hda gives about 80MB/s. Nice! I know I am in a virtual environment.
6. ipconfig gives a virtual ip for eth0. A ping to www.google.com resolves the domain name to an IP but I never get back a response for the ping. Hmm. Am I inside a firewall? That is ok, I will continue with my install. At least I am able to ping to 10.0.2.2 which seems to be the QEmu gateway for network traffic on the virtual net.
7. Yes I was right. The pings are not working but I am able to access the internet. I was able to do "links www.google.com" and I got the google's landing page.

I am trying out Q on mac during my commute to work. Now I am approaching my destination. So more in my next post today evening when I am on my return journey.

Monday, January 28, 2008

VirtualBox on Mac: Part II

...continued from previous post

6. Downloaded the Gentoo image.
7. Selected install from an image in VirtualBox.
8. Click continue. Darn that "App quit unexpectedly" dialog again.
9. Click reload. Again the same error.

I had to learn it the hard way. VirtualBox beta release for mac has some known issues with Leopard. I install Leopard over Tiger just a month ago. I did not know I would regret so much. Oh well, I guess I will have to wait until the next release of VirtualBox. I wanted to build VirtualBox from svn, but before I compiled it, I searched on the net to see other's experiences and they were not very positive. I decided to go with other virtual environments until VirtualBox is fixed. Here is a link explaining the problems with Leopard and compiling from svn http://www.macwindows.com/virtualboxbeta.html.

VirtualBox on Mac

So I have used VirtualBox on my Gentoo machine a few weeks ago. I loved it. Very simple to use. Now I wanted to install Gentoo linux on my macbook pro laptop. I did not want to erase Mac OS, just want Gentoo running along side. I decided to give VirtualBox a try. At the time of writing this blog the VirtualBox download page says that the mac build is in beta for intel macs (http://www.virtualbox.org/wiki/Downloads), but I decided to try it any way. I am writing this blog as I am trying VirualBox to install Gentoo on my macbook pro.

1. Ok so I downloaded the .dmg and the install was a breeze.
2. I launched the app from the application folder. Oh what is this. I got a message saying that the app exited. A dialog asked me if I wanted to relaunch. Uh? Alright relaunch. Now it works. I got my VirualBox window!
3. Created a new virtual machine for Gentoo. Enter name, allocated 512MB (my macbook pro has 2GB :-)
4. Created a new virtual disk on which to install Gentoo. Allocated 10.00 GB dynamically resizing virtual disk. Click finish.
5. Now to download Gentoo minimal installation disk from (http://www.gentoo.org/main/en/where.xml).

This will take some time. I will probably continue tomorrow. Wait for my next post ;-). But wow that was really easy. It just took about 15 mins from start to finish.

Friday, January 25, 2008

Keyboard, Mouse, Memory and GPU

As I mentioned in my previous post, I am looking for a wireless keyboard & mouse, a 1GB memory card and a graphics card for $300. After spending several hours frantically searching for various deals I finally came to a conclusion about what I want. However the budget has gone overboard.

For the memory, the search was simple. I need a 1GB 800MHz RAM for under $30. I first went to newegg.com as usual and found a deal almost immediately. The link is http://www.newegg.com/Product/Product.aspx?Item=N82E16820146117. I know the link will not live for ever, so for reference it is a mushkin 1GB 240-Pin DDR2 SDRAM DDR2 800 (PC2 6400) Desktop Memory. It comes with a heat spreader (awesome :-), and a near 5 star rating in newegg.com. The only complain people had was about its large heat spreader which may obstruct another memory when attempting to place beside it in the next DIMM slot. I don't think that will be an issue for me. Let us see. And it has free shipping too! Sweet. The total cost came out to $27 shipped. It saved $3 from my budget allocation. Score!

Next I need a nvidia 8800 GT 512MB for about $230. This was very difficult. I searched for deals everywhere I could find. The best I could get was $268 (because of taxes in CA, for the first time I hate to be in CA). But I sold my soul to the devil and went with a cheaper offer, but it was in backorder. The ETA it seems is 30 Jan 2008. Not too bad, just 5 more days. I guess I can take that kind of risk :-). But the good news is that it is an EVGA card. From the reviews I found out that it is one of the better cards. Although some reviewers said the fan was loud when the PC boots, it is not a problem for me. My PC is always on. Many have reported that it can be overclocked considerably. However I don't plan to overclock it any time soon. I plan to play games at 1280x720 resolution on my TV and that should be plenty for the games I intend to play. Once more demanding games come about I will probably overclock it. Finally for the price. It weighted in at $242. Damn the shipping costs. The card itself goes for $228, but there is a $14 shipping charge. By the way I found it at ncixus.com. I went $12 over budget. Oh well.

Finally it is time to buy a wireless keyboard and mouse. This turned out to be the most difficult of all. I researched and searched and searched. There are far too many parameters. It should have a long range. 10 ft is a good start but most of them have a range of 6 ft only. The next problem is mouse not being very responsive. So no matter what the product specification says about the mouse's DPI, it just is not good enough if the receiver cannot pick up all the data. I have never used a wireless mouse or keyboard from close range let alone controlling my TV from my couch. Hence this will be a big risk. The next parameter to worry about is the batteries. I wanted a product that comes with rechargeable batteries and a charger. This made the task of finding a product incredibly difficult. Add to it, the budget of $40. These things are very expensive. I did not allocate the budget wisely. After much research I finally set my eyes on Logitech 1500 laser wireless keyboard and mouse. It comes with a charger. The ratings are average at best (I found very few reviews). No one mentioned the range exactly. All they said was "the range is great" or "the range is better than most wireless keyboards I used". Whatever that means. The best price I could get for it is $58 shipped. That is $18 over my budget! It is a no go for now. My plan is to go out to some local stores and see if I can find anything better. If everything fails, I will be back and purchase it for $58.

Update:
So a little more searching and I found the keyboard and mouse for $53. If I use Google checkout for the first time I could get it for $43 which will be very close to my budget. What do I do? Just ask my friend to open a Google account and make her buy it! Simple. The final price came out to $43 and the site I bought it is buy.com.

My total comes out to $27 + $242 + $43 = $312. I wish I could find a cheaper GPU. From looking at past deals I know I should have brought the card during thanksgiving when dell was carrying it for $208 + shipping and tax. I probably would have made it with my budget. But all in all I am quite satisfied with my adventure. Just $12 overboard.

Thursday, January 24, 2008

Looking to buy 8800GT

How hard is it to buy a graphics card for your desktop? Easy right? Hardly!

In my previous post I casually mentioned that my Dell E1705's GPU burnt up. I will probably write how that happened in my next post. But for now it suffices to say that I need a GPU fast to continue playing my Need for Speed, Age of Empires and Command and Conquer. I know these are not very demanding games but I still want to buy a powerful graphics card, not for my fried Dell e1705 (the GPU was nvidia Go 7900GS) but for my media center desktop. My desktop has always been used as a media center. It is connected to my music system and LCD TV. It has over 1TB disk space to store my HDTV recordings and ripped movies/music. However since I only planned to use it for playing media, it has a cheap nvidia 6100 GPU (on board). It has 1 GB of RAM which is pretty good for media center needs. But now I need to upgrade it to replace my gaming laptop. My plan is to install a powerful GPU and run games using wine-hq from linux. The media center PC runs Gentoo linux and Freevo to record and play media. So if I can just start another X and run games on the side I have a super cool PC. Freevo can record while I play games.

Nice but then there are 3 problems. First I need a powerful GPU because wine eats some GPU cycles since it does not run at 100% native speed of windows. I have my eyes set on nvidia 8800GT 512MB. Next I need a memory upgrade. 1GB just won't cut it. So I need at least another 1GB, may be even 2GB who knows. Finally I need a wireless mouse and keyboard because I don't want to sit right in front of the TV and look at the 32" screen up close while playing games.

I want to do all that with a $300 budget. Here is how I am planning to distribute the funds. For 1GB memory I allocate $30, for wireless keyboard and mouse I allocate $40. So I am left with $230 for GPU. I tried to allocate the maximum to the GPU. Makes sense right. Now I don't want to sound cheap but one thing I definitely want to steer clear is to look stupid. I know there are deals out there to buy the GPU for less that $230, but they come and go. I have to find it. I would be stupid if I just buy the card for $270. That is not challenging at all. The task for me for this week is to look out for deals to buy the components at the cheapest possible price without having to wait for back orders or using mail in rebates (god I hate those). Can I do it? Let's find out. Let me go look up some deals and then update this post.

Welcome 2008

Isn't it a bit too late to welcome 2008? Well not for me I guess. I just realized I am in a new year. How fast days have moved. I almost remember nothing from the time I last posted till date. I was just too busy with all the things going in my life. Well it is not too late for anything. So we are almost 7% into 2008 and here I am once again blogging. I will try to start blogging a little more often.

This is the first time I am blogging from my Google shuttle with it's wifi. Not too bad eh? Usually I spend the 1 hour commute on the shuttle by reading wired or Dr. Dobbs or Electronics for you in the morning shuttle. And spend the evening 1 hour by watching some of the excellent tech talks that happen at Google. Perhaps most of you already know this but a lot of tech talks are recorded. I try to attend any tech talk I can, but mostly I prefer the recoded ones, because I can pause, rewind and resume when I want. Isn't that why TiVo became popular? My plan going forward is to try and do some blogging once a week (or when ever I feel like) during my commute.

A lot of things happened in the past few months and I need to record them. Just to name a few, I blew my Dell e1705's GPU just a couple of days before new year. A very sad ending to a $1600 laptop I should say. But it is not the money that blew up that hurt me. No. But it was the tragedy that my faithful laptop has died and left me alone that hurts me. Other than that I tried out the new KDE 4.0 and it is pretty good. More comments in my next blog. Then I also tried out VirtualBox on my Gentoo machine. Works great. Once again that is for another day. I built a budget media center PC running freevo for less than $500. That will probably appear in another blog then. Finally I recently tried out wine-hq and it works great, but still very slow when compared to windows games. More about it soon. Then I tried out elisa (https://code.fluendo.com/elisa/trac/) and sent a fix and opened a bug. So why wasn't I blogging while so many things were happening in my life? I am not sure myself either. May be I will contemplate on that and write another blog?

Huh enough rambling. I have to get to work. My shuttle is slowly approaching its final destination (my work place). I will come back with a new blog soon. And oh I forgot "Happy new year"!