如何修复 Ubuntu 18.04 上没有声音?

rbe*_*oor 3 audio soundcard ubuntu-18.04

1) 我几个月来一直在使用 Ubuntu 18.04 和 Windows 10 双启动。今天突然我的声音在 Ubunutu 上停止工作了。活动 -> 声音菜单仅显示“虚拟输出”。不过在 Windows 上一切都很好。

2) lsmod 的输出是:

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:~$
Run Code Online (Sandbox Code Playgroud)

3)我从软件更新程序安装了所有更新,但没有运气。

4)使用没有变化:sudo alsa force-reload

5)环顾四周,找到了这个帖子:https : //askubuntu.com/questions/1059619/sound-card-shown-as-dummy-output-in-ubuntu-18-04。用户说发现“活动配置文件已关闭”并链接到此论坛上的解决方案 ( https://forums.linuxmint.com/viewtopic.php?t=268499 )。我正在按照该链接粘贴四个命令的输出:

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:~$
Run Code Online (Sandbox Code Playgroud)

6)我尝试了建议的命令,但它说“没有这样的配置文件”。

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:~$
Run Code Online (Sandbox Code Playgroud)

请帮助 - 我该如何进行?

小智 8

Ubuntu 18.04 上的“Dummy Sound”也有类似的问题,也有 NVIDIA 卡。这为我解决了:

  1. /etc/modprobe.d/alsa-base.conf以 root 身份编辑并添加options snd-hda-intel dmic_detect=0
  2. /etc/modprobe.d/blacklist.conf以 root 身份编辑并blacklist snd_soc_skl在文件末尾添加。
  3. 进行这些更改后,重新启动系统。

更多细节(和学分):https : //www.linuxuprising.com/2018/06/fix-no-sound-dummy-output-issue-in.html


小智 6

我遇到了同样的问题,并尝试了@maartenor 给出的解决方案,但没有成功。

最终我通过将 linux 内核升级到最后一个HWE 堆栈来恢复声音,对我来说它是4.15.0-106-generic5.3.0-59-generic

执行此操作的命令:

$ sudo apt install linux-generic-hwe-18.04
Run Code Online (Sandbox Code Playgroud)


小智 6

编辑文件 /etc/modprobe.d/alsa-base.conf 并添加以下行:

选项 snd-hda-intel dmic_detect=0

选项 snd-hda-intel 型号=笔记本电脑-amic 启用=是

第一行用于启用扬声器,第二行用于启用内部麦克风。

祝你好运!

从 Reddit 得到这个答案。对我来说就像一个魅力!

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