After some further investigation, it seems that the sound only disappears when using gnome. Using Fluxbox avoids the problem. Starting gnome-settings-daemon destroys sound again. I can't work out what exactly gnome is doing to mess it up, but it's definitely the culprit.