HOWTO: Downgrading Intrepid’s bluetooth packages to Hardy’s

** Update: Jaunty has now fixed pairing devices with non-standard pins, so this HOWTO is now moot (for me at least)


The purpose of this document is to describe how to roll-back the bluetooth packages in Intrepid to Hardy’s version.

There have been a lot of Bluetooth regressions which were introduced in Bluez 4.x, one of which has stopped me from being able to pair my Orange Bluetooth Speakers with Intrepid. Other bugs include the following:

The only solution that worked for me was to remove Intrepid’s bluetooth packages and install Hardy’s instead. I’ve been using them quite a bit now and haven’t spotted any problems even though I had to fudge the dependencies.

WARNING: Following this HOWTO could potentially break your bluetooth altogether or even your whole installation. Make sure you backup before trying any of these steps.


1) Convert Intrepid repos to Hardy’s:

$ sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
$ sudo gedit /etc/apt/sources.list

Search and replace all instances of the word ‘intrepid’ with ‘hardy’. Save and exit.

$ sudo apt-get update

3) Replace libbluetooth3 with libbluetooth2’s files. Hardy really uses libbluetooth2, but there are a ton of apps in Intrepid which are dependent on libbluetooth3, so we can’t remove it, otherwise we’ll break apt-get due to dependency errors. Instead, we’ll install libbluetooth2 alongside libbluetooth3 and manually remove libbluetooth3’s files:

$ sudo mv /usr/lib/libbluetooth* /tmp

2) Install libbluetooth2 & disguise it as libbluetooth3

$ sudo apt-get install libbluetooth2
$ sudo ln -s /usr/lib/ /usr/lib/

4) Remove all of Intrepid’s bluetooth related packages:

$ sudo apt-get remove bluetooth bluez-utils bluez bluez-alsa bluez-audio bluez-cups bluez-gnome bluez-gstreamer bluez-compat --purge
$ sudo apt-get clean

5) Install Hardy’s bluetooth related packages:

$ sudo apt-get install bluetooth bluez-utils bluez-audio bluez-cups bluez-gnome bluetooth-alsa

6) Restart bluetooth:

$ sudo /etc/init.d/bluetooth restart

Make sure to test everything you’re using carefully and roll-back if this breaks something in an app you need. Some apps will probably break because they really do require libbluetooth3, although I personally have not seen any.

7) Convert your repos back to Intrepid’s. Follow step #1 again, but replace Hardy with Intrepid.


HOWTO: Play audio on soundcard & bluetooth speaker simultaneously

keywords: howto play audio soundcard bluetooth speakers same time a2dp simultaneously multi-room


The purpose of this howto is to describe how you can set-up your computer to route all sound played to the soundcard’s wired speakers as well stream the sound to a pair of bluetooth speakers simultaneously. Note. I’ve updated it to work with Karmic. Can’t be followed on pre-9.10 releases.

By placing the bluetooth speaker in another room, the computer can act as a central hub to play music wirelessly in many rooms, as well as locally in the same room.


1) Pair bluetooth speakers with computer and test A2DP.

Right-click on Bluetooth icon in top panel and ‘Setup New Device’. Follow the steps to pair the computer with your speaker.

Left-click on the icon, go to Devices and make sure that you’re connected to the audio device.

Right-click on the volume-control icon in the top panel, go to ‘Sound Preferences’ and then the ‘Output’ tab. You should see your bluetooth speaker as an output device. Select it and play something, and it should play through your speakers.

2) Combine soundcard sink and bluetooth sink into one sink so that PulseAudio sends audio stream to both simultaneously.

First we need to find what the sink name of our soundcard is. This can be done by typing the following in the terminal:

pacmd list-sinks

You should get a list of all available sinks. You should see your soundcard sink and the bluetooth sink that streams to your speakers. Then we need to combine them into a virtual sink by running the following replacing the sink names passed to the ‘slaves’ parameters with the sink names pacmd returned:

pactl load-module module-combine sink_name=combined slaves=alsa_output.pci_8086_24c5_sound_card_0_alsa_playback_0,bluez_sink.00_0D_3C_A0_C0_45

4) Test combined sinks. To do this, first install pavucontrol:

sudo apt-get install pavucontrol

Then play something in totem, run pavucontrol, right-click on the playing stream, and select the output device to be the combined sink.

5) Have PulseAudio load new set-up at start-up by default.

[to be written]

HOWTO: Workaround MythTV’s screwy shutdown / reboot / logout behaviour when running as a desktop application

There are issues with running MythTV as a desktop application, which essentially breaks the regular desktop shutdown/reboot/logout controls (i.e. in Gnome) while MythTV is running in the background.

Apparently, MythTV is designed to catch the SIGQUIT signal that the OS sends when you click shutdown/reboot/logout in Gnome. It then asks ‘Are you sure you want to quit?’ and waits, keeping the computer running, rather than forcing the app to quit and shutting down the computer.

This is a real pain if you have a dual screen set-up and MythTV running in the background (i.e. on a second xserver connected to the tv) while you use the first as a regular desktop. So here’s a solution I’ve put together in order to regain use of the logout/reboot/shutdown controls.


So here’s an outline of the solution. Note, this guide is designed and tested on Ubuntu Gutsy since that’s what I’m running at the moment. If you want to use it on another distribution/version, you’ll have to figure out the differences on your own. Updates welcome though, so please get in touch if you have any better ways of doing things.

If you disable the prompt to Exit from within MythTV, when you click logout/reboot/shutdown, MythTV quits, but the computer doesn’t shut down (don’t ask me why.. this is just how MythTV behaves). In this situation however, messages appear in /var/log/daemon.log indicating that a logout/shutdown/reboot button has been pressed. All I’ve really done, is write a perl script which tails the daemon.log, and when it finds a message indicating a button has been pressed, it forces the computer to execute the action which was pressed. This script needs to be run when the computer starts up, and the computer pretty much regains normal behaviour.


1) Configure MythTV not to prompt you with a ‘Are you sure you want to quit?’ message. If this isn’t done, MythTV just waits on the SIGQUIT signal, and nothing appears in the daemon.log so the script won’t work.

From within MythTV you can find this option here:

Utilities/Setup -> Setup -> General -> General -> Confirm Exit

2) Install the libfile-tail-perl package to provide the perl libraries which are required by the script to tail the log:

$ sudo apt-get install libfile-tail-perl

3) Right-click and ‘Save Link As…’ the following script to a location on your filesystem. Some people like /usr/local/bin, it’s up to you though, I personally like ~/.scripts, so I’m going to use that in the following examples.

4) Add the ‘poweroff’ and ‘reboot’ commands to your /etc/sudoers file. Edit the file by running the following at the command-line:

$ sudo gedit /etc/sudoers

And add the following 2 lines, replacing ‘username’ with the user you will be logging in with:

username ALL=NOPASSWD: /sbin/poweroff
username ALL=NOPASSWD: /sbin/reboot

5) Configure script to run at startup. In order o allow the log-out option to work, it needs to be added to the user’s session Start-up Programs (rather than the super-user rc.local). This can be done by going to the following location:

System -> Preferences -> Sessions