WebGl 2 is not defined in Google Chrome despite hardware acceleration enabled - google-chrome

I'm trying to use WebGL 2 on a website but I can seem to get it to work on my PC. Says it's not available. I can't figure out if it's the graphics driver or OpenGL's version, but here's some info. Any help will be highly appreciated.
Here is my hardware.
Chrome version: Version 108.0.5359.98 (Official Build) (64-bit)
lsb_release -a outputs:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Linux Lite 5.6
Release: 20.04
Codename: focal
lspci | grep VGA outputs:
00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)
glxinfo | grep 'version' outputs:
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
Max core profile version: 0.0
Max compat profile version: 2.1
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 2.0
OpenGL version string: 2.1 Mesa 21.0.3
OpenGL shading language version string: 1.20
OpenGL ES profile version string: OpenGL ES 2.0 Mesa 21.0.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16
And here are the settings for chrome.
chrome://gpu/:
chrome://flags/:
chrome://settings/system:
Report from WebGL Report

The answer can be found in your printout fragment Max GLES[23] profile version: 2.0, which is confirmed by this tech sheet. So your maximum supported Open GLES version is 2.0 which equals to WebGL (version 1). You would need a graphics controller which supports Open GLES 3.0 as that corresponds to WebGL2.
So, in short -- everything's fine with Chrome, but your hardware resp. its driver doesn't support Open GLES 3 and therefore not WebGL2.

Related

Unable to get Decoding Capabilities by cuvidGetDecoderCaps CUDA SDK

I have a server with Tesla T4 GPU. I am trying to decode an H264 video on GPU. I am using Cuda SDK to get CUVIDDECODECAPS (decoding capabilities of GPU) but it is returning 0 to MinWidth, MinHeight, MaxWidth, MaxHeight, and false to "bIsSupported". ie. This hardware doesn't support decoding on GPU. But according to this link T4 does support video decoding.
Below is the code snippet.
CUVIDDECODECAPS decodeCaps = {};
decodeCaps.eCodecType = _codec;
decodeCaps.eChromaFormat = _chromaFormat;
decodeCaps.nBitDepthMinus8 = videoFormat.nBitDepthMinus8;
cuSafeCall(cuCtxPushCurrent(ctx_));
cuSafeCall(cuvidGetDecoderCaps(&decodeCaps));
cuSafeCall(cuCtxPopCurrent(NULL));
Below is driver and cuda version
NVIDIA-SMI 440.118.02 Driver Version: 440.118.02 CUDA Version: 10.2 Nvidia Video codec SDK is 11.0.10
Does anyone have any idea what's wrong I am doing here?
Each Nvidia Video SDK has minimal requirements for CUDA SDK and graphics driver version. If you open the SDK web page you will find this info:
NVIDIA Windows display driver 456.71 or newer
NVIDIA Linux display driver 455.28 or newer
DirectX SDK (Windows only) CUDA 11.0 Toolkit
At least on Linux, the related NVENC and NVDEC libraries are part of the driver distribution so the latest SDK headers cannot work with the old libs ( according to your driver version). You can download the older version of the Video SDK if you must use that specific driver.

No "sqlread" in Matlab 2019a Database Toolbox?

Our shop just upgraded to Matlab 2019a, and I'm bumbling around the import of MySQL/MariaDB data (*.frm files). I found myself to the sqlread tutorial. I have yet to fully plumb the machinations behind the database command to set up a connection, but in messing around, I seem to have discovered that I don't have an sqlread function. This is odd, as I have the Database Toolbox:
>> ver
-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.6.0.1072779 (R2019a)
MATLAB License Number: ______
Operating System: Microsoft Windows 7 Enterprise Version 6.1 (Build 7601: Service Pack 1)
Java Version: Java 1.8.0_181-b13 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB Version 9.6 (R2019a)
Database Toolbox Version 9.1 (R2019a)
<...snip...>
>> help sqlread
--- sqlread not found. Showing help for stlread instead. ---
<...snip...>
>> which database
C:\Program Files\MATLAB\R2019a\toolbox\database\database\database.m
>> which sqlread
'sqlread' not found.
Why would this not be available?
TMW investigated and reported that sqlread becomes available after setting up a data source.
Unfortunately, the next road block that I'm confronting is setting up the data source.
My question about a simpler alternative to import MySQL data into Matlab still stands.
Thanks.

GlassFish 5.0 exception and port 4848 not responding

Yesterday i downloaded GlassFish 5.0 and JDK9. When I'm trying to run server with asadmin start-domain GlassFish send to me exception
When I try to use "asadmin start-domainAfter" I got respond: "Remote server does not listen request on [localhost 4848]. Is the serwer up?"
Any can help me with this? I looked for solution at google, I tried kill process using port 4848, change port 4848 in domain.xml on another one, nothing helps.
It's my firts time with glassfish I don't know what to do. Anyone can help me?
I'm working at windows 7, InteliJ Ultimate 2017.2.4, JRE 1.8 and JDK 9.
GlassFish 5.0 not starting on JDK 9 is a known issue.
GlassFish 5.0 is certified only on JDK 8 (u144) as stated in the release notes:
https://javaee.github.io/glassfish/doc/5.0/release-notes.pdf
I use Windows 10 and I have installed JDK and JRE for version 9 and 8u141, 8u151, 8u144 (installed for test about this problem)
For exception I had had the same problem : the command "asadmin start-version" throw an exception.
Just check the version from CMD console :
C:\Users\xxxxx>**java -version**
java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
Problem JAVA_HOME and PATH environment viariables are JDK8u151 ???
To solve the problem, the documentation advice that :
Alternatively, you can specifically set the Java path with the AS_JAVA property in the in the as-install/config/asenv.conf file.
C:\DEVENV\glassfish5\glassfish\config>dir
Le volume dans le lecteur C s’appelle OS
Le numéro de série du volume est 10BF-2BBE
Répertoire de C:\DEVENV\glassfish5\glassfish\config
08/09/2017 07:27 <DIR> .
08/09/2017 07:27 <DIR> ..
12/01/2018 17:44 3 516 asenv.bat
...
Consequently, I add the last line below :
set AS_IMQ_LIB=..\..\mq\lib
set AS_IMQ_BIN=..\..\mq\bin
set AS_CONFIG=..\config
set AS_INSTALL=..
set AS_DEF_DOMAINS_PATH=..\domains
set AS_DEF_NODES_PATH=..\nodes
set AS_DERBY_INSTALL=..\..\javadb
**set AS_JAVA=C:\Program Files\Java\jdk1.8.0_151**
Relaunch CMD console and start server with asadmin start-domain : it works properly....enjoy.
As mentioned above GlassFish 5.0 leverages new features in Java SE 8,
and is certified today on Java SE 8. Even though we have a lot of work
in front of us with the transition to the Eclipse Foundation, our
current intent is to certify Java SE 9 in an upcoming GlassFish 5
release.
JDK 9 should be supported in the next update, i.e. GlassFish 5.0.1
See end of https://blogs.oracle.com/theaquarium/java-ee-8-is-final-and-glassfish-50-is-released
If you are on a mac or linux machine, add the following to config/asenv.conf in your glassfish installation directory.
set AS_JAVA="path to your jdk 8"
For example, in Mac OS it will be
AS_JAVA="/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home"
Anyone having problems with NullPointerException, look out for your system PATH Variables. Be sure that they point to an acceptable JDK (As it was said before: GlassFish 5.0 is certified only to work on JDK 8u144). This NullPointerException is caused by using an incompartible JDK as mentioned here: https://docs.oracle.com/cd/E19226-01/820-7688/gipqi/index.html
In my case the PATH variable was correctly pointing to java8u144 bin, but my PATH also contained a pointer to C:\ProgramData\Oracle\Java\javapath. And someway an old version of java SDK was stored on \ProgramData\Oracle so GlassFish was using this old version of java as SDK.

how to force chrome to use mesa software driver for webgl

I want to force chrome to render WebGL using software drivers, not hardware.
I'm using Ubuntu Linux and I understand that the Mesa GL drivers can be forced to use a software implementation by specifying the environment variable, LIBGL_ALWAYS_SOFTWARE=1, when launching a program. I confirmed that the driver changes when specifying the env var.
bash$ glxinfo | grep -i "opengl"
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) 945GM x86/MMX/SSE2
OpenGL version string: 1.4 Mesa 10.1.3
OpenGL extensions:
bash$ LIBGL_ALWAYS_SOFTWARE=1 glxinfo | grep -i "opengl"
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.4, 128 bits)
OpenGL version string: 2.1 Mesa 10.1.3
OpenGL shading language version string: 1.30
OpenGL extensions:
The default GL driver provides OpenGL 1.4 support, and the software driver provides OpenGL 2.1 support.
I tracked down where the desktop launcher exists (/usr/share/applications/) and edited it to specify the env var, but chrome://gpu still shows GL version 1.4. The Chrome GPU info contains a promising value:
Command Line Args --flag-switches-begin --disable-accelerated-2d-canvas --ignore-gpu-blacklist --flag-switches-end
I wonder if I can customize the --flag-switches-begin.
I also found the '--use-gl' command line switch, but I'm not sure how to leverage it to force the driver into software mode.
As a side note, I have already enabled 'Override software rendering list' in chrome://flags/, which did remove my model from the 'blacklist' making it possible to use WebGL, but the OpenGL feature set is still quite limited.
I have an old laptop with a terrible 'gpu' that I would like to use to develop some shaders and test in WebGL, no matter the performance.
Is it possible to tell Chrome to use the software drivers?
I don't have a linux box so I can't check but you can specify a prefix chrome will use for launching the GPU process with
--gpu-launcher=<prefix>
It's normally used for debugging for example
--gpu-launcher="xterm -e gdb --args"
When chrome launches a process it calls spawn. Normally it just launches
path/to/chrome <various flags>
--gpu-launcher lets you add a prefix to that. So for example
--gpu-launcher=/usr/local/yourname/launch.sh
would make it spawn
/usr/local/yourname/launch.sh path/to/chrome <various flags>
You can now make /usr/local/yourname/launch.sh do whatever you want and finally launch chrome. The simplest would be something like
#!/bin/sh
"$#"
In your case I'd guess you'd want
#!/bin/sh
export LIBGL_ALWAYS_SOFTWARE=1
"$#"
Be sure to mark launch.sh as executable.
given the script above this worked for me
/opt/google/chrome/chrome --ignore-gpu-blacklist --gpu-launcher=/usr/local/gman/launch.sh
after which about:gpu gives me
GL_VENDOR VMware, Inc.
GL_RENDERER Gallium 0.4 on llvmpipe (LLVM 0x301)
GL_VERSION 2.1 Mesa 9.0.3

CUDA Runtime API error 38: no CUDA-capable device is detected

The Situation
I have a 2 gpu server (Ubuntu 12.04) where I switched a Tesla C1060 with a GTX 670. Than I installed CUDA 5.0 over the 4.2. Afterwards I compiled all examples execpt for simpleMPI without error. But when I run ./devicequery I get following error message:
foo#bar-serv2:~/NVIDIA_CUDA-5.0_Samples/bin/linux/release$ ./deviceQuery
./deviceQuery Starting...
CUDA Device Query (Runtime API) version (CUDART static linking)
cudaGetDeviceCount returned 38
-> no CUDA-capable device is detected
What I have tried
To solve this I tried all of the thinks recommended by CUDA-capable device, but to no avail:
/dev/nvidia* is there and the permissions are 666 (crw-rw-rw-) and owner root:root
foo#bar-serv2:/dev$ ls -l nvidia*
crw-rw-rw- 1 root root 195, 0 Oct 24 18:51 nvidia0
crw-rw-rw- 1 root root 195, 1 Oct 24 18:51 nvidia1
crw-rw-rw- 1 root root 195, 255 Oct 24 18:50 nvidiactl
I tried executing the code with sudo
CUDA 5.0 installs driver and libraries at the same time
PS here is lspci | grep -i nvidia:
foo#bar-serv2:/dev$ lspci | grep -i nvidia
03:00.0 VGA compatible controller: NVIDIA Corporation GK104 [GeForce GTX 670] (rev a1)
03:00.1 Audio device: NVIDIA Corporation GK104 HDMI Audio Controller (rev a1)
04:00.0 VGA compatible controller: NVIDIA Corporation G94 [Quadro FX 1800] (rev a1)
[update]
foo#bar-serv2:~/NVIDIA_CUDA-5.0_Samples/bin/linux/release$ nvidia-smi -a
NVIDIA: API mismatch: the NVIDIA kernel module has version 295.59,
but this NVIDIA driver component has version 304.54. Please make
sure that the kernel module and all NVIDIA driver components
have the same version.
Failed to initialize NVML: Unknown Error
How could that be, if I use the CUDA 5.0 installer to install driver and libs at the same time. Could the old 4.2 version, that is still lying around mess things up?
I came across this issue, and running
nvidia-smi
informed me of an API mismatch. The problem was that my Linux distro had installed updates that required a system restart, so restarting resolved the issue.
See this stack overflow question Installing cuda 5 samples in Ubuntu 12.10.
Ubuntu 12 is not a supported Linux distro (yet). For reference see CUDA 5.0 Toolkit Release Notes And Errata
** Distributions Currently Supported
Distribution 32 64 Kernel GCC GLIBC
----------------- -- -- --------------------- ---------- -------------
Fedora 16 X X 3.1.0-7.fc16 4.6.2 2.14.90
ICC Compiler 12.1 X
OpenSUSE 12.1 X 3.1.0-1.2-desktop 4.6.2 2.14.1
Red Hat RHEL 6.x X 2.6.32-131.0.15.el6 4.4.5 2.12
Red Hat RHEL 5.5+ X 2.6.18-238.el5 4.1.2 2.5
SUSE SLES 11 SP2 X 3.0.13-0.27-pae 4.3.4 2.11.3
SUSE SLES 11.1 X X 2.6.32.12-0.7-pae 4.3.4 2.11.1
Ubuntu 11.10 X X 3.0.0-19-generic-pae 4.6.1 2.13
Ubuntu 10.04 X X 2.6.35-23-generic 4.4.5 2.12.1
If you want to do it run on Ubuntu 12 anyway then see answer of rpardo. It looks like this distro instead of installing 64 bit libraries to /usr/lib64 installs them to /usr/lib/x86_64-linux-gnu/
I'd suggest searching for all instances of libcuda.so and libnvidia-ml.so on the system. Since the driver doesn't support this distro it might have installed libraries to a path that is not pointed by LD_LIBRARY_PATH. Then move the libraries around and/or change the LD_LIBRARY_PATH to point to this location (it should be the first path on the left). Then retry nvidia-smi or deviceQuery
Good luck
I got error 38 for cudaGetDeviceCount on a windows machine with GTX980 GPU.
After I downloaded the latest driver for GTX 980 fro the NVIDIA site, installed it and restarted, everything is fine. Looks like the CUDA installer is not installing the latest driver.
Try running the sample using sudo (or, you might do a 'sudo su', set LD_LIBRARY_PATH to the path of cuda libraries and run the sample while being root). Apparently, since you've probably installed CUDA 5.0 using sudo, the samples doesn't run with normal user. However, if you run a sample with root, then you'll be able to run samples with the regular user too! I've not yet restarted the system to see if samples work with normal user even after reboot, or each time you should run at least one CUDA application with root.
The problem might completely disappear if you install CUDA TookKit without using sudo.
I had very similar problem on Debian and it turns out that loaded nvidia module had different version than libcuda1.
To check for installed nvidia module you should do:
$ sudo modinfo nvidia-current | grep version
version: 319.82
If it doesn't match version of libcuda1 this the root of your problems.