Windows Subsytem for Linux - running applications that use openGL - qt

I am able to run a number of GUI applications successfully on windows subsystem for linux (WSL), Ubuntu 14.04.4 LTS, using X-forwarding (via MobaXterm).
I recently tried to run an application that uses OpenGL. Although the GUI opens, there are a number of errors and some aspects of the GUI don't work properly. The errors are:
QT error: 1
QT error: <PyQt5.QtCore.QMessageLogContext object at 0x7f88e21d9ba8>
QT error: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-user'
libGL error: failed to load driver: swrast
I can get rid of the swrast error by setting export LIBGL_ALWAYS_INDIRECT=1 but the other errors remain:
QT error: 1
QT error: <PyQt5.QtCore.QMessageLogContext object at 0x7fed3689e828>
QT error: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-user'
A typical error when attempting to use part of the GUI is:
WARNING: QT error: 1 (Gui.qtMessageHandler:51)
WARNING: QT error: <PyQt5.QtCore.QMessageLogContext object at 0x7f9b35e7b6d8> (Gui.qtMessageHandler:51)
WARNING: QT error: QOpenGLWidget: Failed to make context current (Gui.qtMessageHandler:51)
I can run glxgears, but I realise this only checks a fraction of OpenGLs functions. If I run glmark2 I get the following:
glmark2
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
Error: Glmark2 needs OpenGL(ES) version >= 2.0 to run (but version string is: '1.4 (4.0.0 - Build 10.18.10.4358)')!
Error: main: Could not initialize canvas
If I run find /usr -iname "*libGL.so*" -exec ls -l -- {} + suggested on this link https://askubuntu.com/questions/541343/problems-with-libgl-fbconfigs-swrast-through-each-update I get the following output but I'm not sure if this indicates an error or not?
lrwxrwxrwx 1 root root 14 Jan 12 2016 /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 -> libGL.so.1.2.0
-rw-r--r-- 1 root root 413968 Jan 12 2016 /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0
Running glxinfo seems to indicate the on-chip graphics card is used (there is a separate AMD graphics card but I don't think it's necessary to use that).
glxinfo | grep render
direct rendering: No (LIBGL_ALWAYS_INDIRECT set)
GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer,
OpenGL renderer string: Intel(R) HD Graphics 4000
How can I successfully run OpenGL applications via WSL?

Related

Unable to load image ntoskrnl.exe, Win32 error 0n2

I'm working on a computer with Windows XP. This computer restarts at least a couple of times each day. I downloaded the dump file generated to my personal computer (Windows 10) but I can't find how fix this issue. The Minidump file generated is always samething like:
`Loading Dump File [....Mini072422-02.dmp]
Mini Kernel Dump File: Only registers and stack trace are available
WARNING: Path element is empty
WARNING: Path element is empty
************* Path validation summary **************
Response Time (ms) Location
OK C:\WINDOWS\symbols
OK C:\WINDOWS\symbols\dll
WARNING: Path element is empty
WARNING: Path element is empty
Symbol search path is: C:\WINDOWS\symbols;C:\WINDOWS\symbols\dll;;
Executable search path is:
Unable to load image ntoskrnl.exe, Win32 error 0n2
*** WARNING: Unable to verify timestamp for ntoskrnl.exe
Windows XP Kernel Version 2600 (Service Pack 3) MP (2 procs) Free x86 compatible
Product: WinNt, suite: TerminalServer SingleUserTS
Machine Name:
Kernel base = 0x804d7000 PsLoadedModuleList = 0x8055d720
Debug session time: Sun Jul 24 19:30:39.421 2022 (UTC + 2:00)
System Uptime: 0 days 4:18:26.962
Unable to load image ntoskrnl.exe, Win32 error 0n2
*** WARNING: Unable to verify timestamp for ntoskrnl.exe
Loading Kernel Symbols
...............................................................
................................................................
...
Loading User Symbols
Loading unloaded module list
............
************* Symbol Loading Error Summary **************
Module name Error
ntoskrnl The system cannot find the file specified
You can troubleshoot most symbol related issues by turning on symbol loading diagnostics (!sym
noisy) and repeating the command that caused symbols to be loaded.
You should also verify that your symbol search path (.sympath) is correct.
For analysis of this file, run !analyze -v
Unable to load image iaStor.sys, Win32 error 0n2
*** WARNING: Unable to verify timestamp for iaStor.sys
eax=8a936990 ebx=8a936938 ecx=8a936000 edx=8a936990 esi=00000000 edi=8a9290e8
eip=ba67492a esp=8055127c ebp=80551298 iopl=0 nv up ei pl nz ac po nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00010212
iaStor+0x992a:
ba67492a 8b4628 mov eax,dword ptr [esi+28h] ds:0023:00000028=????????`
Could you give any idea? Thanks in advance.

"getNativeWindowHandle+0x54" on Gluon JavaFX 16 EA 4 via DRM

I was following the steps given at Gluon Documentation to run JavaFX on Raspberry Pi 4 via DRM. I downloaded the JavaFX EA 16 builds from here.
javafx.properties file :
javafx.version=16-internal
javafx.runtime.version=16-internal+28-2020-11-10-180413
javafx.runtime.build=28
After cloning the samples repository containing hellofx, I compiled it via javac (according to the steps) and then ran this command to run it using DRM:
sudo -E java -Dmonocle.platform=EGL -Djava.library.path=/opt/arm32hfb-sdk/lib -Dmonocle.egl.lib=/opt/arm32fb-sdk/lib/libgluon_drm.so --module-path /opt/arm32fb-sdk/lib --add-modules javafx.controls -cp dist/. hellofx.HelloFX
However, this caused the following error :
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x9c3314dc, pid=734, tid=746
#
# JRE version: OpenJDK Runtime Environment (11.0.9+11) (build 11.0.9+11-post-Raspbian-1deb10u1)
# Java VM: OpenJDK Server VM (11.0.9+11-post-Raspbian-1deb10u1, mixed mode, serial gc, linux-)
# Problematic frame:
# C [libgluon_drm.so+0x14dc] getNativeWindowHandle+0x54
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/pi/samples/CommandLine/Modular/CLI/hellofx/hs_err_pid734.log
#
# If you would like to submit a bug report, please visit:
# Unknown
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Aborted
It seems that while loading libgluon_drm.so in JavaFXSDK/lib/ fails at getNativeWindowHandle
What's weird is that after I ran sudo apt install libegl* mesa* libgl*, it actually succeeded but was asking me to set variable ENABLE_GLUON_COMMERCIAL_EXTENSIONS as true, which I had already done.
However, after rebooting, it started showing the same error.
I am using a Raspberry Pi 4 Model B with 2GB RAM. It is running on Raspberry Pi OS 32-Bit with desktop.
I had performed all of this on a clean installation.
Pi4 has both vc4 for render, and v3d for 3D. You can probe the devices for their capabilities - only one should acknowledge that it has DRIVER_RENDER or DRIVER_MODESET capabilities.
Pi4 DRM questions
The card which JavaFX selects by default is /dev/dri/card1. In my case, /dev/dri/card0 was the one to be used for render, and not card1. I solved the issue by using the following runtime argument :
-Degl.displayid=/dev/dri/card0
The JavaFX Version I used was 16-ea+5.

RPM build fails locating libelf.so.dts.1 when using Developer Toolset 7

I am compiling software for Red Hat/CentOS 7 (running on CentOS) using the compiler from Developer Toolset 7, and when I try to create an RPM, rpmbuild fails with the following error:
+ /usr/lib/rpm/find-debuginfo.sh --strict-build-id -m --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 110000000 /home/peter/src/foo/rpmbuild/BUILD/mypackage-5.4.0_10_243_g2564bd2ee3
extracting debug info from /home/peter/rpmbuild/BUILDROOT/mypackage-5.4.0_10_243_g2564bd2ee3-1.x86_64/path/to/my/bin/binary
eu-strip: error while loading shared libraries: libelf.so.dts.1: cannot open shared object file: No such file or directory
I did not see this using Toolset 3, and basically all I did was to change the 3 in my build script to a 7.
EDIT: If I disable extraction of debug information (%define debug_package %{nil}), I do not get the error.

Driver and kernel module install for FPGS fails

I am trying to install OpenCL on a machine with the following specs:
CentOS 6.8
Kernel version 2.6.32-642.el6.x86_64
4G of RAM
FPGA board "Nallatech 395 – with Stratix V D8"
aocl version
aocl 16.0.0.211 (Altera SDK for OpenCL, Version 16.0.0 Build 211, Copyright (C) 2016 Altera Corporation)
However, I receive error [Q 2-3] described in the following page:
http://www.alteraforum.com/forum/showthread.php?t=46355
/#aocl install aocl install: Running install from
/root/altera/16.0/hld/board/nalla_pcie/linux64/libexec Using kernel
source files from /usr/src/kernels/2.6.32-642.el6.x86_64 make: ***
/usr/src/kernels/2.6.32-642.el6.x86_64: No such file or directory.
Stop. cp: cannot stat `./aclpci_drv.ko': No such file or directory
FATAL: Module aclpci_drv not found.
The page above suggests to execute the following command:
yum install kernel-devel
However I still receive the same error.
Please advise!
I found a thread with a similar error, the following solution could work for you. However, this solution is based on version 14.
First navigate to the linux/driver of the BSP folder which for you should be located at root/altera/16.0/hld/board/nalla_pcie/linux64/driver
Find and edit the file aclpci.c: At the top of the file add the following lines:
#define __devinit
#define __devexit
Secondly edit aclpci_cmd.c: On line 83 remove the assignment
Change:
result = pci_restore_state(aclpci->pci_dev);
to:
pci_restore_state(aclpci->pci_dev);
On lines 438-440 comment out the following statements:
if (dev->aer_firmware_first) {
return -EIO;
}
You should now be able to run "aocl install" successfully.

R studio source code build in QT Creator

We have referred the steps provided in the following link to build the r studio source code
click here
We have build the source code using QT Creator, while running the r studio project we got the
Output like below screen shot. How to get the entire output
And also we have face some error while running the projects. Please find the error information below
Project Name: consoleio
Starting C:\rstudio-master\src\qtcreator-build\session\consoleio\consoleio.exe...
Error: Not enough arguments
Usage: consoleio.exe <program> [program-arguments]
C:\rstudio-master\src\qtcreator-build\session\consoleio\consoleio.exe exited with code 1
Project Name :diagnostic
Starting C:\rstudio-master\src\qtcreator-build\diagnostics\diagnostics.exe...
Log file: rdesktop.log
--------------------------------------------------
04 Aug 2014 08:29:43 [rdesktop] ERROR system error 2 (The system cannot find the file specified); OCCURRED AT: virtual void core::http::NamedPipeAsyncClient::connectAndWriteRequest() C:\Users\Administrator\rstudio\src\cpp\core\include/core/http/NamedPipeAsyncClient.hpp:83; LOGGED FROM: void desktop::NetworkReply::onError(const core::Error&) C:\Users\Administrator\rstudio\src\cpp\desktop\DesktopNetworkReply.cpp:279
07 Aug 2014 11:21:10 [rdesktop] ERROR system error 231 (All pipe instances are busy); OCCURRED AT: virtual void core::http::NamedPipeAsyncClient::connectAndWriteRequest() C:\Users\Administrator\rstudio\src\cpp\core\include/core/http/NamedPipeAsyncClient.hpp:83; LOGGED FROM: void desktop::NetworkReply::onError(const core::Error&) C:\Users\Administrator\rstudio\src\cpp\desktop\DesktopNetworkReply.cpp:279
07 Aug 2014 11:21:11 [rdesktop] ERROR system error 231 (All pipe instances are busy); OCCURRED AT: virtual void core::http::NamedPipeAsyncClient::connectAndWriteRequest() C:\Users\Administrator\rstudio\src\cpp\core\include/core/http/NamedPipeAsyncClient.hpp:83; LOGGED FROM: void desktop::NetworkReply::onError(const core::Error&) C:\Users\Administrator\rstudio\src\cpp\desktop\DesktopNetworkReply.cpp:279…………..
ProjectName: rsession
ProjectName :urlopener
Starting C:\rstudio-master\src\qtcreator-build\desktop\urlopener\urlopener.exe...
SHIMVIEW: ShimInfo(Complete)
Error: Not enough arguments
C:\rstudio-master\src\qtcreator-build\desktop\urlopener\urlopener.exe exited with code 1
How to resolve this error and debug the r studio source in QT creator
It looks like you're trying to run against the 64 bit version of R. Here's how to switch to 32 bit:
Open a new command prompt in your qtcreator-build directory
Run desktop\rstudio.exe
Immediately after pressing Enter, hold down Ctrl (or just use Ctrl+Enter to run the command), and keep it held down while RStudio launches
When the "Choose R Version" dialog pops up, select a 32 bit version of R.
See this page for more details (scroll to the bottom for Windows-specific build help).

Resources