idyntree: idyntree-model-view installed from conda binary package or with conda dependencies fails on WSL on Ubuntu 22.04

Hi, I have WSL (Ubuntu 22.04 LTS) installed on Windows 11 with the following specs:

WSL version: 2.3.24.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.65
MSRDC version: 1.2.5620
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release

By running the command idyntree-model-view -m <model_urdf>, i get the following error:

Irrlicht Engine version 1.8.5
SDL Version 1.2.68
X Error of failed request:  BadAccess (attempt to access private resource denied)
  Major opcode of failed request:  148 (GLX)
  Minor opcode of failed request:  5 (X_GLXMakeCurrent)
  Serial number of failed request:  117
  Current serial number in output stream:  117

cc: @traversaro

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 19 (16 by maintainers)

Most upvoted comments

Ack! It is still not clear to me what is happening, but perhaps we can just try first to open the window with X11, and if it fails try with Wayland? Both will link both X11 and Wayland, but that is not a problem I guess.

Unfortunately there is no macro to detect if glfw3 was compiled with wayland support or not. Perhaps the easist solution is just to have an option to enable or not wayland support (with X11 fallback), and set its default to ON if CONDA_PREFIX is defined and OFF otherwise.

That seems good to me, the only doubt is that if the glfw versions that we use is compiled with wayland support, however if you open a PR we should easily detect that as we would have a linking error otherwise.

I am running on Ubuntu 24.10 (Wayland). XWayland should be running as xeyes works

I’ve also encountered this problem using Wayland. The solution for me was to compile idyntree with wayland support as in https://github.com/robotology/idyntree/compare/master...flferretti:idyntree:wayland_support. @traversaro do you think we could add this? One main problem that I see is that then on conda-forge there would be two different recipes, one for X11 and one for Wayland as I couldn’t find a way to check the session apart from using $XDG_SESSION_TYPE.

FYI @xela-95 @S-Dafarra

I made it much simpler and moved onto an Ubuntu 24.04 partition 🥇 Just wanted to alert you of this problem happening on Ubuntu 22.04. Thanks for the support.