Why is my Simulink Desktop Real-Time simulation very slow or halts in Windows when Hyper-V is enabled?

74 views (last 30 days)
I am trying to use Simulink Desktop Real-Time (SLDRT) on my Windows machine, but when I launch the example model "sldrtex_vdp.slx", it runs very slow, halts, or may even cause a blue-screen.
The following warning message may be prompted out: 
Warning: The "Real-Time Synchronization" block has timed out while
trying to synchronize to real-time kernel.
The following warning messages may be shown in Diagnostic Viewer:
Model sldrtex_vdp loaded
A disconnect message was sent to the target 10 seconds ago. Waiting for response.. [6 similar]
Never received disconnect response from target. Disconnecting...
Model sldrtex_vdp unloaded
Additionally, I may see the following error message during the kernel installation (since R2019b) or when trying to run a real-time simulation (since R2020b):
The Hyper-V hypervisor has been detected. The Simulink Desktop Real-Time kernel
cannot run in the presence of the hypervisor. Please disable the Hyper-V operating
system component before attempting to use Simulink Desktop Real-Time.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 31 Mar 2024 at 0:00
Edited: MathWorks Support Team on 31 Mar 2024 at 20:59
On Windows platform, the issue is likely to be related to the fact that Hyper-V is enabled.
In order to check this, execute the following command from the MATLAB Command Window:
>> !systeminfo
If Hyper-V is enabled, it will be displayed at the bottom line of the output of the above command:
Hyper-V Requirements: A hypervisor has been detected. Features required for Hyper-V will not be displayed.
In R2022b and prior, the Simulink Desktop Real-Time (SLDRT) kernel is not compatible with Hyper-V or any features that use Microsoft virtualization technology.
 

Try this workaround:

One option is to upgrade to MATLAB R2023a where the limitation of SLDRT being incompatible with Hyper-V was removed.
Alternatively, try to disable Hyper-V on your Windows PC by performing the following steps:
1. Find Turn Windows features on or off by using Windows search.
2. Clear the box for the following features:
  • Hyper-V
  • Virtual Machine Platform
  • Windows Hypervisor Platform
  • Windows Subsystem for Linux
This operation begins the uninstall process.
3. Restart the computer as prompted after the uninstall process completes.
 

Further troubleshooting:

If the above steps don't help, please see the following MATLAB Answers post for troubleshooting steps: https://www.mathworks.com/matlabcentral/answers/1630650-how-do-i-troubleshoot-issues-with-disabling-the-windows-hyper-v-feature-for-simulink-desktop-real-ti
Refer to the following documentation page for more information regarding this workaround: https://www.mathworks.com/help/sldrt/troubleshooting-in-sldrt-target.html 

More Answers (0)

Categories

Find more on Simulink Desktop Real-Time in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!