12.10 中暂停后恢复时没有声音

12.10 中暂停后恢复时没有声音

这个问题从 12.10 开始出现。之前它运行正常。现在,即使重新启动 alsa 也不起作用,我必须重新启动。

请询问详细信息。我正在运行 Ubuntu 12.10、Unity DE 和 gnome 3.6,没有第三方驱动程序。

谢谢

以下是sudo lshw输出:http://pastebin.com/vh3SGcZa


我尝试删除并重新添加音频内核模块 - 但是

不能sudo modprobe -r snd_hda_intel。它给了FATAL: Module snd_hda_intel is in use

以下是/etc/modprobe.d/alsa-base.conf内容:http://pastebin.com/yvArB2ex

我的笔记本电脑型号是 HP 6730s


/var/log/syslog发现了以下内容:

kernel: [   33.847111] pci_pm_runtime_suspend(): azx_runtime_suspend+0x0/0x40 [snd_hda_intel] returns -11

cat /sys/module/snd_hda_intel/parameters/power_save给予0 cat /sys/bus/pci/devices/0000\:00\:1b.0/power/control给予on

pacmd list-sinks

Welcome to PulseAudio! Use "help" for usage information.
>>> 1 sink(s) available.
  * index: 0
    name: <alsa_output.pci-0000_00_1b.0.analog-stereo>
    driver: <module-alsa-card.c>
    flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
    state: SUSPENDED
    suspend cause: IDLE 
    priority: 9959
    volume: 0: 100% 1: 100%
            0: 0,00 dB 1: 0,00 dB
            balance 0,00
    base volume: 100%
                 0,00 dB
    volume steps: 65537
    muted: no
    current latency: 0,00 ms
    max request: 0 KiB
    max rewind: 0 KiB
    monitor source: 0
    sample spec: s16le ch 2 48000 Hz
    channel map: front-left,front-right
                 Stereo
    used by: 0
    linked by: 0
    configured latency: 0,00 ms; range is 1,00 .. 341,33 ms
    card: 0 <alsa_card.pci-0000_00_1b.0>
    module: 4
    properties:
        alsa.resolution_bits = "16"
        device.api = "alsa"
        device.class = "sound"
        alsa.class = "generic"
        alsa.subclass = "generic-mix"
        alsa.name = "AD198x Analog"
        alsa.id = "AD198x Analog"
        alsa.subdevice = "0"
        alsa.subdevice_name = "subdevice #0"
        alsa.device = "0"
        alsa.card = "0"
        alsa.card_name = "HDA Intel"
        alsa.long_card_name = "HDA Intel at 0xd8900000 irq 49"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:00:1b.0"
        sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
        device.bus = "pci"
        device.vendor.id = "8086"
        device.vendor.name = "Intel Corporation"
        device.product.name = "82801I (ICH9 Family) HD Audio Controller"
        device.form_factor = "internal"
        device.string = "front:0"
        device.buffering.buffer_size = "65536"
        device.buffering.fragment_size = "32768"
        device.access_mode = "mmap+timer"
        device.profile.name = "analog-stereo"
        device.profile.description = "Stereo analogico"
        device.description = "Audio interno Stereo analogico"
        alsa.mixer_name = "Analog Devices AD1984A"
        alsa.components = "HDA:11d4194a,103c3614,00100400 HDA:11c11040,103c1378,00100200"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    ports:
        analog-output: Uscita analogica (priority 9900, available: unknown)
            properties:

    active port: <analog-output>

答案1

以下操作你尝试过吗?

sudo gedit /etc/pm/sleep.d/50alsa

将以下行添加到文件中。

case "$1" in
        hibernate|suspend)
                # Stopping is not required
                ;;
        thaw|resume)
                /sbin/alsa force-reload
                ;;
        *) exit $NA
                ;;
esac

Ctrl+S保存此文件,然后使用以下命令使该文件可执行。

sudo chmod +x /etc/pm/sleep.d/50alsa

答案2

日志中的错误似乎表明在暂停声卡时出现了问题。您是否检查过 Linux 是否设置为暂停声卡,或者是否禁用了省电功能?阅读了有关该主题的几页内容后,我认为以下信息可能会有所帮助。

检查 HDA-Intel 驱动程序中的省电功能:

cat /sys/module/snd_hda_intel/parameters/power_save

https://lesswatts.org/tips/misc.php

使用 PCI 接口检查省电选项:

cat /sys/bus/pci/devices/*/power/control  # '*' should match the sound card's PCI Address, as listed in 'lshw'

检查声卡当前状态,根据Pulse Audio:

pacmd list-sinks     # Look for 'suspend', 'suspend-cause' and 'alsa.card_name'

http://en.wikibooks.org/wiki/Configuring_Sound_on_Linux/Pulse_Audio/Testing

答案3

错误代码 -11 表示 -EAGAIN。根据目前的源代码

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=sound/pci/hda/hda_intel.c

3.7 和 trunk 之间有几处发生了变化。在 trunk 中,此方法中不存在特定返回值。问题很可能已在上游修复。您可以使用每日(或等待 rc)主线内核进行测试以确认这一点。如果一切正常,您可能只会使用该内核。如果不行,您可以将发现报告给提到的错误条目(https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1066488)以帮助开发人员修复它...

相关内容