Ubuntu: Make ALSA default instead of PulseAudio
PulseAudio has still problems with some applications and it always adds a little latency and that's the reason, why so many people still prefer ALSA. This howto shows you, how to remove PulseAudio, add alsa-mixer applet to the panel and associate hotkeys for volume change.
1. Remove PulseAudio
This will uninstall PulseAudio, delete the configuration files and uninstall it's dependencies; gstreamer-10-pulseaudio, libpulse-browse0, libpeexdsp1, pulseaudio-esound-compat, pulseaudio-module-udev, pulseaudio-module-x11, pulseaudio-utils, rtkit and gnome-desktop (don't worry, it is dummy package):
sudo apt-get purge pulseaudio
2. Install alsa-mixer (volume) applet
PulseAudio removes volume applet, so you need new volume applet. For getting it to work, you need to intall the following packages: python, python-notify, python-gtk2, python-alsaaudio and xfce4-mixer or gnome-alsamixer (i preffer xfce4-mixer).
sudo apt-get install python python-notify python-gtk2 python-alsaaudio python-eggtrayicon xfce4-mixer
Download alsamixer-applet:
wget http://howto.blbosti.com/files/alsa/alsa_mixer_applet_1.1.tar.gz
Extract all files for example into /usr/local/bin direcotry:
sudo tar -C /usr/local/bin/ -xzvf alsa_mixer_applet_1.1.tar.gz
Make all files executable (if they're not):
cd /usr/local/bin sudo chmod +x alsa* sudo chmod +x volbar.py
If you want to use your keyboard's volume hotkeys, you have to set them in System > Preferences > Keyboard Shortcuts. Click Add
.
Name: ALSA Volume mute Command: /usr/local/bin/alsa_master_mute
Name: ALSA Volume down Command: /usr/local/bin/alsa_master_down
Name: ALSA Volume up Command: /usr/local/bin/alsa_master_up
Then click on Disabled
in the second column and map your hotkeys for these actions.
Finally the programs volbar.py and alsavol.py have to be set to start automatically. This can be set under System > Preferences > Startup Applications. Click Add:
Name: volbar Command: /usr/local/bin/volbar.py Name: alsavol Command: /usr/local/bin/alsavol.py
Note: If you have installed gnome-alsamixer instead of xfce4-mixer, you need to edit volbar.py
sudo gedit /usr/local/bin/volbar.py
Find the line 97 and replace xfce4-mixer to gnome-alsamixer:
subprocess.Popen("gnome-alsamixer")
Now restart your computer and test, if everything is working.
A click on the tray icon opens the slider.
Double-clicking opens the mixer.
Use hotkeys to change volume – these changes will be shown via libnotify.
Note: Unfortunately, this solution is not perfect, because Totem does not play audio and in Nautilus does not work audio preview on mouse over. If you have any other solution, please, let me know.
UPDATE
ThomasEgi wrote another solution:
Instead of removing pulseaudio you can also stop if from auto-restarting and simply killing it of with an auto-starter each time you login.
echo autospawn = no|tee -a ~/.pulse/client.conf && killall pulseaudio
After that, simply put killall plulseaudio into your autostart. You still need the alsa-mixer stuff and totem/audio-preview are also broken. but it’s quite useful for when you want to temporarily switch to alsa or any other sound system.
Files to download:
Edit: I found another way at webupd8.org.
Ulric kaka
23 Oct, 2020
Can Someone Do My Essay For Me
Oct 18, 2019 — Can someone do my essay for me. Students who have been invited to participate in the second half of all the information means that attempting …
Ulric kaka
23 Oct, 2020
namecheap
Low Prices, Easy Setup, Best Support. Get Started Now & Join the Namecheap Family Today. Hosting, WP & SSLs at Low Prices. Plus Free Privacy Protection Forever & 2 Months Email! Free WhoisGuard. #1 for Value Vs. Others. Trusted With 10m+ Domains.
Ulric kaka
23 Oct, 2020
Hire Professional To Take My Online Classes
If you’re wondering, Can I pay someone to take my online class for me, we can help. We take your online classes, tests, assignment & homework with top …
Ulric kaka
24 Oct, 2020
Furniture Stores in Orlando
Orlando & Central Florida Furniture. With 2 locations in Orlando, you don’t have to drive far to shop a wide variety of home furnishings, mattresses, and home …
Ulric kaka
3 Nov, 2020
coffee shop
Thank you so much for this amazing blog
Ulric kaka
11 Dec, 2020
MINUTE BOXING WORKOUT FOR HOME
It’s time to crush calories with this boxing workout created by the founder of Prevail Boxing, LA’s premier fitness boxing studio
Ulric kaka
11 Dec, 2020
Lucidchart Group Buythe best online graphing tool that makes drawing charts quick and easy. Quick flowcharts, company graphs, wireframes