I have my system updated to
5.15.25-hardened1-1-hardened
kernel. Since then I am not able to hear any audio using any application:
mpv, browser
etc., However, booting
linux 5.16.10.artix1-1
doesn't have any problem. Could anyone shed some light how to troubleshoot/fix this issue? or this is a bug?
Many thanks in advance.
I'd start by comparing the dmesg output from 5.15.25-hardened1-1-hardened vs linux 5.16.10.artix1-1
Well, for starters, what are the audio devices permissions under /dev in -hardened?
I see no difference, except the order of booting, from the dmesg output. The outputs are given below for references.
Linux-5.15.25-hardened
[ 16.446989] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC3202: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker
[ 16.446997] snd_hda_codec_realtek hdaudioC0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ 16.447000] snd_hda_codec_realtek hdaudioC0D0: hp_outs=2 (0x15/0x1b/0x0/0x0/0x0)
[ 16.447003] snd_hda_codec_realtek hdaudioC0D0: mono: mono_out=0x0
[ 16.447005] snd_hda_codec_realtek hdaudioC0D0: inputs:
[ 16.447007] snd_hda_codec_realtek hdaudioC0D0: Mic=0x18
[ 16.447010] snd_hda_codec_realtek hdaudioC0D0: Dock Mic=0x19
[ 16.447012] snd_hda_codec_realtek hdaudioC0D0: Internal Mic=0x12
[ 16.474170] usb 1-1.6: Found UVC 1.00 device Integrated Camera (04f2:b2db)
[ 16.479767] intel_rapl_common: Found RAPL domain package
[ 16.479771] intel_rapl_common: Found RAPL domain core
[ 16.479772] intel_rapl_common: Found RAPL domain uncore
[ 16.479779] intel_rapl_common: RAPL package-0 domain package locked by BIOS
[ 16.482057] input: HDA Intel PCH Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input10
[ 16.482142] input: HDA Intel PCH Dock Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input11
[ 16.483571] input: HDA Intel PCH Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input12
[ 16.483685] input: HDA Intel PCH Dock Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input13
Linux-5.16.10
[ 14.797255] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC3202: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker
[ 14.797268] snd_hda_codec_realtek hdaudioC0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ 14.797273] snd_hda_codec_realtek hdaudioC0D0: hp_outs=2 (0x15/0x1b/0x0/0x0/0x0)
[ 14.797277] snd_hda_codec_realtek hdaudioC0D0: mono: mono_out=0x0
[ 14.797279] snd_hda_codec_realtek hdaudioC0D0: inputs:
[ 14.797282] snd_hda_codec_realtek hdaudioC0D0: Mic=0x18
[ 14.797285] snd_hda_codec_realtek hdaudioC0D0: Dock Mic=0x19
[ 14.797288] snd_hda_codec_realtek hdaudioC0D0: Internal Mic=0x12
[ 14.811342] input: HDA Intel PCH Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input11
[ 14.811528] input: HDA Intel PCH Dock Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input12
[ 14.811593] input: HDA Intel PCH Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input13
[ 14.811688] input: HDA Intel PCH Dock Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input14
I have also observed the system's responsiveness has slowed after the latest kernel upgrade. Meaning, application start times and boot times have increased for both the kernels: Linux-5.15.25 and Linux-5.16.10. I am still facing the issue.
To be honest my advice would be to go back to using the regular artix kernel where things worked.
Just to keep things simple.
I've been using Linux a long time and avoid such things as hardened kernels, selinux and apparmor, as they can cause problems I can do without, and I'm content with the security of my single user home system. Over 20 years, no malware, no viruses, no intrusions, AFAICT.
I can't reproduce, I have sound when using mpv or my browser and you provide no log/error.
Are you sure it isn't an audio server error?
No error or anything. The sound just doesn't work. It happens with firefox (youtube) and mpv. It is most likely with the kernels as the sound just works fine with Linux-5.16.10 (standard full kernel).
If there is an error, mpv would output it. You can try to collect its stdout and stderr to a file:
mpv some_file.ogg >mpv.log 2>&1
Also check if the volume is set to some sane value (not zero) and is not muted.
(+) Audio --aid=1 (mp3 2ch 44100Hz)
AO: [pulse] 44100Hz stereo 2ch float
A: 00:00:33 / 00:00:33 (99%)
Exiting... (End of file)
No error while running mpv.
Sound channels are not muted.
~~> amixer
Simple mixer control 'Master',0
Capabilities: pvolume pswitch pswitch-joined
Playback channels: Front Left - Front Right
Limits: Playback 0 - 65536
Mono:
Front Left: Playback 47677 [73%] [on]
Front Right: Playback 47677 [73%] [on]
Can you try playing some audio and during that, post output of:
sudo fuser -v /dev/snd/*
Also provide the output of
alsactl init
and try playing some audio after that.
This one outputs nothing while I am playing an mp3 file.
No difference after initiating.
Any help would be much appreciated.
You still have the issue with the latest hardened kernel?
I have a similar problem. I just installed
linux 5.16.1-artix1-1
And sound isn't working, just as for artik.
Attempting to run alsafixer gives the errors:
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib control.c:1528:(snd_ctl_open_noupdate) Invalid CTL default
cannot open mixer: No such file or directory
Also
aplay -l
gives
aplay: device_list:274: no soundcards found...
And
sudo dmesg | grep -iE 'snd|sof'
gives
[ 0.199512] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]>
[ 0.235249] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[ 0.235249] software IO TLB: mapped [mem 0x000000003acb2000-0x000000003ecb2000] (64MB)
[ 2.446415] snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[ 2.446493] snd_hda_intel 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
[ 2.871744] sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[ 2.871764] sof-audio-pci-intel-tgl 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
[ 2.871777] sof-audio-pci-intel-tgl 0000:00:1f.3: enabling device (0000 -> 0002)
[ 2.871949] sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[ 2.872018] sof-audio-pci-intel-tgl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 2.878266] sof-audio-pci-intel-tgl 0000:00:1f.3: use msi interrupt mode
[ 2.931224] sof-audio-pci-intel-tgl 0000:00:1f.3: hda codecs found, mask 5
[ 2.931227] sof-audio-pci-intel-tgl 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[ 2.931231] sof-audio-pci-intel-tgl 0000:00:1f.3: DMICs detected in NHLT tables: 2
[ 2.931251] sof-audio-pci-intel-tgl 0000:00:1f.3: Direct firmware load for intel/sof/sof-tgl.ri failed with error -2
[ 2.931252] sof-audio-pci-intel-tgl 0000:00:1f.3: error: sof firmware file is missing, you might need to
[ 2.931253] sof-audio-pci-intel-tgl 0000:00:1f.3: download it from https://github.com/thesofproject/sof-bin/
[ 2.931253] sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to load DSP firmware -2
[ 2.931502] sof-audio-pci-intel-tgl 0000:00:1f.3: error: sof_probe_work failed err: -2
Current version of
system/linux is 5.16.14.artix1-1. Update.
Just updated. Audio still doesn't work.
It is another problem, install sof-firmware
Thanks, that fixed it.
Any help for linux-hardened 5.15.27.hardened1-1?
Honestly I have no clue, I can't reproduce and we have no error to tell us what is happening
Honestly, I don't have any error stack to share and simply sound doesn't work with hardened and lts. I have tried the suggestions given before in this thread, however to no avail. I am going to wait for the next update before I stick only with the standard kernel. Fingers crossed.
Can you please provide this?
drwxr-xr-x 3 root root 180 Mar 19 17:43 snd/
Files under this directory
~~> ls -ltr
total 0
crw-rw----+ 1 root audio 116, 1 Mar 19 17:43 seq
crw-rw----+ 1 root audio 116, 33 Mar 19 17:43 timer
crw-rw----+ 1 root audio 116, 4 Mar 19 17:43 hwC0D0
crw-rw----+ 1 root audio 116, 5 Mar 19 17:43 controlC0
drwxr-xr-x 2 root root 60 Mar 19 17:43 by-path/
crw-rw----+ 1 root audio 116, 2 Mar 19 17:48 pcmC0D0p
crw-rw----+ 1 root audio 116, 3 Mar 19 17:48 pcmC0D0c
Is your user in "audio" group? Execute as regular user:
groups $(whoami) | grep audio || echo Not in audio group
if not, add it (as root, substitute username of your regular user instead of "your_username"):
usermod -aG audio your_username
Also, what is the output of (as root):
dmesg -l err
and
dmesg | grep -Ei '(sound|audio)'
Edit: Also try (needs
strace installed):
strace mpv /path/to/some/audio_file.ogg 2>mpv.strace
where
/path/to/some/audio_file.ogg is the pathname to any audio file, not necessarily in Ogg format. Then post output of:
grep -E '(snd|sound)' mpv.strace
Thanks a lot mate. After the latest update now sound is working fine. Greatly appreciated your help