AudioGNU/LinuxTechnology

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

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…

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

  1. I’m sorry, I can’t figure out how to get this to work. What you need to do is add this line:
    #include linux/module.h

    But put a less than symbol before “linux” and a greater than symbol after “h”. There are other includes in card.c and midi.c, so you can see what they look like.

  2. Hello,

    I fallowed the Jeremy suggestion (thanks a lot) after getting the usual 2 errors, and the installation went ok (also I tried months ago with Linux mint 32bit and all worked extremely well), but now on Ubuntu 12.04 64bit, when I plug the Mbox2 Mini, the computer freezes, and the capslock LED starts flashing.

    There is way to fix it? I’m using the Kernel Linux 3.2.0-27-generic, this it the last part of the line I get:

    mkdir -p /lib/modules/3.2.0-27-generic/kernel/sound/usb
    cp *.ko /lib/modules/3.2.0-27-generic/kernel/sound/usb
    depmod
    modprobe snd-usb-audio
    # If already inserted, please remove and reinsert the new module:
    # sudo rmmod snd-usb-audio
    # sudo rmmod snd-usbmidi-lib
    # sudo modprobe snd-usb-audio

    Any hint?

    Thanks in advance.

  3. Hello,
    I can confirm that this module works with Ubuntu Studio 32-bits 10.04 with kernel 2.6.38.15-generic.

    YP

  4. Hakkinen: I have also Ubuntu 12.04 64bit and my installation went through with Jeremy’s suggestion. Mine is not freezing with this module. So I think you did something wrong in the configuration. Watch for warning messages and proceed accordingly, that is how i did it. Dont add #include in mixer_quirks.c file.

  5. I’m on ArchLinux, using kernel 3.5.3-1-ARCH. I made some patches to compile the driver such as including the linux/module.h. When I plug the Mbox2, the kernel recognizes it but no led turns on and jack can’t start. No freezes for me. Any suggestion?

  6. As for now it seems to me that everything works fine with the driver BUT when I try to record a guitar with Ardour the only thing I get is white noise. It seems to me that something is wrong with my jack setup, anyone can help?

  7. P.S.: I’m working with Mbox 2 Mini on Gentoo 64bit and the only ting I had to do to compile correctly was to add

    #include

    in card.c and midi.c
    Bye

  8. Added #include to card.c and midi.c, but the installation won’t start. I get:

    mkdir -p /lib/modules/3.2.0-31-generic-pae/kernel/sound/usb
    cp *.ko /lib/modules/3.2.0-31-generic-pae/kernel/sound/usb
    cp: cannot stat `*.ko’: No such file or directory
    make: *** [install] Error 1

    The directory do exist, so does files snd-usb-audio.ko and snd-usbmini-lib.ko as well.

    Any hints?

  9. First you could simply try to execute the command by hand ad see what happens: after all it’s just copying a file form one place to another…

  10. I really don’t understand what you mean Paolo.
    I tried to do exactly as instructed, but got the error when I executed “sudo make install”.

  11. Ok from what I understand from your post what “sudo make install” does is copying all the files with “ko” extension from the directory you’re in to “/lib/modules/3.2.0-31-generic-pae/kernel/sound/usb”; apprently make cannot find any file with the “ko” extension. That could mean that the compilation phase failed or you’re not in the right directory (the one that contains all the source files).

    After you’ve added the include I mentioned you have to rerun the whole process: run
    # make

    and

    # sudo make install

    because otherwise the includes won’t have any effect.
    Let me now

  12. #include linux/modules.h

    add “less than” character before linux and “greater than” character after “.h”

    I didn’t realized the outuput of my post was wrong… sorry. Feel free to email me at
    paolo.bacchetta@gmail.com

    Bye

  13. Running Ubuntu 12.10 – I am getting the same error as described above when attempting “sudo make install” after following the procedure as described. I get the “cp: cannot stat ‘*.ko’ : No such file or directory” error – what can I do to install this? Thanks!!

  14. That means the make command failed because it didn’t generate the kernel module. Please post the output of ‘make’ to a pastebin and send the link here.

  15. Pc detects the mbox2 on Ubuntu 12.10 headers:3.5.0-19-generic (before) compiling but no light. After compile and restart lights comes on but doesn’t not show mbox2 anymore… HELP!

  16. Hi guys, good news, I got it accepted into ALSA!
    So when 3.8-rc1 comes out, things should just work with that kernel.
    Enjoy!
    Feel free to toss me a couple of dollars for my time, if you think its worthy.

    Cheers. I will now focus on writing a driver for 003 Rack.

  17. Jhon: The configuration: CONFIG_SND_USB_AUDIO=m

    There is currently a small bug that can cause a kernel panic in 3.8-rc1, I have fixed it.
    Just waiting for ALSA maintainers to come back from holiday to review the patch 🙂

  18. Well it installed ok for me on Ubuntustudio 12.04.01. It’s visible and usable as a normal audio device in ALSA (youtube, music files etc.) The problem I have is: after setting it up in Jack (‘USB Audio device’ – HW 2 and also tried HW: 2,0), I can’t record in either Audacity or Ardour. And it’s the same without Jack. I can’t record. I don’t think it’s a Jack problem as it says the control device is the MBox. Although once Jack does start, the Mbox isnt listed as an Audio device, I can only see PulseAudio and system. The Mbox is only listed under Midi devices. Confusing eh? Any suggestions? I just installed the first driver.

  19. Jimmy: Try closing jack and ardour and open a terminal, then run jackd from the command line with jackd -d alsa -d hw:2 -r48000 -c2 -D and see what the output says.

  20. Ah yeah sorry, I think the c need to be in caps. Here’s the output:

    jackdmp 1.9.8
    Copyright 2001-2005 Paul Davis and others.
    Copyright 2004-2011 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
    ALSA lib control.c:951:(snd_ctl_open_noupdate) Invalid CTL 2
    control open “2” (No such file or directory)
    control device hw:2
    audio_reservation_init
    Acquire audio card Audio-1
    Acquire audio card Audio2
    creating alsa driver … hw:2|2|1024|2|48000|0|0|nomon|swmeter|-|32bit
    control device hw:2
    ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM 2
    ALSA: Cannot open PCM device alsa_pcm for capture. Falling back to playback-only mode
    configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 2 periods
    ALSA: final selected sample format for playback: 24bit big-endian
    ALSA: use 2 periods for playback

  21. Jimmy: You might not be using the right device, try aplay -L to find the right device, then when you know which device number it is, say X, then run this command: jackd -d alsa -d hw:X -r48000 -c2 -D

  22. aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: SB [HDA ATI SB], device 0: ALC889A Analog [ALC889A Analog]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 0: SB [HDA ATI SB], device 1: ALC889A Digital [ALC889A Digital]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 1: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 2: M2 [Mbox 2], device 0: USB Audio [USB Audio]
    Subdevices: 1/1
    Subdevice #0: subdevice #0

  23. I’m sorry to sound a bit lame here, but I just started Ardour, and I find that I don’t have the drivers for the Mbox Mini. I see code up at the top of this page, abut have no clue how to implement it. Where can I get a Big Dummy’s step by step instruction. Software is not my forte.

  24. I have Ubuntu loaded on the PC. I tried to start Jack Audio Connection Kit, and the following is what I get from Jack.

    21:12:50.753 Patchbay deactivated.
    21:12:50.765 Statistics reset.
    21:12:50.775 ALSA connection change.
    21:12:50.790 D-BUS: Service is available (org.jackaudio.service aka jackdbus).
    Cannot read socket fd = 23 err = Success
    CheckRes error
    JackSocketClientChannel read fail
    Cannot open qjackctl client
    21:12:55.816 ALSA connection graph change.
    (qjackctl.real:7821): Gtk-CRITICAL **: IA__gtk_widget_get_direction: assertion `GTK_IS_WIDGET (widget)’ failed
    (qjackctl.real:7821): Gtk-CRITICAL **: IA__gtk_widget_get_direction: assertion `GTK_IS_WIDGET (widget)’ failed
    21:13:10.304 D-BUS: JACK server could not be started. Sorry
    Cannot open qjackctl client
    (qjackctl.real:7821): Gtk-CRITICAL **: IA__gtk_widget_get_direction: assertion `GTK_IS_WIDGET (widget)’ failed
    (qjackctl.real:7821): Gtk-CRITICAL **: IA__gtk_widget_get_direction: assertion `GTK_IS_WIDGET (widget)’ failed
    Sat Feb 2 21:13:10 2013: Starting jack server…
    Sat Feb 2 21:13:10 2013: ERROR: `default’ server already active
    Sat Feb 2 21:13:10 2013: ERROR: Failed to open server
    Sat Feb 2 21:13:12 2013: Saving settings to “/home/motormouth/.config/jack/conf.xml” …
    21:13:22.309 Could not connect to JACK server as client. – Overall operation failed. – Server communication error. Please check the messages window for more info.
    Cannot read socket fd = 23 err = Success
    CheckRes error
    JackSocketClientChannel read fail
    Cannot open qjackctl client

    I don’t know JACK about this any help to get the Mbox2 Mini running would be great. Thank you!

  25. hi! thanks for the driver. you’ve done a great work with this.

    i’m using ubuntu 12.10.
    just installed the kernel 3.8 – but kernel panic happened just after plugging-in the mbox2. so i guess the patch hasn’t been added yet…

    i’ve come back to my previous kernel:

    unre@unre-dell:~/alsa-driver-digidesign/alsa$ apt-cache search linux-headers-$(uname -r)
    linux-headers-3.5.0-25-lowlatency – Linux kernel headers for version 3.5.0 on x86/x86_64

    but when trying to install the alsa-driver i get the following error:

    unre@unre-dell:~/alsa-driver-digidesign/alsa$ sudo make install
    if [ -L /include/sound ]; then \
    rm -f /include/sound; \
    ln -sf /home/unre/alsa-driver-digidesign/alsa/include/sound /include/sound; \
    else \
    rm -rf /include/sound; \
    install -d -m 755 -g root -o root /include/sound; \
    for f in include/sound/*.h; do \
    install -m 644 -g root -o root $f /include/sound; \
    done \
    fi
    install: cannot stat `include/sound/*.h’: No such file or directory
    make: *** [install-headers] Error 1

    any clue with this would be greatly appreciated!
    unre

  26. ps. linux-headers are already installed…

    unre@unre-dell:~/alsa-driver-digidesign/alsa$ sudo apt-get install linux-headers-$(uname -r)
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    linux-headers-3.5.0-25-lowlatency is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

  27. I’m getting the same error as Vesu. Being a noob to linux, I’m having a hard time understanding Paolo’s instructions. When I type in

    include

    I get this message:

    bash: syntax error near unexpected token ‘newline’

    Please help! I clearly have no clue what I’m doing 😛

  28. I have a digidesign Mbox 2, and when i saw this driver for linux i was expecting to try it.. but it not works for me .( .. can you help?

    I have tried without compiling any new kernel, because i understood that it’s not necessary now: My kernel is:
    3.8.0-19-generic
    I recently (yesterday) installed Ubuntu 13.04, (what i mean, its clean)

    dmesg launch these lines when i unplug and plug again:

    kern :info : [ 246.416047] usb 7-1: USB disconnect, device number 2
    kern :info : [ 255.604018] usb 7-1: new full-speed USB device number 4 using uhci_hcd
    kern :warn : [ 255.829372] usb 7-1: config 1 interface 2 has no altsetting 1
    kern :warn : [ 255.829377] usb 7-1: config 1 interface 3 has no altsetting 1
    kern :warn : [ 255.829381] usb 7-1: config 1 interface 4 has no altsetting 1
    kern :warn : [ 255.829384] usb 7-1: config 1 interface 5 has no altsetting 1
    kern :info : [ 255.846350] usb 7-1: New USB device found, idVendor=0dba, idProduct=3000
    kern :info : [ 255.846354] usb 7-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    kern :info : [ 255.846359] usb 7-1: Product: Mbox 2
    kern :info : [ 255.846362] usb 7-1: Manufacturer: Digidesign
    kern :err : [ 260.889518] usb-audio: Unknown bootresponse=1, or timed out, ignoring device.
    kern :warn : [ 260.889536] snd-usb-audio: probe of 7-1:1.0 failed with error -5
    kern :err : [ 265.933689] usb-audio: Unknown bootresponse=1, or timed out, ignoring device.
    kern :warn : [ 265.933706] snd-usb-audio: probe of 7-1:1.1 failed with error -5
    kern :err : [ 270.973850] usb-audio: Unknown bootresponse=1, or timed out, ignoring device.
    kern :warn : [ 270.973868] snd-usb-audio: probe of 7-1:1.2 failed with error -5
    kern :err : [ 276.014013] usb-audio: Unknown bootresponse=1, or timed out, ignoring device.
    kern :warn : [ 276.014030] snd-usb-audio: probe of 7-1:1.3 failed with error -5
    kern :err : [ 281.053186] usb-audio: Unknown bootresponse=1, or timed out, ignoring device.
    kern :warn : [ 281.053204] snd-usb-audio: probe of 7-1:1.4 failed with error -5
    kern :err : [ 286.093348] usb-audio: Unknown bootresponse=1, or timed out, ignoring device.
    kern :warn : [ 286.093366] snd-usb-audio: probe of 7-1:1.5 failed with error -5
    kern :err : [ 291.133509] usb-audio: Unknown bootresponse=1, or timed out, ignoring device.
    kern :warn : [ 291.133527] snd-usb-audio: probe of 7-1:1.6 failed with error -5

    please, help!, i love linux, but this music card have been the last reason for years to have a windows at home.

  29. Confirmed working “out of the box” with Xubuntu 13.04 and linux-image-3.8.0-19-lowlatency. No more compiling 🙂

  30. Hi,

    I’m running KXStudio with a 13.04 kernel (so the drivers are in alsa).

    I’m curious why you hardcoded 48k sample rate in the source.

    I’m also wondering if this is what is causing the following error:

    alsa_in -j Mbox -dhw:M2 -q 1
    Sample format not available for playback: Invalid argument
    Setting of hwparams failed: Invalid argument

    (I’ve tried -r 48000 and -r 44100 too, same result, and yes it’s the correct card).

  31. any help with on 3.9 ?

    usb-audio: Unknown bootresponse=0, or timed out, ignoring device.
    [ 3.568927] snd-usb-audio: probe of 4-2:1.0 failed with error -5
    [ 4.071614] usb-audio: Unknown bootresponse=0, or timed out, ignoring device.
    [ 4.071626] snd-usb-audio: probe of 4-2:1.1 failed with error -5

  32. @Derek:

    Try booting your machine without the MBox connected. Sometimes the linux USB system gets confused when there are too many devices attached at boot. Attaching the device after the system has kind of settled (ie you get to a command prompt or logged into X) sometimes helps.

  33. Hello everyone,

    I’m a first time Linux user and just installed my OS on a seperate partition of my primary hard drive. I’m using Fedora 19 64-bit with kernel version 3.9.5-301.fc19.x86_64

    I went ahead and utilized the repository

    git clone git://zammit.org/alsa-driver-digidesign.git
    cd alsa-driver-digidesign/alsa
    ./gitcompile
    sudo make install
    #include linux/module.h

    mind you I did ahere to Jeremy’s instructions in placing the less than and greater than symbols in the appropriate places in that last line. What I got as a result is as follows.

    $ git clone git://zammit.org/alsa-driver-digidesign.git
    bash: git: command not found…
    $ cd alsa-driver-digidesign/alsa
    bash: cd: alsa-driver-digidesign/alsa: No such file or directory
    $ ./gitcompile
    bash: ./gitcompile: No such file or directory
    $ sudo make install
    make: *** No rule to make target `install’. Stop.
    $ #include linux/module.h

    Just for the hell of it, I also tried the following.

    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
    #include linux/module.h

    which left me with this result below.

    $ tar jxf mbox2-kernel-20121213.tar.bz2
    tar (child): mbox2-kernel-20121213.tar.bz2: Cannot open: No such file or directory
    tar (child): Error is not recoverable: exiting now
    tar: Child returned status 2
    tar: Error is not recoverable: exiting now
    $ cd mbox2-kernel
    bash: cd: mbox2-kernel: No such file or directory
    $ make
    make: *** No targets specified and no makefile found. Stop.
    $ sudo make install
    make: *** No rule to make target `install’. Stop.
    $ sudo rmmod snd-usb-audio # ignore errors
    rmmod: ERROR: Module snd_usb_audio is in use
    $ sudo rmmod snd-usbmidi-lib # ignore errors
    rmmod: ERROR: Module snd_usbmidi_lib is in use by: snd_usb_audio
    $ sudo modprobe snd-usb-audio
    $ #include linux/module.h

    As I’m sure my results have made it clear, I haven’t been successful in getting my Mbox Mini to communicate with my system. I have Windows 7 64-bit on my other partition and the unit works fine on that side. Any help would be greatly appreciated. Please email me if you have any feedback that may be of help.

    Thanks in advance.

  34. I should also mention that I’ve installed and configured RPM Fusion on my machine and have all of my latest OS updates.

  35. tried in a ubuntu studio x64 and ubuntu-gnome x86 and ubuntu studio x86…
    3.8.0-26-lowlatency

    sad day, i need windows again 🙁

    [ 178.187852] usb 7-1: New USB device found, idVendor=0dba, idProduct=3000
    [ 178.187857] usb 7-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    [ 178.187861] usb 7-1: Product: Mbox 2
    [ 178.187865] usb 7-1: Manufacturer: Digidesign
    [ 178.846180] usb-audio: Unknown bootresponse=128, or timed out, ignoring device.
    [ 178.846197] snd-usb-audio: probe of 7-1:1.0 failed with error -5
    [ 179.348440] usb-audio: Unknown bootresponse=56, or timed out, ignoring device.
    [ 179.348458] snd-usb-audio: probe of 7-1:1.1 failed with error -5
    [ 179.850705] usb-audio: Unknown bootresponse=7, or timed out, ignoring device.
    [ 179.850721] snd-usb-audio: probe of 7-1:1.2 failed with error -5
    [ 180.353059] usb-audio: Unknown bootresponse=255, or timed out, ignoring device.
    [ 180.353098] snd-usb-audio: probe of 7-1:1.3 failed with error -5
    [ 180.855241] usb-audio: Unknown bootresponse=255, or timed out, ignoring device.
    [ 180.855260] snd-usb-audio: probe of 7-1:1.4 failed with error -5
    [ 181.357505] usb-audio: Unknown bootresponse=137, or timed out, ignoring device.
    [ 181.357519] snd-usb-audio: probe of 7-1:1.5 failed with error -5
    [ 181.859773] usb-audio: Unknown bootresponse=233, or timed out, ignoring device.
    [ 181.859788] snd-usb-audio: probe of 7-1:1.6 failed with error -5
    [ 181.859829] usbcore: registered new interface driver snd-usb-audio
    [ 550.793636] init: upstart-file-bridge main process (335) terminated with stat

  36. I may be getting an Mbox 1 for free but, since im a strict linux only user id need it to work under linux. Is there any chance these drivers will work with the older Mbox?

Leave a Reply

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