您尚未登录。

#1 2016-06-20 21:05:21

rookie
会员
注册时间: 2016-06-11
帖子: 5

电脑睡眠之后耳机无声音

这个帖子里的情况很像,由于我没有分 swap,所以只能每次选择 "Suspend",但是每次睡眠之后耳机就会没声音。重启之后偶尔正常,但大多数情况是不正常的。

我用 pavucontrol 看了下,输出设备确实是 Headphones (plugged in)。

pacmd list-cards 运行结果在正常和非正常情况下是一样的。
两种情况下,pacmd list-sinks 的输出结果差异如下:
耳机无声音:

* index: 1
        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: front-left: 25486 /  39% / -24.61 dB,   front-right: 25486 /  39% / -24.61 dB
                balance 0.00
        base volume: 65536 / 100% / 0.00 dB
        volume steps: 65537
        muted: no
        current latency: 0.00 ms
        max request: 0 KiB
        max rewind: 0 KiB
        monitor source: 1
        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
        card: 1 <alsa_card.pci-0000_00_1b.0>
        module: 7
        properties:
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"

耳机有声音:

* index: 1
        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: RUNNING
        suspend cause:
        priority: 9959
                balance 0.00
        base volume: 65536 / 100% / 0.00 dB
        volume steps: 65537
        muted: no
        monitor source: 1
        sample spec: s16le 2ch 44100Hz
        channel map: front-left,front-right
                     Stereo
        used by: 1
        linked by: 1
        card: 1 <alsa_card.pci-0000_00_1b.0>
        module: 7
        properties:
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"

card 0 是 HDMI的,card 1才是平常工作用的


2016/06/21 16:21补充:
刚才pacmd list-sinks试了一下,虽然耳机没声音,但是state是RUNNING……

最近编辑记录 rookie (2016-06-21 16:23:30)

离线

#2 2016-06-21 07:44:09

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,956
个人网站

Re: 电脑睡眠之后耳机无声音

试着切换一下设备呢?

离线

#3 2016-06-21 11:43:13

rookie
会员
注册时间: 2016-06-11
帖子: 5

Re: 电脑睡眠之后耳机无声音

依云 说:

试着切换一下设备呢?

现在耳机能正常工作,我比较了一下命令的输出结果,重新编辑了帖子
切换设备指的是在 pavucontrol 里切换一下吗?Output Devices 里 Built-in Audio Analog Stereo 中的另一项是 Speakers (unavailable),切换到这个还是没有声音的
自从安装了pavucontrol 这一系列包之后,alsamixer 变成了只有如下一项
802e0e58a3e95606e7c5885aa19d8381faf87c.png
不过我在用户目录下是有个.asoundrc文件的,文件内容是

defaults.pcm.card 1
defaults.pcm.device 0
defaults.ctl.card 1

参考了这个https://blog.icehoney.me/posts/2014-06- … nd-setting

最近编辑记录 rookie (2016-06-21 11:44:01)

离线

#4 2016-06-21 13:35:24

血族使天
会员
注册时间: 2013-01-12
帖子: 132

Re: 电脑睡眠之后耳机无声音

在alsemixer里面用F6切换设备

离线

#5 2016-06-21 16:18:42

rookie
会员
注册时间: 2016-06-11
帖子: 5

Re: 电脑睡眠之后耳机无声音

血族使天 说:

在alsemixer里面用F6切换设备

F6 切换到 HDA Intel PCH 之后,看了下里面好像都没有问题,但是耳机还是没有声音
9b1339f12a349ba5a4ce41f4abbb37d6800c1c.png

最近编辑记录 rookie (2016-06-21 16:19:44)

离线

#6 2016-06-29 17:10:25

jouyouyun
会员
注册时间: 2011-10-10
帖子: 268

Re: 电脑睡眠之后耳机无声音

能否贴一下不同状态下 pacmd list-cards 的输出?

离线

#7 2016-06-29 19:25:27

rookie
会员
注册时间: 2016-06-11
帖子: 5

Re: 电脑睡眠之后耳机无声音

jouyouyun 说:

能否贴一下不同状态下 pacmd list-cards 的输出?

好的
两种状态下 pacmd list-cards 输出是一样的:

2 card(s) available.
    index: 0
        name: <alsa_card.pci-0000_00_03.0>
        driver: <module-alsa-card.c>
        owner module: 6
        properties:
                alsa.card = "0"
                alsa.card_name = "HDA Intel HDMI"
                alsa.long_card_name = "HDA Intel HDMI at 0xf7a14000 irq 34"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:03.0"
                sysfs.path = "/devices/pci0000:00/0000:00:03.0/sound/card0"
                device.bus = "pci"
                device.vendor.id = "8086"
                device.vendor.name = "Intel Corporation"
                device.product.id = "0c0c"
                device.product.name = "Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller"
                device.form_factor = "internal"
                device.string = "0"
                device.description = "Built-in Audio"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        profiles:
                output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5400, available: unknown)
                output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (priority 300, available: unknown)
                output:hdmi-surround71: Digital Surround 7.1 (HDMI) Output (priority 300, available: unknown)
                output:hdmi-stereo-extra1: Digital Stereo (HDMI 2) Output (priority 5200, available: unknown)
                output:hdmi-surround-extra1: Digital Surround 5.1 (HDMI 2) Output (priority 100, available: unknown)
                output:hdmi-surround71-extra1: Digital Surround 7.1 (HDMI 2) Output (priority 100, available: unknown)
                output:hdmi-stereo-extra2: Digital Stereo (HDMI 3) Output (priority 5200, available: unknown)
                output:hdmi-surround-extra2: Digital Surround 5.1 (HDMI 3) Output (priority 100, available: unknown)
                output:hdmi-surround71-extra2: Digital Surround 7.1 (HDMI 3) Output (priority 100, available: unknown)
                off: Off (priority 0, available: unknown)
        active profile: <output:hdmi-stereo>
        sinks:
                alsa_output.pci-0000_00_03.0.hdmi-stereo/#0: Built-in Audio Digital Stereo (HDMI)
        sources:
                alsa_output.pci-0000_00_03.0.hdmi-stereo.monitor/#0: Monitor of Built-in Audio Digital Stereo (HDMI)
        ports:
                hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "video-display"
                hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "video-display"
                hdmi-output-2: HDMI / DisplayPort 3 (priority 5700, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "video-display"
    index: 1
        name: <alsa_card.pci-0000_00_1b.0>
        driver: <module-alsa-card.c>
        owner module: 7
        properties:
                alsa.card = "1"
                alsa.card_name = "HDA Intel PCH"
                alsa.long_card_name = "HDA Intel PCH at 0xf7a10000 irq 33"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:1b.0"
                sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card1"
                device.bus = "pci"
                device.vendor.id = "8086"
                device.vendor.name = "Intel Corporation"
                device.product.id = "8c20"
                device.product.name = "8 Series/C220 Series Chipset High Definition Audio Controller"
                device.form_factor = "internal"
                device.string = "1"
                device.description = "Built-in Audio"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        profiles:
                input:analog-stereo: Analog Stereo Input (priority 60, available: unknown)
                output:analog-stereo: Analog Stereo Output (priority 6000, available: unknown)
                output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (priority 6060, available: unknown)
                output:iec958-stereo: Digital Stereo (IEC958) Output (priority 5500, available: unknown)
                output:iec958-stereo+input:analog-stereo: Digital Stereo (IEC958) Output + Analog Stereo Input (priority 5560, available: unknown)
                off: Off (priority 0, available: unknown)
        active profile: <output:analog-stereo>
        sinks:
                alsa_output.pci-0000_00_1b.0.analog-stereo/#1: Built-in Audio Analog Stereo
        sources:
                alsa_output.pci-0000_00_1b.0.analog-stereo.monitor/#1: Monitor of Built-in Audio Analog Stereo
        ports:
                analog-input-internal-mic: Internal Microphone (priority 8900, latency offset 0 usec, available: unknown)
                        properties:
                                device.icon_name = "audio-input-microphone"
                analog-input-mic: Microphone (priority 8700, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "audio-input-microphone"
                analog-output-speaker: Speakers (priority 10000, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "audio-speakers"
                analog-output-headphones: Headphones (priority 9000, latency offset 0 usec, available: yes)
                        properties:
                                device.icon_name = "audio-headphones"
                iec958-stereo-output: Digital Output (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)
                        properties:

离线

#8 2016-06-30 19:37:01

jouyouyun
会员
注册时间: 2011-10-10
帖子: 268

Re: 电脑睡眠之后耳机无声音

rookie 说:
jouyouyun 说:

能否贴一下不同状态下 pacmd list-cards 的输出?

好的
两种状态下 pacmd list-cards 输出是一样的:

2 card(s) available.
    index: 0
        name: <alsa_card.pci-0000_00_03.0>
        driver: <module-alsa-card.c>
        owner module: 6
        properties:
                alsa.card = "0"
                alsa.card_name = "HDA Intel HDMI"
                alsa.long_card_name = "HDA Intel HDMI at 0xf7a14000 irq 34"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:03.0"
                sysfs.path = "/devices/pci0000:00/0000:00:03.0/sound/card0"
                device.bus = "pci"
                device.vendor.id = "8086"
                device.vendor.name = "Intel Corporation"
                device.product.id = "0c0c"
                device.product.name = "Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller"
                device.form_factor = "internal"
                device.string = "0"
                device.description = "Built-in Audio"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        profiles:
                output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5400, available: unknown)
                output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (priority 300, available: unknown)
                output:hdmi-surround71: Digital Surround 7.1 (HDMI) Output (priority 300, available: unknown)
                output:hdmi-stereo-extra1: Digital Stereo (HDMI 2) Output (priority 5200, available: unknown)
                output:hdmi-surround-extra1: Digital Surround 5.1 (HDMI 2) Output (priority 100, available: unknown)
                output:hdmi-surround71-extra1: Digital Surround 7.1 (HDMI 2) Output (priority 100, available: unknown)
                output:hdmi-stereo-extra2: Digital Stereo (HDMI 3) Output (priority 5200, available: unknown)
                output:hdmi-surround-extra2: Digital Surround 5.1 (HDMI 3) Output (priority 100, available: unknown)
                output:hdmi-surround71-extra2: Digital Surround 7.1 (HDMI 3) Output (priority 100, available: unknown)
                off: Off (priority 0, available: unknown)
        active profile: <output:hdmi-stereo>
        sinks:
                alsa_output.pci-0000_00_03.0.hdmi-stereo/#0: Built-in Audio Digital Stereo (HDMI)
        sources:
                alsa_output.pci-0000_00_03.0.hdmi-stereo.monitor/#0: Monitor of Built-in Audio Digital Stereo (HDMI)
        ports:
                hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "video-display"
                hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "video-display"
                hdmi-output-2: HDMI / DisplayPort 3 (priority 5700, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "video-display"
    index: 1
        name: <alsa_card.pci-0000_00_1b.0>
        driver: <module-alsa-card.c>
        owner module: 7
        properties:
                alsa.card = "1"
                alsa.card_name = "HDA Intel PCH"
                alsa.long_card_name = "HDA Intel PCH at 0xf7a10000 irq 33"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:1b.0"
                sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card1"
                device.bus = "pci"
                device.vendor.id = "8086"
                device.vendor.name = "Intel Corporation"
                device.product.id = "8c20"
                device.product.name = "8 Series/C220 Series Chipset High Definition Audio Controller"
                device.form_factor = "internal"
                device.string = "1"
                device.description = "Built-in Audio"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        profiles:
                input:analog-stereo: Analog Stereo Input (priority 60, available: unknown)
                output:analog-stereo: Analog Stereo Output (priority 6000, available: unknown)
                output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (priority 6060, available: unknown)
                output:iec958-stereo: Digital Stereo (IEC958) Output (priority 5500, available: unknown)
                output:iec958-stereo+input:analog-stereo: Digital Stereo (IEC958) Output + Analog Stereo Input (priority 5560, available: unknown)
                off: Off (priority 0, available: unknown)
        active profile: <output:analog-stereo>
        sinks:
                alsa_output.pci-0000_00_1b.0.analog-stereo/#1: Built-in Audio Analog Stereo
        sources:
                alsa_output.pci-0000_00_1b.0.analog-stereo.monitor/#1: Monitor of Built-in Audio Analog Stereo
        ports:
                analog-input-internal-mic: Internal Microphone (priority 8900, latency offset 0 usec, available: unknown)
                        properties:
                                device.icon_name = "audio-input-microphone"
                analog-input-mic: Microphone (priority 8700, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "audio-input-microphone"
                analog-output-speaker: Speakers (priority 10000, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "audio-speakers"
                analog-output-headphones: Headphones (priority 9000, latency offset 0 usec, available: yes)
                        properties:
                                device.icon_name = "audio-headphones"
                iec958-stereo-output: Digital Output (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)
                        properties:

额......  pacmd  list-sinks 的输出一样吗?

离线

#9 2016-06-30 20:00:29

rookie
会员
注册时间: 2016-06-11
帖子: 5

Re: 电脑睡眠之后耳机无声音

jouyouyun 说:

额......  pacmd  list-sinks 的输出一样吗?

pacmd list-sinks 输出不一样,但是有时候耳机虽然没声音,state 却跟正常时一样,显示 RUNNING,主楼里贴上了有区别时的输出结果

离线

页脚