Kernel Modules 4.19 Workaround

Hi Everyone,

The new Raspbian Stretch update from April, 2019 with kernel version 4.19.42 is having compatibility issues with the MATRIX kernel modules.

A temporary workaround is to downgrade the kernel and the kernel headers (the headers are needed if you want to build the modules from source), and prevent apt from updating them (so you can still use apt update && upgrade).

Please run these commands one by one.

cd ~/

wget -q --show-progress -O "rpi_kernel_4-14.deb" http://archive.raspberrypi.org/debian/pool/main/r/raspberrypi-firmware/raspberrypi-kernel_1.20181112-1_armhf.deb

wget -q --show-progress -O "rpi_kernel_headers_4-14.deb" http://archive.raspberrypi.org/debian/pool/main/r/raspberrypi-firmware/raspberrypi-kernel-headers_1.20181112-1_armhf.deb

sudo apt purge raspberrypi-kernel-headers

sudo apt install ./rpi_kernel_4-14.deb

sudo apt install ./rpi_kernel_headers_4-14.deb

sudo apt-mark hold raspberrypi-kernel

sudo apt-mark hold raspberrypi-kernel-headers

sudo reboot

UPDATE: To undo please run these commands one by one.

sudo apt-mark unhold raspberrypi-kernel

sudo apt-mark unhold raspberrypi-kernel-headers

sudo apt purge matrixio-kernel-modules

sudo apt purge raspberrypi-kernel-headers

sudo apt update && sudo apt upgrade

sudo reboot

sudo apt install matrixio-kernel-modules

sudo reboot
4 Likes

Thanks for resolving issue and it had been issue for me since the middle of May.

Just one question about capabilities of Matrix Voice, is there any way to calculate a distance between a user (speaking person) and Matrix Voice?

Looking forward to hearing from you.

Hi @Doston,

Welcome to the community!

Yes, there is a library called ODAS (Open Embedded Audition System) that is able to do this. We have a guide on how to get it up & running on the MATRIX Voice + Pi here.

You would have to grab the right parameter for distance from the sound source localization which you may be able to find if you look through the code here, or you can use the version that shows you the source of audio with a real-time updating user interface.

Best,
Samreen

3 Likes

Thanks for quick reply, I will have a look at it.:slightly_smiling_face::+1:

2 Likes

Hi Everyone,

When installing MATRIX kernel modules after the Linux kernel downgrade to 4.14, please follow the steps below!

curl https://apt.matrix.one/doc/apt-key.gpg | sudo apt-key add -
echo “deb https://apt.matrix.one/raspbian $(lsb_release -sc) main” | sudo tee /etc/apt/sources.list.d/matrixlabs.list
sudo apt-get update
sudo apt-get upgrade

Then reboot

sudo reboot

The next commands will install the MATRIX kernel modules.

sudo apt install matrixio-kernel-modules=0.1.6

A second reboot will be required.

sudo reboot

The MATRIX kernel modules are used for ALSA microphone recording & playback, Snips & most other voice assistant applications. This method has the user install version 0.1.6 of the MATRIX kernel modules on a downgraded Raspbian kernel which works well with Snips.

The MATRIX kernel modules have been updated to work with the latest Raspbian, but Snips is currently having some issues with the latest Raspbian kernel (unrelated to MATRIX!). We are working on providing a good for that, and will update as soon as possible!

Hi all

Thanks for the work around. I’ve tried to get it to work on an install of stretch lite but even after the downgrade I get an error.

Building module:
cleaning build area....
make -j4 KERNELRELEASE=4.14.79-v7+ -C /lib/modules/4.14.79-v7+/build M=/var/lib/dkms/matrixio/0.1/build.....(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.14.79-v7+ (armv7l)
Consult /var/lib/dkms/matrixio/0.1/build/make.log for more information.
dpkg: error processing package matrixio-kernel-modules (--configure):
 subprocess installed post-installation script returned error exit status 10
Processing triggers for man-db (2.7.6.1-2) ...
Errors were encountered while processing:
 matrixio-kernel-modules
E: Sub-process /usr/bin/dpkg returned an error code (1)

Also, I then purged this and tried version 0.1.6 and got

E: Version '0.1.6' for 'matrixio-kernel-modules' was not found

I’d appreciate any help to get this working.

Thanks

Hi @cwm,

Welcome to the community!

We found our latest kernel with the latest Raspbian Stretch actually works as expected. So, I recommend installing the latest version of Raspbian Stretch, and simply installing the kernel modules as you normally would using the steps here.

curl https://apt.matrix.one/doc/apt-key.gpg | sudo apt-key add -
echo "deb https://apt.matrix.one/raspbian $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/matrixlabs.list
sudo apt-get update
sudo apt-get upgrade

Then reboot

sudo reboot

The next commands will install the MATRIX kernel modules.

sudo apt install matrixio-kernel-modules

A second reboot will be required.

sudo reboot

There is an issue with Snips that is a widespread issue Snips services are having with the latest Raspbian Stretch kernel. We will provide a fix for that, but it’s not on our side specifically!

It wasn’t working for you before because I accidentally provided partial instructions :sweat_smile: fixing that now. Hope this helps!

Best,
Samreen

Thank you so much @Samreen!! It works now.

1 Like

I am running into a problem when updating:

pi@raspberrypi:~ $ sudo apt-get update
Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:2 http://archive.raspberrypi.org/debian buster InRelease         
Ign:3 https://apt.matrix.one/raspbian buster InRelease               
Err:4 https://apt.matrix.one/raspbian buster Release
  404  Not Found [IP: 35.190.26.60 443]
Reading package lists... Done
E: The repository 'https://apt.matrix.one/raspbian buster Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Hi @Michael,

Did you run the following lines in your terminal first before upgrading? They allow you to add the MATRIX repository and key so MATRIX packages are recognized.

curl https://apt.matrix.one/doc/apt-key.gpg | sudo apt-key add -
echo "deb https://apt.matrix.one/raspbian $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/matrixlabs.list

Turns out I didn’t put them in a code block initially which messes with how the quotation marks appear and that could have caused the commands not to work. Please paste them again before updating and let me know if it works!

Best,
Samreen

I did indeed run those lines as well. I removed matrixlabs.list and tried running all the commands again, but I keep getting the same error.

pi@raspberrypi:/etc/apt/sources.list.d $ sudo rm matrixlabs.list 
pi@raspberrypi:/etc/apt/sources.list.d $ ls
raspi.list
pi@raspberrypi:/etc/apt/sources.list.d $ cd
pi@raspberrypi:~ $ curl https://apt.matrix.one/doc/apt-key.gpg | sudo apt-key add -
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2203  100  2203    0     0   6119      0 --:--:-- --:--:-- --:--:--  6102
OK
pi@raspberrypi:~ $ echo "deb https://apt.matrix.one/raspbian $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/matrixlabs.list
deb https://apt.matrix.one/raspbian buster main
pi@raspberrypi:~ $ sudo apt-get update
Hit:1 http://archive.raspberrypi.org/debian buster InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease      
Ign:3 https://apt.matrix.one/raspbian buster InRelease               
Err:4 https://apt.matrix.one/raspbian buster Release
  404  Not Found [IP: 35.190.26.60 443]
Reading package lists... Done
E: The repository 'https://apt.matrix.one/raspbian buster Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
pi@raspberrypi:~ $

@Michael,

It seems you are using Raspbian Buster, that just came out and we are currently building out support for it!

In the meantime, you can use our kit image with Raspbian Stretch Desktop to get your project up and running.

Sorry for the confusion!

Best,
Samreen

This is why I thought you were talking about Buster. Any idea when we can expect Matrix support for this version?

@Michael,

Oops, that was actually posted before Buster came out (it did 5 days ago!) :sweat_smile:

We are working on support as we speak. It is hard to give a specific timeline at this moment, but we are trying for it to be as soon as possible! We will notify the community as soon as we have an update.

Thank you for your patience!

Best,
Samreen

@Michael,

You can also download Raspbian Stretch from the RPi archives if you want.

Best,
Samreen

@Samreen Thanks for the quick replies! I may just do that