Bug 144260

Summary: U4 kernel sound broken on certain AC 97 systems
Product: Red Hat Enterprise Linux 3 Reporter: Brian Long <brilong>
Component: kernelAssignee: John W. Linville <linville>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: cliff, nhruby, peterm, petrides, riel
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-05-18 13:29:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
dmesg | grep -i audio running 2.4.21-20.0.1.EL kernel
none
dmesg | grep -i audio running 2.4.21-27.0.1.EL kernel
none
lspci -vv running 2.4.21-20.0.1.EL
none
lspci -vv running 2.4.21-27.0.1
none
Output from /var/log/messages
none
lspci -nv
none
lsmod output on HP XW4000 when ac97_plugin_ac1890 is loaded
none
lspci -vv from HP XW4100 workstation
none
dmesg after reloading i810_audio module
none
et-i810_audio.patch none

Description Brian Long 2005-01-05 13:10:16 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3)
Gecko/20040929

Description of problem:
RHEL 3 U4 kernel broke sound for a few applications although xmms
still works.  For example, a game "Enemy Territory" works with the
errata kernel 2.4.21-20.0.1.EL but does not work with the U4 kernel or
2.4.21-27.0.1.EL.

Version-Release number of selected component (if applicable):
2.4.21-27.EL

How reproducible:
Always

Steps to Reproduce:
1. Boot U4 kernel
2. Start Enemy Territory (available for download at
www.enemy-territory.com)

Actual Results:  Sound does not work.

Expected Results:  Sound should work.

Additional info:
Sound works fine in 2.4.21-20.0.1.EL.

Comment 2 Brian Long 2005-01-05 13:59:28 UTC
Created attachment 109368 [details]
dmesg | grep -i audio running 2.4.21-20.0.1.EL kernel

Comment 3 Brian Long 2005-01-05 14:00:18 UTC
Created attachment 109369 [details]
dmesg | grep -i audio running 2.4.21-27.0.1.EL kernel

Comment 4 Brian Long 2005-01-05 14:01:14 UTC
Created attachment 109370 [details]
lspci -vv running 2.4.21-20.0.1.EL

Comment 5 Brian Long 2005-01-05 14:01:52 UTC
Created attachment 109371 [details]
lspci -vv running 2.4.21-27.0.1

Comment 6 Cliff McCollum 2005-01-05 17:37:09 UTC
Created attachment 109380 [details]
Output from /var/log/messages

Comment 7 Cliff McCollum 2005-01-05 17:38:51 UTC
I have upgraded a Dell Precision 370 workstation from RHEL 3 update 3,
to update 4. I have now lost all sound - even in XMMS. I have attached
the lines from /var/log/messages as comment #6.

Running dmesg shows 265 lines of (and nothing else):

  Intel 810 + AC97 Audio, version 0.24, 10:27:57 Dec 21 2004

If I boot back to the 2.4.21-20.ELsmp kernel, sound works fine.


Comment 8 Cliff McCollum 2005-01-05 17:40:06 UTC
Not surprisingly, running redhat-config-soundcard reports that no
sound card was detected.


Comment 10 John W. Linville 2005-01-05 22:38:38 UTC
Cliff, can I see the output of "lspci -nv" for your Precision 370?

Comment 11 Thomas Chung 2005-01-05 22:52:40 UTC
I reported this issue to John Hull with Dell on Dec 22nd and at the
same day I received a response with a new dkms audio driver for Dell
P370n 

http://fedoranews.org/dell/

Thomas Chung

Comment 12 Cliff McCollum 2005-01-05 23:10:24 UTC
The fix from Thomas Chung worked for me. However, the README file left
out a couple steps I needed. I had to add a couple calls to dkms
before things would work. Forgive me here, as I'm not a dkms guru, but
this is what I did:

# rpm -Uvh dkms-2.0.4-1*.rpm
# rpm -Uvh i810_audio-2.4.21p-5dkms*.rpm
# rmmod i810_audio ac97_codec
# dkms ldtarball --archive /usr/src/i810_audio-2.4.21p/i810_audio*.tgz
# dkms install -m i810_audio -v 2.4.21p
# modprobe i810_audio

This seemed to do the trick.


Comment 13 Cliff McCollum 2005-01-05 23:11:56 UTC
Created attachment 109405 [details]
lspci -nv

Output from 'lspci -nv' on my Dell Precision 370, as requested.

Comment 14 John W. Linville 2005-01-06 18:39:45 UTC
Cliff, Thomas, et al.

If the dkms package at http://fedoranews.org/dell/ helps you, then
RHEL3 U4 will almost certianly work (provided you can undo/ignore
whatever DKMS has already done).

See comment 31 in bug 109528 for information about an addition needed
in /etc/modules.conf in order for sound to work on the box(es) in
question.

Brian,

It isn't clear to me that this will fix what you are seeing.  Could
you try the above and let me know if you are still seeing the problem?

Comment 15 Cliff McCollum 2005-01-06 18:54:14 UTC
John, I had already applied RHEL3 U4 and that is what caused my sound
to stop working (it worked under U3). So I don't think it's correct to
say that RHEL U4 should work: it didn't.

However, after installing U4 and finding that my sound did not work, I
followed the instructions at http://fedoranews.org/dell/ as described
in comment #12. That got my sound working again.

I do not have a line similar to comment 31 in bug 109528 in my
modules.conf file. The only lines pertaining to sound in my
modules.conf file, on my copy of U4 which is now working, are:

 alias sound-slot-0 i810_audio
 post-install sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -L   
   /dev/null 2>&1 || :
 pre-remove sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -S
   /dev/null 2>&1 || :


Comment 16 John W. Linville 2005-01-06 19:26:05 UTC
Cliff,

I apologize if I wasn't clear.  The RHEL3 U4 kernel contains code
equivalent to what is in the driver you mentioned in comment 12. 
However, that code is only activated if ac97_plugin_ad1980.o is loaded
_before_ i810_audio.o gets loaded.  That is the purpose of adding this
line in modules.conf:

pre-install sound-slot-0 /sbin/modprobe ac97_plugin_ad1980

As I mentioned in bug 109528, there currently isn't any way to make
this happen automatically.  The manual addition of that line to
modules.conf is required.

Again, a "clean" RHEL3 U4 is capable of supporting sound on the
Precision 370, but this piece of manual configuration is required.

Comment 17 Thomas Chung 2005-01-07 01:55:54 UTC
I just installed a "clean" RHEL3 U4" on Dell P370n then added
following two lines in the /etc/rc.local then rebooted.

/sbin/modprobe ac97_plugin_ad1980
/sbin/modprobe i810_audio

When I login, I see following entries in the /etc/modules.conf

alias eth0 tg3
alias scsi_hostadapter ata_piix
alias usb-controller usb-uhci
alias usb-controller1 ehci-hcd
pre-install sould-slot-0 /sbin/modprobe ac97_plugin_ad1980
pre-install sould-slot-0 /sbin/modprobe i810_audio
alias sound-slot-0 i810_audio
post-install sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -L
>/dev/null 2>&1 || :
pre-remove sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -S
>/dev/null 2>&1 || :

And, I was able to play and hear a test sound via
redhat-config-soundcard successfully without installing dkms audio driver.

Thomas

Comment 18 Brian Long 2005-01-07 18:40:35 UTC
John,

Two things:

1) When I update modules.conf, lsmod shows ac97_plugin_ac1980 is
unused (I'll attach lsmod output).  Enemy Territory still has no sound.

2) How are end users supposed to know about manually entering things
in modules.conf?  As a system administrator, I have no problem adding
this to my workstation, but I cannot expect each end user to do it. 
Anaconda or some other process should detect that ac97_plugin_ac1980
needs to be loaded before i810_audio and /etc/modules.conf should be
updated appropriately.

Is there anything in the works to make this completely automatic? 
Right now, if this worked on the HP platform, I'd have to write a
postinstall routine in my ks.cfg to tweak modules.conf.  This doesn't
scale; I'd much rather Red Hat's installation took care of these tweaks.

Thanks for your help.  Any ideas how I can figure out why certain apps
have sound and others don't on my HP?

/Brian/

Comment 19 Brian Long 2005-01-07 18:42:31 UTC
Created attachment 109488 [details]
lsmod output on HP XW4000 when ac97_plugin_ac1890 is loaded

Comment 20 Brian Long 2005-01-07 19:02:11 UTC
The sound in Enemy Territory also breaks on the HP XW4100 workstation
which has a different AC97 (ICH5) chipset.  I'll attach lspci output.
 Going back to the 2.4.21-20.0.1.EL kernel it works fine as well.

Comment 21 Brian Long 2005-01-07 19:03:01 UTC
Created attachment 109490 [details]
lspci -vv from HP XW4100 workstation

Comment 22 John W. Linville 2005-01-07 19:26:27 UTC
Brian,

I'll definitely have to try Enemy Territory -- let the record show
that it will be purely for business-related purposes... :-)

Right now, I don't have a good explanation for why only some things
are working/failing on those boxes...  Let me ask this: do you
normally use the "main" volume control for audio on those boxes?  Or
do you have to use the "headphone" (or other?) volume control instead?

If you will, please reboot one or both of the failing boxes.  (If you
don't want to reboot, "modprobe -r i810_audio; modprobe -r ac97_codec
; modprobe i810_audio" will probably do.)  Then, play some sound --
anything (e.g. an ogg) will do.  Finally, run "dmesg" and attach the
output.

I appreciate your patience and cooperation!

Comment 23 Brian Long 2005-01-07 20:00:17 UTC
Created attachment 109493 [details]
dmesg after reloading i810_audio module

This dmesg output is just like attachment 109369 [details].

Comment 24 John W. Linville 2005-01-11 18:10:46 UTC
FWIW, I have been able to recreate this on an xw4200... 
Unfortunately, ATM I'm totally perplexed...

Comment 25 John W. Linville 2005-01-12 20:16:36 UTC
Interesting...perplexing...

I patched the 2.4.21-27.EL (U4) kernel's drivers/sound directory to
match what was in 2.4.21-20.EL (U3), yet ET still has no sound even
though everything else appears to be fine...

Comment 26 John W. Linville 2005-01-13 15:51:56 UTC
I was mistaken...U4 kernel patched w/ U3's drivers/sound (and
appropriate changes to include/linux/pci_ids.h) yields working sound
for ET as well as other applications.

Will proceed from here...

Comment 28 John W. Linville 2005-01-14 20:46:37 UTC
Problem appears to have been introduced upstream w/ update of
i810_audio driver to version 1.01 (between 2.4.26 and 2.4.27)...  We
picked-up this update in RHEL3 U4...

Unfortunately, that was a big change set...attempting to isolate...

Comment 29 John W. Linville 2005-01-14 22:25:35 UTC
Created attachment 109798 [details]
et-i810_audio.patch

This patch is working for me...give it a try?

Comment 31 Brian Long 2005-01-27 03:10:03 UTC
John, have you committed this patch to the U5 kernel stream?  I've not
had a chance to rebuild the kernel with your patch and try it.  If you
could provide test kernels, that would be appreciated.

Comment 32 Ernie Petrides 2005-01-27 05:40:48 UTC
Brian, John's fix (in comment #29) is not yet committed, but it's queued
for my next U5 build, which will hopefully take place tomorrow.

Comment 33 John W. Linville 2005-01-27 15:18:18 UTC
Brian, 

I have kernels built w/ the patch here:

   http://people.redhat.com/linville/.bz144260/

I did get some confirmation upstream that the patch was working for
others...

Comment 34 Brian Long 2005-01-27 17:07:00 UTC
I need kernel-source to get my binary nvidia drivers linked against
the kernel.  Otherwise, I cannot test sound in ET.  I tried testing
with the "nv" driver in X, but ET complains about OpenGL.

Comment 35 John W. Linville 2005-01-27 18:27:58 UTC
Check again now...both kernel-source and the .src.rpm are available...

Comment 36 Brian Long 2005-01-27 19:40:35 UTC
Nope, just .src.rpm is there.  kernel-source is not available.

Comment 37 John W. Linville 2005-01-27 19:57:33 UTC
Sorry about that...copied it to the wrong place...check again?

Comment 38 Brian Long 2005-01-27 20:18:23 UTC
Thanks for the trouble John.  This kernel worked for me!  Please
integrate the patch into U5  :)

Comment 39 John W. Linville 2005-01-27 20:25:33 UTC
Ernie, you heard the mean... :-)

Comment 40 Ernie Petrides 2005-01-29 06:04:18 UTC
A fix for this problem has just been committed to the RHEL3 U5
patch pool this evening (in kernel version 2.4.21-27.10.EL).


Comment 41 John W. Linville 2005-02-14 19:31:17 UTC
FYI, the kernels referenced in comment 33 have been deleted.  Please
let me know if they are still needed.

Comment 42 Tim Powers 2005-05-18 13:29:03 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2005-294.html