Ultralite AVB

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

Moderators: MattKingUSA, khz

mxxxl
Established Member
Posts: 4
Joined: Thu Jul 23, 2020 2:45 pm

Re: Ultralite AVB

Post by mxxxl »

bluebell wrote: Fri Sep 11, 2020 8:00 pm
mxxxl wrote: Fri Sep 11, 2020 10:11 am Hi,
I have been using the driver for about a week now in a production environment with kernel 5.8.5, it works flawlessly! :D :D :D
Thank you!!
What interface exactly? UltraLite AVB? The old one or the new one with ESS chips?
The new one with ESS chips and FW 1.3.5+637. The driver works like a dream on my T430 Laptop with kernel 5.8.5 whereas on an Lenovo Thinkcentre with kernel 5.7.0 I still get one channel hop after approx. 12 hours.
tvaz
Established Member
Posts: 24
Joined: Sun Nov 10, 2019 5:55 pm
Been thanked: 1 time

Re: Ultralite AVB

Post by tvaz »

Hi @mxxxl !
mxxxl wrote: Fri Sep 11, 2020 10:11 am The new one with ESS chips and FW 1.3.5+637. The driver works like a dream on my T430 Laptop with kernel 5.8.5 whereas on an Lenovo Thinkcentre with kernel 5.7.0 I still get one channel hop after approx. 12 hours.
This is very encouraging!! I have the very same model/firmware and can't get even 1 minute of sound using the last patch. I've tried 5.8.6, 5.8.10 and 5.8.11. Would you have a .deb package of your working kernel to share? Or the kernel config file? Any additional alsa/jack/ua101 tweak you needed to perform in order to make it working?

EDIT: I've just tried 5.8.5 and the problem remains :(

Thanks,
tvaz
Established Member
Posts: 24
Joined: Sun Nov 10, 2019 5:55 pm
Been thanked: 1 time

Re: Ultralite AVB

Post by tvaz »

More testing results, this time with some good news:

MOTU Ultralite AVB ESS, kernel 5.8.5 with Drumfix ua101.c patch. Debian Buster.

After having sound stopping/distorting with a Thinkpad X1 Carbon 4th gen, I tried with two other laptops:

Lenovo X220: works! Tested for about 1h without issues.

Asus Zenbook ultrabook: works! Also tested for about 1h without issues.

So I came back to my main system on the X1 and started playing with USB kernel options. It happened that when I remove support for EHCI USB (unset CONFIG_USB_EHCI_HCD) it worked! By worked I mean for the first time I've been playing with the device for about 1h without any issues. Before it didn't last (consistently!) even a single minute.

I have no idea why my X1 needs this option out, while the other two laptops will just work with the patch.

Hope it helps and gives some hope for other users struggling with the new ESS chip version.
michaelv
Established Member
Posts: 5
Joined: Wed Apr 29, 2020 3:01 pm

Re: Ultralite AVB

Post by michaelv »

tvaz wrote: Thu Sep 24, 2020 5:03 pm Still on Ultralite AVB ESS using the recent ua101.c from Drumfix: I'm having different results when testing the same kernel in different computers.

For instance, in a Thinkpad X1 carbon it doesn't last 10 seconds of proper sound before getting artifacts and stop. In a regular desktop machine I can keep it working for a while if I set sample rate to 44100. However, the sound is not super clean. For higher sample rates it works beautiful for a few minutes, just enough time to give me some hope, which I never get on the Thinkpad. Then it stops again.

I've tried now old patches shared on this thread on early 5.7.X and 5.8.X versions, getting quite the same results, unfortunately.

I'm intrigued by this message, though, from @michaelv :
michaelv wrote: Sun May 03, 2020 6:20 pm
Drumfix wrote: Sat May 02, 2020 8:10 pm The patches will only go into the kernel after i get verification from users of the Ultralite AVB that they solve the problem. I can only check with my 16A AVB which uses the same vendor/product ID as all the other AVB products. With the patches, everything runs smooth. Without the patches, channel hopping galore.
Hello,
i got the Ultralite AVB ESS Version with Firmware 1.3.5+637 last Tuesday. Unfortunately i found this Forum too late. Anyway i installed 2 days ago the patches from Drumfix on Kernel 5.6.7 and also on 5.6.7-rt3. I`m̀ using Debian unstable. Til now with the Realtimekernel the patches works perfect. There is no channelhopping at all. With vanilla kernel the sound disappears sometimes. Often a restart from jack helps than. I'm using it with pulseaudio and jack on both kernels.
Michael
So, Michael, could you share if things are still working on your side? If so, which patch exactly did you use for the 5.6.7-rt3?

Thanks.
HI, well with both kernels sound stopped after some time when jackd was running. After a restart from Jack it worked again for some time. Without jack i had sometimes the channelhopping. I used the old patch from drumfix for clock.c,endpoint.c and pcm.c. Now im using the new ua101.c with kernel 5.8.11. I have still the same issue after time that sound stops suddenly.Though sometimes it stops after hours running. I can live with that :)
User avatar
bluebell
Established Member
Posts: 1909
Joined: Sat Sep 15, 2012 11:44 am
Location: Saarland, Germany
Has thanked: 111 times
Been thanked: 116 times

Re: Ultralite AVB

Post by bluebell »

I wonder if it's the ehci module that makes trouble.

I have no problems at all and

Code: Select all

cat /proc/interrupts | grep ehci
returns nothing.

Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/

root2
Established Member
Posts: 25
Joined: Wed Apr 15, 2020 9:48 am
Location: Germany
Has thanked: 1 time

Re: Ultralite AVB

Post by root2 »

I tried disabling CONFIG_USB_EHCI_HCD but nothing has changed for me.

Code: Select all

cat /proc/interrupts | grep ehci
returns nothing for me either
tvaz
Established Member
Posts: 24
Joined: Sun Nov 10, 2019 5:55 pm
Been thanked: 1 time

Re: Ultralite AVB

Post by tvaz »

Some update:

The sound indeed stops after a few hours (regular channel hopping issue..)
Still much better than when I have a kernel with EHCI enable, which lasts no more than a few seconds.

@root2, along with disabling EHCI, I compiled the kernel with xHCI HCD (USB 3.0) as a module, not as built-in. Also, I only tried with 5.8.5, not sure if this will work with other versions.

All in all, I think there are two different issues here:

1. Something closely related to USB communication in some hardware that makes the Ultralite totally unusable, as you get artifacts and then silence in a few seconds of operation. This happened to my Lenovo X1 Carbon. For this situation, my solution was disabling EHCI and compiling xHCI as module in a kernel 5.8.5. Once fixed, I get to the next (known) issue:

2. Channel hopping, which some users can live with. In my case, it usually takes hours to get the modulus-8 shift to channels 9-10 and then 17-18. If we use only two in/out, we can do the workaround mentioned by @bluebell at viewtopic.php?p=118241#p118241. Otherwise, we'll have to wait for updates from kernel/drivers devs :\ Btw, using jack I get much more stability (more hours of normal operation) than using pulseaudio.

ps: I've contacted MOTU on this, and their answer is basically: we do not care about you, dear linux weird little person. I asked if they could exchange my brand new ESS with the older model. They won't. I do not recommend MOTU to any Linux user, definitely.
User avatar
bluebell
Established Member
Posts: 1909
Joined: Sat Sep 15, 2012 11:44 am
Location: Saarland, Germany
Has thanked: 111 times
Been thanked: 116 times

Re: Ultralite AVB

Post by bluebell »

tvaz wrote: Wed Sep 30, 2020 3:38 pm 1. Something closely related to USB communication in some hardware that makes the Ultralite totally unusable, as you get artifacts and then silence in a few seconds of operation. This happened to my Lenovo X1 Carbon. For this situation, my solution was disabling EHCI and compiling xHCI as module in a kernel 5.8.5. Once fixed, I get to the next (known) issue:
Ihad those issues when I used small queue lengths like

Code: Select all

options snd_ua101 samplerate=48000 queue_length=8 midi=1
Can you try bigger-than-default values, like

Code: Select all

options snd_ua101 samplerate=48000 queue_length=64 midi=1

Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/

tvaz
Established Member
Posts: 24
Joined: Sun Nov 10, 2019 5:55 pm
Been thanked: 1 time

Re: Ultralite AVB

Post by tvaz »

bluebell wrote: Wed Sep 30, 2020 4:38 pm
tvaz wrote: Wed Sep 30, 2020 3:38 pm 1. Something closely related to USB communication in some hardware that makes the Ultralite totally unusable, as you get artifacts and then silence in a few seconds of operation. This happened to my Lenovo X1 Carbon. For this situation, my solution was disabling EHCI and compiling xHCI as module in a kernel 5.8.5. Once fixed, I get to the next (known) issue:
Ihad those issues when I used small queue lengths like

Code: Select all

options snd_ua101 samplerate=48000 queue_length=8 midi=1
Can you try bigger-than-default values, like

Code: Select all

options snd_ua101 samplerate=48000 queue_length=64 midi=1
Ah, yes I've played with queue lengths, but no more than 30, given the MAX value defined in the module:

Code: Select all

#define MAX_QUEUE_LENGTH        30
But maybe this max value does another thing and doesn't really limit the queue_length value then? So I'll give it a try and report in case of any improvement, thanks.
Jamesf
Established Member
Posts: 70
Joined: Tue May 28, 2019 12:23 pm
Location: Madrid
Has thanked: 51 times
Been thanked: 13 times

Re: Ultralite AVB

Post by Jamesf »

tvaz wrote: Wed Sep 30, 2020 3:38 pmps: I've contacted MOTU on this, and their answer is basically: we do not care about you, dear linux weird little person. I asked if they could exchange my brand new ESS with the older model. They won't. I do not recommend MOTU to any Linux user, definitely.
Useful to know. I've been following this thread with interest, thinking this device could be a viable upgrade path from my current device.
Apparently not, given that response from MOTU.
I'm slow, but I get there eventually.
ahellquist
Established Member
Posts: 62
Joined: Mon Jul 01, 2013 12:28 am
Has thanked: 4 times

Re: Ultralite AVB

Post by ahellquist »

Jamesf wrote: Thu Oct 01, 2020 7:48 am
tvaz wrote: Wed Sep 30, 2020 3:38 pmps: I've contacted MOTU on this, and their answer is basically: we do not care about you, dear linux weird little person. I asked if they could exchange my brand new ESS with the older model. They won't. I do not recommend MOTU to any Linux user, definitely.
Useful to know. I've been following this thread with interest, thinking this device could be a viable upgrade path from my current device.
Apparently not, given that response from MOTU.
RME is stepping up the AVB game and have previously been working well on Linux (their FireWire stuff). I don't know if that is true for the current models but if, they might be worth looking into.
Jamesf
Established Member
Posts: 70
Joined: Tue May 28, 2019 12:23 pm
Location: Madrid
Has thanked: 51 times
Been thanked: 13 times

Re: Ultralite AVB

Post by Jamesf »

ahellquist wrote: Thu Oct 01, 2020 8:32 am
Jamesf wrote: Thu Oct 01, 2020 7:48 am
tvaz wrote: Wed Sep 30, 2020 3:38 pmps: I've contacted MOTU on this, and their answer is basically: we do not care about you, dear linux weird little person. I asked if they could exchange my brand new ESS with the older model. They won't. I do not recommend MOTU to any Linux user, definitely.
Useful to know. I've been following this thread with interest, thinking this device could be a viable upgrade path from my current device.
Apparently not, given that response from MOTU.
RME is stepping up the AVB game and have previously been working well on Linux (their FireWire stuff). I don't know if that is true for the current models but if, they might be worth looking into.
Funny you should mention them; Babyface Pro FS is what I'm currently plotting to upgrade to.
AVB looks fantastic, but I'm not working at that level, and (the option of) more inputs is of more real value to me at the moment.
I'm slow, but I get there eventually.
Drumfix
Established Member
Posts: 299
Joined: Mon Jan 26, 2009 5:15 pm
Been thanked: 11 times

Re: Ultralite AVB

Post by Drumfix »

Since they started to build USB interfaces RME completely ignores Linux. So buying any of their newer interfaces is a complete waste of money. TotalMix doesn't work at all. Only USB class compliant work.

@tvaz
Having a computer where the problems shows up very quickly is actually a good thing for debugging.

First of all, make sure you have done all of the following:

1. Disable any kind of CPU turbo boost in the bios and set the cpu frequency to a fixed value.
2. add "acpi_irq_nobalance nowatchdog nohz=off intel_idle.max_cstate=1" to your kernel command line
3. Set the smp affinity of the interrupts such, that the usb host controller has its own core, e.g. on 4 core/8 threads CPU
as root, "echo f > /proc/irq/<for all irq number except that of the usb host controller>/smp_affinity
and " echo 10 > proc/irq/<usb host controller irq>/smp_affinity
4. set the cpu governor to "performance"
5. unload all drivers that use the usb host controller except the motu driver (e.q some pages up there was the btusb and the uvcvideo driver)

Drumfix
tvaz
Established Member
Posts: 24
Joined: Sun Nov 10, 2019 5:55 pm
Been thanked: 1 time

Re: Ultralite AVB

Post by tvaz »

Drumfix wrote: Thu Oct 01, 2020 9:35 pm Since they started to build USB interfaces RME completely ignores Linux. So buying any of their newer interfaces is a complete waste of money. TotalMix doesn't work at all. Only USB class compliant work.

@tvaz
Having a computer where the problems shows up very quickly is actually a good thing for debugging.

First of all, make sure you have done all of the following:

1. Disable any kind of CPU turbo boost in the bios and set the cpu frequency to a fixed value.
2. add "acpi_irq_nobalance nowatchdog nohz=off intel_idle.max_cstate=1" to your kernel command line
3. Set the smp affinity of the interrupts such, that the usb host controller has its own core, e.g. on 4 core/8 threads CPU
as root, "echo f > /proc/irq/<for all irq number except that of the usb host controller>/smp_affinity
and " echo 10 > proc/irq/<usb host controller irq>/smp_affinity
4. set the cpu governor to "performance"
5. unload all drivers that use the usb host controller except the motu driver (e.q some pages up there was the btusb and the uvcvideo driver)

Drumfix
Thanks for the hints, @Drumfix! After following the steps above I left the device playing overnight. It's been more than 12 hours without any issue, no channel hopping, no distortion, no interruptions, crystal clear sound. What I precisely have now is:

Kernel 5.8.5 with your snd_ua101 module, compiled without EHCI support, booted with the following options:

Code: Select all

root@x1:~# cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-5.8.5 root=/dev/mapper/x1--vg-root ro snd_hda_intel.dmic_detect=0 intel_iommu=off acpi_irq_nobalance nowatchdog nohz=off intel_idle.max_cstate=1 quiet
I unloaded btusb and uvcvideo modules, which were on ports 7 and 8, so that only snd-motu-avb is using the controller:

Code: Select all

root@x1:~# lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/12p, 480M
    |__ Port 1: Dev 5, If 7, Class=Vendor Specific Class, Driver=snd-motu-avb, 480M
    |__ Port 1: Dev 5, If 5, Class=Vendor Specific Class, Driver=snd-motu-avb, 480M
    |__ Port 1: Dev 5, If 3, Class=Audio, Driver=snd-motu-avb, 480M
    |__ Port 1: Dev 5, If 1, Class=Audio, Driver=snd-motu-avb, 480M
    |__ Port 1: Dev 5, If 6, Class=Vendor Specific Class, Driver=snd-motu-avb, 480M
    |__ Port 1: Dev 5, If 4, Class=Audio, Driver=snd-motu-avb, 480M
    |__ Port 1: Dev 5, If 2, Class=Audio, Driver=snd-motu-avb, 480M
    |__ Port 1: Dev 5, If 0, Class=Audio, Driver=snd-motu-avb, 480M
    |__ Port 7: Dev 3, If 0, Class=Wireless, Driver=, 12M
    |__ Port 7: Dev 3, If 1, Class=Wireless, Driver=, 12M
    |__ Port 8: Dev 4, If 1, Class=Video, Driver=, 480M
    |__ Port 8: Dev 4, If 0, Class=Video, Driver=, 480M
Then I've set 8 for irq 126 and f for all the others:

Code: Select all

root@x1:~# cat /proc/interrupts
            CPU0       CPU1       CPU2       CPU3       
   0:          7          0          0          0  IR-IO-APIC    2-edge      timer
   1:          0          0       5234          0  IR-IO-APIC    1-edge      i8042
   8:          0          0          0          1  IR-IO-APIC    8-edge      rtc0
   9:          0     296273          0          0  IR-IO-APIC    9-fasteoi   acpi
  12:          0     256418          0          0  IR-IO-APIC   12-edge      i8042
  16:          0          0          2          0  IR-IO-APIC   16-fasteoi   i801_smbus
  20:          0          0          0     206672  IR-IO-APIC   20-fasteoi   intel_ish_ipc
 120:          0          0          0          0  DMAR-MSI    0-edge      dmar0
 121:          0          0          0          0  DMAR-MSI    1-edge      dmar1
 124:          0     400963          0          0  IR-PCI-MSI 376832-edge      ahci[0000:00:17.0]
 125:      21687          0          0          0  IR-PCI-MSI 520192-edge      enp0s31f6
 126:          0      80529          0  684608183  IR-PCI-MSI 327680-edge      xhci_hcd
 127:          0          0    1311847          0  IR-PCI-MSI 32768-edge      i915
 128:          0          0          0        104  IR-PCI-MSI 360448-edge      mei_me
 129:          0          0          0          0  accel_3d-dev0       accel_3d_consumer0
 131:     573222          0          0          0  IR-PCI-MSI 2097152-edge      iwlwifi
 132:          0        830          0          0  IR-PCI-MSI 514048-edge      snd_hda_intel:card0

Code: Select all

root@x1:~# cat /proc/irq/126/effective_affinity
8
Set CPU governor to performance:

Code: Select all

root@x1:~# cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
performance
performance
performance
performance
Now that everything is working for so long I don't really know how to start debugging :-) Let me know if you have any directions. I'll update this post if the problem appears again using the current setup.

Bests,

tvaz
User avatar
bluebell
Established Member
Posts: 1909
Joined: Sat Sep 15, 2012 11:44 am
Location: Saarland, Germany
Has thanked: 111 times
Been thanked: 116 times

Re: Ultralite AVB

Post by bluebell »

I'd start with only blacklisting the bt and video drivers.

AFAIK the governor doesn't matter if you use the intel_pstate driver:

Code: Select all

root@bubu:~# cpufreq-info | grep pstate
  Treiber: intel_pstate
  Treiber: intel_pstate
  Treiber: intel_pstate
  Treiber: intel_pstate
  Treiber: intel_pstate
  Treiber: intel_pstate
  Treiber: intel_pstate
  Treiber: intel_pstate

Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/

Post Reply