The in-kernel driver cannot un-mute the speakers unless a hack is performed, where Andrew Clunis python script sends a tone to an ioctl KIOCSOUND, making the the speakers unmute. After playing his script , I can play sound, but have no volume control.Reference:http://www.klabs.be/~fpiat/linux/debian/Etch_on_Thinkpad_T61.html The alsa-drive package oops with the 2.6.20-gentoo-r8 kernel. I have installed the following alsa packages: media-libs/alsa-lib-1.0.14a-r1 media-libs/alsa-oss-1.0.14 media-plugins/gst-plugins-alsa-0.8.11 media-sound/alsa-headers-1.0.14 media-sound/alsa-utils-1.0.14_rc2-r3 media-sound/alsamixergui-0.9.0.1.2-r4 The module snd-hda-intel loads find, but when I try to use it I get a oops: BUG: unable to handle kernel NULL pointer dereference at virtual address 00000000 printing eip: f911c973 *pde = 00000000 Oops: 0000 [#1] SMP Modules linked in: ipv6 rtc smapi thinkpad tp_smapi tp_base ibm_acpi usbvideo compat_ioctl32 videodev v4l2_common v4l1_compat pcmcia firmware_class nvidia(P) agpgart wlan_scan_sta ath_rate_sample(F) yenta_socket rsrc_nonstatic pcmcia_core ath_pci(F) wlan ath_hal(P) pcspkr i2c_i801 i2c_core snd_hda_intel snd_pcm snd_timer snd snd_page_alloc eth1394 lpfc megaraid_sas megaraid_mbox megaraid_mm aacraid 3w_9xxx 3w_xxxx mptfc scsi_transport_fc mptspi mptscsih mptbase atp870u dc395x qla1280 dmx3191d sym53c8xx qlogicfas408 aha152x BusLogic aic7xxx aic79xx scsi_transport_spi sg tg3 e1000 nfs lockd sunrpc jfs raid10 raid1 raid0 dm_mirror dm_mod ata_piix ahci libata sbp2 ohci1394 ieee1394 sl811_hcd usbhid ohci_hcd uhci_hcd usb_storage ehci_hcd usbcore CPU: 0 EIP: 0060:[<f911c973>] Tainted: PF VLI EFLAGS: 00210297 (2.6.20-gentoo-r8 #11) eax: f9146c20 ebx: 00000004 ecx: 00000003 edx: f4035e04 esi: 00000000 edi: f4035e5c ebp: f623434c esp: f4035dd0 ds: 007b es: 007b ss: 0068 Process kmixctrl (pid: 12155, ti=f4035000 task=f6278030 task.ti=f4035000) Stack: f62e8440 f4035e04 bfe47020 f90c416c c167fbe0 bfe47020 f3f8e840 c167fa80 c167faa0 c167fac0 00000000 f62e84a8 00000000 00000011 00000002 00000000 00000000 75706e49 6f532074 65637275 00000000 00000000 00000000 00000000 Call Trace: [<f90c416c>] <0> [<f90c3d99>] <0> [<c016b75b>] <0> [<c016b9e2>] <0> [<c016ba27>] <0> [<c0102ce6>] <0> ======================= Code: c3 57 56 53 8d 7a 58 c7 42 40 03 00 00 00 c7 42 48 01 00 00 00 8b 08 89 4a 50 8b 4a 54 8b 18 8d 73 ff 39 d9 0f 43 ce 8b 74 c8 04 <ac> aa 84 c0 75 fa 5b 31 c0 5e 5f c3 55 89 c5 57 31 c0 56 89 d7 EIP: [<f911c973>] SS:ESP 0068:f4035dd0
Could you please post your kernel .config and your dmesg output? Also, can you test this with the latest kernel prepatch 2.6.22-rc7? Thanks
Created attachment 124013 [details] config for in-kernel alsa driver
Created attachment 124014 [details] config used when installing the gentoo alsa-driver
Created attachment 124016 [details] dmesg from in kernel alsa driver
Created attachment 124018 [details] dmesg from when alsa-driver packaged kernel module accessed
I'm afraid I don't know how to test with the latest kernel prepatch 2.6.22-rc7. I know how to build a kernel, and I have been using genkernel for some time.
Here's a link that may help: http://gentoo-wiki.com/HOWTO_Compile_a_Kernel_Manually
You're using the hda_intel driver, but in your first .config it's not selected, and in the second I don't see it at all. Try enabling it in your .config: CONFIG_SND_HDA_INTEL=y When using the hda_intel driver with in-kernel alsa, you should see something like this in your dmesg: ALSA device list: #0: HDA Intel at 0xfebf8000 irq 22 Please compile your kernel again, and post your new .config and dmesg output. Btw, please also enable CONFIG_KALLSYMS=y to have more info in your back trace.
Created attachment 124025 [details] Updated...config for in-kernel alsa driver
Created attachment 124026 [details] Updated...dmesg from in kernel alsa driver
Created attachment 124030 [details] Updated...dmesg from in kernel alsa driver I had to clean out left over files form the alsal-driver package, rebuild reboot a few times to be sure. no oops's with the in-kernel snd-hda-intel driver, but sound stays perminanly muted.
Created attachment 124031 [details] Updated...dmesg from when alsa-driver packaged kernel module accessed
Created attachment 124033 [details] Updated...config used when installing the gentoo alsa-driver You will notice ALSA is not configured in the kernel .config. If it where, I wouldn't be able to install the alsa-driver package, as it results in the error message telling me that it can't be configured in the kernel.
(In reply to comment #7) > Here's a link that may help: > > http://gentoo-wiki.com/HOWTO_Compile_a_Kernel_Manually > Good link. I know all that stuff, but not sure how to use patch-2.6.22-rc7.bz2 on my linux-2.6.20-gentoo-r8. I tried to: cd /usr/src/ rsync -aqz linux-2.6.20-gentoo-r8/ backup.linux-2.6.20-gentoo-r8.bakup cd linux/ wget http://kernel.org/pub/linux/kernel/v2.6/testing/patch-2.6.22-rc7.bz2 bunzip2 patch-2.6.22-rc7.bz2 patch -p1 < patch-2.6.22-rc7 which failed on almost every patch.
Ok, so in-kernel alsa doesn't oops now, that's good. I see you've selected the SND_HDA_INTEL driver now, also good. I still don't see your sound card being detected in your new dmesg, though. Could you compile the following drivers into your kernel, instead of as modules: CONFIG_SND=y CONFIG_SND_TIMER=y CONFIG_SND_PCM=y CONFIG_SND_OSSEMUL=y CONFIG_SND_MIXER_OSS=y CONFIG_SND_PCM_OSS=y CONFIG_SND_HDA_INTEL=y Then reboot and post your new dmesg. There should be a line in it like the one in comment #8. Another link you might find useful: http://www.gentoo.org/doc/en/alsa-guide.xml Btw, fastest way to test 2.6.22-rc7 is like this: # ACCEPT_KEYWORDS="~*" emerge =sys-kernel/vanilla-sources-2.6.22_rc7 (replace the '*' with your arch, or just ignore the msg about invalid ACCEPT_KEYWORDS) We can try to get gentoo-sources-2.6.20-r8 working first, though.
Modules are fine (it's what the ALSA guide recommends). You won't see the sound card in dmesg but you can get the same info from "cat /proc/asound/cards"
Created attachment 124052 [details] in-kernel alsa driver, as non-module. This dmesg does contain the card: ALSA device list: #0: HDA Intel at 0xfe220000 irq 11
(In reply to comment #15) > Ok, so in-kernel alsa doesn't oops now, that's good. I see you've selected the > SND_HDA_INTEL driver now, also good. I still don't see your sound card being > detected in your new dmesg, though. > Could you compile the following drivers into your kernel, instead of as > modules: > CONFIG_SND=y > CONFIG_SND_TIMER=y > CONFIG_SND_PCM=y > CONFIG_SND_OSSEMUL=y > CONFIG_SND_MIXER_OSS=y > CONFIG_SND_PCM_OSS=y > CONFIG_SND_HDA_INTEL=y > Then reboot and post your new dmesg. There should be a line in it like the one > in comment #8. > Another link you might find useful: http://www.gentoo.org/doc/en/alsa-guide.xml > > Btw, fastest way to test 2.6.22-rc7 is like this: > # ACCEPT_KEYWORDS="~*" emerge =sys-kernel/vanilla-sources-2.6.22_rc7 > (replace the '*' with your arch, or just ignore the msg about invalid > ACCEPT_KEYWORDS) > We can try to get gentoo-sources-2.6.20-r8 working first, though. > dmesg of kernel compiled with the options listed above: http://bugs.gentoo.org/attachment.cgi?id=124052
Created attachment 124062 [details] .config for linux-2.6.22-rc7 with in-kernel-alsa driver, not as module. Even with the 2.6.22-rc7 sound stays muted. The python script ioctl hack doesn't work with this kernel.
Created attachment 124063 [details] dmesg for linux-2.6.22-rc7 with in-kernel-alsa driver, not as module. sound still muted with in-kernel non-module alsa driver in 2.6.22-rc7
Created attachment 124065 [details] dmesg for linux-2.6.22-rc7 in-kernel, alsa_as-module ioctl hack to unmute does not work
Created attachment 124067 [details] .config for linux-2.6.22-rc7 in-kernel, alsa_as-module
Have you checked with alsamixer if nothing is muted, ie. there are no M's under any channels? Also, could you please post the output of: cat /proc/interrupts ? Thanks.
(In reply to comment #23) > Have you checked with alsamixer if nothing is muted, ie. there are no M's under > any channels? > > Also, could you please post the output of: cat /proc/interrupts ? Thanks. > I have checked for mute. Do you want /proc/interrupts for all 3 versions? 2.6.20 in-kernel, 2.6.20 out-kernel, and 2.6.22-rc7?
Do they differ? If so, post them all please. If not, pick one :)
Just the most recent one will do, 2.6.22-rc7.
(In reply to comment #26) > Just the most recent one will do, 2.6.22-rc7. > This is using the 2.6.22-rc7 with in-kernel alsa drivers as modules. genx jstile # uname -a Linux genx 2.6.22-rc7 #2 SMP Fri Jul 6 01:26:49 PDT 2007 i686 Intel(R) Core(TM)2 Duo CPU T7500 @ 2.20GHz GenuineIntel GNU/Linux genx jstile # cat /proc/interrupts CPU0 CPU1 0: 27688 0 XT-PIC-XT timer 1: 612 0 XT-PIC-XT i8042 2: 0 0 XT-PIC-XT cascade 8: 0 0 XT-PIC-XT rtc 9: 574 0 XT-PIC-XT acpi 10: 200000 0 XT-PIC-XT uhci_hcd:usb5, yenta, nvidia 11: 25408 0 XT-PIC-XT ehci_hcd:usb1, ehci_hcd:usb2, uhci_hcd:usb3, uhci_hcd:usb4, uhci_hcd:usb6, uhci_hcd:usb7, ohci1394, HDA Intel, wifi0 12: 22159 0 XT-PIC-XT i8042 14: 62 0 XT-PIC-XT ide0 216: 61 56 PCI-MSI-edge eth0 217: 4707 4712 PCI-MSI-edge ahci NMI: 0 0 LOC: 50 27687 ERR: 0 MIS: 0 genx jstile # ls -alF /proc/asound/ total 0 dr-xr-xr-x 4 root root 0 2007-07-06 15:54 ./ dr-xr-xr-x 130 root root 0 2007-07-06 15:47 ../ dr-xr-xr-x 4 root root 0 2007-07-06 15:54 card0/ -r--r--r-- 1 root root 0 2007-07-06 15:54 cards -r--r--r-- 1 root root 0 2007-07-06 15:54 devices lrwxrwxrwx 1 root root 5 2007-07-06 15:54 Intel -> card0/ -r--r--r-- 1 root root 0 2007-07-06 15:54 modules dr-xr-xr-x 2 root root 0 2007-07-06 15:54 oss/ -r--r--r-- 1 root root 0 2007-07-06 15:54 pcm -r--r--r-- 1 root root 0 2007-07-06 15:54 timers -r--r--r-- 1 root root 0 2007-07-06 15:54 version
(In reply to comment #26) > Just the most recent one will do, 2.6.22-rc7. > Is there anything else I can help with?
I see you boot your kernel with (among others) these options: 'irqpoll noapic pci=routeirq'. Could you boot your kernel without these please, and again post the output of dmesg and cat /proc/interrupts. If that doesn't help, you can enable these options in your kernel .config to produce more debugging output: CONFIG_PCI_DEBUG=y and CONFIG_DEBUG_SHIRQ=y. Then repeat the step above. Thanks for your testing.
Created attachment 125679 [details] Setup Notes for Alsa snd_intel using mercurial alsa-libs, alsa-utils, alsa-driver, alsa-kernel # Setup Notes for Alsa snd_intel using # mercurial # source alsa-libs # source alsa-utils # source alsa-driver # source alsa-kernel
Does this mean that you've solved the problem by using mercurial alsa? I see the change in your /proc/interrupts. Did you use any of the kernel parameters I suggested? Please alaborate on your previous post.
Created attachment 125688 [details] Setup Notes for Alsa snd_intel using mercurial alsa-libs, alsa-utils, alsa-driver, alsa-kernel fixed some spelling, and script stuff
(In reply to comment #31) > Does this mean that you've solved the problem by using mercurial alsa? I see > the change in your /proc/interrupts. Did you use any of the kernel parameters I > suggested? Please alaborate on your previous post. > Yes, I did solve the problem by using mercurial with alsa-driver and alsa-kernel. I built alsa-lib and alsa-utils from a manual download. I'm a bad debugger... I forgot to try CONFIG_PCI_DEBUG and CONFIG_DEBUG_SHIRQ. Do I still need to do that?
Good to hear that you were able to solve the problem. There's no need to test with CONFIG_PCI_DEBUG and CONFIG_DEBUG_SHIRQ at this time. We'll wait till 2.6.23-rc1 is released, then you can test if the in-kernel alsa driver also works for you. If that's the case we can close this bug.
2.6.23-rc1 is out now. Any chance you can test that kernel, using the ALSA drivers found in the kernel, as opposed to the HG ones? Thanks!
(In reply to comment #35) > 2.6.23-rc1 is out now. Any chance you can test that kernel, using the ALSA > drivers found in the kernel, as opposed to the HG ones? > > Thanks! > I updated today, but don't see 2.6.23-r1 in my list: eix sys-kernel/vanilla-sources <snip> ... (2.6.21) (~)2.6.21 (2.6.21.1) (~)2.6.21.1 (2.6.21.5) (~)2.6.21.5 (2.6.21.6) 2.6.21.6 (2.6.22) (~)2.6.22 (2.6.22.1) (~)2.6.22.1
It's definitely there (2.6.23-rc1 rather than -r1) ls /usr/portage/sys-kernel/vanilla-sources/vanilla-sources-2.6.23_rc1.ebuild
Any news here?
I also have the "mute" bug and tested with newest vanilla sources (_rc3) and it's still there. Using in-kernel alsa builtin and driver as module (hda-intel)
Seems the codec following HD audio on intel ICH8 rev o3 is unsupport or something with current ALSA upstream. I guess that makes it also kinda unsupported within the kernel code. Seems not all HD audio has this problem as intel changed the codec in a rev ( 02->03 maybe?) I found a bug on Ubuntu naming the same problem i have, with a patch aiming at fixing alsa-driver 1.0.14 but isn't done yet. ? It seems the origenal poster didn't have this problem maybe because he had another rev, open new bug maybe?
John, can you confirm that this problem is fixed for you with the latest development kernel (2.6.23-rc6 as of this writing)? Soren, can you also please test with the latest development kernel (2.6.23-rc6 as of this writing)? (There have been a number of alsa and hda driver related commits going into the git tree).
I have build the kernel, and booted, but I'm having a hell of a time dealing with my first 'sandbox violation' trying to build the nvidia driver (or any kernel module for that matter). I'm reading http://bugday.gentoo.org/sandbox.html. I'll keep plugging away at it.
sounds like that might be bug #135745, there is no solution currently other than FEATURES="-sandbox -usersandbox" emerge foo
I have good news and bad news. I cant seem to build the nvidia driver, but I don't need it to test the sound. Incedentally, I found another bug for nvidia: http://bugs.gentoo.org/show_bug.cgi?id=186490 I booted to the 2.6.23-rc6 kernel, and logged into the console. I ran 3 commands: amixer set PCM 100 unmute amixer set Speaker 100 unmute play hideseek.mp3 And It Sounds Great. Volume buttons don't work, so they aren't hard wired to the card. amixer application was from source alsa-utils-1.0.14 and not the ebuild
Sound also works with the alsa-utils-1.0.14 ebuild.
Ok, so for you this issue is fixed, John? In that case we'll wait for input from Soren before closing this one.
Yes. All fixed for me. Thank you Very much.
Just tried upgrading to vanilla rc7, still no sound. Though my error should be fixed in alsa's HG tree according to https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3343 which seems like my bug.
Created attachment 131740 [details, diff] add support for AD1984 johnny99, if you have time please apply this patch against a recent gentoo-sources-2.6.22 release and confirm that it fixes the problem for you. I'm pretty sure it will, If so, we can ship it in future gentoo-sources-2.6.22 releases. Søren, if this doesn't fix it for you then please open a new bug as it sounds like your issue is different.
Hello Daniel Drake, I have time. If you don't mind, how do I apply patch? I looked at the text of patch "add support or AD1984' but don't understand how to apply this to the linux-2.6.22-gentoo-r5 source
Copy the patch from comment #49 into a file and save in the /usr/src/linux directory or wherever your kernel sources are. type: patch -p1 < filename replacing filename with the name of the patch file. Then rebuild and install your kernel sources as you normally do.
The good news is that patch worked on linux-2.6.22-gentoo-r7 source, and it sounds great. The bad news is that I have some problem with irq's, causing the nvidia driver to not load. I will debug further tonight, but by disabling all USB support in the kernel and booting with the kernel option acpi_noirq, sound an nvidia are working fine together.
Created attachment 131883 [details] dmesg when sound works, nvidia fails with in kernel usb after 01_ad1984.patch dmesg when sound works, nvidia fails with in kernel usb after 01_ad1984.patch
Created attachment 131884 [details] dmesg when sound works, nvidia works without in kernel usb after 01_ad1984.patch dmesg when sound works, nvidia works without in kernel usb after 01_ad1984.patch
I added 2 attachments of dmesg output. With the 01_ad1984.patch applied to the gentoo-sources-2.6.22-r7, sound works but Nvidia fails if there is USB support in the kernel on this Thinkpad t61. When I remove all USB support from the kernel, both sound and Nvidia work. I suspect this is due to an IRQ shuffle. <A HREF="http://bugs.gentoo.org/attachment.cgi?id=131883">kernel with usb</A> <A HREF="http://bugs.gentoo.org/attachment.cgi?id=131884">kernel without usb</A> NOTE: I was incorrect in stating the kernel option 'acpi_noirq' was required. It is not required. The only requirement is to disable USB in the kernel .config. Is this a problem with the patch or with USB in the 2.6.22 kernel?
So, when USB is enabled in the kernel, nvidia fails both before and after you apply the sound fixing patch? If so, your issue is unrelated to the sound patch and you should file a new bug against the nvidia driver so that it can be dealt with by the appropriate people. If I misunderstood, please explain in more detail.
Before the patch, usb+nvidia are happy. After the patch, usb+nvidia are unhappy.
ACPI: PCI Interrupt 0000:01:00.0[A] -> GSI 16 (level, low) -> IRQ 16 PCI: Setting latency timer of device 0000:01:00.0 to 64 NVRM: loading NVIDIA UNIX x86 Kernel Module 100.14.19 Wed Sep 12 14:12:24 PDT 2007 nvidia is using IRQ 16 but above that... irq 16: nobody cared (try booting with the "irqpoll" option) Disabling IRQ #16 indicates that lots of interrupts were raised on IRQ 16 that weren't handled by any driver Ignore the nvidia driver (its closed source and causes a lot of problems and will make any kernel problem be ignored), can you double check that applying/reverting this patch (while USB is enabled) really does make the above "nobody cared" error come and go away? It seems very unlikely that it would have any influence at all. Sometimes these things are caused by reboots as opposed to cold boots etc. Hmm, just noticed that your sound IRQ changes in the 2 logs: ALSA device list: #0: HDA Intel at 0xfe220000 irq 22 to: #0: HDA Intel at 0xfe220000 irq 21 might also be worth keeping an eye on that message as you switch between the patched and unpatched kernels... again, the patch shouldn't have made a difference here.
I've had similar problems with my T61; in particular, it seemed that only the hardware buttons could unmute the system. However, with 2.6.23 and the in-kernel ALSA, everything works properly. (Well, raising or lowering /proc/acpi/ibm/volume doesn't make the sound louder or softer, but that's not important.) I can try to see how my system differs from a broken one, if it would help...
John, what's the status here? Did you examine the things Daniel mentioned in comment #58? Specifically, does using the patch cause problems with your USB, when not using the nVidia module?
this bug is a bit convoluted now, and the ALSA patches are included in 2.6.23. johnny, if you can reproduce your USB problems on 2.6.23 without the binary nvidia driver coming into play at all, please open a new bug report and we'll go from there.
I built sys-kernel/gentoo-sources-2.6.23, with in-kernel alsa and usb drivers. Once I add the following to make.conf, I could build the nvidia driver: FEATURES="-sandbox -usersandbox" Booted from 2.6.23-gentoo, alsa works, nvidia works, usb works, but net-wireless/madwifi-ng-0.9.3.2 (-injection kernel_linux) doesn't work. I couldn't get to the bottom of my 2.6.22-gentoo-r7 alsa-nvidia-usb problems.I got equially lost with 2.6.22-gentoo-r8: After patch: Add usb --> nvidia fails, No patch: Add usb --> nvidia works. Since sys-kernel/gentoo-sources-2.6.23 seems to work, with everything but net-wireless/madwifi-ng-0.9.3.2, I might just wait for that to happen, and stick with no usb on the 2.6.22-gentoo-r7 and 01_ad1984.patch patch.