Ubuntu

removing pulseaudio breaks sound control

Reported by Psy[H[] on 2009-10-02
86
This bug affects 18 people
Affects Status Importance Assigned to Milestone
gnome-media (Ubuntu)
Wishlist
Unassigned

Bug Description

Binary package hint: gnome-media

After removing pulseaudio I've lost sound control. There is no sound applet, mixer or sound hotkey handler.

This is a serious blow in modularity, usability and freedom of choice when usability of a system depends on unnecessary package providing bells and whistles.

There are reasons for pulseaudio removal:
Low cpu resources that should not be uselessly wasted (netbooks and old computers)
Pulseaudio, as an additional component, adds noticeable latency.
Current alsa can handle multiple sound sources without wasting cpu, without latency and without tweaking. That is the essence of a sound system. anything else should be optional.
Removing pulseaudio is also known as a solution to many sound problems:
http://www.ubuntumini.com/2009/09/fix-most-audio-problems-remove.html

Psy[H[] (vovik-wfa) wrote :

Workaround:

To increase, decrease and mute master volume, one can bind these commands to media keys with standard gnome tool:
amixer sset Master 5+
amixer sset Master 5-
amixer sset Master toggle

As for the mixer, xfce4-mixer is the best gtk mixer out there. It is basically the same thing that once was in gnome.

tolostoi (tolostoi) wrote :

Same here :(, please give some solution for this issue. Sound with pulseaudio is terrible to me. Maybe, there is a way to use older mixer ui with alsa, but i don't know how.

Thelamer (ryankuba) wrote :

I can confirm this, running the latest updates of karmic and I had to purge pulseaudio.

When I try to launch it I get this;

** (gnome-volume-control:2437): WARNING **: Connection failed, reconnecting...

I need to use ALSA to play most games in Wine.

It looks like this sound manager only works with pulseaudio, also looks like this is more of a gnome 2.2 thing than anything specific to Ubuntu.

Thelamer (ryankuba) wrote :

Found a workaround. For anyone listening. (and this is assuming you already purged pulseaudio)

# sudo apt-get install linux-sound-base alsa-base alsa-utils alsa-oss gnome-alsamixer

Now you need asoundconf;

# wget http://bazaar.launchpad.net/~crimsun/asoundconf-ui/asoundconf-trunk/download/head%3A/asoundconf-20070710013131-u0ilplzisbkiiyt2-1/asoundconf

# sudo chown root:root asoundconf

# sudo chmod 755 asoundconf

# sudo mv asoundconf /usr/bin/

# asoundconf list

Names of available sound cards:
YOUR CARD1
YOUR CARD2

# asoundconf set-default-card YOUR CARD1

Now you will need to tweak your volume settings from Applications> sound and video> GNOME ALSA Mixer

All that is left is I need to figure out how to get the mixer into the dock. If anyone knows how to do this please update this bug report.

ALSA Lives on!!!!!!!

Psy[H[] (vovik-wfa) wrote :

Suggested packages are already installed, except alsa-oss. Gnome-alsamixer is old and does not handle some options correctly. It is better to use xfce4-mixer, it is up to date and fully functional, its dependencies are rather small in size. On systems with one sound card there is no need in asoundconf. Also See comment #1.

In this thread:
http://ubuntuforums.org/showthread.php?t=1284219&page=3
there is a python script that puts a simple volume control in the tray/panel. I've also posted a more complete solution there, but it's somewhat complicated.

Psy[H[] (vovik-wfa) wrote :

Can jaunty's gnome-media package be rebuild with different prefixes and names? At least gnome-volume-control binary from jaunty works on karmic. But with lack of some graphical resources, like icons.

Sebastien Bacher (seb128) wrote :

> Can jaunty's gnome-media package be rebuild with different prefixes and names?

it could but the current team is understaffed for the number of bugs already so will rather spend efforts improving what ubuntu is using in the default installation that working on that but you are welcome to pick the task and get it to universe too

jimpop (jimpop) wrote :

Sebastien, That raises the very valid question of why make so many significant changes from Jaunty with such a understaffed department?

Sebastien Bacher (seb128) wrote :

> That raises the very valid question of why make so many significant changes from Jaunty with such a understaffed department?

we don't do so many significant changes we should distribute new version of software were people did those changes, the other option would be stay on old versions which is probably not better either

Alessio Gaeta (meden) wrote :

Actually, maybe there is another way to deal with that issue: build a gnome-media*-[alsa|nopulse] package from the same source but with --disable-pulseaudio in configure options.
That way, the old-fashion gnome-volume-control is built, but for some reason the gnome-volume-control-applet isn't (but it seems to work tough... I could continue to use the stale one after reinstalling my personal no-pulseaudio version of gnome-media*.deb). Though, even that could be addressed building a gnome-mixer-applet package from gnome-applets source, using the configure option --enable-mixer-applet (building a new package permit to not modify the current gnome-applets, built with pulseaudio support in mind); so one gets the old mixer applet too (but I still haven't tried it).
And all that without "forward-ports".

Sebastien Bacher (seb128) wrote :

not a bug

Changed in gnome-media (Ubuntu):
importance: Undecided → Wishlist
status: New → Invalid
status: Invalid → New
importance: Wishlist → Low
summary: - [karmic] removing pulseaudio breaks sound control
+ removing pulseaudio breaks sound control
Sebastien Bacher (seb128) wrote :

That's not a bug but a design decision from upstream and not something ubuntu will change now, closing the bug, you are free to use universe mixer controling alsa though there is plenty of those

Changed in gnome-media (Ubuntu):
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
status: New → Invalid
Sebastien Bacher (seb128) wrote :

the changes described before would be quite some extra packaging efforts and break upgrades since the mixer applet wouldn't be replaced on upgrade and duplicate the new one, it's easier to install universe mixers for those who want those

Changed in gnome-media (Ubuntu):
assignee: Ubuntu Desktop Bugs (desktop-bugs) → nobody
importance: Low → Wishlist
status: Invalid → Incomplete
status: Incomplete → Invalid
status: Invalid → Incomplete
status: Incomplete → Invalid
Psy[H[] (vovik-wfa) wrote :

and what about keyboard shortcuts? adding custom commands is not a very clean workaround.

Sebastien Bacher (seb128) wrote :

you are on your own about this one, the gnome-settings-daemon codebase is totally different and both can't be built there

Psy[H[] (vovik-wfa) wrote :

The fact that removing unnecessary component breaks basic functions, points out that current design is really flawed.
If I remove compiz, metacity will not go berserk because of that.
But such rabid forcing of incomplete and buggy soundsystem is really surprising.
While pulseaudio can't properly emulate and replace alsa and oss interfaces for every app, and while it gives latency up to ten (!) times as massive as pure alsa (https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/294666), there should be a choise!

Psy[H[] (vovik-wfa) wrote :

Which component now handles XF86Audio*Volume buttons by default? is in possible to manually change associated commands there instead of creating custom actions in gnome-keybindings-properties?

Sebastien Bacher (seb128) wrote :

gnome-settings-daemon handle those keys and it's not easy to change it since it's not a command run but a service running and handling lot of settings in GNOME, efforts would be better spent making sure pulseaudio works correctly for everybody since that's where the linux world is aligning anyway nowadays

tolostoi (tolostoi) wrote :

Real problem is not just the mixer :(
Pulseaudio don't work with 5.1 sound properly. When switch to 5.1 sound from default mixer (this one, the new mixer and pulseaudio installed) I hear sound artefacts (just adjust volume up or down and ugliest sound is here). Audacious play ugly too when pulseadio is installed ( enjoy alsa plugin, volume up or down to reproduce). VLC player too have issue when pulse is installed, switching output to alsa, not the solution, menus with multichanel audio switch is inactive ... and maybe more apps have similar problems when pulse is installed. When remove pulseaudio apps working correct with alsa, except totem - totem has no sound :(. This affect totem-mozilla and everything in browser is broken (video, audio, online tv ...)

01:08.0 Multimedia audio controller: Creative Labs SB Live! EMU10k1 (rev 0a)

I think in debian sid have a patch for this (but I'm not sure, in debian never had probelms with alsa)
 totem (2.28.1-2) unstable; urgency=low

   [ Emilio Pozuelo Monfort ]
   * debian/patches/02_use_gconf_audio_sink.patch:
     - Don't try to use PulseAudio inconditionally, use the user defined
       one from GConf instead. Closes: #548260.

   [ Josselin Mouette ]
   * Add missing shlibs:Depends in totem-mozilla.

 -- Josselin Mouette <email address hidden> Sat, 24 Oct 2009 12:29:50 +0200

Psy[H[] (vovik-wfa) wrote :

another examples: launching zynaddsubfx either breaks playback for everything else, or sound does not work in it.
Launching it with padsp results in garbled sound.
...but the real problem is not the mixer, but volume control: there is no volume control from panel and keyboard without pulseaudio, and there is a strange behavior of volume control in pulseaudio which mess with PCM channel.
And the problem above all - is a straight-out forcing.

Sebastien Bacher (seb128) wrote :

Could you stop spamming this closed bug now, if you have issues with pulseaudio open bugs against it rather that would be constructive

Dmitry Tsigelnik (tsigelnik) wrote :

I've got the same problem. Sebastien, you should acknowledge that a lot of people have problems after upgrading the system.
PulseAudio is a crap. I don't really understand why I need this nonworking between application and ALSA.
All multimedia applications can output sound through ALSA directly. ALSA has all features to watch movies and listen to music.
Why when I upgrade the system I get nonworking system?
PulseAudio shpould be optional by default!!!
Let geeks make brainf...cking with PulseAudio. I wanna get working system when I upgrade Ubuntu.
Pulseaudio had problems, has now and will have in a future. I'm sure with that

Cheers

Psy[H[] (vovik-wfa) wrote :

I agree that fixing pulseaudio is a constructive course of action.
But: I disagree with "no bug - no problem" policy. In this case closed bug does not mean that problem isn't there!
And second: I am fully agree with Dmitry: pulseaudio is just bells and whistles that should be *optional*! Jaunty was ideal in this: it worked both with and without pulseaudio, without dirty hacks.
The title of this bug defines the problem precisely!

Sebastien Bacher (seb128) wrote :

Insulting people is not how you get them to work on your issues, nobody deny that pulseaudio has issues and it has been talked over and over all over the place, the ubuntu team doesn't have ressources to undo GNOME changes which force the pulseaudio use and decided to work with the people writting the code rather than against them there which is the constructive thing to do

Adict (gitas) wrote :

Great..this is all just great. Now my favorite native game is broken and the FPS drop is extreme..good job

Dmitry Tsigelnik (tsigelnik) wrote :

I've migrated to Xubuntu. It doesn't use PulseAudio and runs much faster

Having this problem too. 5.1 output in Pulseaudio makes sound "damaged", so I removed PA. ALSA sound is clean, but no volume control applet, so I can't control volume from my keyboard (there is volume whell).

gene (eugenios) wrote :

I am experiencing the same problem. Pulseaudio has been bad to my architecture since it was released. What I am amazed at iis the fact that before pulseaudio, once the card was configured with alsa the setup was very stable. I could run any application with no problem. THen comes pulseaudio that breaks linphone or ekiga all of a sudden. Then after all we get this features fraught " piece-of-art" pulseaudio offering a lot of "options". With all these options I see my applications refuse to communicate every once in a while. This time more of them, even good-ol mplayer is a "whiner".

These all are minor nuisances one can tolerate, however, when pulseaudio gives me a system crash, this is a way too much . It should be exterminated.
Now the question is, how to build gnome-media package without pulseaudio? I keep getting errors concerning install-doc all the time. Some *xml and *omf files seem to not exist in the ubuntu gnome-media source.
was anyone lucky there?

Michał Gołębiowski (mgol) wrote :

For people disappointed with PulseAudio - see:
http://ubuntuforums.org/showpost.php?p=8130297&postcount=25
Those scripts allow You to have a fully functional Karmic sound setup without PulseAudio.

First, execute the following in a terminal:
$ sudo apt-get purge libcanberra-pulse pulseaudio pulseaudio-esound-compat pulseaudio-module-bluetooth pulseaudio-module-gconf pulseaudio-module-udev pulseaudio-module-x11 gstreamer0.10-pulseaudio pulseaudio-utils pavucontrol
$ sudo apt-get install gnome-alsamixer alsa-oss python-alsaaudio

Then, unpack those 5 files somewhere (but it's better not to change the location later), add:
python /PATH/TO/alsavol.py
python /PATH/TO/volbar.py
(You can also run them in a current instance by pressing Alt+F2 twice and writing there those commands)

At last, open "System -> Settings -> Keyboard Shortcuts" and add a custom shortcut key named "alsa mute" and command "/PATH/to/alsa_master_mute" and assign the mute key to this command. Do the same for "down" and "up".

Instructions thanks to richie2.0. :)

P.S. Remember to change sound setup in all applications from pulse to alsa (e.g. in (s)mplayer, vlc, VirtualBox etc.).

P.S.2. I tried pulse, I used it with Karmic for a month, but it caused so many troubles for me that I decided I don't want to fight with this any longer.

Eddward (eddward) wrote :

Sorry if I'm missing something, but doesn't removing the packages in step one also remove thing like the desktop package? Won't that break you on updates or upgrades?

Psy[H[] (vovik-wfa) wrote :

ubuntu-desktop is a metapackage, that does not contain anything. It is safe to remove it.
You can then just mark it for installation to see if something new was added to it's dependencies, and then decide if you want to install this something manually, without actually installing ubuntu-desktop.

Eddward (eddward) wrote :

Psy, thanks for the help, but before I go down that unsupported of a route, I'll go back to Gentoo. I switched to Ubuntu because I was getting tired of doing so much work to roll my own. I didn't expect to be so broken by the switch.

You have Ubuntu closing bugs saying you have to use Pulse Audio and if there's a problem go pester them. Then you have Pulse Audio say they won't support you (or at least my) card and if you don't like it, don't use Pulse Audio. It appears to me that this problem will not be fixed because no one will take responsibility for the damage done. The developers making decisions are quite rude about it and the broken users have been push way past any reasonable level of patients.

At this point it just a matcher of getting the situation documented so users who experience future problems don't set their expectations too high too soon. Linux is now in another period of unreliable sound. It's been over a decade for me since I last saw something like it. But it's all over the floor and the current developers will not address it.

gene (eugenios) wrote :

I agree with the last two paragraphs of post #33.

The increased instability of Ubuntu scares me, since it is a real threat to new users. Although I get frustrated myself, I have some experience of fixing things even when the problem does not follow a "common -nix logic". I have brought a number of users to Ubuntu so far, however, this influx may be jeopardized by the issues like pulseaudio. Personally, I do get it when it is a new card and does not have to be stable. What if it has been stable with alsa/oss/esd before? I hope pulseaudio is not being nice just to me and most users especially newbies are not hurt...

What is more disappointing is there is less and less ALTERNATIVES out there. I am not ready for it...

However, I posted it earlier concerning some other pulseaudio issues https://bugs.launchpad.net/bugs/439815 . I was able to build gnome-media package without pulseaudio:
deinstall it first then
To rebuild gnome-media-2.28.1 from source: download and unpack the source package. cd to the directory. You will have to do "sudo apt-get build-dep gnome-media", with which pulseaudio libs could be also be installed, it is harmless I guess at this point. Then configure like this.

 ./configure --disable-pulseaudio --enable-gstmix --enable-gstprops --enable-grecord --disable-scrollkeeper
  Then I used "fakeroot make" with "checkinstall" to compile and build it.

 I can now run gnome-volume-control with oss and/or alsa mixers... However, I still get issues with the notification area applets on GNOME. Rhythmbox is acting up, perhaps, becuase it uses pulse as the output, I got amarok, audacious, xmms and mplayer instead :)
 Nevertheless, haven't had any system locks (which most likely were due to pulseaudio server) ever since I removed the package.
Hope, it helps some

Psy[H[] (vovik-wfa) wrote :

Currently you can solve the problem in karmic:
1. Remove pulseaudio and gstreamer0.10-pulseaudio.
2. upgrade from this ppa: https://launchpad.net/~dtl131/+archive/ppa
3. remove the new volume applet, corrupted with pulseaudio, from gnome-session-properties.
4. add restored old volume control applet to panel.
5. set input and output to alsa in gstreamer-properties.
6. make sure the key /desktop/gnome/sound/default_mixer_tracks in gconf contains desired channel to control with keyboard. Usually it is the "Master" channel. You can look for the name in alsamixer.

everything should work fine then.

Changed in gnome-media (Ubuntu):
status: Invalid → Confirmed

I've changed the status of this bug to "confirmed" for one simple reason: More than one person has reported the same error with the same symptoms. You can add me to that list as well - ripping that pulseaudio crap from my system fixed my sound problems.

Sebastian, you claim the Ubuntu team doesn't have the resouces to adapt, but you're forgetting the core philosophy of open source:

If entity A can't fix/do/undo something in their project, but entity B can, then entity A should accept and merge entitiy B's changes into the official project.

At least a few people have come up with procedures that effectively solve the problem.

There are now 36 comments on this bug, most of which are either complaints or responses to those complaints. How many does there need to be to get something changed!?

Sebastien Bacher (seb128) wrote :

Not sure about what entity you are speaking about there but upstream and ubuntu would probably happy to review any constructive changeset, and no undoing the work done in the recent cycles to go back to an old, buggy and unmaintained codebase is not a solution we would be wanting to use there, calling things crap doesn't help to make your point either

closing the bug again since that's not a bug but a design decision, you are welcome to work fixing the issue though and submitting changes to allow flexibility as long as they don't lead to breaking the current user experience or going back to unmaintained codebases

Changed in gnome-media (Ubuntu):
status: Confirmed → Invalid
Sebastien Bacher (seb128) wrote :

you should also not use the number of comments as a metric there, 36 comments is a pretty low count compared to some other bugs and that just shows that the current audio stack has still issues, which is something we know about, not that going back to old technologies rather than fixing what we have now and going forward is the way to solve those

Psy[H[] (vovik-wfa) wrote :

No one here suggests to go back to old technologies. There is nothing to go back to. ALSA is still Ubuntu's soundsystem. And it will stay there in the future. The point is to have a choice to switch off unnecessary component - pulseaudio, just like compiz and other bells&whistles: one choice - one click.

Eddward (eddward) wrote :
Download full text (5.0 KiB)

Sebastien can correct me if I'm wrong or out of line, but I don't think the problem is that anyone is against having a check-box to switch off pulse audio. The problem is that pulseaudio was developed or added in a way that makes the actual work of enabling and disabling it a lot more complicated than flipping a switch. Right now it actually involves removing packages and perhaps build new ones that can be installed to replace some of the removed ones. Looking at just the dependants of the pulseaudio package shows that you'll need new non-pulseaudio dependent versions of things like openjdk-6-jre (aka java) and even ubuntu-desktop. On top of that you may need the dependents of openjdk-6-jre to be modified to work with the non-pulseaudio dependent openjdk-6-jre.

It would be nice if a set of packages could be built to support running with or without pulseaudio. It sounds like that is not a priority for Ubuntu's developers. Maybe they would be willing to accept them if the community provided it. At the very least it could live out in universe. (I'm not sure if that's the right term for it.) Frankly, I've got the impression that the way that Gnome or Pulseaudio are being developed makes this more and more difficult, but I'm not sure about that. Basically it sounds like making pulseaudio work for those users/hardware for whom it can work requires a setup that completely breaks sound for users/hardware for whom pulseaudio cannot or will not support. 'The Perfect Pulse Audio Installation' provided by the pulseaudio developers does not allow for a user to turn off pulseaudio. You could run pasuspender but it will kill sound for everything that's been forced to only support pulseaudio to work in 'The Perfect Pulse Audio Installation'.

Related to a question I had on launch pad, I have started to investigate what packages would need non-pulseaudio dependent versions to allow a working system without pulseaudio enabled. I haven't pursued it much yet because I'm not sure if the work will be welcomed by the devs or not. Also any code contributions coming from me right now would have to be considered legally encumbered. I can try to address that, but it has the potential to cause me difficulties that I'm not will to risk unless I know I won't be fighting against the Ubuntu devs. If the work is sure to be rejected, I have other things to do. Swimming against the stream is not a hobby of mine.

At a high level, I think the plan should be something like:

    1. List dependants.
       Build a tree of packages dependent on the pulseaudio related packages. (dependants, dependants of dependants, etc) We can use the dependants field in the deb files. It may not be right in all cases, but it's a start.

    2. Drop pulseaudio dependant features and related packages.
       Determine which of the dependant packages are just not needed if you are not running pulseaudio. Pulseaudio is required for various sound related feature that are 'bells & whistles' like bluetooth support. With pulseaudio removed those features and the packages that implement them simply cannot work.

        - Are there any packages that must be removed if pulseaudio is ...

Read more...

Daniel Letzeisen (dtl131) wrote :

As you may have seen in other bugs, I've been working on rebuilding some packages for those running without pulseaudio: https://launchpad.net/~dtl131/+archive/ppa
ALSA users will be interested in the gnome packages. OSS/4 users will also want the canberra packages.
NOTE: don't install the portaudio packages right now. I'm still hacking them to get portaudio to work with OSS4.

This command will help you set gstreamer properties:
gstreamer-properties

Are there other programs in Karmic that are configured at build time to only use pulse? Please let me know. I saw openjdk6 mentioned, but that can be reconfigured without rebuilding (look in /etc/java-6-openjdk/sound.properties file)

Alexey Osipov (lion-simba) wrote :

Dave, thanks for your work! It helps a lot. I have full control of my Creative SB Audigy card again.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers