[Kernel-packages] [Bug 1993539] [NEW] Nvidia GeForce GTX 560 M not recognized as an OpenCL platform with 5.15.0-50 kernel

2022-10-19 Thread Michel NALLINO
Public bug reported:

Hi,

Before to update to Linux Mint 21, based on Ubuntu 22.04 LTS, I have
tried 5.15.0-50 kernel with HWE. This was intended as a test of my
hardware compatibility with the hardware stack of Ubuntu 22.04, before a
possible update.

At a first glance, all seemed OK; nut I noticed that LibreOffice was
unable to use OpenCL. A simple "clinfo" command confirmed this:

  $ clinfo
  Number of platforms   0

I went back from 5.15.0-50 kernel to 5.4.0-128 one. Now, "clinfo" output
is:

  $ clinfo
  Number of platforms   1
Platform Name   NVIDIA CUDA
Platform Vendor NVIDIA Corporation
Platform VersionOpenCL 1.2 CUDA 9.1.84
Platform ProfileFULL_PROFILE
Platform Extensions 
cl_khr_global_int32_base_atomics
  cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics
  cl_khr_local_int32_extended_atomics cl_khr_fp64 cl_khr_byte_addressable_store 
cl_khr_icd
  cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query 
cl_nv_pragma_unroll
  cl_nv_copy_opts cl_nv_create_buffer
Platform Extensions function suffix NV
Platform Name   NVIDIA CUDA
  Number of devices 1
Device Name GeForce GTX 560M
Device Vendor   NVIDIA Corporation
Device Vendor ID0x10de
Device Version  OpenCL 1.1 CUDA
Driver Version  390.154
Device OpenCL C Version OpenCL C 1.1
Device Type GPU
Device Topology (NV)PCI-E, 01:00.0
Device Profile  FULL_PROFILE
Device AvailableYes
Compiler Available  Yes
Max compute units   4
Max clock frequency 1550MHz
Compute Capability (NV) 2.1
Max work item dimensions3
Max work item sizes 1024x1024x64
Max work group size 1024
Preferred work group size multiple  32
Warp size (NV)  32
Preferred / native vector sizes
  char 1 / 1
  short1 / 1
  int  1 / 1
  long 1 / 1
  half 0 / 0(n/a)
  float1 / 1
  double   1 / 1
(cl_khr_fp64)
Half-precision Floating-point support   (n/a)
Single-precision Floating-point support (core)
  Denormals Yes
  Infinity and NANs Yes
  Round to nearest  Yes
  Round to zero Yes
  Round to infinity Yes
  IEEE754-2008 fused multiply-add   Yes
  Support is emulated in software   No
  Correctly-rounded divide and sqrt operations  No
Double-precision Floating-point support (cl_khr_fp64)
  Denormals Yes
  Infinity and NANs Yes
  Round to nearest  Yes
  Round to zero Yes
  Round to infinity Yes
  IEEE754-2008 fused multiply-add   Yes
  Support is emulated in software   No
Address bits64, Little-Endian
Global memory size  3150839808 (2.934GiB)
Error Correction supportNo
Max memory allocation   787709952 (751.2MiB)
Unified memory for Host and Device  No
Integrated memory (NV)  No
Minimum alignment for any data type 128 bytes
Alignment of base address   4096 bits (512 bytes)
Global Memory cache typeRead/Write
Global Memory cache size65536 (64KiB)
Global Memory cache line size   128 bytes
Image support   Yes
  Max number of samplers per kernel 16
  Max 2D image size 16384x16

[Kernel-packages] [Bug 1993539] Re: Nvidia GeForce GTX 560 M not recognized as an OpenCL platform with 5.15.0-50 kernel

2022-12-12 Thread Michel NALLINO
Hi,

I found a workaround to this problem. I solved the problem by installing new 
packages:
"sudo apt install linux-modules-nvidia-390-5.15.0-56-generic"
where:
- "390" is the main version of the Nvidia driver (390.157);
- "5.15.0-56-generic" is the name of the kernel ("uname -r" output).

This induced the installation of the following packages: “linux-modules-
nvidia-390-5.15.0-56-generic”, “linux-objects-
nvidia-390-5.15.0-56-generic”, “linux-signatures-
nvidia-390-5.15.0-56-generic”.

LibreOffice now detects OpenCL; and clinfo output with 5.15.0-56 kernel shows 
GTX 560 M is detected as an OpenCL platform:
"clinfo
Number of platforms   1
  Platform Name   NVIDIA CUDA
  Platform Vendor NVIDIA Corporation
  Platform VersionOpenCL 1.2 CUDA 9.1.84
  Platform ProfileFULL_PROFILE
  Platform Extensions 
cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics 
cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_fp64 
cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing 
cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll 
cl_nv_copy_opts cl_nv_create_buffer
  Platform Extensions function suffix NV

  Platform Name   NVIDIA CUDA
Number of devices 1
  Device Name GeForce GTX 560M
[...]"

See discussion on Linux Mint forum: 
https://forums.linuxmint.com/viewtopic.php?f=59&t=383809&p=2268764#p2268764
and on Nvidia developers forum: 
https://forums.developer.nvidia.com/t/nvidia-geforce-gtx-560-m-not-recognized-as-an-opencl-platform-with-ubuntu-hwe-5-15/236672

Regards,

MN

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux-hwe-5.15 in Ubuntu.
https://bugs.launchpad.net/bugs/1993539

Title:
  Nvidia GeForce GTX 560 M not recognized as an OpenCL platform with
  5.15.0-50 kernel

Status in linux-hwe-5.15 package in Ubuntu:
  New

Bug description:
  Hi,

  Before to update to Linux Mint 21, based on Ubuntu 22.04 LTS, I have
  tried 5.15.0-50 kernel with HWE. This was intended as a test of my
  hardware compatibility with the hardware stack of Ubuntu 22.04, before
  a possible update.

  At a first glance, all seemed OK; nut I noticed that LibreOffice was
  unable to use OpenCL. A simple "clinfo" command confirmed this:

    $ clinfo
    Number of platforms   0

  I went back from 5.15.0-50 kernel to 5.4.0-128 one. Now, "clinfo"
  output is:

    $ clinfo
    Number of platforms   1
  Platform Name   NVIDIA CUDA
  Platform Vendor NVIDIA Corporation
  Platform VersionOpenCL 1.2 CUDA 9.1.84
  Platform ProfileFULL_PROFILE
  Platform Extensions 
cl_khr_global_int32_base_atomics
    cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics
    cl_khr_local_int32_extended_atomics cl_khr_fp64 
cl_khr_byte_addressable_store cl_khr_icd
    cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query 
cl_nv_pragma_unroll
    cl_nv_copy_opts cl_nv_create_buffer
  Platform Extensions function suffix NV
  Platform Name   NVIDIA CUDA
    Number of devices 1
  Device Name GeForce GTX 560M
  Device Vendor   NVIDIA Corporation
  Device Vendor ID0x10de
  Device Version  OpenCL 1.1 CUDA
  Driver Version  390.154
  Device OpenCL C Version OpenCL C 1.1
  Device Type GPU
  Device Topology (NV)PCI-E, 01:00.0
  Device Profile  FULL_PROFILE
  Device AvailableYes
  Compiler Available  Yes
  Max compute units   4
  Max clock frequency 1550MHz
  Compute Capability (NV) 2.1
  Max work item dimensions3
  Max work item sizes 1024x1024x64
  Max work group size 1024
  Preferred work group size multiple  32
  Warp size (NV)  32
  Preferred / native vector sizes
    char 1 / 1
    short1 / 1