[Install Script] Install XBMC Dharma on Ubuntu Maverick Minimal...almost
#1
As a little New Year's present, I have updated a script that has been knocking around to allow you to install XBMC on a minimal version of Ubuntu Maverick.

If you simply install Ubuntu from the mini.iso containing the basic Ubuntu Maverick install, then on reboot, download my script using:

Code:
wget www.prupert.co.uk/scripts/xbmcmaverickrevo.sh

make it executable, using:

Code:
chmod a+x xbmcmaverickrevo.sh

then finally run it using:

Code:
sudo ./xbmcmaverickrevo.sh

I find it is best to run it again, once the script reboots the machine, as this fixes a few issues (log in via SSH from another PC to do this).

It is still a work in progress, as you can't yet shutdown / restart etc via XBMC since it seems the method to add permissions in Ubuntu 10.10 have changed and they conflict with the setup here, so I am still looking into that. To shutdown / reboot at the moment, I log in via SSH and issue:

Code:
sudo shutdown -hP now

Also, it is designed to work just with the Acer Aspire Revo 3610, but there is no reason why it wont work with any other device (apart from maybe the audio configurations).

Enjoy.

Download It Here

I will update it to fix bugs and add some extra functions related to getting the install to work better with ION and Atom PCs, but I wont it become a monster like XCI, although cudos to the dude who valiently tried to maintain that script Wink

You can follow changes to it here: www.prupert.co.uk but I shall also update this post as well.

Update:

I've also released a script so you can run Boxee on the same minimal install aswell. You use the remote to launch it, so you exit out of XBMC using the Exit option from the power menu, then you launch Boxee by pressing the Yellow button on your MCE remote control. To get back to XBMC, simply exit out of Boxee using the Exit option from the main Boxee menu and load XBMC by pressing the Red button on your MCE Remote. You can change the remote and remote button used to launch either app by editing one simple file.

Download It Here
Reply
#2
Hi, I'm intrigued, especially since I've been struggling for hours today trying to get sound over HDMI working with Maverick (unsuccessfully).

I had a look at your script, and you are doing some magic with the /etc/asound.conf file that I haven't seen in any other forum post yet. I'm not sure if all of that file is applicable to my situation though (you seem to have some special cases based on whether you are connected to a receiver or to a TV?). I'll try tomorrow when I "get the TV back" from my better half.

Just to compare: my setup is an ASRock ION 330HT connected over HDMI to an HK AVR255 receiver, connected over HDMI to a Sony Bravia LCD TV (with sound obviously being handled by the receiver, not by the TV).

How does this compare to your setup?

Rgds
Reply
#3
Interesting. Ill keep this post in mind when I reinstall next time..
Reply
#4
Hi

I copied the asound stuff from the XCI script, from the Audio via HDMI and Optical option.

Since XCI was a generic script I assumed the same would apply to the asound portion.

I can confirm that optical works though not so sure about HDMI.
Reply
#5
Hmmm, still no luck with HDMI passthrough on my ASRock ION 330HT with Ubuntu 10.10 Maverick.
  • NVidia 260.19.29-0ubuntu1 drivers from ubuntu-x-swat team/PPA
  • ALSA version from ubuntu-audio-dev team/PPA
  • Pulse Audio is running
  • No special /etc/asound.conf or asound.rc at all
  • VLC plays perfect Dolby Digital / DTS clips (test clips downloaded from this site)
  • SMPLayer plays them perfectly as well (but if I set 'AC3/DTS passthrough through SP/DIF' then it doesn't, get crackling noises)
  • speaker-test -Dhdmi -c6 works, but the channels mappings are messed up
  • Can't seem to get this working either using mplayer and the hwac3 and hwdts audio codecs, hmmm... but then again that could easily be caused by me not using the correct command line options
  • XBMC->System->System->Audio Output:
    • Audio output: HDMI
    • Speaker Configuration: 5.1
    • Boost volume level on downmix: ON
    • Dolby Digital (AC3) capable receiver: ON
    • DTS Capable Receiver: ON
    • Audio output device: default
    • Passthrough output device: hdmi. Note: currently this causes "cannot initialize audio device" errors in XBMC". I've tried all other settings and many different spellings for Custom device (eg hw:0,3, plughw:0,3 etc etc) to no effect. With some combinations I don't get an error, but there's no sound.
  • Navigation sounds are working in XBMC over the HDMI connection
  • I can play music
  • I can hear sound from video sources that don't say "Dolby Digital" or "DTS" (eg as displayed by the XBMC info panel)

Looks to me as if the only problem here is the AC3/DTS passthrough over HDMI with XBMC (as it seems to work with other applications like VLC and SMPlayer).

Any further tips?
Reply
#6
Thanks for this. You can simplify a lot of that asoundrc stuff:

cat << EOF > /etc/asound.conf
pcm.!default {
type plug
slave {
pcm "both"
}
}

pcm.both {
type route
slave {
pcm multi
channels 6
}
ttable.0.0 1.0
ttable.1.1 1.0
ttable.0.2 1.0
ttable.1.3 1.0
ttable.0.4 1.0
ttable.1.5 1.0
}

pcm.multi {
type multi
slaves.a {
pcm "tv"
channels 2
}
slaves.b {
pcm "receiver"
channels 2
}
bindings.0.slave a
bindings.0.channel 0
bindings.1.slave a
bindings.1.channel 1
bindings.2.slave b
bindings.2.channel 0
bindings.3.slave b
bindings.3.channel 1
}

pcm.tv {
type hw
card 0
device 3
channels 2
}

pcm.receiver {
type hw
card 0
device 1
channels 2
}
EOF
Reply
#7
Any fixes for the bastardization that is LIRC in the Kernel?
Code:
GRANT ALL PRIVILEGES ON `xbmc_%`.* TO 'xbmc'@'%';
IF you have a mysql problem, find one of the 4 dozen threads already open.
Reply
#8
TakeOffYourXBMC Wrote:Thanks for this. You can simplify a lot of that asoundrc stuff:

cat << EOF > /etc/asound.conf
pcm.!default {
type plug
slave {
pcm "both"
}
}

pcm.both {
type route
slave {
pcm multi
channels 6
}
ttable.0.0 1.0
ttable.1.1 1.0
ttable.0.2 1.0
ttable.1.3 1.0
ttable.0.4 1.0
ttable.1.5 1.0
}

pcm.multi {
type multi
slaves.a {
pcm "tv"
channels 2
}
slaves.b {
pcm "receiver"
channels 2
}
bindings.0.slave a
bindings.0.channel 0
bindings.1.slave a
bindings.1.channel 1
bindings.2.slave b
bindings.2.channel 0
bindings.3.slave b
bindings.3.channel 1
}

pcm.tv {
type hw
card 0
device 3
channels 2
}

pcm.receiver {
type hw
card 0
device 1
channels 2
}
EOF


Also I've been using a script for my reinstalls. Here's a simpler way to get xbmc to auto-start; no need for openbox:

sed -i 's#exec /sbin/getty -8 38400 tty1#exec /bin/login -f xbmc </dev/tty1 > /dev/tty1 2>\&1#g' /etc/init/tty1.conf

cat << EOF >> ~xbmc/.bash_profile
case "\$(tty)" in
/dev/tty1) clear && startx &>/dev/null ;;
esac
EOF

echo "exec xbmc --standalone -fs" > ~xbmc/.xsession
Reply
#9
srv1973 Wrote:Hmmm, still no luck with HDMI passthrough on my ASRock ION 330HT with Ubuntu 10.10 Maverick.
  • NVidia 260.19.29-0ubuntu1 drivers from ubuntu-x-swat team/PPA
  • ALSA version from ubuntu-audio-dev team/PPA
  • Pulse Audio is running
  • No special /etc/asound.conf or asound.rc at all
  • VLC plays perfect Dolby Digital / DTS clips (test clips downloaded from this site)
  • SMPLayer plays them perfectly as well (but if I set 'AC3/DTS passthrough through SP/DIF' then it doesn't, get crackling noises)
  • speaker-test -Dhdmi -c6 works, but the channels mappings are messed up
  • Can't seem to get this working either using mplayer and the hwac3 and hwdts audio codecs, hmmm... but then again that could easily be caused by me not using the correct command line options
  • XBMC->System->System->Audio Output:
    • Audio output: HDMI
    • Speaker Configuration: 5.1
    • Boost volume level on downmix: ON
    • Dolby Digital (AC3) capable receiver: ON
    • DTS Capable Receiver: ON
    • Audio output device: default
    • Passthrough output device: hdmi. Note: currently this causes "cannot initialize audio device" errors in XBMC". I've tried all other settings and many different spellings for Custom device (eg hw:0,3, plughw:0,3 etc etc) to no effect. With some combinations I don't get an error, but there's no sound.
  • Navigation sounds are working in XBMC over the HDMI connection
  • I can play music
  • I can hear sound from video sources that don't say "Dolby Digital" or "DTS" (eg as displayed by the XBMC info panel)

Looks to me as if the only problem here is the AC3/DTS passthrough over HDMI with XBMC (as it seems to work with other applications like VLC and SMPlayer).

Any further tips?

Have you had any luck with this? I just went through the same thing last night / today. I can get stereo sound over hdmi no problem, but multichannel gives the initialization error.

Spent the day trying many different approaches, none successful.
Reply
#10
shmal Wrote:Have you had any luck with this? I just went through the same thing last night / today. I can get stereo sound over hdmi no problem, but multichannel gives the initialization error.

Spent the day trying many different approaches, none successful.

No, haven't tried again yet. I still want to try with the modified hda-intel file installed though, as can be found in various places on this forum.
Reply
#11
srv1973 Wrote:No, haven't tried again yet. I still want to try with the modified hda-intel file installed though, as can be found in various places on this forum.

I was able to create a .asoundrc file that fixes the mixed up channels. Still get the initialization error in xbmc though (wasn't expecting it to fix it!). The XMBC log does state that the initialization error is caused because the device is already in use. Going to try disabling navigation sounds later today and see if that changes things.
Reply
#12
Can you share the contents of the .asoundrc file, to help others?
Reply
#13
prupert Wrote:Can you share the contents of the .asoundrc file, to help others?

Sure thing. Found this while following links on the alsa site. Its not the magic fix yet, but gets one step closer at least.

Once this is in your asoundrc file you can use "speaker-test -c6 -Dswap51" and it should play out the right speakers.

Code:
pcm.swap51 {
   @args.0 SLAVE
   @args.SLAVE {
      type string
      default "plughw:0,3"
   }
   type route
   slave {
      pcm $SLAVE
      channels 6
   }
   ttable {
      0.0= 1
      1.1= 1
      2.4= 1
      3.5= 1
      4.2= 1
      5.3= 1
   }
}
Reply
#14
Partial success!

Disabling the navigation sounds (well, ALL sounds) fixes the device busy error and I was able to play an mkv, getting multichannel audio through the receiver.

Still to test:

1. Confirm other sound is fine (TED addon, etc) confirmed
2. Confirm the channels are correct (using the swap51 just gave static). confirmed using hdmi output with a test mkv that says what speaker should be sounding
3. Find a less "brute force" solution. Perhaps there is a way to change xbmc / pulse / alsa to not claim the sound device exclusively. still looking into this. anyone have suggestions?

The fix for this is to edit your xbmc startup script (/usr/bin/xbmc). Add the red line:

Code:
SAVED_ARGS="$@"
[color=red]export SDL_AUDIODRIVER=null[/color]
prefix="/usr"

The audio settings in xbmc are as expected (passthru device: hdmi, audio device, hdmi).

I'll play around some more this evening to try and get an answer to the 3 outstanding items. Srv1973, hope this works for you too!
Reply
#15
I don't know if you are still upgrading this script or not. There are a few things I changed in it before running it on my system:

Added the repo for the latest alsa:

Code:
add-app-repository ppa:ubuntu-audio-dev/ppa

Removed the following lines, as wholly unnecessary, those are header files not needed for the binaries, so why install them:

Code:
aptitude install nvidia-current-dev -f -y &>> $LOG
aptitude install vdpauinfo -f -y &>> $LOG
aptitude install libvdpau-dev -f -y &>> $LOG

Since I only use NFS and not Samba (My library is on a Linux box with a 9TB hardware Raid-5 array) I modified the following line:

Code:
aptitude install openbox xterm xinit x11-xserver-utils nfs-common -f -y &>> $LOG

nvidia-xconfig defaults to creating the config file XF86Config if none exist. You can force it to write xorg.conf with the -o option, like this:

Code:
nvidia-xconfig -s --no-logo --force-generate -o xorg.conf

The reason polkit-1 does not work is that the release xbmc still uses the old polkit (without the -1) don't know if the GIT Nightly changes this.

The repository for nighlies on ubuntu are now located in a different place. this line must be as follows:

Code:
add-apt-repository ppa:team-xbmc/unstable

I hope some of these edits are of some use to people here.
Image
Reply

Logout Mark Read Team Forum Stats Members Help
[Install Script] Install XBMC Dharma on Ubuntu Maverick Minimal...almost0