Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
After installing Nvidia drivers 340xxx on CentOS, Videos are not playing in vlc and smplayer. It plays on Totem Movie Player though.
Code:
$ vlc sample.mkv
VLC media player 3.0.10 Vetinari (revision 3.0.10-0-g7f145afa84)
[000055ae7a2d4770] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[00007f0e30c12e50] main decoder error: Codec `h264' (H264 - MPEG-4 AVC (part 10)) is not supported.
[000055ae7a364240] main audio output error: too low audio sample frequency (0)
[00007f0e30c12e50] main decoder error: failed to create audio output
[00007f0e30c12e50] main decoder error: Codec `a52 ' (A52 Audio (aka AC3)) is not supported.
Also
Code:
$ ffplay sample.mkv
ffplay: /lib64/libOpenCL.so.1: no version information available (required by /lib64/libavfilter.so.7)
ffplay: /lib64/libOpenCL.so.1: no version information available (required by /lib64/libavfilter.so.7)
ffplay: /lib64/libOpenCL.so.1: no version information available (required by /lib64/libavutil.so.56)
ffplay: /lib64/libOpenCL.so.1: no version information available (required by /lib64/libavutil.so.56)
ffplay: symbol lookup error: /lib64/libavutil.so.56: undefined symbol: clGetExtensionFunctionAddressForPlatform, version OPENCL_1.2
On CentOS, /lib64/libOpenCL.so.1 is provided by package ocl-icd. Could it be that NVidia driver installs its own version of it somewhere else? E.g. this is what I get on CentOS 8:
On CentOS, /lib64/libOpenCL.so.1 is provided by package ocl-icd. Could it be that NVidia driver installs its own version of it somewhere else? E.g. this is what I get on CentOS 8:
# dnf -q repoquery -f \*/libOpenCL.so.1
ocl-icd-0:2.2.12-1.el8.i686
ocl-icd-0:2.2.12-1.el8.x86_64
xorg-x11-drv-nvidia-340xx-libs-1:340.108-2.el8.i686
xorg-x11-drv-nvidia-340xx-libs-1:340.108-2.el8.x86_64
# dnf -q repoquery -l ocl-icd.x86_64|grep /libOpenCL
/usr/lib64/libOpenCL.so.1
/usr/lib64/libOpenCL.so.1.0.0
# dnf -q repoquery -l xorg-x11-drv-nvidia-340xx-libs.x86_64|grep /libOpenCL
/usr/lib64/nvidia-340xx/libOpenCL.so.1
/usr/lib64/nvidia-340xx/libOpenCL.so.1.0.0
$ LD_PRELOAD=/usr/lib64/nvidia-340xx/libOpenCL.so.1 ffplay sample.mkv
ERROR: ld.so: object '/usr/lib64/nvidia-340xx/libOpenCL.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ffplay: /lib64/libOpenCL.so.1: no version information available (required by /lib64/libavfilter.so.7)
ffplay: /lib64/libOpenCL.so.1: no version information available (required by /lib64/libavfilter.so.7)
ffplay: /lib64/libOpenCL.so.1: no version information available (required by /lib64/libavutil.so.56)
ffplay: /lib64/libOpenCL.so.1: no version information available (required by /lib64/libavutil.so.56)
ffplay: symbol lookup error: /lib64/libavutil.so.56: undefined symbol: clGetExtensionFunctionAddressForPlatform, version OPENCL_1.2
Before installing Nvidia drivers, all working fine.
Sorry, wrong file name, should have been libOpenCL.so.1.0.0. Fixed in my post above.
Nope.
Code:
$ LD_PRELOAD=/usr/lib64/nvidia-340xx/libOpenCL.so.1.0.0 ffplay sample.mkv
ERROR: ld.so: object '/usr/lib64/nvidia-340xx/libOpenCL.so.1.0.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ffplay: /lib64/libOpenCL.so.1: no version information available (required by /lib64/libavfilter.so.7)
ffplay: /lib64/libOpenCL.so.1: no version information available (required by /lib64/libavfilter.so.7)
ffplay: /lib64/libOpenCL.so.1: no version information available (required by /lib64/libavutil.so.56)
ffplay: /lib64/libOpenCL.so.1: no version information available (required by /lib64/libavutil.so.56)
ffplay: symbol lookup error: /lib64/libavutil.so.56: undefined symbol: clGetExtensionFunctionAddressForPlatform, version OPENCL_1.2
Also, there's a tool, clinfo, that shows properties of OpenCL. Either build it yourself, or download and install the package I prepared. You'll also need to install xorg-x11-drv-nvidia-340xx-cuda. Then show the output of clinfo -l and, if it fails,
Code:
find /etc/OpenCL/vendors/ -name \*.icd |
while read clpath
do clinfo -l >/dev/null; echo "$? $clpath"
done
In the meanwhile I’ve solved (just a nightmare workaround) removing some applications like ffmpeg, openshot, vlc and their related libs from my fc28 system and reinstalling the same applications and libs downloaded from fc27 repos. All is working good now but we hope next 340 driver will give opencl 1.2 support, like nouveau driver do.
I guess instead of removing they could be rebuilt from their .src.rpm against appropriate libOpenCL.
I have installed nvidia driver from the official website with file 'NVIDIA-Linux-x86_64-340.108.run'. I'll now try installing from rpmfusion and see what happens.
I installed clinfo.rpm you have posted. following is the output.
Code:
$ clinfo -l
clinfo: /lib64/libOpenCL.so.1: no version information available (required by clinfo)
Platform #0: NVIDIA CUDA
`-- Device #0: GeForce 9500 GT
$ clinfo
clinfo: /lib64/libOpenCL.so.1: no version information available (required by clinfo)
Number of platforms 1
Platform Name NVIDIA CUDA
Platform Vendor NVIDIA Corporation
Platform Version OpenCL 1.1 CUDA 6.5.51
Platform Profile FULL_PROFILE
Platform Extensions 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
Platform Extensions function suffix NV
Platform Name NVIDIA CUDA
Number of devices 1
Device Name GeForce 9500 GT
Device Vendor NVIDIA Corporation
Device Vendor ID 0x10de
Device Version OpenCL 1.0 CUDA
Driver Version 340.108
Device OpenCL C Version OpenCL C 1.0
Device Type GPU
Device Topology (NV) PCI-E, 01:00.0
Device Profile FULL_PROFILE
Device Available Yes
Compiler Available Yes
Max compute units 4
Max clock frequency 1400MHz
Compute Capability (NV) 1.1
Max work item dimensions 3
Max work item sizes 512x512x64
Max work group size 512
Preferred work group size multiple 32
Warp size (NV) 32
Preferred / native vector sizes
char 1 / 1
short 1 / 1
int 1 / 1
long 1 / 1
half 0 / 0 (n/a)
float 1 / 1
double 0 / 0 (n/a)
Half-precision Floating-point support (n/a)
Single-precision Floating-point support (core)
Denormals No
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 (n/a)
Address bits 32, Little-Endian
Global memory size 1073414144 (1024MiB)
Error Correction support No
Max memory allocation 268353536 (255.9MiB)
Unified memory for Host and Device No
Integrated memory (NV) No
Minimum alignment for any data type 128 bytes
Alignment of base address 2048 bits (256 bytes)
Global Memory cache type None
Image support Yes
Max number of samplers per kernel 16
Max 2D image size 4096x16383 pixels
Max 3D image size 2048x2048x2048 pixels
Max number of read image args 128
Max number of write image args 8
Local memory type Local
Local memory size 16384 (16KiB)
Registers per block (NV) 8192
Max number of constant args 9
Max constant buffer size 65536 (64KiB)
Max size of kernel argument 4352 (4.25KiB)
Queue properties
Out-of-order execution Yes
Profiling Yes
Profiling timer resolution 1000ns
Execution capabilities
Run OpenCL kernels Yes
Run native kernels No
Kernel execution timeout (NV) Yes
Concurrent copy and kernel execution (NV) Yes
Number of async copy engines 1
Device Extensions 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_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics
NULL platform behavior
clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...) No platform
clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...) No platform
clCreateContext(NULL, ...) [default] No platform
clCreateContext(NULL, ...) [other] Success [NV]
clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT) No platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU) No platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) No platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR) No platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM) No platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL) No platform
Unfortunately the same results. Reinstalled CentOS 8.1, installed Nvidia drivers from rpmfusion with no luck. Dont know what to do. I need Nvidia drivers to run SlowmoVideo in V3D flowbuilder rendering.
work now though? I was of impression you had RPM Fusion package, so didn't check if the path was right.
Code:
$ LD_PRELOAD=/usr/lib64/nvidia-340xx/libOpenCL.so.1 ffplay sample.mkv
ffplay: /usr/lib64/nvidia-340xx/libOpenCL.so.1: no version information available (required by /lib64/libavfilter.so.7)
ffplay: /usr/lib64/nvidia-340xx/libOpenCL.so.1: no version information available (required by /lib64/libavfilter.so.7)
ffplay: /usr/lib64/nvidia-340xx/libOpenCL.so.1: no version information available (required by /lib64/libavutil.so.56)
ffplay: /usr/lib64/nvidia-340xx/libOpenCL.so.1: no version information available (required by /lib64/libavutil.so.56)
ffplay: relocation error: /lib64/libavutil.so.56: symbol clGetExtensionFunctionAddressForPlatform version OPENCL_1.2 not defined in file libOpenCL.so.1 with link time reference
Tried for 2 straight days to make Nvidia work on CentOS 8.1. Tried all types - driver from Nvidia website, akmod-nvidia, and kmod-nvidia with flop results. What a waste of time. Fed up with Nvidia drivers. Nvidia can go to hell.
Now, after going through tons of websites, I came up with this - hardware acceleration through nouveau.
Code:
$ sudo dnf install mesa-dri-drivers mesa-vdpau-drivers vdpauinfo
$ sudo cat /etc/environment
VDPAU_DRIVER=nouveau
$ sudo ln -s /usr/lib64/vdpau /usr/lib/vdpau
$ reboot
$ glxinfo | grep -iE 'direct|opengl'
direct rendering: Yes
OpenGL vendor string: nouveau
OpenGL renderer string: NV96
OpenGL core profile version string: 3.3 (Core Profile) Mesa 19.3.4
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
GL_ARB_derivative_control, GL_ARB_direct_state_access,
OpenGL version string: 3.3 (Compatibility Profile) Mesa 19.3.4
OpenGL shading language version string: 3.30
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
GL_ARB_direct_state_access, GL_ARB_draw_buffers,
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 19.3.4
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
OpenGL ES profile extensions:
$ vdpauinfo
display: :0 screen: 0
API version: 1
Information string: G3DVL VDPAU Driver Shared Library version 1.0
Video surface:
name width height types
-------------------------------------------
420 8192 8192 NV12 YV12
422 8192 8192 UYVY YUYV
444 8192 8192 Y8U8V8A8 V8U8Y8A8
Decoder capabilities:
name level macbs width height
----------------------------------------------------
MPEG1 --- not supported ---
MPEG2_SIMPLE --- not supported ---
MPEG2_MAIN --- not supported ---
H264_BASELINE --- not supported ---
H264_MAIN --- not supported ---
H264_HIGH --- not supported ---
VC1_SIMPLE --- not supported ---
VC1_MAIN --- not supported ---
VC1_ADVANCED --- not supported ---
MPEG4_PART2_SP --- not supported ---
MPEG4_PART2_ASP --- not supported ---
DIVX4_QMOBILE --- not supported ---
DIVX4_MOBILE --- not supported ---
DIVX4_HOME_THEATER --- not supported ---
DIVX4_HD_1080P --- not supported ---
DIVX5_QMOBILE --- not supported ---
DIVX5_MOBILE --- not supported ---
DIVX5_HOME_THEATER --- not supported ---
DIVX5_HD_1080P --- not supported ---
H264_CONSTRAINED_BASELINE --- not supported ---
H264_EXTENDED --- not supported ---
H264_PROGRESSIVE_HIGH --- not supported ---
H264_CONSTRAINED_HIGH --- not supported ---
H264_HIGH_444_PREDICTIVE --- not supported ---
HEVC_MAIN --- not supported ---
HEVC_MAIN_10 --- not supported ---
HEVC_MAIN_STILL --- not supported ---
HEVC_MAIN_12 --- not supported ---
HEVC_MAIN_444 --- not supported ---
Output surface:
name width height nat types
----------------------------------------------------
B8G8R8A8 8192 8192 y NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 A4I4 I4A4 A8I8 I8A8
R8G8B8A8 8192 8192 y NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 A4I4 I4A4 A8I8 I8A8
R10G10B10A2 8192 8192 y NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 A4I4 I4A4 A8I8 I8A8
B10G10R10A2 8192 8192 y NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 A4I4 I4A4 A8I8 I8A8
Bitmap surface:
name width height
------------------------------
B8G8R8A8 8192 8192
R8G8B8A8 8192 8192
R10G10B10A2 8192 8192
B10G10R10A2 8192 8192
A8 8192 8192
Video mixer:
feature name sup
------------------------------------
DEINTERLACE_TEMPORAL y
DEINTERLACE_TEMPORAL_SPATIAL -
INVERSE_TELECINE -
NOISE_REDUCTION y
SHARPNESS y
LUMA_KEY y
HIGH QUALITY SCALING - L1 y
HIGH QUALITY SCALING - L2 -
HIGH QUALITY SCALING - L3 -
HIGH QUALITY SCALING - L4 -
HIGH QUALITY SCALING - L5 -
HIGH QUALITY SCALING - L6 -
HIGH QUALITY SCALING - L7 -
HIGH QUALITY SCALING - L8 -
HIGH QUALITY SCALING - L9 -
parameter name sup min max
-----------------------------------------------------
VIDEO_SURFACE_WIDTH y 48 2048
VIDEO_SURFACE_HEIGHT y 48 2048
CHROMA_TYPE y
LAYERS y 0 4
attribute name sup min max
-----------------------------------------------------
BACKGROUND_COLOR y
CSC_MATRIX y
NOISE_REDUCTION_LEVEL y 0.00 1.00
SHARPNESS_LEVEL y -1.00 1.00
LUMA_KEY_MIN_LUMA y
LUMA_KEY_MAX_LUMA y
Good news is video is rendering with hardware acceleration, bad news is it takes at least 4-10 times more time to render. A typical 10-second video in slowmovideo with nvidia driver would take 20+ minutes, whereas with nouveau driver rendering it takes 2+ hours to do the same.
# User specific aliases and functions
alias ffmpeg='LD_PRELOAD=/usr/lib64/libOpenCL.so.1 ffmpeg'
alias youtube-dl='LD_PRELOAD=/usr/lib64/libOpenCL.so.1 youtube-dl'
alias mpv='LD_PRELOAD=/usr/lib64/libOpenCL.so.1 mpv'
alias vlc='LD_PRELOAD=/usr/lib64/libOpenCL.so.1 vlc'
But to use in vlc.desktop, I'm not sure.
Also it gives a warning that I don't know if matters or not:
Code:
$ LD_PRELOAD=/usr/lib64/libOpenCL.so.1 vlc video.mp4
VLC media player 3.0.11.1 Vetinari (revision )
[0000561a11695130] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[00007f587c001fd0] egl_x11 gl error: cannot select OpenGL API
[00007f58454f1620] avcodec decoder: Using NVIDIA VDPAU Driver Shared Library 340.108 Wed Dec 11 14:31:24 PST 2019 for hardware decoding
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.