Ultralite AVB

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

Moderators: MattKingUSA, khz

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 »

It's compiling.

Hope I get the initrd and grub-stuff done.

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

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 »

Fuck, the initrd is too big for my /boot. Have to remove some modules.

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

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 »

bluebell wrote: Mon May 04, 2020 10:45 am Fuck, the initrd is too big for my /boot. Have to remove some modules.
No, that won't help AFAIU. I am stuck at the moment. Maybe /boot as USB-Stick? But will it work?

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

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 »

Code: Select all

sudo make INSTALL_MOD_STRIP=1 modules_install install
does the trick.

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

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 »

Drumfix wrote: Sun May 03, 2020 10:24 pm So, the attached patch should fix the following:
- startup problems with pulseaudio or jack in duplex mode
- channel hopping/bit crushing due to x-runs or sync issues
- channel hopping when changing buffersize on the fly with jack_bufsize

Note: It can take up to about 10 seconds for sound to come back when changing the buffersize on the fly.

Caution: For testing purposes only. Use at your own risk:
Do not try this if you are not familiar with kernel compilation and how to get rid of a non-working kernel:

Download linux-5.7-rc4 from www.kernel.org
tar zxf linux-5.7-rc4.tar.gz
cd linux-5.7-rc4
copy motu-avb.patch.txt to this location
patch -p1 < motu-avb.patch.txt
make oldconfig
Just press <return> when asked for new parameters or enter the indicated default were an input is strictly needed
make
sudo make modules_install install

boot into the new kernel
- channel hopping when changing buffersize on the fly with jack_bufsize
fixed with this kernel, at least with old firmware.

Before I install new firmware to my motu I have to find out why starting Audacity freezes my machine with this kernel.

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

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 »

bluebell wrote: Mon May 04, 2020 12:07 pm
Before I install new firmware to my motu I have to find out why starting Audacity freezes my machine with this kernel.
kernel bug at mm/vmalloc.c 2385
invalid opcode 0000

So this kernel is not for me.

Do you think I can try patching 4.13.0-38-lowlatency from Wed Mar 14 ?

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

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 »

bluebell wrote: Mon May 04, 2020 12:20 pm
bluebell wrote: Mon May 04, 2020 12:07 pm
Before I install new firmware to my motu I have to find out why starting Audacity freezes my machine with this kernel.
kernel bug at mm/vmalloc.c 2385
invalid opcode 0000

So this kernel is not for me.

Do you think I can try patching 4.13.0-38-lowlatency from Wed Mar 14 ?
I tried 4.15 and 3 of 4 hunks failed.

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

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 »

bluebell wrote: Mon May 04, 2020 12:20 pm
bluebell wrote: Mon May 04, 2020 12:07 pm
Before I install new firmware to my motu I have to find out why starting Audacity freezes my machine with this kernel.
kernel bug at mm/vmalloc.c 2385
invalid opcode 0000

So this kernel is not for me.

Do you think I can try patching 4.13.0-38-lowlatency from Wed Mar 14 ?
The same happens with 5.6.10 and the patch.

I haven't tried 5.6.10 without the patch.

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

ahellquist
Established Member
Posts: 62
Joined: Mon Jul 01, 2013 12:28 am
Has thanked: 4 times

Re: Ultralite AVB

Post by ahellquist »

I did try your patch with suggested kernel on a Ubuntu Studio 20.04 Default XFCE Nouveau driver

Compiling and installing went well after reverting from Nvidia to Opensource drivers

My system booted up to login manager but freeze pretty hard before being able to login. Mouse also stuck, Power off was the only option. Did try magic key sequence but hard to get right on this laptop with odd placement/markings of the keys.

Regards, Anders
Drumfix
Established Member
Posts: 299
Joined: Mon Jan 26, 2009 5:15 pm
Been thanked: 11 times

Re: Ultralite AVB

Post by Drumfix »

@bluebell Try to boot with the option "nowatchdog".
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 »

Drumfix wrote: Mon May 04, 2020 6:47 pm @bluebell Try to boot with the option "nowatchdog".
- 5.7.0-rc4 vanilla, without nowatchdog
no problem starting audacity

- 5.7.0-rc4 with patch, without nowatchdog
audacity freezes machine

- 5.7.0-rc4 with patch, with nowatchdog
audacity freezes machine

Too bad.

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

Drumfix
Established Member
Posts: 299
Joined: Mon Jan 26, 2009 5:15 pm
Been thanked: 11 times

Re: Ultralite AVB

Post by Drumfix »

Then split the patchfile into separate files for each patch and test them incrementally.

The patchfile consists of 3 patches, each starting with the line containing the "diff".

The 3rd patch is the important one for the channel hopping, so start with that one.
puleglot
Established Member
Posts: 135
Joined: Thu Jan 23, 2020 3:14 pm
Has thanked: 3 times
Been thanked: 13 times

Re: Ultralite AVB

Post by puleglot »

@Drumfix maybe you need a check before calling usb_set_interface() ?

Code: Select all

	case SNDRV_PCM_TRIGGER_STOP:
		if (subs->interface >= 0) {
			usb_set_interface(subs->dev, subs->interface, 0);
			subs->altset_idx = 0;
		}
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 »

Drumfix wrote: Mon May 04, 2020 9:57 pm Then split the patchfile into separate files for each patch and test them incrementally.

The patchfile consists of 3 patches, each starting with the line containing the "diff".

The 3rd patch is the important one for the channel hopping, so start with that one.
I left out this patch (I used original pcm.c) -> no freeze.

So the patch for pcm.c seems to be the cause for the freeze.

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

puleglot
Established Member
Posts: 135
Joined: Thu Jan 23, 2020 3:14 pm
Has thanked: 3 times
Been thanked: 13 times

Re: Ultralite AVB

Post by puleglot »

Patch for pcm.c with added check for subs->interface >= 0. @bluebell could you test it?
Attachments
motu-avb.txt
(1.14 KiB) Downloaded 71 times
Post Reply