Render WebGL in Xfvb - webgl

I want to headless test WebGL code using Xvfb. Does anybody know how to do that?
I have 2 machines - both running Ubuntu. One with NVidia card and one with ATI:
The NVidia machine:
ipmi:~ $>xvfb-run glxinfo
name of display: :455
display: :455 screen: 0
direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose)
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
GLX_ARB_multisample, GLX_EXT_visual_info, GLX_EXT_visual_rating,
GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_OML_swap_method,
GLX_SGI_make_current_read, GLX_SGIS_multisample, GLX_SGIX_fbconfig,
GLX_SGIX_pbuffer, GLX_MESA_copy_sub_buffer, GLX_INTEL_swap_event
client glx vendor string: NVIDIA Corporation
client glx version string: 1.4
...
ipmi:~ $>xvfb-run glxgears
3725 frames in 5.0 seconds = 741.884 FPS
3840 frames in 5.0 seconds = 767.310 FPS
4080 frames in 5.0 seconds = 814.811 FPS
4120 frames in 5.0 seconds = 821.859 FPS
The ATI machine:
shaka:~ $>xvfb-run glxinfo
name of display: :99
display: :99 screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
GLX_ARB_multisample, GLX_EXT_visual_info, GLX_EXT_visual_rating,
GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_OML_swap_method,
GLX_SGI_make_current_read, GLX_SGIS_multisample, GLX_SGIX_fbconfig,
GLX_SGIX_pbuffer, GLX_MESA_copy_sub_buffer, GLX_INTEL_swap_event
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
shaka:~ $>xvfb-run glxgears
4326 frames in 5.0 seconds = 865.095 FPS
4343 frames in 5.0 seconds = 868.540 FPS
Even if shaka supports direct rendering using Mesa, I can't get a WebGL context.
Thanks!

With modern X11, you would be better off ignoring Xvfb and using the dummy display driver. See the "Additional notes" at http://www.x.org/wiki/XorgTesting for information about using it (you would presumably specify a custom xorg.conf with the necessary Device section). http://www.karlrunge.com/x11vnc/Xdummy is another way to use the dummy driver.

Related

Quick3D fails with software render backend

When I run my Qt project inside a docker container with the environment variable Qt_quick_backend=software (possibly related to https://bugreports.qt.io/browse/QTBUG-102634), the application runs but does not display any QtQuick 3D object. If I remove the Qt_quick_backend environment variable, the application gives a OpenGL segmentation fault error. When the application runs outside the docker container, i.e., locally, it works.
I'm using Qt 6.2.3, C++, my OS is Ubuntu and the docker container is run with the following options: "xhost +local:",
"--net host",
"-e DISPLAY",
"-e QT_QUICK_BACKEND=software",
"-v /tmp/.X11-unix:/tmp/.X11-unix"
This is the OpenGL segmentation fault output:
qt.scenegraph.general: Using QRhi with backend OpenGL
Graphics API debug/validation layers: 0
QRhi profiling and debug markers: 0
Shader/pipeline cache collection: 0
qt.scenegraph.general: threaded render loop
qt.scenegraph.general: Using sg animation driver
qt.scenegraph.general: Animation Driver: using vsync: 16.67 ms
I20230212 20:19:57.865648 23643 workerthread.cpp:202] runLoop Time: 0
I20230212 20:19:57.865960 23643 workerthread.cpp:80] run: Loop running
qt.scenegraph.general: Using sg animation driver
qt.scenegraph.general: Animation Driver: using vsync: 16.67 ms
qt.rhi.general: Created OpenGL context QSurfaceFormat(version 4.1, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 0, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 1, colorSpace QColorSpace(), profile QSurfaceFormat::CompatibilityProfile)
qt.rhi.general: OpenGL VENDOR: VMware, Inc. RENDERER: SVGA3D; build: RELEASE; LLVM; VERSION: 4.1 (Compatibility Profile) Mesa 21.2.6
qt.scenegraph.general: MSAA sample count for the swapchain is 1. Alpha channel requested = no.
qt.scenegraph.general: rhi texture atlas dimensions: 2048x2048
Segmentation fault (core dumped)
I'm expecting my Qt Project to display correctly the QtQuick 3D Object (e.g. View3D QML Type) inside a docker container.

headless chrome in docker container, visit chrome://gpu , Error: vkCreateInstance failed with VK_ERROR_INCOMPATIBLE_DRIVER

I am trying to use GPU in chrome headless(version: Google Chrome 102.0.5005.61) mode in docker container.Bug get next Error:
exec cmd in container:
start container:
docker run --gpus all --name centos-chrome-gpu1 -it centos-chrome-gpu:v1 /bin/bash
exec cmd in container to detect gpu:
chrome --headless --no-sandbox --enable-features=Vulkan,UseSkiaRenderer --use-vulkan=native --enable-unsafe-webgpu --enable-logging --disable-vulkan-fallback-to-gl-for-testing --disable-vulkan-surface --use-angle=vulkan --print-to-pdf=out.pdf 'chrome://gpu'
got error:
[root#3298c3aaf37a data]# chrome --headless --no-sandbox --enable-features=Vulkan,UseSkiaRenderer --use-vulkan=native --enable-unsafe-webgpu --enable-logging --disable-vulkan-fallback-to-gl-for-testing --disable-vulkan-surface --use-angle=vulkan --print-to-pdf=out.pdf 'chrome://gpu'
[0529/064825.243304:ERROR:bus.cc(398)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[0529/064825.244022:ERROR:bus.cc(398)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[0529/064825.247593:WARNING:bluez_dbus_manager.cc(248)] Floss manager not present, cannot set Floss enable/disable.
[0529/064825.255679:ERROR:angle_platform_impl.cc(43)] RendererVk.cpp:127 (VerifyExtensionsPresent): Extension not supported: VK_KHR_surface
[0529/064825.256516:ERROR:angle_platform_impl.cc(43)] RendererVk.cpp:127 (VerifyExtensionsPresent): Extension not supported: VK_KHR_xcb_surface
[0529/064825.256673:ERROR:angle_platform_impl.cc(43)] Display.cpp:977 (initialize): ANGLE Display::initialize error 0: Internal Vulkan error (-7): A requested extension is not supported, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, initialize:1446.
[0529/064825.257420:ERROR:gl_surface_egl.cc(852)] EGL Driver message (Critical) eglInitialize: Internal Vulkan error (-7): A requested extension is not supported, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, initialize:1446.
[0529/064825.257477:ERROR:gl_surface_egl.cc(1489)] eglInitialize Vulkan failed with error EGL_NOT_INITIALIZED
[0529/064825.257526:ERROR:gl_ozone_egl.cc(21)] GLSurfaceEGL::InitializeOneOff failed.
[0529/064825.263608:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization
[0529/064825.277845:ERROR:angle_platform_impl.cc(43)] RendererVk.cpp:127 (VerifyExtensionsPresent): Extension not supported: VK_KHR_surface
[0529/064825.277953:ERROR:angle_platform_impl.cc(43)] RendererVk.cpp:127 (VerifyExtensionsPresent): Extension not supported: VK_KHR_xcb_surface
[0529/064825.278040:ERROR:angle_platform_impl.cc(43)] Display.cpp:977 (initialize): ANGLE Display::initialize error 0: Internal Vulkan error (-7): A requested extension is not supported, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, initialize:1446.
[0529/064825.278129:ERROR:gl_surface_egl.cc(852)] EGL Driver message (Critical) eglInitialize: Internal Vulkan error (-7): A requested extension is not supported, in ../../third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp, initialize:1446.
[0529/064825.278192:ERROR:gl_surface_egl.cc(1489)] eglInitialize Vulkan failed with error EGL_NOT_INITIALIZED
[0529/064825.278255:ERROR:gl_ozone_egl.cc(21)] GLSurfaceEGL::InitializeOneOff failed.
[0529/064825.279831:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization
[0529/064825.306604:WARNING:sandbox_linux.cc(376)] InitializeSandbox() called with multiple threads in process gpu-process.
Warning: vkCreateInstance: Found no drivers!
Error: vkCreateInstance failed with VK_ERROR_INCOMPATIBLE_DRIVER
at CheckVkSuccessImpl (../../third_party/dawn/src/dawn/native/vulkan/VulkanError.cpp:88)
at CreateVkInstance (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:361)
at Initialize (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:235)
at Create (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:165)
at operator() (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:420)
and gpu detect failed:
Graphics Feature Status
Canvas: Software only, hardware acceleration unavailable
Canvas out-of-process rasterization: Disabled
Direct Rendering Display Compositor: Disabled
Compositing: Software only. Hardware acceleration disabled
Multiple Raster Threads: Enabled
OpenGL: Disabled
Rasterization: Software only. Hardware acceleration disabled
Raw Draw: Disabled
Skia Renderer: Enabled
Video Decode: Software only. Hardware acceleration disabled
Video Encode: Software only. Hardware acceleration disabled
Vulkan: Disabled
WebGL: Software only, hardware acceleration unavailable
WebGL2: Software only, hardware acceleration unavailable
WebGPU: Software only, hardware acceleration unavailable
err2
Bug in host machine,it works well:
[root#ecs-aedd data]# chrome --headless --no-sandbox --enable-features=Vulkan,UseSkiaRenderer --use-vulkan=native --enable-unsafe-webgpu --enable-logging --disable-vulkan-fallback-to-gl-for-testing --disable-vulkan-surface --use-angle=vulkan --print-to-pdf=out.pdf 'chrome://gpu'
[0529/145105.116019:WARNING:bluez_dbus_manager.cc(248)] Floss manager not present, cannot set Floss enable/disable.
[0529/145105.892509:INFO:headless_shell.cc(660)] Written to file out.pdf.
and gpu detect is successful:
Graphics Feature Status
Canvas: Hardware accelerated
Canvas out-of-process rasterization: Disabled
Direct Rendering Display Compositor: Disabled
Compositing: Hardware accelerated
Multiple Raster Threads: Enabled
OpenGL: Enabled
Rasterization: Hardware accelerated
Raw Draw: Disabled
Skia Renderer: Enabled
Video Decode: Software only. Hardware acceleration disabled
Video Encode: Software only. Hardware acceleration disabled
Vulkan: Enabled
WebGL: Hardware accelerated
WebGL2: Hardware accelerated
WebGPU: Hardware accelerated
succ2
How should I do to solve this to detect successfully in container?

wine fixme wait_for_withdrawn_state window

I am running a Windows execuable (.exe) using wine, in a docker container and I am dumping the graphical interface using xvfb-run. The setup is working but with some fixmes and some errors which I am trying to understand what do they mean.
The most common and fixme is:
002c:fixme:event:wait_for_withdrawn_state window 0x1004a/e00001 wait timed out
0024:fixme:event:wait_for_withdrawn_state window 0x10086/a00003 wait timed out
I found here that it means that:
Your application X Windows are possibly staying in a Withdrawn (aka limbo) state - because Wine isn't drawing to the correct X (Xvfb) Display.
However I do not understand what is this withdrawn state and why wine isn't drawing to the corrcect X. Furthermore the same fixme is present when running wine with xvfb locally without docker.
Thank you!
The whole log from the docker-xvfb-wine setup:
$ xvfb-run --server-num=99 wine my.exe (runs using a run.sh specified by the CMD clause in the dockerfile)
0050:err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub, hr 0x80004002
0050:err:ole:CoMarshalInterface Failed to marshal the interface {6d5140c1-7436-11ce-8034-00aa006009fa}, hr 0x80004002
0050:err:ole:apartment_get_local_server_stream Failed: 0x80004002
0048:err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub, hr 0x80004002
0048:err:ole:CoMarshalInterface Failed to marshal the interface {6d5140c1-7436-11ce-8034-00aa006009fa}, hr 0x80004002
0048:err:ole:apartment_get_local_server_stream Failed: 0x80004002
0048:err:ole:start_rpcss Failed to open RpcSs service
002c:fixme:event:wait_for_withdrawn_state window 0x1004a/e00001 wait timed out
wine: configuration in L"/root/.wine" has been updated.
0024:fixme:event:wait_for_withdrawn_state window 0x10086/a00003 wait timed out
0024:fixme:event:wait_for_withdrawn_state window 0x1007c/a00001 wait timed out
X connection to :99 broken (explicit kill or server shutdown).
The log from the xvfb-wine setup (without docker):
$ xvfb-run --server-num=99 wine my.exe
0034:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0034:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0048:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0048:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0050:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0050:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
002c:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
002c:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0024:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0024:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
00cc:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
00cc:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0024:fixme:font:freetype_set_outline_text_metrics failed to read full_nameW for font L"Ani"!
0024:fixme:event:wait_for_withdrawn_state window 0x20044/c00003 wait timed out
0024:fixme:event:wait_for_withdrawn_state window 0x1007a/c00001 wait timed out
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":99"
after 19 requests (19 known processed) with 0 events remaining.
You need to start a window manager, like bspwm.
Xvfb :99 &
export DISPLAY=:99
bspwm &
wine some.exe

NodeMCU lua: adc.readvdd33() always returns 65535 on ESP8266

I'm trying to read the system voltage, adc.readvdd33() always returns 65535.
This is the code I'm using, obviously just like in the docs:
if (adc.force_init_mode(adc.INIT_VDD33)) then
node.restart()
return
end
print("System voltage (mV):", adc.readvdd33(0))
Output:
NodeMCU 3.0.0.0 built on nodemcu-build.com provided by frightanic.com
branch: master
commit: 310faf7fcc9130a296f7f17021d48c6d717f5fb6
release: 3.0-master_20190907
release DTS: 201909070945
SSL: true
build type: float
LFS: 0x0
modules: adc,bme280,dht,enduser_setup,file,gpio,i2c,mqtt,net,node,rtcmem,rtctime,sjson,sntp,tmr,uart,wifi,tls
build 2020-01-03 12:07 powered by Lua 5.1.4 on SDK 3.0.1-dev(fce080e)
System voltage (mV): 65535
I've read about an issue with this in older SDK versions, is this something similar or what am I doing wrong? It's the same with an ESP01, an ESP01S and an ESP12F.
Is there a limitation using adc with other packages or having something wired to a specific pin?
Unfortunately this is a known bug. We're tracking it in issue 2925, see https://github.com/nodemcu/nodemcu-firmware/issues/2925 for details.

Beaglebone Black Latest Firmware Images U-Boot SPL 2018.01 not boot

I'm trying to flash Beaglebone back from element14 by step on Getting Started page , it can't flash or boot on sdcard on deabian 9.1 LXQT or 9.3 loT lasteset Firmware Image, but I can flash on Old Firmware debian7.5 from step
"dd if=/dev/mmcblk0 of=/dev/mmcblk1" on stackoverflow this page.
I use debug port, It show
U-Boot SPL 2018.01-00002-ge9ff418fb8 (Feb 20 2018 - 20:14:57)
Trying to boot from MMC1
U-Boot 2018.01-00002-ge9ff418fb8 (Feb 20 2018 - 20:14:57 -0600), Build: jenkins-github_Bootloader-Builder-38
CPU : AM335X-GP rev 2.1
I2C: ready
DRAM: 512 MiB
No match for driver 'omap_hsmmc'
No match for driver 'omap_hsmmc'
Some drivers were not found
Reset Source: Power-on reset has occurred.
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Using default environment
what should I do?
thanks you.
You may use the following procedure with your required images from https://beagleboard.org/latest-images
http://old.ghielectronics.com/community/forum/topic?id=23763

Resources