# Bluetooth headphones not working (Ubuntu 24.04 , built from source)

**URL:** <https://in-thread.sonic-pi.net/t/bluetooth-headphones-not-working-ubuntu-24-04-built-from-source/9351>\
**Category:** Support, Help & Resources\
**Created:** [December 3, 2024, 4:03pm UTC](https://in-thread.sonic-pi.net/t/bluetooth-headphones-not-working-ubuntu-24-04-built-from-source/9351 "2024-12-03T16:03:19Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![vasilis](https://avatars.discourse-cdn.com/v4/letter/v/ccd318/32.png) [@vasilis](https://in-thread.sonic-pi.net/u/vasilis)\
**Post date:** [December 3, 2024, 4:03pm UTC](https://in-thread.sonic-pi.net/t/bluetooth-headphones-not-working-ubuntu-24-04-built-from-source/9351/1 "2024-12-03T16:03:19Z")

</div>

Hello everyone!  
Some context:  
I am using Ubuntu 24.04  
I am using latest sonci pi , built from source  
I am using a laptop (dell) connected to a monitor that has output that I am not using ever  
I use my sony bluetooth headphones and they work fine with youtube for example

My problem:  
When executing that first block of code from the tutorial, I can hear the beat from my laptop speakers , (if youtube is playing at the same time I can hear YT on headphones and sonic pi on laptop speakers)

How can I have sonic pi use my headphones? (already the selected audio output from my OS sound settings)

I have read quite a few threads in here but none seem to be enough (maybe I am not understanding them)

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![vasilis](https://avatars.discourse-cdn.com/v4/letter/v/ccd318/32.png) [@vasilis](https://in-thread.sonic-pi.net/u/vasilis)\
**Post date:** [December 3, 2024, 4:08pm UTC](https://in-thread.sonic-pi.net/t/bluetooth-headphones-not-working-ubuntu-24-04-built-from-source/9351/2 "2024-12-03T16:08:20Z")

</div>

One more bit of info, in case it helps with diagnosing  
If I connect my headphones with a jack cable to my laptop, then sonic pi (even without restarting) sends the sound to my headphones just fine

---

<div class="post-metadata">

**Author:** ![Davids-Music-Lab](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/davids-music-lab/32/512_2.png) [@Davids-Music-Lab](https://in-thread.sonic-pi.net/u/Davids-Music-Lab)\
**Post date:** [December 3, 2024, 5:19pm UTC](https://in-thread.sonic-pi.net/t/bluetooth-headphones-not-working-ubuntu-24-04-built-from-source/9351/3 "2024-12-03T17:19:03Z")

</div>

It probably doesn’t switch audio devices automatically.  
I don’t know if Ubuntu is running Pipewire or Pulse. If it’s Pipewire (or JACK), you can reroute the audio in qpipewire or qjack.

---

<div class="post-metadata">

**Author:** ![vasilis](https://avatars.discourse-cdn.com/v4/letter/v/ccd318/32.png) [@vasilis](https://in-thread.sonic-pi.net/u/vasilis)\
**Post date:** [December 5, 2024, 3:05pm UTC](https://in-thread.sonic-pi.net/t/bluetooth-headphones-not-working-ubuntu-24-04-built-from-source/9351/4 "2024-12-05T15:05:26Z")

</div>

Thank you for the help Davids  
any idea if that is something I need to do through sonic pi or through my OS setting (and sonic pi should pick it up automatically)?

I have tried using pactl info/list sinks /set default sink/ etc but doesn’t seem to work

---

<div class="post-metadata">

**Author:** ![vasilis](https://avatars.discourse-cdn.com/v4/letter/v/ccd318/32.png) [@vasilis](https://in-thread.sonic-pi.net/u/vasilis)\
**Post date:** [December 5, 2024, 3:29pm UTC](https://in-thread.sonic-pi.net/t/bluetooth-headphones-not-working-ubuntu-24-04-built-from-source/9351/5 "2024-12-05T15:29:26Z")

</div>

another thing I tried is using the PulseAudio GUI (I couldn’t find qpipewire)  
I can see the sound generated by sonic pi but I can’t see a way to select the output

---

<div class="post-metadata">

**Author:** ![robin.newman](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@robin.newman](https://in-thread.sonic-pi.net/u/robin.newman)\
**Post date:** [December 7, 2024, 4:06pm UTC](https://in-thread.sonic-pi.net/t/bluetooth-headphones-not-working-ubuntu-24-04-built-from-source/9351/6 "2024-12-07T16:06:46Z")

</div>

Latest version expects pipiewire. Use qpwgraph to let you chose the audio output device.  
If your distrio doesn’t have qpwgraph it is pretty easy to build from source

---

<div class="post-metadata">

**Author:** ![vasilis](https://avatars.discourse-cdn.com/v4/letter/v/ccd318/32.png) [@vasilis](https://in-thread.sonic-pi.net/u/vasilis)\
**Post date:** [December 9, 2024, 9:58pm UTC](https://in-thread.sonic-pi.net/t/bluetooth-headphones-not-working-ubuntu-24-04-built-from-source/9351/7 "2024-12-09T21:58:27Z")

</div>

This did the trick!!! Seems that it was already there and super easy to do it!! thank you all for your time and help!  
now to write some music

---

<div class="post-metadata">

**Author:** ![voody77](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/voody77/32/2929_2.png) [@voody77](https://in-thread.sonic-pi.net/u/voody77)\
**Post date:** [January 13, 2025, 12:46pm UTC](https://in-thread.sonic-pi.net/t/bluetooth-headphones-not-working-ubuntu-24-04-built-from-source/9351/8 "2025-01-13T12:46:46Z")

</div>

install qpwgraph, then connect supercollider to same of exemplars your sound card  
For example - i have 4 exemplars of sound card

 ![2025-01-13_15-42](https://europe1.discourse-cdn.com/flex017/uploads/sonic_pi/original/2X/a/ac0d346873e63fcbdbb7a403de40cefc98fa91b9.png)  
Maybe you may need to install packages to alsa
