New install on raspberry pi 4 audio not working

I just installed manjaro onto my raspberry pi and everything works great except there is no audio. When the system comes up I get a speaker pop but no audio at all. Any ideas?? Thanks so much, I am a noob to linux but like what I see so far.

Did you install image 20.12.1? If so you are the first one posted having no sound.

Check and see if pulseaudio.service is running. Might also delete ~/.config/pulse directory and reboot.

I also have no audio output on jack. Working with a Manjaro ARM Flasher clean install done yesterday.

$ uname -a
Linux pi002.adbuco.com 5.4.83-1-MANJARO-ARM #1 SMP PREEMPT Mon Dec 14 08:37:33 CST 2020 aarch64 GNU/Linux
$ cat /etc/lsb-release
DISTRIB_ID=Manjaro-ARM
DISTRIB_RELEASE=20.12
DISTRIB_CODENAME=
DISTRIB_DESCRIPTION=“Manjaro ARM Linux”
$ vcgencmd version
Dec 15 2020 18:28:46
Copyright © 2012 Broadcom
version 4b4aff21f72c5b9ba39d83c7b0f8fa910a6ef99b (clean) (release) (start)
$ vcgencmd bootloader_version
Sep 3 2020 13:11:43
version c305221a6d7e532693cc7ff57fddfc8649def167 (release)
timestamp 1599135103
update-time 0
capabilities 0x00000000
$ sudo pacman -Q | grep pulseaudio
pulseaudio 14.0-1
pulseaudio-alsa 1:1.2.2-2
pulseaudio-bluetooth 14.0-1
xfce4-pulseaudio-plugin 0.4.3-1
$ pulseaudio
E: [pulseaudio] pid.c: Daemon already running.
E: [pulseaudio] main.c: pa_pid_file_create() failed.

Deleted ~/.config/pulse and rebooted; no change.

Logged on boot by pulseaudio:

ALSA woke us up to write new data to the device, but there was actually nothing to write.
Most likely this is a bug in the ALSA driver ‘snd_bcm2835’. Please report this issue to the ALSA developers.
We were woken up with POLLOUT set – however a subsequent snd_pcm_avail() returned 0 or another value < min_avail.

Try disabling the output to the hdmi in /boot/config.txt like this and reboot:

#hdmi_drive=2

#hdmi_drive=2 modification done, reboot, no difference. Testing using Audacious and wav/m4a files. Also Firefox/YouTube music selection.

I have no issue with the defaults in the image switching to the headphone jack. Are you switching to the Headphone jack using volume icon on the taskbar or Pulse Audio Control. If not remove the # in config.txt and reboot. Then switch to the Headphone jack.

Thanks for taking an interest, Darksky, but still no joytime.

With hdmi_drive=2 disabled, Port: Analog Output is the only available selection for either drop-down, even with Show: All Output Devices

Enabled hdmi_drive=2 in /boot/config.txt, rebooted, no difference.

Full /boot/config.txt:

gpu_mem=64
initramfs initramfs-linux.img followkernel
kernel=kernel8.img
arm_64bit=1
enable_gic=1
disable_overscan=1

#enable sound
dtparam=audio=on
hdmi_drive=2

#enable vc4
dtoverlay=vc4-fkms-v3d
max_framebuffers=2

/boot/cmdline.txt:

root=LABEL=ROOT_MNJRO rw rootwait console=ttyAMA0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 elevator=noop usbhid.mousepoll=8 snd-bcm2835.enable_compat_alsa=0 audit=0

/proc/cmdline:

coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 video=HDMI-A-1:1920x1080M@60 video=HDMI-A-2:1920x1080M@60 smsc95xx.macaddr=DC:A6:32:80:5B:D6 vc_mem.mem_base=0x3eb00000 vc_mem.mem_size=0x3ff00000 root=LABEL=ROOT_MNJRO rw rootwait console=ttyS0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyS0,115200 elevator=noop usbhid.mousepoll=8 snd-bcm2835.enable_compat_alsa=0 audit=0

Further digging:

$ lsmod | grep snd_bcm2835
snd_bcm2835 32768 3
snd_pcm 139264 4 vc4,snd_bcm2835,snd_soc_core,snd_pcm_dmaengine
snd 106496 11 snd_bcm2835,snd_timer,snd_compress,snd_soc_core,snd_pcm

$ amixer controls
numid=4,iface=MIXER,name=‘Master Playback Switch’
numid=3,iface=MIXER,name=‘Master Playback Volume’
numid=2,iface=MIXER,name=‘Capture Switch’
numid=1,iface=MIXER,name=‘Capture Volume’

$ amixer cget numid=4
numid=4,iface=MIXER,name=‘Master Playback Switch’
; type=BOOLEAN,access=rw------,values=1
: values=on
$ speaker-test -t sine -f 440 -c 2 -s 1

speaker-test 1.2.4

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Sine wave rate is 440.0000Hz
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 96 to 1048576
Period size range from 32 to 349526
Using max buffer size 1048576
Periods = 4
was set period_size = 262144
was set buffer_size = 1048576

  • Front Left
    $ # Nothing heard using earbuds, Apple and SMS makers.Volume at 100%.

$ speaker-test -t sine -f 440 -c 2 -s 2

speaker-test 1.2.4

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Sine wave rate is 440.0000Hz
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 96 to 1048576
Period size range from 32 to 349526
Using max buffer size 1048576
Periods = 4
was set period_size = 262144
was set buffer_size = 1048576

  • Front Right
    $ # Nothing heard

This gets sound out the audio jack port:

aplay -D sysdefault:CARD=Headphones /usr/share/sounds/alsa/Front_Center.wav

Well, it’s some success.

To re-direct the output to the 3.5 mm jack

sudo amixer cset numid=3 1

last digit
0 = auto
1 = 3.5 mm
2 = HDMI

You may have to turn the volume up.

The suggested command changes the volume:

    $ amixer controls
    numid=4,iface=MIXER,name='Master Playback Switch'
    numid=3,iface=MIXER,name='Master Playback Volume'
    numid=2,iface=MIXER,name='Capture Switch'
    numid=1,iface=MIXER,name='Capture Volume'
    $ amixer cset numid=3 1
    numid=3,iface=MIXER,name='Master Playback Volume'
      ; type=INTEGER,access=rw------,values=2,min=0,max=65536,step=1
      : values=1,1
    $ amixer cset numid=3 65536
    numid=3,iface=MIXER,name='Master Playback Volume'
      ; type=INTEGER,access=rw------,values=2,min=0,max=65536,step=1
      : values=65536,65536
    $ 

The alsamixer utility will let you change Card: PulseAudo Chip: PulseAudio settings to Card: bcm2835 Headphones Chip: Broadcom Mixer but the change reverts when you exit the utility. I have continued to search for a solution but have not yet found one. I was going to wait until I had a solution, but given the time it is taking I posted now to indicate amixer cset numid=3 1 isn’t a solution for me.

    System:
      Kernel: 5.4.83-1-MANJARO-ARM aarch64 bits: 64 compiler: gcc v: 10.2.0 
      parameters: coherent_pool=1M 8250.nr_uarts=0 
      snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 
      video=HDMI-A-1:1920x1080M@60 video=HDMI-A-2:1920x1080M@60 
      smsc95xx.macaddr=DC:A6:32:80:5B:D6 vc_mem.mem_base=0x3eb00000 
      vc_mem.mem_size=0x3ff00000 root=LABEL=ROOT_MNJRO rw rootwait 
      console=ttyS0,115200 console=tty1 selinux=0 plymouth.enable=0 
      smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyS0,115200 elevator=noop 
      usbhid.mousepoll=8 snd-bcm2835.enable_compat_alsa=0 audit=0 
      Desktop: Xfce 4.14.3 tk: Gtk 3.24.23 info: xfce4-panel wm: xfwm4 
      dm: LightDM 1.30.0 Distro: Manjaro ARM 
    Machine:
      Type: ARM Device System: Raspberry Pi 4 Model B Rev 1.2 details: BCM2835 
      rev: c03112 serial: <filter> 
    Battery:
      Device-1: hidpp_battery_2 model: Logitech Wireless Keyboard PID:4023 
      serial: <filter> charge: 55% (should be ignored) rechargeable: yes 
      status: Discharging 
    CPU:
      Info: Quad Core model: N/A variant: cortex-a72 bits: 64 type: MCP 
      arch: ARMv8 family: 8 model-id: N/A stepping: 3 microcode: N/A 
      features: Use -f option to see features bogomips: 432 
      Speed: 600 MHz min/max: 600/1500 MHz Core speeds (MHz): 1: 600 2: 600 3: 600 
      4: 600 
      Vulnerabilities: Type: itlb_multihit status: Not affected 
      Type: l1tf status: Not affected 
      Type: mds status: Not affected 
      Type: meltdown status: Not affected 
      Type: spec_store_bypass status: Vulnerable 
      Type: spectre_v1 mitigation: __user pointer sanitization 
      Type: spectre_v2 status: Vulnerable 
      Type: srbds status: Not affected 
      Type: tsx_async_abort status: Not affected 
    Graphics:
      Device-1: bcm2711-vc5 driver: vc4_drm v: N/A bus ID: N/A chip ID: brcm:gpu 
      Device-2: bcm2711-hdmi0 driver: N/A bus ID: N/A chip ID: brcm:soc 
      Device-3: bcm2711-hdmi1 driver: N/A bus ID: N/A chip ID: brcm:soc 
      Display: x11 server: X.org 1.20.10 driver: modesetting alternate: fbdev 
      resolution: <xdpyinfo missing> 
      Message: Unable to show advanced data. Required tool glxinfo missing. 
    Audio:
      Device-1: bcm2835-audio driver: bcm2835_audio bus ID: N/A 
      chip ID: brcm:bcm2835_audio 
      Device-2: bcm2711-hdmi0 driver: N/A bus ID: N/A chip ID: brcm:soc 
      Device-3: bcm2711-hdmi1 driver: N/A bus ID: N/A chip ID: brcm:soc 
      Sound Server: ALSA v: k5.4.83-1-MANJARO-ARM 
    Network:
      Message: No ARM data found for this feature. 
      IF-ID-1: eth0 state: down mac: <filter> 
      IF-ID-2: wlan0 state: up mac: <filter> 
    Drives:
      Local Storage: total: 232.89 GiB used: 14.48 GiB (6.2%) 
      SMART Message: Required tool smartctl not installed. Check --recommends 
      ID-1: /dev/sda type: USB vendor: Kingston model: SA2000M8250 
      size: 232.89 GiB block size: physical: 4096 B logical: 512 B 
      serial: <filter> rev: 0209 scheme: MBR 
    Partition:
      ID-1: / raw size: 232.65 GiB size: 228.93 GiB (98.40%) 
      used: 14.43 GiB (6.3%) fs: ext4 dev: /dev/sda2 
      ID-2: /boot raw size: 213.6 MiB size: 213.4 MiB (99.89%) 
      used: 44.4 MiB (20.8%) fs: vfat dev: /dev/sda1 
    Swap:
      Kernel: swappiness: 60 (default) cache pressure: 100 (default) 
      ID-1: swap-1 type: zram size: 5.58 GiB used: 2.5 MiB (0.0%) priority: 100 
      dev: /dev/zram0 
    Sensors:
      System Temperatures: cpu: 46.3 C mobo: N/A 
      Fan Speeds (RPM): N/A 
    Info:
      Processes: 193 Uptime: 1d 7h 30m Memory: 3.78 GiB used: 1.49 GiB (39.5%) 
      gpu: 64.0 MiB Init: systemd v: 247 Compilers: gcc: N/A Packages: pacman: 666 
      lib: 196 Shell: Bash v: 5.1.0 running in: xfce4-terminal inxi: 3.1.08

A few years back I had to use the amixer cset numid=3 1 solution and point to a custom script in the startup utility but you now should not have to do this. I have tested within the last week with default images of xfce, mate and budgie desktops and all I have to do is switch to the Headphones in the Sound Settings on the taskbar.

GUI solution for sound via the headphone jack by default.

Test to verify sound is not playing via the headphone jack by default:

$ aplay /usr/share/sounds/alsa/Front_Center.wav

Click on the microphone icon on the task bar to display popup panel.

Hover over Built-in Audio Stereo to display a side popup panel with three button selections, all of them labeled Built-in Audio Stereo.

Change the selection from the bottom one to the middle.

Run above test command to verify success.

Perhaps someone with more technical knowledge can give us a command line or configuration file setting solution.

Thread [Set proper audio device names on Raspberry pi 4] discusses how to get pulseaudio to display meaningful device descriptions, rather than use the hit-or-miss method I described above.