Artix Linux Forum

Artix Linux => System => Topic started by: artik on 28 February 2022, 05:30:29

Title: No audio after upgrading to 5.15.25-hardened1-1-hardened
Post by: artik on 28 February 2022, 05:30:29
I have my system updated to
Code: [Select]
5.15.25-hardened1-1-hardened
kernel. Since then I am not able to hear any audio using any application:
Code: [Select]
mpv, browser
etc., However, booting
Code: [Select]
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.
Title: Re: No audio after upgrading to 5.15.25-hardened1-1-hardened
Post by: gripped on 28 February 2022, 11:53:58
Could anyone shed some light how to troubleshoot/fix this issue? or this is a bug?

I'd start by comparing the dmesg output from 5.15.25-hardened1-1-hardened vs linux 5.16.10.artix1-1
Title: Re: No audio after upgrading to 5.15.25-hardened1-1-hardened
Post by: nous on 28 February 2022, 20:37:24
Well, for starters, what are the audio devices permissions under /dev in -hardened?
Title: Re: No audio after upgrading to 5.15.25-hardened1-1-hardened
Post by: artik on 01 March 2022, 05:00:46
I'd start by comparing the dmesg output from 5.15.25-hardened1-1-hardened vs linux 5.16.10.artix1-1


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
Code: [Select]
[   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
Code: [Select]
[   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.
Title: Re: No audio after upgrading to 5.15.25-hardened1-1-hardened
Post by: gripped on 01 March 2022, 08:42:35
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.

Title: Re: No audio after upgrading to 5.15.25-hardened1-1-hardened
Post by: qontinuum on 03 March 2022, 12:51:50
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?
Title: Re: No audio after upgrading to 5.15.25-hardened1-1-hardened
Post by: artik on 04 March 2022, 04:32:19
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).
Title: Re: No audio after upgrading to 5.15.25-hardened1-1-hardened
Post by: strajder on 04 March 2022, 14:17:50
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:
Code: [Select]
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.
Title: Re: No audio after upgrading to 5.15.25-hardened1-1-hardened
Post by: artik on 06 March 2022, 14:23:22
If there is an error, mpv would output it. You can try to collect its stdout and stderr to a file:
Code: [Select]
mpv some_file.ogg >mpv.log 2>&1

Code: [Select]
 (+) 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.
Quote
Also check if the volume is set to some sane value (not zero) and is not muted.

Sound channels are not muted.
Code: [Select]
~~> 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]
Title: Re: No audio after upgrading to 5.15.25-hardened1-1-hardened
Post by: strajder on 06 March 2022, 15:29:54
Can you try playing some audio and during that, post output of:
Code: [Select]
sudo fuser -v /dev/snd/*
Also provide the output of
Code: [Select]
alsactl init
and try playing some audio after that.
Title: Re: No audio after upgrading to 5.15.25-hardened1-1-hardened
Post by: artik on 11 March 2022, 03:50:53
Can you try playing some audio and during that, post output of:
Code: [Select]
sudo fuser -v /dev/snd/*
This one outputs nothing while I am playing an mp3 file.
Quote
Also provide the output of
Code: [Select]
alsactl init
and try playing some audio after that.
No difference after initiating.

Any help would be much appreciated.
Title: Re: No audio after upgrading to 5.15.25-hardened1-1-hardened
Post by: qontinuum on 11 March 2022, 10:50:04
You still have the issue with the latest hardened kernel?
Title: Re: No audio after upgrading to 5.15.25-hardened1-1-hardened
Post by: artik on 12 March 2022, 13:57:33
You still have the issue with the latest hardened kernel?

Yes. I Do.
Title: Re: No audio after upgrading to 5.15.25-hardened1-1-hardened
Post by: Eugine_Nier on 12 March 2022, 22:48:03
I have a similar problem.  I just installed

Code: [Select]
linux 5.16.1-artix1-1

And sound isn't working, just as for artik.

Attempting to run alsafixer gives the errors:

Code: [Select]
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
Code: [Select]
aplay -l
gives
Code: [Select]
aplay: device_list:274: no soundcards found...

And
Code: [Select]
sudo dmesg | grep -iE 'snd|sof'
gives
Code: [Select]
[    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
Title: Re: No audio after upgrading to 5.15.25-hardened1-1-hardened
Post by: strajder on 12 March 2022, 23:22:32
Current version of system/linux is 5.16.14.artix1-1. Update.
Title: Re: No audio after upgrading to 5.15.25-hardened1-1-hardened
Post by: Eugine_Nier on 12 March 2022, 23:49:26
Just updated.  Audio still doesn't work.
Title: Re: No audio after upgrading to 5.15.25-hardened1-1-hardened
Post by: qontinuum on 13 March 2022, 18:16:19
It is another problem, install sof-firmware
Title: Re: No audio after upgrading to 5.15.25-hardened1-1-hardened
Post by: Eugine_Nier on 16 March 2022, 05:41:57
Thanks, that fixed it.
Title: Re: No audio after upgrading to 5.15.25-hardened1-1-hardened
Post by: artik on 17 March 2022, 04:59:05
It is another problem, install sof-firmware

Any help for linux-hardened 5.15.27.hardened1-1?
Title: Re: No audio after upgrading to 5.15.25-hardened1-1-hardened
Post by: qontinuum on 17 March 2022, 09:56:11
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
Title: Re: No audio after upgrading to 5.15.25-hardened1-1-hardened
Post by: artik on 18 March 2022, 13:46:11
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.
Title: Re: No audio after upgrading to 5.15.25-hardened1-1-hardened
Post by: strajder on 18 March 2022, 16:26:50
Can you please provide this?
Well, for starters, what are the audio devices permissions under /dev
Title: Re: No audio after upgrading to 5.15.25-hardened1-1-hardened
Post by: artik on 19 March 2022, 13:50:17

Code: [Select]
drwxr-xr-x  3 root     root         180 Mar 19 17:43 snd/

Files under this directory

Code: [Select]
~~> 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
Title: Re: No audio after upgrading to 5.15.25-hardened1-1-hardened
Post by: strajder on 26 March 2022, 15:19:21
Is your user in "audio" group? Execute as regular user:
Code: [Select]
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"):
Code: [Select]
usermod -aG audio your_username

Also, what is the output of (as root):
Code: [Select]
dmesg -l err
and
Code: [Select]
dmesg | grep -Ei '(sound|audio)'

Edit: Also try (needs strace installed):
Code: [Select]
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:
Code: [Select]
grep -E '(snd|sound)' mpv.strace
Title: Re: No audio after upgrading to 5.15.25-hardened1-1-hardened
Post by: artik on 07 April 2022, 08:54:20
Is your user in "audio" group? Execute as regular user:
Code: [Select]
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"):
Code: [Select]
usermod -aG audio your_username

Also, what is the output of (as root):
Code: [Select]
dmesg -l err
and
Code: [Select]
dmesg | grep -Ei '(sound|audio)'

Edit: Also try (needs strace installed):
Code: [Select]
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:
Code: [Select]
grep -E '(snd|sound)' mpv.strace

Thanks a lot mate. After the latest update now sound is working fine. Greatly appreciated your help