Toshiba NB30500F pulseaudio problem

Bug #574137 reported by jim_charlton
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Binary package hint: pulseaudio

Toshiba NB305007 netbook. Ubuntu 10.04 LTS - lucid. 2.6.32.21-generic, running ubuntu-netbook-remix. Problem with pulseaudio (1:0.9.22~0.9.21+stable-queue-32-g8478-0ubuntu14) . Boot machine and open a gnome-terminal window. At the CLI, hit backspace. You will hear the normal ping/bong. Hit the backspace key a few more times and the sound suddenly changes to a scratchy peep, or may disappear altogether. If I wait 10 seconds the sound returns to normal but repeatedly hitting the key causes the same effect. If I play a song using Rhythmbox the sound goes crappy after a few minutes. Or I can purposefully make it go bad by hitting the backspace key a few times in the gnome terminal window.

I have tried all of the common remedies of adding asus-mode4 to the end of the options snd-hda-intel line in /etc/modprobe.d/alsa-base.conf. I tried many different combinations of default-fragments and default-fragments-size-msec in /etc/pulse/daemon.conf, all to no avail.

If I purge pulseaudio (apt-get purge pulseaudio) and reboot, the sound is fine although some other sound things do not work as expected (no volume control). But rhythmbox, sound recorder and twinkle all work.

NOTE: Purging pulseaudio removes ubuntu-desktop, ubuntu-netbook and ubuntu-netbook remix. But rebooting brings the machine up just fine.

If I reinstall pulseaduio, the problems come back... leading me to believe that the problem is with pulseaudio.

Any help or ideas would be much appreciated. Thanks

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: pulseaudio 1:0.9.22~0.9.21+stable-queue-32-g8478-0ubuntu14
ProcVersionSignature: Ubuntu 2.6.32-21.32-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-21-generic i686
AlsaVersion:
 Advanced Linux Sound Architecture Driver Version 1.0.22.1.
 Compiled on Apr 14 2010 for kernel 2.6.32-21-generic (SMP).
AplayDevices:
 **** List of PLAYBACK Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: ALC272 Analog [ALC272 Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
Architecture: i386
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: ALC272 Analog [ALC272 Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: jim 1171 F.... pulseaudio
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0x40a00000 irq 30'
   Mixer name : 'Realtek ALC272'
   Components : 'HDA:10ec0272,1179ff30,00100001'
   Controls : 18
   Simple ctrls : 11
Date: Sun May 2 18:41:51 2010
InstallationMedia: Ubuntu-Netbook-Remix 9.10 "Karmic Koala" - Release i386 (20091028.4)
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_CA.utf8
 SHELL=/bin/bash
SourcePackage: pulseaudio
dmi.bios.date: 01/14/2010
dmi.bios.vendor: TOSHIBA
dmi.bios.version: V1.30
dmi.board.name: NPVAA
dmi.board.vendor: TOSHIBA
dmi.board.version: 1.00
dmi.chassis.asset.tag: *
dmi.chassis.type: 10
dmi.chassis.vendor: TOSHIBA
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnTOSHIBA:bvrV1.30:bd01/14/2010:svnTOSHIBA:pnTOSHIBANB305:pvrPLL3AC-00F014:rvnTOSHIBA:rnNPVAA:rvr1.00:cvnTOSHIBA:ct10:cvrN/A:
dmi.product.name: TOSHIBA NB305
dmi.product.version: PLL3AC-00F014
dmi.sys.vendor: TOSHIBA

Revision history for this message
jim_charlton (charltn) wrote :
Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 574137] Re: Toshiba NB30500F pulsesduio problem

Try adding the following line to /etc/modprobe.d/alsa-base.conf and
rebooting:

options snd-hda-intel position-fix=1

On May 2, 2010 10:10 PM, "jim_charlton" <email address hidden> wrote:

** Attachment added: "AlsaDevices.txt"
  http://launchpadlibrarian.net/47418562/AlsaDevices.txt

** Attachment added: "BootDmesg.txt"
  http://launchpadlibrarian.net/47418564/BootDmesg.txt

** Attachment added: "Card0.Amixer.values.txt"
  http://launchpadlibrarian.net/47418565/Card0.Amixer.values.txt

** Attachment added: "Card0.Codecs.codec.0.txt"
  http://launchpadlibrarian.net/47418566/Card0.Codecs.codec.0.txt

** Attachment added: "CurrentDmesg.txt"
  http://launchpadlibrarian.net/47418567/CurrentDmesg.txt

** Attachment added: "Dependencies.txt"
  http://launchpadlibrarian.net/47418568/Dependencies.txt

** Attachment added: "PciMultimedia.txt"
  http://launchpadlibrarian.net/47418569/PciMultimedia.txt

** Attachment added: "ProcCpuinfo.txt"
  http://launchpadlibrarian.net/47418570/ProcCpuinfo.txt

--
Toshiba NB30500F pulsesduio problem
https://bugs.launchpad.net/bugs/574137
You received this bu...

Revision history for this message
Daniel T Chen (crimsun) wrote :

Sorry, that's position_fix not position-fix (note the underscore).

On May 2, 2010 10:24 PM, "Daniel Chen" <email address hidden> wrote:

Try adding the following line to /etc/modprobe.d/alsa-base.conf and
rebooting:

options snd-hda-intel position-fix=1

>
> On May 2, 2010 10:10 PM, "jim_charlton" <email address hidden> wrote:
>
>
> ** Attachment added: "...

>
>
> --
> Toshiba NB30500F pulsesduio problem
> https://bugs.launchpad.net/bugs/574137
You received this bu...

Revision history for this message
jim_charlton (charltn) wrote : Re: Toshiba NB30500F pulsesduio problem

Daniel: I tried your suggestion (add position_fix=1 to the options snd-hda-intel line in /etc/modprobe.d/alsa-base.conf). If anything, it makes it worse.

I posted this problem to Ubuntu forums earlier today and one other user reported the same problem. I can make do with the applications that I need by just removing pulseaudio but would sure like to solve the problem.

Am willing to do some testing if you can think of anything else.

summary: - Toshiba NB30500F pulsesduio problem
+ Toshiba NB30500F pulseaudio problem
description: updated
Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 574137] Re: Toshiba NB30500F pulsesduio problem

Is this problem reproducible with linux-alsa-driver-modules-$(uname
-r) from ppa:ubuntu-audio-dev? Please note that you may need to do one
or more of the following: ensure you're running the release kernel
(not the one from lucid-proposed); remove the position_fix=1 quirk.

Revision history for this message
jim_charlton (charltn) wrote :

I added the ppa:ubuntu-audio-dev to the repository and then 'apt-get update' and 'apt-get install linux-alsa-driver-modules-2.6.32-2-generic'. I then rebooted. No joy. so I did an 'apt-get upgrade' which upgraded the pulseaudio packges as well. Rebooting unfortunately did not work any better. Sorry.

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 574137] Re: Toshiba NB30500F pulseaudio problem

On Mon, May 3, 2010 at 12:48 AM, jim_charlton <email address hidden> wrote:
> apt-get install linux-alsa-driver-
> modules-2.6.32-2-generic

This package doesn't exist. Which package did you use?

Revision history for this message
jim_charlton (charltn) wrote :

Sorry. Typo. It was the 2.6.32-21-generic package. Here are the last two entries in /var/log/apt/history.log.

Start-Date: 2010-05-02 21:37:13
Install: linux-alsa-driver-modules-2.6.32-21-generic (2.6.32-21.201004280600)
Remove: linux-backports-modules-alsa-2.6.32-21-generic (2.6.32-21.11), linux-backports-modules-alsa-lucid-generic (2.6.32.21.22)
End-Date: 2010-05-02 21:38:20

Start-Date: 2010-05-02 21:40:40
Upgrade: pulseaudio (0.9.22~0.9.21+stable-queue-32-g8478-0ubuntu14, 0.9.22~0.9.21+stable-queue-32-g8478-0ubuntu15~~lucid~ubuntuaudiodev2), libpulse-mainloop-glib0 (0.9.22~0.9.21+stable-queue-32-g8478-0ubuntu14, 0.9.22~0.9.21+stable-queue-32-g8478-0ubuntu15~~lucid~ubuntuaudiodev2), pulseaudio-module-bluetooth (0.9.22~0.9.21+stable-queue-32-g8478-0ubuntu14, 0.9.22~0.9.21+stable-queue-32-g8478-0ubuntu15~~lucid~ubuntuaudiodev2), pulseaudio-module-x11 (0.9.22~0.9.21+stable-queue-32-g8478-0ubuntu14, 0.9.22~0.9.21+stable-queue-32-g8478-0ubuntu15~~lucid~ubuntuaudiodev2), pulseaudio-utils (0.9.22~0.9.21+stable-queue-32-g8478-0ubuntu14, 0.9.22~0.9.21+stable-queue-32-g8478-0ubuntu15~~lucid~ubuntuaudiodev2), pulseaudio-module-gconf (0.9.22~0.9.21+stable-queue-32-g8478-0ubuntu14, 0.9.22~0.9.21+stable-queue-32-g8478-0ubuntu15~~lucid~ubuntuaudiodev2), libpulse0 (0.9.22~0.9.21+stable-queue-32-g8478-0ubuntu14, 0.9.22~0.9.21+stable-queue-32-g8478-0ubuntu15~~lucid~ubuntuaudiodev2), libpulse-browse0 (0.9.22~0.9.21+stable-queue-32-g8478-0ubuntu14, 0.9.22~0.9.21+stable-queue-32-g8478-0ubuntu15~~lucid~ubuntuaudiodev2), pulseaudio-esound-compat (0.9.22~0.9.21+stable-queue-32-g8478-0ubuntu14, 0.9.22~0.9.21+stable-queue-32-g8478-0ubuntu15~~lucid~ubuntuaudiodev2)
End-Date: 2010-05-02 21:41:11

Revision history for this message
jim_charlton (charltn) wrote :

This bug is similar to that of bug #551949. The sound goes bad.... but... if one waits a few seconds, with no audio playing, it will then be fine for a while. If it goes bad (popping, distorted), it will not cure itself unless all sound apps are turned off for a while. For me, playing a system sound a few times will make it go bad. The author of bug #551949 said he cured it by adding model=3stack-dig to the options snd-hda-intel line in /etc/modprobe.d/alsa-base.conf. This does not cure the problem for me.

BUT... I get the following in /var/log/syslog when I play a sound (good or bad sound).

May 4 18:09:28 jim-nb kernel: [ 9629.058423] ALSA hda_intel.c:1665: azx_pcm_prepare: bufsize=0x3700, format=0x4011
May 4 18:09:28 jim-nb kernel: [ 9629.058453] ALSA hda_codec.c:1158: hda_codec_setup_stream: NID=0x2, stream=0x5, channel=0, format=0x4011
May 4 18:09:28 jim-nb kernel: [ 9629.065698] ALSA hda_codec.c:1158: hda_codec_setup_stream: NID=0x3, stream=0x5, channel=0, format=0x4011
May 4 18:09:28 jim-nb kernel: [ 9629.073872] ALSA hda_intel.c:1665: azx_pcm_prepare: bufsize=0x3700, format=0x4011
May 4 18:09:28 jim-nb kernel: [ 9629.073902] ALSA hda_codec.c:1158: hda_codec_setup_stream: NID=0x2, stream=0x5, channel=0, format=0x4011
May 4 18:09:28 jim-nb kernel: [ 9629.081712] ALSA hda_codec.c:1158: hda_codec_setup_stream: NID=0x3, stream=0x5, channel=0, format=0x4011
May 4 18:09:35 jim-nb kernel: [ 9635.626236] ALSA hda_codec.c:1176: hda_codec_cleanup_stream: NID=0x2
May 4 18:09:35 jim-nb kernel: [ 9635.626260] ALSA hda_codec.c:1176: hda_codec_cleanup_stream: NID=0x3
May 4 18:09:35 jim-nb kernel: [ 9635.626346] ALSA hda_codec.c:1176: hda_codec_cleanup_stream: NID=0x2
May 4 18:09:35 jim-nb kernel: [ 9635.626362] ALSA hda_codec.c:1176: hda_codec_cleanup_stream: NID=0x3

I do not get this on another machine running pulseaudio on Lucid.

The author of Bug #551949 also reported similar log messages.

On a fresh boot the user.log contains...

May 4 19:29:37 jim-nb pulseaudio[1147]: alsa-util.c: Disabling timer-based scheduling because high-resolution timers are not available from the kernel.
May 4 19:29:37 jim-nb pulseaudio[1147]: alsa-util.c: Disabling timer-based scheduling because high-resolution timers are not available from the kernel.
May 4 19:29:38 jim-nb pulseaudio[1173]: pid.c: Daemon already running.
May 4 19:29:38 jim-nb pulseaudio[1147]: alsa-sink.c: ALSA woke us up to write new data to the device, but there was actually nothing to write!
May 4 19:29:38 jim-nb pulseaudio[1147]: alsa-sink.c: Most likely this is a bug in the ALSA driver 'snd_hda_intel'. Please report this issue to the ALSA developers.
May 4 19:29:38 jim-nb pulseaudio[1147]: alsa-sink.c: We were woken up with POLLOUT set -- however a subsequent snd_pcm_avail() returned 0 or another value < min_avail.

Similar things were seen in the previous bug's log...

Does any of this help point to a possible area for investigation?

Revision history for this message
jim_charlton (charltn) wrote :

Just another small observation. I can trigger the sound distortion by playing a system sound (hit the back arrow a few times rapidly at the prompt in a gnome-terminal window). The sound distortion will persist with any new sound apps trying to produce sounds UNTIL all sound apps cease for 5 seconds and one sees in the /var/log/syslog the lines.

May 4 18:09:35 jim-nb kernel: [ 9635.626236] ALSA hda_codec.c:1176: hda_codec_cleanup_stream: NID=0x2
May 4 18:09:35 jim-nb kernel: [ 9635.626260] ALSA hda_codec.c:1176: hda_codec_cleanup_stream: NID=0x3
May 4 18:09:35 jim-nb kernel: [ 9635.626346] ALSA hda_codec.c:1176: hda_codec_cleanup_stream: NID=0x2
May 4 18:09:35 jim-nb kernel: [ 9635.626362] ALSA hda_codec.c:1176: hda_codec_cleanup_stream: NID=0x3

or similar... as outlined in the message above. After these "codec_cleanup" lines appear, the sound returns to normal and may be good for some time. Note that these "codec_cleanup" lines appear in the log only 5 seconds after all sound apps cease producing sound. Any help?

Revision history for this message
c. mehlis (mehlis-deactivatedaccount) wrote :

hey jim,

i am christian from Bug #551949;)

i reverted my fixing, so i think we see the same problem on our machines!
i think this IS a bug in the alsa driver.

could you please do:
$ cat /proc/asound/card0/codec#* | grep Codec

to check that you have "Codec: Realtek ALC662 rev1"

Revision history for this message
jim_charlton (charltn) wrote :

Just for the record.... You can see from my original bug posting that my system had a Realtek ALC272 card.

Unfortunately (or perhaps fortunately) the screen on my NB30500F died (backlight ceased to function). I plan on replacing the unit soon with an identical one. It will take me a day or two to install Ubuntu. I will report back as to whether identical sound problems occur for a completely new install on a new machine.

Revision history for this message
Guillaume Charron (g-charron) wrote :

Hello Jim, I have exactly the same problem although just lowering and increasing the volume or switching from one application to another (say Skype to rythmbox) will suffice to start the scratching audio. Another thing I notice, When audio is poor if I go to

 System -> Sound -> Hardware
and set the Settings for the selected device:
Profile: to off
then put it back to Analog Stereo Duplex

The quality temporarily comes back to good/excellent.

I do know if this helps in anyway (that is my first ever contribution to the Linux community).

Cheers

Revision history for this message
jim_charlton (charltn) wrote :

The Toshiba NB305 that I had was replaced (by the dealer) as the screen backlight ceased to function on the first machine after I had it for about 2 weeks. I installed Ubuntu Netbook Edition10.04 (http://www.ubuntu.com/getubuntu/download-netbook) on the new machine from a USB drive. I had some mundane problems getting the drive partitioned as I wanted but in the end it installed OK. I used apt-get to update and upgrade and dist-upgrade. The machine booted very slowly so I changed the SATA drive setting in the BIOS to "compatibility" from AHCI. I also changed the GRUB_CMDLINE_LINUX_DEFAULT line in /etc/default/grub to
GRUB_CMDLINE_LINUX_DEFAULT="nohz=off highres=off". The machine now boots quickly. Unfortunately it does not recover from suspend (closing the cover)... but that is another issue that I have to work on. The previous installation on the other machine would wake up just fine.

When booting from the live USB drive, I checked the sound and it was fine. I could not make it fail. After I installed Ubuntu Netbook Edition on the hard drive (as outlined above) the sound was just fine. It has yet to fail. So the sound problem that I observed previously on the other machine and installation must have been configuration related.

Sorry that I can no longer be of any help in debugging the previous problem. It the problem comes back I will repost.

Revision history for this message
jim_charlton (charltn) wrote :

Ahhhh... my bad. The NB305 does suspend OK after altering /etc/default/grub (see message above). I just forgot to "update-grub"! So, everything now works.

Revision history for this message
jim_charlton (charltn) wrote :

Further to the pulseaudio problem on the Toshiba NB305...

After doing a fresh install of Lucid there was no problem with the audio. But I believe it was just after installing "twinkle" that the audio went back to being bad just like on the previous machine. Same symptoms exactly. Using apt-get purge twinkle did not restore the audio to its original state.

I I boot from the USB drive to the live-iso then the audio is fine indicating that the problem is configuration dependent. But I have no idea what was changed or how it screwed up the audio. I am not too keen on wiping the disk and doing another installation. Anybody have any idea what configuration files might have been screwed up?

Revision history for this message
jim_charlton (charltn) wrote :

Just to clear the air a bit.... and make sure that I am not misleading anyone with false impressions.... (often the case)...

I took my Toshiba nb305 and wiped the Ubuntu partition and reinstalled lucid 10.04 from a USB key as previously. I tried the sound by turning on the system sound (Ubuntu), opening a terminal window and holding down the back arrow at the CLI prompt. The sound is fine.

Now I
1) sudo gedit /etc/default/grub
2) Change: GRUB_CMDLINE_LINUX_DEFAULT="splash nohz=off highres=off"
3) save and sudo update-grub

I have to do this to get the machine to boot quickly and to suspend/re-awaken when I close/open the lid. I cannot change the SATA BIOS parameter to compatibility from AHCI as I am dual booting with Windows 7 and using compatibility instead of AHCI craps up my Windows partition.

But here is the catch 22. After putting nohz=off and highres=off on the GRUB command line, the sound no longer works!!!! It appears to have had nothing to do with Twinkle installation (see messages above). If I remove the highres=off from the command line, the sound becomes normal.... but then I can't recover from suspend.

So.... What do the nohz=off and highres=off parameters do? Is highres=off turning off high resolution timers? Why does the sound get restored to normal when I shut off pulseaudio? Can I compile pulseaudio in a way such that it is not susceptible to these high resolution timer issues?

Revision history for this message
Luis_M (2luis) wrote :

I have the same problem in my netbook toshiba nb305

Revision history for this message
Daniel T Chen (crimsun) wrote :

nohz controls dyntick, aka "tickless kernel". It's an infrastructure to fire the timer only when necessary, thereby lowering power consumption. PulseAudio's default glitch-free mode (tsched=1) was designed to work well with it and, in doing so, exposes a host of hardware and driver bugs.

Disabling high resolution timers forces pulse to fall back to a less precise method of updating buffering.

When you disable pulse, you revert to the older ALSA infrastructure that is interrupt-driven, not timer-driven as pulse uses.

The first thing to test is whether the 21 May snapshot of l-a-d-m in the ppa resolves your symptoms. You need to keep position_fix=1.

Revision history for this message
jim_charlton (charltn) wrote :

Thanks Daniel: As it turns out putting nohz=off and highres=off on the kernel line of the Toshiba NB305 solves two problems and causes a couple of other problems. The machine won't boot (or boots very slowly (several minutes) with nohz and highres on. The machine won't suspend and resume again with them on (important for opening and closing the lid). With them off, pulseaudio won't work and the machine runs hot with a shorter battery life. So the problem is not just with the audio.

NOTE: With nohz and highres on (the default) pulseaudio works fine! So there really is no problem with pulseaudio with the highres timers running and nohz turned on. My only problem with pulseaudio is when nohz and highres are turned off.

Did you mean for me to try the latest builds to see if pulseaudio would work with highres and nohz off??? Pulseaudio already works fine with them turned on.

When I get some time... I will try the latest builds.

Revision history for this message
Luis_M (2luis) wrote :

Hi every one. Sorry for my basic English. I think I could resolve the problem. I download from the Software Center of Ubuntu the "PulseAudio preference".

 After installing, then i go to menu system>preference>pulseAudio preference. In PulseAudio Preference I go to "simultaneous output" and check the box "add a virtual output device for simultaneous release of all the board of local sounds".

 After I go to menu system>preference>sound and go to "output". In "output", I check the box "Simultaneous output to audio interno Analog Stereo". Try This!

Revision history for this message
jim_charlton (charltn) wrote :

I can confirm that the solution of Luis Miguel does stop the audio distortion while leaving pulseaudio running.

For those that want to use this solution you may have to install "paprefs" (sudo apt-get install paprefs) and run it, if it is not in your system->preferences menu. After making the first change, I had to reboot before the new menu item appeared in "output" tab of the sound preferences app.

But what does making this change "do"? :-) I assume that nohz and highres are still "off". Are they? I have them off on my machine... so pulseaudio is still using "a less precise method of updating buffering" as Daniel said (see Message 19).

Revision history for this message
Tyler Gannon (tgannon) wrote :

Luis_M, thanks a bunch. This also fixed the problem for me.

Revision history for this message
jim_charlton (charltn) wrote :

A solution/workaround has been found for booting Ubuntu on a Toshiba nb305 without the "nohz=off highres=off" kernel parameters. See https://bugs.launchpad.net/ubuntu/+source/linux/+bug/508516. Pulseaudio then works fine without checking the "Simultaneous output to Internal Audio Analog Stereo".

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thank you for reporting this bug to Ubuntu.
Ubuntu 10.04 (lucid) reached end-of-life on May 9, 2013.

See this document for currently supported Ubuntu releases:
https://wiki.ubuntu.com/Releases

Please upgrade to the latest version and re-test.

Changed in pulseaudio (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for pulseaudio (Ubuntu) because there has been no activity for 60 days.]

Changed in pulseaudio (Ubuntu):
status: Incomplete → Expired
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.