Visualization toolkit (VTK) not working

torizon@verdin-imx8mp-14753765:~$ cat /etc/os-release
VERSION=“6.4.0+build.5 (kirkstone)”
PRETTY_NAME=“TorizonCore 6.4.0+build.5 (kirkstone)”

1.Created container
# docker run -e ACCEPT_FSL_EULA=1 -d --rm --name=weston --net=host --cap-add CAP_SYS_TTY_CONFIG
-v /dev:/dev -v /tmp:/tmp -v /run/udev/:/run/udev/
–device-cgroup-rule=‘c 4:* rmw’ --device-cgroup-rule=‘c 13:* rmw’
–device-cgroup-rule=‘c 199:* rmw’ --device-cgroup-rule=‘c 226:* rmw’
torizon/weston-vivante:$CT_TAG_WESTON_VIVANTE --developer --tty=/dev/tty7

  1. docker exec -it weston /bin/bash
  2. apt update
  3. apt install python3-vtk9
  4. Created python script from this source
    6.Ran the script
    7. python3
    8. Authorization required, but no authorization protocol specified.
    ** segmentation fault.**

JFI, the above VTK application runs fine on WSL2(Windows subsystem for linux) which uses weston compositor. xwayland is set to true.

had something similar try running the app as su torizon.
see solution in this post had similar error

1 Like

Thanks @nkj , Running the app as su torizon helps with the authorization issue.
Now, I’m still left with below issue.

$ python3
2024-02-14 17:45:42.041 ( 0.162s) [ 930804C0]vtkXOpenGLRenderWindow.:266 ERR| vtkXOpenGLRenderWindow (0x21de0c60): Could not find a decent config

2024-02-14 17:45:42.042 ( 0.163s) [ 930804C0]vtkXOpenGLRenderWindow.:484 ERR| vtkXOpenGLRenderWindow (0x21de0c60): Could not find a decent visual

Aborted (core dumped)

Greetings @Sudharshan,

I’m not very familiar with the VTK framework here. But on some quick research it seems that VTK relies on GLX, is that true? If that is the case then you might have an issue since NXP has dropped support for GLX from their GPU drivers: xwayland: Drop GLX for i.MX GPU · Freescale/meta-freescale@b4fbbf1 · GitHub

Best Regards,