RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 894032 - [alsa-delay] Pulseaudio is misconfigured after script failed
Summary: [alsa-delay] Pulseaudio is misconfigured after script failed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: alsa-utils
Version: 6.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Jaroslav Kysela
QA Contact: Ken Benoit
URL:
Whiteboard:
Depends On:
Blocks: 1269638 1270066
TreeView+ depends on / blocked
 
Reported: 2013-01-10 14:58 UTC by Jiri Koten
Modified: 2016-05-11 00:39 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2016-05-11 00:39:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
A patch to fix the missing file condition (553 bytes, patch)
2016-03-06 21:40 UTC, Jaroslav Kysela
no flags Details | Diff
Second update for alsa-delay (1.16 KB, patch)
2016-03-17 08:19 UTC, Jaroslav Kysela
no flags Details | Diff
Third update (patch) for alsa-delay script (1.19 KB, patch)
2016-03-17 16:14 UTC, Jaroslav Kysela
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0921 0 normal SHIPPED_LIVE alsa-utils bug fix and enhancement update 2016-05-10 22:53:08 UTC

Description Jiri Koten 2013-01-10 14:58:36 UTC
Description of problem:
When alsa-delay script fails to remove sound kernel modules it ends up with misconfigured pulseaudio.

In my case /etc/pulse/default.pa contained 

load-module module-alsa-card device_id=Loopback
load-module module-alsa-card device_id=

and pulseaudio then won't start.

alsa-delay script should probably stop when it fails to remove kernel modules and not continue with configuration of pulseaudio and alsaloop utility. Maybe ask user to reboot and rerun the script.

Rerunning the alsa-delay script after reboot won't help. I had to delete default.pa and reinstall pulseaudio.  

Version-Release number of selected component (if applicable):
alsa-utils-1.0.22-5.el6

How reproducible:
when it fails to remove kernel modules

Steps to Reproduce:
1. alsa-delay --pa --pdevice=plug:dmix:1 25

Comment 1 RHEL Program Management 2013-10-14 00:05:53 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.

Comment 4 Ken Benoit 2016-02-08 18:55:28 UTC
Installed RHEL-6.8-20160125.0 on a test system and installed the pulseaudio package as well. Ran "alsa-delay --pa --pdevice=plug:dmix:1 25". The following error message was displayed:

Using temporary tree: /tmp/alsa-delay-script
Using backup tree   : /var/lib/misc/alsa-delay-script
snd_hda_intel 1 
cp: cannot stat `/etc/modprobe.d/alsa.conf': No such file or directory

This does not occur on RHEL-6.7 or earlier versions.

Comment 5 Jaroslav Kysela 2016-03-06 21:40:20 UTC
Created attachment 1133564 [details]
A patch to fix the missing file condition

Comment 6 Jaroslav Kysela 2016-03-06 21:42:38 UTC
Ken - I attached a patch which should fix this. Could you continue tests with it?

You may eventually create empty /etc/modprobe.d/alsa.conf file .

I will build new alsa-utils-1.1.0-4 packages when the tests are fine.

Comment 7 Ken Benoit 2016-03-07 18:21:14 UTC
Patched alsa-delay with the patch from comment 5. Ran the script on a clean RHEL-6.8-20160212.2 install and had the following output:

Using temporary tree: /tmp/alsa-delay-script
Using backup tree   : /var/lib/misc/alsa-delay-script
snd_hda_intel 1 
/etc/modprobe.d/alsa.conf changed
  *** use --revert option to revert configuration changes ***

WARNING! An audio application uses ALSA driver:

12083 ?        00:00:00 pulseaudio

Would you like to kill these apps? (Y/ ) y
> kill 12083
> rmmod snd_seq
> rmmod snd_seq_device
> rmmod snd_hda_codec_realtek
ERROR: Module snd_hda_codec_realtek is in use
Unable to remove kernel module snd_hda_codec_realtek.

Comment 8 Jaroslav Kysela 2016-03-08 07:28:16 UTC
Pulseaudio probably respawned too quickly blocking the driver. You may revert the config and run the alsa-delay script from the single runlevel.

Comment 9 Ken Benoit 2016-03-16 13:33:42 UTC
On RHEL-6.8-20160308.0 executing (with the patch from comment 5):

alsa-delay --pa --pdevice=plug:dmix:1 25

Results in:

Using temporary tree: /tmp/alsa-delay-script
Using backup tree   : /var/lib/misc/alsa-delay-script
snd_hda_intel 1 
/etc/modprobe.d/alsa.conf changed
  *** use --revert option to revert configuration changes ***

WARNING! An audio application uses ALSA driver:

12083 ?        00:00:00 pulseaudio

Would you like to kill these apps? (Y/ ) y
> kill 12083
> rmmod snd_seq
> rmmod snd_seq_device
> rmmod snd_hda_codec_realtek
ERROR: Module snd_hda_codec_realtek is in use
Unable to remove kernel module snd_hda_codec_realtek.

Then executing:

alsa-delay --revert

And rebooting results in the loopback devices being listed:

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 1: PCH [HDA Intel PCH], device 0: ALC3232 Analog [ALC3232 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 2: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 2: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7

Comment 10 Jaroslav Kysela 2016-03-17 08:19:11 UTC
Created attachment 1137327 [details]
Second update for alsa-delay

"/sbin/chkconfig alsaloop off" call is missing.. Thanks. Could you test updated patch?

Comment 11 Ken Benoit 2016-03-17 13:53:01 UTC
Reran "alsa-delay --pa --pdevice=plug:dmix:1 25" from single user mode after applying the patch from comment 10. Here is the output from the command:

Using temporary tree: /tmp/alsa-delay-script
Using backup tree   : /var/lib/misc/alsa-delay-script
/etc/init.d/alsaloop exists
snd_hda_intel 1 
/etc/modprobe.d/alsa.conf changed
  *** use --revert option to revert configuration changes ***
> rmmod snd_hda_intel
> rmmod snd_seq
> rmmod snd_seq_device
> rmmod snd_hda_codec_realtek
> rmmod snd_hda_codec_generic
> rmmod snd_hda_codec
> rmmod snd_hwdep
> rmmod snd_pcm
> rmmod snd_timer
> rmmod snd_page_alloc
Kernel modules ready:
 0 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0xe1234000 irq 48
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control device hw:1 open error: No such file or directory
/etc/pulse/default.pa changed
  *** use --revert option to revert configuration changes ***
/etc/alsa/alsaloop-default.conf exists
Restarting alsaloop: delay 25000 us.
FATAL: Error inserting snd_aloop (/lib/modules/2.6.32-621.el6.x86_64/kernel/sound/drivers/snd-aloop.ko): No such device
Starting alsaloop: [60G[[0;32m  OK  [0;39m]
ERROR: Not started, check /var/log/messages for details
Removing tree /tmp/alsa-delay-script: success

Rebooting shows no loopback device and Gnome also shows no volume controls.

Comment 12 Jaroslav Kysela 2016-03-17 16:14:12 UTC
Created attachment 1137442 [details]
Third update (patch) for alsa-delay script

Remove /etc/init.d/alsaloop script to allow re-configuration.

Comment 13 Jaroslav Kysela 2016-03-17 16:14:59 UTC
OK, /etc/init.d/alsaloop must be removed, too before new configuration. Run 'alsa-delay --revert' again before new config.

Comment 15 Ken Benoit 2016-03-17 17:48:16 UTC
Here's the output on a clean RHEL-6.8-20160308.0 install in single user mode:

Using temporary tree: /tmp/alsa-delay-script
Using backup tree   : /var/lib/misc/alsa-delay-script
snd_hda_intel 1 
/etc/modprobe.d/alsa.conf changed
  *** use --revert option to revert configuration changes ***
> rmmod snd_hda_intel
> rmmod snd_seq
> rmmod snd_seq_device
> rmmod snd_hda_codec_realtek
> rmmod snd_hda_codec_generic
> rmmod snd_hda_codec
> rmmod snd_hwdep
> rmmod snd_pcm
> rmmod snd_timer
> rmmod snd_page_alloc
Kernel modules ready:
 0 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0xe1234000 irq 48
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control hw:1 open error: No such file or directory
amixer: Control device hw:1 open error: No such file or directory
/etc/pulse/default.pa changed
  *** use --revert option to revert configuration changes ***
Restarting alsaloop: delay 25000 us.
FATAL: Error inserting snd_aloop (/lib/modules/2.6.32-621.el6.x86_64/kernel/sound/drivers/snd-aloop.ko): No such device
Starting alsaloop: [60G[[0;32m  OK  [0;39m]
ERROR: Not started, check /var/log/messages for details
Removing tree /tmp/alsa-delay-script: success

Comment 17 Ken Benoit 2016-03-29 17:15:46 UTC
Manually tested on multiple systems with alsa-utils-1.1.0-8.el6 installed (RHEL-6.8-20160329.n.0) using the alsa-delay example provided in the description while in runlevel 5 (in Gnome). When performing an upgrade path from a working alsaloop and pulseaudio setup in RHEL-6.7 to RHEL-6.8 results in the loop devices still being displayed through aplay but I am unable to access gnome-volume-control as it says it is waiting for the sound system to respond indefinitely. Doing a clean install of RHEL-6.8-20160329.n.0 and performing the steps with alsa-delay results in mostly correct looking output from the script except that alsaloop doesn't start successfully (ERROR: Not started, check /var/log/messages for details). Checking /var/log/messages shows the following messages repeated:

alsaloop[12881]: playback plug:dmix open error: Device or resource busy
alsaloop[12881]: Loopback initialization failure.

On the one system where alsaloop ran successfully the system is hanging in the graphical boot after attempting a reboot.

Comment 19 Ken Benoit 2016-03-31 10:54:14 UTC
I have since gotten the clean install of RHEL-6.8 alsa-delay configuration working. It was a user error situation. Currently testing upgrade path from RHEL-6.7 to RHEL-6.8.

Comment 20 Ken Benoit 2016-03-31 11:45:06 UTC
Upgrade path from RHEL-6.7 (with pre-existing alsaloop configuration) to RHEL-6.8-20160329.n.0 is working correctly as well. Marking as verified.

Comment 22 errata-xmlrpc 2016-05-11 00:39:42 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0921.html


Note You need to log in before you can comment on or make changes to this bug.