How to recover from a JACK freeze?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

How to recover from a JACK freeze?

James Harkins-3
Hi, been inactive for a while.

I just up/cross-graded to Ubuntu Studio 16.04 -- very much enjoying it so far! I'm getting better USB audio performance than I could ever manage under plain Ubuntu (provided WiFi is off, but I can live with that for shows).

One problem that the upgrade didn't solve is that sometimes jackd gets stuck and it can't be killed.

Initial symptom: No audio, in or out.

Secondary symptom: In qjackctl, the CPU usage number is frozen -- never changes.

At that point:

$ ps x | grep jackd
 3140 ?        SLsl   0:16 /usr/bin/jackd -dalsa -r44100 -p1024 -n2 -D -Chw:Set,0 -Phw:Set
 4458 pts/1    S+     0:00 grep --color=auto jackd
$ kill -9 3140
$ ps x | grep jackd
 3140 ?        SLsl   0:16 /usr/bin/jackd -dalsa -r44100 -p1024 -n2 -D -Chw:Set,0 -Phw:Set
 4460 pts/1    S+     0:00 grep --color=auto jackd

"kill -9" has no effect.

"sudo kill -9" has no effect.

If I reboot, it takes several minutes for the system to shut down -- i.e., jackd is even preventing a clean shutdown.

So, the question: How do I regain control when this happens? (Ideally, without having to close everything.)

Thanks,
hjh

_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: How to recover from a JACK freeze?

Paul Davis
Sounds like a problem with the USB device driver on your system.

On Thu, Aug 17, 2017 at 11:35 PM, James Harkins <[hidden email]> wrote:
Hi, been inactive for a while.

I just up/cross-graded to Ubuntu Studio 16.04 -- very much enjoying it so far! I'm getting better USB audio performance than I could ever manage under plain Ubuntu (provided WiFi is off, but I can live with that for shows).

One problem that the upgrade didn't solve is that sometimes jackd gets stuck and it can't be killed.

Initial symptom: No audio, in or out.

Secondary symptom: In qjackctl, the CPU usage number is frozen -- never changes.

At that point:

$ ps x | grep jackd
 3140 ?        SLsl   0:16 /usr/bin/jackd -dalsa -r44100 -p1024 -n2 -D -Chw:Set,0 -Phw:Set
 4458 pts/1    S+     0:00 grep --color=auto jackd
$ kill -9 3140
$ ps x | grep jackd
 3140 ?        SLsl   0:16 /usr/bin/jackd -dalsa -r44100 -p1024 -n2 -D -Chw:Set,0 -Phw:Set
 4460 pts/1    S+     0:00 grep --color=auto jackd

"kill -9" has no effect.

"sudo kill -9" has no effect.

If I reboot, it takes several minutes for the system to shut down -- i.e., jackd is even preventing a clean shutdown.

So, the question: How do I regain control when this happens? (Ideally, without having to close everything.)

Thanks,
hjh

_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user


_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: How to recover from a JACK freeze?

Kjetil Matheussen-2
In reply to this post by James Harkins-3
From: James Harkins <[hidden email]>
To: "linux-audio-user" <[hidden email]>
Subject: [LAU] How to recover from a JACK freeze?
Message-ID: <[hidden email]>
Content-Type: text/plain; charset="UTF-8"

Hi, been inactive for a while.

I just up/cross-graded to Ubuntu Studio 16.04 -- very much enjoying it so far! I'm getting better USB audio performance than I could ever manage under plain Ubuntu (provided WiFi is off, but I can live with that for shows).

One problem that the upgrade didn't solve is that sometimes jackd gets stuck and it can't be killed.

Initial symptom: No audio, in or out.

Secondary symptom: In qjackctl, the CPU usage number is frozen -- never changes.

At that point:

$ ps x | grep jackd
 3140 ?        SLsl   0:16 /usr/bin/jackd -dalsa -r44100 -p1024 -n2 -D -Chw:Set,0 -Phw:Set
 4458 pts/1    S+     0:00 grep --color=auto jackd
$ kill -9 3140
$ ps x | grep jackd
 3140 ?        SLsl   0:16 /usr/bin/jackd -dalsa -r44100 -p1024 -n2 -D -Chw:Set,0 -Phw:Set
 4460 pts/1    S+     0:00 grep --color=auto jackd

"kill -9" has no effect.

"sudo kill -9" has no effect.

If I reboot, it takes several minutes for the system to shut down -- i.e., jackd is even preventing a clean shutdown.

So, the question: How do I regain control when this happens? (Ideally, without having to close everything.)



Pretty sure I've seen the same thing a few times, and the solution has been to reload the sound card driver. Here's my script to do that:

[kjetil@localhost ~]$ more bin/startdelta.sh 
#!/bin/sh

fuser -fv /dev/snd/* /dev/dsp*


/home/kjetil/bin/removealsa.sh # see below
sleep 1
/home/kjetil/bin/alsasound start # ccrma dist script

modprobe snd-ice1712 # change to your sound card
#modprobe snd-hda-intel
modprobe snd-seq
chmod 777 /dev/snd/seq

alsactl restore 0

fuser -fv /dev/snd/* /dev/dsp*



[kjetil@localhost ~]$ more bin/removealsa.sh 
#!/bin/sh
killall -9 pulseaudio
rmmod snd_hda_codec_atihdmi snd_hda_codec snd_hwdep snd_pcm snd_timer snd soundcore snd_page_alloc
rmmod snd_seq snd_timer snd_seq_device snd_seq_dummy snd-ice1712 snd_ice17xx_ak4xxx snd_ak4xxx_adda snd_hda_intel snd_cs8427 snd_hda_codec snd_ac97_codec snd_hwdep snd_seq snd_pcm ac97_bus snd_i2c snd_mpu401_uart snd_rawmidi snd_seq_device snd_timer snd soundcore snd_page_alloc
sleep 1
rmmod snd_hda_codec_atihdmi snd_hda_codec snd_hwdep snd_pcm snd_timer snd soundcore snd_page_alloc
rmmod snd_seq snd_timer snd_seq_device snd_seq_dummy snd-ice1712 snd_ice17xx_ak4xxx snd_ak4xxx_adda snd_hda_intel snd_cs8427 snd_hda_codec snd_ac97_codec snd_hwdep snd_seq snd_pcm ac97_bus snd_i2c snd_mpu401_uart snd_rawmidi snd_seq_device snd_timer snd soundcore snd_page_alloc

rmmod snd_seq_midi,snd_seq_dummy,snd_ice1712,snd_ak4xxx_adda,snd_cs8427,snd_ac97_codec,snd_seq,snd_pcm,snd_timer,snd_i2c,snd_mpu401_uart,snd_rawmidi,snd_seq_device

rmmod snd_seq_midi,snd_seq,snd_timer,snd_rawmidi,snd_seq_device

rmmod snd_seq_midi_event snd-seq-midi snd-seq snd-timer snd-rawmidi snd-seq-device

rmmod snd_seq_oss snd_seq_midi_event snd_pcm_oss snd_seq snd_seq_device snd_pcm snd_timer snd_page_alloc snd_mixer_oss

rmmod snd_hda_codec_realtek snd_hda_codec_via snd_hda_codec snd_hwdep snd_pcm snd_timer
rmmod snd_hda_codec snd_hwdep snd_pcm snd_timer
rmmod snd_via82xx snd_hda_codec snd_hwdep snd_ac97_codec snd_mpu401_uart snd_rawmidi snd_seq_device snd_pcm snd_timer snd_page_alloc soundcore


rmmod snd


_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: How to recover from a JACK freeze?

James Harkins-3
In reply to this post by Paul Davis
---- On Thu, 17 Aug 2017 23:55:59 -0400 Paul Davis <[hidden email]> wrote ----
> Sounds like a problem with the USB device driver on your system.

OK, I can see that.

I assume this is snd-usb-audio. Right now, I don't have a lot to go on, to file a bug report. Can anyone suggest what I should collect?

This has been happening, occasionally, for a long time, but I always thought it was misconfiguration as I was trying to adapt plain Ubuntu for audio. Since I'm seeing it in Ubuntu Studio as well, I'm changing my mind about that.

Thanks,
hjh

_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: How to recover from a JACK freeze?

James Harkins-3
In reply to this post by James Harkins-3
> Pretty sure I've seen the same thing a few times, and the solution has been
> to reload the sound card driver. Here's my script to do that:
>
> [kjetil at localhost ~]$ more bin/startdelta.sh
> ...

Interesting. One thing I see is:

> /home/kjetil/bin/alsasound start # ccrma dist script

... but I'm not using Planet CCRMA, so I don't have this script.

Here?

https://ccrma.stanford.edu/~nando/linux/sounddriver

Just want to cover all the bases before doing something that I can recover from only by rebooting.

Thanks,
hjh

_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: How to recover from a JACK freeze?

Jonathan Brickman
In reply to this post by James Harkins-3
$ ps x | grep jackd
 3140 ?        SLsl   0:16 /usr/bin/jackd -dalsa -r44100 -p1024 -n2 -D -Chw:Set,0 -Phw:Set
 4458 pts/1    S+     0:00 grep --color=auto jackd
$ kill -9 3140
$ ps x | grep jackd
 3140 ?        SLsl   0:16 /usr/bin/jackd -dalsa -r44100 -p1024 -n2 -D -Chw:Set,0 -Phw:Set
 4460 pts/1    S+     0:00 grep --color=auto jackd

"kill -9" has no effect.

I have seen cases where -p1024 was too big, where I only saw stability at 512 and one or two notches less.  Tell us what happens with 512.  What is your CPU and RAM? 

I wouldn't file a bug report yet, because this is probably not a bug in any code, it's probably configuration of your machine we need to figure out.  Can you post 'lspci -v' and 'lsusb -v' to this list?

--
Jonathan E. Brickman   jeb@...   (785)233-9977
Hear us at http://ponderworthy.com -- CDs and MP3s now available!
Music of compassion; fire, and life!!!


_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user