Wednesday, June 27, 2012

Mounting NFS shares from DLink NAS DNS320

The undocumented way to connect to DLink NAS DNS320 as per post below:

How my fstab looks like: /home/coyote/x nfs rw,hard,intr 0 0

Where is the address of the local ip of NAS.

‘/mnt/HD/HD_a2/Archive’ is the full path of the ‘Archive’ folder, on ‘Volume 2′ (HDD 2) of the NAS. 

Saturday, November 26, 2011

Howto: Remote SSH tunnelling on Ubuntu

On the server, install openssh-server

sudo apt-get install openssh-server

if you have firewall on the server, open port 22

if you want to access the server outside the router, port forward port 22 to the server's ip address also.

From the client,

ssh -Y remotemachine -l

commands issued will be started in the remote machines



Thursday, November 24, 2011

Setting up network printer in ubuntu 11.10

Oddly, the usual simple gnome printer setup application is missing from Ubuntu 11.10's interface.

One can still go to terminal, type


My printer is connected to the Asus RT-N16 router & the configuration to enter is as follow, where is the router's ip address.

Sunday, April 24, 2011

ATI linux drivers, room for improvement still...

Discovered another bug on ATI graphic chip linux driver.

Some of you may have noticed, if you install 32bits ubuntu 10.10 with 4G ram, it will automatically use the PAE kernel, which is a patch to the 32bits kernel to address all of the 4G ram. Sweet you may say.

Things took for a downward spin for my ATI chipset pc. After the ubuntu 10.10 install with 2 sticks of 2G ram, naturally the PAE kernel is in placed. My 2D desktop started giving lots of artifacts which made me ran to the shop couple times to change the board & ram thinking it's either the Biostar A880G+ board or the Kingston ram are having compatibility issue. 2 sticks of 2G ram with onboard graphic showing artifact, that is nothing new, so I thought. Unfortunately, new board & rams did not solve the problem. So I lived with the problem by using the 3D desktop, which miraculously has no artifact problem. Weird. And that was with the open source ati driver.

Lately, I tried to enable hardware accelerated HD video playback with the proprietary ATI driver & now the 'hardware accelerated' full HD playback is displayed in an even bigger mess... dropped frames, artifacts, messed up colors, tearing... I tried ATI driver version 11-1, 11-2 & 11-3 & no matter what I do, the problem persisted.

Then it daunts on me that the PAE kernel was at work. So, I reinstall ubuntu with 2G of ram alone & sure enough it installed the non-PAE kernel. What do you know, all the artifact, discoloration are gone... other problems like non-optimized hardware accelerated HD playback & high cpu utilization persisted. But those are, again nothing new for the poorly written ATI linux drivers.

So, could it be linux PAE kernel's problem, one ask? Not at all. I checked my other pc with 4G ram running the same version of PAE kernel, the 2D desktop, 3D desktop, hardware accelerated HD playback are all silky smooth, cpu utilization is low & stable. I even finished most of the Starcraft2 campaigns( except the final one ) on the onboard graphic chip, an it did all that flawlessly in linux with the PAE kernel & with 2 sticks of 2G ram.

It's nvidia 8300 onboard graphic chip. Kudos to nVidia.

Most people already knew ATI's windows drivers are a pain to install/remove compared to nVidia. I just have to say, ATI's linux drivers are even more buggy & much room for improvement.

A lesson to learn for the linux community. nVidia chipset is more linux friendly, always.

Bad news though, nvidia has since dropped out of the onboard graphic chipset race for DIY motherboard business. Intel won't let them in on their motherboard chipset business from i3, i5 & i7 series onward, except the OEM laptop & netbook segment. ATI won't let them in on their motherboard chipset business for obvious reason.

So, now the linux community is left with the buggy ATI graphic chips. Let's hope ATI will improve their linux support & give a better linux experience with their their graphic chips.

Let's also hope, Intel delivers the graphic drivers for their shinny & new Sandy Bridge chips soon. Words has it that, graphic support is only available from ubuntu 11.04 onwards. Which is another set back for the linux community.

Sunday, November 07, 2010

Hardware Accelerated HD Video playback with ATI graphic card - Part 2

To install mplayer

1 cd /usr/src
2 wget
3 tar xvfj mplayer-vaapi-latest.tar.bz2
4 cd mplayer-vaapi-20091106
5 aptitude build-dep mplayer
6 ./
7 cd mplayer-vaapi
8 make install
9 ldconfig

To install smplayer

1 cd /usr/src
2 wget
3 tar xvfj smplayer-0.6.8.tar.bz2
4 cd smplayer-0.6.8
5 aptitude install qt4-qmake ibqt4-dev
6 make
7 sudo make install
8 ldconfig

Configure smplayer following this link

Here is the playback of a HD video snippet using ATI HD 4250 onboard graphic & a Phenom II 3.2GHz unlocked Quadcore. Notice the high cpu speed scaled to full 3.2GHz often & the relatively higher cpu utilization % in the 30~42% max on the system monitor tab.

Here is the playback of the same video snippet using nVidia onboard 9300 graphic chip & Core 2 Duo 2.8GHz. Notice the cpu never really need to scale up to full 2.8GHz, mostly stayed low at a mere 1.6GHz & the cpu utilization is always in the low 20~30% & stable.

While you cannot see the video playback because video overlay is not captured by screen recording, playback were smooth in both cases.

This serve to demonstrate how nVidia's vdpau hardware acceleration is much matured, well implemented & superior in linux than ATI's vaapi. Nevertheless, it is a big step forward for ATI's to have hardware accelerated HD video playback in Ubuntu 10.10. Things should get better in future.

Wednesday, October 27, 2010

Hardware Accelerated HD Video playback with ATI graphic card

Hardware accelerated HD Video playback has been around for a long time in Windows OS. Previously, PC & laptop with slow processors were too slow to playback 1080P Full HD videos just by the slow processors in them. With graphic card accelerated HD decoding, all the PC & laptops with slow processors are suddenly empowered to playback 1080P Full HD Video. This is especially helpful in laptops with slow processors to extend battery life, while the onboard ATI/nVidia graphic chip are powerful enough to decode Full HD video with ease.

nVidia has to be commented for it's collaboration with the linux community & enabled hardware accelerated HD video playback with their integrated graphic chip or discrete graphic card. This is done through VDPAU & can be enabled by installing vdpau plugin for mplayer.

ATI however, has only recently enabled hardware accelerated playback via VAAPI support. And implementation in Ubuntu 10.10 Maverick still requires some tinkering with libraries and etc.

Here is how to enable VAAPI in XBMC media player for ATI graphic card/chips in Ubuntu 10.10.

ATI proprietary driver flgrx must be installed & activated via 'Additional Hardware drivers' under System tab in Ubuntu 10.10

Obtain latest libva files from


sudo dpkg -i *.deb

Add xbmc development ppa from

sudo add-apt-repository ppa:team-xbmc-svn/ppa lucid

(lucid is used here because the corresponding maverick xbmc ppa is not ready)

sudo apt-get update
sudo apt-get build-essential
sudo apt-get build-dep xbmc

sudo apt-get install -f
svn co xbmc
cd xbmc
sudo make install

sudo mv /usr/bin/xbmc /usr/bin/xbmc.bak
sudo mv /usr/bin/xbmc-standalone /usr/bin/xbmc-standalone.bak
sudo ln -s /usr/local/bin/xbmc /usr/bin/xbmc
sudo ln -s /usr/local/bin/xbmc-standalone /usr/bin/xbmc-standalone
sudo reboot

Now when you reboot xbmc should have VAAPI option under video playback.

On my AMD test rig running a PhenomII X2 555 unlocked to quad core 3.2GHz with integrated ATI 4250 graphic chip onboard, a snippet of 1080P Avatar was playback at 40~60% cpu utilisation without hardware acceleration in VLC & MPlayer. Cpu utilisation drops all the way below 20% when the same video clip was playback with Vaapi enabled XMBC.

( implementation of vaapi in mplayer & vlc to be further explored ... )

Tuesday, October 12, 2010

Buy two & get two free!

Buy two & get two free! Sounds too good to be true? Read on.

Wafer manufacturing process in microprocessor production is never perfect. While manufacturers prints a 4 cores cpu chip on to the silicon, some of the cpu cores can sometimes ended up malfunction or dead at the end of the manufacturing process. Instead of throwing away the chip with the remaining 2~3 cpu cores functioning perfectly well, manufacturer can disabled the malfunctioned cores & 'marked' the chip as a dual-cores or tri-cores cpu & sell them as it is. With such practice, it makes sense for cpu manufacturers to print more of the chips in 4 cores & test to 'bin-out' the chip into dual-cores, tri-cores or quad-cores chip, depending how well the silicon is yielding.

There were possibility also, in a situation when the yield is exceedingly good, a lot of the chips had all 4 cores fully functioning but the demand/order for dual-cores chip outstripped that of the quad-cores chip, manufacturers 'marked' some of the chips with 4-cores fully functioning as a 2 cores chips & sell as it is.

One of the chip I bought last week, an AMD dual-core PhenomII X2 555, may well fall into such category. It is a 4-cores chip that may well have 2 of the cores not meeting the stringent functional testing specification of AMD, and had two of the cores 'disabled' & being sold as a dual-core chip. Special motherboards like the BioStar A880G+ I bought, came with an 'ACC' option to unlock the disabled cpu cores. And viola! I have a chip with all 4 cpu cores fully unlocked at a flip of a switch on the motherboard bios. More extensive stress testing is definitely needed to know the 4 cpu cores are really fully functioning well. A simple test run of a HD video playback without gpu acceleration however, showed the 4 cores taking turn, 'speed-stepping' between 800Mhz to 3.2Ghz decoding & playing back the HD video. There were also no noticeable increase in temperature of the chip, hovering around 41 degree Celsius, same as when it was running with just 2 cores activated.

The chip I have is labelled 'Black edition' reflecting probably a die from a good yielding wafer that can either scale high gigaherz in speed or meeting the stringent testing specifications well. Of course, there is no guarantee that any chip, whether 'Black edition' or not, can successfully have the hidden cpu cores unlocked. Also, I cannot vouch for the reliability & functional aspects of such unlocked cpu cores. While there were many cases of successful stories of folks unlocking the cores & running it well without problems, it is equally not uncommon to hear folks have unlocked the hidden cores & found the system became unstable or not functional at all, most just flip the switch back & run it as dual-cores chip as it was originally intended.

The chip manufacturers definitely marked the chip as dual-core for a good reason. We may never know why. And if you don't try, you'll never know why.

So, here we have, a too good to be true, 'Buy two get two free' case, depending on how lucky you are.

Here, you see the chip I have, with 4 cpu cores in action, running on Ubuntu linux.

Here is a shot of the Black edition, AMD Phenom II X2 555 cpu chip, that had the 4 cores unlocked successfully.

Here is a shot of the BioStar A880G+ motherboard that made the unlocking trick possible.

Disclaimer: The writer shall not be liable to any damage to your computers by following the guide above. Try at your own risk.