Hersi
11 November 2020 09:45
1
Hi!
I was trying to create a virgl accelerated vm, only to have a big error dialog in my face about “something something eglBindAPI failed”.
I later tested that function in a minimal C program, and it seems that there is no OpenGL EGL implementation available, only OpenGL ES… which is very confusing, as the nvidia drivers should have that.
eglinfo says this:
X11 platform:
EGL API version: 1.4
EGL vendor string: Google Inc.
EGL version string: 1.4 SwiftShader 4.1.0.7
EGL client APIs: OpenGL_ES
EGL extensions string:
EGL_KHR_create_context EGL_KHR_get_all_proc_addresses
EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image
EGL_KHR_gl_renderbuffer_image EGL_KHR_fence_sync EGL_KHR_image_base
EGL_KHR_surfaceless_context EGL_ANGLE_iosurface_client_buffer
EGL_ANDROID_framebuffer_target EGL_ANDROID_recordable
And it looks like I don’t have the right EGL based on the nvidia X server settings -> graphics information -> EGL tab either. (I can’t post pictures or links on the forum yet)
It looks like the active EGL on my system is somehow an Android implementation? How? The “Vendor” field should say “NVIDIA Corporation”.
Installed nvidia packages:
# pacman -Qqs nvidia
egl-wayland
ffnvcodec-headers
gwe
lib32-libvdpau
lib32-nvidia-440xx-utils
libvdpau
libxnvctrl
linux54-nvidia-440xx
linux58-nvidia-440xx
mhwd-nvidia-340xx
mhwd-nvidia-390xx
mhwd-nvidia-418xx
mhwd-nvidia-430xx
mhwd-nvidia-435xx
mhwd-nvidia-440xx
mhwd-nvidia-450xx
mhwd-nvidia-455xx
nvidia-440xx-utils
pycuda-headers
# pacman -Qqs libglvnd
lib32-libglvnd
libglvnd
If I search for egl files I get:
# pacman -Qil nvidia-440xx-utils | grep -i egl
nvidia-440xx-utils /usr/lib/libEGL_nvidia.so.0
nvidia-440xx-utils /usr/lib/libEGL_nvidia.so.440.100
nvidia-440xx-utils /usr/lib/libnvidia-eglcore.so.440.100
nvidia-440xx-utils /usr/share/glvnd/egl_vendor.d/
nvidia-440xx-utils /usr/share/glvnd/egl_vendor.d/10_nvidia.json
Does anyone have any idea how to install/configure the right EGL implementation? It is quite a frustrating (albeit niche) problem. Thanks!
Hersi
13 November 2020 09:59
2
Well…
For the time being I just copied the libEGL.so.1.1.0 from the nvidia driver downloaded from the browser to /usr/lib and that seems to be correct. I am still confused as to why I did not have the correct version of the file.
Another thing, the libGL.so seems to be having problems as well:
glinfo: symbol lookup error: /usr/lib/libGL.so.1: undefined symbol: _glapi_tls_Current
Is this an arch package problem, or I just have an anomaly in my system?
cscs
13 November 2020 10:02
3
Hersi:
libEGL.so.1.1.0
This is provided by package libglvnd
$ pacman -Fx libEGL.so.1.1
extra/libglvnd 1.3.2-1
usr/lib/libEGL.so.1.1.0
multilib/lib32-libglvnd 1.3.2-1
usr/lib32/libEGL.so.1.1.0
Please also provide
inxi -Fazy && mhwd -li
Hersi
13 November 2020 10:04
4
❯ inxi -Fazy && mhwd -li
System:
Kernel: 5.8.18-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.0
parameters: BOOT_IMAGE=/boot/vmlinuz-5.8-x86_64
root=UUID=3a85a802-3294-4635-8fc7-4fb961f0861e rw
resume=UUID=6697f93b-2c76-43ec-a8a8-4fe55dbf2bbd intel_iommu=on iommu=pt
acpi_enforce_resources=lax
Desktop: KDE Plasma 5.20.2 tk: Qt 5.15.1 wm: kwin_x11 dm: SDDM
Distro: Manjaro Linux
Machine:
Type: Desktop System: ASUS product: All Series v: N/A serial: <filter>
Mobo: ASUSTeK model: X99-A v: Rev 1.xx serial: <filter>
UEFI: American Megatrends v: 4101 date: 07/10/2019
CPU:
Info: 6-Core model: Intel Core i7-5820K bits: 64 type: MT MCP arch: Haswell
family: 6 model-id: 3F (63) stepping: 2 microcode: 43 L2 cache: 15.0 MiB
flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
bogomips: 79226
Speed: 4279 MHz min/max: 1200/4400 MHz Core speeds (MHz): 1: 4279 2: 2746
3: 1702 4: 2875 5: 3668 6: 1200 7: 2455 8: 2953 9: 3273 10: 3116 11: 2922
12: 1200
Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled
Type: l1tf
mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable
Type: mds mitigation: Clear CPU buffers; SMT vulnerable
Type: meltdown mitigation: PTI
Type: spec_store_bypass
mitigation: Speculative Store Bypass disabled via prctl and seccomp
Type: spectre_v1
mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional,
IBRS_FW, STIBP: conditional, RSB filling
Type: srbds status: Not affected
Type: tsx_async_abort status: Not affected
Graphics:
Device-1: NVIDIA GP104 [GeForce GTX 1070] vendor: Gigabyte driver: nvidia
v: 440.100 alternate: nouveau,nvidia_drm bus ID: 01:00.0 chip ID: 10de:1b81
Device-2: Valve type: USB driver: uvcvideo bus ID: 3-6.2.1:4
chip ID: 28de:2400 serial: <filter>
Display: x11 server: X.org 1.20.9 compositor: kwin_x11 driver: nvidia
resolution: <xdpyinfo missing>
OpenGL: renderer: GeForce GTX 1070/PCIe/SSE2 v: 4.6.0 NVIDIA 440.100
direct render: Yes
Audio:
Device-1: Intel C610/X99 series HD Audio vendor: ASUSTeK
driver: snd_hda_intel v: kernel bus ID: 00:1b.0 chip ID: 8086:8d20
Device-2: NVIDIA GP104 High Definition Audio vendor: Gigabyte
driver: snd_hda_intel v: kernel bus ID: 01:00.1 chip ID: 10de:10f0
Device-3: C-Media CMI8788 [Oxygen HD Audio] vendor: ASUSTeK Xonar DSX
driver: snd_virtuoso v: kernel bus ID: 06:00.0 chip ID: 13f6:8788
Device-4: Kingston HyperX Cloud Flight Wireless Headset type: USB
driver: hid-generic,snd-usb-audio,usbhid bus ID: 1-5:2 chip ID: 0951:16c4
Device-5: Texas Instruments PCM2902 Audio Codec type: USB
driver: hid-generic,snd-usb-audio,usbhid bus ID: 1-14:8 chip ID: 08bb:2902
Device-6: Valve type: USB driver: cdc_acm,hid-generic,usbhid
bus ID: 1-10.2.3.3:15 chip ID: 28de:2102 serial: <filter>
Device-7: Valve type: USB driver: hid-generic,snd-usb-audio,usbhid
Sound Server: ALSA v: k5.8.18-1-MANJARO
Network:
Device-1: Intel Ethernet I218-V vendor: ASUSTeK driver: e1000e v: 3.2.6-k
port: f000 bus ID: 00:19.0 chip ID: 8086:15a1
IF: eno1 state: up speed: 1000 Mbps duplex: full mac: <filter>
Device-2: Microsoft Xbox 360 Wireless Adapter type: USB driver: xpad
bus ID: 1-10.4:11 chip ID: 045e:0719 serial: <filter>
IF-ID-1: virbr0 state: down mac: <filter>
IF-ID-2: virbr0-nic state: down mac: <filter>
Drives:
Local Storage: total: 5.47 TiB used: 2.27 TiB (41.5%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 970 EVO 500GB size: 465.76 GiB
block size: physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4
serial: <filter> rev: 2B2QEXE7 scheme: GPT
ID-2: /dev/sda vendor: Western Digital model: WD20EZRX-00DC0B0
size: 1.82 TiB block size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
serial: <filter> rev: 0A80 scheme: GPT
ID-3: /dev/sdb vendor: Kingston model: SKC400S37512G size: 476.94 GiB
block size: physical: 512 B logical: 512 B speed: 6.0 Gb/s serial: <filter>
rev: 00.W scheme: GPT
ID-4: /dev/sdc vendor: Western Digital model: WDS100T2B0A-00SM50
size: 931.51 GiB block size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
serial: <filter> rev: 30WD scheme: GPT
ID-5: /dev/sdd vendor: Samsung model: HD103UJ size: 931.51 GiB block size:
physical: 512 B logical: 512 B speed: 3.0 Gb/s serial: <filter> rev: 1113
ID-6: /dev/sde vendor: Samsung model: HD103UJ size: 931.51 GiB block size:
physical: 512 B logical: 512 B speed: 3.0 Gb/s serial: <filter> rev: 1118
Partition:
ID-1: / raw size: 472.44 GiB size: 464.52 GiB (98.32%)
used: 272.53 GiB (58.7%) fs: ext4 dev: /dev/sdb3
Swap:
Kernel: swappiness: 60 (default) cache pressure: 100 (default)
ID-1: swap-1 type: partition size: 4.00 GiB used: 0 KiB (0.0%) priority: -2
dev: /dev/sdb2
Sensors:
System Temperatures: cpu: 43.5 C mobo: 34.0 C gpu: nvidia temp: 59 C
Fan Speeds (RPM): fan-1: 922 fan-2: 465 fan-3: 0 fan-4: 0 fan-5: 832
fan-6: 545 gpu: nvidia fan: 39%
Power: 12v: N/A 5v: N/A 3.3v: 3.34 vbat: 3.38
Info:
Processes: 442 Uptime: 1h 51m Memory: 31.28 GiB used: 10.22 GiB (32.7%)
Init: systemd v: 246 Compilers: gcc: 10.2.0 alt: 8/9 clang: 10.0.1 Packages:
pacman: 2103 lib: 472 flatpak: 0 Shell: Zsh v: 5.8 running in: konsole
inxi: 3.1.08
> Installed PCI configs:
--------------------------------------------------------------------------------
NAME VERSION FREEDRIVER TYPE
--------------------------------------------------------------------------------
video-nvidia-440xx 2020.10.04 false PCI
Warning: No installed USB configs!
Hersi
13 November 2020 10:08
5
Hi!
But I found that if I have the one that’s provided it gets me this output:
❯ LD_PRELOAD=/usr/lib/libEGL.so.1.1.0.bak eglinfo
EGL client extensions string:
EGL_KHR_client_get_all_proc_addresses EGL_KHR_platform_gbm
EGL_KHR_platform_x11 EGL_EXT_client_extensions EGL_EXT_platform_base
GBM platform:
EGL API version: 1.4
EGL vendor string: Google Inc.
EGL version string: 1.4 SwiftShader 4.1.0.7
EGL client APIs: OpenGL_ES
[...]
Which is not correct.
It should be:
❯ LD_PRELOAD=NVIDIA-Linux-x86_64-450.80.02/libEGL.so.1.1.0 eglinfo
EGL client extensions string:
EGL_EXT_platform_base EGL_EXT_device_base EGL_EXT_device_enumeration
EGL_EXT_device_query EGL_KHR_client_get_all_proc_addresses
EGL_EXT_client_extensions EGL_KHR_debug EGL_KHR_platform_x11
EGL_EXT_platform_x11 EGL_EXT_platform_device EGL_KHR_platform_wayland
EGL_EXT_platform_wayland EGL_MESA_platform_gbm EGL_KHR_platform_gbm
EGL_MESA_platform_surfaceless
[...]
X11 platform:
EGL API version: 1.5
EGL vendor string: NVIDIA
EGL version string: 1.5
EGL client APIs: OpenGL_ES OpenGL
EGL extensions string: