# Is there a slick way to deinstall Pulseaudio without buggering the system?



## PhenomII (Jun 24, 2010)

Greetings,
 I'm afraid I inadvertently overlooked a checked box for pulseaudio on an install of Gnome2. SO _of course_ I have no sound.  I've spent a couple of days trying everything I could find - both here, and abroad to see if I could actually make pulseaudio function - to no avail. So now completely exhausted. I find myself hoping for a simple solution to ferret out the ports built against pulseaudio and performing maybe a portupgrade(1) -C <offending ports>. Which will give me a new set of sound drivers/apps with*out* pulseaudio dependencies. I realize ports(7) also provides the nuts & bolts to accomplish this task. But I'm afraid at this point my mind is mush. I just spent the last 2.5hrs. trying to figure out the coloration of pins vs. nids vs seq vs ... on the SND_HDA(4). But I had zero success understanding how one could arrive at any commonality - it looked _completely_ arbitrary. I completely understand _hard_ wiring. I understand using a common "ground" for amp's that support it, and in the case of "op amps" there is no "common", but rather two separate amps, which provides two separate circuits. However, in spite of the fact that they are labeled *+* and *-*, they are *not* positive, and negative - it's essentially an AC circuit.
I digress...

Anyway, if anyone would care to throw me a rope/bone, I'd *greatly* appreciate it.

Thank you for all your tima and consideration.

P.S. For those who need to know:

```
[color="Red"]# cat /dev/sndstat[/color]
FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64)
Installed devices:
pcm0: <HDA Realtek ALC892 PCM #0 Analog> (play/rec) default
pcm1: <HDA Realtek ALC892 PCM #1 Analog> (play/rec)
pcm2: <HDA Realtek ALC892 PCM #2 Digital> (play)
```


```
[color="Red"]# uname -a[/color]
FreeBSD l400.ultimatedns.NET 8.1-PRERELEASE FreeBSD 8.1-PRERELEASE #0: Mon Jun 21 05:02:48 PDT 2010
root@l400.ultimatedns.NET:/usr/obj/usr/src/sys/XIII amd64
```


```
[color="Red"]# sysctl -a hw.snd[/color]
hw.snd.vpc_reset: 0
hw.snd.vpc_0db: 45
hw.snd.vpc_autoreset: 1
hw.snd.latency_profile: 1
hw.snd.latency: 5
hw.snd.report_soft_matrix: 1
hw.snd.report_soft_formats: 1
hw.snd.compat_linux_mmap: 0
hw.snd.feeder_eq_exact_rate: 0
hw.snd.feeder_eq_presets: PEQ:16000,0.2500,62,0.2500:-9,9,1.0:44100,48000,88200,96000,176400,192000
hw.snd.feeder_rate_quality: 1
hw.snd.feeder_rate_round: 25
hw.snd.feeder_rate_max: 2016000
hw.snd.feeder_rate_min: 1
hw.snd.feeder_rate_polyphase_max: 183040
hw.snd.feeder_rate_presets: 100:8:0.85 100:36:0.92 100:164:0.97
hw.snd.vpc_mixer_bypass: 1
hw.snd.verbose: 0
hw.snd.maxautovchans: 16
hw.snd.default_unit: 0
hw.snd.version: 2009061500/amd64
hw.snd.default_auto: 0
```


```
[color="Red"]# pciconf -lv[/color]
hostb0@pci0:0:0:0:	class=0x060000 card=0x96011022 chip=0x96011022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices (AMD)'
    class      = bridge
    subclass   = HOST-PCI
pcib1@pci0:0:2:0:	class=0x060400 card=0x96011022 chip=0x96031022 rev=0x00 hdr=0x01
    vendor     = 'Advanced Micro Devices (AMD)'
    class      = bridge
    subclass   = PCI-PCI
pcib2@pci0:0:5:0:	class=0x060400 card=0x96011022 chip=0x96051022 rev=0x00 hdr=0x01
    vendor     = 'Advanced Micro Devices (AMD)'
    class      = bridge
    subclass   = PCI-PCI
pcib3@pci0:0:7:0:	class=0x060400 card=0x96011022 chip=0x96071022 rev=0x00 hdr=0x01
    vendor     = 'Advanced Micro Devices (AMD)'
    class      = bridge
    subclass   = PCI-PCI
pcib4@pci0:0:9:0:	class=0x060400 card=0x96011022 chip=0x96081022 rev=0x00 hdr=0x01
    vendor     = 'Advanced Micro Devices (AMD)'
    class      = bridge
    subclass   = PCI-PCI
atapci1@pci0:0:17:0:	class=0x010601 card=0x76231462 chip=0x43911002 rev=0x40 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'SB700 SATA Controller [AHCI mode]'
    class      = mass storage
    subclass   = SATA
ohci0@pci0:0:18:0:	class=0x0c0310 card=0x76231462 chip=0x43971002 rev=0x00 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'SB700 USB OHCI0 Controller'
    class      = serial bus
    subclass   = USB
ehci0@pci0:0:18:2:	class=0x0c0320 card=0x76231462 chip=0x43961002 rev=0x00 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'SB700 USB EHCI Controller'
    class      = serial bus
    subclass   = USB
ohci1@pci0:0:19:0:	class=0x0c0310 card=0x76231462 chip=0x43971002 rev=0x00 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'SB700 USB OHCI0 Controller'
    class      = serial bus
    subclass   = USB
ehci1@pci0:0:19:2:	class=0x0c0320 card=0x76231462 chip=0x43961002 rev=0x00 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'SB700 USB EHCI Controller'
    class      = serial bus
    subclass   = USB
none0@pci0:0:20:0:	class=0x0c0500 card=0x00000000 chip=0x43851002 rev=0x41 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'ATI SMBus (ATI RD600/RS600)'
    class      = serial bus
    subclass   = SMBus
hdac0@pci0:0:20:2:	class=0x040300 card=0x76231462 chip=0x43831002 rev=0x40 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'IXP SB600 High Definition Audio Controller'
    class      = multimedia
    subclass   = HDA
isab0@pci0:0:20:3:	class=0x060100 card=0x76231462 chip=0x439d1002 rev=0x40 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'SB700 LPC host controller'
    class      = bridge
    subclass   = PCI-ISA
pcib5@pci0:0:20:4:	class=0x060401 card=0x00000000 chip=0x43841002 rev=0x40 hdr=0x01
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'IXP SB600 PCI to PCI Bridge'
    class      = bridge
    subclass   = PCI-PCI
ohci2@pci0:0:20:5:	class=0x0c0310 card=0x76231462 chip=0x43991002 rev=0x00 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'SB700 USB OHCI2 Controller'
    class      = serial bus
    subclass   = USB
ohci3@pci0:0:22:0:	class=0x0c0310 card=0x76231462 chip=0x43971002 rev=0x00 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'SB700 USB OHCI0 Controller'
    class      = serial bus
    subclass   = USB
ehci2@pci0:0:22:2:	class=0x0c0320 card=0x76231462 chip=0x43961002 rev=0x00 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'SB700 USB EHCI Controller'
    class      = serial bus
    subclass   = USB
hostb1@pci0:0:24:0:	class=0x060000 card=0x00000000 chip=0x12001022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices (AMD)'
    device     = '(Family 10h) Athlon64/Opteron/Sempron HyperTransport Technology Configuration'
    class      = bridge
    subclass   = HOST-PCI
hostb2@pci0:0:24:1:	class=0x060000 card=0x00000000 chip=0x12011022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices (AMD)'
    device     = '(Family 10h) Athlon64/Opteron/Sempron Address Map'
    class      = bridge
    subclass   = HOST-PCI
hostb3@pci0:0:24:2:	class=0x060000 card=0x00000000 chip=0x12021022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices (AMD)'
    device     = '(Family 10h) Athlon64/Opteron/Sempron DRAM Controller'
    class      = bridge
    subclass   = HOST-PCI
hostb4@pci0:0:24:3:	class=0x060000 card=0x00000000 chip=0x12031022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices (AMD)'
    device     = '(Family 10h) Athlon64/Opteron/Sempron Miscellaneous Control'
    class      = bridge
    subclass   = HOST-PCI
hostb5@pci0:0:24:4:	class=0x060000 card=0x00000000 chip=0x12041022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices (AMD)'
    device     = '(Family 10h) Athlon64/Opteron/Sempron Link Control'
    class      = bridge
    subclass   = HOST-PCI
vgapci0@pci0:1:0:0:	class=0x030000 card=0x11621462 chip=0x06e410de rev=0xa1 hdr=0x00
    vendor     = 'NVIDIA Corporation'
    device     = 'NVIDIA GeForce 8400 GS (G98)'
    class      = display
    subclass   = VGA
re0@pci0:2:0:0:	class=0x020000 card=0x76231462 chip=0x816810ec rev=0x03 hdr=0x00
    vendor     = 'Realtek Semiconductor'
    device     = 'Gigabit Ethernet NIC(NDIS 6.0) (RTL8168/8111/8111c)'
    class      = network
    subclass   = ethernet
none1@pci0:3:0:0:	class=0x0c0330 card=0x76231462 chip=0x01941033 rev=0x03 hdr=0x00
    vendor     = 'NEC Electronics Hong Kong'
    class      = serial bus
    subclass   = USB
atapci0@pci0:4:0:0:	class=0x010185 card=0x76231462 chip=0x2368197b rev=0x00 hdr=0x00
    vendor     = 'JMicron Technology Corp.'
    device     = 'IDE Comtroller (JMB368)'
    class      = mass storage
    subclass   = ATA
```

Please also see the relevant portion of dmesg(8) in the file attached to this message.

Thanks again.


----------



## SirDice (Jun 24, 2010)

As long as you don't use pulseaudio it should be fine. It's installed on my system. Even though I unselected it everywhere it's still installed when installing Gnome. In the Gnome settings manager you can stop it from starting up. Gnome itself doesn't make a sound (the event sounds) but everything else works.


----------



## PhenomII (Jun 24, 2010)

SirDice said:
			
		

> As long as you don't use pulseaudio it should be fine. It's installed on my system. Even though I unselected it everywhere it's still installed when installing Gnome. In the Gnome settings manager you can stop it from starting up. Gnome itself doesn't make a sound (the event sounds) but everything else works.


Thank you very much SirDice for taking the time to respond.
I'm not sure why, but the 2 times I've installed pusleaudio as part od a fresh system install (KDE, the first time, and now GNOME), my sound doesn't work - not WM events, not any of the Media applications. The 2 times I performed a fresh install *w/o* pulse audio, *everything* worked. I'm not quite sure where/how to disable it. But I suppose somewhere under /usr/local/etc might provide some hints.

Thank you again for your response.

Hopefully a .conf, or rc(8) setting will disable it, and things will work - wish me luck.


----------



## SirDice (Jun 24, 2010)

Pulseaudio isn't started using an rc script. It's started by Gnome when a user logs in.


----------



## vermaden (Jun 24, 2010)

PhenomII said:
			
		

> Is there a slick way to DEinstall pulseaudio w/o buggering the system?



Yes, very easy and instantly working: # pkg_delete -f -x pulseaudio


----------



## PhenomII (Jun 25, 2010)

SirDice said:
			
		

> Pulseaudio isn't started using an rc script. It's started by Gnome when a user logs in.


Understood. Although options are defined in it's conf files found under /usr/local/etc/pusleaudio.
The problem appears to be that _because_ pulseaudio is started upon session startup, it's manipulation of the sound env buggers it up so that other applications either can't gain access, or are otherwise unable to (re)manipulate the sound env so as to _correct_ it, so that it actually works.

I finally got so frustrated, that I wiped the disk(s) and started anew. Gnome-lite is installing now. I wasn't able to prevent the pulseaudio dependency via a
[CMD=""]make -DWITHOUT_PULSEAUDIO install[/CMD]
So, on a hunch, I deselected the gconfd integration. That way, hald, and mDns are the only variables I need to deal with, and Gnome2 won't be quite as tied to it.
We'll see...

Thanks for taking the time to respond SirDice.


----------



## PhenomII (Jun 25, 2010)

vermaden said:
			
		

> Yes, very easy and instantly working: # pkg_delete -f -x pulseaudio



Indeed. That _is_ possible. But a bit brutal, and will ultimately lead to unsatisfied dependencies in the portsdb.

Thanks for taking the time to reply vermaden.


----------



## vermaden (Jun 25, 2010)

PhenomII said:
			
		

> Indeed. That _is_ possible. But a bit brutal, and will ultimately lead to unsatisfied dependencies in the portsdb.


You can always switch to *portmaster* which does not need any third party additional ports databases comparing to *portupgrade*.



			
				PhenomII said:
			
		

> Thanks for taking the time to reply vermaden.


Welcome.


----------



## coldasparagus (Jun 16, 2011)

*Zap pulse and use portmaster --check-depends*

I know this thread is old, but I gave up on the portupgrade/pkg_deinstall route because there were way too many dependencies on Pulse.  I would rather use Jack and delete Pulse.  Yes, Jack is more complex, however I feel it's more powerful, plus it's better for realtime audio/music/etc.

To reiterate, the following sequence will get rid of pulse and fix dependencies in your port tree (requires install of port called [ports-mgmt/portmaster[/port]):

`# pkg_delete -f -x pulseaudio`
`# portmaster --check-depends` 

From portmaster(8):


```
[-n|y] [-v] --check-depends
     cross-check and update dependency information for all ports
```
This will go through all ports, notice the missing dependency for Pulse, and prompt you for each affected port.  If you answer "y", it will update the +CONTENTS file for the port, thereby removing the dependency.

Have not checked if this will work subsequently with portupgrade, however I feel I will switch to portmaster since I hate the excessively slow pkgdb database update.

Alex


----------



## wblock@ (Jun 16, 2011)

Forcing of dependencies just updates the dependency database, but doesn't do anything to make sure that the code that tries to use pulseaudio when it's not present will still work.


----------



## coldasparagus (Jun 18, 2011)

wblock said:
			
		

> Forcing of dependencies just updates the dependency database, but doesn't do anything to make sure that the code that tries to use pulseaudio when it's not present will still work.



Thank you for that clarification.

Also, would you be kind enough to explain the use of the switch WITHOUT_PULSEAUDIO in /etc/make.conf?  I have it set as


```
WITHOUT_PULSEAUDIO="yes"
```

however I am not sure if this is the correct way to set it or its exact function in the build process.

Thank you.


----------



## wblock@ (Jun 18, 2011)

Putting

```
WITHOUT_PULSEAUDIO=yes
```
in /etc/make.conf makes it a global setting.  If a config menu comes up, PULSEAUDIO will already be turned off.  Some ports don't have config menus, but if they check that variable, it will work.

The catch is that ports might not check for that variable, in which case the setting will be ignored and pulseaudio will still be installed as a dependency.

(Quotes around the value are not required unless it contains a space or other delimiter.  It's not a bad thing to use them by default.)


----------



## SirDice (Jun 20, 2011)

FWIW, using that setting Gnome can be built without depending on pulseaudio. The last port that used it was changed a while back making pulse optional.

If I'm not mistaken it was sysutils/gnome-settings-daemon.


----------

