No audio through headphones

Hi,
new to raspberry (using pi 4) and to Sonic Pi but want to get it started for my son to learn how to program. The issue I have is that sound only comes out from the (bad) display speakers through HDMI. I can’t get sound to work through the headphones. All other sound (youtube etc) is coming from the headphones but not Sonic Pi sounds. I couldn’t find any good way in “settings” to configure this, anyone has any idea?

I am using the latest version of Sonic Pi (v3.2.2)

Hope someone can help.

Regards
Peter

maybe this can help you

Hi Peter
Sorry you are having problems with this. I have 3.2.2 running on several RPi and it should be working. Do as @nlb suggests check that you have selected Analog Output from right clicking the Speaker Icon. If you still ahve problems then we need to investigate a bit further.
I assume that you are using the binary deb downloaded from sonic-pi.net, or maybe an earlier version from my r.newman.ch site. Perhaps you could let me know which version you have.
Secondly, have you upgraded the Raspberry Pi OS to the latest version? If you have not, you can do

sudo apt update
sudo apt full-upgrade

There IS a problem with using the RaspberryPi 3.1 version of Sonic Pi with analog output, so it is important to have the 3.2.2 version. Also the 3.1 version can leave jackd running, which prevents changes to the audio output path, so you can try
killall jackd
before running the 3.2.2 version
The 3.2.2 deb downloaded from sonic-pi.net is the latest version, and this overwrites the 3.1 version, replacing it, so that this problem should not arise. The first versions of 3.2.2 I did were designed to run alongside version 3.1 and they appear in the Menu as Sonic Pi 3.2.2 If this is the case I would advise uninstalling this using
sudo apt purge sonic-pi-3.2.2
and then downloading and installing the version from sonic-pi.net for which the file name is
sonic-pi_3.2.2_4_armhf.deb
This replaces version 3.1 and appears in the menu as Sonic Pi

Hi robin and nlb,
first off, thanks so much for your suggestions and quick reply. I don’t feel alone in this now.

I did install Sonic pi through the raspbian “recommended sw” and then I got the 3.1 version by default. I updated to the 3.2.2 version and that is where I checked and got the issue.
Now when I ran the “killall jackd” it started working! I would never had figured that out without your help.

Your help is much appreciated!

/Peter

OK. Every time you run 3.1 you will have to do killall jackd (or restart the computer) before running 3.1 It sounds like you have one of the early 3.2.2 versions.
I would uninstall 3.1
sudo apt remove sonic-pi
uninstall the version of 3.2.2 (assuming it shows as Sonic Pi 3.2.2 in the menu) using
sudo apt purge ./sonic-pi-3.2.2
download and install the newer version from sonic-pi.net and install that.

I’ve got the latest sonic pi 3.2.2_4 and the latest raspbian on aPi4 and there is no audio from sonic pi via HDMI or headhones/AUX.

The speaker-test -t wav -c 2 test plays audio ok out of AUX, which is what I am after too