Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No sound and alsactl init errors after updating to 1.2.13 #283

Open
wastlnd opened this issue Nov 24, 2024 · 13 comments
Open

No sound and alsactl init errors after updating to 1.2.13 #283

wastlnd opened this issue Nov 24, 2024 · 13 comments

Comments

@wastlnd
Copy link

wastlnd commented Nov 24, 2024

I think I have kind of a regression after updating to the latest version. Running alsactl restore as a runit service, I have this error at startup:

Found hardware: "acp" "" "" "" ""
Hardware is initialized using a generic method

And I have no sound at all. I have tried to apply the latest commit fixing the udev rule, but it didn't work. Downgrading to 1.2.12 fixes the issue.
I am running an Arch based distro (kernel 6.6) on AMD Ryzen 7 5825U CPU with Radeon graphics. My soundcard is Realtek and I have an AMD microphone array. I don't run Pulseaudio or Pipewire, just plain ALSA.

@wastlnd wastlnd changed the title No sound and alsactl init errors after updating to 1.12.13 No sound and alsactl init errors after updating to 1.2.13 Nov 24, 2024
@perexg
Copy link
Member

perexg commented Nov 24, 2024

Could you attach 90-alsa-restore.rules file from 1.2.12 and 1.2.13 (with updates applied - f90124c and 6f7ce73) from your distro to check ?

EDIT: Also, please test, if you replace the mentioned file with 1.2.12 version in your distro for 1.2.13 package, if things are working correctly.

@wastlnd
Copy link
Author

wastlnd commented Nov 24, 2024

Thanks, these is the 90-alsa-restore.rules from 1.2.12:

ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", KERNELS!="card*", TEST=="/usr/bin", TEST=="/usr/share/alsa", GOTO="alsa_restore_go"
GOTO="alsa_restore_end"

LABEL="alsa_restore_go"
TEST!="/etc/alsa/state-daemon.conf", RUN+="/usr/bin/alsactl restore $devnode"
TEST=="/etc/alsa/state-daemon.conf", RUN+="/usr/bin/alsactl nrestore $devnode"

LABEL="alsa_restore_end"

And this is the same file from 1.2.13:

ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", KERNELS!="card*", TEST=="/usr/bin", TEST=="/usr/share/alsa", GOTO="alsa_restore_go"
GOTO="alsa_restore_end"

ENV{ALSA_CARD_NUMBER}="$attr{device/number}"

# mark HDA analog card; HDMI/DP card does not have capture devices
DRIVERS=="snd_hda_intel", TEST=="device/pcmC$env{ALSA_CARD_NUMBER}D0p", RUN+="/bin/sh -c 'echo ALSA_CARD_HDA_ANALOG=$env{ALSA_CARD_NUMBER} >> /run/udev/alsa-hda-analog-card'"

# check for ACP hardware
TEST=="device/device/acp3x-dmic-capture", GOTO="alsa_hda_analog"
TEST=="device/device/acp6x-dmic-capture", GOTO="alsa_hda_analog"
TEST=="device/device/acp63-dmic-capture", GOTO="alsa_hda_analog"
TEST=="device/device/acp-pdm-dmic", GOTO="alsa_hda_analog"
GOTO="alsa_restore_std"

LABEL="alsa_hda_analog"
# restore configuration for profile with combined cards (HDA + digital mic)
TEST!="/run/udev/alsa-hda-analog-card", GOTO="alsa_restore_std"
IMPORT{program}="/usr/bin/cat /run/udev/alsa-hda-analog-card"
ENV{ALSA_CARD_HDA_ANALOG}!="", ENV{ALSA_CARD_NUMBER}="$env{ALSA_CARD_HDA_ANALOG}"

LABEL="alsa_restore_go"
TEST!="/etc/alsa/state-daemon.conf", RUN+="/usr/bin/alsactl restore $env{ALSA_CARD_NUMBER}"
TEST=="/etc/alsa/state-daemon.conf", RUN+="/usr/bin/alsactl nrestore $env{ALSA_CARD_NUMBER}"

LABEL="alsa_restore_end"

Arch Linux has not a git version, indeed it looks like f90124c and 6f7ce73 are not there yet. I just tried to manually edit the .rules file according to the second commit, it didn't work but FWIW I missed the first commit. I will try asap and let you know.

@wastlnd
Copy link
Author

wastlnd commented Nov 24, 2024

Ok, done and reporting.

  1. applying the two commits to the 90-alsa-restore-rules file in1.2.13 has no effect, the error persists;
  2. copying the 90-alsa-restore-rules file from 1.2.12 to 1.2.13 ends up in a weird behavior: the same error shows up but I have sound, I just can't change the volume level, if I try they immediately bounce back to the default level.

@perexg
Copy link
Member

perexg commented Nov 25, 2024

It's really confusing. You may check which other applications are using sound device like fuser /dev/snd/control* and try to stop them.

Also, if the mentioned information appears, UCM files are not installed or UCM code is not enabled in alsa-lib. It's not error just information.

@wastlnd
Copy link
Author

wastlnd commented Nov 25, 2024

You may check which other applications are using sound device like fuser /dev/snd/control* and try to stop them

The only process using the device is the taskbar, killing it didn't make the difference. I also tried to run alsactl restore with the --no-ucm option, no change. FWIW, the system gets messed up only if the command is run automatically at boot, running it manually on termianl makes the audio work again.

@perexg
Copy link
Member

perexg commented Nov 25, 2024

I think that it's a dup of alsa-project/alsa-ucm-conf#472 . UCM files must be patched, too.

@wastlnd
Copy link
Author

wastlnd commented Nov 25, 2024

Ha ok, I saw that that issues has been fixed but just for Intel devices, right? I have an AMD chipset with Realtek ACL236 card.

@perexg
Copy link
Member

perexg commented Nov 25, 2024

HDA config files are shared.

@perexg
Copy link
Member

perexg commented Nov 25, 2024

My mistake, it's for Intel's SOF driver, so it won't help.

@wastlnd
Copy link
Author

wastlnd commented Nov 26, 2024

It's mostly about the alsa service at boot, it looks like it fails and is stuck on an endless loop. Yet downgroading alsa-utils to 1.2.12 and leaving the 1.2.13 versions of alsa-lib and alsa-ucm-conf fixes the issue. Also, I wonder whether there's another way to run alsactl restore at boot.

@wastlnd
Copy link
Author

wastlnd commented Nov 27, 2024

It looks like I am at least narrowing down the issue: the problematic module is snd_apc3x_rn, it is detected but for some reason it makes the service crash. As a temporary workaround I blacklisted it and the service is working again. Weird, I think that the linux 6.6 kernel should have this supported by default...

@perexg
Copy link
Member

perexg commented Nov 27, 2024

You refer probably udev rule, so could you move this file to another location to inactivate it and run 'alsactl restore 0` for all cards in the system? Zero in the command is card number. Hopefully, the endless loop can be reproduced with it and if you add '-d' argument, it may help to identify what is going on.

@wastlnd
Copy link
Author

wastlnd commented Nov 27, 2024

Actually I just created a blacklist.conf file in /etc/modprobe.d with blacklist snd_apc3x_rn. How could I achieve this result in the udev rule? The related card number seems to be "2", and card 1 is the working default one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants