Sound problems

For some time I experience a failed pulseaudio service after logging in (systemctl --user status pulseaudio: Failed to start Sound Service). The system is a Dell XPS 13 using a docking station. I can start pulseaudio manually from the terminal with pulseaudio --start and sometimes the interal audio is detected. I usually can connect a Bluetooth headset after some retries. Logging out and in again might recover the internal audio (which I need) but this is not reproducible. I always have to start pulseaudio manually.
Using alsamixer I can see all audio devices (internal, audio from docking station, and bluetooth headset, if connected). dmesg does not show sound related error messages.

Unfortunately, I cannot get anywhere with the failed pulseaudio service. journalctl does not reveal anything and I am stuck as to isolate the problem.

The context is that I recently had to start using the docking station. IIRC, the sound problems I have now have not occurred immediately after using the docking station but definitely have not occurred before that. Maybe related or not, I use a bluetooth keyboard as well, which no longer connects on start-up (I have bluez-auto-enable-devices installed). This used to work before. As of now, I have to do a systemctl restart bluetooth and than connect using the KDE bluetooth widget (here I see a Bluetooth: hci1: command 0x0c52 tx timeout from dmesg. The same dongle works without problems in another system).

Thank you in advance for any help.

uname -a
Linux sheep-4 5.3.18-lp152.75-preempt #1 SMP PREEMPT Wed May 5 09:22:56 UTC 2021 (16c42c8) x86_64 x86
_64 x86_64 GNU/Linux

System is updated as of the date of this post. Packman packages are in use for non-free codecs.

Using “systemctl --user cat pulseaudio” under Tumbleweed I see:

ExecStart=/usr/bin/pulseaudio --daemonize=no --log-target=journal

If that is the same for 15.2 (if not, change it according to your output), can you run from the command prompt:

/usr/bin/pulseaudio -v --daemonize=no

and paste the output between CODE tags in this topic?


host:~> /usr/bin/pulseaudio -v --daemonize=no
I: [pulseaudio] main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Die Operation ist nicht erlaubt
I: [pulseaudio] main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Die Operation ist nicht erlaubt
I: [pulseaudio] core-util.c: Successfully gained nice level -11.
I: [pulseaudio] main.c: This is PulseAudio 13.0-rebootstrapped
I: [pulseaudio] main.c: Page size is 4096 bytes
I: [pulseaudio] main.c: Machine ID is 18c2e77ffa3d43ddaa249cb568dc37bf.
I: [pulseaudio] main.c: Session ID is 2.
I: [pulseaudio] main.c: Using runtime directory /run/user/1000/pulse.
I: [pulseaudio] main.c: Using state directory /home/user/.config/pulse.
I: [pulseaudio] main.c: Using modules directory /usr/lib64/pulse-13.0/modules.
I: [pulseaudio] main.c: Running in system mode: no
I: [pulseaudio] main.c: System supports high resolution timers
I: [pulseaudio] cpu-x86.c: CPU flags: CMOV MMX SSE SSE2 SSE3 SSSE3 SSE4_1 SSE4_2 
I: [pulseaudio] svolume_mmx.c: Initialising MMX optimized volume functions.
I: [pulseaudio] remap_mmx.c: Initialising MMX optimized remappers.
I: [pulseaudio] svolume_sse.c: Initialising SSE2 optimized volume functions.
I: [pulseaudio] remap_sse.c: Initialising SSE2 optimized remappers.
I: [pulseaudio] sconv_sse.c: Initialising SSE2 optimized conversions.
I: [pulseaudio] svolume_orc.c: Initialising ORC optimized volume functions.
I: [pulseaudio] module-device-restore.c: Successfully opened database file '/home/user/.config/pulse/98c2f77ffa3d43dd98249cb568dc34bc-device-volumes'.
I: [pulseaudio] module.c: Loaded "module-device-restore" (index: #0; argument: "").
I: [pulseaudio] module-stream-restore.c: Successfully opened database file '/home/user/.config/pulse/98c2f77ffa3d43dd98249cb568dc34bc-stream-volumes'.
I: [pulseaudio] module.c: Loaded "module-stream-restore" (index: #1; argument: "").
I: [pulseaudio] module-card-restore.c: Successfully opened database file '/home/user/.config/pulse/98c2f77ffa3d43dd98249cb568dc34bc-card-database'.
I: [pulseaudio] module.c: Loaded "module-card-restore" (index: #2; argument: "").
I: [pulseaudio] module.c: Loaded "module-augment-properties" (index: #3; argument: "").
I: [pulseaudio] module.c: Loaded "module-switch-on-port-available" (index: #4; argument: "").
E: [pulseaudio] module-udev-detect.c: inotify_init1() failed: Zu viele offene Dateien
E: [pulseaudio] module.c: Failed to load module "module-udev-detect" (argument: ""): initialization failed.
I: [pulseaudio] module.c: Loaded "module-jackdbus-detect" (index: #6; argument: "channels=2").
I: [pulseaudio] module.c: Loaded "module-bluetooth-policy" (index: #7; argument: "").
I: [pulseaudio] module.c: Loaded "module-bluez5-discover" (index: #9; argument: "").
I: [pulseaudio] module.c: Loaded "module-bluetooth-discover" (index: #8; argument: "").
I: [pulseaudio] module.c: Loaded "module-esound-protocol-unix" (index: #10; argument: "").
I: [pulseaudio] module.c: Loaded "module-native-protocol-unix" (index: #11; argument: "").
I: [pulseaudio] module.c: Loaded "module-gconf" (index: #12; argument: "").
I: [pulseaudio] module-default-device-restore.c: Restoring default sink 'bluez_sink.20_16_03_19_CA_BD.headset_head_unit'.
I: [pulseaudio] core.c: configured_default_sink: (unset) -> bluez_sink.20_16_03_19_CA_BD.headset_head_unit
I: [pulseaudio] module-default-device-restore.c: Restoring default source 'bluez_source.20_16_03_19_CA_BD.headset_head_unit'.
I: [pulseaudio] core.c: configured_default_source: (unset) -> bluez_source.20_16_03_19_CA_BD.headset_head_unit
I: [pulseaudio] module.c: Loaded "module-default-device-restore" (index: #13; argument: "").
I: [pulseaudio] module.c: Loaded "module-rescue-streams" (index: #14; argument: "").
I: [pulseaudio] module-device-restore.c: Restoring volume for sink auto_null: front-left: 65536 / 100%,   front-right: 65536 / 100%
I: [pulseaudio] sink.c: Created sink 0 "auto_null" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: [pulseaudio] sink.c:     device.description = "Dummy-Ausgabe"
I: [pulseaudio] sink.c:     device.class = "abstract"
I: [pulseaudio] sink.c:     device.icon_name = "audio-card"
I: [pulseaudio] source.c: Created source 0 "auto_null.monitor" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: [pulseaudio] source.c:     device.description = "Monitor of Dummy-Ausgabe"
I: [pulseaudio] source.c:     device.class = "monitor"
I: [pulseaudio] source.c:     device.icon_name = "audio-input-microphone"
I: [null-sink] util.c: Successfully enabled SCHED_RR scheduling for thread, with priority 5.
I: [pulseaudio] core.c: default_source: (unset) -> auto_null.monitor
I: [pulseaudio] core.c: default_sink: (unset) -> auto_null
I: [pulseaudio] module.c: Loaded "module-null-sink" (index: #16; argument: "sink_name=auto_null sink_properties='device.description="Dummy-Ausgabe"'").
I: [pulseaudio] module.c: Loaded "module-always-sink" (index: #15; argument: "").
I: [pulseaudio] module.c: Loaded "module-intended-roles" (index: #17; argument: "").
I: [pulseaudio] module.c: Loaded "module-suspend-on-idle" (index: #18; argument: "").
I: [pulseaudio] module.c: Loaded "module-console-kit" (index: #19; argument: "").
E: [pulseaudio] module-systemd-login.c: Failed to create session monitor: Zu viele offene Dateien
E: [pulseaudio] module.c: Failed to load module "module-systemd-login" (argument: ""): initialization failed.
I: [pulseaudio] module.c: Loaded "module-position-event-sounds" (index: #21; argument: "").
I: [pulseaudio] module.c: Loaded "module-role-cork" (index: #22; argument: "").
I: [pulseaudio] module.c: Loaded "module-filter-heuristics" (index: #23; argument: "").
I: [pulseaudio] module.c: Loaded "module-filter-apply" (index: #24; argument: "").
I: [pulseaudio] main.c: Daemon startup complete.
I: [pulseaudio] client.c: Created 0 "Native client (UNIX socket client)"
I: [pulseaudio] client.c: Created 1 "Native client (UNIX socket client)"
I: [pulseaudio] protocol-native.c: Got credentials: uid=1000 gid=1000 success=1
I: [pulseaudio] backend-ofono.c: Failed to register as a handsfree audio agent with ofono: org.freedesktop.DBus.Error.ServiceUnknown: The name org.ofono was not provided by any .service files
I: [pulseaudio] protocol-native.c: Got credentials: uid=1000 gid=1000 success=1
I: [pulseaudio] source-output.c: Trying to change sample spec
I: [pulseaudio] remap.c: Using stereo to mono remapping
I: [pulseaudio] source-output.c: Created output 0 "Ausschlagsserkennung" on auto_null.monitor with sample spec float32le 1ch 25Hz and channel map mono
I: [pulseaudio] source-output.c:     media.name = "Ausschlagsserkennung"
I: [pulseaudio] source-output.c:     application.name = "PulseAudio-Lautstärkeregler"
I: [pulseaudio] source-output.c:     native-protocol.peer = "UNIX socket client"
I: [pulseaudio] source-output.c:     native-protocol.version = "33"
I: [pulseaudio] source-output.c:     application.id = "org.PulseAudio.pavucontrol"
I: [pulseaudio] source-output.c:     application.icon_name = "audio-card"
I: [pulseaudio] source-output.c:     application.version = "3.0"
I: [pulseaudio] source-output.c:     application.process.id = "2963"
I: [pulseaudio] source-output.c:     application.process.user = "user"
I: [pulseaudio] source-output.c:     application.process.host = "sheep-4"
I: [pulseaudio] source-output.c:     application.process.binary = "pavucontrol"
I: [pulseaudio] source-output.c:     application.language = "en_US.utf8"
I: [pulseaudio] source-output.c:     window.x11.display = ":0"
I: [pulseaudio] source-output.c:     application.process.machine_id = "98c2f77ffa3d43dd98249cb568dc34bc"
I: [pulseaudio] source-output.c:     application.process.session_id = "2"
I: [pulseaudio] source-output.c:     module-stream-restore.id = "source-output-by-application-id:org.PulseAudio.pavucontrol"
I: [pulseaudio] protocol-native.c: Final latency 80.00 ms = 40.00 ms + 40.00 ms

Thanks for having a look.

In Yast configuration of sound, set the model as “generic”.

The log shows source.c and sink.c only reporting dummy so please follow the suggestion of @gonzalcg

Thanks for the suggestion. However, chosing Generic offers only the choice of sound card model “USB audio”. The sound card in question is not a USB model though and configuration fails.
Yast reports an error and demsg shows:


 8339.570631] usbcore: deregistering interface driver snd-usb-audio
 8343.074626] Lockdown: y2start: /dev/mem,kmem,port is restricted; see man kernel_lockdown.7
 8343.074647] Lockdown: y2start: /dev/mem,kmem,port is restricted; see man kernel_lockdown.7
 8343.077409] Lockdown: y2start: /dev/mem,kmem,port is restricted; see man kernel_lockdown.7
 8380.829627] usb 3-1.1.3: 3:1: cannot get freq at ep 0x84
 8381.083491] usbcore: registered new interface driver snd-usb-audio

When I try to configure the soundcard from Yast (Sunrise Point-LP HD Audio), i get in dmesg:


 8616.104643] snd_soc_skl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380
 8616.113478] snd_soc_skl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915>
[ 8616.145280] HDMI HDA Codec ehdaudio0D2**: Max dais supported: 3**
 8616.146322] snd_soc_skl 0000:00:1f.3**: Direct firmware load for 9d71-INTEL-EDK2-2-tplg.bin failed **>
 8616.146324] snd_soc_skl 0000:00:1f.3: tplg fw 9d71-INTEL-EDK2-2-tplg.bin load failed with -2, fal>
 8616.146330] snd_soc_skl 0000:00:1f.3**: Direct firmware load for dfw_sst.bin failed with error -2**
 8616.146331] snd_soc_skl 0000:00:1f.3: Fallback tplg fw dfw_sst.bin load failed with -2
 8616.146332] snd_soc_skl 0000:00:1f.3: Failed to init topology!
 8616.146332] snd_soc_skl 0000:00:1f.3: ASoC: failed to probe component -2
 8616.146342] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: failed to instantiate card -2
 8616.146351] skl_hda_dsp_generic**: probe of skl_hda_dsp_generic failed with error -2
**

Thanks in advance.

Searching on “9d71-INTEL-EDK2-2-tplg.bin” did point me to https://askubuntu.com/questions/1218058/ubuntu-19-10-audio-driver-issue

Have a look under “Update 2:” and please report if that is working for you.

I know this thread. Unfortunately, this is not a solution for me as I need the microphone more than the speaker. It used to work, so there should be a way to configure it again.

I thought that I had found a solution by configuring an additional soundcard as generic which would capture the USB-audio from the docking station. Everything worked, except that microsoft teams wouldn’t seen any soundcard. I believe this might be connected with the initial failure of pulseaudio to start which I will investigate next.

The culprit for the failed pulseaudio startup on login seems to be

E: [pulseaudio] module-udev-detect.c: inotify_init1() failed: Zu viele offene Dateien
E: [pulseaudio] module.c: Failed to load module "module-udev-detect" (argument: ""): initialization failed.

as shown in the logs above. This prevents pulseaudio from finding the devices and somehow leads to a failure of the systemd service. Starting manually later solves this issue (with pulseaudio --start, although /usr/bin/pulseaudio -v --daemonize=no still fails most of the time). Maybe there is open file congestion on login?

The state so far is that adding another Generic/USB sound card in Yast leads to a seemingly stable detection of sound cards in alsamixer. Manually starting pulseaudio recovers sound for most applications. One problematic application is MS teams which does not detect camera/sound. This used to work as well but seems unrelated.

Thanks for the help so far. Still further input is appreciated.

I just realized that pipewire got installed as a dependency of Firefox/Thunderbird. This look like a plausible explanation of the problem. Pipewire service is running, pulseaudio failed. How can I get rid of pipewire withouth deinstalling Firefox/Thunderbird?

Show

systemctl --user status pipewire.service
systemctl --user status pipewire.socket

Usually only socket activation is employed and it can be inhibited if necessary.

This may be of value to you
https://en.opensuse.org/openSUSE:Pipewire

Try default kernel, not preempt.

I have in some games noises/lag in newer OpenSUSE Tumbleweed systems. I thought it was made by piperwire, because it lately being delivered by default, but I checked and pulseaudio working.

Pipewire does not seem to be part of the problem. For now, I can reliably bring up sound when a generic USB sound card is configured (for the docking station). The Realtek sound card is showing as unconfigured and will raise an error when trying to configure. It will still work. I think, it is only the DSP part that is affected.
I still have problems to get sound working though, but it is not a hardware/driver issue. Pulseaudio fails due to not detecting the sound card which in turn is caused by the udev system hitting a limit in the inotify system. Some processes during login seem to consume a lot of inotify file handles. I use inotifywait in several of my private systemd services, which I have to investigate. One disadvantage of systemd is the lack of clear place to access logs of the login process. If I find the culprit, I will report back.
For now, after login, I do


pkill inotify
pulseaudio --start

This recovers audio/camera for most applications (teams is an exception, you can switch to the web based teams service).

Thanks for all the input.