Digidesign Mbox 2: Linux driver provided!

Posted on Posted in Uncategorized

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

Mbox2

Linux_Logo

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
make
sudo make install
sudo rmmod snd-usb-audio # ignore errors
sudo rmmod snd-usbmidi-lib # ignore errors
sudo modprobe snd-usb-audio

UPDATE!!!
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.
🙂

IMPORTANT UPDATE July 2019:

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…

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

  1. Has anyone gotten this to work on 2.6.36.1 yet? there seems to be some significant changes in the included drivers from 2.6.31.x

    i’m compiling now but do not have high hopes for the results(as I am a total linux noob)

  2. This is very interesting work!

    I have a couple of Mbox 1 around and would love to be able to use them to get good sound in and out from a couple of my PC’s. I hope that someone will be able to pick up this work and make installable packages for Ubuntu.

    If it is helpful for anyone, I could pick one of the boxes apart and list the names of the chips inside it. I know it has Focusrite mic pre-amps, but the most interesting are probably the USB part? A lot of people have these boxes and the sound quality is good. But it is a shame to have to throw them in the garbage!

  3. Svein: It would be most useful if you plug in the device and send me the output of “lsusb -v -d 0dba:1000”, then I can figure out how the usb part of the device works. 🙂

  4. I also have a mbox 1. Here is the output from the command that you had asked Svein to provide to you:

    Bus 002 Device 003: ID 0dba:1000
    Device Descriptor:
    bLength 18
    bDescriptorType 1
    bcdUSB 1.10
    bDeviceClass 0 (Defined at Interface level)
    bDeviceSubClass 0
    bDeviceProtocol 0
    bMaxPacketSize0 8
    idVendor 0x0dba
    idProduct 0x1000
    bcdDevice 0.20
    iManufacturer 1 Digidesign Inc
    iProduct 2 Mbox USB Audio Device copyright Digidesign 2001
    iSerial 0
    bNumConfigurations 1
    Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 54
    bNumInterfaces 2
    bConfigurationValue 1
    iConfiguration 0
    bmAttributes 0x80
    (Bus Powered)
    MaxPower 480mA
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 0
    bAlternateSetting 0
    bNumEndpoints 0
    bInterfaceClass 255 Vendor Specific Class
    bInterfaceSubClass 0
    bInterfaceProtocol 0
    iInterface 0
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 1
    bAlternateSetting 0
    bNumEndpoints 0
    bInterfaceClass 255 Vendor Specific Class
    bInterfaceSubClass 0
    bInterfaceProtocol 0
    iInterface 0
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 1
    bAlternateSetting 1
    bNumEndpoints 2
    bInterfaceClass 255 Vendor Specific Class
    bInterfaceSubClass 0
    bInterfaceProtocol 0
    iInterface 0
    Endpoint Descriptor:
    bLength 9
    bDescriptorType 5
    bEndpointAddress 0x81 EP 1 IN
    bmAttributes 5
    Transfer Type Isochronous
    Synch Type Asynchronous
    Usage Type Data
    wMaxPacketSize 0x0130 1x 304 bytes
    bInterval 1
    bRefresh 0
    bSynchAddress 0
    Endpoint Descriptor:
    bLength 9
    bDescriptorType 5
    bEndpointAddress 0x02 EP 2 OUT
    bmAttributes 5
    Transfer Type Isochronous
    Synch Type Asynchronous
    Usage Type Data
    wMaxPacketSize 0x0130 1x 304 bytes
    bInterval 1
    bRefresh 0
    bSynchAddress 0
    Device Status: 0x0000
    (Bus Powered)

    thanks for looking into the mbox 1 as well.

  5. Hi, I am trying to get this driver to work on ubuntu 10.04 and am struggling. I’m not a big linux user, but am trying to learn and testing different applications of it. Any help would be appreciated, and I’m willing to donate if I can get it going.

    Here is what I did:

    cd /usr/src/linux-headers-2.6.32-24/
    sudo apt-get install kernel-package fakeroot build-essential

    which returns: “build-essential is already the newest version.”

    sudo fakeroot make-kpkg –initrd –revision=mbox2 kernel_image

    …a series of commands stream by, but ends up with:

    make[3]: *** No rule to make target `kernel/bounds.c’, needed by `kernel/bounds.s’. Stop.
    make[2]: *** [prepare0] Error 2
    make[2]: Leaving directory `/usr/src/linux-headers-2.6.32-24′
    make[1]: *** [debian/stamp/conf/kernel-conf] Error 2
    make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-24′
    make: *** [debian/stamp/conf/minimal_debian] Error 2
    Failed to create a ./debian directory: Bad file descriptor at /usr/bin/make-kpkg line 971.

  6. Is there any news on getting your patch accepted into ALSA? I would love to be able to use my Mbox 2 right out of the box in Linux.
    I havn’t got a clue about what I’m doing in the terminal, so building the kernel package isn’t really for me.

  7. So, I’ve got Ubuntu 10-10 and I can’t install it properly. How should I install kernell headers? Should I copy mbox2-kernel folder to my usr/src/linux-headers-2.6.35-25-generic directory and then try to build a kernel in a some way?

    It would be great of yours to write a brief instruction how to install this driver. Maybe, it would be usefull for all linux-noobs as I am 🙂

    BTW, I’d like to run my mbox2 with Ardour GTK2. Is it real?

  8. finnishprince: you just extract the tarball somewhere, eg in a folder on your desktop, then make it, install it, and modprobe it, done!

  9. Ok well I’m stuck. I have no idea how to fix this issue. I’m running..

    root@******:/usr/src/mbox2-kernel# uname -a
    Linux drgobble 2.6.32-5-amd64 #1 SMP Wed Jan 12 03:40:32 UTC 2011 x86_64 GNU/Linux

    This is the newest squeeze. Here is my error after ‘make’

    root@drgobble:/usr/src/mbox2-kernel# make
    make -C /lib/modules/2.6.32-5-amd64/build M=/usr/src/mbox2-kernel modules
    make[1]: Entering directory `/usr/src/linux-headers-2.6.32-5-amd64′
    CC [M] /usr/src/mbox2-kernel/card.o
    /usr/src/mbox2-kernel/card.c:48:32: error: linux/usb/audio-v2.h: No such file or directory
    /usr/src/mbox2-kernel/card.c: In function ‘snd_usb_create_streams’:
    /usr/src/mbox2-kernel/card.c:224: error: ‘UAC_VERSION_1’ undeclared (first use in this function)
    /usr/src/mbox2-kernel/card.c:224: error: (Each undeclared identifier is reported only once
    /usr/src/mbox2-kernel/card.c:224: error: for each function it appears in.)
    /usr/src/mbox2-kernel/card.c:227: error: dereferencing pointer to incomplete type
    /usr/src/mbox2-kernel/card.c:232: error: dereferencing pointer to incomplete type
    /usr/src/mbox2-kernel/card.c:232: error: dereferencing pointer to incomplete type
    /usr/src/mbox2-kernel/card.c:232: error: dereferencing pointer to incomplete type
    /usr/src/mbox2-kernel/card.c:237: error: dereferencing pointer to incomplete type
    /usr/src/mbox2-kernel/card.c:238: error: dereferencing pointer to incomplete type
    /usr/src/mbox2-kernel/card.c:243: error: ‘UAC_VERSION_2’ undeclared (first use in this function)
    make[4]: *** [/usr/src/mbox2-kernel/card.o] Error 1
    make[3]: *** [_module_/usr/src/mbox2-kernel] Error 2
    make[2]: *** [sub-make] Error 2
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-5-amd64′
    make: *** [all] Error 2

    Kernel headers are there… what am I missing?

  10. I had a similar (but different) problem.

    I tried to follow the directions given, with the following results:
    claude@claude-desktop:~/Downloads$ tar -xjf
    mbox2-kernel-20110110.tar.bz2
    claude@claude-desktop:~/Downloads$ ls
    mbox2-kernel mbox2-kernel-20110110.tar.bz2
    claude@claude-desktop:~/Downloads$ cd mbox2-kernel/
    claude@claude-desktop:~/Downloads/mbox2-kernel$ make
    make -C /lib/modules/2.6.35-27-generic-pae/build
    M=/home/claude/Downloads/mbox2-kernel modules
    make[1]: Entering directory
    `/usr/src/linux-headers-2.6.35-27-generic-pae’
    CC [M] /home/claude/Downloads/mbox2-kernel/card.o
    /home/claude/Downloads/mbox2-kernel/card.c: In function
    ‘snd_usb_create_streams’:
    /home/claude/Downloads/mbox2-kernel/card.c:227: error: dereferencing
    pointer to incomplete type
    /home/claude/Downloads/mbox2-kernel/card.c:232: error: dereferencing
    pointer to incomplete type
    /home/claude/Downloads/mbox2-kernel/card.c:232: error: dereferencing
    pointer to incomplete type
    /home/claude/Downloads/mbox2-kernel/card.c:232: error: dereferencing
    pointer to incomplete type
    /home/claude/Downloads/mbox2-kernel/card.c:237: error: dereferencing
    pointer to incomplete type
    /home/claude/Downloads/mbox2-kernel/card.c:238: error: dereferencing
    pointer to incomplete type
    make[2]: *** [/home/claude/Downloads/mbox2-kernel/card.o] Error 1
    make[1]: *** [_module_/home/claude/Downloads/mbox2-kernel] Error 2
    make[1]: Leaving directory
    `/usr/src/linux-headers-2.6.35-27-generic-pae’
    make: *** [all] Error 2

  11. Hah!
    Thanks for the heads up. I recently downloaded Ubuntu 10.10 and assumed it had the latest Kernel… 🙁
    Hmmm, there’s some discussion about the stability of that version (2.6.37).
    Since I’m trying to install it onto a friend’s machine I don’t want to risk bricking it.
    Have you actually installed this version and found it OK?

  12. I am actually running a 2.6.38 experimental one and it seems to run fine on a Karmic based system. Just dont forget to build the “initramfs” and update grub to pick it up.

  13. Hey,

    ive tried this driver with 2.6.37. But the Mbox2 is only working for a few seconds with highly distorted sound before there is no sound at all. According to the LEDs on the Mbox2 its still powered. Any ideas?

    Thanks!

    –Mo

  14. It worked nicely under Ubuntu 10.10 (linux 2.6.37) but can’t get it to work with Ubuntu 11.04 linux 2.6.38. Do I have to do anything additionaly?

  15. Works perfectly under Ubuntu 10.04 with a 2.6.37 kernel. The thing is that although the device is visible in gnome sound preferences and I can use it to record sound with gnome-sound-recorder or audacity, it is not visible in Jack Control so I can’t use it with Ardour (for example). I can only see it in the MIDI Tab.

    Should it be a jack configuration issue or anything else related to this driver?
    thanx!

  16. Wow I love this! Thank you very much.

    I followed the installation instructions on a freshly installed Ubuntu 11.04 system and it works great!

  17. Superb, just what I needed. With the new ubuntu 11.04 it works perfect!!! Actually better than on my windows installation (running dualboot) now I can use my mbox for listen to normal music outside ProTools!

  18. Hi,
    I installed the latest kernel (uname -r gives me “2.6.37-020637-generic”), and completed all your steps to compile the kernel module.
    I get no errors during this procedure, BUT when I reboot, my mbox2 is not powered, and I only have “internal audio” in System > Preferences > Sound > Hardware tab

    also, the output of lsusb is:
    Bus 005 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 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 002 Device 004: ID 0dba:3000
    Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

    Could you help me to understand if I’m missing something?

    Thanks!

  19. no rules to make target kernel/bounds.c

    I got this error with 2.6.38 but fixed it by moving the mbox2-kernel folder to /usr/scr/linux-source-2.6.3x

    Then ran the make process from that location

    Works like a charm

  20. Hello,

    great work! Unfortunately i get a kernel panic with 2.6.39
    Anyone else with 2.6.39 kernel?

  21. anyone know the steps to get it to work with Ardour, i’m pretty new to Jack and Ardour.
    thx,
    jayson

  22. Is there a status update for inclusion into alsa? Is there anything that I could do to help it into alsa?

  23. It compiles and runs correctly under Ubuntu 11.04 (64bits) with 2.6.38-10.

    Thanks for sharing this software!

  24. Any news about lucia Ian Jayson problems?
    I have the same problem and mbox is not powered anymore

    thanks

  25. Frank: I don’t understand why some people are having problems and others say it works perfectly, perhaps the kernel module is not being installed in the correct location, try manually copying the *.ko files that are created into the /lib/modules/…../sound/usb directory and rebooting.

  26. QUACKERS!!!! Works great!!!!! Ran the instructions, set the Mbox 2 as my input (System -> Preferences -> Sound, Input tab), plugged in a mic and my MBox2 Mini is up and running. I am recording my voice in Audacity without any problems. BTW, I downloaded and installed Ubuntu Studio 11-04 and let is do a round of updates. I got a few warnings of “declared ‘static’ but never defined”, but did not seem to bother anything. I am running 2.6.38-10-generic (Ubuntu Studio 11-04).

  27. I have ubuntu 10.04 with 2.6.38-10-generic

    compile install and modprobe was fine

    but after rebooting my mbox didnt power up anymore (within ubuntu). It powered up before installing anything but produced only distorted noise.

    lsmod gives this:
    snd_usb_audio 94383 0
    snd_usbmidi_lib 24122 1 snd_usb_audio

    generated ko files list correctly under /lib/modules/2.6.38-10-generic/kernel/sound/usb

    In the system I can only see the internal audio

  28. Frank: Maybe the USB port you are using doesn’t provide enough power to fully power the MBox?
    It draws maximum current upon booting up as far as I am aware. Also check “dmesg” log for output when hotplugging the mbox to see what is happening in the system. It should power up within 5 seconds of plugging it in.

  29. thanks damo
    i tried other ports but had no success. Under windowsXP it works nicely. My comp is a desktop 450W with Athlon X2 and 2 Gb ram… dont think is a power issue.
    Previous to drivers installation my mbox was powered also in ubuntu and figured among the audio cards but, as I said, it produced only noise.

    this is a dmesg log:
    [ 46.630087] Sending Digidesign Mbox 2 boot sequence…
    [ 47.630047] device not ready, resending boot sequence…
    [ 48.630057] device not ready, resending boot sequence…
    [ 49.630056] device not ready, resending boot sequence…
    [ 50.630047] device not ready, resending boot sequence…
    [ 51.630047] device not ready, resending boot sequence…
    [ 51.630052] Unknown bootresponse, or timed out, ignoring device: 1
    [ 51.630066] snd-usb-audio: probe of 2-10:1.6 failed with error -5

    i tried also in /etc/modprobe.d/alsa-base.conf commenting this line
    #options snd-usb-audio index=-2

  30. thanks again damo for your help,
    but nothing… there are only more “device not ready” lines… I won’t cut&paste them

    maybe i should try to restore a clean situation with the usb audio drivers?

  31. Is there any way to reduce the clicks, pops and skips? Alsa through the internal device sounds good but my mbox mini sounds like crap.

    Ubuntu 10.04 2.6.38-10-generic-pae

    lsusb -v Just the first few records from the mbox.

    Bus 001 Device 006: ID 0dba:3000
    Device Descriptor:
    bLength 18
    bDescriptorType 1
    bcdUSB 1.00
    bDeviceClass 0 (Defined at Interface level)
    bDeviceSubClass 0
    bDeviceProtocol 0
    bMaxPacketSize0 8
    idVendor 0x0dba
    idProduct 0x3000
    bcdDevice 1.40
    iManufacturer 1
    iProduct 2
    iSerial 1
    bNumConfigurations 1
    Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 646
    bNumInterfaces 7
    bConfigurationValue 1
    iConfiguration 0
    bmAttributes 0x80
    (Bus Powered)
    MaxPower 500mA
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 0
    bAlternateSetting 0
    bNumEndpoints 0
    bInterfaceClass 254 Application Specific Interface
    bInterfaceSubClass 1 Device Firmware Update
    bInterfaceProtocol 0
    iInterface 0
    Device Firmware Upgrade Interface Descriptor:
    bLength 7
    bDescriptorType 33
    bmAttributes 5
    Will Not Detach
    Manifestation Tolerant
    Upload Unsupported
    Download Supported
    wDetachTimeout 65535 milliseconds
    wTransferSize 8 bytes
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 1
    bAlternateSetting 0
    bNumEndpoints 0
    bInterfaceClass 1 Audio
    bInterfaceSubClass 1 Control Device
    bInterfaceProtocol 0
    iInterface 2
    AudioControl Interface Descriptor:
    bLength 12
    bDescriptorType 36
    bDescriptorSubtype 1 (HEADER)
    bcdADC 1.00
    wTotalLength 96
    bInCollection 4
    baInterfaceNr( 0) 2
    baInterfaceNr( 1) 3
    baInterfaceNr( 2) 4
    baInterfaceNr( 3) 5
    AudioControl Interface Descriptor:
    bLength 12
    bDescriptorType 36
    bDescriptorSubtype 2 (INPUT_TERMINAL)
    bTerminalID 5
    wTerminalType 0x0101 USB Streaming
    bAssocTerminal 0
    bNrChannels 2
    wChannelConfig 0x0003
    Left Front (L)
    Right Front (R)
    iChannelNames 0
    iTerminal 0
    AudioControl Interface Descriptor:
    bLength 9
    bDescriptorType 36
    bDescriptorSubtype 3 (OUTPUT_TERMINAL)
    bTerminalID 6
    wTerminalType 0x0601 Analog Connector
    bAssocTerminal 0
    bSourceID 5
    iTerminal 0
    AudioControl Interface Descriptor:
    bLength 12
    bDescriptorType 36
    bDescriptorSubtype 2 (INPUT_TERMINAL)
    bTerminalID 7
    wTerminalType 0x0101 USB Streaming
    bAssocTerminal 0
    bNrChannels 2
    wChannelConfig 0x0003
    Left Front (L)
    Right Front (R)
    iChannelNames 0
    iTerminal 0

  32. I have the same problem as Frank. After rebooting, the Mbox2 simply doesn’t power up anymore. It still works as normal in Win7 though.

  33. Jeff: I advise running a jack audio server with the mbox and adjust the buffer size to be >= 512, preferably with a RT kernel and run it with real time scheduling. Unfortunately other usb devices will have to share the IRQ and could cause pops and clicks with low buffer sizes.

  34. Ok, will do. I was hoping to not have to use jack since many out of the box applications are not jack aware.

    Thanks.

  35. Jack doesn’t like the mbox but works fine with the default hw device.

    Any ideas?

    17:32:08.987 Patchbay deactivated.
    17:32:08.989 Statistics reset.
    17:32:09.000 ALSA connection change.
    17:32:09.046 JACK connection change.
    17:32:09.067 Client activated.
    17:32:16.049 Client deactivated.
    17:32:16.051 Post-shutdown script…
    17:32:16.051 killall jackd
    17:32:16.460 Post-shutdown script terminated successfully.
    17:32:38.351 Startup script…
    17:32:38.352 artsshell -q terminate
    Cannot connect to server socket err = No such file or directory
    Cannot connect to server socket
    jack server is not running or cannot be started
    sh: artsshell: not found
    17:32:38.754 Startup script terminated with exit status=32512.
    17:32:38.754 JACK is starting…
    17:32:38.755 /usr/bin/jackd -dalsa -dhw:1,0 -r44100 -p1024 -n2
    17:32:38.758 JACK was started with PID=6622.
    no message buffer overruns
    no message buffer overruns
    jackdmp 1.9.7
    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
    JACK server starting in realtime mode with priority 10
    control device hw:1
    control device hw:1
    audio_reservation_init
    Acquire audio card Audio1
    creating alsa driver … hw:1,0|hw:1,0|1024|2|44100|0|0|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 44100Hz, period = 1024 frames (23.2 ms), buffer = 2 periods
    ALSA: final selected sample format for capture: 24bit big-endian
    ALSA: use 2 periods for capture
    ALSA: final selected sample format for playback: 24bit big-endian
    ALSA: use 2 periods for playback
    ALSA: could not start playback (Broken pipe)
    Cannot start driver
    JackServer::Start() failed with -1
    control device hw:1
    Released audio card Audio1
    audio_reservation_finish
    control device hw:1
    Failed to start server
    17:32:39.094 JACK was stopped with exit status=255.
    17:32:39.095 Post-shutdown script…
    17:32:39.096 killall jackd
    jackd: no process found
    17:32:39.505 Post-shutdown script terminated with exit status=256.
    17:32:40.877 Could not connect to JACK server as client. – Overall operation failed. – Unable to connect to server. Please check the messages window for more info.
    Cannot connect to server socket err = No such file or directory
    Cannot connect to server socket
    jack server is not running or cannot be started

Leave a Reply

Your email address will not be published.