Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 821163 - media-sound/pulseaudio-15.0-r1: No sound after upgrade from pulseaudio-13.0-r1
Summary: media-sound/pulseaudio-15.0-r1: No sound after upgrade from pulseaudio-13.0-r1
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-01 07:36 UTC by Jean-Claude Repetto
Modified: 2021-11-03 08:03 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
pulse audio logs (palogs.tar.gz,64.44 KB, application/gzip)
2021-11-02 17:49 UTC, Jean-Claude Repetto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Claude Repetto 2021-11-01 07:36:47 UTC
After upgrading pulseaudio to 15.0-r1, audio no longer works.

After searching the Internet, I found a similar bug on Arch:
https://bugs.archlinux.org/task/71709

The workaround proposed for Arch also works for me: after executing 'alsactl restore', audio is back.

More information:

- The speakers are connected to analog output of the sound card. 

- Output of 'emerge -pv pulseaudio':
[ebuild   R    ] media-sound/pulseaudio-15.0-r1::gentoo  USE="X alsa alsa-plugin asyncns (daemon) dbus elogind gdbm glib gtk orc ssl tcpd udev webrtc-aec -bluetooth -doc -equalizer -gstreamer -ipv6 -jack -lirc -native-headset -ofono-headset (-oss) (-selinux) -sox (-system-wide) -systemd -test -zeroconf" ABI_X86="(64) -32 (-x32)" 0 KiB


- ALSA information is available at:
  http://alsa-project.org/db/?f=e4d4218cb323da6ccf4e13cbc40e61830b2c8fcc

- ALSA version:
   media-sound/alsa-utils-1.2.4
   media-plugins/alsa-plugins-1.2.2
   media-libs/alsa-lib-1.2.5.1

- 'alsactl restore' messages:
alsactl: state_lock:125: file /var/lib/alsa/asound.state lock error: File exists
alsactl: load_state:1683: Cannot open /var/lib/alsa/asound.state for reading: File exists
alsa-lib /var/tmp/portage/media-libs/alsa-lib-1.2.5.1/work/alsa-lib-1.2.5.1/src/ucm/main.c:1405:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2
Found hardware: "VirMIDI" "" "" "" ""
Hardware is initialized using a generic method
alsa-lib /var/tmp/portage/media-libs/alsa-lib-1.2.5.1/work/alsa-lib-1.2.5.1/src/ucm/ucm_subs.c:186:(rval_card_id_by_name) ${CardIdByName} substitution is obsolete - use ${find-card}!
alsa-lib /var/tmp/portage/media-libs/alsa-lib-1.2.5.1/work/alsa-lib-1.2.5.1/src/ucm/parser.c:242:(error_node) UCM is not supported for this HDA model (HDA Intel PCH at 0xf7510000 irq 33)
alsa-lib /var/tmp/portage/media-libs/alsa-lib-1.2.5.1/work/alsa-lib-1.2.5.1/src/ucm/main.c:1405:(snd_use_case_mgr_open) error: failed to import hw:1 use case configuration -6
Found hardware: "HDA-Intel" "Realtek ALC892" "HDA:10ec0892,18498892,00100302 HDA:80862806,80860101,00100000" "0x1849" "0x8892"
Hardware is initialized using a generic method


- Result of pacmd dump:
### Configuration dump generated at Mon Nov  1 08:06:07 2021

load-module module-device-restore
load-module module-stream-restore
load-module module-card-restore
load-module module-augment-properties
load-module module-switch-on-port-available
load-module module-udev-detect
load-module 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"
load-module module-native-protocol-unix
load-module module-gsettings
load-module module-default-device-restore
load-module module-always-sink
load-module module-intended-roles
load-module module-suspend-on-idle
load-module module-console-kit
load-module module-systemd-login
load-module module-position-event-sounds
load-module module-role-cork
load-module module-filter-heuristics
load-module module-filter-apply
load-module module-x11-publish display=:0 xauthority=/home/jcr/.Xauthority
load-module module-x11-cork-request display=:0 xauthority=/home/jcr/.Xauthority
load-module module-x11-xsmp display=:0 xauthority=/home/jcr/.Xauthority session_manager=local/gelas:@/tmp/.ICE-unix/2326,unix/gelas:/tmp/.ICE-unix/2326
load-module module-cli-protocol-unix

set-sink-volume alsa_output.pci-0000_00_1b.0.analog-stereo 0x76d3
set-sink-mute alsa_output.pci-0000_00_1b.0.analog-stereo no
suspend-sink alsa_output.pci-0000_00_1b.0.analog-stereo yes

set-source-volume alsa_output.pci-0000_00_1b.0.analog-stereo.monitor 0x10000
set-source-mute alsa_output.pci-0000_00_1b.0.analog-stereo.monitor no
suspend-source alsa_output.pci-0000_00_1b.0.analog-stereo.monitor yes
set-source-volume alsa_input.pci-0000_00_1b.0.analog-stereo 0x3b8f
set-source-mute alsa_input.pci-0000_00_1b.0.analog-stereo no
suspend-source alsa_input.pci-0000_00_1b.0.analog-stereo yes

set-card-profile alsa_card.pci-0000_00_1b.0 output:analog-stereo+input:analog-stereo

set-default-sink alsa_output.pci-0000_00_1b.0.analog-stereo
set-default-source alsa_input.pci-0000_00_1b.0.analog-stereo

### EOF



Reproducible: Always
Comment 1 Igor V. Kovalenko 2021-11-01 17:28:13 UTC
I can think of only one reason why volume and mute states were not restored by pulseaudio: alsa names changed for sinks and/or sources. This could happen for multiple reasons, one of which is the change in UCM handling - but your does not use UCM. If you still have log from pulseaudio daemon before you applied 'alsactl restore' there should be a hint at what was happening, look for "Restoring volume" and "Restoring mute state" lines.

Please also check if you have pipewire-pulse running, as running both daemons simultaneously will definitely lead to surprising volume handling.
Comment 2 Jean-Claude Repetto 2021-11-01 17:57:47 UTC
I have found some messages from pulseaudio in syslog:

Nov  1 17:38:11 localhost pulseaudio[2384]: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
Nov  1 17:38:11 localhost pulseaudio[2384]: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="0" name="platform-snd_virmidi.0" card_name="alsa_card.platform-snd_virmidi.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""): initialization failed.
Nov  1 17:38:11 localhost pulseaudio[2384]: [pulseaudio] cli-command.c: stat('/etc/pulse/default.pa.d'): No such file or directory
Nov  1 17:38:11 localhost pulseaudio[2431]: [pulseaudio] pid.c: Daemon already running.

pipewire is not installed.
Comment 3 Igor V. Kovalenko 2021-11-01 21:12:00 UTC
This one about `Failed to find a working profile` followed by message about `platform-snd_virmidi.0` looks like failure to find a working profile due to missing or non-functional alsa driver. This *might* be a change with pulseaudio-15.0 where 13.0 won't see UCM for this device. Usually this is fixed by adding corresponding kernel module; you can verify this part by adding 'use_ucm=0' to 'load-module module-udev-detect' in default.pa effectively disabling UCM for a test.

This alone won't stop other audio devices from functioning though.

Another way to see what's happening may be to collect debug logs from both 13.0 and 15.0 and compare them.

BTW did you checked if volumes are not muted in pavucontrol tool? Check them in 'Output Devices' tab.
Comment 4 Jean-Claude Repetto 2021-11-01 22:11:42 UTC
Here are the messages displayed by pulseaudio-13.0:

Nov  1 23:06:37 localhost pulseaudio[2384]: [pulseaudio] main.c: Compiled with DEPRECATED libsamplerate support!
Nov  1 23:06:37 localhost pulseaudio[2384]: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
Nov  1 23:06:37 localhost pulseaudio[2384]: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="0" name="platform-snd_virmidi.0" card_name="alsa_card.platform-snd_virmidi.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""): initialization failed.
Nov  1 23:06:37 localhost pulseaudio[2447]: [pulseaudio] main.c: Compiled with DEPRECATED libsamplerate support!
Nov  1 23:06:37 localhost pulseaudio[2447]: [pulseaudio] pid.c: Daemon already running.

In pavucontrol, the volumes are not muted.
Comment 5 Igor V. Kovalenko 2021-11-02 17:04:57 UTC
OK the error about "platform-snd_virmidi.0" is the same with older version so is likely unrelated.

Next steps would be
1. collect pa-info from both 15.0 and 13.0, these can be used to compare environment and configuration of all related components
2. disable pulseaudio autospawning (uncomment and set autospawn = no in /etc/pulse/client.conf)
   stop pulseaudio (pulseaudio -k should work)
   run pulseaudio collecting full verbose log (pulseaudio -vvvvv > /tmp/pulse-verbose.log)
   try playing audio for a few moments
   stop pulseaudio (ctrl+C should work)
3. ideally repeat step 2 with pulseaudio-13.0 so daemon logs can be compared
Comment 6 Jean-Claude Repetto 2021-11-02 17:49:08 UTC
Created attachment 748089 [details]
pulse audio logs

This file contains the pa-info results and the verbose logs for 13.0 and 15.0:
pa-info_13.txt
pa-info_15.txt
pulse-verbose-13.log
pulse-verbose-15.log
Comment 7 Igor V. Kovalenko 2021-11-03 07:08:38 UTC
Thanks for the logs, I see 15.0 finds more devices but handles headphones output differently: this is in pulse-verbose-15.log line 653 where 'Front' switch=2 (means unconditionally OFF) but in pulse-verbose-13.log it is Front switch=1 (means follow MUTE state)

It looks very much like with 15.0 you need to switch output port to Headphones e.g. in pavucontrol 'Output Devices' tab. Ususally that should have happened automatically but on your hardware alsa-lib does not report that jack detection works.

If this still does not help, please raise an issue upstream https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/ and attach your logs there.

Please also update your alsa-ucm-conf to 1.2.5.1 (there are a few obsolete items there which show up in the log.)
Comment 8 Jean-Claude Repetto 2021-11-03 08:03:50 UTC
Problem solved: in pavucontrol, I have switched the output to "Line Out" instead of "Headphones", and now it works, even after a reboot.
Many thanks to you for your help.