PulseAudio working weird, suspected of crashing the system

Questions about hardware,drivers and peripherals
Forum rules
Before you post please read this

PulseAudio working weird, suspected of crashing the system

Postby imploder on Fri Sep 04, 2009 6:33 pm

Since I installed Mint (Gloria) on my laptop HP 4710s, I have problems with sound. At first sound didn't work at all - this was solved by adding a line at the end of the /etc/modprobe.d/alsa-base.conf file - this one:
Code: Select all
options snd-hda-intel model=laptop

With this, sound works. The problem is, sometimes it does not: I always hear sound in the headset if I plug it in, however not always in the speakers. After each boot, speakers either work or does not; it seems random.

My soundcard info is this:
Code: Select all
petr@teltak ~ $ aplay -l
**** Seznam PLAYBACK Hardwarových zařízení ****
karta 0: Intel [HDA Intel], zařízení 0: AD198x Analog [AD198x Analog]
  Podzařízení: 1/1
  Podzařízení #0: subdevice #0
karta 1: HDMI [HDA ATI HDMI], zařízení 3: ATI HDMI [ATI HDMI]
  Podzařízení: 1/1
  Podzařízení #0: subdevice #0


I found this for AD198* in /usr/share/doc/alsa-base/driver/ALSA-Configuration.txt.gz
Code: Select all
   AD1884A / AD1883 / AD1984A / AD1984B
     desktop   3-stack desktop (default)
     laptop   laptop with HP jack sensing
     mobile   mobile devices with HP jack sensing
     thinkpad   Lenovo Thinkpad X300

Tried all of them in alsa-base.conf, only "laptop" gives any sound in the speakers (after a "lucky" boot).

Even when speakers are not working, sound is visible in PulseAudio's Volume Meter (Playback). Thus the problem must be in the driver that controls the speakers.

There is another issue, which I believe is caused by PulseAudio: sometimes, when I launch something, the system freezes (complete freeze - the terminals don't work, only the power button or Alt+SysRq+REISUB is a solution). Examples of this:
- Opening a video file (in Totem) sometimes freezes the computer (sometimes it works OK - not dependent on whether the speakers are working or not).
- Launching allegro-demo (a simple example game for the Allegro library) always freezes the computer (I've tried it several times).
- When I experimented with Wine, trying to run CS 1.6 non-steam (I gave it up, Wine devs refused to help with an illegal game version), the computer froze

All these cases happen when doing something with sound, so I think it is related with the sound issues I described. The system has never crashed otherwise. Probably PulseAudio somehow crashes the system.

So I am looking for a solution: for the speakers to work and for the computer to not freeze. Either with PulseAudio or without it. I don't need its network features and such so I think ALSA would be just fine. I've read removing PulseAudio is not trivial and haven't found any guide for Mint; furthermore I'm not sure if removing PulseAudio would solve the problem and I don't want to break the system. Setting the device to ALSA (or anything else) instead of automatic detection in the sound preferences on the control panel does not help.

I considered to switch to Debian testing, which does not have PulseAudio by default, though that would be a pity as I'd have to leave Mint. I'd like better to fix these issues in Mint, if that's possible. The whole area of sound on Linux is quite confusing, as described in this article: http://glyph.twistedmatrix.com/2009/01/ ... linux.html
imploder
Level 1
Level 1
 
Posts: 15
Joined: Sat Jul 11, 2009 8:50 pm

Linux Mint is funded by ads and donations.
 

Re: PulseAudio working weird, suspected of crashing the system

Postby Jay514 on Fri Sep 04, 2009 8:55 pm

I have searched for your hardware But, it did not return many results & none of the issues that you explain.

There is a " Sound Problem - How To " Guide posted in the forums with a lot of info Here ( viewtopic.php?f=42&t=32293 )

I don't know if you have checked ubuntu fourms, but it is probably worth your while to look at the post "Comprehensive Sound Problem Solutions Guide v0.5e "
here ( http://ubuntuforums.org/showthread.php? ... s+no+sound ) It is full of info & worth a try,

Hope this helps,
Jay514 :mrgreen:
Image
" Do Not Do Wrong Twice,That Which You Could Have Done Right The First Time"

Main = HP Pavilion DV4-1275mx - OS=Mint_CE x64KDE/LXDE,& x64Kubuntu
User avatar
Jay514
Level 5
Level 5
 
Posts: 658
Joined: Wed Mar 25, 2009 2:14 pm
Location: Atlanta GA USA

Re: PulseAudio working weird, suspected of crashing the system

Postby igorzwx on Tue Sep 08, 2009 5:32 pm

"I am looking for a solution: for the speakers to work and for the computer to not freeze. Either with PulseAudio or without it."

It is not difficult to get rid of PulseAudio.
Remove the evil and all problems may disappear.

see:
viewtopic.php?f=48&t=32173
Page 1 and 2
igorzwx
Level 5
Level 5
 
Posts: 599
Joined: Sat Sep 05, 2009 3:13 pm

Re: PulseAudio working weird, suspected of crashing the system

Postby imploder on Sat Sep 26, 2009 7:33 am

I disabled pulseaudio using these instructions: http://idyllictux.wordpress.com/2009/04 ... io-at-bay/

It solved the problem: sound works fine with ALSA. Speakers always work, so does recording. With PulseAudio there also was a problem that I didn't mention: in dosbox when playing Prince of Persia 2 the sound was rambling so it was horrible to hear. Now with ALSA it just works perfectly.

The computer has not crashed when playing a video or doing anything else since then.

However, there is one exception to this: the Allegro library demo that crashed the computer with PulseAudio still crashes it with ALSA. If I run allegro-demo, this is what happens:

1. after launching the file /usr/games/all-demo, an error message "Error initialising sound. No supported synth type found." appears
Image
2. I confirm (OK), then the game's intro screen appears
Image
3. Then the crash comes. The screen changes to text mode, showing this:
Image
4. The screen goes black. While power is still on, the computer does not react to anything, not even Alt+SysRq+REISUB.

All this happens in a few seconds, without pressing anything.

Other examples (launched through /usr/bin/allegro-examples) do work, those with sound give the same error window ("Error initialising sound. No supported synth type found.") and terminate (without crashing the system).

I do not particularly need this game nor the library itself. I wanted to learn some of allegro (I originally had it on Windows XP, where sound and the example game worked well). This is very discouraging - not only it does not work properly on Linux Mint, it also can crash the system (that's not what any program in the userspace should be able to do -- it's a kernel problem).
imploder
Level 1
Level 1
 
Posts: 15
Joined: Sat Jul 11, 2009 8:50 pm

Re: PulseAudio working weird, suspected of crashing the system

Postby imploder on Tue Oct 13, 2009 6:06 pm

Now with just ALSA, after it seemed working reliably, sound again occasionally does not go from speakers. Restarting ALSA (sudo /etc/init.d/alsa-utils restart) does not fix it, nor does initializing it (alsactl init), nor starting another X session (with another user). Only reboot is a solution.

If I plug something:
- If it's the headphones (the small ones): Sound works in them (even in the case of internal laptop speakers not working described above), but it goes in JUST ONE headphone. This always happens - I haven't found a way to have them both emit sound. IIRC with PulseAudio this was OK.
- If it's the external speakers: In the case of sound working in the laptop's internal speakers (i.e. NOT in the case of internal laptop speakers not working described above) sound goes from both of them. This time when I checked (now the internal laptop speakers DON'T work) the external speakers plugged don't work either, they only crackle as I change volume on the speaker.

Again this problem (not the sound-in-just-one-headphone one; that is simply broken) looks random.
BTW another such seemingly random thing: after waking up from RAM suspend (on battery, about 50%), the dialog showed up, I entered the password and then the computer completely froze (no reaction even to Alt+SysRq+REISUB). Note that before and after that incident, I did RAM suspend and wake-up many times without any problem.
One of my friends commented when he saw it that Linux is likely programmed so that it randomly fails, to not be so good. It indeed looks like that.
imploder
Level 1
Level 1
 
Posts: 15
Joined: Sat Jul 11, 2009 8:50 pm

Re: PulseAudio working weird, suspected of crashing the system

Postby mick55 on Tue Oct 13, 2009 6:40 pm

Some soundcards does not work after the computer has been suspended or hibernated.
This is a known bug.

Can you restart sound with this command?

Code: Select all
sudo alsa force-reload


If your problem is with the suspend or hibernate feature, there are workarounds.
Things are more like they are now than they ever were before.

Dwight D. Eisenhower (1890 - 1969)
User avatar
mick55
Level 7
Level 7
 
Posts: 1507
Joined: Fri Sep 25, 2009 2:47 am

Re: PulseAudio working weird, suspected of crashing the system

Postby imploder on Thu Oct 15, 2009 5:03 pm

"sudo alsa force-reload" indeed helps. It restores the sound.

Suspending the computer in RAM and then waking up does not necessarily stop sound (I tried now). All I can say about how sound stopped working today is that it simply happened - I left the laptop for a while (black screen but didn't suspend it) and when I returned sound did not work. I might experiment with it when I have time; so far, the cause is uncertain. At least now I can revive it without rebooting. Thanks.
imploder
Level 1
Level 1
 
Posts: 15
Joined: Sat Jul 11, 2009 8:50 pm

Re: PulseAudio working weird, suspected of crashing the system

Postby mick55 on Thu Oct 15, 2009 8:54 pm

that's great news imploder.

If you narrow the problem down to being a suspend or
hibernation issue, start a new thread and we can work
to resolve it.

cheers
mick
Things are more like they are now than they ever were before.

Dwight D. Eisenhower (1890 - 1969)
User avatar
mick55
Level 7
Level 7
 
Posts: 1507
Joined: Fri Sep 25, 2009 2:47 am

Linux Mint is funded by ads and donations.
 

Return to Hardware Support

Who is online

Users browsing this forum: No registered users and 11 guests