# Paraview EGL does not work with pvpython script

**URL:** https://discourse.paraview.org/t/paraview-egl-does-not-work-with-pvpython-script/12959
**Category:** ParaView Support
**Created:** [September 29, 2023, 10:37am UTC](https://discourse.paraview.org/t/paraview-egl-does-not-work-with-pvpython-script/12959 "2023-09-29T10:37:54Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![sebasgut1](https://discourse.paraview.org/user_avatar/discourse.paraview.org/sebasgut1/32/11526_2.png) [@sebasgut1](https://discourse.paraview.org/u/sebasgut1)
#### Post date: [September 29, 2023, 10:37am UTC](https://discourse.paraview.org/t/paraview-egl-does-not-work-with-pvpython-script/12959/1 "2023-09-29T10:37:54Z")

</div>

Hi,  
I made a pvpython script that works perfectly with Paraview OSMesa, but I want it to run with EGL to use GPU resources in a headless environment. I am running the script in an Amazon EC2 instance with NVIDIA. When I try to run the script I get this error. I am using the precompiled version. Do you have any idea why it does not work? Should I set something else?  
Thank you!

```auto
Loguru caught a signal: SIGSEGV
Stack trace:
76 0x401de9 /home/ec2-user/paraview/bin/pvpython-real() [0x401de9]
75 0x7f97d4f8b13a __libc_start_main + 234
74 0x402446 /home/ec2-user/paraview/bin/pvpython-real() [0x402446]
73 0x7f97d27753f4 vtkPythonInterpreter::PyMain(int, char**) + 916
72 0x7f97d0f8acf0 Py_RunMain + 1936
71 0x7f97d0f66a18 PyRun_SimpleFileExFlags + 376
70 0x7f97d0f64af5 /home/ec2-user/paraview/bin/../lib/libpython3.9.so.1.0(+0x212af5) [0x7f97d0f64af5]
69 0x7f97d0f1ff8b PyEval_EvalCode + 27
68 0x7f97d0f1ff5e PyEval_EvalCodeEx + 62
67 0x7f97d0f1ff12 _PyEval_EvalCodeWithName + 82
66 0x7f97d0f1fb79 /home/ec2-user/paraview/bin/../lib/libpython3.9.so.1.0(+0x1cdb79) [0x7f97d0f1fb79]
65 0x7f97d0dc01ad _PyEval_EvalFrameDefault + 22077
64 0x7f97d0e17571 _PyFunction_Vectorcall + 177
63 0x7f97d0f1fb79 /home/ec2-user/paraview/bin/../lib/libpython3.9.so.1.0(+0x1cdb79) [0x7f97d0f1fb79]
62 0x7f97d0dc0fd6 _PyEval_EvalFrameDefault + 25702
61 0x7f97d0e1778a _PyObject_MakeTpCall + 154
60 0x7f97d0e8ddac /home/ec2-user/paraview/bin/../lib/libpython3.9.so.1.0(+0x13bdac) [0x7f97d0e8ddac]
59 0x7f97d0e94ba4 /home/ec2-user/paraview/bin/../lib/libpython3.9.so.1.0(+0x142ba4) [0x7f97d0e94ba4]
58 0x7f97d0e17b94 _PyObject_Call_Prepend + 228
57 0x7f97d0e178c4 _PyObject_FastCallDictTstate + 84
56 0x7f97d0db9667 /home/ec2-user/paraview/bin/../lib/libpython3.9.so.1.0(+0x67667) [0x7f97d0db9667]
55 0x7f97d0dc0bd0 _PyEval_EvalFrameDefault + 24672
54 0x7f97d0dba757 /home/ec2-user/paraview/bin/../lib/libpython3.9.so.1.0(+0x68757) [0x7f97d0dba757]
53 0x7f97d0db9667 /home/ec2-user/paraview/bin/../lib/libpython3.9.so.1.0(+0x67667) [0x7f97d0db9667]
52 0x7f97d0dc0bd0 _PyEval_EvalFrameDefault + 24672
51 0x7f97d0dba757 /home/ec2-user/paraview/bin/../lib/libpython3.9.so.1.0(+0x68757) [0x7f97d0dba757]
50 0x7f97d0db9667 /home/ec2-user/paraview/bin/../lib/libpython3.9.so.1.0(+0x67667) [0x7f97d0db9667]
49 0x7f97d0dbd9ce _PyEval_EvalFrameDefault + 11870
48 0x7f97d0dba757 /home/ec2-user/paraview/bin/../lib/libpython3.9.so.1.0(+0x68757) [0x7f97d0dba757]
47 0x7f97d0db9667 /home/ec2-user/paraview/bin/../lib/libpython3.9.so.1.0(+0x67667) [0x7f97d0db9667]
46 0x7f97d0dc0bd0 _PyEval_EvalFrameDefault + 24672
45 0x7f97d0dba757 /home/ec2-user/paraview/bin/../lib/libpython3.9.so.1.0(+0x68757) [0x7f97d0dba757]
44 0x7f97d0db9667 /home/ec2-user/paraview/bin/../lib/libpython3.9.so.1.0(+0x67667) [0x7f97d0db9667]
43 0x7f97d0dc024b _PyEval_EvalFrameDefault + 22235
42 0x7f97d0e17571 _PyFunction_Vectorcall + 177
41 0x7f97d0f1fb79 /home/ec2-user/paraview/bin/../lib/libpython3.9.so.1.0(+0x1cdb79) [0x7f97d0f1fb79]
40 0x7f97d0dbc869 _PyEval_EvalFrameDefault + 7417
39 0x7f97d0e17284 PyVectorcall_Call + 84
38 0x7f97d0e17571 _PyFunction_Vectorcall + 177
37 0x7f97d0f1fb79 /home/ec2-user/paraview/bin/../lib/libpython3.9.so.1.0(+0x1cdb79) [0x7f97d0f1fb79]
36 0x7f97d0dc0bd0 _PyEval_EvalFrameDefault + 24672
35 0x7f97d0dba757 /home/ec2-user/paraview/bin/../lib/libpython3.9.so.1.0(+0x68757) [0x7f97d0dba757]
34 0x7f97d0e17571 _PyFunction_Vectorcall + 177
33 0x7f97d0f1fb79 /home/ec2-user/paraview/bin/../lib/libpython3.9.so.1.0(+0x1cdb79) [0x7f97d0f1fb79]
32 0x7f97d0dc024b _PyEval_EvalFrameDefault + 22235
31 0x7f97d0e17571 _PyFunction_Vectorcall + 177
30 0x7f97d0f1fb79 /home/ec2-user/paraview/bin/../lib/libpython3.9.so.1.0(+0x1cdb79) [0x7f97d0f1fb79]
29 0x7f97d0dc1bd1 _PyEval_EvalFrameDefault + 28769
28 0x7f97d0e1778a _PyObject_MakeTpCall + 154
27 0x7f97d0e8ddac /home/ec2-user/paraview/bin/../lib/libpython3.9.so.1.0(+0x13bdac) [0x7f97d0e8ddac]
26 0x7f97d0e94ba4 /home/ec2-user/paraview/bin/../lib/libpython3.9.so.1.0(+0x142ba4) [0x7f97d0e94ba4]
25 0x7f97d0e17b94 _PyObject_Call_Prepend + 228
24 0x7f97d0e17959 _PyObject_FastCallDictTstate + 233
23 0x7f97d0e17571 _PyFunction_Vectorcall + 177
22 0x7f97d0f1fb79 /home/ec2-user/paraview/bin/../lib/libpython3.9.so.1.0(+0x1cdb79) [0x7f97d0f1fb79]
21 0x7f97d0dc0bd0 _PyEval_EvalFrameDefault + 24672
20 0x7f97d0dba757 /home/ec2-user/paraview/bin/../lib/libpython3.9.so.1.0(+0x68757) [0x7f97d0dba757]
19 0x7f97d0e1ae43 /home/ec2-user/paraview/bin/../lib/libpython3.9.so.1.0(+0xc8e43) [0x7f97d0e1ae43]
18 0x7f97d0e17571 _PyFunction_Vectorcall + 177
17 0x7f97d0f1fb79 /home/ec2-user/paraview/bin/../lib/libpython3.9.so.1.0(+0x1cdb79) [0x7f97d0f1fb79]
16 0x7f97d0dc0bd0 _PyEval_EvalFrameDefault + 24672
15 0x7f97d0dba7bb /home/ec2-user/paraview/bin/../lib/libpython3.9.so.1.0(+0x687bb) [0x7f97d0dba7bb]
14 0x7f97d0e1778a _PyObject_MakeTpCall + 154
13 0x7f97d0e7233b /home/ec2-user/paraview/bin/../lib/libpython3.9.so.1.0(+0x12033b) [0x7f97d0e7233b]
12 0x7f978cb39214 /home/ec2-user/paraview/lib/python3.9/site-packages/paraview/modules/vtkRemotingServerManager.so(+0xdf214) [0x7f978cb39214]
11 0x7f97d330b4ad vtkSMProxy::UpdateVTKObjects() + 29
10 0x7f97cbe2108e vtkSMRenderViewProxy::CreateVTKObjects() + 526
9 0x7f97d3217163 vtkPVSessionCore::GatherInformation(unsigned int, vtkPVInformation*, unsigned int) + 451
8 0x7f97d3216ce8 vtkPVSessionCore::GatherInformationInternal(vtkPVInformation*, unsigned int) + 40
7 0x7f97cbdbaf09 vtkPVRenderingCapabilitiesInformation::CopyFromObject(vtkObject*) + 9
6 0x7f97cbdbaebe vtkPVRenderingCapabilitiesInformation::GetLocalCapabilities() + 158
5 0x7f97b89fd1d5 vtkOpenGLRenderWindow::SupportsOpenGL() + 1029
4 0x7f97b8aa5019 vtkEGLRenderWindow::Initialize() + 41
3 0x7f97b8aa80d9 vtkEGLRenderWindow::WindowInitialize() + 217
2 0x7f97b8aa7dbe vtkEGLRenderWindow::ResizeWindow(int, int) + 366
1 0x7f97b8aa6620 vtkEGLRenderWindow::SetDeviceAsDisplay(int) + 1648
0 0x7f97d4f9dd10 /lib64/libc.so.6(+0x33d10) [0x7f97d4f9dd10]
( 2.544s) [paraview] :0 FATL| Signal: SIGSEGV

```

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [September 29, 2023, 3:23pm UTC](https://discourse.paraview.org/t/paraview-egl-does-not-work-with-pvpython-script/12959/2 "2023-09-29T15:23:25Z")

</div>

Which base image are you using on EC2?

Also, you may need to export the following environment variable (`export NVIDIA_DRIVER_CAPABILITIES=all `) to expose the driver capabilities properly.

---

<div class="post-metadata">

### Author: ![sebasgut1](https://discourse.paraview.org/user_avatar/discourse.paraview.org/sebasgut1/32/11526_2.png) [@sebasgut1](https://discourse.paraview.org/u/sebasgut1)
#### Post date: [September 29, 2023, 4:12pm UTC](https://discourse.paraview.org/t/paraview-egl-does-not-work-with-pvpython-script/12959/3 "2023-09-29T16:12:23Z")

</div>

> [@jourdain](#):
>
> NVIDIA\_DRIVER\_CAPABILITIES

 ![MicrosoftTeams-image](https://discourse.paraview.org/uploads/default/original/2X/f/fd24131109759f66013c12ae3bd5aea692803778.png)

I exported this environment variable but same error.  
I got segmentation fault when the code reaches this line: `render_view = simple.GetRenderView()`

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [September 29, 2023, 4:24pm UTC](https://discourse.paraview.org/t/paraview-egl-does-not-work-with-pvpython-script/12959/4 "2023-09-29T16:24:49Z")

</div>

Are you sure your GPU is a rendering one?

What is the output of `nvidia-smi`?
