My QGroundControl window shows nothing but darkness in WSL2 - wsl-2

My QGroundControl window shows nothing but darkness in WSL2. When I launched it, I got the following messages and in the application nothing was shown but darkness.
john#DESKTOP-0P475SS:~$ ./QGroundControl.AppImage
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-john'
Settings location "/home/john/.config/QGroundControl.org/QGroundControl.ini" Is writable?: true
Filter rules "*Log.debug=false\nGStreamerAPILog.debug=true\nqt.qml.connections=false"
System reported locale: QLocale(C, Default, Default) ; Name "C" ; Preferred (used in maps): "C"
LocalizationLog: Qt lib localization for "C" is not present
LocalizationLog: Error loading source localization for "C"
LocalizationLog: Error loading json localization for "C"
Error loading text-to-speech plug-in "speechd"
VideoReceiverLog: Stop called on empty URI
VideoReceiverLog: Stop called on empty URI
MAVLinkLogManagerLog: MAVLink logs directory: "/home/john/Documents/QGroundControl/Logs"
Map Cache in: "/home/john/.cache/QGCMapCache300" / "qgcMapCache.db"
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
QGLXContext: Failed to create dummy context
qml: QGCCorePlugin(0x55bb9aaca360) [1,2]
setCurrentPlanViewSeqNum
setCurrentPlanViewSeqNum
_recalcFlightPathSegments homePositionValid false
_recalcFlightPathSegments homePositionValid false
"v4.2.0"
Do you guys have the same problem and know how to solve it? Thanks!

Related

Using Intel QSV in WSL2

I want to use Intel QSV in WSL2.
Based on the experience of using QSV on a native Ubuntu PC, I installed the same library, but it doesn't work.
ex) ffmpeg, libva, vainfo, intel Media SDK, gmmlib, media-driver ...
My CPU supports QSV, but I can't initialize it.
In vainfo it works like this:
$ ls /dev/dri
card0 renderD128
$ sudo vainfo
Trying display: wayland
error: XDG_RUNTIME_DIR not set in the environment.
Trying display: x11
libva info: VA-API version 1.16.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_14
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
libva error: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so init failed
libva info: va_openDriver() returns 18
vaInitialize failed with error code 18 (invalid parameter),exit
I want WSL to be initialized properly so I can use it in C.
Try changing the libva driver to i965 if it solves the error, Your error logs shows the call to i965 driver instead of iHD.
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
export LIBVA_DRIVER_NAME="i965"
export LIBVA_DRIVER_PATH="/usr/lib/x86_64-linux-gnu/dri"
Please make sure that the shared object files already exists in this path.
for more information you can visit. https://github.com/intel/media-driver/issues/195

puppet: Not authorized to call find

I'm running puppet 2.7.26 because that's what the redhat package provides.
I'm trying to serve files that are NOT stored within any puppet modules. The files are maintained in another location on the puppet server, and that is where I need to serve them from.
I have this in my /etc/puppet/fileserver.conf
[files]
path /var/www/cobbler/pub
allow *
And then I have a class file like this:
class etchostfile
(
$hostfile /* declare that this class has one parameter */
)
{
File
{
owner => 'root',
group => 'root',
mode => '0644',
}
file { $hostfile :
ensure => file,
source => "puppet:///files/hosts-${hostfile}.txt",
path => '/root/hosts',
}
}
But when my node calls
class { 'etchostfile' :
hostfile => foo,
}
I get this error
err: /Stage[main]/Etchostfile/File[foo]: Could not evaluate: Error 400
on SERVER: Not authorized to call find on
/file_metadata/files/hosts-foo.txt with {:links=>"manage"} Could not
retrieve file metadata for puppet:///files/hosts-foo.txt: Error 400 on
SERVER: Not authorized to call find on
/file_metadata/files/hosts-foo.txt with {:links=>"manage"} at
/etc/puppet/modules/etchostfile/manifests/init.pp:27
This post
https://viewsby.wordpress.com/2013/04/05/puppet-error-400-on-server-not-authorized-to-call-find/
indicates that this is all I need to do. But I must be missing something.
UPDATE
When I run the master in debug mode, I get no error.
The master responds thusly:
info: access[^/catalog/([^/]+)$]: allowing 'method' find
info: access[^/catalog/([^/]+)$]: allowing $1 access
info: access[^/node/([^/]+)$]: allowing 'method' find
info: access[^/node/([^/]+)$]: allowing $1 access
info: access[/certificate_revocation_list/ca]: allowing 'method' find
info: access[/certificate_revocation_list/ca]: allowing * access
info: access[^/report/([^/]+)$]: allowing 'method' save
info: access[^/report/([^/]+)$]: allowing $1 access
info: access[/file]: allowing * access
info: access[/certificate/ca]: adding authentication any
info: access[/certificate/ca]: allowing 'method' find
info: access[/certificate/ca]: allowing * access
info: access[/certificate/]: adding authentication any
info: access[/certificate/]: allowing 'method' find
info: access[/certificate/]: allowing * access
info: access[/certificate_request]: adding authentication any
info: access[/certificate_request]: allowing 'method' find
info: access[/certificate_request]: allowing 'method' save
info: access[/certificate_request]: allowing * access
info: access[/]: adding authentication any
info: Inserting default '/status' (auth true) ACL because none were found in '/etc/puppet/auth.conf'
info: Expiring the node cache of agent.redacted.com
info: Not using expired node for agent.redacted.com from cache; expired at Thu Aug 13 14:18:48 +0000 2015
info: Caching node for agent.redacted.com
debug: importing '/etc/puppet/modules/etchostfile/manifests/init.pp' in environment production
debug: Automatically imported etchostfile from etchostfile into production
debug: File[foo]: Adding default for selrange
debug: File[foo]: Adding default for group
debug: File[foo]: Adding default for seluser
debug: File[foo]: Adding default for selrole
debug: File[foo]: Adding default for owner
debug: File[foo]: Adding default for mode
debug: File[foo]: Adding default for seltype
notice: Compiled catalog for agent.redacted.com in environment production in 0.11 seconds
info: mount[files]: allowing * access
debug: Received report to process from agent.redacted.com
debug: Processing report from agent.redacted.com with processor Puppet::Reports::Store
and the agent responds thusly:
info: Caching catalog for agent.redacted.com
info: Applying configuration version '1439475588'
notice: /Stage[main]/Etchostfile/File[foo]/ensure: defined content as '{md5}75125a96a68a0ff0d42f91f10dca8336'
notice: Finished catalog run in 0.42 seconds
and the file is properly installed/updated.
So it works when the master is in debug mode, but it errors when the master is in standard (?) mode. I can go back and forth, in and out of debug mode at will, and it works every time in debug mode, and it fails every time in standard mode.
UPDATE 2
Running puppetmasterd from the command line, and everything works.
Running service puppetmaster start or /etc/init.d/puppetmaster start from the command line, and it fails. So at least I'm getting closer.
/etc/sysconfig/puppetmaster is entirely commented out. So as of now, I do not see any difference between just starting puppetmasterd and using the service script.
UPDATE 3
I think it's an SELinux problem.
With SELinux "enforcing" on the master, service puppetmaster restart, and I get the error.
I change SELinux to "Permissive" on the master, and I still get the error.
But now that SELinux is set to Permissive, if I service puppetmaster restart, my files get served properly.
But now that it's working, I set SELinux to Enforcing, and I get a different error:
err: /Stage[main]/Etchostfile/File[foo]: Could not evaluate: Could not
retrieve information from environment production source(s)
puppet:///files/hosts-foo.txt at
/etc/puppet/modules/etchostfile/manifests/init.pp:27
Then I do a service puppetmaster restart and I'm back to the original error.
So the situation changes depending on
how I started the service (puppetmasterd or service)
what SELinux was set to when I started the service
what SELinux is set to when the agent runs.
The closer I get, the more confused I get.
UPDATE 4
I think I found it. Once I started looking at SELinux, I found the policy changes I needed to make (allowing ruby/puppet to access cobbler files) and now it appears to be working...
This turned out to be an SELinux problem. I eventually found this error message
SELinux is preventing /usr/bin/ruby from read access
on the file /var/www/cobbler/pub/hosts-foo.txt .
which led me to the audit2allow rules I needed to apply to allow puppet to access my cobbler files.
I was getting this error with puppet server on ubuntu 20.
Error: /Stage[main]/Dvod_tocr/File[/install/wine-data.tar.gz]: Could not evaluate: Could not retrieve file metadata for puppet:///extra_files/wine-data.tar.gz: Error 500 on SERVER: Server Error: Not authorized to call find on /file_metadata/extra_files/wine-data.tar.gz with {:rest=>"extra_files/wine-data.tar.gz", :links=>"manage", :checksum_type=>"sha256", :source_permissions=>"ignore"}
My fileserver.conf file was in the wrong location. The correct location for this puppet version and on ubuntu 20 is /etc/puppetlabs/puppet/fileserver.conf

rlm_eap error running freeradius in openwrt

I am running openwrt on beagle bone black board. I am getting following error while running freeradius.
radiusd -X
rlm_eap: SSL error error:02001002:lib(2):func(1):reason(2)
rlm_eap_tls: Error reading certificate file /etc/freeradius2/certs/server.pem
rlm_eap: Failed to initialize type tls
/etc/freeradius2/eap.conf[17]: Instantiation failed for module "eap"
/etc/freeradius2/sites/default[312]: Failed to find "eap" in the "modules" section.
/etc/freeradius2/sites/default[254]: Errors parsing authenticate section.
when i checked there is no "cert" directory present in /etc/freeradius2/. Plz help
Problem was solved after installing freeradius2-democerts_2.2.7-1_omap.ipk
after installing following error might trouble:
Debug: Module: Checking authorize {...} for more modules to load
Error: /etc/freeradius2/sites/default[160]: Failed to find "reject" in the "modules" section.
Error: /etc/freeradius2/sites/default[69]: Errors parsing authorize section.
to resolve this go to /etc/freeradius2/sites/default line no. 160. comment the line which has reject word.

Install OpenCV-2.4.9 on CentOS 7 (PC)

I'm trying to install OpenCV-2.4.9 on CentOS 7 (PC) however getting error after 16% when running "make" command. I leave default configuration for OpenCV.
make
...
[ 16%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_v4l.cpp.o /opt/opencv-2.4.9/opencv/modules/highgui/src/cap_v4l.cpp:306:29: error: field ‘capability’ has incomplete type
struct video_capability capability;
^ /opt/opencv-2.4.9/opencv/modules/highgui/src/cap_v4l.cpp:307:29: error: field ‘captureWindow’ has incomplete type
struct video_window captureWindow;
....
....
/opt/opencv-2.4.9/opencv/modules/highgui/src/cap_v4l.cpp: In function ‘void icvCloseCAM_V4L(CvCaptureCAM_V4L*)’:
/opt/opencv-2.4.9/opencv/modules/highgui/src/cap_v4l.cpp:2812:46: error: ‘CvCaptureCAM_V4L’ has no member named ‘memoryBuffer’
It seems that the define HAVE_CAMV4L has the value 1, if you look in the file modules/highgui/src/cap_v4l.cpp looking for the structure definition at the row 306. If the compilation fails at that point this means that the video4linux development configuration is corrupted.
Using google I have found that the OpenCV Bug #1357 is described as follow:
CHECK_INCLUDE_FILE(linux/videodev.h HAVE_CAMV4L) succeeds even though linux/videodev.h doesn't exist on the system. (Bug #1357)
http://code.opencv.org/issues/1357
Anyway the solution is described at the same URL for "HAVE_CAMV4L gets set incorrectly": "Setting it to FALSE in CMakeLists.txt fixes the problem".

Overtone & Vim (Repl doesn't seems to be connected)

I tried to play with overtone on ubuntu, but I can't eval some of overtone's codes in Vim.
:Eval works for the clojure code; I tried it in vim (a clj file in the lein project directory), ex: (+ 1 2 3) => :Eval => appeared on the bottom of the vim window => 6, so it's ok.
But, for example, I tried:
(demo(sin-osc)) => :Eval ;(:Require don't change nothing)
It returned:
java.lang.RuntimeException: Unable to resolve symbol: demo in this context, comp
iling:(NO_SOURCE_PATH:1:1)
So here's what I do:
jack is started
lein repl is started in the lein project (deps is ok)
in the first terminal where there is lein I start overtone (use 'overtone.live), here is the log; I've got 2 errors:
user=> (use 'overtone.live)
--> Loading Overtone...
--> Booting internal SuperCollider server...
* ERROR: dlsym load err '/home/axxon/workspace/overtone/tutorial/native/linux/x86_64/libscsynth.so: undefined symbol: load'
Found 10 LADSPA plugins
* ERROR: open directory failed '/home/axxon/.local/share/SuperCollider/synthdefs'
JackDriver: client name is 'SuperCollider'
SC_AudioDriver: sample rate = 44100,000000, driver's block size = 1024
--> Connecting to internal SuperCollider server...
--> Connection established
JackDriver: max output latency 23,2 ms
here, in this window I tried (demo(sin-osc)). it works; I can hear it.
Great, but now I want to script with Vim, so I created a new file (mytest.clj) in the lein project directory (/overtone/tutorial), I opened it with Vim (in another window)
in this blank file, I wrote the same thing as I said before, (demo(sin-osc)) and tried to eval with first, :Require, it returned this:
(clojure.core/require 'user :reload)
java.io.FileNotFoundException: Could not locate user__init.class or user.clj on
classpath:
with Eval, it doesn't work either.
Thanks for your help because I really want to use overtone!
Ps: my vim bundles:
Bundle 'guns/vim-clojure-static'
Bundle 'tpope/vim-fireplace'
Bundle 'tpope/vim-classpath'
Edit: I forgot to use a correct namespace, and in overtone's google group, i seen that mytest.clj must be in the src directory of the project. I tried this code with :Require (i stopped overtone in the first window where i started lein):
(ns tutorial.foo
(:use [overtone.live]))
(definst saw-wave [freq 440 attack 0.01 sustain 0.4 release 0.1 vol 0.4]
(* (env-gen (lin-env attack sustain release) 1 1 0 1 FREE) (saw freq) vol))
(saw-wave)
, but it returned:
(clojure.core/require 'tutorial.foo :reload)
Erreur détectée en traitant function <SNR>17_Require..fireplace#session_eval..<S
NR>17_eval..7 :
ligne 38 :
E605: Exception non interceptée : Error running Clojure: *** ERROR: open directo
ry failed '/usr/java/packages/lib/amd64'^#*** ERROR: dlsym load err '/usr/lib/jn
i/libswt-gtk-3836.so: undefined symbol: load'^#*** ERROR: dlsym load err '/usr/l
ib/jni/libswt-glx-gtk-3836.so: undefined symbol: load'^#*** ERROR: dlsym load er
r '/usr/lib/jni/libswt-webkit-gtk-3836.so: undefined symbol: load'^#*** ERROR: d
lsym load err '/usr/lib/jni/libswt-atk-gtk-3836.so: undefined symbol: load'^#***
ERROR: dlsym load err '/usr/lib/jni/libswt-pi-gtk-3836.so: undefined symbol: lo
ad'^#*** ERROR: dlsym load err '/usr/lib/jni/libswt-cairo-gtk-3836.so: undefined
symbol: load'^#*** ERROR: dlsym load err '/usr/lib/jni/libswt-awt-gtk-3836.so:
undefined symbol: load'^#*** ERROR: dlsym load err '/usr/lib/jni/libswt-gnome-gt
k-3836.so: undefined symbol: load'^##^## A fatal error has been detected by the
Java Runtime Environment:^##^## SIGSEGV (0xb) at pc=0x00007f5d261db671, pid=693
1, tid=140036632291072^##^## JRE version: 7.0_25-b30^## Java VM: OpenJDK 64-Bi
I was having the same problem. It turned out that the vim fireplace plugin was not connected to my bash repl session. I manually established the connection and everything worked just fine afterwards.
At the top of your lein session you should see the details about what port the repl session is running on
nREPL server started on port 35182 on host 127.0.0.1
So then you can connect vim-fireplace to that repl session by using
:Connect nrepl://localhost:35182
The reason why you can still evaluate code like (+ 1 2 3) even when vim-fireplace is not connected to the remote repl session is because vim-classpath will make it fall back to just spawning a new clojure runtime instance to evaluate that code. Once the fireplace repl connection is working you should notice that evaluating code becomes a lot faster since it doesn't need to load clojure from scratch.
Make sure that you use overtone.live in the namespace declaration of the file you are editing in vim, and that the REPL is running in a separate terminal instance. From vim, save the file (:w) and move your cursor into the ns declaration. Then hit gf to open the file for the namespace. Type cpR or :Require! and then cpp or :Eval the function you were trying to run. Hopefully this will work for you! Best of luck.

Resources