Which Linux kernel is compatible with Simulink Desktop Real-Time?

I am trying to run simulink code based on Desktop Real-Time (R2023b) in a Ubuntu 20.04 based distribution, but the kernel installation is not as easy as it is in Windows...
First I tried installing it from the command line using sldrtkernel -install and it returned the next error:
Error: The Linux kernel version of your system is not compatible with Simulink Desktop Real-Time. Please update your operating system.
Next, I tried upgrading the kernel (to 6.5.7-060507-generic), and now the error is as follows:
Error using sldrtkernel>RunInstaller
Unsupported Linux kernel build: "Ubuntu-6.5-gcc-13".
Error in sldrtkernel>sldrtk_setup (line 127)
result = RunInstaller(prompt, 'install');
Error in sldrtkernel (line 64)
retval = sldrtk_setup(prompt);
Both errors are well documented in the Simulink Desktop Real-Time user's guide, but there's no clear solution to make it work.
Of course, Matlab can't make a Desktop Real-Time kernel for each and every Linux kernel, but is it possible to have a list of supported kernel versions so that users can upgrade/downgrade their kernel to make it work?
Could any Linux user currently using Simulink Desktop Real-Time mention the kernel version they are using?

Antworten (1)

Jan Houska
Jan Houska am 23 Okt. 2023

1 Stimme

Hi Diego,
please see the folder names in toolbox/sldrt/kernel/glnxa64 . They correspond to supported kernel versions. For Ubuntu 20.04, please use either the 5.4 or the 5.15 kernel. The first is the initial kernel release for 20.04 (also known as GA), the second is the latest HWE kernel at the time the R2023b release was finished.
Good Luck, Jan

5 Kommentare

Hi Jan,
Yesterday I tried using 5.15.0-86-generic, 5.15.0.87-generic and 5.15.0.88-generic (the latest update i can see using apt). It returned the next:
Error using sldrtkernel>RunInstaller
Linux kernel version of your system is not compatible with Simulink Desktop Real-Time. Please update your operating system.
Error in sldrtkernel>sldrtk_setup (line 127)
result = RunInstaller(prompt, 'install');
Error in sldrtkernel (line 64)
retval = sldrtk_setup(prompt);
I also tried with 5.4.0-99-generic, but my OS couldn't start properly.
Inside the directory you said, I find Ubuntu-5.15-gcc-9 and it should work since I have gcc v9.4.0. It doesn't.
I don't know if you have used it and you could give me the exact 5.15.x kernel that works with no doubt. Any other suggestion would be really apreciated.
Thank you, Diego
Hi Diego,
my kernel is 5.15.0-87, like this:
Linux 5.15.0-87-generic #97~20.04.1-Ubuntu SMP Thu Oct 5 08:25:28 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
This is the "stock" kernel installed by apt, the latest HWE one I think - i.e., not built from source, but installed from the official Ubuntu 20.04 LTS package. And yes, it does work with Simulink Desktop Real-Time.
Jan
Hi Jan,
That shocks me even more, because initially I had the same kernel. I get the next kernel version with uname -a:
Linux diego-new-laptop 5.15.0-87-generic #97~20.04.1-Ubuntu SMP Thu Oct 5 08:25:28 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
I tried again using this kernel, and matlab keep answering like in my previous comment:
Linux kernel version of your system is not compatible with Simulink Desktop Real-Time. Please update your operating system.
Maybe it is because of identifying a different distro?
Thanks anyway for your help Jan,
Diego
Hi Diego,
the installer "sldrtkernel" is a MATLAB function which calls some Linux system commands. The error is issued by the MATLAB function. Could you please do this:
dbstop in sldrtkernel at 519
dbstop in sldrtkernel at 677
and post on which line the error was reported? This will help to distinguis which of the mutiple compatibility checks has failed.
Also, you may want to contact MathWorks support with the issue. This way, it gets to the development team the official way.
Jan
Hi Jan,
The code enters inside the "if" block at line 677, so it's triggering EFAULT error that is returned for kernel incompatibility. Do you have any idea of why this happens?
All error info I get is what I answered you in October 25th.
I'll contact MathWorks support.
Diego

Melden Sie sich an, um zu kommentieren.

Produkte

Version

R2023b

Gefragt:

am 23 Okt. 2023

Kommentiert:

am 6 Nov. 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by