Search This Blog

Tuesday, April 13, 2010

Static IP and CUPS issue

I followed the guides here to set my HTPC to a static IP as there seems to be an issue with Samba vs DHCP in Karmic.  Did not solve my intermittent hanging issue though, grrr.

No point going back with it though, it's nice that it always has the same IP and a proper hostname now.

Update 20/02/10 - Ok so I figure it has to be a samba problem - and thus I am on a quest to get ALL errors out of my /var/log/samba

I have edited my /etc/samba/samba.conf:

Comment out the printing bits - gets rid of CUPS error

# lpr(ng)  printing. You may wish to override the location of the
# printcap file
;   printing = bsd
;   printcap name = /etc/printcap
# CUPS printing.  See also the cupsaddsmb(8) manpage in the
# cupsys-client package.
#;   printing = cups
#;   printcap name = cups
;   comment = All Printers
;   browseable = no
;   path = /var/spool/samba
;   printable = yes
;   guest ok = no
;   read only = yes
;   create mask = 0700
# Windows clients look for this share name as a source of downloadable
# printer drivers
;   comment = Printer Drivers
;   path = /var/lib/samba/printers
;   browseable = yes
;   read only = yes
;   guest ok = no

....and then at the bottom, I added this:

load printers = no
printing = bsd
printcap name = /dev/null
disable spools = yes

....which was everything I could find about disabling CUPS.
Finally, I told the XBMC machine not to behave as a domain master as I see the odd election message in my Win7 event logs:

# Domain Master specifies Samba to be the  Domain Master Browser. If this
# machine will be configured as a BDC (a secondary logon server), you
# must set this to 'no'; otherwise, the default behavior is recommended.
domain master = no

UPDATE - Still crashes, of well....

Updated XBMC Live to SVN

I updated to an SVN version - much better SD scaling is now in place, really helps with DVD quality source material.  XVID stuff still looks shit of course...but SD DVDs look a lot better with this. I updated my Camelot live install to SVN.
Didn't fix my hanging problem but the new version has some interesting new features and audio in particular seem more in sync, something I've found a bit ropey on Camelot.

Not sure I like the changes to Confluence, they're a bit rough around the edges but certainly it's all still functional and I am sure it will get slicked up again for the next release.  Occasionally when starting a video file there is some green pixelation but a quick pause/unpause cleans it up.

The latest SVN has the higher quality scalers from below built in.

To do this:
add to : /etc/apt/sources.lst

deb karmic main
deb-src karmic main

Then login as root using putty and do this:

apt-key adv --keyserver --recv-keys 64234534

(gets the keys for the repositories)

apt-get update
apt-get upgrade

The it told me to:
apt-get -f install

So I did and wa la, XBMC restarted with latest SVN (I had made a complete back up in case of failure!).  Seems quite stable so far.

Setting up Harmony Remote with XBMC

Just use:
Media Center PC - Microsoft Media Center PC (Media Center Extender)

As the device for your XBMC box.

This should get 99% working straight away, just tweak any buttons in your action you need to change from there (see post below).

Tweaking Remotes/Keyboard (DiNovo Mini and Logitech Harmony in my case)

Just added some useful things to the remote.

Log in as xbmc and put in userdata/keymaps/keymap.xml.

This gives easy access to subtitle delay via the 'y' key on the keyboard during video play, and on the home screen I can push '1' to clean the library then '2' update it.  Just saves a bit of time!

Also added 'r' key to get XBMC to reload skin - makes developing mods much easier as no reboot required!





Remaining Issues Post Install – Solutions Gratefully Received!!

After the install and tweaks below, there are some remaining issues:

- Still a 1 second delay for audio when starting/coming off pause (had this with previous version too).  Think it is pulseaudio related.

- Confluence is really dark due to 0-255 vs 16-235 issues. While VDPAU can have correct 'studio' colour now, when switched on this still leaves SD material with crushed blacks/whites. So best to set brightness to 56 and contrast to 43 and save for all movies - this make both HD and SD material have decent detail. Not ideal as main interface is still too dark but workable for now.  Hopefully the bring correct output colour to the whole system soon.

XBMC Camelot ASRock ION 330 Install Log

Hopefully this helps people get a really smooth XBMC install on their ASRock Ion 330 Machines.  None od this is original content, I have shamefully ripped this stuff off various xbmc forum posts and other blogs, and just stuck it all in one place for my own convenience.  Hopefully it makes someone else's life easier as well!

My Hardware:

  • ASRock ION 330 (Original version)

  • 32GB Corsair X SSD disk inside.

  • Logitech Harmony 525 (with USB IR Receiver from Rock Vista MCE Remote)

  • Output sound/video via HDMI (to Denon 2309 receiver)

  • Final audio output to KEF 3005SE 5.1 speakers)

  • Final video output to a Panasonic 50" 1080p plasma (V10)

  • 1080p @ 24,50 or 60  Hz as per the source

I suspect this config or close to it is reasonably common as I've seen several similar configs mentioned regularly...

Step 1.
Download XBMCLive ISO and burn to disc (I used Nero, but there are plenty of free alternatives like CDBurnerXP to do this)

Also download putty.exe (gievs you direct terminal access to the underlying ubuntu system, so you can do upgrades etc) and WinSCP (for file transfers, e.g. skins)

Step 2.
With a keyboard attached to your ASRock, pop the CD in and power up the unit.

Hit F11 to get the Boot Menu up when you get the first BIOS screen.Once the boot menu is up, choose to boot from the Slimline drive.

You will get a text menu, use the arrow keys to move down and choose: Install XBMCLive to disk

Go through the install process, set the user to 'xbmc' and password to 'xbmc' (or soemthing stronger if you prefer).

Once it is finished, your system will reboot (take out the disc) and XBMC should come up.

Step 3. Set up root access
You will get some warnings about keys when doing this next bit, just hit 'yes' to accept the keys.

Login to your machine using putty.exe (you can get your IP addpress from the system info section of XBMC).  Login as xbmc with the password you set during the install.

At the prompt type 'sudo passwd' to set a new password for the root user - so you can make changes to any file you like.

Then, set up a login in WinSCP using the root details so you can browse around your machine's file system.  Once you have the file you need, just right click on it and choose 'edit' to edit it directly from WinSCP, very easy.

Step 4. Fix a few things up....

I usually login as root via WinSCP to do this, and jsut right click on any file I want to change, choose 'edit' and you can do it right there.

4a. Speed up Boot Time A Bit

Change the timeout setting in the /boot/grub/menu.lst file from 3 to 0 - shaves 3 seconds up and from a cold boot to XBMC login is <20 seconds with my hardware.

4b. Get Really Smooth Video (at the appropriate refresh rate) to work

Get 24p mode to be available, and native scaling, also fixes problems with new video sync modes

Add into 'Screen' section of etc/X11/xorg.conf:
Option         "DynamicTwinView"       "False"
Option         "Composite"             "Disable"
Option         "FlatPanelProperties"  "Scaling = Native"

and reboot.

In XBMC Settings/System set your screen to 1920 by 1080p and 50hz.  In Settings/Video/Playback set the 'adjust refresh rate' option to on,  This will mean the XBMC interface refreshes at 50hz and is nice and smooth, but all your videos will play at their appropriate refresh rates as well, so 24p for film stuff and 720p TV rips, 60hz for reality type stuff shot on video, and 50hz for stuff from the Uk or whatever.

If your TV has a 'smoothvideo' or 'smoothfilm' option when playing 24p material, I thoroughly recommend turning this OFF to give your films a proper film like appearance, otherwise movies will take an over-smooth, video like appearance on once you've done this step

4c. Fix susupend/resume by remote

Resume from suspend works once the following is added to /etc/rc.local:
echo  USB0 > /proc/acpi/wakeup
echo "rc.local has completed sucessfully." >> /tmp/resume.log
exit 0

(assuming your remote receiver is on USB 0 - see for details)

4d. Get Sound To Work Over HDMI

Argh no sound!

Unmute everything and set to 100 for all channels except the MIC:

Login as root with putty

> alsamixer

Unmute and set volume (MM means muted and OO On)
Hit "m" to toggle mute on/off.
Do not forget to unmute HDMI if you are going to use that!

2) Store Settings Permanently

>alsactl store 0

4e. Get Navigation Sounds Working in XBMC interface

Create a file in xbmc user home directory (login using WinSCP and the xbmc user, not root)

Right click to create a file, call it

Now edit this file and add:
pcm.!default {
type plug
slave {
pcm "hdmi"

4f. Fix SMB browsing to Windows 7 shares

Add this to /etc/apt/sources.list:
###### Ubuntu Update Repos
deb karmic-security main restricted universe multiverse
deb karmic-updates main restricted universe multiverse
deb karmic-backports main restricted universe multiverse

then as root in putty run:
apt-get update

apt-get  upgrade

This installs a newer Samba with bigfixes.  You should be able to browse SMB shares on Win7 now.

4g. Enable Samba
(Browse/copy directly from your windows machine to ASROCK)

Enabling SMB/Samba file sharing of XBMC Live folders

The Asrock Ion 330 comes with an internal hard drive if you would like to copy content to that HD running XBMC Live through Windows networking then that is possible. This is also useful for copying downloaded skins or plugins if you dont want to go through the built in XBMC svn-repo installer. Another possible use if you wish to run a third party media scraper like ember media manager so as to not have to use the built XBMC scraper to manage meta-data content.

Step 1) Start Putty & login as root

type in apt-get update

type in apt-get install samba & press y when prompted

Once its finished installing samba close Putty.

Step 2) Now login as root through WinSCP and browse to /etc/samba/ and right click on then edit smb.conf, then at the very end of the file add the following text lines, just copy and paste from the quote box below:
[xbmc home]
comment = XBMC Home Share
path = /home/xbmc
force user = xbmc
inherit permissions = yes
read only = No
guest ok = Yes

[xbmc system]
comment = XBMC System Share
path = /home/xbmc/.xbmc
force user = xbmc
inherit permissions = yes
read only = No
guest ok = Yes

(add any others the same way)

Step 3) Click the floppy disk icon to save changes then close WinSCP and reboot your XBMC Live system.

If all has gone well you should see your Asrock Ion 330 XBMC Live system show up in windows network browser with any folders you created in the home folder in XBMC file manager. System files for copying skins or anything else can be copied in through the system share folder.