Hello,
the issue is blocked alsa audio on login to desktop,
audio playback attempts of various programs fail with error messages:
* "unable to create IPC semaphore" and
* "ALSA: Couldn't open audio device: Permission denied"
example: aplay /usr/share/sounds/alsa/Noise.wav
ALSA lib pcm_direct.c:2178:(_snd_pcm_direct_new) unable to create IPC semaphore
aplay: main:850: audio open error: Permission denied
the problem appeared on 04.03.2024,
probably on first system boot after "aptitude safe-upgrade" from previous day.
I noticed lightdm is using alsa ipc key:
cat /usr/share/alsa/alsa.conf | grep ipc_
defaults.pcm.ipc_key 5678293
defaults.pcm.ipc_gid audio
defaults.pcm.ipc_perm 0660
note: 5678293 == 0x0056a4d5
==
== ipcs before login to desktop
==
------ Message Queues --------
key msqid owner perms used-bytes messages
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x0056a4d5 0 lightdm 660 488 1
0x0056a4d6 1 lightdm 660 131072 1
0x00000000 5 lightdm 600 524288 2 dest
------ Semaphore Arrays --------
key semid owner perms nsems
0x0056a4d5 0 lightdm 660 1
==
== ipcs when logged in to desktop, audio playback is blocked
==
------ Message Queues --------
key msqid owner perms used-bytes messages
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x0056a4d5 0 lightdm 660 488 0
0x0056a4d6 1 lightdm 660 131072 0
0x00000000 6 wwa 600 393216 2 dest
0x00000000 9 wwa 600 524288 2 dest
0x00000000 12 wwa 600 393216 2 dest
------ Semaphore Arrays --------
key semid owner perms nsems
0x0056a4d5 0 lightdm 660 1
==
== workaround:
==
executing speaker-test (on any other program playing audio) as root
solves the problem until user's logout back to lightdm.
==
== ipcs after running speaker-test once as root, alsa audio works again for normal user
==
------ Message Queues --------
key msqid owner perms used-bytes messages
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x00000000 6 wwa 600 393216 2 dest
0x00000000 9 wwa 600 524288 2 dest
0x00000000 12 wwa 600 393216 2 dest
------ Semaphore Arrays --------
key semid owner perms nsems