Skip to content
On this page

How to enable OpenCL on a NUC running Debian 11 ?

  1. Update your system: Before you start, make sure your system is up-to-date.

Open a terminal and run the following commands:

sudo apt-get update
sudo apt-get upgrade
  1. Install necessary packages: You need to install some packages to enable OpenCL.

Run the following commands:

sudo apt-get install ocl-icd-libopencl1
sudo apt-get install opencl-headers
sudo apt-get install clinfo
  1. Check the installation: You can check if OpenCL is working correctly by running the following command:

This command should display information about the OpenCL platform and devices available on your system.

If this does not work (no devices are detected) : Disable nomodeset when booting (Grub.conf) This option is sometimes enabled to solve issues with graphics cards, but it can prevent OpenCL from working correctly.

Here's how to disable nomodeset:

  1. Open a terminal and type the following command to open the GRUB configuration file in a text editor:
sudo nano /etc/default/grub
  1. Look for the line that starts with GRUB_CMDLINE_LINUX_DEFAULT. This line contains the default options that GRUB passes to the Linux kernel at boot time.

  2. If nomodeset is present in this line, remove it. The line should look something like this:

  1. Save the file and exit the text editor. If you're using nano, you can do this by pressing Ctrl+X, then Y to confirm that you want to save the changes, and finally Enter to confirm the file name.

  2. Update GRUB with the new configuration by running the following command:

sudo update-grub
  1. Reboot your system for the changes to take effect.

After rebooting, run clinfo again. If OpenCL is working correctly, it should now detect your devices.

Discover more content ?

Do you want to learn more and faster with dense and tailored technical resources ?

Last updated:

Advanced Stack