Skip to content

SoundWire: Dell XPS9320 - IPC timeout - playback stops. #3783

Closed

Description

@plbossart

Forking new issue from comment #3777 (comment) reported by @madsl

f I play anything on my speakers, the sound output will stop after one minute of playback (the media player is also unable to continue playing, the whole stream stops). And I can't get it back without rebooting. It's only when it's speakers, the DisplayPort output ports works.

The sound still works if I make powertop not enable Runtime PM on" PCI Device Intel Corporation Alder Lake PCH eSPI Controller" (/sys/bus/pci/devices/0000:00:1f.0/power/control))It seems to be because of running powertop --auto-tune. If I don't do that during boot, it stays on.

Shouldn't that work..?

Activity

  1. plbossart commented on Jul 25, 2022

    @plbossart
    MemberAuthor

    @madsl I havent' worked with powertop since the early 2010s, and I can't find a way to run this

    root@plb-Latitude-9420:~# powertop --auto-tune
    modprobe cpufreq_stats failedLoaded 750 prior measurements
    RAPL device for cpu 0
    RAPL device for cpu 0
    Devfreq not enabled
    glob returned GLOB_ABORTED
    Leaving PowerTOP
    

    Can you tell us more about your configuration, add the powertop logs and if possible add dynamic debug by adding this file
    sof-dyndbg.conf.txt as /etc/modprobe.d/sof-dyndbg.conf (reboot needed).

    Thanks!

  2. plbossart commented on Jul 25, 2022

    @plbossart
    MemberAuthor

    @madsl there's also no link that I am aware of between PCI device 1f.0 (eSPI) and the 1f.3 (audio)

  3. madsl commented on Jul 25, 2022

    @madsl

    I'll attach the commands that powertop --auto-tune runs on my machine, you can export it to a bash script with the help of this: https://github.com/jlmcgraw/apply_powertop_recommended_settings

    I've commented out line 25 (as it is run on my 9320). If you uncomment that one and run the script, I think you'll be able to recreate the issue.

    #!/bin/bash
    set -eu               # Abort on errors and unset variables
    IFS=$(printf '\n\t')  # IFS is only newline and tab
    
    # Quit if we aren't root
    if [ ${UID} -ne 0 ]
    then
        echo -e "Root privileges are needed to modify power settings\n"
        exit 1
    fi
    
    # Autosuspend for USB device USB Bridge [MCHP]
    echo 'auto' > '/sys/bus/usb/devices/3-8/power/control'
    
    # Runtime PM for PCI Device Intel Corporation 12th Gen Core Processor Gaussian & Neural Accelerator
    echo 'auto' > '/sys/bus/pci/devices/0000:00:08.0/power/control'
    
    # Runtime PM for PCI Device Intel Corporation Alder Lake Innovation Platform Framework Processor Participant
    echo 'auto' > '/sys/bus/pci/devices/0000:00:04.0/power/control'
    
    # Runtime PM for PCI Device Intel Corporation Alder Lake PCH Shared SRAM
    echo 'auto' > '/sys/bus/pci/devices/0000:00:14.2/power/control'
    
    # Runtime PM for PCI Device Intel Corporation Alder Lake PCH eSPI Controller
    # echo 'auto' > '/sys/bus/pci/devices/0000:00:1f.0/power/control'
    
    # Runtime PM for PCI Device Intel Corporation Alder Lake-P PCH CNVi WiFi
    echo 'auto' > '/sys/bus/pci/devices/0000:00:14.3/power/control'
    
    # Runtime PM for PCI Device Intel Corporation Alder Lake-P PCH SPI Controller
    echo 'auto' > '/sys/bus/pci/devices/0000:00:1f.5/power/control'
    
    # Runtime PM for PCI Device Intel Corporation Device 4621
    echo 'auto' > '/sys/bus/pci/devices/0000:00:00.0/power/control'
    
    # Runtime PM for PCI Device Intel Corporation Device 465d
    echo 'auto' > '/sys/bus/pci/devices/0000:00:05.0/power/control'
    
    # Runtime PM for PCI Device Intel Corporation Device 51fc
    echo 'auto' > '/sys/bus/pci/devices/0000:00:12.0/power/control'
    
    # Runtime PM for PCI Device SK hynix Device 1959
    echo 'auto' > '/sys/bus/pci/devices/0000:01:00.0/power/control'
    
    # VM writeback timeout
    echo '1500' > '/proc/sys/vm/dirty_writeback_centisecs'
    
    # Wake status for USB device 3-10
    echo 'enabled' > '/sys/bus/usb/devices/3-10/power/wakeup'
    
    # Wake status for USB device 3-8
    echo 'enabled' > '/sys/bus/usb/devices/3-8/power/wakeup'
    
    # Wake status for USB device 3-9
    echo 'enabled' > '/sys/bus/usb/devices/3-9/power/wakeup'
    
    # Wake status for USB device usb1
    echo 'enabled' > '/sys/bus/usb/devices/usb1/power/wakeup'
    
    # Wake status for USB device usb3
    echo 'enabled' > '/sys/bus/usb/devices/usb3/power/wakeup'
    
    # Wake status for USB device usb4
    echo 'enabled' > '/sys/bus/usb/devices/usb4/power/wakeup'
    
    # Wake-on-lan status for device wlan0
    echo 'enabled' > '/sys/class/net/wlan0/device/power/wakeup'
    
    
    
  4. plbossart commented on Jul 25, 2022

    @plbossart
    MemberAuthor

    How do you generate sound @madsl, i.e. do you see any problems with

    speaker-test -Dhw:0,2 -c2 -r48000
    

    That should play noise on your speakers on a SoundWire-based device.

    I have a TGL-based platform with those codecs and I see no issue.

  5. madsl commented on Jul 25, 2022

    @madsl

    You did remember to uncomment that line before testing?

    I've tested with audacious with pulseaudio set as output, and with chromium / firefox.

  6. madsl commented on Jul 25, 2022

    @madsl

    I can't replicate it with speaker-test, no....

    I'm using pipewire 0.3.56 with default options, and audacious with pulseaudio output as mentioned.

  7. madsl commented on Jul 25, 2022

    @madsl

    Maybe you're onto something, that it doesn't have anything to do with powertop. I might just have had bad luck in triggering it when I tested it out and created some false positives.

    How can we debug this further?

  8. plbossart commented on Jul 25, 2022

    @plbossart
    MemberAuthor
    auto
    root@plb-Latitude-9420:~# speaker-test -Dhw:0,2 -c2 -r48000 
    

    .... works forever.

    same with aplay.

    I really don't see how this could impact pipewire.

  9. plbossart commented on Jul 25, 2022

    @plbossart
    MemberAuthor

    @madsl I think it's best if you retry with dynamic debug enabled and see if there's anything in the dmesg log that would cause the stream to stop.

  10. madsl commented on Jul 25, 2022

    @madsl

    I sat PIPEWIRE_DEBUG=5 in the service, and retried:

    [...]
    juli 26 00:05:01 marhide pipewire[1303]: spa.loop: 0x5630a548a210: update 0000001d -> 00000019
    juli 26 00:05:01 marhide pipewire[1303]: mod.protocol-native: connection 0x5630a534aea0: 22 read 56 bytes and 0 fds
    juli 26 00:05:01 marhide pipewire[1303]: mod.protocol-native: 0x5630a532d560: got message 2 from 0
    juli 26 00:05:01 marhide pipewire[1303]: pw.core: 0x5630a5312940: sync 1073742219 for resource 0
    juli 26 00:05:01 marhide pipewire[1303]: mod.protocol-native: need flush
    juli 26 00:05:01 marhide pipewire[1303]: spa.loop: 0x5630a5348890: update 00000019 -> 0000001d
    juli 26 00:05:01 marhide pipewire[1303]: mod.protocol-native: connection 0x5630a534aea0: 22 written 56 bytes and 0 fds
    juli 26 00:05:01 marhide pipewire[1303]: spa.loop: 0x5630a5348890: update 0000001d -> 00000019
    juli 26 00:05:01 marhide pipewire[1303]: spa.alsa: hw:sofsoundwire,2: follower:0 match:0 rate:0,999934 bw:0,128000 thr:2048 del:2048 target:2048 err:0,000000 max:1024,000000
    juli 26 00:05:04 marhide pipewire[1303]: spa.alsa: hw:sofsoundwire,2: follower:0 match:0 rate:0,999952 bw:0,128000 thr:2048 del:2064 target:2048 err:16,000000 max:1024,000000
    juli 26 00:05:07 marhide pipewire[1303]: spa.alsa: hw:sofsoundwire,2: follower:0 match:0 rate:1,000041 bw:0,128000 thr:2048 del:2032 target:2048 err:-16,000000 max:1024,000000
    juli 26 00:05:10 marhide pipewire[1303]: spa.alsa: hw:sofsoundwire,2: follower:0 match:0 rate:0,999907 bw:0,128000 thr:2048 del:2048 target:2048 err:0,000000 max:1024,000000
    juli 26 00:05:13 marhide pipewire[1303]: spa.alsa: hw:sofsoundwire,2: follower:0 match:0 rate:0,999967 bw:0,128000 thr:2048 del:2064 target:2048 err:16,000000 max:1024,000000
    juli 26 00:05:16 marhide pipewire[1303]: spa.alsa: hw:sofsoundwire,2: follower:0 match:0 rate:1,000022 bw:0,128000 thr:2048 del:2032 target:2048 err:-16,000000 max:1024,000000
    juli 26 00:05:19 marhide pipewire[1303]: spa.alsa: hw:sofsoundwire,2: follower:0 match:0 rate:0,999939 bw:0,128000 thr:2048 del:2048 target:2048 err:0,000000 max:1024,000000
    juli 26 00:05:22 marhide pipewire[1303]: spa.alsa: hw:sofsoundwire,2: follower:0 match:0 rate:0,999956 bw:0,128000 thr:2048 del:2064 target:2048 err:16,000000 max:1024,000000
    juli 26 00:05:25 marhide pipewire[1303]: spa.alsa: hw:sofsoundwire,2: follower:0 match:0 rate:1,000018 bw:0,128000 thr:2048 del:2032 target:2048 err:-16,000000 max:1024,000000
    juli 26 00:05:28 marhide pipewire[1303]: spa.alsa: hw:sofsoundwire,2: follower:0 match:0 rate:0,999939 bw:0,128000 thr:2048 del:2048 target:2048 err:0,000000 max:1024,000000
    juli 26 00:05:31 marhide pipewire[1303]: spa.alsa: hw:sofsoundwire,2: follower:0 match:0 rate:0,999956 bw:0,128000 thr:2048 del:2064 target:2048 err:16,000000 max:1024,000000
    juli 26 00:05:34 marhide pipewire[1303]: spa.alsa: hw:sofsoundwire,2: follower:0 match:0 rate:1,000018 bw:0,128000 thr:2048 del:2032 target:2048 err:-16,000000 max:1024,000000
    juli 26 00:05:37 marhide pipewire[1303]: spa.alsa: hw:sofsoundwire,2: follower:0 match:0 rate:0,999911 bw:0,128000 thr:2048 del:2048 target:2048 err:0,000000 max:1024,000000
    juli 26 00:05:40 marhide pipewire[1303]: spa.alsa: hw:sofsoundwire,2: follower:0 match:0 rate:0,999956 bw:0,128000 thr:2048 del:2064 target:2048 err:16,000000 max:1024,000000
    juli 26 00:05:43 marhide pipewire[1303]: spa.alsa: hw:sofsoundwire,2: follower:0 match:0 rate:1,000018 bw:0,128000 thr:2048 del:2032 target:2048 err:-16,000000 max:1024,000000
    juli 26 00:05:46 marhide pipewire[1303]: spa.alsa: hw:sofsoundwire,2: follower:0 match:0 rate:0,999939 bw:0,128000 thr:2048 del:2048 target:2048 err:0,000000 max:1024,000000
    juli 26 00:05:48 marhide pipewire[1303]: spa.alsa: 0x5630a538fb58: early wakeup 4624 2048
    juli 26 00:05:48 marhide pipewire[1303]: spa.alsa: 0x5630a538fb58: early wakeup 4624 2048
    juli 26 00:05:48 marhide pipewire[1303]: spa.alsa: 0x5630a538fb58: early wakeup 4624 2048
    juli 26 00:05:48 marhide pipewire[1303]: spa.alsa: 0x5630a538fb58: early wakeup 4624 2048
    juli 26 00:05:48 marhide pipewire[1303]: spa.alsa: 0x5630a538fb58: early wakeup 4624 2048
    juli 26 00:05:48 marhide pipewire[1303]: spa.alsa: 0x5630a538fb58: early wakeup 4624 2048
    [... repeated endlessly...]
    

    Those early wakeup-lines just kept repeating, and it was when the first line came the sound stopped.

  11. madsl commented on Jul 25, 2022

    @madsl

    dmesg:

    [  476.736098] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx timed out for 0x60050000 (msg/reply size: 12/12)
    [  476.736111] sof-audio-pci-intel-tgl 0000:00:1f.3: ------------[ IPC dump start ]------------
    [  476.736143] sof-audio-pci-intel-tgl 0000:00:1f.3: hda irq intsts 0x00000000 intlctl 0xc0000081 rirb 00
    [  476.736148] sof-audio-pci-intel-tgl 0000:00:1f.3: dsp irq ppsts 0x00000000 adspis 0x00000000
    [  476.736175] sof-audio-pci-intel-tgl 0000:00:1f.3: error: host status 0x00000000 dsp status 0x00000000 mask 0x00000003
    [  476.736178] sof-audio-pci-intel-tgl 0000:00:1f.3: ------------[ IPC dump end ]------------
    [  476.736180] sof-audio-pci-intel-tgl 0000:00:1f.3: ------------[ DSP dump start ]------------
    [  476.736182] sof-audio-pci-intel-tgl 0000:00:1f.3: IPC timeout
    [  476.736184] sof-audio-pci-intel-tgl 0000:00:1f.3: fw_state: SOF_FW_BOOT_COMPLETE (6)
    [  476.736214] sof-audio-pci-intel-tgl 0000:00:1f.3: 0x00000005: module: ROM, state: FW_ENTERED, running
    [  476.736511] sof-audio-pci-intel-tgl 0000:00:1f.3: unexpected fault 0x00000000 trace 0x00004000
    [  476.736514] sof-audio-pci-intel-tgl 0000:00:1f.3: ------------[ DSP dump end ]------------
    [  476.736547] sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at soc_component_trigger on 0000:00:1f.3: -110
    [  476.736554]  Speaker: ASoC: trigger FE cmd: 0 failed: -110
    [  477.240116] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx timed out for 0x60030000 (msg/reply size: 12/12)
    [  477.240135] sof-audio-pci-intel-tgl 0000:00:1f.3: IPC timeout
    [  477.240202] sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at snd_soc_pcm_component_hw_free on 0000:00:1f.3: -110
    [  477.752151] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx timed out for 0x80010000 (msg/reply size: 216/12)
    [  477.752167] sof-audio-pci-intel-tgl 0000:00:1f.3: IPC timeout
    [  477.752173] sof-audio-pci-intel-tgl 0000:00:1f.3: Failed to set dai config for SDW1-Playback
    [  477.752178] sof-audio-pci-intel-tgl 0000:00:1f.3: hda_ctrl_dai_widget_free: DAI config failed for widget 'ALH258.OUT'
    [  478.256129] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx timed out for 0x80010000 (msg/reply size: 216/12)
    [  478.256152] sof-audio-pci-intel-tgl 0000:00:1f.3: IPC timeout
    [  478.256159] sof-audio-pci-intel-tgl 0000:00:1f.3: Failed to set dai config for SDW1-Playback
    [  478.256164] sof-audio-pci-intel-tgl 0000:00:1f.3: hda_ctrl_dai_widget_free: DAI config failed for widget 'ALH514.OUT'
    [  478.832096] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx timed out for 0x80010000 (msg/reply size: 216/12)
    [  478.832114] sof-audio-pci-intel-tgl 0000:00:1f.3: IPC timeout
    [  478.832120] sof-audio-pci-intel-tgl 0000:00:1f.3: Failed to set dai config for iDisp3
    [  478.832126] sof-audio-pci-intel-tgl 0000:00:1f.3: hda_ctrl_dai_widget_setup: DAI config failed for widget HDA2.OUT
    [  478.832133] sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at snd_soc_dai_hw_params on iDisp3 Pin: -110
    [  478.832215]  iDisp3: ASoC: __soc_pcm_hw_params() failed (-110)
    [  478.832223]  HDMI 3: ASoC: dpcm_fe_dai_hw_params failed (-110)
    [  479.336059] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx timed out for 0x60010000 (msg/reply size: 108/20)
    [  479.336076] sof-audio-pci-intel-tgl 0000:00:1f.3: IPC timeout
    [  479.336082] sof-audio-pci-intel-tgl 0000:00:1f.3: HW params ipc failed for stream 1
    [  479.336087] sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at snd_soc_pcm_component_hw_params on 0000:00:1f.3: -110
    [  479.336100]  HDMI 3: ASoC: __soc_pcm_hw_params() failed (-110)
    [  479.839949] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx timed out for 0x80010000 (msg/reply size: 216/12)
    [  479.839962] sof-audio-pci-intel-tgl 0000:00:1f.3: IPC timeout
    [  479.839968] sof-audio-pci-intel-tgl 0000:00:1f.3: Failed to set dai config for iDisp3
    [  479.839971] sof-audio-pci-intel-tgl 0000:00:1f.3: hda_ctrl_dai_widget_free: DAI config failed for widget 'HDA2.OUT'
    [  479.839987]  HDMI 3: ASoC: dpcm_fe_dai_hw_params failed (-110)
    [  480.344095] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx timed out for 0x80010000 (msg/reply size: 216/12)
    [  480.344114] sof-audio-pci-intel-tgl 0000:00:1f.3: IPC timeout
    [  480.344121] sof-audio-pci-intel-tgl 0000:00:1f.3: Failed to set dai config for iDisp3
    [  480.344127] sof-audio-pci-intel-tgl 0000:00:1f.3: hda_ctrl_dai_widget_free: DAI config failed for widget 'HDA2.OUT'
    [  480.848037] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx timed out for 0x80010000 (msg/reply size: 216/12)
    [  480.848052] sof-audio-pci-intel-tgl 0000:00:1f.3: IPC timeout
    [  480.848058] sof-audio-pci-intel-tgl 0000:00:1f.3: Failed to set dai config for iDisp3
    [  480.848063] sof-audio-pci-intel-tgl 0000:00:1f.3: hda_ctrl_dai_widget_setup: DAI config failed for widget HDA2.OUT
    [  480.848069] sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at snd_soc_dai_hw_params on iDisp3 Pin: -110
    [  480.848144]  iDisp3: ASoC: __soc_pcm_hw_params() failed (-110)
    [  480.848152]  HDMI 3: ASoC: dpcm_fe_dai_hw_params failed (-110)
    [  481.352028] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx timed out for 0x80010000 (msg/reply size: 216/12)
    [  481.352041] sof-audio-pci-intel-tgl 0000:00:1f.3: IPC timeout
    [  481.352047] sof-audio-pci-intel-tgl 0000:00:1f.3: Failed to set dai config for iDisp3
    [  481.352051] sof-audio-pci-intel-tgl 0000:00:1f.3: hda_ctrl_dai_widget_free: DAI config failed for widget 'HDA2.OUT'
    [  481.856029] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx timed out for 0x80010000 (msg/reply size: 216/12)
    [  481.856042] sof-audio-pci-intel-tgl 0000:00:1f.3: IPC timeout
    [  481.856047] sof-audio-pci-intel-tgl 0000:00:1f.3: Failed to set dai config for iDisp3
    [  481.856051] sof-audio-pci-intel-tgl 0000:00:1f.3: hda_ctrl_dai_widget_setup: DAI config failed for widget HDA2.OUT
    [  481.856056] sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at snd_soc_dai_hw_params on iDisp3 Pin: -110
    [  481.856119]  iDisp3: ASoC: __soc_pcm_hw_params() failed (-110)
    [  481.856124]  HDMI 3: ASoC: dpcm_fe_dai_hw_params failed (-110)
    [  482.360812] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx timed out for 0x80010000 (msg/reply size: 216/12)
    [  482.360822] sof-audio-pci-intel-tgl 0000:00:1f.3: IPC timeout
    [  482.360826] sof-audio-pci-intel-tgl 0000:00:1f.3: Failed to set dai config for iDisp3
    [  482.360829] sof-audio-pci-intel-tgl 0000:00:1f.3: hda_ctrl_dai_widget_free: DAI config failed for widget 'HDA2.OUT'
    [  482.864849] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx timed out for 0x80010000 (msg/reply size: 216/12)
    [  482.864863] sof-audio-pci-intel-tgl 0000:00:1f.3: IPC timeout
    [  482.864868] sof-audio-pci-intel-tgl 0000:00:1f.3: Failed to set dai config for iDisp3
    [  482.864872] sof-audio-pci-intel-tgl 0000:00:1f.3: hda_ctrl_dai_widget_setup: DAI config failed for widget HDA2.OUT
    [  482.864877] sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at snd_soc_dai_hw_params on iDisp3 Pin: -110
    [  482.864937]  iDisp3: ASoC: __soc_pcm_hw_params() failed (-110)
    [  482.864949]  HDMI 3: ASoC: dpcm_fe_dai_hw_params failed (-110)
    [  483.367897] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx timed out for 0x80010000 (msg/reply size: 216/12)
    [  483.367916] sof-audio-pci-intel-tgl 0000:00:1f.3: IPC timeout
    [  483.367923] sof-audio-pci-intel-tgl 0000:00:1f.3: Failed to set dai config for iDisp3
    [  483.367929] sof-audio-pci-intel-tgl 0000:00:1f.3: hda_ctrl_dai_widget_free: DAI config failed for widget 'HDA2.OUT'
    [  483.871799] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx timed out for 0x80010000 (msg/reply size: 216/12)
    [  483.871810] sof-audio-pci-intel-tgl 0000:00:1f.3: IPC timeout
    [  483.871814] sof-audio-pci-intel-tgl 0000:00:1f.3: Failed to set dai config for iDisp3
    [  483.871817] sof-audio-pci-intel-tgl 0000:00:1f.3: hda_ctrl_dai_widget_setup: DAI config failed for widget HDA2.OUT
    [  483.871821] sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at snd_soc_dai_hw_params on iDisp3 Pin: -110
    [  483.871867]  iDisp3: ASoC: __soc_pcm_hw_params() failed (-110)
    [  483.871873]  HDMI 3: ASoC: dpcm_fe_dai_hw_params failed (-110)
    [  484.375888] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx timed out for 0x60010000 (msg/reply size: 108/20)
    [  484.375901] sof-audio-pci-intel-tgl 0000:00:1f.3: IPC timeout
    [  484.375905] sof-audio-pci-intel-tgl 0000:00:1f.3: HW params ipc failed for stream 1
    [  484.375915] sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at snd_soc_pcm_component_hw_params on 0000:00:1f.3: -110
    [  484.375924]  HDMI 3: ASoC: __soc_pcm_hw_params() failed (-110)
    [  484.879959] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx timed out for 0x80010000 (msg/reply size: 216/12)
    [  484.879976] sof-audio-pci-intel-tgl 0000:00:1f.3: IPC timeout
    [  484.879983] sof-audio-pci-intel-tgl 0000:00:1f.3: Failed to set dai config for iDisp3
    [  484.879988] sof-audio-pci-intel-tgl 0000:00:1f.3: hda_ctrl_dai_widget_free: DAI config failed for widget 'HDA2.OUT'
    [  484.880015]  HDMI 3: ASoC: dpcm_fe_dai_hw_params failed (-110)
    [  485.384672] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx timed out for 0x80010000 (msg/reply size: 216/12)
    [  485.384682] sof-audio-pci-intel-tgl 0000:00:1f.3: IPC timeout
    [  485.384687] sof-audio-pci-intel-tgl 0000:00:1f.3: Failed to set dai config for iDisp3
    [  485.384690] sof-audio-pci-intel-tgl 0000:00:1f.3: hda_ctrl_dai_widget_free: DAI config failed for widget 'HDA2.OUT'
    [  485.887751] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx timed out for 0x80010000 (msg/reply size: 216/12)
    [  485.887763] sof-audio-pci-intel-tgl 0000:00:1f.3: IPC timeout
    [  485.887767] sof-audio-pci-intel-tgl 0000:00:1f.3: Failed to set dai config for iDisp3
    [  485.887771] sof-audio-pci-intel-tgl 0000:00:1f.3: hda_ctrl_dai_widget_setup: DAI config failed for widget HDA2.OUT
    [  485.887775] sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at snd_soc_dai_hw_params on iDisp3 Pin: -110
    [  485.887835]  iDisp3: ASoC: __soc_pcm_hw_params() failed (-110)
    [  485.887841]  HDMI 3: ASoC: dpcm_fe_dai_hw_params failed (-110)
    [  486.391841] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx timed out for 0x80010000 (msg/reply size: 216/12)
    [  486.391851] sof-audio-pci-intel-tgl 0000:00:1f.3: IPC timeout
    [  486.391856] sof-audio-pci-intel-tgl 0000:00:1f.3: Failed to set dai config for iDisp3
    [  486.391859] sof-audio-pci-intel-tgl 0000:00:1f.3: hda_ctrl_dai_widget_free: DAI config failed for widget 'HDA2.OUT'
    [  486.895747] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx timed out for 0x80010000 (msg/reply size: 216/12)
    [  486.895756] sof-audio-pci-intel-tgl 0000:00:1f.3: IPC timeout
    [  486.895759] sof-audio-pci-intel-tgl 0000:00:1f.3: Failed to set dai config for iDisp3
    [  486.895762] sof-audio-pci-intel-tgl 0000:00:1f.3: hda_ctrl_dai_widget_setup: DAI config failed for widget HDA2.OUT
    [  486.895765] sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at snd_soc_dai_hw_params on iDisp3 Pin: -110
    [  486.895802]  iDisp3: ASoC: __soc_pcm_hw_params() failed (-110)
    [  486.895806]  HDMI 3: ASoC: dpcm_fe_dai_hw_params failed (-110)
    [  487.399756] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx timed out for 0x80010000 (msg/reply size: 216/12)
    [  487.399768] sof-audio-pci-intel-tgl 0000:00:1f.3: IPC timeout
    [  487.399772] sof-audio-pci-intel-tgl 0000:00:1f.3: Failed to set dai config for iDisp3
    [  487.399776] sof-audio-pci-intel-tgl 0000:00:1f.3: hda_ctrl_dai_widget_free: DAI config failed for widget 'HDA2.OUT'
    [  487.903703] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx timed out for 0x80010000 (msg/reply size: 216/12)
    [  487.903712] sof-audio-pci-intel-tgl 0000:00:1f.3: IPC timeout
    [  487.903715] sof-audio-pci-intel-tgl 0000:00:1f.3: Failed to set dai config for iDisp3
    [  487.903717] sof-audio-pci-intel-tgl 0000:00:1f.3: hda_ctrl_dai_widget_setup: DAI config failed for widget HDA2.OUT
    [  487.903721] sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at snd_soc_dai_hw_params on iDisp3 Pin: -110
    [  487.903759]  iDisp3: ASoC: __soc_pcm_hw_params() failed (-110)
    [  487.903763]  HDMI 3: ASoC: dpcm_fe_dai_hw_params failed (-110)
    [  488.407769] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx timed out for 0x80010000 (msg/reply size: 216/12)
    [  488.407777] sof-audio-pci-intel-tgl 0000:00:1f.3: IPC timeout
    [  488.407780] sof-audio-pci-intel-tgl 0000:00:1f.3: Failed to set dai config for iDisp3
    [  488.407782] sof-audio-pci-intel-tgl 0000:00:1f.3: hda_ctrl_dai_widget_free: DAI config failed for widget 'HDA2.OUT'
    [  491.408539] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx timed out for 0x30110000 (msg/reply size: 12/12)
    [  491.408548] sof-audio-pci-intel-tgl 0000:00:1f.3: IPC timeout
    [  491.408552] sof-audio-pci-intel-tgl 0000:00:1f.3: failed to free widget PIPELINE.8.HDA2.OUT
    [  491.911690] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx timed out for 0x90050000 (msg/reply size: 8/12)
    [  491.911698] sof-audio-pci-intel-tgl 0000:00:1f.3: IPC timeout
    [  491.911701] sof-audio-pci-intel-tgl 0000:00:1f.3: DMA_TRACE_FREE failed with error: -110
    [  492.415682] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx timed out for 0x40010000 (msg/reply size: 76/12)
    [  492.415691] sof-audio-pci-intel-tgl 0000:00:1f.3: IPC timeout
    [  492.415694] sof-audio-pci-intel-tgl 0000:00:1f.3: ctx_save IPC error: -110, proceeding with suspend
    [  495.084446] sof-audio-pci-intel-tgl 0000:00:1f.3: IMR restore failed, trying to cold boot
    [  495.206295] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx error for 0x30130000 (msg/reply size: 12/12): -22
    [  495.206307] sof-audio-pci-intel-tgl 0000:00:1f.3: Failed to restore pipeline after resume -22
    [  495.206315] sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at snd_soc_pcm_component_pm_runtime_get on 0000:00:1f.3: -22
    [  495.206322]  iDisp3: __soc_pcm_open() failed (-22)
    [  495.206326]  HDMI 3: ASoC: dpcm_be_dai_startup() failed at iDisp3 (-22)
    [  495.206330]  HDMI 3: dpcm_fe_dai_startup() failed (-22)
    
    
  12. plbossart commented on Jul 25, 2022

    @plbossart
    MemberAuthor

    oh, that's pretty scary @madsl, I've not seen this one before. Indeed if we have an IPC error it's game over usually.

    Can you attach the full dmesg log (not paste) so that we can figure out when this happens?

    Also we need to confirm which kernel you are using (we can figure out the firmware from the dmesg log).

  13. madsl commented on Jul 25, 2022

    @madsl
    1. booted
    2. Started audacious, playing song.
    3. Stream stops between 1 and 2 minutes played. Nothing in dmesg yet.
    4. I try systemctl --user restart pipewire
      Then all those errors pops up in dmesg.

    Attached are the dmesg:
    dmesg_tgl_ipc.log

  14. plbossart commented on Jul 25, 2022

    @plbossart
    MemberAuthor

    did you edit the log @madsl? There's a significant gap

    [   11.759963] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
    [  206.305186] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx timed out for 0x60050000 (msg/reply size: 12/12)
    

    makes it hard to see what happened when you start playing in step2) above.

  15. madsl commented on Jul 25, 2022

    @madsl

    No, I did not edit it. It was the time it took before I ran systemctl --user restart pipewire. I checked many times before to be sure. It's the restart step that makes the kernel spew out all those lines, nothing happened before it (in dmesg).

  16. 21 remaining items

  17. plbossart commented on Jul 27, 2022

    @plbossart
    MemberAuthor

    Right, that points to some sort of streaming/DMA issue. The driver doesn't catch the error and somehow believes things are just fine.

    The good thing is that we don't have an issue with low-level speaker-test utilities.

    One possibility would be to disable the timer-based scheduling in pipewire. In the PulseAudio days, we used to have an option tsched=0, presumably the same option exists?

    If not, we need to patch the kernel with this diff:

    diff --git a/sound/soc/sof/intel/hda-common-ops.c b/sound/soc/sof/intel/hda-common-ops.c
    index b2326396c870..996be790ced9 100644
    --- a/sound/soc/sof/intel/hda-common-ops.c
    +++ b/sound/soc/sof/intel/hda-common-ops.c
    @@ -99,8 +99,8 @@ struct snd_sof_dsp_ops sof_hda_common_ops = {
            .hw_info =      SNDRV_PCM_INFO_MMAP |
                            SNDRV_PCM_INFO_MMAP_VALID |
                            SNDRV_PCM_INFO_INTERLEAVED |
    -                       SNDRV_PCM_INFO_PAUSE |
    -                       SNDRV_PCM_INFO_NO_PERIOD_WAKEUP,
    +                       SNDRV_PCM_INFO_PAUSE,
    +//                     SNDRV_PCM_INFO_NO_PERIOD_WAKEUP,
     
            .dsp_arch_ops = &sof_xtensa_arch_ops,
     };
  18. madsl commented on Jul 27, 2022

    @madsl

    I did your kernel patch, but unfortunately it seems like the same issue is popping up. It stopped 4:25 in now.

  19. plbossart commented on Jul 27, 2022

    @plbossart
    MemberAuthor

    I re-installed a complete Fedora36 distro with PipeWire+audacious and it's been playing for 10mn alright. It's a similar setup with two RT1316 amplifiers and it's the same firmware on TGL and ADL.

    Wondering if you could try with Fedora on a USB key to check if this problem also happens there?

    Thanks!

  20. madsl commented on Jul 27, 2022

    @madsl

    Sure thing! You did a complete install, or did you test from USB? I'll try with Fedora-Workstation-Live-x86_64-36-1.5.iso

  21. madsl commented on Jul 27, 2022

    @madsl

    Seems like you're right, it works there. I'll try going to an upstream kernel again and see if things get better on my local install.

  22. madsl commented on Jul 27, 2022

    @madsl

    Hm, no dice. Tried with 5.18.14, same config as the sof-kernel, still happens. Guess I'll try to match firmware and pipewire version too then.

  23. madsl commented on Jul 27, 2022

    @madsl

    Now I've tried same sof-firmware (2.0), same pipewire (0.3.49), and same alsa-ucm (1.2.6.1) as the Fedora live USB, but it still happened on my install. Then I started thinking - I still have that powertop --auto-tune thing during boot, and that's soon the only difference between the systems...

    And lo and behold, if I disable powertop --auto-tune completely during boot, I don't get stream stops anymore.

    powertop --auto-tune needs a bit of measurements of your battery before it will apply something with --auto-tune, and it will tell you this if you just start it normally (something about needs x more measurements). Could you try that on your Fedora, and see if you get --auto-tune to do something, and if applied, see if it affects you as well?

    Would be nice if you could have powertop enabled, I think it saves you a lot of battery in the long run...

  24. plbossart commented on Jul 28, 2022

    @plbossart
    MemberAuthor

    powertop should give you a list of options that were set as 'GOOD'. is there a way you can capture them and share?

    I also wonder if there's a way to do some sort of dichotomy with all the options, i.e. start from an all BAD set of configurations, and gradually change some options to GOOD until you reach the problem with the stream stopping.

    We don't have any hooks that I am aware of to tune the audio subsystem, so it's likely something external that has a side effect.

  25. plbossart commented on Jul 28, 2022

    @plbossart
    MemberAuthor

    @madsl this is what I had in mind, the powertop 'Tunables' tab should show what's enabled. I changed all the 'bad' to 'good' and I don't see any effect on my system. If you can give it a try that would check what the auto-tune option is trying to do.

    Screenshot from 2022-07-28 16-57-48

  26. madsl commented on Aug 14, 2022

    @madsl

    Seems like I found the magic setting that helped on my XPS 9320.

    If I comment out powersave on my wifi in apply_recommended_power_settings.sh like this:

     # Runtime PM for PCI Device Intel Corporation Alder Lake-P PCH CNVi WiFi
     # echo 'auto' > '/sys/bus/pci/devices/0000:00:14.3/power/control'
    

    then I don't get the error anymore.

    I guess that means that this might either be a wifi driver issue or a Dell firmware issue?

    I'll attach my current apply_recommended_power_settings.sh
    apply_recommended_power_settings.sh

  27. plbossart commented on Aug 19, 2022

    @plbossart
    MemberAuthor

    @madsl I am not aware of any relationship or dependencies between audio and wifi on Intel platform, maybe there's some sort of DMA issue due to bandwidth on the PCI bus. We'll keep this open for now to see if there are additional information but for now there's not much we can do on the audio side.

  28. plbossart commented on Feb 16, 2023

    @plbossart
    MemberAuthor

    no update and no reproduction in 6+ months, closing. If additional data helps pin-point what the problem might be please reopen a new issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CommunityIPC timeoutSDW

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions