No more sound after laptop wake up (dummy output)

Hello,
When I wake up my laptop after I sent it o 'sleep' most of the time, if not always, I don't get the sound back. Once I've rebooted the sound is back.

I went through the forum and gathered as much information as I could for you. I'm no expert, so I suppose some don't make sense, but here it is.

Someone explained in the forum that pulseaudio switches to dummy output when it can't find the hardware. I dunno if that's true.

I will not reboot until it's solved.

On the other hand, I'm very happy with Manjaro because since two weeks my years long problem with wifi on Linux magically disappeared! :smiling_face_with_three_hearts:

Thanks!

System:    Host: tryme Kernel: 5.4.39-1-MANJARO x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: Gnome 3.36.2 
           Distro: Manjaro Linux 
Machine:   Type: Laptop System: ASUSTeK product: UX303LN v: 1.0 serial: <filter> 
           Mobo: ASUSTeK model: UX303LN v: 1.0 serial: <filter> UEFI: American Megatrends v: UX303LN.204 date: 09/01/2014 
Battery:   ID-1: BAT0 charge: 38.1 Wh condition: 41.8/50.1 Wh (83%) model: ASUSTeK UX3-44 status: Discharging 
CPU:       Topology: Dual Core model: Intel Core i5-4210U bits: 64 type: MT MCP arch: Haswell rev: 1 L2 cache: 3072 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 19161 
           Speed: 1324 MHz min/max: 800/2700 MHz Core speeds (MHz): 1: 1294 2: 1336 3: 1260 4: 1268 
Graphics:  Device-1: Intel Haswell-ULT Integrated Graphics vendor: ASUSTeK driver: i915 v: kernel bus ID: 00:02.0 
           Device-2: NVIDIA GM108M [GeForce 840M] vendor: ASUSTeK driver: nvidia v: 440.82 bus ID: 03:00.0 
           Display: server: X.org 1.20.8 driver: modesetting,nvidia unloaded: intel,nouveau resolution: <xdpyinfo missing> 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 4400 (HSW GT2) v: 4.5 Mesa 20.0.6 direct render: Yes 
Audio:     Device-1: Intel Haswell-ULT HD Audio driver: snd_hda_intel v: kernel bus ID: 00:03.0 
           Device-2: Intel 8 Series HD Audio vendor: ASUSTeK driver: snd_hda_intel v: kernel bus ID: 00:1b.0 
           Sound Server: ALSA v: k5.4.39-1-MANJARO 
Network:   Device-1: Intel Wireless 7260 driver: iwlwifi v: kernel port: f040 bus ID: 02:00.0 
           IF: wlp2s0 state: up mac: <filter> 
Drives:    Local Storage: total: 465.76 GiB used: 348.24 GiB (74.8%) 
           ID-1: /dev/sda vendor: Samsung model: SSD 850 EVO 500GB size: 465.76 GiB 
Partition: ID-1: / size: 24.48 GiB used: 19.22 GiB (78.5%) fs: ext4 dev: /dev/sda4 
           ID-2: /home size: 347.70 GiB used: 327.39 GiB (94.2%) fs: ext4 dev: /dev/sda5 
           ID-3: swap-1 size: 6.00 GiB used: 1.60 GiB (26.7%) fs: swap dev: /dev/sda6 
Sensors:   System Temperatures: cpu: 54.0 C mobo: N/A 
           Fan Speeds (RPM): cpu: 2300 
Info:      Processes: 242 Uptime: 1d 2h 34m Memory: 5.70 GiB used: 4.34 GiB (76.2%) Init: systemd Compilers: gcc: 9.3.0 
           clang: 10.0.0 Shell: bash v: 5.0.16 inxi: 3.0.37 
  1. The first thing I tried was this from here, I did nothing. Then I passed the other commands in the terminal.
$ amixer -D pulse sset Master toggle
  1. Then this:
$ sudo dmesg | grep snd
[    3.795854] snd_hda_codec_conexant hdaudioC1D0: CX20751/2: BIOS auto-probing.
[    3.796200] snd_hda_codec_conexant hdaudioC1D0: autoconfig for CX20751/2: line_outs=1 (0x17/0x0/0x0/0x0/0x0) type:speaker
[    3.796203] snd_hda_codec_conexant hdaudioC1D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    3.796206] snd_hda_codec_conexant hdaudioC1D0:    hp_outs=1 (0x16/0x0/0x0/0x0/0x0)
[    3.796208] snd_hda_codec_conexant hdaudioC1D0:    mono: mono_out=0x0
[    3.796209] snd_hda_codec_conexant hdaudioC1D0:    inputs:
[    3.796211] snd_hda_codec_conexant hdaudioC1D0:      Internal Mic=0x1a
[    3.796213] snd_hda_codec_conexant hdaudioC1D0:      Mic=0x19
[    4.006722] snd_hda_intel 0000:00:03.0: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
sudo systemctl --user restart pulseaudio
Failed to connect to bus: No such file or directory
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: CX20751/2 Analog [CX20751/2 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
$ systemctl list-units > list-units
  sys-devices-pci0000:00-0000:00:03.0-sound-card0.device                                    loaded active plugged   Haswell-ULT HD Audio Controller
  sys-devices-pci0000:00-0000:00:1b.0-sound-card1.device                                    loaded active plugged   8 Series HD Audio Controller 
  
Sockets                                                                      
  sound.target                                                                              loaded active active    Sound
$ cat /etc/pulse/default.pa > pulse-default
#!/usr/bin/pulseaudio -nF
#
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.

# This startup script is used only if PulseAudio is started per-user
# (i.e. not in system mode)

.fail

### Automatically restore the volume of streams and devices
load-module module-device-restore
load-module module-stream-restore
load-module module-card-restore

### Automatically augment property information from .desktop files
### stored in /usr/share/application
load-module module-augment-properties

### Should be after module-*-restore but before module-*-detect
load-module module-switch-on-port-available

### Load audio drivers statically
### (it's probably better to not load these drivers manually, but instead
### use module-udev-detect -- see below -- for doing this automatically)
#load-module module-alsa-sink
#load-module module-alsa-source device=hw:1,0
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
#load-module module-null-sink
#load-module module-pipe-sink

### Automatically load driver modules depending on the hardware available
.ifexists module-udev-detect.so
load-module module-udev-detect
.else
### Use the static hardware detection module (for systems that lack udev support)
load-module module-detect
.endif

### Automatically connect sink and source if JACK server is present
.ifexists module-jackdbus-detect.so
.nofail
load-module module-jackdbus-detect channels=2
.fail
.endif

### Automatically load driver modules for Bluetooth hardware
.ifexists module-bluetooth-policy.so
load-module module-bluetooth-policy
.endif

.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover
.endif

### Load several protocols
load-module module-dbus-protocol
.ifexists module-esound-protocol-unix.so
load-module module-esound-protocol-unix
.endif
load-module module-native-protocol-unix

### Network access (may be configured with paprefs, so leave this commented
### here if you plan to use paprefs)
#load-module module-esound-protocol-tcp
#load-module module-native-protocol-tcp
#load-module module-zeroconf-publish

### Load the RTP receiver module (also configured via paprefs, see above)
#load-module module-rtp-recv

### Load the RTP sender module (also configured via paprefs, see above)
#load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100 sink_properties="device.description='RTP Multicast Sink'"
#load-module module-rtp-send source=rtp.monitor

### Load additional modules from GSettings. This can be configured with the paprefs tool.
### Please keep in mind that the modules configured by paprefs might conflict with manually
### loaded modules.
.ifexists module-gsettings.so
.nofail
load-module module-gsettings
.fail
.endif


### Automatically restore the default sink/source when changed by the user
### during runtime
### NOTE: This should be loaded as early as possible so that subsequent modules
### that look up the default sink/source get the right value
load-module module-default-device-restore

### Automatically move streams to the default sink if the sink they are
### connected to dies, similar for sources
load-module module-rescue-streams

### Make sure we always have a sink around, even if it is a null sink.
load-module module-always-sink

### Honour intended role device property
load-module module-intended-roles

### Automatically suspend sinks/sources that become idle for too long
load-module module-suspend-on-idle

### If autoexit on idle is enabled we want to make sure we only quit
### when no local session needs us anymore.
.ifexists module-console-kit.so
load-module module-console-kit
.endif
.ifexists module-systemd-login.so
load-module module-systemd-login
.endif

### Enable positioned event sounds
load-module module-position-event-sounds

### Cork music/video streams when a phone stream is active
load-module module-role-cork

### Modules to allow autoloading of filters (such as echo cancellation)
### on demand. module-filter-heuristics tries to determine what filters
### make sense, and module-filter-apply does the heavy-lifting of
### loading modules and rerouting streams.
load-module module-filter-heuristics
load-module module-filter-apply

### Make some devices default
#set-default-sink output
#set-default-source input
$ sudo pulseaudio -k
E: [pulseaudio] main.c: Failed to kill daemon: No such process
$ pactl info && pactl list short modules
Server String: /run/user/1000/pulse/native
Library Protocol Version: 33
Server Protocol Version: 33
Is Local: yes
Client Index: 13
Tile Size: 65472
User Name: me
Host Name: tryme
Server Name: pulseaudio
Server Version: 13.0
Default Sample Specification: s16le 2ch 44100Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.pci-0000_00_1b.0.analog-stereo
Default Source: alsa_input.pci-0000_00_1b.0.analog-stereo
Cookie: c596:6e2c
0	module-device-restore		
1	module-stream-restore		
2	module-card-restore		
3	module-augment-properties		
4	module-switch-on-port-available		
5	module-udev-detect		
6	module-alsa-card	device_id="0" name="pci-0000_00_03.0" card_name="alsa_card.pci-0000_00_03.0" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1"	
7	module-alsa-card	device_id="1" name="pci-0000_00_1b.0" card_name="alsa_card.pci-0000_00_1b.0" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1"	
8	module-jackdbus-detect	channels=2	
9	module-bluetooth-policy		
10	module-bluetooth-discover		
11	module-bluez5-discover		
12	module-dbus-protocol		
13	module-native-protocol-unix		
14	module-gsettings		
15	module-default-device-restore		
16	module-rescue-streams		
17	module-always-sink		
18	module-intended-roles		
19	module-suspend-on-idle		
20	module-console-kit		
21	module-systemd-login		
22	module-position-event-sounds		
23	module-role-cork		
24	module-filter-heuristics		
25	module-filter-apply	

Well well well I dunno what's going on because I've got the sound back!?

Forum kindly sponsored by