Wayland: [VTK] GLEW could not be initialized: Unknown error

Hi all,

KDE on Arch Linux is now at version 6 and uses Wayland by default. X11 is still available but support seems decreased, and it will probably stop some day.

The problem with Slicer is the appearance of this message on every MRML event, even in an empty scene, in Python console and in stdout. The flooded Python console becomes hard to use, whether for running code or reading other messages.

[VTK] GLEW could not be initialized: Unknown error

I rebuilt Slicer and extensions in vain regarding the appearance of this message. GLEW is installed on the build machine and the runtime machine. (By the way, I don’t know what it does, what it is).

I wish to know if there’s a way to prevent this message from showing in Python console. Is there a VTK configuration parameter to set? Some system changes to do? As a last ‘solution’, I’ll try to search this message in the source files of VTK, simply remove it and adapt the SuperBuild cmake file.

Thanks and regards.

Yes, trying to debug this at the VTK level is probably the right thing to do, but it may not be easy. Probably Slicer / VTK are not the only programs that have issues with Wayland so I’d suggest sticking with X11 for now. Eventually maybe Vulkan, Wayland, and other new things will be preferable but the transition is likely to take a while.

Thanks for your reply.

Meanwhile, I found a nice workaround here.

# Use either or both
# export XDG_SESSION_TYPE=""
export QT_QPA_PLATFORM="xcb"

The view controllers are badly located also under KDE6/Wayland.

I’ll report other issues as they are discovered.

But the above workaround resolves everything up to now.