Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Microphone is not detecting any sounds[solved]
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1607

PostPosted: Mon Jul 17, 2023 11:06 am    Post subject: Microphone is not detecting any sounds[solved] Reply with quote

Hi everyone,

I am using pulseaudio with teh following card:
Code:
00:1f.3 Audio device: Intel Corporation Alder Lake PCH-P High Definition Audio Controller (rev 01)


pulseaudio is started via the autospawn = yes command.
The microphone does not record any sound when I look in pavucontrol, it lists a 'HDA intel PCH Analog Stereo' but it is not detecting any sounds.
I tried using arecord but I get blank recordings as well(no sound in the recording):
Code:
adel@t14 ~ $ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC257 Analog [ALC257 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
adel@t14 ~ $ arecord test
Warning: Some sources (like microphones) may produce inaudible results
         with 8-bit sampling. Use '-f' argument to increase resolution
         e.g. '-f S16_LE'.
Recording WAVE 'test' : Unsigned 8 bit, Rate 8000 Hz, Mono
^CAborted by signal Interrupt...


any idea how I can get teh microphone to work? I assume it's detected by the kernel as it is showing up in arecord -l


Last edited by Adel Ahmed on Mon Aug 14, 2023 10:45 am; edited 1 time in total
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1698

PostPosted: Wed Jul 19, 2023 6:37 pm    Post subject: Reply with quote

Can you post your /etc/pulse/default.pa ?
_________________
Donate to Gentoo
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1607

PostPosted: Sun Jul 23, 2023 1:14 pm    Post subject: Reply with quote

here it is:
https://pastebin.com/537un37Z
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1698

PostPosted: Mon Jul 24, 2023 4:18 pm    Post subject: Reply with quote

Try using udev detect.
https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#module-udev-detect

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



To:
Code:
### 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

_________________
Donate to Gentoo
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1698

PostPosted: Mon Jul 24, 2023 4:29 pm    Post subject: Reply with quote

Also make sure you compiled pulseaudio with the udev USE flag set.
_________________
Donate to Gentoo
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1607

PostPosted: Tue Jul 25, 2023 6:30 am    Post subject: Reply with quote

I have recompiled pulseaudio-daemon with udev use flag and that automatically set the config file to use the module-udev-detect.so module, I no longer see devices under input devices!!

arecord can still record but there are no sounds
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1698

PostPosted: Tue Jul 25, 2023 1:54 pm    Post subject: Reply with quote

Is your system using OpenRC or Systemd?

Check that udev gave you access to the soundcard:
Code:
getfacl /dev/snd/controlC0 | grep -Eo "user:.+:" | cut -d: -f2

_________________
Donate to Gentoo
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1607

PostPosted: Wed Jul 26, 2023 8:35 am    Post subject: Reply with quote

I'm using systemd
do not think it gaave me access, but I just added my user to the audio group:
Code:
adel@t14 ~ $ id
uid=1000(adel) gid=1000(adel) groups=1000(adel),5(tty),10(wheel),18(audio),27(video),28(render),78(kvm),97(input),190(systemd-journal),250(portage)
t14 ~ # getfacl /dev/snd/controlC0
getfacl: Removing leading '/' from absolute path names
# file: dev/snd/controlC0
# owner: root
# group: audio
user::rw-
group::rw-
other::---
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1698

PostPosted: Wed Jul 26, 2023 5:44 pm    Post subject: Reply with quote

Ahh check out the wiki on pulseaudio
https://wiki.gentoo.org/wiki/PulseAudio#systemd
If I am not mistaken for systemd no one may be part of the audio group (not even even the user pulse).
From the wiki:
Remove any and all users from the audio group:
Code:
gpasswd -d <user> audio

_________________
Donate to Gentoo
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1607

PostPosted: Thu Jul 27, 2023 9:35 am    Post subject: Reply with quote

I have done that but now I have lost permission to use the sound.
I have systemd compiled with the acl use flag.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23091

PostPosted: Thu Jul 27, 2023 1:27 pm    Post subject: Reply with quote

If you are not the owner of the sound device (you are not), and you are not in the audio group (now you are not), and nothing set an ACL on the sound device (your getfacl output says nothing did), then loss of sound is expected. Assuming that logind was supposed to set an ACL, then the question is why it did not set one.
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1698

PostPosted: Thu Jul 27, 2023 1:56 pm    Post subject: Reply with quote

at least were getting somewhere, is this after a reboot?
You got it set in your kernel ?
Code:
grep 'TMPFS_POSIX_ACL' /usr/src/linux/.config

_________________
Donate to Gentoo
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1607

PostPosted: Sat Jul 29, 2023 5:02 pm    Post subject: Reply with quote

yeah I do:
Code:
t14 ~ # grep 'TMPFS_POSIX_ACL' /usr/src/linux/.config
CONFIG_TMPFS_POSIX_ACL=y
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1698

PostPosted: Sat Jul 29, 2023 6:06 pm    Post subject: Reply with quote

What about systemd? Is that compiled with ACL flag?
_________________
Donate to Gentoo
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1607

PostPosted: Sun Jul 30, 2023 1:04 pm    Post subject: Reply with quote

yeah I compiled it with the acl flag:
Code:
t14 /var/tmp/portage/x11-misc/xscreensaver-6.05-r2/work/xscreensaver-6.05 # emerge systemd -pv

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 0.72 s.

[ebuild   R    ] sys-apps/systemd-253.3-r1:0/2::gentoo  USE="acl kmod pam policykit (split-usr) -apparmor -audit -cgroup-hybrid -cryptsetup -curl -dns-over-tls -elfutils -fido2 -gcrypt -gnuefi -gnutls -homed -http -idn -importd -iptables -lz4 -lzma -openssl -pcre -pkcs11 -pwquality -qrcode -resolvconf -seccomp (-selinux) -sysv-utils -test -tpm -vanilla -xkb -zstd" ABI_X86="(64) -32 (-x32)" 0 KiB
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1607

PostPosted: Mon Jul 31, 2023 8:45 am    Post subject: Reply with quote

I'm not exactly sure what got the acl to work, but this reboot I noticed the sound card is working agian
Code:
t14 ~ # getfacl /dev/snd/controlC0
getfacl: Removing leading '/' from absolute path names
# file: dev/snd/controlC0
# owner: root
# group: audio
user::rw-
user:adel:rw-
group::rw-
mask::rw-
other::---


the microphone is still not detected in pavucontrol though
Back to top
View user's profile Send private message
nvaert1986
Tux's lil' helper
Tux's lil' helper


Joined: 05 May 2019
Posts: 124

PostPosted: Tue Aug 01, 2023 7:28 am    Post subject: Reply with quote

Try running alsamixer as user. Then by default it will show PulseAudio as device. Press F6 and switch to your actual sound card. Check if the mic has a MM in front of it (it means it's muted). Press M to remove the mute. Next turn up the volume a little bit by pressing the up arrow and see what that does. Sometimes PulseAudio does not detect devices properly, but just unmuting them in alsamixer resolves the issue. This happened to me several times.
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1607

PostPosted: Tue Aug 01, 2023 7:34 am    Post subject: Reply with quote

I noticed the fn+mute/unmute mic button does not work, the led does not switch on and off but maybe that is unrelated
there is no microphone, only mic boostand it's unmuted
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2695

PostPosted: Tue Aug 01, 2023 8:15 am    Post subject: Reply with quote

What laptop is that?

Best Regards,
Georgi
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1607

PostPosted: Tue Aug 01, 2023 10:06 am    Post subject: Reply with quote

it is a t14 model is 21AJS2C81M
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1698

PostPosted: Tue Aug 01, 2023 4:52 pm    Post subject: Reply with quote

Do you have any alsa files under /etc/modprobe.d
such as a /etc/modprobe.d/alsa.conf file?
If so can you post them?
_________________
Donate to Gentoo
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1698

PostPosted: Tue Aug 01, 2023 5:16 pm    Post subject: Reply with quote

Also run the alsa-info.sh from media-sound/alsa-utils
_________________
Donate to Gentoo
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1607

PostPosted: Tue Aug 01, 2023 6:39 pm    Post subject: Reply with quote

no I do not have amodprobe.d directory
here's the output of the command, I do not know what to make of this to be honest
Code:
adel@t14 ~/.config $ alsa-info.sh
ALSA Information Script v 0.5.1
--------------------------------

This script visits the following commands/files to collect diagnostic
information about your ALSA installation and sound related hardware.

  dmesg
  lspci
  aplay
  amixer
  alsactl
  rpm, dpkg
  /proc/asound/
  /sys/class/sound/
  ~/.asoundrc (etc.)

See '/usr/sbin/alsa-info.sh --help' for command line options.

/usr/sbin/alsa-info.sh: line 466: /proc/asound/modules: No such file or directory
cat: /tmp/alsa-info.fuky3KjXQN/alsamodules.tmp: No such file or directory
cat: /proc/asound/modules: No such file or directory
Newer version detected: 0.5.3
To view the ChangeLog, please visit https://www.alsa-project.org/alsa-info.sh.changelog
ALSA-Info script has been downloaded /tmp/alsa-info.4XeqNq2vHo.
Please, re-run it from new location.
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1698

PostPosted: Tue Aug 01, 2023 10:27 pm    Post subject: Reply with quote

Is your system all up to date? You also need to run the script as root.
The script usually will update itself, the current version is 0.5.3 and that is from May.
If you update alsa-utils that might also update the script.

I suspect you might need some kernel command line options for that sound chip.
_________________
Donate to Gentoo
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1698

PostPosted: Tue Aug 01, 2023 10:33 pm    Post subject: Reply with quote

Also post the output of:
Code:
grep -E 'RENOIR|CONFIG_SND_DEBUG' /usr/src/linux/.config


EDIT you may want to set debugging and recompile kernel at this time.
And RENOIR is related to AMD chipsets so never mind that.

Check out
https://docs.kernel.org/sound/hd-audio/models.html
Specifically the section where it lists 25x chips.

You might try options like
lenovo-hotkey
laptop-amic
dual-codecs
lenovo-eapd
_________________
Donate to Gentoo
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum