Running a regularly updated 10.04 LTS we have a weird issue with access to audio with pulseaudio 0.9.22. Sound device is
ATI Technologies Inc SBx00 Azalia (Intel HDA)
- Login user1 after reboot: sound OK
- Login user2 after reboot: sound OK
- Login user1 then user2: sound OK: both have sound
- Login user2 then user1: only user2 has sound
- Login user2 after boot, logout user2, then login user1: no sound
- Login user3 then user1: all is good!
In the two latter cases user1 is getting repeated errors in syslog:
protocol-native.c: Denied access to client with invalid authorization data
These errors disappear only after pulseaudio is started from user1 manually in a terminal. Then audio access is fine for both. There is an error
module-alsa-card.c: Failed to find a working profile but still sound output is fine.
We both are not a member of the Audio Group. Deleting
~/.pulse from both accounts has no effect on this behaviour.
The issue started in 9.10 Karmic and continued to be there even after an upgrade to 10.04 Lucid LTS. This indicates that some erroneous settings survived the upgrades.
The dependency on boot order of users indicates that some other user specific settings may be involved, but we have no idea where to start searching. From tests with 3 users it seems that only settings for user2 are broken.
Loading pulseaudio modules
module-native-protocol-unix with the option
auth-anonymous=1 in both default.pa, and system.pa did not change this behaviour. Neither did it help to delete pulseaudio cookies
~/.pulse-cookie from both users.
Suggestions 1) to 8) from the answer below did not make a change (running pulseaudio in system mode was not possible) but unplugging the external speaker, rebooting, plugging the speaker back in and reboot again from user1 did the trick.
It is still unclear where this hardware information was (erroneously) stored and why it affected only one user account.