Another deal gone down... XRUNS all over the place

Talk about your MIDI interfaces, microphones, keyboards...

Moderators: khz, MattKingUSA

infolix76
Established Member
Posts: 13
Joined: Mon May 27, 2013 10:09 am
Location: France

Another deal gone down... XRUNS all over the place

Post by infolix76 »

Hi everybody,
I run an UbuntuStudio 13.04. (Kernel 3.8.0-22-lowlatency)
My computer : Mother board ASUS F2A85-V with proc AMD A8-5600K (4 cores) and 8 Go memory.
I'm a guitar player and I use an Alesis IO2 Express to plug my guitar(s) in to Guitarix.
Some weeks ago, it took me some time to get jack and pulse audio to work.
But with the help of you people from LinuxMusicians, I managed to have it work.
Everything was fine. I had the latency down to 3.5 ms.

This morning, I played a bit of guitar and I watched some stuff off the internet. No problem.
For some reason, I rebooted my machine.
Then hell broke loose : no sound any longer.
The desktop music (audacious, audacity), video (vlplay, xine) are mute.
When I start jack (qjackctl) and look at the messages I have a litany of :

16:21:44.547 Récupération désynchronisation (XRUN) (1).
16:21:46.547 Récupération de désynchronisation (XRUN) (72 sauté).
16:21:48.550 Récupération de désynchronisation (XRUN) (70 sauté).
16:21:50.552 Récupération de désynchronisation (XRUN) (71 sauté).
16:21:52.555 Récupération de désynchronisation (XRUN) (70 sauté).
16:21:54.557 Récupération de désynchronisation (XRUN) (71 sauté).
16:21:56.560 Récupération de désynchronisation (XRUN) (70 sauté).
16:21:58.562 Récupération de désynchronisation (XRUN) (71 sauté).

I verified all the parameters of all I did the weeks before on jack, pulseaudio (I took notes of all my actions)
All parameters stayed the same !!! :x

Could this mean a hardware problem on the machine or the Alesis IO2 interface ?

I'm in a dead end.
Someone to help ?

Thanx

Pablo
Established Member
Posts: 1270
Joined: Thu Apr 17, 2008 9:57 pm

Re: Another deal gone down... XRUNS all over the place

Post by Pablo »

Please, don't cross post :)

Please, show the terminal output of:

cat /proc/asound/cards .jackdrc

infolix76
Established Member
Posts: 13
Joined: Mon May 27, 2013 10:09 am
Location: France

Re: Another deal gone down... XRUNS all over the place

Post by infolix76 »

1 - I made a mistake posting in Your Studio & Gear instead of Computer Related Hardware.
I sent a mail to the administrator asking how to correct this but did'nt do anything else.
Then I saw that the post was in the good topic as well as the wrong one.
I supposed the administrator did it.
Sorry for this :oops:

2 - Here's the cat /proc/asound/cards and .jackdrc

0 [HDMI ]: HDA-Intel - HDA ATI HDMI
HDA ATI HDMI at 0xfeb44000 irq 54
1 [io2 ]: USB-Audio - io|2
Alesis io|2 at usb-0000:00:12.0-2, full speed
2 [Generic ]: HDA-Intel - HD-Audio Generic
HD-Audio Generic at 0xfeb40000 irq 16

/usr/bin/jackd -dalsa -r44100 -p128 -n2 -D -Chw:1 -Phw:1

Those settings worked until I rebooted.

Pablo
Established Member
Posts: 1270
Joined: Thu Apr 17, 2008 9:57 pm

Re: Another deal gone down... XRUNS all over the place

Post by Pablo »

I suspect that the cards changed numbers. It often happens between reboots. Then jack grabs the wrong card.

To avoid this problem, call the card by its short name, instead of by number. Just type "hw:io2" (without the quotes) instead of selecting "hw:1" or whatever.

infolix76
Established Member
Posts: 13
Joined: Mon May 27, 2013 10:09 am
Location: France

Re: Another deal gone down... XRUNS all over the place

Post by infolix76 »

I tried your advice. No way.
Here's what qjackctl tells me :

Sun Jun 2 20:19:06 2013: Starting jack server...
Sun Jun 2 20:19:06 2013: JACK server starting in realtime mode with priority 10
Cannot connect to server socket err = Aucun fichier ou dossier de ce type
Cannot connect to server request channel
jack server is not running or cannot be started
Sun Jun 2 20:19:11 2013: Device reservation request with priority 2147483647 denied for "Audio1": org.freedesktop.DBus.Error.NoReply (Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply,
Sun Jun 2 20:19:11 2013: ^[[1m^[[31mERROR: Failed to acquire device name : Audio1 error : Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broke^[[0m
Sun Jun 2 20:19:11 2013: ^[[1m^[[31mERROR: Audio device hw:1 cannot be acquired...^[[0m
Sun Jun 2 20:19:11 2013: ^[[1m^[[31mERROR: Cannot initialize driver^[[0m
Sun Jun 2 20:19:11 2013: ^[[1m^[[31mERROR: JackServer::Open failed with -1^[[0m
Sun Jun 2 20:19:11 2013: ^[[1m^[[31mERROR: Failed to open server^[[0m
Sun Jun 2 20:19:11 2013: Saving settings to "/home/olivier/.config/jack/conf.xml" ...
20:19:13.913 Impossible de connecter le serveur JACK comme client. - L'opération a échoué. - Incapable de se connecter au serveur. Veuillez consulter la fenêtre des messages pour plus d'informations.
Cannot connect to server socket err = Aucun fichier ou dossier de ce type
Cannot connect to server request channel
jack server is not running or cannot be started

Mind you, there is no more xruns... But it still does'nt work...

Havoc
Established Member
Posts: 179
Joined: Sat Oct 04, 2008 6:57 pm

Re: Another deal gone down... XRUNS all over the place

Post by Havoc »

What does lsusb says? Just type "lsusb" in a terminal without quotes.

User avatar
autostatic
Established Member
Posts: 1728
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Contact:

Re: Another deal gone down... XRUNS all over the place

Post by autostatic »

infolix76 wrote:1 - I made a mistake posting in Your Studio & Gear instead of Computer Related Hardware.
I sent a mail to the administrator asking how to correct this but did'nt do anything else.
Then I saw that the post was in the good topic as well as the wrong one.
I supposed the administrator did it.
Sorry for this :oops:
No need to apologize, it was my mistake, I forgot to untick an option when I moved your topic.

Jeremy

Shadow_7
Established Member
Posts: 175
Joined: Tue Jun 08, 2010 3:35 pm

Re: Another deal gone down... XRUNS all over the place

Post by Shadow_7 »

Perhaps check your .asoundrc to see if it changed. Check the output of ps to see if pulse is running. My system is setup to not auto start pulse. And I have two variants of .asoundrc, one for pulse and one for jack. With a custom edit to /etc/pulse/client.conf to keep pulse from auto restarting when stopped (autospawn = no).

You might also check your levels in alsamixer. If you've saved settings in multiple mixer apps, your distro might favor one setting over another. Debian ignores aumix's settings if you have an asound.state for alsactl. It's probably something stupid and you're just over thinking it.

You might also check your kernel version. If you're using proprietary drivers and your kernel upgraded, you might not have the acceleration bits of the video driver for the newer kernel and need to re-install the video driver. And of course reboot or restart X if you changed that.

Pablo
Established Member
Posts: 1270
Joined: Thu Apr 17, 2008 9:57 pm

Re: Another deal gone down... XRUNS all over the place

Post by Pablo »

Also, try disabling d-bus interface, in qjackctl, setup, Misc tab.
Then quit qjackctl and type in the terminal:

killall -9 jackd jackdbus

And try again

infolix76
Established Member
Posts: 13
Joined: Mon May 27, 2013 10:09 am
Location: France

Re: Another deal gone down... XRUNS all over the place

Post by infolix76 »

Thanx for the answers. I cannot try them out now because I'm far away from home.
I'll try when I'm back on Wednesday eve.
By the way, I said the desktop applications were mute but it's not exact.
In fact when I play an mp3 on audacious for instance, I hear a cracking sound instead of the music.
This sound seems to follow the meters and stops as soon as I close the apps.
???

infolix76
Established Member
Posts: 13
Joined: Mon May 27, 2013 10:09 am
Location: France

Re: Another deal gone down... XRUNS all over the place

Post by infolix76 »

Hi all,

I just came back home late yesterday and did'nt have the courage to check your tips right away.

To Havoc
Here the answer to the lsusb command :

olivier@EnfinLibre:~$ lsusb
Bus 002 Device 002: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
Bus 003 Device 002: ID 13b2:0008 Alesis
Bus 003 Device 003: ID 046d:c05a Logitech, Inc. Optical Mouse M90
Bus 003 Device 004: ID 046d:c31c Logitech, Inc. Keyboard K120 for Business
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 006: ID 04b4:6830 Cypress Semiconductor Corp. CY7C68300A EZ-USB AT2 USB 2.0 to ATA/ATAPI
Bus 002 Device 005: ID 04e8:60b3 Samsung Electronics Co., Ltd M2 Portable Hard Drive
Bus 002 Device 003: ID 0bda:0151 Realtek Semiconductor Corp. Mass Storage Device (Multicard Reader)

Seems OK is'nt it?

To shadow_7

Here's the result of a ps | grep pulse

olivier@EnfinLibre:~$ ps -edalf |grep pulse
1 S olivier 2161 1 3 69 -11 - 199609 poll_s juin02 ? 05:13:59 /usr/bin/pulseaudio --start --log-target=syslog
1 Z olivier 2193 2161 0 69 -11 - 0 exit juin02 ? 00:00:00 [pulseaudio] <defunct>
0 S olivier 2287 2161 0 80 0 - 24568 poll_s juin02 ? 00:00:00 /usr/lib/pulseaudio/pulse/gconf-helper

defunct ????

I could'nt find any .asoundrc file, nor in my home dir, nor into /etc, nor anywhere...
In /etc/pulse/client.conf autospawn = no
The audiomixer levels are OK and my kernel has'nt changed. In fact nothing has changed since last week when everything was working correctly. :(

To Pablo

Disabling jackdbus has'nt changed anything.

I think I'll reinstall the whole lot and redo all the things I've done to get it work. I hope that this won't happen everytime I reboot the machine...

Shadow_7
Established Member
Posts: 175
Joined: Tue Jun 08, 2010 3:35 pm

Re: Another deal gone down... XRUNS all over the place

Post by Shadow_7 »

defunct isn't a good sign. Basically a process that was supposed to have stopped running, but refused to. You could try a couple kill -9 or killall commands on that process. Or pulseaudio --kill. Having pulse running at a minimum uses additional resources, RAM + CPU cycles. It is possible to run pulseaudio over jack, but if you don't have a reason to, you're probably better off not running pulseaudio at all. Easier said than done, and java applets are built for pulse by default, so media content web browsing these days pretty much requires you to run pulse.

Without the autospawn = no option pulse will try to restart itself if stopped. Otherwise "pulseaudio --kill" should stop it. Note that it is --kill, not --stop as --stop does nothing useful. Otherwise check top to see what's using resources when you get your xruns. And free or cat /proc/meminfo to see the health of your current session as well. And you'll probably want to use pulse after you're done using jack. "pulseaudio --start"

As a side note my .asoundrc when using pulse and when using jackd.

Code: Select all

#defaults.pcm.card 0

pcm.pulse {
  type pulse
}
ctl.pulse {
  type pulse
}
pcm.!default {
  type pulse
}
ctl.!default {
  type pulse
}
pulse above and jack below

Code: Select all

pcm.ice1712 {
  type hw
  card 0
}
ctl.ice1712 {
  type hw
  card 0
}
pcm.!default {
  type plug
  slave.pcm ice1712
}
ctl.!default {
  type plug
  slave.pcm ice1712
}
pcm.dsnoop1712 {
  type dsnoop
  slave.pcm ice1712
  bindings.0 3
}
The dsnoop because I have my mic in the 4th input and audacity only lets me select the 1st input. I don't think that ever did anything for me to be honest, but I had to try. I also have my cards re-indexed so my pci soundcard is device 0. It's less troublesome that way.

infolix76
Established Member
Posts: 13
Joined: Mon May 27, 2013 10:09 am
Location: France

Re: Another deal gone down... XRUNS all over the place

Post by infolix76 »

I reinstalled UbuntuStudio from scratch.

I probably did the mistake of leaving the IO2 usb card plugged in while doing so.
It might have been taken into account (and misinterpreted by the system)
I thought I had noted all my actions to get it work but oviously not.

Now once again : no sound at all (not even the scratchings I had before).

Can jackd work alone or pulseaudio. Do I have to get rid of one of them ? :?:

All I want to play a guitar through a program that modifies the sound in real time (no latency) and eventually record it.
I want to be able to edit a personal video and add some sound to it. Record it and play it again.
I want to watch films and listen to music I stored on my disk. :(

Is anybody there on this site to explain simply and plainly how to get jackd and pulseaudio to work together.
Most of the answers I get are probably from gurus to whom those questions seem so trivial (anyway thanks for there help) But most of the times, I don't quite understand the in and outs.
Some say check this, check that. I check and it's OK.
Some say modify this script or that script. I do and it does'nt change a thing.

I have the gnawing impression of beeing back in old Billy the Gates territory.
You encounter a problem, find a solution that works, OK.
Then the day after the same problem occurs but the yesterdays solution does'nt work any longer. :evil:

My experience with Unix systems lead me to believe once you settled something, it was for good.

Last week, everything was working to plan and then...
Am I really too daft?
There MUST be people around this site (and others) who encountered this same problem and solved it.

Cheers to all, anyway.

Pablo
Established Member
Posts: 1270
Joined: Thu Apr 17, 2008 9:57 pm

Re: Another deal gone down... XRUNS all over the place

Post by Pablo »

Linux audio is involved. It is evolving and there are a lot of variables. Helpers do our best but we run a number of different distros, which use different versions of the several relevant pieces of software, and they come with different system configurations. Add to this audio cards, desktop environments ...

You have to at least say, what distro AND distro version you are using. For best support, use your distro's support channels.

KXstudio is very well supported here at LM.

Shadow_7
Established Member
Posts: 175
Joined: Tue Jun 08, 2010 3:35 pm

Re: Another deal gone down... XRUNS all over the place

Post by Shadow_7 »

Mixer settings are muted by default. Might as well start with the simple stuff.

$ alsamixer -c 0
(or whatever device # applies, check /proc/asound/cards if you have to)

$ pavucontrol
(pulse audios control center of sorts)

And test to see if they work.

$ speaker-test -c 2
(with ^C to stop it, the -c 2 is the number of output channels to test (left + right), not the card number.)

The simplest .asoundrc file I know of is a one liner.

Code: Select all

defaults.pcm.card 0
Where 0 is the number of the default card. Some audio applications require an .asoundrc configuration to exist. Some audio applications even require an FQDN and other networking things to be proper before they let you get past starting them. It would be nice if it was simpler, but a lot of time it isn't.

Post Reply