After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 588947 - gnome-volume-control chews up 40% CPU after switching applications
gnome-volume-control chews up 40% CPU after switching applications
Status: RESOLVED NOTGNOME
Product: gnome-media
Classification: Deprecated
Component: gnome-volume-control
2.27.x
Other All
: Normal critical
: ---
Assigned To: gnome media maintainers
gnome media maintainers
Depends on:
Blocks:
 
 
Reported: 2009-07-18 12:19 UTC by susancragin
Modified: 2009-07-26 14:41 UTC
See Also:
GNOME target: ---
GNOME version: 2.27/2.28


Attachments
Use g_timeout_add_seconds for idle_reconnect (1.05 KB, patch)
2009-07-18 15:23 UTC, Chris Coulson
committed Details | Review

Description susancragin 2009-07-18 12:19:46 UTC
Please describe the problem:
I go from running Dragon NaturallySpeaking under wine to Firefox, enter an application that needs sound, and suddenly my system starts churning purposelessly. I go to system monitor and find that gnome-volume-control is running at 40% CPU. 
I modified my system to purge pulseaudio because I hate pulseaudio and wine runs better without it. So I have purged pulseaudio. But purging it does not remove its dependencies, as I have found to my sorrow. 

Steps to reproduce:
1. sudo apt-get --purge remove pulseaudio
2. sudo apt-get install esound
3. try to run firefox


Actual results:
Some firefox plug-ins look for pulseaudio, triggering gnome-volume-control, which then runs at 40% CPU. 

Expected results:
I would expect that purging pulse would remove all dependencies, including libraries and gnome-volume control, but it doesn't. 

Does this happen every time?
Yes. 

Other information:
The simple solution would be to have ALL pulseaudio programs removed by the "purge" command in apt-get.
Comment 1 Bastien Nocera 2009-07-18 13:24:56 UTC
This isn't a GNOME problem. File it with your distribution.
Comment 2 Marc-Andre Lureau 2009-07-18 13:30:34 UTC
Bastien, it looks like NOFAIL busy loop the applet in some situations: if you remove PulseAudio, it continuously try to autospawn it.

We could certainly be less aggressive. Not sure how yet. Any idea?
Comment 3 Bastien Nocera 2009-07-18 13:57:17 UTC
(In reply to comment #2)
> Bastien, it looks like NOFAIL busy loop the applet in some situations: if you
> remove PulseAudio, it continuously try to autospawn it.
> 
> We could certainly be less aggressive. Not sure how yet. Any idea?

The gnome-volume-control(-applet) should be removed when this fail. Makes no sense to have a mixer that depends on PA if it's not installed. I don't see this as a GNOME problem but as a distribution problem.

Comment 4 Chris Coulson 2009-07-18 15:23:50 UTC
Created attachment 138675 [details] [review]
Use g_timeout_add_seconds for idle_reconnect

I agree with elmarco about perhaps making the reconnect loop slightly less agressive. I've just tested this patch which registers idle_reconnect with a g_timeout_add_seconds (5 second timeout) rather than g_idle_add, and the CPU usage is negligible then in the situation that the original reporter describes.

(The 5 second figure is just plucked from thin air. I suspect the CPU usage would still be negligible even with a 500ms delay)
Comment 5 vincenzo_ml 2009-07-21 16:57:44 UTC
It does not seem ubuntu specific in the end or is it? If so please update the status as soon as possible.
Comment 6 Bastien Nocera 2009-07-21 17:06:57 UTC
(In reply to comment #5)
> It does not seem ubuntu specific in the end or is it? If so please update the
> status as soon as possible.

That wouldn't fix the problem that your distribution allows you to remove pulseaudio and renders the volume control useless (because it doesn't have anything to control anymore...)
Comment 7 Dave Lentz 2009-07-24 01:39:35 UTC
Is this really resolved? I'm currently using Ubuntu Karmic with OSS4 and experiencing the same problem. Shouldn't the GNOME volume control have a basic gstreamer backend as a failsafe in case the system doesn't want/have/need PulseAudio?
Comment 8 Lukas Hejtmanek 2009-07-26 08:45:05 UTC
(In reply to comment #6)

> That wouldn't fix the problem that your distribution allows you to remove
> pulseaudio and renders the volume control useless (because it doesn't have
> anything to control anymore...)
> 

whose idiocy made gnome-media things to rely only on the pulseaudio crap?

how can I use gnome-media without the pulseaudio? It used to work in previous versions but not in 2.27.x. 
Comment 9 Marc-Andre Lureau 2009-07-26 10:20:15 UTC
(In reply to comment #8)

> how can I use gnome-media without the pulseaudio? It used to work in previous
> versions but not in 2.27.x. 

./configure --enable-gstmix 

Comment 10 Marc-Andre Lureau 2009-07-26 10:20:56 UTC
(In reply to comment #4)
> Created an attachment (id=138675) [edit]
> Use g_timeout_add_seconds for idle_reconnect
>

please commit, and close this bug, thanks
Comment 11 Lukas Hejtmanek 2009-07-26 11:59:25 UTC
(In reply to comment #9)
> (In reply to comment #8)
> 
> > how can I use gnome-media without the pulseaudio? It used to work in previous
> > versions but not in 2.27.x. 
> 
> ./configure --enable-gstmix 
> 

ok, thanks. my apologies, the ubuntu is here the one to blame.
Comment 12 Lukas Hejtmanek 2009-07-26 13:52:31 UTC
(In reply to comment #9)
> (In reply to comment #8)
> 
> > how can I use gnome-media without the pulseaudio? It used to work in previous
> > versions but not in 2.27.x. 
> 
> ./configure --enable-gstmix 
> 

so, it does not help.

I can run gnome-volume-control now, it obviously uses gstreamer, OK. But gnome-volume-control-applet still tries to connect to pulseaudio crap, only the hell knows why using IPv6 protocol.
Comment 13 Bastien Nocera 2009-07-26 14:16:59 UTC
(In reply to comment #12)
<snip>
> so, it does not help.

gnome-media doesn't ship an applet that uses GStreamer.

> I can run gnome-volume-control now, it obviously uses gstreamer, OK. But
> gnome-volume-control-applet still tries to connect to pulseaudio crap, only the
> hell knows why using IPv6 protocol.

You'll need to start dropping the attitude, otherwise we'll have you barred from Bugzilla. If you want to vent your frustration, take it to forums, not here.
Comment 14 Lukas Hejtmanek 2009-07-26 14:23:10 UTC
(In reply to comment #13)
> (In reply to comment #12)
> <snip>
> > so, it does not help.
> 
> gnome-media doesn't ship an applet that uses GStreamer.

but it used to, right? Or what has changed since 2.24 which worked just fine without pulseaudio? If so, is there a way how to revert it?
Comment 15 Chris Coulson 2009-07-26 14:26:54 UTC
Lukas - nothing changed. As pointed out, gnome-media never shipped a GStreamer applet. The GStreamer applet that you used to use was the mixer applet, shipped in gnome-applets. We've disabled that applet in Ubuntu now and chosen to use the gnome-media applet instead.
Comment 16 Lukas Hejtmanek 2009-07-26 14:31:12 UTC
(In reply to comment #15)
> Lukas - nothing changed. As pointed out, gnome-media never shipped a GStreamer
> applet. The GStreamer applet that you used to use was the mixer applet, shipped
> in gnome-applets. We've disabled that applet in Ubuntu now and chosen to use
> the gnome-media applet instead.

OK, thank you for explanation, so it seems that Ubuntu now cannot live without pulse audio, it is a pity.