I ran swaret to update my system and then my sound did not work correctly in kde. I got the following error message when I started kde.
Sound server informational message:
Error while initializing the sound driver:
device: default can't be opened for playback (Permission denied)
The sound server will continue, using the null output device.
I reselected ALSA as my sound device and still got the error. I was confused.
The problem itself was simple. My sound card's device file did not have the right permissions. I discovered this by running the program aplay. I got the following output:
ALSA lib pcm_hw.c:1057snd_pcm_hw_open) open /dev/snd/pcmC0D0p failed: Permission denied
aplay: main:507: audio open error: Permission denied
The problem was resolved by changing the group for that device to one of my groups. Silly me.