LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   LinuxQuestions.org Member Success Stories (https://www.linuxquestions.org/questions/linuxquestions-org-member-success-stories-23/)
-   -   How to successfully disable pulseaudio on a systemd distro (https://www.linuxquestions.org/questions/linuxquestions-org-member-success-stories-23/how-to-successfully-disable-pulseaudio-on-a-systemd-distro-4175610714/)

aus9 07-27-2017 06:58 AM

How to successfully disable pulseaudio on a systemd distro
 
Hi

PA=pulseaudio
There a number of people who still prefer Alsa. This howto can also work for those distros that have a working /etc/rc.local and use BSD init or sysV init. The current distro I use has systemd but also a rc.local service

step one
########
Confirm you have a working /etc/rc.local and rc.local setup, run as local user is OK

Code:

systemctl is-enabled rc.local
if your response is disabled then you need to enable.
On my distro a response of "static" is OK
--means will be used if its changed

Code:

ls -al /etc/rc.local
first permission of rwx, if not executable change it by (assuming you can get root powers by sudo)

Code:

sudo chmod 755 /etc/rc.local
step two
########

copy all system file to local user unless you know all users of PC want PA disabled,
run as local user
Code:

cp /etc/pulse/* ~/.config/pulse
step three
##########
edit .config/pulse/client.conf (as a local user) by removing the ; and change yes to no so one line reads as
Quote:

autospawn = no
save the file and exit.
--For those wanting multiple users to be affected edit /etc/client.conf

step four
########
use root powers to edit /etc/rc.local
so that you place the line above the exit 0 line so it reads

Quote:

killall pulseaudio
exit 0
step five
#########
full reboot

open terminal as a local user
if alsamixer command returns pulseaudio in the output you might need to do more

run htop and press F3 and start typing pul....it should show red meaning it is not running

http://imgur.com/a/txidR

if you get hit, you may need full pathway to killall
OR
your rc.local is not set up correctly

Code:

alsamixer
may show analog or hdmi

but that is a different howto

aus9 07-27-2017 07:04 AM

depending on distro, step four may need full pathway to run killall

one way to find it is

Code:

sudo updatedb
locate killall

Also if you try to run pavucontrol it should now fail.
Also any volume applet in your panel that normally interfaces with PA will now fail.
but VLC and better players still support alsa so you can still play audio or dvds
but FF will no longer play youtube


All times are GMT -5. The time now is 08:28 PM.