Linux Support Steinberg UR22

:blush: Just kidding,

Here’s a better way to do it:

  1. sudo -s
  2. apt-get install build-essential linux-source kernel-package fakeroot libncurses5-dev nano
  3. wget http://pastebin.com/raw.php?i=6H5fkYMV -O /usr/src/ur22.patch
  4. tar -C /usr/src/ -xjvf /usr/src/linux-source-3.13.0/linux-source-3.13.0.tar.bz2
  5. cd /usr/src/linux-source-3.13.0/sound/usb
  6. patch < /usr/src/ur22.patch
  7. cd /lib/modules/3.13.0-32-generic/build/
  8. make M=/usr/src/linux-source-3.13.0/sound/usb
  9. rmmod snd-usb-audio
  10. rsync -avm --include=‘*.ko’ -f ‘hide,! */’ /usr/src/linux-source-3.13.0/sound/usb/ /lib/modules/3.13.0-32-generic/kernel/sound/usb/
  11. modprobe snd-usb-audio

Just wanted to say thanks, I did get a couple errors and messages that made me a bit nervous, but after rebooting it works perfectly!

Well, this worked right up until I ran updates and now no luck…

+1 all audio interface hardware must work in Linux. I refuse to buy any hardware if the vendor does not support Linux.

Sorry about that guys, should have made the script more robust - looks like the kernel source & module directories change every update :unamused:
Paste this into a .sh file and it will do the trick - I just updated mine too.

#!/bin/bash
KERNEL_SOURCE=`apt-cache search linux-source- | cut -d " " -f 1`
apt-get install build-essential linux-source kernel-package fakeroot libncurses5-dev nano
wget http://pastebin.com/raw.php?i=6H5fkYMV -O /usr/src/ur22.patch
tar -C /usr/src/ -xjvf /usr/src/$KERNEL_SOURCE/$KERNEL_SOURCE.tar.bz2
cd /usr/src/$KERNEL_SOURCE/sound/usb
patch < /usr/src/ur22.patch
cd /lib/modules/`uname -r`/build/
make M=/usr/src/$KERNEL_SOURCE/sound/usb
rmmod snd-usb-audio
rsync -avm --include='*.ko' -f 'hide,! */' /usr/src/$KERNEL_SOURCE/sound/usb/ /lib/modules/`uname -r`/kernel/sound/usb/
modprobe snd-usb-audio

Here is the compile output. It’s normal for it to complain that modules are in use - it won’t affect anything. After a reboot you should see the new modules loaded…

linux-source-3.13.0/samples/seccomp/bpf-direct.c
linux-source-3.13.0/samples/seccomp/Makefile
(Stripping trailing CRs from patch; use --binary to disable.)
patching file quirks-table.h
patch unexpectedly ends in middle of line
Hunk #1 succeeded at 386 with fuzz 1.
  CC [M]  /usr/src/linux-source-3.13.0/sound/usb/card.o
  LD [M]  /usr/src/linux-source-3.13.0/sound/usb/snd-usb-audio.o
  LD [M]  /usr/src/linux-source-3.13.0/sound/usb/snd-usbmidi-lib.o
  Building modules, stage 2.
  MODPOST 8 modules
  LD [M]  /usr/src/linux-source-3.13.0/sound/usb/snd-usb-audio.ko
  LD [M]  /usr/src/linux-source-3.13.0/sound/usb/snd-usbmidi-lib.ko
rmmod: ERROR: Module snd_usb_audio is in use
building file list ... done
./
snd-usb-audio.ko
snd-usbmidi-lib.ko

sent 293,691 bytes  received 57 bytes  587,496.00 bytes/sec
total size is 574,864  speedup is 1.96

Many thanks KgwgK, a friend of mine has just ordered the UR22, I will try it out in Linux soon!

Works like a charm! I got my UR22 running in a few minutes in Ubuntu 14.10.

I recompiled and then I had to manualy modify quirks-table.h.


Thank you !

However, that’s a shame that Steinberg doesn’t provide a linux driver for their product…

The patch should make it into one of the kernel updates soon …

Yay! Well done … keep us posted here! :smiley:

Since followed this - the UR22 works perfect with Ubuntu 1404
thx a lot
ep

Well, doesn’t work anymore. I don’t know what happened. Suddenly, Ubuntu ask me for a password where it didn’t ask for it before (like restart, mounting partitions). And my UR-22 doesn’t work anymore…

I tried to re-do what I did to make it work, but it doesn’t. I can’t see the UR-22 in Ubuntu settings. Only Dummy Output.

Got it working again. After doing all the steps listed by KgwgK again, I purged ALSA drivers and reinstalled them. So now I can see the UR-22 in the Gnome audio settings.

I followed the steps from here: Comprehensive Sound Problem Solutions Guide


sudo apt-get --purge remove linux-sound-base alsa-base alsa-utils
sudo apt-get install linux-sound-base alsa-base alsa-utils
sudo apt-get install gdm ubuntu-desktop (don’t know if this one was necessary)

Hi there,

I bought UR22 recently hoping it will work with ubuntu. I also tried all the steps mentioned above in this thread but still can not see it in the gnome GUI. Does anybody has any new idea?

Robert

That’s strange - make sure you’re running the script as root, otherwise the rsync step may have some problems.
I pasted the script here - http://pastebin.com/mVxFZVhY
If you’ve already got a snd-usb-audio driver being loaded, the script won’t be able to uninstall it, so after running it, you will have to reboot, and it should get picked up on the next boot.
Can you paste the script output here to help debug? By the way, the patch is in the upstream kernel, but Ubuntu hasn’t picked it up yet :confused:

So after some effort I managed to push my UR22 to work. It is not the smartest solution but it works at the time. I noticed that I boot to 3.13.0-40 kernel version and the patch refers to 3.13.0-32…So i had to find the way to boot to older kernel version. Now it works fine. I am still interested how to make it work with 3.13.0-40 though…

regards, Robert

The script here http://pastebin.com/mVxFZVhY should do the trick if you run it as root. I generalized it so it always pulls the latest kernel. The source tree it downloads may be labeled differently than the ubuntu build number, but we’re not rebuilding the entire kernel for this, only the snd-usb-audio driver, and it’ll point to the official ubuntu headers so the kernel version ends up matching up after all is said and done.

I have a Steinberg UR44 and tried the same procedure in Ubuntu 14.10. When that didn’t help, I edited the quirks-table.h in analogy to KgwgK’s patch file and thereby duplicated the UR22 entry, replacing the idProduct for 0x150e (which I took from lsusb). Then I repeated the steps of KgwgK’s bash script (make, disabling snd-usb-audio, rsync, enabling snd-usb-audio). Unfortunately, even after reboot the device is still not listed as a sound input device in Settings > Sound. Any idea what went wrong?

Looks like the patch is officially in the Ubuntu 14.10 tree now:
http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-utopic.git;a=blob;f=sound/usb/quirks-table.h;h=c657752a420c024aba8c61fa8ced9b8971434fcf;hb=HEAD
I just ran the Ubuntu update, and the UR22 worked out of the box on reboot.
:mrgreen:

I have a Steinberg UR44 and tried the same procedure in Ubuntu 14.10. When that didn’t help, I edited the quirks-table.h in analogy to KgwgK’s patch file and thereby duplicated the UR22 entry, replacing the idProduct for 0x150e (which I took from lsusb). Then I repeated the steps of KgwgK’s bash script (make, disabling snd-usb-audio, rsync, enabling snd-usb-audio). Unfortunately, even after reboot the device is still not listed as a sound input device in Settings > Sound. Any idea what went wrong?

I’m not sure, after looking at these threads, but it looks like Cyrus was able to get it to work.
Are you sure you didn’t re-apply the patch file with that script and overwriting your UR44 changes?
http://mailman.alsa-project.org/pipermail/alsa-devel/2014-March/074120.html
http://permalink.gmane.org/gmane.linux.alsa.devel/130021

Yes, I’m sure.

However, apparently it did indeed work but the device is only recognized if it’s connected at system start. Reconnecting it later (including off/on) is of no use. Another caveat is that in Settings > Audio it’s only listed as an output device while, luckily, Audacity lists it as both input and output. A fast test showed that with a six-track recording the microphone input in channel 4 is detected correctly.