Error on Ubuntu 22.04.2 Wayland: Failed to create XKB compose table

Hello
Windows 10
Ubuntu 22.04.2 LTS in VirtualBox
glfw 2.6.2 (Python)

Running a simple example shows:

xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:39:34: string literal is not a valid UTF-8 string

xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:40:29: string literal is not a valid UTF-8 string

xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:41:29: string literal is not a valid UTF-8 string

xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:42:29: string literal is not a valid UTF-8 string

xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:43:29: string literal is not a valid UTF-8 string

xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:44:27: string literal is not a valid UTF-8 string

xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:45:27: string literal is not a valid UTF-8 string

xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:46:27: string literal is not a valid UTF-8 string

xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:47:27: string literal is not a valid UTF-8 string

xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:48:29: string literal is not a valid UTF-8 string

xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:49:29: string literal is not a valid UTF-8 string

xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:49:29: too many errors

xkbcommon: ERROR: /usr/share/X11/locale/iso8859-1/Compose:49:29: failed to parse file

/home/prashant/.local/lib/python3.10/site-packages/glfw/__init__.py:916: GLFWError: (65544) b'Wayland: Failed to create XKB compose table'


What is your locale set to? Is it something non-utf8? Try setting to something like en_US.UTF-8 not en_US. Don’t forget to run locale-gen

See this link on how to change locale in Ubuntu: Locale - Community Help Wiki

Now, window renders without close, maximize and minimize icon. As soon as cursor move on window, it’s
getting changed and there is an error message:

Wayland: Standard cursor shape unavailable

I’m not sure, but that’s maybe because you’re using old glfw version?
I think this pull request fixes by adding decorations: Implement window decorations by linkmauve · Pull Request #1161 · glfw/glfw · GitHub

But you should be able to use glfw with X11 under wayland. That should give you normal looking window. If I’m not mistaken, then installing libglfw3 instead of libglfw3-wayland will choose x11 over wayland under ubunut.
No need to use wayland unless you have very specific reason to use it. XWayland will run your X11 windows under wayland.