# "cat: stdout: Invalid argument" when playing sound.



## JayArr (Jun 16, 2020)

Hi All

My sound has been acting up lately. It works for a while then stops and sometimes attempts to get it working again by opening mixer cause the KB and mouse to freeze up as well. Curiously - running `nvidia-xconfig` followed by a reboot brings it back.

Today I did ran `nvidia-xconfig` and rebooted then without starting firefox I opened a terminal and ran `cat /dev/random > /dev/dsp1.1`

I got white noise out of my speaker so I used my mouse to vary the volume using the icon in my system tray, the volume went up and down but after a few seconds the white noise changed tone then it just stopped and the terminal I started the command on returned 
	
	



```
"cat: stdout: Invalid argument"
```

Here is my /boot/loader.conf:


```
kern.vty=vt
nvidia_load="YES"
linux_load="YES"
snd_driver="YES"
```

/etc/sysctl.conf


```
kern.randompid=1
```

`cat /dev/sndstat`

returns:


```
Installed devices:
pcm0: <Realtek ALC899 (Analog 5.1+HP/2.0)> (play/rec) default
pcm1: <Realtek ALC899 (Front Analog Mic)> (rec)
pcm2: <Realtek ALC899 (Rear Analog Line-in)> (rec)
No devices installed from userspace.
```

`mixer`

returns:


```
Mixer vol      is currently set to 100:100
Mixer pcm      is currently set to 100:100
Mixer speaker  is currently set to  59:59
Mixer mic      is currently set to  67:67
Mixer mix      is currently set to  37:37
Mixer rec      is currently set to  37:37
Mixer igain    is currently set to 100:100
Mixer ogain    is currently set to 100:100
Recording source: mic
```

Any ideas?


UPDATE: I just swapped the sound card from a different server, they are identical Sound Blaster SB1570s and the problem persists with the new second one so we can probably rule out hardware failure.


----------

