Digidesign Mbox 2: Linux driver provided!

This is my unofficial Digidesign Mbox 2 driver for linux.

Please consider donating $5 for further development of free software drivers for Digidesign hardware. Every little bit counts.

PayPal - Donate to ZamAudio



For those of you who want the raw driver source, here it is as a kernel module [63kB]. It can be compiled
for the current running kernel as follows:

Make sure you have the kernel headers downloaded and installed correctly.
Then do the following: (extract the tarball to ANY directory then “make” it, install it and modprobe the new driver as follows:)
tar jxf mbox2-kernel-20121213.tar.bz2
cd mbox2-kernel
sudo make install
sudo rmmod snd-usb-audio # ignore errors
sudo rmmod snd-usbmidi-lib # ignore errors
sudo modprobe snd-usb-audio

Mbox2 patch now accepted into ALSA:
That’s right folks, if you install a kernel later than 3.8-rc2, your Mbox2 will work right out of the box with Linux!

UPDATE Sept 2013:
None of the above instructions are relevant anymore because the Mbox2 driver stuff is part of Linux kernel after 3.8! Just plug in your device, lights come on and it works. Any config issues with JACK, make sure you are using the ALSA backend and 2 ins and 2 outs, >256 buffer size and 3 periods.


I only just realised this, but you need to upgrade your Mbox 2 firmware to v1.43 using the official updates provided here(Avid) and mirrored on my site here(win64), here(osx_intel) and here(osx_ppc).  Without the update, I have experienced strange noisy inputs with the Mbox2 on GNU/Linux but when I applied the update the noise disappeared…

248 thoughts on “Digidesign Mbox 2: Linux driver provided!

  1. Jeff: Might need to disable the card from being used by pulseaudio, ie, deselect it in the gnome settings.

  2. Damo,

    Thanks for you continued assistance. I still does not work. Here’s the dump.

    Copyright 2001-2005 Paul Davis and others.
    Copyright 2004-2010 Grame.
    jackdmp comes with ABSOLUTELY NO WARRANTY
    This is free software, and you are welcome to redistribute it
    under certain conditions; see the file COPYING for details
    no message buffer overruns
    no message buffer overruns
    JACK server starting in realtime mode with priority 10
    control device hw:1
    control device hw:1
    Acquire audio card Audio1
    creating alsa driver … hw:1|hw:1|256|3|48000|2|2|nomon|swmeter|-|32bit
    control device hw:1
    Using ALSA driver USB-Audio running on card 1 – Digidesign Mbox 2 at usb-0000:00:1d.7-7.2, full speed
    configuring for 48000Hz, period = 256 frames (5.3 ms), buffer = 3 periods
    ALSA: final selected sample format for capture: 24bit big-endian
    ALSA: use 3 periods for capture
    ALSA: final selected sample format for playback: 24bit big-endian
    ALSA: use 3 periods for playback
    port created: Midi-Through:midi/playback_1
    port created: Midi-Through:midi/capture_1
    port created: Mbox-2:midi/playback_1
    port created: Mbox-2:midi/capture_1
    ALSA: could not start playback (Broken pipe)
    Cannot start driver
    JackServer::Start() failed with -1
    port deleted: Mbox-2:midi/playback_1
    port deleted: Midi-Through:midi/playback_1
    port deleted: Mbox-2:midi/capture_1
    port deleted: Midi-Through:midi/capture_1
    control device hw:1
    Released audio card Audio1
    control device hw:1
    Failed to start server

  3. Also, the “sound preferences” input and output devices are both set to the internal audio device. I don’t see anywhere that I can configure pulse audio.

  4. Could you provide more info to install in ubuntu 11.04.

    Also i lost in desktop my speaker volume control. How can I recover it?

    Thank you very much

  5. Works like a charm… I have made the small $5 donation for your efforts! Keep it up!

    Ubuntu 11.04
    Kernel 2.6.38

  6. The Mbox 2 pro I have uses firewire. As far as I know, all the Mbox 2 pros have firewire ports on the back.

    I read at the beginning: This kernel module provides support for Digidesign Mbox 2
    (as well as all the other usb audio devices which I did not write)

    Again the Mbox 2 pro is not a USB audio device; it’s a firewire audio device.
    Please explain.

  7. Arlen: This driver is not for the “Pro” version of the Mbox2, you are correct, that device is firewire.

  8. Hi
    I tried to get my mbox2 to work but without success.
    first I just plugged the usb and it light it up but I only got noise and no midi connection.
    Then I folowed the install steps mentioned above. Every thing was done successfully.
    After rebooting no lights, no sound, nothing at all.
    It is still working normally in windows XP.
    I’m using Ubuntu 11.04 kernel 2.6.38-11
    Does someone can give any help?

  9. So I’m unable to ‘make’ the package. Could somebody help me out? Here’s what terminal outputs:

    make -C /lib/modules/2.6.35-30-generic/build M=/home/jim/mbox2-kernel modules
    make[1]: Entering directory `/usr/src/linux-headers-2.6.35-30-generic’
    CC [M] /home/jim/mbox2-kernel/card.o
    /home/jim/mbox2-kernel/card.c: In function ‘snd_usb_create_streams’:
    /home/jim/mbox2-kernel/card.c:227: error: dereferencing pointer to incomplete type
    /home/jim/mbox2-kernel/card.c:232: error: dereferencing pointer to incomplete type
    /home/jim/mbox2-kernel/card.c:232: error: dereferencing pointer to incomplete type
    /home/jim/mbox2-kernel/card.c:232: error: dereferencing pointer to incomplete type
    /home/jim/mbox2-kernel/card.c:237: error: dereferencing pointer to incomplete type
    /home/jim/mbox2-kernel/card.c:238: error: dereferencing pointer to incomplete type
    make[2]: *** [/home/jim/mbox2-kernel/card.o] Error 1
    make[1]: *** [_module_/home/jim/mbox2-kernel] Error 2
    make[1]: Leaving directory `/usr/src/linux-headers-2.6.35-30-generic’
    make: *** [all] Error 2
    Does this mean that my kernel doesn’t support these drivers? I know that he tested on 2.6.37 but I’m using 2.6.35… Could that be the issue?

  10. @Jim: I’m also running 2.6.35 (2.6.35-30-generic), and experienced the same issue as you!
    However, I managed to get rid of the “error: dereferencing pointer to incomplete type” lines, by entering super user (sudo), as in (1) opening up the terminal, (2) writing “sudo su”, (3) writing “make”.

    Unfortunatly, it didn’t get me that far:

    make -C /lib/modules/2.6.35-30-generic/build M= modules
    make[1]: Entering directory `/usr/src/linux-headers-2.6.35-30-generic’
    HOSTCC scripts/basic/fixdep
    HOSTCC scripts/basic/docproc
    HOSTCC scripts/basic/hash
    HOSTCC scripts/kconfig/conf.o
    scripts/kconfig/conf.c: In function ‘conf_askvalue’:
    scripts/kconfig/conf.c:105: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
    scripts/kconfig/conf.c: In function ‘conf_choice’:
    scripts/kconfig/conf.c:307: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
    HOSTCC scripts/kconfig/kxgettext.o
    HOSTCC scripts/kconfig/
    HOSTLD scripts/kconfig/conf
    scripts/kconfig/conf -s arch/x86/Kconfig
    make[1]: Leaving directory `/usr/src/linux-headers-2.6.35-30-generic’
    make[1]: Entering directory `/usr/src/linux-headers-2.6.35-30-generic’
    CHK include/linux/version.h
    CHK include/generated/utsrelease.h
    UPD include/generated/utsrelease.h
    make[2]: *** No rule to make target `kernel/bounds.c’, needed by `kernel/bounds.s’. Stop.
    make[1]: *** [prepare0] Error 2
    make[1]: Leaving directory `/usr/src/linux-headers-2.6.35-30-generic’
    make: *** [all] Error 2

  11. -usb-audio # ignore errors
    ERROR: Module snd_usb_audio is in use

    Anyone have any idea how I can get around this error?

    Thank you…

  12. Dean: unplug all your usb audio cards and then unload the snd-usb* modules using rmmod, then replug the mbox2 and reload the new snd-usb-audio driver.
    Otherwise you can reboot instead (another solution).

  13. Well, I can confirm it compiles on Ubuntu with with 2.6.38 and 3.0.0 headers.

    It appears to recognize my Mbox 2 mini, does some playback. Now I just need to figure out how to get Linux/KDE to deal with 2 sound devices. Any suggestions/links?

  14. Thank you Damo, I unplugged the mBox, I have an mBox 2 mini and it works perfectly! Brilliant work! 😀

  15. Tried to use your driver with mBox 2 mini, but everytime I plug it in ubuntu freezes

    using ubuntu 11.10 (64 Bit) on macbook 6.1 (late 2009)

  16. Hello, can you please update your post with terminal directions for how to ‘Make’. I’m sure that I and many other noobs don’t know how to do that. And when you say ‘make sure the kernel is installed correctly’ what exactly does that mean? Also, is this guide still current for Ubuntu 11.10?

    Thanks for your work…

  17. The guide is still working for ubuntu 11.10, all you need to do is copy paste all the green text into the terminal.

    However I have one problem in ubuntu 11.10 that it forgets the mbox2 every time i restart. Does anybody else know how to fix that?

  18. Any chance of getting this (and the 003 driver) in the mainline kernel? Or, if not, in Ubuntu Studio/KXStudio?

    I’ve also managed to get the MBox as a capture, and the onboard sound card as playback, using the instructions in this post (for jack2):

    So, assuming the MBox is hw:1, on onboard is hw:0:

    jackd -dalsa -dhw:1 -r44100 -n2 -i2 -o2
    jack_load -i “-d hw:0 -i2 -o2” onboard audioadapter

    This will create 2 more jack capture/playback ports tied to the sound card.

    jack1 is slightly more involved, but I don’t have it, but some ideas to do the same can be found here:

  19. can anyone help me?
    I copied the green letters in the terminal and it put this:

    ~$ tar jxf mbox2-kernel-20110110.tar.bz2
    tar (child): mbox2-kernel-20110110.tar.bz2: No se puede open: No existe el fichero o el directorio
    tar (child): Error is not recoverable: exiting now
    tar: Child returned status 2
    tar: Error is not recoverable: exiting now
    ramonblas@RaRaBla:~$ cd mbox2-kernel
    bash: cd: mbox2-kernel: No existe el fichero o el directorio
    ramonblas@RaRaBla:~$ make
    make: *** No se especificó ningún objetivo y no se encontró ningún makefile. Alto.
    I’ve been trying to make my mbox2 mini work for 4 months. Can someone guide me a little?
    thank you!

  20. Hi,

    Used it on ubuntu 11.04 kernel 2.6.3x -> OK
    ubuntu studio 11.10 kernel 3.0.0 -> all i get is a bskp (black screen of kernel panic)

    I guess it’s not suitable for kernel 3.0. Could you confirm ?
    How could i help for writing the module for 3.0 ?

  21. Hey Damo

    Upon First Install my MBox 2 worked fine

    Moved my labtop, unpluging the Mbox and upon resetting up i now dont recieve the LED green light up. Any I help would be great, thank you again for all your hard work.

  22. I have upgraded from Ubuntu 11.10 kernel, (where I had it working fine there with no problems installing the driver as described here on the site), to the new Ubuntu 12.04 LTS kernel and I get an error 2 when I make. Is there some sort of conflict with this kernel version or am I missing some make tools?

  23. #include linux/module.h

    with the less than bracket before ‘linux/module.h’
    the greater than bracket after ‘linux/module.h’
    and a space betweeen the ‘#include’ and the less than bracket

    sorry for all the posted comments
    just wanted to help with installing this on newer kernels

  24. Hi Andrew,
    Looks like you are saying to include the following header file in card.c and midi.c
    #include <linux/module.h>
    I haven’t had time to test this on new kernels I am doing other things now.

  25. I also think that it’s possible that Avid will start meignrg their software. When computers were slower, it made sense having an HD and an LE version. Now that computers have a gazillion cores, and so much RAM, I think that it’s time that the ProTools Software itself, were the same for LE and HD (delay compensation, voice count, etc.). I thick Avid will differentiate their products based on hardware, not software, in the not-so-distant future. To me this new products look like 003 for HD (mic/line inputs, smaller form factor, preamps, etc.) What are your thoughts on that?

  26. atomek@atomek:~/Pobrane/mbox2-kernel$ sudo make
    make -C /lib/modules/3.2.0-24-generic/build M= modules
    make[1]: Wejście do katalogu `/usr/src/linux-headers-3.2.0-24-generic’
    CHK include/linux/version.h
    CHK include/generated/utsrelease.h
    make[2]: *** Brak reguł do zrobienia obiektu `kernel/bounds.c’, wymaganego przez `kernel/bounds.s’. Stop.
    make[1]: *** [prepare0] Błąd 2
    make[1]: Opuszczenie katalogu `/usr/src/linux-headers-3.2.0-24-generic’
    make: *** [all] Błąd 2


  27. Hey guys, I’m using ubuntu 11.10 (Oneiric Ocelot) and my mbox 2 does light up a few seconds after I plug in the usb but right after that, I get a black screen and the whole system freezes up. Funny thing is, I didn’t even have any errors compiling the driver at all with the green text up above. Please, any comments or suggestions as to why this happens to me when other people on here have only had minor issues with 11.10?

  28. Actually damo that’s exactly what I was trying to say. lol
    Again sorry about posting so many times here.
    I’ve been using the Mbox2 now without a hitch on Ubuntu 12.04 LTS kernel Thanks Damo for your hardwork.

  29. Hey Andrew. I did exactly what u said above with the #include and added it to both the card.c and midi.c files but it still didn’t work for me. I still keep getting a black screen system freeze causing me to restart the whole OS. Any other way u can help me with that part?

  30. Got exactly the same problem as Brian, running Ubuntu 12.04 LTS with 64bit. Compiling went fine, i even ran Renoise with Jack for quite some Time. Then, after Restarting Ubuntu when i plug in the device, after the light turns green and i hear the speakers react, my screen freezes. Don’t know what to do as it ran fine until restart.
    Any help would be highly apreciated.

    btw: Thank you a lot for the efforts with this driver.

  31. Hey!
    First; Big thanks to damo for the driver! Fantastic to have the mbox working with Linux!
    Second; For those who have trouble with the screen freezing, I had the same problem. Tried several times with two different 64 bit systems (last one Ubuntu Studio 12.04) with the same result every time – screen froze as soon as the green light came on. Then I tried to reinstall with the 32 bit version (otherwise the same – Ubuntu Studio 12.04). And it works like a charm! I don’t know what exactly is going on, but I thought it was worth mentioning.

  32. Actually Damo I’m using Ubuntu 12.04 amd64 (64bit) kernel version with the small addin for card.c and midi.c and it’s working great! Thanks for that. I’m now trying to figure out how to get it working for kernel 3.4.0.

    Brian I’m not sure why there is a problem with it freezing up but it if works after installing it on a 32 bit version then maybe installing 32bit libs might work. Not sure at all on that one. I’m fairly new to linux with no coding background whatsoever. Sorry I couldn’t really help.

  33. Ok update Damo…
    I now have it working with kernel 3.4.0 or what it seems like it works.
    I’ve tested my mics and all seems fine but haven’t tested midi yet.
    Again I know nothing about C coding but I just googled the errors I got when compiling and experimented with what I thought might work in some of the ‘xxx.c’ files.
    Damo is there a way I can attach the tar file so you can check what I have done? That’s if you have the time…

  34. I wish I could just get this patch through the ALSA team so I don’t have to maintain it for every new release of the kernel. It’s quite a lot of work for such a small patch, and I don’t really have time anymore.

    The problem is that there is a statement in my code that actually waits for the MBox2 to come alive, and the kernel guys don’t like code that waits, it means that there is a delay in the execution of the driver which means my teensy bit of code is slowing down the initialisation of the USB audio driver. :S

  35. Good day, I need help! I am new to linux
    established here in this manual

    sudo apt-get install linux-headers-$(uname -r)
    tar jxf mbox2-kernel-20110110.tar.bz2
    cd mbox2-kernel
    sudo make install
    sudo rmmod snd-usb-audio
    sudo rmmod snd-usbmidi-lib
    sudo modprobe snd-usb-audio

    reached the moment when you need to “make” writing and gives it to me

    make-C / lib/modules/3.2.0-26-generic-pae/build M = / home/maks/mbox2-kernel modules
    make [1]: Entering directory `/ usr/src/linux-headers-3.2.0-26-generic-pae ‘
    CC [M] / home/maks/mbox2-kernel/card.o
    / Home/maks/mbox2-kernel/card.c: 69:15: error: expected declaration specifiers or «…» before string constant
    / Home/maks/mbox2-kernel/card.c: 70:20: error: expected declaration specifiers or «…» before string constant
    / Home/maks/mbox2-kernel/card.c: 71:16: error: expected declaration specifiers or «…» before string constant
    / Home/maks/mbox2-kernel/card.c: 72:25: error: expected declaration specifiers or «…» before string constant
    / Home/maks/mbox2-kernel/card.c: In function «snd_usb_audio_create»:
    / Home/maks/mbox2-kernel/card.c: 314:45: error: «THIS_MODULE» undeclared (first use in this function)
    / Home/maks/mbox2-kernel/card.c: 314:45: Note: each undeclared identifier is reported only once for each function it appears in
    / Home/maks/mbox2-kernel/card.c: At top level:
    / Home/maks/mbox2-kernel/card.c: 630:1: warning: data definition has no type or storage class [by default]
    / Home/maks/mbox2-kernel/card.c: 630:1: warning: type defaults to «int» in declaration of «MODULE_DEVICE_TABLE» [-Wimplicit-int]
    / Home/maks/mbox2-kernel/card.c: 630:1: warning: function declaration listed the names of the parameters without types [by default]
    / Home/maks/mbox2-kernel/card.c: In function «snd_usb_audio_init»:
    / Home/maks/mbox2-kernel/card.c: 651:9: error: «THIS_MODULE» undeclared (first use in this function)
    / Home/maks/mbox2-kernel/card.c: At top level:
    / Home/maks/mbox2-kernel/quirks.h: 23:12: warning: «mbox2_skip_setting_quirk» declared «static», but is nowhere defined [-Wunused-function]
    / Home/maks/mbox2-kernel/quirks.h: 26:12: warning: «snd_usb_mbox2_boot_quirk» declared «static», but is nowhere defined [-Wunused-function]
    / Home/maks/mbox2-kernel/card.c: In function «snd_usb_audio_init»:
    / Home/maks/mbox2-kernel/card.c: 652:1: warning: control reaches end of non-void function [-Wreturn-type]
    make [2]: *** [/ home/maks/mbox2-kernel/card.o] Error 1
    make [1]: *** [_module_/home/maks/mbox2-kernel] Error 2
    make [1]: Leaving directory `/ usr/src/linux-headers-3.2.0-26-generic-pae ‘
    make: *** [all] Error 2

    Help please, really need this program

  36. I am thinking of buying this card, but I have some questions about this driver. First, is it stable, and how much delay do people get when using it to record with for example Ardour? Does it compile on 64-bit?

  37. Flair, I got the same error when I tried to install this on Ubuntu 12.04.

    It worked fine after I added this line to the card.c and midi.c files:

  38. Sorry, I forgot to add the code tags:

    The line I added to the card.c and midi.c files is:
    [code]#include [/code]

Leave a Reply

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