home-assistant / operating-system

:beginner: Home Assistant Operating System
Apache License 2.0
4.78k stars 957 forks source link

Host audio not working after 13.0 -> 13.1 upgrade #3564

Open davidtinker opened 2 weeks ago

davidtinker commented 2 weeks ago

Describe the issue you are experiencing

Onboard audio on the host no longer works after 13.0 -> 13.1 upgrade. I verified by downgrading to 13.0. pactl list sinks doesn't show sink for it on 13.1. Audio to a bluetooth speaker still works.

What operating system image do you use?

generic-x86-64 (Generic UEFI capable x86-64 systems)

What version of Home Assistant Operating System is installed?

13.1

Did the problem occur after upgrading the Operating System?

Yes

Hardware details

It is a Beelink S12 Pro Mini PC, Intel N100.

Steps to reproduce the issue

[core-ssh ~]$ pactl list sinks (built in audio sink not shown)

Connecting a bluetooth speaker works.

Anything in the Supervisor logs that might be useful for us?

Nothing interesting

Anything in the Host logs that might be useful for us?

Nothing interesting

System information

No response

Additional information

HA OS 13.0

After connecting bluetooth speaker:

[core-ssh ~]$ pactl list sinks
Sink #0
    State: IDLE
    Name: alsa_output.pci-0000_00_1f.3.analog-stereo
    Description: Built-in Audio Analog Stereo
    Driver: module-alsa-card.c
    Sample Specification: s16le 2ch 44100Hz
    Channel Map: front-left,front-right
    Owner Module: 6
    Mute: no
    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
    Monitor Source: alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
    Latency: 1853313 usec, configured 2000000 usec
    Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
    Properties:
        alsa.resolution_bits = "16"
        device.api = "alsa"
        device.class = "sound"
        alsa.class = "generic"
        alsa.subclass = "generic-mix"
        alsa.name = "ALC897 Analog"
        alsa.id = "ALC897 Analog"
        alsa.subdevice = "0"
        alsa.subdevice_name = "subdevice #0"
        alsa.device = "0"
        alsa.card = "0"
        alsa.card_name = "HDA Intel PCH"
        alsa.long_card_name = "HDA Intel PCH at 0x6001110000 irq 131"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:00:1f.3"
        sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
        device.bus = "pci"
        device.vendor.id = "8086"
        device.product.id = "54c8"
        device.form_factor = "internal"
        device.string = "front:0"
        device.buffering.buffer_size = "352800"
        device.buffering.fragment_size = "176400"
        device.access_mode = "mmap+timer"
        device.profile.name = "analog-stereo"
        device.profile.description = "Analog Stereo"
        device.description = "Built-in Audio Analog Stereo"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    Ports:
        analog-output-lineout: Line Out (type: Line, priority: 9000, available)
        analog-output-headphones: Headphones (type: Headphones, priority: 9900, not available)
    Active Port: analog-output-lineout
    Formats:
        pcm

Sink #1
    State: IDLE
    Name: bluez_sink.04_57_91_27_05_68.a2dp_sink
    Description: MI BT 18I
    Driver: module-bluez5-device.c
    Sample Specification: s16le 2ch 44100Hz
    Channel Map: front-left,front-right
    Owner Module: 13
    Mute: no
    Volume: front-left: 39321 /  60% / -13.31 dB,   front-right: 39321 /  60% / -13.31 dB
            balance 0.00
    Base Volume: 65536 / 100% / 0.00 dB
    Monitor Source: bluez_sink.04_57_91_27_05_68.a2dp_sink.monitor
    Latency: 47907 usec, configured 39512 usec
    Flags: HARDWARE DECIBEL_VOLUME LATENCY
    Properties:
        bluetooth.protocol = "a2dp_sink"
        bluetooth.codec = "sbc"
        device.description = "MI BT 18I"
        device.string = "04:57:91:27:05:68"
        device.api = "bluez"
        device.class = "sound"
        device.bus = "bluetooth"
        device.form_factor = "speaker"
        bluez.path = "/org/bluez/hci0/dev_04_57_91_27_05_68"
        bluez.class = "0x260414"
        bluez.alias = "MI BT 18I"
        device.icon_name = "audio-speakers-bluetooth"
    Ports:
        speaker-output: Speaker (type: Speaker, priority: 0, available)
    Active Port: speaker-output
    Formats:
        pcm

lsmod output (sorted):

af_alg                 28672  6 algif_hash,algif_skcipher
algif_hash             12288  1
algif_skcipher         12288  1
bluetooth             794624 40 rfcomm,bnep,btusb,btmtk,btrtl,btbcm,btintel
bnep                   20480  2
btbcm                  24576  1 btusb
btintel                49152  1 btusb
btmtk                  12288  1 btusb
btrtl                  24576  1 btusb
btusb                  69632  0
cdc_acm                32768  2
cfg80211             1257472  3 iwlmvm,mac80211,iwlwifi
coretemp               16384  0
drm_buddy              20480  1 i915
drm_display_helper    188416  1 i915
ecb                    12288  1
ecc                    40960  1 ecdh_generic
ecdh_generic           16384  2 bluetooth
i915                 3756032 12
iwlmvm                569344  0
iwlwifi               520192  1 iwlmvm
ledtrig_audio          12288  1 snd_hda_codec_generic
libarc4                12288  1 mac80211
mac80211             1212416  1 iwlmvm
nf_tables             352256 1002 nft_chain_nat,nft_compat
nft_chain_nat          12288 33
nft_compat             20480 90
rfcomm                 65536  7
sch_fq_codel           20480  2
snd_compress           20480  1 snd_soc_core
snd_hda_codec         180224  6 snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_codec_generic,snd_sof_intel_hda,snd_soc_hdac_hda,snd_hda_intel
snd_hda_codec_generic    98304  1 snd_hda_codec_realtek
snd_hda_codec_hdmi     81920  1
snd_hda_codec_realtek   188416  1
snd_hda_core          126976  9 snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_codec_generic,snd_sof_intel_hda_common,snd_sof_intel_hda,snd_soc_hdac_hda,snd_hda_ext_core,snd_hda_intel,snd_hda_codec
snd_hda_ext_core       28672  4 snd_sof_intel_hda_common,snd_sof_intel_hda_mlink,snd_sof_intel_hda,snd_soc_hdac_hda
snd_hda_intel          49152  6
snd_hwdep              12288  1 snd_hda_codec
snd_intel_dspcfg       32768  3 snd_sof_intel_hda_common,snd_sof,snd_hda_intel
snd_pcm               172032 11 snd_hda_codec_hdmi,snd_sof_intel_hda_common,snd_sof,snd_sof_utils,snd_soc_core,snd_compress,snd_hda_intel,snd_hda_codec,snd_hda_core
snd_soc_acpi           12288  2 snd_sof_intel_hda_common,snd_soc_acpi_intel_match
snd_soc_acpi_intel_match    94208  2 snd_sof_pci_intel_tgl,snd_sof_intel_hda_common
snd_soc_core          348160  3 snd_sof_intel_hda_common,snd_sof,snd_soc_hdac_hda
snd_soc_hdac_hda       20480  1 snd_sof_intel_hda_common
snd_sof               294912  3 snd_sof_intel_hda_common,snd_sof_intel_hda,snd_sof_pci
snd_sof_intel_hda      16384  1 snd_sof_intel_hda_common
snd_sof_intel_hda_common   180224  1 snd_sof_pci_intel_tgl
snd_sof_intel_hda_mlink    28672  1 snd_sof_intel_hda_common
snd_sof_pci            16384  2 snd_sof_pci_intel_tgl,snd_sof_intel_hda_common
snd_sof_pci_intel_tgl    12288  0
snd_sof_utils          12288  1 snd_sof
snd_sof_xtensa_dsp     12288  1 snd_sof_intel_hda_common
ttm                    90112  1 i915
x86_pkg_temp_thermal    16384  0
xfrm_user              57344  1

HA OS 13.1

After connecting bluetooth speaker (build in audio sink missing):

[core-ssh ~]$ pactl list sinks
Sink #1
    State: IDLE
    Name: bluez_sink.04_57_91_27_05_68.a2dp_sink
    Description: MI BT 18I
    Driver: module-bluez5-device.c
    Sample Specification: s16le 2ch 44100Hz
    Channel Map: front-left,front-right
    Owner Module: 13
    Mute: no
    Volume: front-left: 39321 /  60% / -13.31 dB,   front-right: 39321 /  60% / -13.31 dB
            balance 0.00
    Base Volume: 65536 / 100% / 0.00 dB
    Monitor Source: bluez_sink.04_57_91_27_05_68.a2dp_sink.monitor
    Latency: 43833 usec, configured 39512 usec
    Flags: HARDWARE DECIBEL_VOLUME LATENCY
    Properties:
        bluetooth.protocol = "a2dp_sink"
        bluetooth.codec = "sbc"
        device.description = "MI BT 18I"
        device.string = "04:57:91:27:05:68"
        device.api = "bluez"
        device.class = "sound"
        device.bus = "bluetooth"
        device.form_factor = "speaker"
        bluez.path = "/org/bluez/hci0/dev_04_57_91_27_05_68"
        bluez.class = "0x260414"
        bluez.alias = "MI BT 18I"
        bluetooth.battery = "100%"
        device.icon_name = "audio-speakers-bluetooth"
    Ports:
        speaker-output: Speaker (type: Speaker, priority: 0, available)
    Active Port: speaker-output
    Formats:
        pcm

lsmod output sorted:

af_alg                 28672  6 algif_hash,algif_skcipher
algif_hash             12288  1
algif_skcipher         12288  1
bluetooth             794624 40 rfcomm,bnep,btusb,btmtk,btrtl,btbcm,btintel
bnep                   20480  2
btbcm                  24576  1 btusb
btintel                49152  1 btusb
btmtk                  12288  1 btusb
btrtl                  24576  1 btusb
btusb                  69632  0
cdc_acm                32768  2
cfg80211             1257472  3 iwlmvm,mac80211,iwlwifi
coretemp               16384  0
drm_buddy              20480  1 i915
drm_display_helper    188416  1 i915
ecb                    12288  1
ecc                    40960  1 ecdh_generic
ecdh_generic           16384  2 bluetooth
i915                 3756032 12
iwlmvm                569344  0
iwlwifi               520192  1 iwlmvm
ledtrig_audio          12288  1 snd_hda_codec_generic
libarc4                12288  1 mac80211
mac80211             1212416  1 iwlmvm
nf_tables             348160 1002 nft_chain_nat,nft_compat
nft_chain_nat          12288 33
nft_compat             20480 90
rfcomm                 65536  7
sch_fq_codel           20480  2
snd_compress           20480  1 snd_soc_core
snd_hda_codec         180224  6 snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_codec_generic,snd_sof_intel_hda,snd_soc_hdac_hda,snd_hda_intel
snd_hda_codec_generic    98304  1 snd_hda_codec_realtek
snd_hda_codec_hdmi     81920  1
snd_hda_codec_realtek   188416  1
snd_hda_core          126976  9 snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_codec_generic,snd_sof_intel_hda_common,snd_sof_intel_hda,snd_soc_hdac_hda,snd_hda_ext_core,snd_hda_intel,snd_hda_codec
snd_hda_ext_core       28672  4 snd_sof_intel_hda_common,snd_sof_intel_hda_mlink,snd_sof_intel_hda,snd_soc_hdac_hda
snd_hda_intel          49152  0
snd_hwdep              12288  1 snd_hda_codec
snd_intel_dspcfg       32768  3 snd_sof_intel_hda_common,snd_sof,snd_hda_intel
snd_pcm               172032  9 snd_hda_codec_hdmi,snd_sof_intel_hda_common,snd_sof,snd_sof_utils,snd_soc_core,snd_compress,snd_hda_intel,snd_hda_codec,snd_hda_core
snd_soc_acpi           12288  2 snd_sof_intel_hda_common,snd_soc_acpi_intel_match
snd_soc_acpi_intel_match    94208  2 snd_sof_pci_intel_tgl,snd_sof_intel_hda_common
snd_soc_core          348160  3 snd_sof_intel_hda_common,snd_sof,snd_soc_hdac_hda
snd_soc_hdac_hda       20480  1 snd_sof_intel_hda_common
snd_sof               294912  3 snd_sof_intel_hda_common,snd_sof_intel_hda,snd_sof_pci
snd_sof_intel_hda      16384  1 snd_sof_intel_hda_common
snd_sof_intel_hda_common   180224  1 snd_sof_pci_intel_tgl
snd_sof_intel_hda_mlink    28672  1 snd_sof_intel_hda_common
snd_sof_pci            16384  2 snd_sof_pci_intel_tgl,snd_sof_intel_hda_common
snd_sof_pci_intel_tgl    12288  0
snd_sof_utils          12288  1 snd_sof
snd_sof_xtensa_dsp     12288  1 snd_sof_intel_hda_common
ttm                    90112  1 i915
x86_pkg_temp_thermal    16384  0
xfrm_user              57344  1
sairon commented 2 weeks ago

I can not reproduce it on Beelink EQ12 which is quite similar in specs and should feature the same soundcard. Can you provide the full dmesg output, ideally from both OS versions?

davidtinker commented 2 weeks ago

This time it worked fine? Here are the dmesg outputs. Tx for looking into it. I should have done another reboot before filling a bug.

dmesg_13_0.txt dmesg_13_1.txt

magicus commented 1 week ago

I was just about to comment that I had the same problem. I thought I had rebooted (several times), but thought "what the heck, I'll do it once more just to be sure before commenting here", and sure enough, the sink re-appeared!

So something is a bit fishy with this upgrade, but rebooting is obviously a work-around. I'm just worried now that it is a bit random if it works after rebooting or not, so I'll try to avoid rebooting until there is an upgrade of hassOS.