Linux audio strikes back

2007 December 25
by darkness

Fedora 7’s new Firewire stuff might not be totally together: when I plugged in my DV cam, I couldn’t read the device except (I guess?) as root. (Kino also kept crashing, and I ended up just using dvgrab.)

Apparent side-effect of running sudo kino: some shared memory used by dmix became owned by root and mod 0600. Thus when you run something like, say, aplay (ALSA configured to use dmix by default), you get “unable to create IPC semaphore” (among some other lines).

My fix:

  1. grep ipc_key /etc/alsa/*. In my case, I see something like /etc/alsa/alsa.conf:defaults.pcm.ipc_key 5678293 (that’s 0x56a4d5).
  2. ipcs -a and look for the IPC key in hex. I had both 0x56a4d5 and 0x56a4d6. I… hope 0x56a4d6 belonged to ALSA because…
  3. First I made sure that the nattach column said 0 for any dmix-related segments/semaphores, then
  4. I used ipcrm -M 0x56a4d5 (and then ipcrm -M 0x56a4d6) to delete those shared memory segments, and ipcrm -S 0x56a4d5 to delete the semaphores (“Semaphore Arrays” is the heading; maybe simply saying “semaphores” is poor form on my part).

Then audio worked.

I am more and more looking forward to Fedora 8 and PulseAudio.

1 Comment leave one →
2008 April 24
harmless permalink

I’ve run into “unable to create IPC semaphore” with the same symptom of being able to use it only as root. On a whim I changed my ipc_key, restarted alsa and tada! everything was happy. I suppose there was some kind of bizarre collision? *shrug* … at any rate, I figure I’d put my 2 cents some place as a help to anyone who googles onto this in search of a solution.

Leave A Comment

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS