2.10.14

How to disable pulseaudio and enable dmix on XUbuntu 14.04.1 LTS

  • Remove the pulseaudio server package only, leaving the libraries in place
  • Create a new file in your home directory called .asoundrc
  • Paste the following inside it:

pcm.!default {
  type plug
  slave {
    pcm {
      type asym
      playback {
        pcm {
          type dmix
          ipc_key 1024
          slave {
            pcm {
              type hw
              card 0
            }
            period_time 0
            period_size 512
            periods 8
            rate 44100
          }
          bindings {
            0 1
            1 0
          }
        }
      }
      capture {
        pcm {
          type dsnoop
          ipc_key 1025
          slave {
            pcm {
              type hw
              card 0
            }
            period_time 0
            period_size 512
            periods 8
            rate 44100
          }
          bindings {
            0 1
            1 0
          }
        }
      }
    }
  }
}

ctl.!default {
  type hw
  card 0
}


  • Reboot.

22.6.12

How to disable PulseAudio and enable dmix on Fedora 17

As root do:
chmod -x /usr/bin/pulseaudio
Then as your normal user do:
cd ~ && vi .asoundrc
Press the "i" key and copy and paste the following into vi's window:
pcm.!default {
    type plug
    slave.pcm "mix"
}

ctl.!default {
    type hw
    card 0
}

pcm.mix {
    type asym
    playback.pcm "mixout"
    capture.pcm "mixin"
}

pcm.mixout {
    type dmix
    ipc_key 1024
    ipc_key_add_uid true
    slave {
        pcm "hw:0"
        period_size 1024
        buffer_size 4096
    }
    bindings {
        0 1
        1 0
    }
}

pcm.mixin {
    type dsnoop
    ipc_key 1025
    ipc_key_add_uid true
    slave {
        pcm "hw:0"
        period_size 1024
        buffer_size 4096
    }
    bindings {
        0 1
        1 0
    }
}
Press the ESC key, type ":wq" and press enter.

Reboot and enjoy your PC that now runs at least as good as it used to before a sad clown called Lennart Poettering got hired at RedHat.

For refinements you can look into:
http://www.alsa-project.org/alsa-doc/alsa-lib/pcm_plugins.html
It's rather hard to read but with the above asoundrc file as a starting point you should be able to set up your audio the way you want. Do not attempt to uninstall PulseAudio packages like others suggest because that will bring down half of the system for no particular reason.

To revert to PulseAudio, as root do:
chmod +x /usr/bin/pulseaudio
Then as your normal user do:
cd ~ && rm .asoundrc
But I hope that with this info you'll never have to rely on that braindead, unfixable pile of junk ever again.