Comment 2 for bug 491329

Revision history for this message
Jonas Norling (norling) wrote :

I experience what appears to be the same problem on my laptop with a USB sound device.

I'm running Karmic. Pulseaudio is enabled but the USB sound device is set to profile "Off" in the Sound Preferences GUI, so pulseaudio shouldn't try to use it (right?). Pulseaudio is allowed to manage the laptop's internal sound device, though.

Immediately after logging in, pulseaudio has created (around) five 65MB files in /dev/shm, but only a total of 224kB is actually allocated/used:

jonas@bruno:~$ ls -lsh /dev/shm/
total 224K
4.0K -rw-r----- 1 jonas jonas 4.0K 2009-12-25 13:20 mono.5866
 84K -r-------- 1 gdm gdm 65M 2009-12-25 13:20 pulse-shm-3132421645
 32K -r-------- 1 jonas jonas 65M 2009-12-25 13:22 pulse-shm-3183276808
 12K -r-------- 1 jonas jonas 65M 2009-12-25 13:20 pulse-shm-3321423159
 80K -r-------- 1 jonas jonas 65M 2009-12-25 13:22 pulse-shm-3424433770
 12K -r-------- 1 jonas jonas 65M 2009-12-25 13:20 pulse-shm-586544485

When I try to start jackd, pulseaudio starts to fill up its previously sparse files in /dev/shm. After a few seconds and a lot of swapping jackd exits with "Bus error" and my /dev/shm is completely filled:

jonas@bruno:~$ ls -lsh /dev/shm/
total 232M
   0 drwx------ 3 jonas jonas 60 2009-12-25 13:22 jack-1000
4.0K -rw-r----- 1 jonas jonas 4.0K 2009-12-25 13:20 mono.5866
 84K -r-------- 1 gdm gdm 65M 2009-12-25 13:20 pulse-shm-3132421645
 65M -r-------- 1 jonas jonas 65M 2009-12-25 13:22 pulse-shm-3183276808
 65M -r-------- 1 jonas jonas 65M 2009-12-25 13:20 pulse-shm-3321423159
 39M -r-------- 1 jonas jonas 65M 2009-12-25 13:22 pulse-shm-3424433770
   0 -r-------- 1 jonas jonas 65M 2009-12-25 13:22 pulse-shm-448440592
 65M -r-------- 1 jonas jonas 65M 2009-12-25 13:20 pulse-shm-586544485

All this happens only when I have "@audio - memlock unlimited" in my limits.conf (otherwise jackd says that it can't allocate memory, but seems to work happily anyway). Sometimes not enough pulseaudio clients are running to fill up /dev/shm and jackd will start fine. My preferred workaround is to start jackd on the console before logging in.

My system:
512MB RAM,
USB sound device: ESI U46XL
Ubuntu realtime kernel linux-image-rt 2.6.31.9.10
pulseaudio 1:0.9.19-0ubuntu4, jackd 0.116.1-4ubuntu2