Problem: No sound outof the audio-jack on a 3B+

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hello all,

Problem: I cannot get sound outof of the audio-jack.  :-(

Using "speaker-test" the HDMI output does give sound.  Currently I even have  
set "raspi-config" to force sound over the audio-jack, but it seems to gets  
ignored.   Right-clicking the loudpeaker icon in the top-right of my display  
I can select "analogue" and "hdmi", but it goes over hdmi every time (also,  
the volume alwas drops to near-to-nothing when I select something, and the  
tickmark is gone whenever I reopen the box)

I've tried to google for solution, but didn't find anything (other than a  
"reinstall your OS" suggestion).

Board: 3B+
OS:  NOOBS v3.2.0 (not sure which Linux version)

Bonus question:
Using Python I printed a "\a" (which google said would generate a beep), but  
got nothing (other than displaying a "landline telephone" character).  Is  
there another way to generate (a simple) sound using Python (other than  
shelling to to an external program I mean) ?

Regards,
Rudy Wieser



Re: Problem: No sound outof the audio-jack on a 3B+
Quoted text here. Click to load it

Make sure that the GPIO pin used for audio (sorry, can't remember
which one it is) isn't getting its mode changed by one of your
programs using the GPIO.

Quoted text here. Click to load it

Seems like the driver is detecting a problem then. Check for any
errors in the output of dmesg.

Quoted text here. Click to load it

If you installed a new OS to another SD card and that played audio
over the analogue output, then that would at least confirm that it's
a software problem rather than a hardware one. As you've been playing
with the GPIO, it's more likely than usual that some damage might
have been done by accident.

Quoted text here. Click to load it

The file /proc/version should say the Linux version.

Some distros also add a file named something like /proc/distroversion
that says which distro you're using, and its version.

--  
__          __
#_ < |\| |< _#

Re: Problem: No sound outof the audio-jack on a 3B+
Kev,

Quoted text here. Click to load it

Any idea how I can check that ?    'Cause currently I can only guess to if,  
and if so, why that happens.

Also, I've re-run "speaker-test" directly after booting (with none of my  
(manually started, python) programs having run yet), and its still hdmi  
only.

The only thing I can currently think of is that I've enabled a few things,  
like SPI and I2C, as well as bluetooth.

Quoted text here. Click to load it

Its confirmed.

I remembered that I had another sd card with the same, but never actually  
used OS on it (checked using "uname -a"), and it has no problem, using  
"speaker-test" outputting (stereo!) sound over the audio jack.

So, its a software and/or configuration problem.  Any idea to how to figure  
out what causes it (other than to go thru time-consuming rounds of multiple  
re-installs and configurations of everything)  ?   A diagnostic program  
perhaps ?

Regards,
Rudy Wieser



Re: Problem: No sound outof the audio-jack on a 3B+
declaimed the following:

Quoted text here. Click to load it

    Well -- you could boot with the working card, then capture the output
of dmesg to a file, copy the file to some other computer...

    Then boot with the problem card, repeat dmesg capture and copy.

    Compare the two captures. See if something pops out.

https://en.wikipedia.org/wiki/Dmesg


--  
    Wulfraed                 Dennis Lee Bieber         AF6VN
     snipped-for-privacy@ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/

Re: Problem: No sound outof the audio-jack on a 3B+
Dennis,

Quoted text here. Click to load it

Oh bother!   On the newly created sd card (bluetooth and upgraded) whenever  
I now try to open the filemanager it gets directly closed. :-((

I don't know what is happening, but its not even funny anymore.

Regards,
Rudy Wieser



Re: Problem: No sound outof the audio-jack on a 3B+
declaimed the following:

Quoted text here. Click to load it

    If you are running in a graphical environment (which I presume given
mention of the speaker icon), try running a web browser and selecting
something from YouTube. I will have to state that my R-Pi3B+ does not seem
to be able to run VNC server and playback YouTube at real time -- BUT I do
get sound off the analog jack.

    In truth, I get sound on the analog output regardless of the analog or
HDMI selection -- but the HDMI selection is completely illegible while
analog selection is just running slow and rumbly.

    Now -- if an HDMI monitor is connected... It may be that the HDMI
driver overrides the selection based upon the information from the
connected monitor. As mentioned, I'm remoting in using VNC viewer on
Windows and the VNC server running on R-Pi.

Quoted text here. Click to load it

pi@rpi3bplus-1:~$ uname -a
Linux rpi3bplus-1 4.19.75-v7+ #1270 SMP Tue Sep 24 18:45:11 BST 2019 armv7l
GNU/Linux

3.2 should be Buster -- but the current full NOOBS is 3.2.1 dated September
30 (NOOBS Lite is 3.2 dated July 10 -- which maps to the formal release of
Debian Buster)

Quoted text here. Click to load it

    The "alert" character only produces a sound if the terminal/console is
configured to interpret the character and generate a sound. So, for
example, if you used a SSH client to get to the R-Pi, then it would be upon
that SSH client (and the computer it is running on) to produce the alert
sound when the <BEL> character is received by it.

    If you are seeing a glyph in the console, then that console is mapping
<BEL> to a graphic character and not attempting to trigger a sound on
whatever machine the console is running.

    I don't even think the regular "terminal" on the R-Pi activates on
<BEL>. Using SSH, PuTTY on my Windows box produces a noise for the
character (along with just trying to delete on an empty line), but a VNC
session to the same R-Pi produces no sounds from a terminal console.

Quoted text here. Click to load it

    It is dependent upon the console in use

alert.py
-=-=-=-
print("\a\a\a\a")
-=-=-=-
pi@rpi3bplus-1:~$ python3 alert.py


produces a chime in PuTTY on Windows. Doing the same from an R-Pi console
window in via VNC produces silence. (And this is on a machine where I do
hear audio from YouTube, regardless of the analog/HDMI setting). Could not
get sound from an MP3 in the VLC media player.


--  
    Wulfraed                 Dennis Lee Bieber         AF6VN
     snipped-for-privacy@ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/

Re: Problem: No sound outof the audio-jack on a 3B+
Dennis,

Quoted text here. Click to load it

I (ofcourse?) tried both the GUI as well as console-based suggestions that I  
could find.  Alas, none of them made a difference.

But I remembered having another sd card with the same, but not actually used  
OS on it.  It had no problem, using "speaker-test", to output sound over the  
the audio jack.   In other words: the only difference is that I used a  
default configuration and no extra packages (same KVM config).

On the first I did enable SPI, I2C and Bluetooth, and installed some  
packages.   Might bluetooth be causing problems perhaps ?   While pairing  
(with a smartphone) I did see something come by related to bluetooth audio  
...

And although I've not been able to google anything in this regard, do you  
maybe know of a guide or maybe even a diagnostic program for problems like  
these ?

Quoted text here. Click to load it

Linux raspberrypi 4.19.57-v7+ #1244 SMP Thu Jul 4 18:45:25 BST 2019 armv7l  
GNU/Linux
(for both of the above mentioned sd cards)

Quoted text here. Click to load it

While googeling I read it could be (nowerdays by default) disabled, yes (no  
mentioning about how to change that though :-\ )

Quoted text here. Click to load it

:-)   I ment that as "something build into Python".   I read about a "beep"  
function, but that one needed another package to be installed.

I even tried an example that used writing to "/dev/audio", but it wouldn't  
work (but didn't throw an error either).  Only when I read that that device  
was removed in v3.x I realized I had just been creating and writing to a  
simple file. :-|

Regards,
Rudy Wieser



Re: Problem: No sound outof the audio-jack on a 3B+
On 20/12/2019 09:36, R.Wieser wrote:
Quoted text here. Click to load it

Do you have "hdmi_drive=2" set in /boot/config.txt?
Do you have alsa-utils installed? If so what does "amixer cget numid=3" say?
Have you tried raspi-config, advanced options?


--  

Chris Elvidge, England

Re: Problem: No sound outof the audio-jack on a 3B+
Chris,

Quoted text here. Click to load it

Thats for hdmi (which audio works), and I have problems with analog
sound.

And it has not been set for either of the sd cards (one with working sound,  
the other not)

Quoted text here. Click to load it

How would I know / how do I check ?

Quoted text here. Click to load it

numid=3,iface=MIXER,name='Master Playback Volume'
  ; type=INTEGER,access=rw------,values=1,min=0,max65%536,step=1
  : values39%977

What does that mean to you / why should it be of any importance to me ?

(and I suppose those alsa-utils are installed. :-) )

Quoted text here. Click to load it

Yes.  But what specific where you thinking of ?

Regards,
Rudy Wieser



Re: Problem: No sound outof the audio-jack on a 3B+
On 20/12/2019 11:40, R.Wieser wrote:
Quoted text here. Click to load it

Yes. It forces HDMI output. It stops jack (analog) output.

Quoted text here. Click to load it

amixer cget numid=3 gets mixer value
amixer cset numid=3 VALUE sets mixer value to VALUE
where VALUE=0 -> auto
VALUE=1 -> analog
VALUE=2 -> hdmi

What 39977 means, sorry, I have no idea.

Quoted text here. Click to load it

sudo raspi-config
7 : Advanced options
A4 : Audio
Sets audio to Auto, Analog or HDMI

Quoted text here. Click to load it



--  

Chris Elvidge, England

Re: Problem: No sound outof the audio-jack on a 3B+
Chris,

Quoted text here. Click to load it

???  What I read was that it had something to do with hdmi vs dvi.  "dvi ==  
audio jack ?

Also, what is the below "7 : Advanced options" than for ?

But I forgot to mention that on both sd cards that line was commented out  
(no forcing).

Quoted text here. Click to load it

Yep, that was also one of the things I tried.

Quoted text here. Click to load it

The current selected volume.  A bit above 50%

Quoted text here. Click to load it

Tried that too: "Currently I even have set "raspi-config" to force sound  
over the audio-jack, but it seems to gets ignored."

Regards,
Rudy Wieser



Re: Problem: No sound outof the audio-jack on a 3B+
declaimed the following:

Quoted text here. Click to load it

    Possible... after all, if you are paired as an audio device (equivalent
of BlueTooth Speakers) it might be trying to route audio to the phone,
where it is expected that some player application renders it.

    I have BT turned off, but still get some stuff in dmesg

pi@rpi3bplus-1:~$ dmesg |grep -i audio
[    5.024244] bcm2835_audio soc:audio: card created with 8 channels
pi@rpi3bplus-1:~$ dmesg |grep -i blue
[   20.888319] Bluetooth: Core ver 2.22
[   20.888381] Bluetooth: HCI device and connection manager initialized
[   20.888397] Bluetooth: HCI socket layer initialized
[   20.888405] Bluetooth: L2CAP socket layer initialized
[   20.888425] Bluetooth: SCO socket layer initialized
[   20.952233] Bluetooth: HCI UART driver ver 2.3
[   20.952242] Bluetooth: HCI UART protocol H4 registered
[   20.952301] Bluetooth: HCI UART protocol Three-wire (H5) registered
[   20.952435] Bluetooth: HCI UART protocol Broadcom registered
[   21.719400] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   21.719417] Bluetooth: BNEP filters: protocol multicast
[   21.719466] Bluetooth: BNEP socket layer initialized
[   21.867592] Bluetooth: RFCOMM TTY layer initialized
[   21.867628] Bluetooth: RFCOMM socket layer initialized
[   21.867667] Bluetooth: RFCOMM ver 1.11
pi@rpi3bplus-1:~$

pi@rpi3bplus-1:~$ sudo apt search alsa |grep installed

WARNING: apt does not have a stable CLI interface. Use with caution in
scripts.

alsa-base/stable,now 1.0.27+1 all [installed,automatic]
alsa-utils/stable,now 1.1.8-2 armhf [installed]
bluealsa/testing,now 0.13 armhf [installed,automatic]
gstreamer0.10-alsa/testing,now 0.10.36-2 armhf [installed,automatic]
gstreamer1.0-alsa/stable,now 1.14.4-2 armhf [installed]
libasound2/testing,now 1.1.8-1+rpt1 armhf [installed,automatic]
libasound2-data/testing,now 1.1.8-1+rpt1 all [installed,automatic]
libavdevice58/testing,now 7:4.1.4-1+rpt1~deb10u1 armhf
[installed,automatic]
libgcrypt20/stable,now 1.8.4-5 armhf [installed]
libmikmod3/stable,now 3.3.11.1-4 armhf [installed,automatic]
libopenal1/stable,now 1:1.19.1-1 armhf [installed,automatic]
librtaudio6/stable,now 5.0.0~ds-3 armhf [installed,automatic]
librtmidi4/stable,now 3.0.0~ds1-2+b1 armhf [installed,automatic]
libsdl1.2debian/testing,now 1.2.15+dfsg2-4+rpt2 armhf [installed,automatic]
libsdl2-2.0-0/testing,now 2.0.9+dfsg1-1+rpt1 armhf [installed,automatic]
lxplug-volume/testing,now 0.18 armhf [installed,automatic]
sound-theme-freedesktop/stable,now 0.8-2 all [installed,automatic]
pi@rpi3bplus-1:~$


    No idea if installing alsa-tools and/or alsa-tools-gui provide anything
useful.


--  
    Wulfraed                 Dennis Lee Bieber         AF6VN
     snipped-for-privacy@ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/

Re: Problem: No sound outof the audio-jack on a 3B+

Quoted text here. Click to load it







I have exactly the same problem, and also have found no solution. RPi3B+  
and UbuntuMATE, one OS on ssd, another on SDCard, and amplified PC  
speakers. I have a Miniamp PHAT, but yet to try it. Power to the OS via  
GPIO, which is in the way, as is life.


--  
Mark J
From RISCOS 5.27 on a BeagleBoard-xM and Raspberry Pi2B
We've slightly trimmed the long signature. Click to see the full one.
Re: Problem: No sound outof the audio-jack on a 3B+
On Thu, 19 Dec 2019 17:55:24 +0100

Quoted text here. Click to load it

    None too sure about from python but from a shell prompt:

echo ^G

    should work. You type the control-G (ASCII BEL) at the command line
by first typing control-V (which prevents the CLI interpreter from mangling
the next character) then control-G. This should work from any terminal or
console in just about any unix-like environment.

--  
Steve O'Hara-Smith                          |   Directable Mirror Arrays
C:\>WIN                                     | A better way to focus the sun
We've slightly trimmed the long signature. Click to see the full one.
Re: Problem: No sound outof the audio-jack on a 3B+
Update:

I bought another sd card and again installed NOOBS v3.2.0 on it.   Sound  
worked both over hdmi and analog, with
speaker-test -t sine -f 1000 -c 2 -s 1
and
speaker-test -t sine -f 1000 -c 2 -s 2
sounding over left and right analog channels.   As far as I could tell the  
loudspeaker rightclick menu retained its checkmark, and the volume slider  
stayed where it was when changing from analog to hdmi or vise-verse

Than I installed Bluetooth:
sudo apt-get update (otherwise the following throws a number of errors)
sudo apt-get install bluetooth bluez blueman

I noticed it updated a number of things, including some pulseaudio stuff.
I than re-did the above speaker test and got only mono sound.   The tickmark  
didn't want to stick anymore, and the volue slider dropped back to almost  
zero on every analog <-> hdmi change.  :-(

It looks that /something/ that got updated doesn't play all to well with  
noobs v3.2.0 ...

I than ran sudo apt-get upgrade (and rebooted) to see if it would help.  
Alas, it didn't.  :-(

Although I still have analog sound on this installation, its just mono with  
disappearing tickmarks and dropping-to-near-zero volume sliders.

And it ofcourse doesn't explain why I do not have sound on the other  
installation.

Regards,
Rudy Wieser



Re: Problem: No sound outof the audio-jack on a 3B+
Quoted text here. Click to load it

Pulseaudio is the devil and should be destroyed. Sudo apt purge pulseaudio.
Audio and bluetooth, but mostly bluetooth, never worked well on Raspbian,
especially since that Simon dude started working on it at the RPi
Foundation. He threw pulseaudio into the mix.

I always purge pulseaudio and disable bluetooth in config.txt. Problems
solved.



Re: Problem: No sound outof the audio-jack on a 3B+
Alexandre,

Quoted text here. Click to load it

I installed bluetooth just to send commands from a smartphone to the Pi  
(serial connection).   I (currently) do not really need audio (can't  
remember what the third pairing was).

Any idea how to install and/or partially remove bluetooth ?

Regards,
Rudy Wieser



Re: Problem: No sound outof the audio-jack on a 3B+
Quoted text here. Click to load it

Yes.



Re: Problem: No sound outof the audio-jack on a 3B+
Alexandre,

Quoted text here. Click to load it

Ok, out with it ! :-)

And as I'm being specific, install and/or partially remove in a /usefull/  
manner. :-p

Randomly purging (or installing) packets isn't really my thing.    I'm  
already wasting enough time trying to figure out when/why my sound goes mono  
after installing Bluetooth, and that isn't even the origional problem !  
(having no analog sound at all)

Regards,
Rudy Wieser  



Re: Problem: No sound outof the audio-jack on a 3B+
declaimed the following:

Quoted text here. Click to load it

    The same way you installed it... Using apt(-get)* /remove/ (or
uninstall, I forget which).

Quoted text here. Click to load it

    Start with just getting rid of pulseaudio:

sudo apt remove pulseaudio pulseaudio-*

(the second is to catch any optional plugins that may not be removed with
the core)


*    apparently the family of apt-get, apt-cache, etc. are being deprecated
in favor of an all-encompassing apt command (which does have some nicer
features -- like apt update will tell one if there are upgrades available)
[using a Beaglebone for illustration]

debian@beaglebone:~$ sudo apt update
[sudo] password for debian:
Ign:1 http://deb.debian.org/debian stretch InRelease
Get:2 http://deb.debian.org/debian stretch-updates InRelease [91.0 kB]
Get:3 http://repos.rcn-ee.com/debian stretch InRelease [3,064 B]
Get:4 http://deb.debian.org/debian-security stretch/updates InRelease [94.3
kB]
Hit:5 http://deb.debian.org/debian stretch Release
Get:6 http://repos.rcn-ee.com/debian stretch/main armhf Packages [1,116 kB]
Get:7 http://deb.debian.org/debian-security stretch/updates/main armhf
Packages [489 kB]
Fetched 1,793 kB in 22h 15min 35s (22 B/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
3 packages can be upgraded. Run 'apt list --upgradable' to see them.
debian@beaglebone:~$



--  
    Wulfraed                 Dennis Lee Bieber         AF6VN
     snipped-for-privacy@ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/

Site Timeline