Audio Output stops working when I suspend

So when I suspend(systemctl suspend) my current speaker usually just stops working, requiring an unplug, or in the case of my internal speakers, changing their mode. I would be fine with some sort of work around to reload them when I un-suspend, but I don’t know how to do that.

Is this a laptop we’re dealing with? If so, does it happen when on battery and when connected to a power supply?

Please start by providing the audio hardware and system details…

inxi -Aa

Install sysfsutils (if not already installed)…

sudo zypper in sysfsutils

and do

systool -vm snd_hda_intel

*Report back here with the output (assuming this is the relevant sound module)

Compare the output from this command between working sound and following wakeup when the speaker is not working…

aplay -l

It may also be that on wakeup, PulseAudio (or PipeWire) grab the first available sink perhaps, although that shouldn’t stop you from reselecting the desired output again.

You could also compare the WirePlumber output before/after suspending…

wpctl status
Audio:
  Device-1: Intel Ice Lake-LP Smart Sound Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel alternate: snd_sof_pci_intel_icl
    bus-ID: 00:1f.3 chip-ID: 8086:34c8 class-ID: 0403
  Device-2: SteelSeries ApS Arctis 1 Wireless
    driver: hid-generic,snd-usb-audio,usbhid type: USB rev: 1.1 speed: 12 Mb/s
    lanes: 1 mode: 1.1 bus-ID: 1-1:42 chip-ID: 1038:12b3 class-ID: 0300
  API: ALSA v: k6.4.2-1-default status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: PipeWire v: 0.3.72 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl

2:

Module = "snd_hda_intel"

  Attributes:
    coresize            = "61440"
    initsize            = "0"
    initstate           = "live"
    refcnt              = "4"
    srcversion          = "5111C91E4DEAA8178FF2363"
    taint               = ""
    uevent              = <store method only>

  Parameters:
    align_buffer_size   = "-1"
    bdl_pos_adj         = "-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1"
    beep_mode           = "Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y"
    ctl_dev_id          = "N"
    dmic_detect         = "Y"
    enable_msi          = "-1"
    enable              = "Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y"
    id                  = "(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)"
    index               = "-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1"
    jackpoll_ms         = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"
    model               = "(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)"
    patch               = "(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)"
    pm_blacklist        = "Y"
    position_fix        = "-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1"
    power_save          = "1"
    power_save_controller= "Y"
    probe_mask          = "-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1"
    probe_only          = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"
    single_cmd          = "-1"
    snoop               = "-1"

  Sections:

aplay after suspend:

card 0: PCH [HDA Intel PCH], device 0: ALC236 Analog [ALC236 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Wireless [SteelSeries Arctis 1 Wireless], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

wpctl:

card 0: PCH [HDA Intel PCH], device 0: ALC236 Analog [ALC236 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Wireless [SteelSeries Arctis 1 Wireless], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
wolf@localhost:~/Godot4/Train Your Character!> wpctl status
PipeWire 'pipewire-0' [0.3.72, wolf@localhost.localdomain, cookie:1672659603]
 └─ Clients:
        33. indicator-kdeconnect                [0.3.72, wolf@localhost.localdomain, pid:2]
        34. Firefox                             [0.3.72, wolf@localhost.localdomain, pid:22771]
        35. Firefox                             [0.3.72, wolf@localhost.localdomain, pid:22771]
        36. Steam                               [0.3.72, wolf@localhost.localdomain, pid:2863]
        37. WirePlumber                         [0.3.72, wolf@localhost.localdomain, pid:4239]
        38. WirePlumber [export]                [0.3.72, wolf@localhost.localdomain, pid:4239]
        48. libcanberra                         [0.3.72, wolf@localhost.localdomain, pid:18324]
        55. Plasma                              [0.3.72, wolf@localhost.localdomain, pid:1389]
        57. wpctl                               [0.3.72, wolf@localhost.localdomain, pid:18658]
        65. QPulse                              [0.3.72, wolf@localhost.localdomain, pid:12956]
        66. Plasma PA                           [0.3.72, wolf@localhost.localdomain, pid:1389]
        90. Mozilla Firefox                     [0.3.72, wolf@localhost.localdomain, pid:22898]
        91. Steam Voice Settings                [0.3.72, wolf@localhost.localdomain, pid:2863]
        92. Firefox                             [0.3.72, wolf@localhost.localdomain, pid:22771]
        99. ZOOM VoiceEngine                    [0.3.72, wolf@localhost.localdomain, pid:3]
       172. Plasma PA                           [0.3.72, wolf@localhost.localdomain, pid:18324]

Audio
 β”œβ”€ Devices:
 β”‚      88. SteelSeries Arctis 1 Wireless       [alsa]
 β”‚     121. Built-in Audio                      [alsa]
 β”‚  
 β”œβ”€ Sinks:
 β”‚  *   64. Built-in Audio Analog Stereo        [vol: 0.50]
 β”‚     135. SteelSeries Arctis 1 Wireless Pro   [vol: 1.00]
 β”‚  
 β”œβ”€ Sink endpoints:
 β”‚  
 β”œβ”€ Sources:
 β”‚  *  157. Built-in Audio Analog Stereo        [vol: 1.00]
 β”‚  
 β”œβ”€ Source endpoints:
 β”‚  
 └─ Streams:
        85. Plasma PA                                                   
             53. input_FR        < Firefox:output_FR    [init]
             74. monitor_FR     
             77. input_FL        < Firefox:output_FL    [init]
            174. monitor_FL     
       119. Plasma PA                                                   
            128. input_FL        < Firefox:output_FL    [init]
            137. monitor_FL     
            141. monitor_FR     
            150. input_FR        < Firefox:output_FR    [init]
       126. Firefox                                                     
             32. output_FL       > ALC236 Analog:playback_FL    [active]
            107. output_FR       > ALC236 Analog:playback_FR    [active]
       148. Firefox                                                     
            178. output_FR       > Plasma PA:input_FR   [init]
            183. output_FL       > Plasma PA:input_FL   [init]
       184. Firefox                                                     
             98. output_FL       > ALC236 Analog:playback_FL    [init]
            115. output_FR       > ALC236 Analog:playback_FR    [init]

Video
 β”œβ”€ Devices:
 β”‚      59. Integrated Camera                   [v4l2]
 β”‚      62. Integrated Camera                   [v4l2]
 β”‚  
 β”œβ”€ Sinks:
 β”‚  
 β”œβ”€ Sink endpoints:
 β”‚  
 β”œβ”€ Sources:
 β”‚  *   93. Integrated Camera (V4L2)           
 β”‚  
 β”œβ”€ Source endpoints:
 β”‚  
 └─ Streams:

Settings
 └─ Default Configured Node Names:
         0. Audio/Sink    alsa_output.pci-0000_00_1f.3.analog-stereo.9
         1. Audio/Source  alsa_input.usb-SteelSeries_SteelSeries_Arctis_1_Wireless-00.mono-fallback.2

aplay after fix:

**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC236 Analog [ALC236 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Wireless [SteelSeries Arctis 1 Wireless], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

wpctl:

PipeWire 'pipewire-0' [0.3.72, wolf@localhost.localdomain, cookie:1672659603]
 └─ Clients:
        33. indicator-kdeconnect                [0.3.72, wolf@localhost.localdomain, pid:2]
        34. Firefox                             [0.3.72, wolf@localhost.localdomain, pid:22771]
        35. Firefox                             [0.3.72, wolf@localhost.localdomain, pid:22771]
        36. Steam                               [0.3.72, wolf@localhost.localdomain, pid:2863]
        37. WirePlumber                         [0.3.72, wolf@localhost.localdomain, pid:4239]
        38. WirePlumber [export]                [0.3.72, wolf@localhost.localdomain, pid:4239]
        48. libcanberra                         [0.3.72, wolf@localhost.localdomain, pid:18324]
        55. Plasma                              [0.3.72, wolf@localhost.localdomain, pid:1389]
        65. QPulse                              [0.3.72, wolf@localhost.localdomain, pid:12956]
        66. Plasma PA                           [0.3.72, wolf@localhost.localdomain, pid:1389]
        72. wpctl                               [0.3.72, wolf@localhost.localdomain, pid:19070]
        90. Mozilla Firefox                     [0.3.72, wolf@localhost.localdomain, pid:22898]
        91. Steam Voice Settings                [0.3.72, wolf@localhost.localdomain, pid:2863]
        92. Firefox                             [0.3.72, wolf@localhost.localdomain, pid:22771]
        99. ZOOM VoiceEngine                    [0.3.72, wolf@localhost.localdomain, pid:3]
       172. Plasma PA                           [0.3.72, wolf@localhost.localdomain, pid:18324]

Audio
 β”œβ”€ Devices:
 β”‚      88. SteelSeries Arctis 1 Wireless       [alsa]
 β”‚     121. Built-in Audio                      [alsa]
 β”‚  
 β”œβ”€ Sinks:
 β”‚  *   64. Built-in Audio Analog Stereo        [vol: 0.50]
 β”‚     135. SteelSeries Arctis 1 Wireless Pro   [vol: 1.00]
 β”‚  
 β”œβ”€ Sink endpoints:
 β”‚  
 β”œβ”€ Sources:
 β”‚  *  139. Built-in Audio Analog Stereo        [vol: 1.00]
 β”‚  
 β”œβ”€ Source endpoints:
 β”‚  
 └─ Streams:
        85. Plasma PA                                                   
             53. input_FR        < Firefox:output_FR    [init]
             74. monitor_FR     
             77. input_FL        < Firefox:output_FL    [init]
            174. monitor_FL     
       119. Plasma PA                                                   
            128. input_FL        < Firefox:output_FL    [init]
            137. monitor_FL     
            141. monitor_FR     
            150. input_FR        < Firefox:output_FR    [init]
       126. Firefox                                                     
             32. output_FL       > ALC236 Analog:playback_FL    [active]
            107. output_FR       > ALC236 Analog:playback_FR    [active]
       148. Firefox                                                     
            178. output_FR       > Plasma PA:input_FR   [init]
            183. output_FL       > Plasma PA:input_FL   [init]
       184. Firefox                                                     
             98. output_FL       > ALC236 Analog:playback_FL    [init]
            115. output_FR       > ALC236 Analog:playback_FR    [init]

Video
 β”œβ”€ Devices:
 β”‚      59. Integrated Camera                   [v4l2]
 β”‚      62. Integrated Camera                   [v4l2]
 β”‚  
 β”œβ”€ Sinks:
 β”‚  
 β”œβ”€ Sink endpoints:
 β”‚  
 β”œβ”€ Sources:
 β”‚  *   93. Integrated Camera (V4L2)           
 β”‚  
 β”œβ”€ Source endpoints:
 β”‚  
 └─ Streams:

Settings
 └─ Default Configured Node Names:
         0. Audio/Sink    alsa_output.pci-0000_00_1f.3.analog-stereo.11
         1. Audio/Source  alsa_input.usb-SteelSeries_SteelSeries_Arctis_1_Wireless-00.mono-fallback.2

What β€˜fix’ are you pertaining to?

The only difference I noticed was

Settings
 └─ Default Configured Node Names:
         0. Audio/Sink    alsa_output.pci-0000_00_1f.3.analog-stereo.9

and

Settings
 └─ Default Configured Node Names:
         0. Audio/Sink    alsa_output.pci-0000_00_1f.3.analog-stereo.11

I’m not sure of the significance of this though.

FWIW, here is a similar thread where a user found a systemd script that removing and rescans the PCI devices upon resume did the trick…

https://forums.linuxmint.com/viewtopic.php?p=2176632&sid=020ac9b22936fce08392507f45aa038b#p2176632

YMMV.

1 Like

I tried that script, but it failed. The β€œfix” is changing the modes of my speakers.

You may try systemctl --user restart pipewire.service.

1 Like

I suspect this is a sof firmware bug. I have this issue and my laptop also has distorted audio.

It might be a regression: [regression] 6.4 and higher causes audio distortion Β· Issue #4482 Β· thesofproject/linux Β· GitHub

@Basilcat That bug seems to be related to audio distortion, rather than what the OP describes here?

I’m honestly not sure if it’s actually running, considering this command works, but not in the script

It turns out it was a kernel issue that will be hopefully fixed in 6.4.7.

If restarting pipewire.service is needed then check status of pipewire.service and pipewire.socket…

systemctl --status pipewire.{service,socket}

We can see if socket activation is enabled and working.

Ok, but how is this related to the OP’s audio issue?

Turns out it was indeed running(although maybe without root access), and the other command worked. Thanks!

1 Like