Linux Support Steinberg UR22

This is a little open letter to the Steinberg software developers…

Dear engineers:

I keep in mind to adquire a Steinberg UR22 usb interface, but only a thing stopped me
Seems you don’t support linux…It’s a pity, cause you could get an a lot of new users.
Musicians, but not only…Melomans, scientifics* …We are using GNU Linux systems.

Despiste a direct competitor of you offers a good Linux support…
I love Steinberg hardware…and I trust you’ ll develop a GNU Linux functional driver
and software.

Please, could it be soon?




Thank’s a lot in advance





P.D; (By the way…I’m Speech and Language Terapist, and your gorgeus Usb interface
can be a terrific hardware to record voice at a very accurate form (clinical analysis).

**** Both UR22 and UR44 now work with Ubuntu/Lubuntu, etc **
UR22 recording and playback works out of the box.
UR44 works with the “CC” mode enabled (there’s a push button in the back of the unit**



Hi !
I just got my UR22 working a few minutes ago by following this thread:
http://linux-audio.4202.n7.nabble.com/Support-for-Steinberg-UR22-Yamaha-USB-chipset-0499-1509-tc82888.html#a82917

I’m using Ubuntu 14.04 LTS. You’ll need to get the kernel sources since the fix involves adding a few lines of code to the snd_usb_audio driver. I was having some trouble building the snd_usb_audio driver by itself, so I ended up following a few guides to compile the whole kernel… here are some steps below:

  1. sudo -s
  2. apt-get install build-essential linux-source kernel-package fakeroot libncurses5-dev nano
  3. cp /boot/config-3.13.0-32-generic /usr/src/linux-source-3.13.0/config
  4. cd /usr/src/linux-source-3.13.0/
  5. make oldconfig
  6. make clean
  7. copy the code in quirks_table.h - Pastebin.com
  8. edit /usr/src/linux-source-3.13.0/sound/usb/quirks-table.h and add the code above @ line 388 for example
  9. cd /usr/src/linux-source-3.13.0/
    *11. make-kpkg -j9 --initrd --revision=1 kernel_image
    12 dpkg -i /usr/src/linux-image-3.13.11.4_1_amd64.deb
    13 reboot
  • for step 11 you may want to change the -j9 parameter to reflect the number of cores your CPU has +1.
    **You may have to change some of the names around depending on different versions of kernels that Ubuntu may download.

To check that everything is working, when you boot next time, you can see if the snd_usb_audio module gets loaded.
14. lsmod | grep -i snd_usb_audio
15. dmesg | grep -i ur22 -B 3 -A 3
16. dmesg | grep -i snd_usb_audio
17. Go into sound settings in the Ubuntu GUI and configure the UR22 as an input and output device (see screenshot)


~~Happy listening/recording ( I hope - I haven’t tried recording yet ) :mrgreen:

I’m sure there are better ways to get this working, but that’s what worked for me, and thought I’d share before I forgot how. Used the below links for reference…
https://wiki.ubuntu.com/KernelTeam/GitKernelBuild
https://help.ubuntu.com/12.04/installation-guide/powerpc/kernel-baking.html

: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?