arteme / pod-ui

A modern GTK+ UI for controlling Line6 POD family of devices via MIDI. Supported devices: POD 1.0, POD 2.0, POD Pro, PocketPOD, PODxt, PODxt Pro, PODxt Live, Bass PODxt, Bass PODxt Pro, Bass PODxt Live
https://arteme.github.io/pod-ui/
GNU General Public License v3.0
31 stars 2 forks source link

PODxt: MIDI over USB doesn't work in Linux #19

Closed arteme closed 1 year ago

arteme commented 1 year ago

Unfortunately, PODxt's MIDI over USB doesn't quite work in Linux. If you connect you PODxt with a USB cable, you'll find that MIDI SysEx messages do not work. This means that while you can tweak individual controls, you won't be able to load/store patched from/to your PODxt.

The bug is in the Linux kernel. While it is straight-forward fix, it will take time for it to make it into the mainline Linux kernel. Until then you can download the patch attached below, apply it yourself and rebuild the affected driver (snd-usb-pod).

arteme commented 1 year ago

Linux kernel mainline has been fixed starting from version 6.2 (6.2-rc2) and the fix has been back-ported to the following stable/LTS kernel releases:

Linux 4.9: 4.9.337 Linux 4.14: 4.14.303 Linux 4.19: 4.19.270 Linux 5.4: 5.4.229 Linux 5.10: 5.10.163 Linux 5.15: 5.15.87 Linux 6.0: 6.0.17 Linux 6.1: 6.1.3

If you need to patch a different version of the Linux kernel, use this patch:

line6-podxt-patches-221212.zip

arteme commented 1 year ago

Here is a brief set of instructions of how to patch your kernel, as tested on an Ubuntu system. While the patch was made for Linux 6.0.9, the patch applies, as tested below, to Linux 5.15.0:

# dowload kernel source
sudo apt-get install linux-source

# check the version of the downloaded kernel sources
dpkg --get-selections | grep linux-source- | cut -f1

# assuming, kernel sources 5.15.0 downloaded, unpack sources
tar xfj /usr/src/linux-source-5.15.0/linux-source-5.15.0.tar.bz2
cd linux-source-5.15.0

# get the patch
wget https://github.com/arteme/pod-ui/files/10220404/line6-podxt-patches-221212.zip
unzip line6-podxt-patches-221212.zip

# apply the patch
patch -p1 < 0001-*.patch
patch -p1 < 0002-*.patch

# build the patch
cd sound/usb/line6
make -C /lib/modules/$(uname -r)/build M=$(pwd) modules

# copy the built kernel module to your module tree
sudo cp *.ko /lib/modules/$(uname -r)/kernel/sound/usb/line6

# in case you already have the module loaded, reload the module
sudo rmmod snd-usb-pod snd-usb-line6
sudo modprobe snd-usb-pod
arteme commented 1 year ago

If you've done everything according to the instructions above, but pod-ui still complains about the broken drivers, it may be that the kernel modules on your system are compressed and modprobe is not picking up the newly compiled modules.

Check, if you have compressed modules:

ls /lib/modules/$(uname -r)/kernel/sound/usb/line6/*.zst

If that doesn't give a No such file or directory error, but gives a list of files instead, you'll need to delete them and regroup:

sudo rm /lib/modules/$(uname -r)/kernel/sound/usb/line6/*.zst
sudo depmod

# reload the modules
sudo rmmod snd-usb-pod snd-usb-line6
sudo modprobe snd-usb-pod