我的笔记本外接了一个HDMI接口的显示器,音箱接在了显示器的输出上。ubuntu默认声音设备是笔记本,每次挂起或者黑屏之后ubuntu都会将声音设置到笔记本上。

545481517172929550ccc09299f388c4.png

设置界面竟然没有设置为默认,Windows系统会自动记住上次使用的设备。

根据Change default sound device里网友的回答,在终端执行:$ pacmd list-cards

pacmd list-cards

1 card(s) available.

index: 0

name:

driver:

owner module: 6

properties:

alsa.card = "0"

alsa.card_name = "HDA Intel"

alsa.long_card_name = "HDA Intel at 0xf2a00000 irq 34"

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.id = "293e"

device.product.name = "82801I (ICH9 Family) HD Audio Controller"

device.form_factor = "internal"

device.string = "0"

device.description = "内置音频"

module-udev-detect.discovered = "1"

device.icon_name = "audio-card-pci"

profiles:

input:analog-stereo: 模拟立体声 输入 (priority 60, available: unknown)

output:analog-stereo: 模拟立体声 输出 (priority 6000, available: unknown)

output:analog-stereo+input:analog-stereo: 模拟立体声双工 (priority 6060, available: unknown)

output:hdmi-stereo: Digital Stereo (HDMI) 输出 (priority 5400, available: unknown)

output:hdmi-stereo+input:analog-stereo: Digital Stereo (HDMI) 输出 + 模拟立体声 输入 (priority 5460, available: unknown)

off: 关 (priority 0, available: unknown)

active profile:

sinks:

alsa_output.pci-0000_00_1b.0.hdmi-stereo/#0: 内置音频 Digital Stereo (HDMI)

sources:

alsa_output.pci-0000_00_1b.0.hdmi-stereo.monitor/#0: Monitor of 内置音频 Digital Stereo (HDMI)

alsa_input.pci-0000_00_1b.0.analog-stereo/#1: 内置音频 模拟立体声

ports:

analog-input-internal-mic: 内部话筒 (priority 8900, latency offset 0 usec, available: unknown)

properties:

device.icon_name = "audio-input-microphone"

analog-input-mic: 话筒 (priority 8700, latency offset 0 usec, available: no)

properties:

device.icon_name = "audio-input-microphone"

analog-output-speaker: 扬声器 (priority 10000, latency offset 0 usec, available: unknown)

properties:

device.icon_name = "audio-speakers"

analog-output-headphones: 模拟耳机 (priority 9000, latency offset 0 usec, available: no)

properties:

device.icon_name = "audio-headphones"

hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: yes)

properties:

device.icon_name = "video-display"

device.product.name = "LG IPS FULLHD"

看到:

index: 0

active profile:

所以在/etc/pulse/default.pa里添加:

set-card-profile 0  output:hdmi-stereo+input:analog-stereo

set-default-sink 0

重启测试成功。

Logo

更多推荐