no sound raspberry pi 4 xubuntu

Asked by Aert Keja on 2019-10-29

I installed xubuntu 19.10 on my raspberry pi 4
There is no sound available (in pavu controller there is nothing but the dummy output device)
In fact my (Raspberry pi 4) soundcard is not even loaded
My knowledge ends here, i am afraid….

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu alsa-driver Edit question
Assignee:
No assignee Edit question
Solved by:
Aert Keja
Solved:
2019-11-04
Last query:
2019-11-04
Last reply:
2019-11-02

What is the output of:

wget -O alsa-info.sh http://www.alsa-project.org/alsa-info.sh && chmod +x ./alsa-info.sh && ./alsa-info.sh

Thanks

Aert Keja (aert077) said : #2

Since I posted my problem I made some progress
In /boot/firmware/usercfg.txt I added a few lines to allow my HDMI monitor to display in 1920x1080, but also:
dtparam=audio=on (I accidentily found this while exploring Manjaro, where sound works on the pi 4)
Together with hdmi_drive=2 (this was already in config.txt) these two directives took care of including the soundcard in my system.
Now sound is installed, but still NOT audible. It is only "visible" in the controller and the soundcard (bcm2835) is displayed when isuing command lsmod.

So my problem remains: no (audible) sound in 19.10 on raspberry pi 4
This is the new output of the alsa-info.sh script:

upload=true&script=true&cardinfo=
!!################################
!!ALSA Information Script v 0.4.64
!!################################

!!Script ran on: Fri Nov 1 18:40:57 UTC 2019

!!Linux Distribution
!!------------------

Ubuntu 19.10 \n \l DISTRIB_ID=Ubuntu DISTRIB_DESCRIPTION="Ubuntu 19.10" NAME="Ubuntu" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 19.10" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" UBUNTU_CODENAME=eoan Ubuntu 19.10 (Eoan Ermine)

!!DMI Information
!!---------------

Manufacturer:
Product Name:
Product Version:
Firmware Version:
Board Vendor:
Board Name:

!!ACPI Device Status Information
!!---------------

!!Kernel Information
!!------------------

Kernel release: 5.3.0-1008-raspi2
Operating System: GNU/Linux
Architecture: armv7l
Processor: armv7l
SMP Enabled: Yes

!!ALSA Version
!!------------

Driver version: k5.3.0-1008-raspi2
Library version: 1.1.9
Utilities version: 1.1.9

!!Loaded ALSA modules
!!-------------------

snd_bcm2835

!!Sound Servers on this system
!!----------------------------

Pulseaudio:
      Installed - Yes (/usr/bin/pulseaudio)
      Running - Yes

!!Soundcards recognised by ALSA
!!-----------------------------

 0 [ALSA ]: bcm2835_alsa - bcm2835 ALSA
                      bcm2835 ALSA

!!PCI Soundcards installed in the system
!!--------------------------------------

!!Advanced information - PCI Vendor/Device/Subsystem ID's
!!-------------------------------------------------------

!!Modprobe options (Sound related)
!!--------------------------------

snd_pcsp: index=-2
snd_usb_audio: index=-2
snd_atiixp_modem: index=-2
snd_intel8x0m: index=-2
snd_via82xx_modem: index=-2
snd_atiixp_modem: index=-2
snd_intel8x0m: index=-2
snd_via82xx_modem: index=-2
snd_usb_audio: index=-2
snd_usb_caiaq: index=-2
snd_usb_ua101: index=-2
snd_usb_us122l: index=-2
snd_usb_usx2y: index=-2
snd_cmipci: mpu_port=0x330 fm_port=0x388
snd_pcsp: index=-2
snd_usb_audio: index=-2

!!Loaded sound module options
!!---------------------------

!!Module: snd_bcm2835
 enable_compat_alsa : Y
 enable_hdmi : N
 enable_headphones : N
 force_bulk : N

!!ALSA Device nodes
!!-----------------

crw-rw----+ 1 root audio 116, 4 Apr 11 2019 /dev/snd/controlC0
crw-rw----+ 1 root audio 116, 2 Apr 11 2019 /dev/snd/pcmC0D0p
crw-rw----+ 1 root audio 116, 3 Apr 11 2019 /dev/snd/pcmC0D1p
crw-rw----+ 1 root audio 116, 1 Apr 11 2019 /dev/snd/seq
crw-rw----+ 1 root audio 116, 33 Apr 11 2019 /dev/snd/timer

/dev/snd/by-path:
total 0
drwxr-xr-x 2 root root 60 Apr 11 2019 .
drwxr-xr-x 3 root root 160 Apr 11 2019 ..
lrwxrwxrwx 1 root root 12 Apr 11 2019 platform-soc:audio -> ../controlC0

!!Aplay/Arecord output
!!--------------------

APLAY

**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 7/7
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 IEC958/HDMI [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

ARECORD

**** List of CAPTURE Hardware Devices ****

!!Amixer output
!!-------------

!!-------Mixer controls for card 0 [ALSA]

Card hw:0 'ALSA'/'bcm2835 ALSA'
  Mixer name : 'Broadcom Mixer'
  Components : ''
  Controls : 5
  Simple ctrls : 1
Simple mixer control 'PCM',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback -10239 - 400
  Mono: Playback -117 [95%] [-1.17dB] [on]

!!Alsactl output
!!--------------

--startcollapse--
state.ALSA {
 control.1 {
  iface MIXER
  name 'PCM Playback Volume'
  value -117
  comment {
   access 'read write'
   type INTEGER
   count 1
   range '-10239 - 400'
   dbmin -9999999
   dbmax 400
   dbvalue.0 -117
  }
 }
 control.2 {
  iface MIXER
  name 'PCM Playback Switch'
  value true
  comment {
   access 'read write'
   type BOOLEAN
   count 1
  }
 }
 control.3 {
  iface MIXER
  name 'PCM Playback Route'
  value 0
  comment {
   access 'read write'
   type INTEGER
   count 1
   range '0 - 2'
  }
 }
 control.4 {
  iface PCM
  name 'IEC958 Playback Default'
  value '0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
  comment {
   access 'read write'
   type IEC958
   count 1
  }
 }
 control.5 {
  iface PCM
  name 'IEC958 Playback Con Mask'
  value '0200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
  comment {
   access read
   type IEC958
   count 1
  }
 }
}
--endcollapse--

!!All Loaded Modules
!!------------------

Module
bnep
dm_multipath
scsi_dh_rdac
scsi_dh_emc
scsi_dh_alua
nls_ascii
vc4
drm_kms_helper
snd_bcm2835
drm
snd_seq_dummy
snd_seq_oss
btsdio
snd_soc_core
bluetooth
snd_seq_midi
snd_seq_midi_event
snd_compress
snd_rawmidi
ac97_bus
ecdh_generic
snd_pcm_dmaengine
ecc
snd_pcm_oss
snd_mixer_oss
snd_seq
bcm2835_v4l2
brcmfmac
input_leds
joydev
snd_pcm
bcm2835_mmal_vchiq
brcmutil
vc_sm_cma
snd_seq_device
snd_timer
v4l2_common
cfg80211
fb_sys_fops
videobuf2_vmalloc
snd
videobuf2_memops
videobuf2_v4l2
syscopyarea
sysfillrect
videobuf2_common
sysimgblt
raspberrypi_hwmon
videodev
spidev
mc
argon_mem
uio_pdrv_genirq
uio
sch_fq_codel
parport_pc
ppdev
lp
parport
ip_tables
x_tables
autofs4
btrfs
zstd_compress
raid10
raid456
async_raid6_recov
async_memcpy
async_pq
async_xor
async_tx
xor
xor_neon
raid6_pq
libcrc32c
raid1
raid0
multipath
linear
broadcom
bcm_phy_lib
mdio_bcm_unimac
crc32_arm_ce
sdhci_iproc
gpio_regulator
genet
phy_generic
fixed
hid_generic
usbhid
aes_arm_bs
crypto_simd
cryptd

!!ALSA/HDA dmesg
!!--------------

[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 502528
[ 0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 cma=64M cma=256M video=HDMI-A-1:1920x1080@60 smsc95xx.macaddr=DC:A6:32:2B:4E:4C vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 net.ifnames=0 dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=LABEL=writable rootfstype=ext4 elevator=deadline rootwait
[ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
--
[ 5.023111] bcmgenet fd580000.genet: failed to get enet-eee clock
[ 5.039030] snd_pcm_dmaengine: Unknown symbol snd_pcm_format_physical_width (err -2)
[ 5.051804] snd_pcm_dmaengine: Unknown symbol snd_pcm_hw_constraint_integer (err -2)
[ 5.063782] snd_pcm_dmaengine: Unknown symbol snd_pcm_period_elapsed (err -2)
[ 5.097095] mmc0: SDHCI controller on fe340000.emmc2 [fe340000.emmc2] using ADMA
--
[ 11.211980] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[ 11.252306] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.
[ 11.254195] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Mar 1 2015 07:29:38 version 7.45.18 (r538002) FWID 01-6a2c8ad4
--
[ 11.408183] [drm] Initialized vc4 0.0.0 20140616 for soc:gpu on minor 0
[ 11.410785] vc4-drm soc:gpu: HDMI-A-1: EDID is invalid:
[ 11.410796] [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
--
[ 53.426374] WARNING: CPU: 0 PID: 1449 at drivers/gpu/drm/vc4/vc4_firmware_kms.c:928 vc4_crtc_atomic_flush+0x98/0x9c [vc4]
[ 53.426379] Modules linked in: dm_multipath scsi_dh_rdac scsi_dh_emc scsi_dh_alua nls_ascii vc4 drm_kms_helper snd_bcm2835(C) drm snd_seq_dummy snd_seq_oss btsdio snd_soc_core bluetooth snd_seq_midi snd_seq_midi_event snd_compress snd_rawmidi ac97_bus ecdh_generic snd_pcm_dmaengine ecc snd_pcm_oss snd_mixer_oss snd_seq bcm2835_v4l2(C) brcmfmac input_leds joydev snd_pcm bcm2835_mmal_vchiq(C) brcmutil vc_sm_cma(C) snd_seq_device snd_timer v4l2_common cfg80211 fb_sys_fops videobuf2_vmalloc snd videobuf2_memops videobuf2_v4l2 syscopyarea sysfillrect videobuf2_common sysimgblt raspberrypi_hwmon videodev spidev mc argon_mem uio_pdrv_genirq uio sch_fq_codel parport_pc ppdev lp parport ip_tables x_tables autofs4 btrfs zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor xor_neon raid6_pq libcrc32c raid1 raid0 multipath linear broadcom bcm_phy_lib mdio_bcm_unimac crc32_arm_ce sdhci_iproc gpio_regulator genet phy_generic fixed hid_generic usbhid aes_arm_bs
[ 53.426536] crypto_simd cryptd
--
[ 53.432297] WARNING: CPU: 0 PID: 663 at drivers/gpu/drm/drm_vblank.c:1044 drm_vblank_put+0xf0/0xf4 [drm]
[ 53.432300] Modules linked in: dm_multipath scsi_dh_rdac scsi_dh_emc scsi_dh_alua nls_ascii vc4 drm_kms_helper snd_bcm2835(C) drm snd_seq_dummy snd_seq_oss btsdio snd_soc_core bluetooth snd_seq_midi snd_seq_midi_event snd_compress snd_rawmidi ac97_bus ecdh_generic snd_pcm_dmaengine ecc snd_pcm_oss snd_mixer_oss snd_seq bcm2835_v4l2(C) brcmfmac input_leds joydev snd_pcm bcm2835_mmal_vchiq(C) brcmutil vc_sm_cma(C) snd_seq_device snd_timer v4l2_common cfg80211 fb_sys_fops videobuf2_vmalloc snd videobuf2_memops videobuf2_v4l2 syscopyarea sysfillrect videobuf2_common sysimgblt raspberrypi_hwmon videodev spidev mc argon_mem uio_pdrv_genirq uio sch_fq_codel parport_pc ppdev lp parport ip_tables x_tables autofs4 btrfs zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor xor_neon raid6_pq libcrc32c raid1 raid0 multipath linear broadcom bcm_phy_lib mdio_bcm_unimac crc32_arm_ce sdhci_iproc gpio_regulator genet phy_generic fixed hid_generic usbhid aes_arm_bs
[ 53.432393] crypto_simd cryptd
--
[ 117.957695] WARNING: CPU: 0 PID: 1449 at drivers/gpu/drm/vc4/vc4_firmware_kms.c:928 vc4_crtc_atomic_flush+0x98/0x9c [vc4]
[ 117.957700] Modules linked in: bnep dm_multipath scsi_dh_rdac scsi_dh_emc scsi_dh_alua nls_ascii vc4 drm_kms_helper snd_bcm2835(C) drm snd_seq_dummy snd_seq_oss btsdio snd_soc_core bluetooth snd_seq_midi snd_seq_midi_event snd_compress snd_rawmidi ac97_bus ecdh_generic snd_pcm_dmaengine ecc snd_pcm_oss snd_mixer_oss snd_seq bcm2835_v4l2(C) brcmfmac input_leds joydev snd_pcm bcm2835_mmal_vchiq(C) brcmutil vc_sm_cma(C) snd_seq_device snd_timer v4l2_common cfg80211 fb_sys_fops videobuf2_vmalloc snd videobuf2_memops videobuf2_v4l2 syscopyarea sysfillrect videobuf2_common sysimgblt raspberrypi_hwmon videodev spidev mc argon_mem uio_pdrv_genirq uio sch_fq_codel parport_pc ppdev lp parport ip_tables x_tables autofs4 btrfs zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor xor_neon raid6_pq libcrc32c raid1 raid0 multipath linear broadcom bcm_phy_lib mdio_bcm_unimac crc32_arm_ce sdhci_iproc gpio_regulator genet phy_generic fixed hid_generic usbhid aes_arm_bs
[ 117.957855] crypto_simd cryptd
--
[ 117.965639] WARNING: CPU: 0 PID: 0 at drivers/gpu/drm/drm_vblank.c:1044 drm_vblank_put+0xf0/0xf4 [drm]
[ 117.965642] Modules linked in: bnep dm_multipath scsi_dh_rdac scsi_dh_emc scsi_dh_alua nls_ascii vc4 drm_kms_helper snd_bcm2835(C) drm snd_seq_dummy snd_seq_oss btsdio snd_soc_core bluetooth snd_seq_midi snd_seq_midi_event snd_compress snd_rawmidi ac97_bus ecdh_generic snd_pcm_dmaengine ecc snd_pcm_oss snd_mixer_oss snd_seq bcm2835_v4l2(C) brcmfmac input_leds joydev snd_pcm bcm2835_mmal_vchiq(C) brcmutil vc_sm_cma(C) snd_seq_device snd_timer v4l2_common cfg80211 fb_sys_fops videobuf2_vmalloc snd videobuf2_memops videobuf2_v4l2 syscopyarea sysfillrect videobuf2_common sysimgblt raspberrypi_hwmon videodev spidev mc argon_mem uio_pdrv_genirq uio sch_fq_codel parport_pc ppdev lp parport ip_tables x_tables autofs4 btrfs zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor xor_neon raid6_pq libcrc32c raid1 raid0 multipath linear broadcom bcm_phy_lib mdio_bcm_unimac crc32_arm_ce sdhci_iproc gpio_regulator genet phy_generic fixed hid_generic usbhid aes_arm_bs
[ 117.965737] crypto_simd cryptd

No sound cards in the system. Is it enabled in BIOS (if it has one)?

Aert Keja (aert077) said : #4

As far as I know the Raspberry Pi has no BIOS
Instead (?) you have to fumble with config.txt (to be kept fixed in Ubuntu)
and usercfg.txt , where I try to get sound working, without complete succes until now

Please see the output of the alsa-info.sh script above, where I now have a soundcard recognized
Pavucontrol shows stereo output, mono and multichanel. Non of them produce sound, although I can " see " it.....

Aert

https://youtu.be/HMo9C7LCzE0

May help. Could post in the comments to see if the guy/gal can help

Aert Keja (aert077) said : #6

Actually I did almost exactly what this gentleman proposes
When going through the comments I noticed about three people asking help because they hwad no sound
Nobody recieved an answer
But nevertheless I will ask the same, since the man claims having run Doom
Certainly he needed sound there….

Regards,
Aert

Aert Keja (aert077) said : #7

After playing around with my xubuntu system (thanks ETA PRIME for an excellent video pointing me in the right direction !) I decided to tackle the problem that I had no sound coming from my HDMI-monitor speakers or the headphone jack attached to that monitor.
The monitor is a simple ACER KG221Q, that should be able to produce 2CH sound (simple stereo)
It turned out to be a problem that I could more or less solve myself afterall, no bugs in the system make sound impossible

After adding some directives to: /boot/firmware/usercfg.txt (after experimenting with a few non-working directives) I can now say
I have sound !!
The lines in the usercfg.txt that make sound audible (be it in mono, stereo stutters a bit) are as follows:
hdmi_drive=2 (already in config.txt )
dtparam=audio=on #these two lines are supposed to bring sound, but did not
hdmi_force_edid_audio=1 #this line did the miracle for me

I hope this is helpfull for people who also have the " no sound " problem

Regards,
Aert

jay (zeineath) said : #8

for those who are using vga through an adapter this is needed for sound to work through the headphone / 3.5mm jack port:

hdmi_ignore_edid_audio=1

other useful configs can be found at: https://www.raspberrypi.org/documentation/configuration/config-txt/video.md