AudioTechnology

Digidesign (original Mbox) Linux Driver

digidesign_mbox

Linux_Logo

A few people have asked me since I made the MBox2 driver whether the original Mbox (with Focusrite preamps) could be made to work with Linux.

The current status in the mainline kernel is that playback is supported but users have reported issues with loud static noises appearing sporadically. Capture is not supported currently at all.

I FIXED IT!

You need two things:

1) Firmware update from Avid here, also mirrored on my site here.

You need access to a Mac computer to flash the updated firmware to the device to fix the problem with the sporadic white noise.

Run this command in linux with the device plugged in to check your current firmware version:
sudo lsusb -vv -d 0dba:1000 |grep bcdDevice |awk '{print $2}'

Anything less than 0.22 and you will need the updated firmware above.

2) My driver code (kernel lower than 3.5)

Make sure you have kernel headers installed and a working C compiler.
You can download my working driver here:

git clone http://www.github.com/zamaudio/alsa-driver.git
cd alsa-driver/alsa
git checkout mbox1clean
./gitcompile
sudo make install

Reboot and enjoy!

Alternatively, if you want to run a newish 3.14 kernel grab this tarball instead.

tar zxvf mbox1-3.14.tar.gz
cd mbox1-3.14
make
sudo make install

Reboot and enjoy!

NOTE: Kernels 3.5 – 3.13 are NOT supported.
There was some bug that caused a bucketload of xruns.

As of Linux Kernel 3.19, these changes are merged into the kernel already.

95 thoughts on “Digidesign (original Mbox) Linux Driver

  1. I don’t see any signs that Alsa is releasing a new version soon. I ended up installing Wheezy instead of downgrading my kernel (I normally run Arch).

  2. I havnt seen any new progress in the mailing list.

    Zamaudio is very busy so its understandable there has been no more progress yet.

    Im fine running 3.5 to get it working but ive kind of abandoned the mbox due to pops and clicks in playback which i think is a commen USB audio problem with some devices.

    It works in windows fine, but ive tested this on 2 different machines under linux and both have the same problem though 1 machines has significantly less clicks than the other.

  3. Alex: I believe you need a RT patched kernel for best performance and proper IRQ scheduling set up for the timers and sound device. Can get stable performance that way.

  4. I run kx studio which should be setup correctly for RT and irq scheduling.

    i did try an RT kernel rather than lowlatency and setup irq scheduling manually which didnt help either.

  5. after much research ive found that usb pops and clicks are usually caused by the data stream being interupted, unfortunatly this only seems to be fixed in the later kernels 3.13 and up. there is a usb audio fix backport but its 3.10,

    so will just have to wait until the code gets accepted upstream

  6. Alex: I ported my patch to 3.14 you can download the tarball above ^^ until i get it into ALSA. You are right there was some bug in the kernel that caused shitload of xruns, I’m not supporting any kernel between 3.5 to 3.13. 3.14 seems good on my machine.

  7. Great thanks for that, im testing it now. I did get an error however it didnt stop it compiling or instlaling

    /home/bazsound/mbox1-3.14/quirks.c: In function ‘create_fixed_multi_stream_quirk’:
    /home/bazsound/mbox1-3.14/quirks.c:209:4: warning: too many arguments for format [-Wformat-extra-args]
    snd_printk(KERN_ERR, “cannot memdup %d\n”, i);
    ^
    hopefully after rebooting should have some results

  8. Great Thanks allot for the MBox 1 driver it runs well
    Have a good time.
    Alain Bouron

  9. unfortunatly im still plagued with clicks and pops no matter what i do. Im beginning to think its my cheap ass motherboard since Alan Bouron has it working great.

    Alain, just out of curiosity, what sort of setup are you running?

    ive installed windows so will be testing to see if it works in windows

  10. Hi, Zam, thanks a lot again for making this driver, !

    I’m trying to make it work in an updated Debian Testing:

    ~$ uname -a
    Linux 3.14-2-amd64 #1 SMP Debian 3.14.15-2 (2014-08-09) x86_64 GNU/Linux

    I’ve downloaded the 3.14 tarball, untar it, enter the ‘mbox1-3.14’ folder and at the moment of ‘make’ it I’m having the next error, any idea what could be (or what could I do)?

    ~/mbox1-3.14$ make
    make -C /lib/modules/3.14-2-amd64/build M=/route/to/folder/mbox1-3.14 modules
    make[1]: *** /lib/modules/3.14-2-amd64/build: No existe el fichero o el directorio. Alto.
    Makefile:20: recipe for target ‘all’ failed
    make: *** [all] Error 2

    [I’m from Argentina, the system is mostly in spanish: “No existe el fichero o el directorio. Alto.” means “File or folder doesn’t exist. Stop.”]

    Please, let me know if I have to past any system/hardware information or anything else and thanks a lot in advance, !

  11. Hi, Zam, me again. Sorry for the silliness, I was forgetting the kernel headers…

    Anyway, everything seems like a normal process now, the make and install has gone well, snd-usb-audio.ko and snd-usbmidi-lib.ko are both in /lib/modules/3.16-1-amd64/kernel/sound/usb and I found an option for snd-usb-audio in /etc/modprobe.d/alsa-base.conf
    Nevertheless, although both, ALSA and JACK, can see and use the Mbox for playback none of them seems to be able to use it for recording. From the settings of JACK (via qjackctl) I can set Mbox as input device, but it doesn’t appear in the Connections window as a readable client. Is anything else to do after reboot? Where can I manage the Mbox recording settings?

    Even more: Is there any mail-list, forum, or whatever where I could find help or info on this issues?

    Thanks a lot and please let me know if I have to post any info from the system.

    Best regards!

  12. Just for the record: The drivers seems to work fine on a Ubuntu Studio 12.04 box:

    $ uname -a
    Linux 3.2.0-68-lowlatency #70-Ubuntu SMP PREEMPT x86_64 GNU/Linux

    Thanks a lot!

  13. And for the record again (and apologizing for my idiocy) once installed the rt-kernel and headers, the ‘make’ and ‘install’ went fine and everything is working perfectly.
    Right now (as far as I have tested it), with this specifications, Mbox is working with no issue at all (both for record and playback):

    $ sudo lsusb -vv -d 0dba:1000 |grep bcdDevice |awk ‘{print $2}’
    0.20
    $ uname -a
    Linux user 3.14-2-rt-amd64 #1 SMP PREEMPT RT Debian 3.14.15-2 (2014-08-09) x86_64 GNU/Linux

    And the setup in JACK is: 1024 – 48000 – 2 (Latency: 42,7)

    The rt-kernels and headers are no more in the official Debian repositories (apparently, the standard Debian Linux-kernel can do mostly the same) so you can download them from http://snapshot.debian.org/, hope this can be useful to someone else.

    Best regards, and thanks a lot again!
    *as soon as PayPal let me log in I’ll make some donations as thanks for the work 🙂

  14. rv: Looking at that firmware version you have, (0.20) you probably need to upgrade the internal firmware of your Mbox using a Mac computer to 0.22, otherwise you may get issues starting jackd, or some loud white static noise in the speakers that could damage your equipment. The firmware is found at the top of this page… Cheers, any donations would be much appreciated.

  15. Hello,

    I’ve been happy to read on this page it was possible to use this good old MBox with Linux. But it won’t install for me. I got this error:

    $ sudo make install
    mkdir -p /lib/modules/3.14.12-rt9-1-rt/kernel/sound/usb
    cp *.ko /lib/modules/3.14.12-rt9-1-rt/kernel/sound/usb
    depmod
    modprobe snd-usb-audio
    modprobe: ERROR: could not insert ‘snd_usb_audio’: Invalid argument
    Makefile:26: recipe for target ‘install’ failed
    make: *** [install] Error 1

    Any idea? Thanks!

  16. fifo: There must be some older modules inserted still in your kernel related to sound. Please reboot and it should work.

  17. Hello Damo,
    thank you for your answer. I did try to reboot but it’s still not working.
    Here is some more info, if you have an idea. I’m gonna keep looking into it.

    Here is the dmesg when I plug the Mbox:
    [ 238.312028] usb 4-1.1: new full-speed USB device number 3 using ehci-pci
    [ 238.472857] snd_usb_audio: disagrees about version of symbol snd_usbmidi_create
    [ 238.472862] snd_usb_audio: Unknown symbol snd_usbmidi_create (err -22)
    [ 239.469011] snd_usb_audio: disagrees about version of symbol snd_usbmidi_create
    [ 239.469016] snd_usb_audio: Unknown symbol snd_usbmidi_create (err -22)

    I kinda tried to “force insert” the module with insmod. with the Mbox plugged but still some error:
    [ 1295.531801] usbcore: registered new interface driver snd-usb-audio
    [ 1300.543626] 3:1:1: usb_set_interface failed (-110)
    [ 1305.614010] 3:1:1: usb_set_interface failed (-110)
    [ 1310.701331] 3:1:1: usb_set_interface failed (-110)

    Here is the result of lsmod | grep snd
    snd_usbmidi_lib 21901 0
    snd_rawmidi 23103 1 snd_usbmidi_lib
    snd_seq_device 6609 1 snd_rawmidi
    snd_hda_codec_hdmi 38320 1
    snd_hda_codec_realtek 55948 1
    snd_hda_codec_generic 58909 1 snd_hda_codec_realtek
    snd_hda_intel 43791 3
    snd_hda_codec 131542 4 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_intel
    snd_hwdep 6986 1 snd_hda_codec
    snd_pcm 97138 3 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel
    snd_timer 22386 1 snd_pcm
    snd 75459 17 snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_rawmidi,snd_hda_codec_generic,snd_usbmidi_lib,snd_hda_codec,snd_hda_intel,snd_seq_device
    soundcore 7700 1 snd
    usbcore 227901 7 rt2x00usb,rt2800usb,snd_usbmidi_lib,ehci_hcd,ehci_pci,usbhid,xhci_hcd

  18. fifo: Your version of snd-usbmidi-lib.ko is not the same one that got compiled by my driver… somehow it is using the old one? try reinstalling the ones i provided, then reboot.

  19. Hello again and thanks for your time.
    I’ve finally got your driver to work.
    For the record, i’m kinda newbie to linux.
    I tried without any success with Antergos which is an Arch based distro with the linux 3.14.12_rt9-1 kernel from AUR repository.
    I got it to work without struggle with Crunchbang, a Debian Wheezy based distro with the linux 3.14-0.bpo.2-rt-amd64 from Wheezy backports repository.

  20. Possibly Arch puts its modules in a different place than Debian based distros, it may be a mistake on my end for Arch, I don’t know because I have never mucked around with Arch myself. Sorry about that.. Maybe someone can help you install the module in the right place on your Arch system if that is the problem.

  21. Hello damo,
    I wanted to congratulate you for your patches merged into the Linux kernel 3.19!
    Cordially,
    Julien

  22. Ola Zan, Voce salvou a minha vida e tornou mais real a possibilidade de se produzir musica de forma profissional no linux. Parabens pelo grandioso trabalho. Voce saberia se [e possivel desenvolver uma versao do Drive para OSX leopard?

    Hello Zan , You saved my life and made it more real the possibility of producing music professionally in linux . Congratulations on the great work . You know if [ it is possible to develop a version for OSX Drive leopard ?

  23. Brilliant job! congratulations, I have only one problem with the 3.19 kernel can not work 44100. When configure in jack 44100 always becomes to 48000. Can’t work with older sessions with this kernel. I didn’t find the solution.
    It works great with other kernels.
    Congratulations!
    Pedro

  24. Pedro: Previous kernels did not allow capture at all with Mbox 1. I hardcoded the sample rate to 48000 in 3.19 because it was the easiest way to get SPDIF sync working correctly. So now the capture works, but sample rate is locked to 48000. Sorry can’t do much about this.

  25. Alirio: I have not had a chance to get hold of the Mbox 3 series (yet). If I get enough donations I can buy one to develop the driver.

  26. Hi,
    I seem to have the worst luck getting this to work. In performing Option 1 (through gitcompile) I get this

    checking for directory with ALSA kernel sources… /home//alsa-driver
    checking for directory with kernel source… /lib/modules/3.19.0-15-generic/build
    checking for directory with kernel build… /lib/modules/3.19.0-15-generic/build
    checking for kernel linux/version.h … no
    The file /lib/modules/3.19.0-15-generic/build/include/INCLUDE_VERSION_H does not exist.
    Please install the package with full kernel sources for your distribution
    or use –with-kernel=dir option to specify another directory with kernel
    sources (default is /lib/modules/3.19.0-15-generic/build).

    I specify the file name as

    Music/mbox1-3.14/alsa-driver/include/sound/linux/arch/x86/math-emu/version.h

    with no luck.

    checking for directory with kernel source… Please install the package with full kernel sources for your distribution
    or use –with-kernel=dir option to specify another directory with kernel.

    I specify the director y by inputing the following
    ./configure –with-kernel= $Home/Music/mbox1-3.14/alsa-driver/include/sound/linux/arch/x86/math-emu/version.h
    Still no luck.

    The kernel I have is 3.14 and 3.19

    Let me also add that the top of the posting indicates that Linux Kernel 3.5-3.13 does not work, yet some of the response indicate that 3.14 does work with their build.

    With all that said, please help.
    sources (default is /lib/modules/3.19.0-15-generic/build).

  27. Damo, Thanks for your response.

    The trouble I’m having in 3.19 is to synch the 3.19 kernel when running the ./configure command. Below are the results I get. What’s the best way to correct the error? I have installed a new 3.19 kernel in mbox1, yet it doesn’t seem to recognize that new folder with the kernel. I’ve tried –with-kernel = , and it decides to select a file within the alsa-driver, not where I’ve placed the new folder. Thanks in advance for your comments.

    Results:
    checking for current directory… /home/jimmieking/Music/mbox1-3.14/alsa-driver/alsa
    checking cross compile…
    checking for directory with ALSA kernel sources… /home/jimmieking/Music/mbox1-3.14/alsa-driver
    checking for directory with kernel source… Please install the package with full kernel sources for your distribution
    or use –with-kernel=dir option to specify another directory with kernel
    sources (default is /lib/modules/3.19.0-15-generic/build).

  28. Jay: You don’t need to use the driver from my website, it’s already built into your 3.19 kernel by default.
    Just plug in the MBOX1 and it should work. (Perhaps you need Mbox1 firmware updated on a Mac computer first).

  29. Hi Damo,

    Thanks again for your response. In my original post, it states that I received the following output:

    The file /lib/modules/3.19.0-15-generic/build/include/INCLUDE_VERSION_H does not exist.
    Please install the package with full kernel sources for your distribution
    or use –with-kernel=dir option to specify another directory with kernel
    sources (default is /lib/modules/3.19.0-15-generic/build).

    It’s unclear on this end as to how to remedy the deficit using 3.19.0-15 as the linux kernel.

  30. Hi Damo,
    Thank you for your fine work! As a consequence of which, I recently purchased an MBox1 secondhand. I had some trouble getting it to work to begin with, but after disabling my other audio devices (onboard Intel soundcard + hdmi out) it worked and I can now use the MBox. However, even though there are no xruns (and even if I crank up the period in jackd) there is still a persistent popping, once every 7.5 seconds (approximately), on plavback. This happens whether using jack, pulseaudio or straight alsa. Recording is not afflicted by pops. I’ve been trying to diagnose the problem by searching online, but fruitlessly. Do you have any ideas? I am running Ubuntu Studio 16.04. Any suggestions you can give me will be greatly appreciated.

    Cheers,
    Oscar

  31. Oscar: I’ve never had much success with Ubuntu for pro-audio. I suggest starting with a distro with no non-free components, such as Debian with just main enabled. Also, ensure that you upgrade the firmware to 0.22 on the MBOX1 using a Mac computer.

  32. Damo: Thanks for your response. I was hoping you could offer me some hints on what sort of troubleshooting avenues might be worth pursuing, i.e. how I might go about finding the cause of the problem (after all, there’s no point in installing another distro only to discover that the non-free component that was causing the problem is one that I need). But I realise that might be hard to do with the limited info I gave. PS: I did already upgrade the firmware using a mac and verify that the current firmware is 0.22.

    Regards,
    Oscar

  33. Mbox2 Micro

    Hi, I have an old Mbox2 Micro that I wish to use on my Pi 3, Raspberian Jesse. The original OSX/Win Mbox2 drivers were all that was needed to drive this. Will your driver work also? I believe it has the same chip as the standard Mbox2.

    I plug it in to the Pi and the light comes on, I get a reassuring (distinctive) click/squelch of audio that it used to do, but no audio, or option to select the device in Raspberian.

    aplay -l does produce a device…

    card 1: M2 [Mbox 2], device 0: USB Audio [USB Audio]
    Subdevices: 1/1
    Subdevice #0: subdevice #0

  34. Hi, Damien!
    Before anything: thanks a lot for all your amazing work, I’m really grateful.

    Sorry to bother you, but I’m trying to flash the firmware update in an
    Mbox and can’t have access to no Mac computer at all… I’m on an
    updated Debian (testing) box, and looking a little I’ve found various
    ways to deal with .dmg files. Right now I have used 7z to decompress
    the MboxFirmware22_33860.dmg file and found myself with a little
    folders tree which seems to end in an ‘Update Mbox Firmware’ file:

    $ file Update\ Mbox\ Firmware
    Update Mbox Firmware: Mach-O universal binary with 2 architectures:
    [ppc:Mach-O ppc executable,
    flags:]
    [i386]

    Is there anyway to execute/make work this firmware-updater using only Debian?
    Is it safe (both in terms of the OS and not-to-brick the Mbox) to do it?

    I’ll keep looking to understand the issue but any help or indication
    would be much appreciated.

    Thanks a lot in advance!

  35. Hi rv, sorry I don’t know a way to run the firmware updater on GNU systems. The binary is apple-only unfortunately. Perhaps you can find a friend who has a mac system and use that, its quite a quick process once you have access to a mac.

  36. Thanks a lot, Damien.
    Right now it’s particularly difficult for me to reach a friend in person, but certainly that will be the last resort.

    I’m looking for two possible previous alternatives:

    **Darling: https://www.darlinghq.org/**
    > “Darling is a translation layer that lets you run macOS software on Linux”

    Or to run a macOS on a VM with virt-manager.

    Do you know if there’s some risk of brick the Mbox in doing the firmware-update with one of those?

    Thanks again. Hope this will end in a free/libre-GNU complete solution for everybody.

    Kind regards.

  37. When I wake my Ubuntu 20.04 computer from sleep, the INPUT of the Mbox 2 looks like it’s at 100% volume, but it does not receive any signal.
    When I unplug the Mbox 2, and plug it back in, it starts receiving audio again.
    Is it possible that the driver in the kernel does not correctly reinitialize the device?

    More details here: https://discourse.ardour.org/t/how-to-refresh-or-restart-usb-audio-interface-without-unplugging-the-usb-cable-on-linux/106369

Leave a Reply

Your email address will not be published. Required fields are marked *