rbewoor
rbewoor

Reputation: 315

How to fix No sound on Ubuntu 18.04?

1) I've been using Ubuntu 18.04 with Windows 10 dual boot for some months now. Today suddenly my sound stopped working on Ubunutu. Activities -> Sound menu shows only "Dummy Output". All fine on Windows though.

2) Output of lsmod is:

rohit@rohitUb18043LTS:~$ lsmod | grep snd_
snd_seq_midi           20480  0
snd_seq_midi_event     16384  1 snd_seq_midi
snd_seq                69632  2 snd_seq_midi,snd_seq_midi_event
snd_rawmidi            36864  1 snd_seq_midi
snd_seq_device         16384  3 snd_seq,snd_seq_midi,snd_rawmidi
snd_soc_dmic           16384  0
snd_hda_codec_realtek   118784  0
snd_hda_codec_generic    81920  1 snd_hda_codec_realtek
ledtrig_audio          16384  2 snd_hda_codec_generic,snd_hda_codec_realtek
snd_soc_hdac_hdmi      32768  0
snd_sof_intel_hda_common    73728  1 sof_pci_dev
snd_soc_hdac_hda       24576  1 snd_sof_intel_hda_common
snd_sof_intel_hda      20480  1 snd_sof_intel_hda_common
snd_sof_intel_byt      24576  1 sof_pci_dev
snd_sof_intel_ipc      20480  1 snd_sof_intel_byt
snd_sof                98304  4 snd_sof_intel_hda_common,snd_sof_intel_byt,snd_sof_intel_ipc,sof_pci_dev
snd_sof_xtensa_dsp     16384  1 sof_pci_dev
snd_hda_ext_core       28672  4 snd_sof_intel_hda_common,snd_soc_hdac_hdmi,snd_soc_hdac_hda,snd_sof_intel_hda
snd_soc_acpi_intel_match    32768  2 snd_sof_intel_hda_common,sof_pci_dev
snd_soc_acpi           16384  2 snd_soc_acpi_intel_match,sof_pci_dev
snd_soc_core          237568  5 snd_sof,snd_sof_intel_hda_common,snd_soc_hdac_hdmi,snd_soc_hdac_hda,snd_soc_dmic
snd_compress           24576  1 snd_soc_core
ac97_bus               16384  1 snd_soc_core
snd_pcm_dmaengine      16384  1 snd_soc_core
snd_hda_codec_hdmi     57344  1
snd_hda_intel          53248  2
snd_intel_nhlt         20480  1 snd_hda_intel
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  10 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_hdmi,snd_soc_hdac_hda,snd_sof_intel_hda
snd_hwdep              20480  1 snd_hda_codec
snd_pcm               102400  10 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_sof,snd_sof_intel_hda_common,snd_soc_hdac_hdmi,snd_soc_core,snd_hda_core,snd_pcm_dmaengine
snd_timer              36864  2 snd_seq,snd_pcm
snd                    86016  17 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,snd_soc_core,snd_pcm,snd_rawmidi
rohit@rohitUb18043LTS:~$

3) I installed all updates from Software updater but no luck.

4) No change by using: sudo alsa force-reload

5) Looking around, found this thread: https://askubuntu.com/questions/1059619/sound-card-shown-as-dummy-output-in-ubuntu-18-04 . User says found the "active profile was off" and links to a solution on this forum (https://forums.linuxmint.com/viewtopic.php?t=268499). I am pasting the output of the four commands as per that link:

rohit@rohitUb18043LTS:~$ sudo fuser -v /dev/snd/*
[sudo] password for rohit: 
                     USER        PID ACCESS COMMAND
/dev/snd/controlC0:  gdm        1505 F.... pulseaudio
                     rohit      1878 F.... pulseaudio
rohit@rohitUb18043LTS:~$ pacmd list-cards
1 card(s) available.
    index: 0
    name: <alsa_card.pci-0000_01_00.1>
    driver: <module-alsa-card.c>
    owner module: 7
    properties:
        alsa.card = "0"
        alsa.card_name = "HDA NVidia"
        alsa.long_card_name = "HDA NVidia at 0xb4000000 irq 17"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:01:00.1"
        sysfs.path = "/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card0"
        device.bus = "pci"
        device.vendor.id = "10de"
        device.vendor.name = "NVIDIA Corporation"
        device.product.id = "0fb9"
        device.product.name = "GP107GL High Definition Audio Controller"
        device.string = "0"
        device.description = "GP107GL High Definition Audio Controller"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    profiles:
        output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5400, available: no)
        output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (priority 300, available: no)
        output:hdmi-surround71: Digital Surround 7.1 (HDMI) Output (priority 300, available: no)
        off: Off (priority 0, available: unknown)
    active profile: <off>
    ports:
        hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: no)
            properties:
                device.icon_name = "video-display"
rohit@rohitUb18043LTS:~$ pacmd list-sinks
1 sink(s) available.
  * index: 0
    name: <auto_null>
    driver: <module-null-sink.c>
    flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
    state: SUSPENDED
    suspend cause: IDLE 
    priority: 1000
    volume: front-left: 65536 / 100% / 0,00 dB,   front-right: 65536 / 100% / 0,00 dB
            balance 0,00
    base volume: 65536 / 100% / 0,00 dB
    volume steps: 65537
    muted: no
    current latency: 0,00 ms
    max request: 344 KiB
    max rewind: 344 KiB
    monitor source: 0
    sample spec: s16le 2ch 44100Hz
    channel map: front-left,front-right
                 Stereo
    used by: 0
    linked by: 0
    configured latency: 0,00 ms; range is 0,50 .. 2000,00 ms
    module: 15
    properties:
        device.description = "Dummy Output"
        device.class = "abstract"
        device.icon_name = "audio-card"
rohit@rohitUb18043LTS:~$ pacmd list-sink-inputs
0 sink input(s) available.
rohit@rohitUb18043LTS:~$

6) I tried the suggested command but it says "No such profile".

rohit@rohitUb18043LTS:~$ pacmd set-card-profile alsa_card.pci-0000_01_00.1 output:analog-stereo+input:analog-stereo
No such profile: output:analog-stereo+input:analog-stereo
rohit@rohitUb18043LTS:~$

Please help - how do I proceed?

Upvotes: 5

Views: 17975

Answers (6)

suisuy
suisuy

Reputation: 1

i found answer above not work on my computer, and i solve this problem by accidient , this is script i use , most same as answer above, but at last, u need mute then unmute auidio. sleep a short moment after command is necessary here if you put script in sh file then excute it , use sh -c is for file redirection for root

REST=0.5
#make sure Audio always actived
sudo sh -c 'echo 1 >/sys/bus/pci/rescan'
sleep $REST
DEVICE_ID=$(lspci -D | grep Audio | awk '{print $1}')
sleep $REST
sudo sh -c 'echo 1 >/sys/bus/pci/devices/0000:00:1f.3/remove'
sleep $REST
sudo sh -c 'echo 1 >/sys/bus/pci/rescan'
sleep $REST
#mute then unmute to restart audio
amixer -D pulse sset Master mute
sleep $REST
amixer -D pulse sset Master unmute

Upvotes: 0

Eldhose M Peter
Eldhose M Peter

Reputation: 25

Try this..

  1. Open your terminal
  2. sudo apt update && sudo apt install alsamixer
  3. run alsamixer in your terminal.
  4. press arrow right til you go to sound option (if headphone go to HEADPHONES bar).
  5. press M to unmute.
  6. press up/down to adjust the volume.
  7. press Esc to exit alsamixer.

Upvotes: 1

Liyong Zhou
Liyong Zhou

Reputation: 231

Following steps worked very reliably. It does not fix the audio-losing-after-suspend issue permanently, but instantly as a command to run after back from suspend.

Use lspci to get the audio card location (0000:00:1f.3). On my machine,

$ lspci
00:1f.0 ISA bridge: Intel Corporation H110 ...
00:1f.2 Memory controller: Intel ...
00:1f.3 Audio device: Intel Corporation 100 Series/C230 Series Chipset ...
00:1f.4 SMBus: Intel Corporation 100 Series/C230 Series Chipset ...

Then, (make sure the directories below exist)

$ echo 1 | sudo tee /sys/bus/pci/devices/0000:00:1f.3/remove
$ echo 1 | sudo tee /sys/bus/pci/rescan

I believe the audio driver/hardware is stuck. So we remove the device driver, and rescan the PCI bus to get audio back.

Upvotes: 0

Shivam Agarwal
Shivam Agarwal

Reputation: 76

Edit the file /etc/modprobe.d/alsa-base.conf and add the following lines:

options snd-hda-intel dmic_detect=0

options snd-hda-intel model=laptop-amic enable=yes

The first line is to enable the speaker, the second for the internal microphone.

Good luck!

Got this answer from Reddit. Worked like a charm for me!

Link : https://www.reddit.com/r/linuxmint/comments/fltlrl/no_sound_on_acer_swift_3_with_kernel_53/

Upvotes: 6

benjbmc
benjbmc

Reputation: 71

I had the same problem, and tried the solution given by @maartenor without success.

Eventually I got the sound back by upgrading linux kernel to the last HWE stack, for me it was 4.15.0-106-generic to 5.3.0-59-generic.

The command to do this :

$ sudo apt install linux-generic-hwe-18.04

Upvotes: 7

maartenor
maartenor

Reputation: 101

Similar issue with "Dummy Sound" on Ubuntu 18.04 also with a NVIDIA card. This solved it for me:

  1. Edit /etc/modprobe.d/alsa-base.conf as root and add options snd-hda-intel dmic_detect=0
  2. Edit /etc/modprobe.d/blacklist.conf as root and add blacklist snd_soc_skl at the end of the file.
  3. After making these changes, reboot your system.

More details (and credits): https://www.linuxuprising.com/2018/06/fix-no-sound-dummy-output-issue-in.html

Upvotes: 8

Related Questions