# No Sound After Update and pkg upgrade



## BawdyAnarchist (Jul 10, 2021)

I upgraded from 13.0-RELEASE p1 to p3 and then did pkg upgrade which bumped nvidia-driver from 460.67 to 460.84.  Afterwards I can't get sound from my speakers (connected from the monitor), even with `cat /dev/urandom > dsp0`  , and of course trying the other dsp1, dsp2, and dsp3. Here's what I've checked thus far:


```
root@dom0:~ # dmesg | grep pcm
pcm0: <NVIDIA (0x0092) (HDMI/DP 8ch)> at nid 4 on hdaa0
pcm1: <NVIDIA (0x0092) (HDMI/DP 8ch)> at nid 5 on hdaa0
pcm2: <NVIDIA (0x0092) (HDMI/DP 8ch)> at nid 6 on hdaa0
pcm3: <NVIDIA (0x0092) (HDMI/DP 8ch)> at nid 7 on hdaa0

root@dom0:~ # kldload snd_hda
kldload: can't load snd_hda: module already loaded or in kernel

root@dom0:~ # cat /dev/sndstat
FreeBSD Audio Driver (64bit 2009061500/amd64)
Installed devices:
pcm0: <NVIDIA (0x0092) (HDMI/DP 8ch)> on hdaa0  (1p:1v/0r:0v) default
pcm1: <NVIDIA (0x0092) (HDMI/DP 8ch)> on hdaa0  (1p:1v/0r:0v)
pcm2: <NVIDIA (0x0092) (HDMI/DP 8ch)> on hdaa0  (1p:1v/0r:0v)
pcm3: <NVIDIA (0x0092) (HDMI/DP 8ch)> on hdaa0  (1p:1v/0r:0v)
No devices installed from userspace.

root@dom0:~ # mixer
Mixer vol      is currently set to 100:100
Mixer pcm      is currently set to 100:100
```

So the system sees NVIDIA sound hardware, kernel has drivers loaded, device appears with sndstat, and mixer volume is up. I'm at a loss for what to do/check. I tried rolling back nvidia-driver with: `pkg delete nvidia-driver-460.84` and `pkg install nvidia-driver-460.67.txz` , but I get the error:


```
Proceed with this action? [y/N]: y
[1/1] Installing nvidia-driver-460.67...
pkg: nvidia-driver-460.67 conflicts with libglvnd-1.3.3 (installs files into the same place).  Problematic file: /usr/local/lib/libGLX.so
```

Any ideas?


----------



## Alain De Vos (Jul 10, 2021)

try "cat /dev/urandom > /dev/dspX" with X  from 0 to 5


----------



## BawdyAnarchist (Jul 10, 2021)

Thanks. Somehow I spent an hour overlooking the "/dev/" part of the dsp0. That caused sound output, and then somehow that also fixed the problem with no sound coming from the browser.

Could it be that the browser (in a jail) isn't able to create the /dev/dsp device until it is already created with the `cat /dev/urandom > /dev/dsp0` from the host? Kinda weird


----------



## Alexander88207 (Jul 12, 2021)

BawdyAnarchist said:


> [1/1] Installing nvidia-driver-460.67...
> pkg: nvidia-driver-460.67 conflicts with libglvnd-1.3.3 (installs files into the same place).  Problematic file: /usr/local/lib/libGLX.so
> [/code]
> 
> Any ideas?



Mesa and NVIDIA now uses libglvnd you should do an pkg upgrade.


----------



## astyle (Jul 12, 2021)

Has anyone tried to change the default sound  device/port? 

```
# sysctl hw.snd.default_unit=n
```
where n is 0, 1, 2, or 3?

Also, putting that same `hw.snd.default_unit=n` into /etc/sysctl.conf would help... all of that info dug up from the FreeBSD Handbook...


----------



## Alexander88207 (Jul 12, 2021)

astyle said:


> Has anyone tried to change the default sound  device/port?
> 
> ```
> # sysctl hw.snd.default_unit=n
> ...



Right.

I do use hw.snd.default_auto=2 which switch to the latest connected audio device.

That means if i disconnect my usb device then it switches automatically to the inbuilt soundcard.


----------



## astyle (Jul 12, 2021)

BawdyAnarchist said:


> Could it be that the browser (in a jail) isn't able to create the /dev/dsp device until it is already created with the `cat /dev/urandom > /dev/dsp0` from the host? Kinda weird


/dev/dspX devices aren't 'created at runtime'... If a browser in a jail cannot access them, I would suggest the following troubleshooting list:

Can a browser running outside of a jail access /dev/dspX? If yes, then jail permissions might be the issue to explore. If not, permissions for /dev/dspX might be the issue to look at. Maybe the account that's running the browser does not have proper perms...
Can another jailed app (say, VLC) access the /dev/dspX? If yes, then the issue is most likely the browser app itself. Either re-compile the browser with different flags, or re-install the browser, or upgrade it. If the answer to Question 2 is no, that confirms that jail permissions are definitely the issue to be resolved first. After that, you can look and see if the account running the jail itself can access the /dev/dspX.


----------

