Huge Discounts on Mobiles, Books, Cameras, Computers etc: @Flipkart

Wednesday, January 07, 2015

NUC Setup for XBMC

After using Raspberry Pi as a media player for almost an year, took the plunge and upgraded to an Intel i3 NUC (Next Unit of Computing). For those who doesn't know, NUC is a very compact computer, which can be used as a light weight PC (can be attached behind a monitor using VESA mount) or as a dedicated device (eg: Media Player, Streamer, NAS etc).

I have used other media players like ASUS, Kaiboer etc before, but have been disappointed by lack of software/firmware updates and how quickly they get dated when new codecs come etc. So decided that will go for only more customizable and versatile platforms only. Raspberry Pi + RaspBMC is a great media player which is really value for money. Though the specs are low, it supports hardware decoding and hence most of the videos work just fine. Low price is the main attraction and there is a great community support. But of late I see my pi sweating a lot when decoding 1080P movies with AAC 5.1 audio. Other Audio codecs like MP3, AC3, DTS  and even AAC 2.0 with 1080p works fine.

Though the Celeron NUC is powerful enough, I wanted to be future proof and have plans to multi-task my NUC. So went for i3 based D34010WYKH, with just 4GB RAM and an 8GB USB3 mem stick as extras. Advantages of a NUC (mini PC) over a PC is its size and much lower power consumption. It mainly uses the laptop/notebook version of hardware to achieve this. Without further adieu, lets dive into the details of the setup.

1) Hardware
4GB RAM Kingston (1.35v)
USB3 8GB stick
Rii8 keyboard

2) Software
First thing you have to do is to upgrade the BIOS of the NUC. It is quite easy, download the new bios, copy it to a USB drive, start the NUC and press F7. Detailed instructions are available in above link.

Since I would be mostly using it as a media player, free linux is a much better option that paying for a Windows license. A linux distro with a decent UI system is a better option than going too light like OpenElec or Ubuntu Server. So I chose Xubuntu 14.10. Xubuntu is basically Xfce + Ubuntu. Download latest Xubuntu 64 bit iso, use something like LiLi to create a bootable USB installer. Once you install Xubuntu, you need to install the latest Intel HD4400 Graphics driver for ubuntu.

But the intel graphics driver installer won't work as it currently supports only upto Ubuntu 14.04 and above Xubuntu uses 14.10. So you should either downgrade the version or just temporarily tweak it in the file /etc/lsb-release and rerun the installer.

change to

Note: always a good idea to create a copy of any file you change as backup. Easy to revert if you screw up.  Eg: cp /etc/lsb-release  /etc/lsb-release.backup

Once you do this, you can install VNC (eg: Vino VNC), FTP etc on the server to make it easily accessible over the network. 

But there is a bug with intel graphics. It doesn't seem to redo HDMI handshake when you switch display. For example: I use an HK receiver which is connected to a JBL 5.1 system and a projector. It has an HDMI switcher (4 in, 1 out) and I use other sources like the old pi, a TV Tuner DVR etc. Also I leave the NUC always on, but switch off the receiver. Due to this bug, I had to restart my NUC every time I start the receiver or switch sources. Then I found a hack that just restarting the XServer would do the resync. So created the below script and created a keyboard shortcut to run it, so that I can execute by pressing a key on my full keyboard remote (Rii8)
echo "Restarting X "
echo 'YOUR_SU_PASSWORD'| sudo -S /sbin/restart lightdm

Once all the above setup is done, you can install latest XBMC following the instructions here:

I created a shortcut for XBMC and kept it in the desktop. I just launch it whenever I need XBMC, you may also launch it via a keyboard shortcut.

I also use the NUC as a print server by connecting a cheap USB mono Laser printer (Brother HL1110) to it. Initially I thought of setting up a full fledged NAS, but later realized it is more flexible to just replicate only part of the disk (I use two external 2 TB USB 3.0 portable HDDs). This way I can detach the disk and carry it around when I go for trips, and I just backup only my personal photos, videos etc and leave all the movies and other junk just in one disk. I use luckyBackup for syncing contents between the disks.

No comments:

Post a Comment