38

EDIT: This appears to have turned in a sort of canonical set of commands to start diagnosing audio issues.


I am using Ubuntu 20.04 for over a month now. After a reboot, I have no more sound and WiFi. Note that this is different from many other posts, which seem to have had no sound at all, after an upgrade. In this case, sound stopped working only after a reboot.

As for the sound, I seem to not have the appropriate kernel modules for sound, so I guess the most likely solution would come from making the modules available (it seems I have two sound cards). I will try to include below (1) as much info as possible related to the copious posts with similar problems.

I am listing below (2) the posts that I consider most useful at the current point of the fixing work-in-progress.

And I am listing below (3) other posts that I checked when the grass was higher.


(1) Info about my broken system, along with a comparison with what I see in a working system that I managed to put together.

  1. No /proc/asound directory.
    Versus
    $ cat /proc/asound/cards
     0 [PCH            ]: HDA-Intel - HDA Intel PCH
                          HDA Intel PCH at 0x604b108000 irq 159
     1 [NVidia         ]: HDA-Intel - HDA NVidia
                          HDA NVidia at 0xa4000000 irq 17
  1. $ lsmod | grep snd outputs nothing.
    Versus (also compare with this)
    $ lsmod | grep snd_hda_intel
    snd_hda_intel          53248  10
    snd_intel_dspcfg       24576  3 snd_hda_intel,snd_sof_pci,snd_sof_intel_hda_common
    snd_hda_codec         131072  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek,snd_soc_hdac_hda
    snd_hda_core           90112  9 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_hda_codec_realtek,snd_sof_intel_hda_common,snd_soc_hdac_hda,snd_sof_intel_hda
    snd_pcm               106496  9 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_sof,snd_sof_intel_hda_common,snd_soc_core,snd_hda_core,snd_pcm_dmaengine
    snd                    90112  33 snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_compress,thinkpad_acpi,snd_soc_core,snd_pcm,snd_rawmidi
  1. Kernel modules
    $ dpkg -L linux-modules-$(uname -r) | grep snd
    /lib/modules/5.4.0-40-generic/kernel/sound/core/seq/snd-seq-dummy.ko
    /lib/modules/5.4.0-40-generic/kernel/sound/core/seq/snd-seq-midi-emul.ko
    /lib/modules/5.4.0-40-generic/kernel/sound/core/seq/snd-seq-midi-event.ko
    /lib/modules/5.4.0-40-generic/kernel/sound/core/seq/snd-seq-midi.ko
    /lib/modules/5.4.0-40-generic/kernel/sound/core/seq/snd-seq-virmidi.ko
    /lib/modules/5.4.0-40-generic/kernel/sound/core/seq/snd-seq.ko
    /lib/modules/5.4.0-40-generic/kernel/sound/core/snd-compress.ko
    /lib/modules/5.4.0-40-generic/kernel/sound/core/snd-hrtimer.ko
    /lib/modules/5.4.0-40-generic/kernel/sound/core/snd-hwdep.ko
    /lib/modules/5.4.0-40-generic/kernel/sound/core/snd-pcm-dmaengine.ko
    /lib/modules/5.4.0-40-generic/kernel/sound/core/snd-pcm.ko
    /lib/modules/5.4.0-40-generic/kernel/sound/core/snd-rawmidi.ko
    /lib/modules/5.4.0-40-generic/kernel/sound/core/snd-seq-device.ko
    /lib/modules/5.4.0-40-generic/kernel/sound/core/snd-timer.ko
    /lib/modules/5.4.0-40-generic/kernel/sound/core/snd.ko
    /lib/modules/5.4.0-40-generic/kernel/sound/drivers/pcsp/snd-pcsp.ko
    /lib/modules/5.4.0-40-generic/kernel/sound/pci/snd-ens1370.ko

Versus exactly the same

How can I check if any of this is what I need?
How can I check if any of this corresponds to those from Intel listed in item #2 above?
How can I load these modules?

  1. inxi
    $ inxi -SA
    System:    Host: Hydrus1 Kernel: 5.4.0-40-generic x86_64 bits: 64 Desktop: Gnome 3.36.1 Distro: Ubuntu 20.04 LTS (Focal Fossa) 
    Audio:     Device-1: Intel 6 Series/C200 Series Family High Definition Audio driver: N/A 
               Device-2: NVIDIA GF104 High Definition Audio driver: N/A 

Versus (also compare with this)

    $ inxi -SA
    System:    Host: ViaLactea Kernel: 5.4.0-40-generic x86_64 bits: 64 Console: tty 0 Distro: Ubuntu 20.04 LTS (Focal Fossa)
    Audio:     Device-1: Intel Cannon Lake PCH cAVS driver: snd_hda_intel
               Device-2: NVIDIA GP107GL High Definition Audio driver: snd_hda_intel
               Sound Server: ALSA v: k5.4.0-40-generic
  1. lspci

    $ lspci -nnk | grep -A 1 Audio
    00:1b.0 Audio device [0403]: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller [8086:1c20] (rev 04)
        DeviceName:  Onboard Audio
        Subsystem: Dell 6 Series/C200 Series Chipset Family High Definition Audio Controller [1028:04a4]
    00:1c.0 PCI bridge [0604]: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 [8086:1c10] (rev b4)
    --
    01:00.1 Audio device [0403]: NVIDIA Corporation GF104 High Definition Audio Controller [10de:0beb] (rev a1)
        Subsystem: Dell GF104 High Definition Audio Controller [1028:04a4]
    03:00.0 Network controller [0280]: Intel Corporation Centrino Ultimate-N 6300 [8086:422b] (rev 35)
    

Versus

    $ lspci -nnk | grep -n -A 4 Audio
    49:00:1f.3 Audio device [0403]: Intel Corporation Cannon Lake PCH cAVS [8086:a348] (rev 10)
    50-     Subsystem: Lenovo Cannon Lake PCH cAVS [17aa:225f]
    51-     Kernel driver in use: snd_hda_intel
    52-     Kernel modules: snd_hda_intel, snd_sof_pci
    53-00:1f.4 SMBus [0c05]: Intel Corporation Cannon Lake PCH SMBus Controller [8086:a323] (rev 10)
    --
    67:01:00.1 Audio device [0403]: NVIDIA Corporation GP107GL High Definition Audio Controller [10de:0fb9] (rev a1)
    68-     Kernel driver in use: snd_hda_intel
    69-     Kernel modules: snd_hda_intel
    70-70:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS525A PCI Express Card Reader [10ec:525a] (rev 01)
    71-     Subsystem: Lenovo RTS525A PCI Express Card Reader [17aa:225f]
  1. System (Versus exactly the same kernel)

    $ uname -a
    Linux Hydrus1 5.4.0-40-generic #44-Ubuntu SMP Tue Jun 23 00:01:04 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
    
  2. Test sound

    $ aplay -l
    aplay: device_list:274: no soundcards found...
    

Versus

    $ aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: PCH [HDA Intel PCH], device 0: ALC285 Analog [ALC285 Analog]
      Subdevices: 0/1
      Subdevice #0: subdevice #0
    card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    ...
  1. lshw
        $ lshw -C multimedia
        WARNING: you should run this program as super-user.
          *-multimedia UNCLAIMED    
               description: Audio device
               product: GF104 High Definition Audio Controller
               vendor: NVIDIA Corporation
               physical id: 0.1
               bus info: pci@0000:01:00.1
               version: a1
               width: 32 bits
               clock: 33MHz
               capabilities: bus_master cap_list
               configuration: latency=0
               resources: memory:e0080000-e0083fff
          *-multimedia UNCLAIMED
               description: Audio device
               product: 6 Series/C200 Series Chipset Family High Definition Audio Controller
               vendor: Intel Corporation
               physical id: 1b
               bus info: pci@0000:00:1b.0
               version: 04
               width: 64 bits
               clock: 33MHz
               capabilities: bus_master cap_list
               configuration: latency=0
               resources: memory:e1e50000-e1e53fff
        WARNING: output may be incomplete or inaccurate, you should run this program as super-user.

Here it is quoted (note the driver)

    $ sudo lshw -C multimedia
      *-multimedia              
           description: Audio device
           product: GP104 High Definition Audio Controller
           vendor: NVIDIA Corporation
           physical id: 0.1
           bus info: pci@0000:01:00.1
           version: a1
           width: 32 bits
           clock: 33MHz
           capabilities: pm msi pciexpress bus_master cap_list
           configuration: driver=snd_hda_intel latency=0
           resources: irq:17 memory:f7080000-f7083fff
  1. alsa packages

    $ dpkg -l | grep alsa
    ii  alsa-base                                     1.0.25+dfsg-0ubuntu5                all          ALSA driver configuration files
    ii  alsa-tools-gui                                1.1.7-1ubuntu1                      amd64        GUI based ALSA utilities for specific hardware
    ii  alsa-topology-conf                            1.2.2-1                             all          ALSA topology configuration files
    ii  alsa-ucm-conf                                 1.2.2-1ubuntu0.1                    all          ALSA Use Case Manager configuration files
    ii  alsa-utils                                    1.2.2-1ubuntu1                      amd64        Utilities for configuring and using ALSA
    ii  gstreamer1.0-alsa:amd64                       1.16.2-4                            amd64        GStreamer plugin for ALSA
    ii  libsox-fmt-alsa:amd64                         14.4.2+git20190427-2                amd64        SoX alsa format I/O library
    
  2. No sound either if I plug earphones.

  3. I have no timidity-daemon to remove.

  4. Attempt reload

    $ sudo alsa force-reload
    [sudo] password for user1: 
    Unloading ALSA sound driver modules: (none loaded).
    Loading ALSA sound driver modules: (none to reload).
    
  5. modprobe

    $ grep intel /etc/modprobe.d/alsa-base.conf 
    options snd-intel8x0m index=-2
    

(2) Related and possibly useful posts

Unable to get sound working. Ubuntu Server 14.04.3

https://forums.linuxmint.com/viewtopic.php?t=221745

https://ubuntuforums.org/showthread.php?t=1684576

How to load "snd-hda-intel" at startup


(3) Other related posts

https://www.alsa-project.org/wiki/Matrix:Module-hda-intel

https://askubuntu.com/a/1244118/226614 . Recent post, accepted answer. Suggests using a ppa for fixing. I am not sure this can get things worse...

https://askubuntu.com/a/1249071/226614 . Recent post. Suggests using sudo setfacl -m u:user1:rw /dev/snd/* Tried this, didn't help.

https://askubuntu.com/a/847954/226614 . Old post, accepted answer. Suggests installing alsa-firmware-loaders and alsa-base. I am not sure this still applies...

How to install missing firmware for an Creative Labs Audigy2 soundcard? . Also old post. Also suggests UNCLAIMED device is due to firmware issues. Why would the problem appear after a reboot?

No sound on upgrade (18.04 -> 20.04) only have "dummy output"

Dummy output after standby since upgrading to Ubuntu 20.04

Internal speaker (Audio) is not working in Ubuntu 20.04 LTS after upgrading from Ubuntu 18.04 LTS

Ubuntu 20.04 - No sound

Soundcard not detected by pulseaudio (but by alsa)

How to install missing firmware for an Creative Labs Audigy2 soundcard?

https://itsfoss.com/fix-sound-ubuntu-1304-quick-tip/

5
  • The package linux-modules-kernel-version-generic should install snd drivers for you.And looks like Intel Centrino Ultimate-N is no longer supported and I don't know which driver should be used for that , but installing the above package might help.And SNDYBRDG (Sandy bridge) has nothing to do with sound, it's in fact the name of the microarchitecture used by intel in the second generation of Core processors. Jul 15, 2020 at 8:58
  • @ParsaMousavi - Please check edited OP. I have included the contents of the package you mention, a few questions and comments. You may know how to follow up. Jul 15, 2020 at 11:26
  • 1
    modprobe --show-depends snd_hda_intel . BTW the right forum for alsa/sound problems would be alsa forum (alsa-project.org/wiki/Main_Page). BTW: There exists a beautiful script that uploads all necessary info for debugging sound problems --> wiki.ubuntu.com/Audio/AlsaInfo ; you can also install it with sudo apt install alsa-utils . Did you check if your card is supported: alsa-project.org/wiki/Matrix:Main ?
    – abu_bua
    Jul 17, 2020 at 9:33
  • @abu_bua - Your comment helped me find the solution, which I posted. I suggest you post it as an answer. I will perform further tests, and if everything is ok I would award to your answer. Thanks! Jul 17, 2020 at 10:29
  • Files in the /proc map to processes running on your system, so you should only have /proc/aplay when alsa has play processes active (it is playing sound). Same with /dev and devices.
    – Nate T
    Jul 31, 2021 at 18:51

9 Answers 9

17
+100

Try to check if all dependencies are correct:

modprobe --show-depends snd_hda_intel 

And check if the kernel module exists:

find /lib/modules/$(uname -r)/kernel/sound -name snd-hda-intel.ko

BTW a better forum for alsa/sound problems would be the alsa forum (alsa-project.org/wiki/Main_Page).

BTW: There exists a beautiful script that uploads all necessary info for debugging sound problems --> wiki.ubuntu.com/Audio/AlsaInfo; you can also install it with sudo apt install alsa-utils. Run the script alsa-info, which will help you to print all necessary info for future problems with a minimum of effort.

As the kernel module itself is missing you have to install it e.g. via this package:

sudo apt install linux-modules-extra-$(uname -r)
2
  • It is not the kernel that is missing, but some of the files on which the kernel module driver depends. Which of those files are missing and what package holds them is shown in this answer. Jul 21, 2020 at 9:36
  • 2
    In ubuntu focal this has to be linux-modules-extra-$(uname -r) because uname -r prints a string that completes in -generic. To be used like this: sudo apt-get install linux-modules-extra-$(uname -r)
    – hub
    Jan 21, 2021 at 2:57
14

Had the same issue, I just did:

sudo killall timidity

Then the sound came back.

But after reboot, there is no sound again.

Then I figured out the proper way of disabling timidity:

sudo systemctl stop timidity.service
sudo systemctl disable timidity.service
4
  • As said in the OP, "I have no timidity-daemon to remove." Nov 10, 2020 at 9:10
  • 2
    Worked for me, so I wonder why I needed timidity in the first place...
    – Spooner
    Mar 15, 2021 at 14:28
  • OMG why did this work? Why have you betrayed me Timidity?!?!? You were the chosen one! You were supposed to complete my audio system! Not destroy it!!!!
    – Cerin
    Aug 4, 2022 at 5:18
  • This solved it for me. Would be good to understand how Timidity is causing this problem in more technical detail. Nov 24, 2022 at 13:06
12

EDIT: Avoid missing kernel linux-modules-extra-XX-generic when updating kernel may help avoiding the problem in the future, in some cases. (I actually ran into this same problem later again after a new automatic update, and then identified the missing package).


Summary: I managed to

  1. Learn which files my system was missing. This was my main hurdle, solved with the help of this comment, now posted as an answer. The rest was easy.
  2. Learn which package holds them.
  3. Install it.

After trying many things, I have solved the problem. It was essential to have, in addition to my broken system S1, a similar working system S2 available. I was very lucky to have this, and I guess it might have taken me tons of extra time otherwise.

Detailing the list of steps above:

  1. In S1:

     $ modprobe --show-depends snd_hda_intel
     modprobe: FATAL: Module snd_hda_intel not found in directory /lib/modules/5.4.0-40-generic
    

    In S2:

     $ modprobe --show-depends snd_hda_intel
     insmod /lib/modules/5.4.0-40-generic/kernel/sound/soundcore.ko
     install /sbin/modprobe --ignore-install snd $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-ioctl32 ; /sbin/modprobe --quiet --use-blacklist snd-seq ; }
     insmod /lib/modules/5.4.0-40-generic/kernel/sound/core/snd-timer.ko
     install /sbin/modprobe --ignore-install snd-pcm $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-pcm-oss ; : ; }
     insmod /lib/modules/5.4.0-40-generic/kernel/sound/core/snd-hwdep.ko
     insmod /lib/modules/5.4.0-40-generic/kernel/sound/hda/snd-hda-core.ko
     insmod /lib/modules/5.4.0-40-generic/kernel/sound/pci/hda/snd-hda-codec.ko
     insmod /lib/modules/5.4.0-40-generic/kernel/sound/hda/snd-intel-dspcfg.ko
     insmod /lib/modules/5.4.0-40-generic/kernel/sound/pci/hda/snd-hda-intel.ko
    

    I had the first three .ko files in my S1, but not the last four.

  2. So I checked the owner package in S2 for the last four files.

     $ dpkg -S /lib/modules/5.4.0-40-generic/kernel/sound/hda/snd-hda-core.ko
     linux-modules-extra-5.4.0-40-generic: /lib/modules/5.4.0-40-generic/kernel/sound/hda/snd-hda-core.ko
    

    which was the same for the other three files missing in S1. I checked and this package was not installed in S1.

  3. I apt-get'd the package, rebooted, and now everything seems to be back to normal.

My guess is that the package was present during the time sound worked, and for some strange reason it got uninstalled (or removed, or...) from the dkpg database, or...?

Notes:

  1. I had also kernel 5.4.0-39 in S1, and sound didn't work in this kernel either, prior to the fixing which worked. It turned out that linux-modules-extra-5.4.0-39-generic was not installed either.

  2. On (Compiled) Kernel Drivers vs. (Loadable) Kernel Drivers / Modules: see this.

3
  • If your problem is solved you should check, otherwise it still appears as unanswered questions! Hence please mark the answer of your choice with a cross (it's under the up-/downvote icon) !
    – abu_bua
    Jul 18, 2020 at 11:58
  • 1
    @abu_bua - I know. As mentioned in my comment, it is most likely solved. I will perform further checks (it may take a couple of days... working on other stuff as well) and accept. Rest assured, I value the system of acknowledging contributions in SE sites, it is useful for the community. Jul 18, 2020 at 12:34
  • I use git to troubleshoot in these circumstances. if you cd to root & run git init, you turn your fs into a git repo. i make commits regularly. It is sort of like taking snapshots, as you can always mount the filesystem to another linux fs and run git revert to restore to an earlier point / commit. Better still, you can use a diff program from the terminal and grep the result to see any changes to the system. You need to have a recent commit, though.
    – Nate T
    Jul 31, 2021 at 18:43
6

Please try this

$ sudo apt-get install --reinstall alsa-base pulseaudio
$ sudo alsa force-reload
3
  • Hi, I don't understand, after a fresh install of ubunut 20.04.3, always after reboot the sound "disapears" and need to run this two commands to see the internan, and hdmi outpus, but bluethoot headsets works. Thansk you so much for share. Nov 11, 2021 at 12:11
  • This worked for me on Ubunto 20.04 (only used 2nd "force-reload" command). Sound device was lost after killing "gdm3" (because of unclickable mouse behaviour). Upon getting back normal desktop only "dummy output" sound device was presend. "alsa force-reload" saved the day! Thank you! Dec 16, 2021 at 21:45
  • Just running sudo alsa force-reload worked for me. Thanks! Jun 8, 2023 at 12:21
2

I ran into this sound problem with Ubuntu 20.04 after a recent hardware upgrade.

Making the following change sorted it out, perhaps it will for you as well.

Append the line

options snd-hda-intel model=auto

at the end of file /etc/modprob.d/alsa-base.conf.

4
  • Does this help loading the module? Should I first check somehow if I have it available? Should I add an install command in the same file? Jul 15, 2020 at 11:28
  • @sancho.sReinstateMonicaCellio So if it's the case , here is my complete alsa-base.conf file.It should be automatically generated however. Jul 15, 2020 at 12:02
  • @ParsaMousavi - Same as I have. Jul 15, 2020 at 12:35
  • I had model=generic. So simply changed to model=auto and that fixed it
    – Pithikos
    Mar 9 at 21:57
2

give it try, it worked for me

sudo apt purge timidity-daemon

source: No sound on upgrade (18.04 -> 20.04) only have "dummy output"

2
  • As said in the OP, "I have no timidity-daemon to remove." Plus, the question you linked is also listed in the OP. Nov 10, 2020 at 9:07
  • There is an article which sheds some light behind running this command & maybe it can be of any help because I followed this article to purge the timidity-daemon aaroalhainen.medium.com/…
    – Junaid
    May 2, 2022 at 3:40
2

I tried Aiden Turner's solution, because it seemed like the least potentially harmful. When I did the force-reload I heard the speakers pop, my sound device showed up in the control panel, and I had working sound after raising the volume control above the default mute level.

Rebooting the system returned me to the dummy sound problem, so I disabled the timidity service per YuanW's post above. My sound card was immediately visible, and this time it survived a reboot.

So the combination of those two solutions worked for me. Reinstall pulseaudio and alsa-base, reinitialize, and then disable timidity. It's possible that only the second step is actually necessary, but I couldn't undo it and it's mostly harmless so I'm going with the whole process.

1

In my case I was able to get my sound back on Ubuntu 20.04 with:

pulseaudio -k

0

I had the same issue, there was only "Dummy output" in the list of sound devices.

I checked $ modprobe --show-depends snd_hda_intel

and received further output:

modprobe: FATAL: Module snd_hda_intel not found in directory /lib/modules/5.11.0-22-generic

I started to check if the files are present (according to the correct answer above). The files were present for the previous kernels - 5.4.x-xx and 5.8.x-xx.

I finally found that there are problems with the kernel 5.11 with sound devices.

Then I simply rebooted under the 5.8.

If anyone knows how to solve the problem for the 5.11 kernel, please let me know. The advices above didn't help.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .