snd_pcsp can take precedence of soundcards

Bug #242966 reported by Wit Wilinski
140
This bug affects 1 person
Affects Status Importance Assigned to Milestone
alsa-driver (Debian)
Fix Released
Unknown
alsa-driver (Ubuntu)
Invalid
Undecided
Unassigned
Intrepid
Invalid
Undecided
Unassigned
alsa-utils (Ubuntu)
Fix Released
Medium
Unassigned
Intrepid
Fix Released
Medium
Unassigned
pulseaudio (Ubuntu)
Fix Released
High
Luke Yelavich
Intrepid
Fix Released
High
Luke Yelavich

Bug Description

(Ubuntu Intrepid)

Latest changes in ALSA brought a snd-pcsp driver (and gave its module -2 index), which loads automatically. In my case, it took place of a USB soundcard (card index 1 changed to 2, after recent changes). As configuration files (/etc/asound.conf) refer to this card numerically, sound stopped working. Sound might also become very noisy in some laptops due to snd-pcsp.

cat /proc/asound/cards revealed the source of the problem (the snd-pcsp module).

Suggested solution: blacklist snd-pcsp, which will eliminate this problem OR throw this module out of the kernel.

Tags: iso-testing
Revision history for this message
Pedro Fragoso (ember) wrote :

I can confirm this on Intrepid

 0 [Intel ]: HDA-Intel - HDA Intel
                      HDA Intel at 0xfe0f8000 irq 20
 1 [pcsp ]: PC-Speaker - pcsp
                      Internal PC-Speaker at port 0x61

 0 [SI7012 ]: ICH - SiS SI7012
                      SiS SI7012 with ALC655 at irq 18
 1 [pcsp ]: PC-Speaker - pcsp
                      Internal PC-Speaker at port 0x61

Revision history for this message
Saivann Carignan (oxmosys) wrote :

This bug can also cause very noisy sound in speakers and laptops.

This bug can be fixed by setting back "options snd-pcsp index=-2" to "options snd-pcsp index=-1" in /etc/modprobe.d/alsa-base

Changed in alsa-driver:
importance: Undecided → Medium
status: Confirmed → Triaged
description: updated
Revision history for this message
Saivann Carignan (oxmosys) wrote :

Ben Collins : Your last changes to alsa-driver concern pcsp, you might be interested by this bug.

Revision history for this message
Pete Graner (pgraner) wrote :

I can confirm that options snd-pcsp index=-1 *does not* fix it with a Dell Latitude D620, I had to blacklist snd-pcsp to get non-crackling sound.

Revision history for this message
Saivann Carignan (oxmosys) wrote :

Unfortunaltely, I confirm Pete Graner comment. My solution finally does not work at each boot.

description: updated
Revision history for this message
Emilio (turl) wrote :

I can confirm this bug on Intrepid.

 0 [I82801AAICH ]: ICH - Intel 82801AA-ICH
                      Intel 82801AA-ICH with AD1881 at irq 10
 1 [pcsp ]: PC-Speaker - pcsp
                      Internal PC-Speaker at port 0x61

I had to blacklist the module and edit some files to set the default device for sound to work. Also, having all sound on PC speaker is a little scary, at first I thought it was my HDD dying :D

Revision history for this message
Conn O Griofa (psyke83) wrote :

I can confirm this bug on my Dell Dimension 1100, running Intrepid with latest updates as of 23/7.

With the snd_pcsp set to index "-2" (default): ALSA applications work with the proper sound card - you can verify via GDM's starting drumbeat upon login, or using a sound application that does not use PulseAudio. PulseAudio still chooses snd_pcsp as the primary PCM device, however (will attach verbose PulseAudio log).

In essence: the problem is not only with the snd_pcsp module index, but PulseAudio's incorrect selection of the appropriate PCM device (it appears to ignore the ALSA module index).

Workaround: a) blacklist snd_pcsp to eliminate the problem; or, b) use "padevchooser" to select the proper ALSA sink for your sound card (full name available from the PulseAudio Manager).

Real fix: Configure/patch PulseAudio to honour ALSA module indexes, or to completely ignore the PC Speaker kernel module?

My sound card:

00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 01)
 Subsystem: Dell Device 0164
 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
 Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
 Latency: 0
 Interrupt: pin B routed to IRQ 5
 Region 0: I/O ports at d800 [size=256]
 Region 1: I/O ports at dc40 [size=64]
 Region 2: Memory at faeff800 (32-bit, non-prefetchable) [size=512]
 Region 3: Memory at faeff400 (32-bit, non-prefetchable) [size=256]
 Capabilities: <access denied>
 Kernel driver in use: Intel ICH
 Kernel modules: snd-intel8x0

Revision history for this message
Luke Yelavich (themuso) wrote :

This bug is not actually an ALSA bug. As shown in comments from a few people for this bug, the pcspkr is not card 0, but the issue is with pulse using hal to load the devices.

Changed in alsa-driver:
status: Triaged → Invalid
Changed in pulseaudio:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Tormod Volden (tormodvolden) wrote :

I have seen much skepticism about the usefulness of the pc speaker as a sound device. I would like to chime in with a perfect use case for it: If you have your voip headset plugged into your sole soundcard (plugs at the back of the computer, hidden away) and you don't want to wear it all the time, it's very handy to use the pc speaker for the ringing sound. Sound quality is good enough for that purpose.

(Emilio, I also got scared and thought it was Gnome eating my disk, lol. Now I am impressed and happy that the pc speaker can be used for something else than a loud beep.)

Revision history for this message
Adilson Oliveira (agoliveira) wrote :
Revision history for this message
Carl Marshall (cjm5229) wrote :

I confirm this also had to blacklist snd-pcsp to get sound to work properly, I just reinstalled with alpha 3 and it was still there.

Steve Langasek (vorlon)
Changed in pulseaudio:
milestone: none → intrepid-alpha-4
Steve Langasek (vorlon)
Changed in pulseaudio:
importance: Medium → High
Revision history for this message
moschops (simon-waddington) wrote :

I can confirm that this bug occurs on Inspiron 700m with alpha 3 install - Salavan's fix https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/242966/comments/2 did not work but step 1 (only) of http://ubuntuforums.org/showthread.php?t=866965 did cure the problem after reboot.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pulseaudio - 0.9.10-2ubuntu2

---------------
pulseaudio (0.9.10-2ubuntu2) intrepid; urgency=low

  * debian/patches/0006-pcspkr-last.patch: Load the PC speaker as a sink
    after all other sound card sinks have been loaded. (LP: #242966)
  * debian/patches/0007-relibtoolize.patch: Regenerate relevant libtool
    bits, because even though libltdl7 is supposed to be API-compatible
    with libltdl3, the package FTBFs without regeneration.

 -- Luke Yelavich <email address hidden> Tue, 29 Jul 2008 16:07:18 +1000

Changed in pulseaudio:
status: Confirmed → Fix Released
Revision history for this message
Joachim Beckers (jbeckers) wrote :

I'm still experiencing the same static and cracking noises as before. setting this bug to new again.

Changed in pulseaudio:
status: Fix Released → New
Revision history for this message
Typhoe (spamistrash) wrote :

Hi,

I too had this problem.

The fix 'b) use "padevchooser" to select the proper ALSA sink for your sound card (full name available from the PulseAudio Manager)' suggested by Conn worked perfectly for me.
sink = alsa_output.pci_8086_284b_alsa_playback_0

Lenovo R61 with lastest intrepid kernel/packages (2.6.26-5 64bits).
**** Liste des PLAYBACK périphériques ****
carte 0: Intel [HDA Intel], périphérique 0 : AD198x Analog [AD198x Analog]
  Sous-périphériques: 1/1
  Sous-périphérique: #0: subdevice #0
carte 0: Intel [HDA Intel], périphérique 1 : AD198x Digital [AD198x Digital]
  Sous-périphériques: 1/1
  Sous-périphérique: #0: subdevice #0
carte 1: pcsp [pcsp], périphérique 0 : pcspeaker [pcsp]
  Sous-périphériques: 1/1
  Sous-périphérique: #0: subdevice #0

Regards,
Typhoe

Revision history for this message
Saivann Carignan (oxmosys) wrote :

pulseaudio (0.9.10-2ubuntu2) fixed this problem for my Dell inspiron 9300.

Revision history for this message
Hew (hew) wrote :

I undid my pcsp blacklist and restarted. I still got a bit of crackling while logging in, but the rest of the sound seems to work correctly through my sound card again. Triaging as this issue still exists.

pulseaudio/intrepid uptodate 0.9.10-2ubuntu2

Changed in pulseaudio:
status: New → Triaged
Revision history for this message
Saivann Carignan (oxmosys) wrote :

I confirm what Hew McLachlan says, the sound is now correct, but I always ear crackling sounds during login (it sounds like PC Speakers are initialized during login and produce a crackling sound for that reason).

Revision history for this message
Luke Yelavich (themuso) wrote : Re: [Bug 242966] Re: snd_pcsp can take precedence of soundcards

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The problem from the pulseaudio point of view is fixed, however the crackling is an alsa volume issue.

 affects ubuntu/pulseaudio
 status fixreleased

 affects ubuntu/alsa-utils
 status inprogress
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIlk1BjVefwtBjIM4RAgH9AKCqSb3tdaX2EWXohKiuLwee4FbKVwCfW/AA
MOtazNXOBnsGAUSL7O2nSFk=
=qGA4
-----END PGP SIGNATURE-----

Revision history for this message
Luke Yelavich (themuso) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The problem from the pulseaudio point of view is fixed, however the crackling is an alsa volume issue.

 affects ubuntu/pulseaudio
 status fixreleased

 affects ubuntu/alsa-utils
 status inprogress
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIlnEujVefwtBjIM4RAlL0AJ97sVN4YBBBSNFiujtu44uss1mMOACfc/X6
wqbFguM0rksK+Mos0gloZ7Q=
=aapo
-----END PGP SIGNATURE-----

Revision history for this message
Luke Yelavich (themuso) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

 affects ubuntu/pulseaudio
 status fixreleased
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIlnvjjVefwtBjIM4RAgmKAJ9RsKg1A1fCMFnjT2ktrmG6RVEnRwCfXEXg
QdFKSjoV4Xxb3KjDFlIz26k=
=f+Ic
-----END PGP SIGNATURE-----

Revision history for this message
Saivann Carignan (oxmosys) wrote :

Luke Yelavich : I'm changing the status for you, since it does not seem to work from your side.

Changed in pulseaudio:
status: Triaged → Fix Released
Changed in alsa-driver:
status: Invalid → In Progress
importance: Medium → Undecided
status: In Progress → Invalid
Changed in alsa-utils:
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package alsa-utils - 1.0.16-1ubuntu3

---------------
alsa-utils (1.0.16-1ubuntu3) intrepid; urgency=low

  * Really make the change to the init script to mute the PC speaker
    on initial start/reset. (LP: #242966)

 -- Luke Yelavich <email address hidden> Mon, 04 Aug 2008 15:22:31 +1000

Changed in alsa-utils:
status: In Progress → Fix Released
Revision history for this message
Saivann Carignan (oxmosys) wrote :

Luke Yelavich : This problem is currently not fixed for my laptop, a Dell inspiron 9300. I still ear the noisy sound for 1-2 seconds right after typing username and password in GDM. My laptop is under intrepid with all updates, including alsa-utils 1.0.16-1ubuntu3 .

Changed in alsa-utils:
status: Fix Released → New
Revision history for this message
Luke Yelavich (themuso) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Saïvann, try running "sudo /etc/init.d/alsa-utils reset pcsp" at a terminal. It sounds like the previously set volume is overwriting the defaults which it should do.

Then when you log in again, you should not hear the crackling.

Luke
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIl4k2jVefwtBjIM4RAiwoAKDMZSXBLYsrJKbCP80S3A9f7jQuvgCfXdPx
8SizOgjHh9aac3oJV15tWaU=
=+1et
-----END PGP SIGNATURE-----

Revision history for this message
Saivann Carignan (oxmosys) wrote :

Luke Yelavich : Unfortunately, sudo /etc/init.d/alsa-utils reset pcsp did not fix the problem for me. However, I did have PC Speaker volume set in gnome-mixer-applet. Setting to mute fix the problem. Should we consider the crackling sound at boot as a bug when PC Speakers are not set to mute? IMO, yes, but I might be wrong.

Revision history for this message
Luke Yelavich (themuso) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thats what my alsa-utils upload addressed, however for users who already have settings for the device, they will have to change it manually. It will fix things up for upgrades/fresh installs however.

 affects ubuntu/alsa-utils
 status fixreleased
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIl7WejVefwtBjIM4RAm0CAJ4mQovrtMSHn7iu/d67Yjx/hfLynACg5ehK
G8jsO2SItuTSaqJCu54rlPA=
=fVeF
-----END PGP SIGNATURE-----

Revision history for this message
Luke Yelavich (themuso) wrote :

Sigh, Launchpad's email code is broken. That used to work.

Changed in alsa-utils:
status: New → Fix Released
Revision history for this message
Saivann Carignan (oxmosys) wrote :

Indeed. Thanks a lot for your work and your time!

Revision history for this message
Matt Zimmerman (mdz) wrote :

I am still seeing this problem with pulseaudio 0.9.10-2ubuntu3:

Aug 6 23:08:24 perseus pulseaudio[32274]: alsa-util.c: Device hw:1 doesn't support 44100 Hz, changed to 37286 Hz.
Aug 6 23:08:24 perseus pulseaudio[32274]: alsa-util.c: Device hw:1 doesn't support 2 channels, changed to 1.
perseus:[/usr/share/sounds] lsmod G pcsp
snd_pcsp 19580 1
snd_pcm 97160 3 snd_pcsp,snd_hda_intel,snd_pcm_oss
snd 77896 18 snd_pcsp,snd_hda_intel,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device

Killing pulseaudio, unloading snd_pcsp and starting pulseaudio again fixes it.

Changed in pulseaudio:
status: Fix Released → New
Revision history for this message
Luke Yelavich (themuso) wrote :

Matt, do you mean you are seeing this in terms of still hearing crackling, or something else? If you are still hearing crackling, you need to load an alsa mixer, and mute the master volume for the pcsp card.

Revision history for this message
nullack (nullack) wrote :

Luke, my testing is showing that the issue is not fixed. Upon user logon from GDM, the pcspeaker buzzes unexpectedly. I understand you have some sort of work around, but user's expect the sound to "just work". Therefore the question is why does the default installation unexpectedly play a sound through the pc speaker on user login?

Also, I note that Fedora has the newer Pulse audio release which amongst other things features much better timing control for managing glitches. Fedora also has the latest release of ALSA, which Intrepid also does not have yet either.

Revision history for this message
Luke Yelavich (themuso) wrote :

nullack, perhaps you need to mute the PC speaker as I have explained a couple of times previously in this bug. If you still have the issue after you have muted the pc speaker card's master volume, then please let me know and I'll dig deeper.

Revision history for this message
nullack (nullack) wrote :

Luke, yes your right and I was mistaken. I muted the pcsp in my existing account which fixed that issue. I then conducted another test as I was concerned it might not default to no pcspeaker sound on a new user. So I created a new test user and no unexpected pc speaker sounds were played. Now on my usual account the mixer is crashing since muting the pcspeaker which Ive reported as a seperate issue. https://bugs.launchpad.net/ubuntu/+source/gnome-applets/+bug/255584

Revision history for this message
Matt Zimmerman (mdz) wrote :

On Wed, Aug 06, 2008 at 11:42:04PM -0000, Luke Yelavich wrote:
> Matt, do you mean you are seeing this in terms of still hearing
> crackling, or something else?

I am still seeing the original problem, described in the subject and
description fields of this bug. The crackling issue, if anyone still has
it, should be a separate bug to avoid confusing this one.

pulseaudio on my system is selecting the PC speaker, via snd_pcsp, in
preference to my actual sound device (snd_hda_intel).

--
 - mdz

Revision history for this message
Luke Yelavich (themuso) wrote :

On Thu, Aug 07, 2008 at 06:03:58PM EST, Matt Zimmerman wrote:
> pulseaudio on my system is selecting the PC speaker, via snd_pcsp, in
> preference to my actual sound device (snd_hda_intel).

Could you log the output of running pulseaudio in a terminal with "pulseaudio -vv? Sounds like another string that hal uses to identify the pc speaker to pulse which needs addressing, but I need a log to be sure.

Thanks.

Luke

Revision history for this message
Matt Zimmerman (mdz) wrote :

On Thu, Aug 07, 2008 at 11:40:27AM -0000, Luke Yelavich wrote:
> On Thu, Aug 07, 2008 at 06:03:58PM EST, Matt Zimmerman wrote:
> > pulseaudio on my system is selecting the PC speaker, via snd_pcsp, in
> > preference to my actual sound device (snd_hda_intel).
>
> Could you log the output of running pulseaudio in a terminal with
> "pulseaudio -vv? Sounds like another string that hal uses to identify
> the pc speaker to pulse which needs addressing, but I need a log to be
> sure.

I've looked at it more closely, and I seem to have a slightly different
problem. I'll follow up separately.

--
 - mdz

Revision history for this message
Luke Yelavich (themuso) wrote :

Given that Matt's issue appears to be something different, I think this bug is fixed.

Revision history for this message
Luke Yelavich (themuso) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

 affects ubuntu/pulseaudio
 status fixreleased
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFImvxTjVefwtBjIM4RAkW5AJ9OmXphy+FPXy/6E6cpdLC6bX9GLwCdGxop
5da/ZWpUCkAhD+RfAYZODE0=
=jlF4
-----END PGP SIGNATURE-----

Hew (hew)
Changed in pulseaudio:
status: New → Fix Released
Revision history for this message
Luke Yelavich (themuso) wrote :

Thanks Keve, looks like Launchpad's email interface is broken.

Revision history for this message
Darius Regnier (darius-regnier) wrote :

@Luke Yelavich: I tried to run
$ pulseaudio -k
and received the following error message:

    W: ltdl-bind-now.c: Failed to find original dlopen loader.
    E: main.c: Failed to kill daemon.

(that is verbatim)

 I killed all audio programs, (except the panel volume manager, do I need to kill that?)
If you don't know what I'm talking about, I was referred by you from bug #255787.

Revision history for this message
Martin Pitt (pitti) wrote :

I still get the squeaking sound when starting the live CD, so something is still using the pcspkr driver. Can somone else confirm this as well? Maybe we should just disable this totally useless kernel driver altogether (and restore the old one), instead of spreading workarounds all over the place?

Changed in pulseaudio:
milestone: intrepid-alpha-4 → ubuntu-8.10-beta
status: Fix Released → Confirmed
assignee: nobody → themuso
Revision history for this message
Martin Pitt (pitti) wrote :

I also proposed this in bug 246969.

Revision history for this message
Martin Pitt (pitti) wrote :

Luke, I subscribed you to bug 246969 for your input, let's discuss it there. If you are happy with the blacklisting, too, feel free to remove the workaaround hacks from alsa and pulse again.

Changed in pulseaudio:
status: Confirmed → Fix Released
Changed in alsa-driver:
status: Unknown → Fix Released
Revision history for this message
Adam Porter (alphapapa) wrote :

I'm using:

alsa-utils:
  Installed: 1.0.17-0ubuntu2
  Candidate: 1.0.17-0ubuntu2
  Version table:
 *** 1.0.17-0ubuntu2 0
        100 http://us.archive.ubuntu.com intrepid/main Packages
        100 /var/lib/dpkg/status

linux-image-generic:
  Installed: 2.6.27.5.5
  Candidate: 2.6.27.5.5
  Version table:
 *** 2.6.27.5.5 0
        100 http://us.archive.ubuntu.com intrepid/main Packages
        100 /var/lib/dpkg/status

I'm running Hardy but am testing the Intrepid kernel because of a few minor hardware issues with the Hardy kernel.

I just rebooted twice, and the first time the pcsp device was the primary ALSA device. artsd went nuts with CPU usage, causing it to quit because of CPU overload, and even after restarting artsd, I still couldn't get any sound out of Amarok. I rebooted the second time, and now the Intel HDA device is the primary ALSA device and sound is working fine.

Maybe this bug isn't completely fixed yet?

Changed in alsa-utils:
status: Fix Released → Confirmed
Revision history for this message
Matt Zimmerman (mdz) wrote :

On Mon, Oct 06, 2008 at 07:42:20AM -0000, Adam Porter wrote:
> I'm running Hardy[...]
> [...]
> Maybe this bug isn't completely fixed yet?

The bug is fixed in Intrepid. You're using the Intrepid kernel, but the
rest of your system is Hardy, so you don't have the bug fix (which wasn't in
the kernel, but in alsa-base and module-init-tools).

--
 - mdz

Changed in alsa-utils:
status: Confirmed → Fix Released
Revision history for this message
Vilk (vilkh3m) wrote :

on my HP Pavilion DV9870ew helps ony one thing:

sudo alsa force-reload

and then i got normal sound until next reboot

tags: added: iso-testing
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.