Hi there,
I have a weird problem on my Lenovo P14s laptop. Before I applied a world upgrade (based on August 22 state portage), the internal speaker of the laptop worked fine, but now its all silent, although all mixer levels are 100% and no channel is muted.
Observed facts:
* Connecting a HDMI tv-set produces sound over the tv-set properly
* Booting Win10: Internal speakers working fine --> no hw issue
* Connecting headphone via audio jack under linux - no sound.
* Reverting to backup makes sound work again --> config/sw problem
introduced by update
* In plasma's system settings/audio tray, the Speaker output device is not shown -- only 3xHDMI (The analog speaker seems to have gone)
The kernel is exactly the same as before the upgrade, didn't recompile it (sys-kernel/gentoo-sources-5.12.0) --> no kernel issue
Any further ideas?
Thanks, Alex
On Monday, 30 August 2021 11:30:38 BST Alexander Puchmayr wrote:
Hi there,
I have a weird problem on my Lenovo P14s laptop. Before I applied a world upgrade (based on August 22 state portage), the internal speaker of the laptop worked fine, but now its all silent, although all mixer levels are 100% and no channel is muted.
There was a recent move to pipewire which could have jumbled audio devices around for you - but I am not familiar with how pipewire works, or why it would have caused this problem.
https://wiki.gentoo.org/wiki/PipeWire
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA ATI HDMI], device 3: Generic Digital [Generic Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 0: CX20757 Analog [CX20757
Analog] Subdevices: 1/1
Subdevice #0: subdevice #0
Alternatively, take a look at this method of controlling the order in which audio modules are loaded: https://wiki.gentoo.org/wiki/ALSA#Laptops_with_HDMI_audio_output
Am Montag, 30. August 2021, 13:30:03 CEST schrieb Michael:
There was a recent move to pipewire which could have jumbled audio devices around for you - but I am not familiar with how pipewire works, or why it would have caused this problem.
https://wiki.gentoo.org/wiki/PipeWire
I did not install pipewire, so we can exclude this.
Here is output of aplay -l:
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 0: Generic [HD-Audio Generic], device 7: HDMI 1 [HDMI 1]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 0: Generic [HD-Audio Generic], device 8: HDMI 2 [HDMI 2]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 1: Generic_1 [HD-Audio Generic], device 0: ALC257 Analog [ALC257
Analog] Subdevices: 1/1
Subdevice #0: subdevice #0
card 3: Headset [Logitech USB Headset], device 0: USB Audio [USB Audio]
Subdevices: 0/1
Subdevice #0: subdevice #0
I added an old USB headset for testing, and *this* card (card 3) is shown in pavcontrol and kde-plasma audio settings, along with the three sub-devices
of card 0; however, card 1 is not shown. In alsamixer and aplay I can see
the device as "Generic_1", and -- after finding out the pcm name of it via aplay -L -- I could play some wav file with aplay on it:
aplay -D front:CARD=Generic_1,DEV=0 some_wav_file.wav
It seems to be a pulseaudio problem, which seems to arbitrarily ignoring Generic_1 card.
Alternatively, take a look at this method of controlling the order in
which
audio modules are loaded: https://wiki.gentoo.org/wiki/ALSA#Laptops_with_HDMI_audio_output
Thanks for the link, brought me to inspect /etc/modprobe.d/alsa.conf. Corrected the number of sound cards there, but did not help :-(
I remember to have edited this file about 10 years ago, not sure if those settings are still relevant.
Cheers, Alex
If the alsa drivers are not compiled as modules, the above file would not have any effect. Anyway, let's try this in /etc/asound.conf:
defaults.pcm.card 1
defaults.pcm.device 0
defaults.ctl.card 1
On a reboot your Generic_1 analogue card should be available and recognised as the default audio device. You may need to unmute it, via pactl or kmix.
Am Dienstag, 31. August 2021, 00:18:43 CEST schrieb Michael:
If the alsa drivers are not compiled as modules, the above file would not have any effect. Anyway, let's try this in /etc/asound.conf:
defaults.pcm.card 1
defaults.pcm.device 0
defaults.ctl.card 1
On a reboot your Generic_1 analogue card should be available and
recognised
as the default audio device. You may need to unmute it, via pactl or
kmix.
Sorry, didn't change anything.
I doubt that the problem is wrong default settings of alsa.
I run pulseaudio -vvv and the output was interesting:
Pci0000:00/0000:00:08.1/0000:07:00.1/sound/card0
and
pci0000:00/0000:00:08.1/0000:07:00.6/sound/card1
Where the latter one is the one that is not used by pulseaudio.
Both report "UCM available for card HD-Audio Generic"
Note: the card name "HD-Audio Generic" is identical, and this is reported by alsa-libs, as far as I could see from the code.
[...]
Alsa-info.sh reveals further info:
!!Soundcards recognised by ALSA
!!-----------------------------
0 [Generic ]: HDA-Intel - HD-Audio Generic
HD-Audio Generic at 0xfd3c8000 irq 91
1 [Generic_1 ]: HDA-Intel - HD-Audio Generic
HD-Audio Generic at 0xfd3c0000 irq 92
2 [acp ]: acp - acp
acp
To me it looks like as if pulseaudio is quering card0, getting the name "HD- Audio Generic", finding the HDMI channels; then it tries to read card1,
gets also "HD-Audio Generic" as name and hence the same channels as for card0.
I have no idea how to fix this.
Cheers
Alex
On Tuesday, 31 August 2021 12:08:04 BST Alexander Puchmayr wrote:
Am Dienstag, 31. August 2021, 00:18:43 CEST schrieb Michael:
If the alsa drivers are not compiled as modules, the above file would
not
have any effect. Anyway, let's try this in /etc/asound.conf:
defaults.pcm.card 1
defaults.pcm.device 0
defaults.ctl.card 1
On a reboot your Generic_1 analogue card should be available and recognised
as the default audio device. You may need to unmute it, via pactl or kmix.
Sorry, didn't change anything.
I doubt that the problem is wrong default settings of alsa.
I run pulseaudio -vvv and the output was interesting:
Pci0000:00/0000:00:08.1/0000:07:00.1/sound/card0
and
pci0000:00/0000:00:08.1/0000:07:00.6/sound/card1
Where the latter one is the one that is not used by pulseaudio.
Both report "UCM available for card HD-Audio Generic"
Note: the card name "HD-Audio Generic" is identical, and this is reported by alsa-libs, as far as I could see from the code.
Your *card* names according to your 'aplay -l' output are/were:
card 0: Generic
card 1: Generic_1
card 3: Headset
You can re-check this with:
aplay -l | awk -F \: '/,/{print $2}' | awk '{print $1}' | uniq
Another way to discover all card name(s) including unused cards is by the output of:
cat /sys/class/sound/card*/id
The alsa-ucm function involves creating use case alsa mixer profiles,
similar to pulseaudio profiles and will work even without pulseaudio
running. If a UCM configuration file exists for a card, then pulseaudio will ignore built-in profiles and will generate a profile based on the UCM config file.
Take a look at:
/usr/share/alsa/ucm2/README.md
and for various mixer profiles look under /usr/share/alsa/ucm2/
However, my usage of pulseaudio has been cursory and don't know much about its auto-configuration. In any case, I suspect the alsa-ucm output is only relevant in highlighting the common codec name, as you confirm below.
[...]
Alsa-info.sh reveals further info:
!!Soundcards recognised by ALSA
!!-----------------------------
0 [Generic ]: HDA-Intel - HD-Audio Generic
HD-Audio Generic at 0xfd3c8000 irq 91
1 [Generic_1 ]: HDA-Intel - HD-Audio Generic
HD-Audio Generic at 0xfd3c0000 irq 92
2 [acp ]: acp - acp
acp
To me it looks like as if pulseaudio is quering card0, getting the name "HD- Audio Generic", finding the HDMI channels; then it tries to read card1, gets also "HD-Audio Generic" as name and hence the same channels
as for card0.
I have no idea how to fix this.
Cheers
Alex
As I understand it, "HD-Audio" is the kernel driver (CONFIG_SND_HDA=m) and "Generic" is the generic codec parser (CONFIG_SND_HDA_GENERIC=m) used by the snd-hda-intel module (CONFIG_SND_HDA_INTEL=m) - unless a specific model
codec is (also) configured for a card, e.g. in my case I have CONFIG_SND_HDA_CODEC_CONEXANT=m
If in your recent system update/upgrade you did not change your kernel, or the available options of any audio modules under /etc/modprobe.d/ then the drivers were always configured so and therefore the problem you experience now is unlikely to be caused by the generic codec parser.
Someone more knowledgeable in pulseaudio should chime in, assuming this problem is being caused by pulseaudio. :-/
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 58:03:48 |
Calls: | 6,652 |
Calls today: | 4 |
Files: | 12,200 |
Messages: | 5,331,127 |